-
Notifications
You must be signed in to change notification settings - Fork 12k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(@angular/cli): ensure lint generates well-formed machine output #5224
Conversation
packages/@angular/cli/tasks/lint.ts
Outdated
@@ -6,6 +6,7 @@ import { requireProjectModule } from '../utilities/require-project-module'; | |||
import { CliConfig } from '../models/config'; | |||
import { LintCommandOptions } from '../commands/lint'; | |||
import { oneLine } from 'common-tags'; | |||
// import * as tslint from 'tslint'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove commented code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
if (current.fixes) { | ||
total.fixes = (total.fixes || []).concat(...current.fixes); | ||
} | ||
return total; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we just change it to 1 Liner total.fixes = (total.fixes || []).concat(...(current.fixes || []));
😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Originally had a one-liner but some of the built-in formatters expect fixes
to be falsy if none were made.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just two minor changes otherwise LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For machine readable output formats, ng lint was concatenating multiple documents into a single file. This resulted in invalid JSON, XML, etc. The lint results are now aggregated and one full output is generated. Fix angular#5259 Close angular#5224
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
For machine readable output formats,
ng lint
was concatenating multiple documents into a single file. This resulted in invalid JSON, XML, etc. The lint results are now aggregated and one full output is generated.Fix #5259