Skip to content
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

Closed
wants to merge 1 commit into from
Closed

fix(@angular/cli): ensure lint generates well-formed machine output #5224

wants to merge 1 commit into from

Conversation

clydin
Copy link
Member

@clydin clydin commented Mar 4, 2017

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

@@ -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';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove commented code

Copy link
Member Author

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;
Copy link
Contributor

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 || [])); 😉

Copy link
Member Author

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.

Copy link
Contributor

@sumitarora sumitarora left a 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

Copy link
Contributor

@sumitarora sumitarora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@clydin clydin deleted the lint-output branch March 9, 2017 14:36
asnowwolf pushed a commit to asnowwolf/angular-cli that referenced this pull request Apr 12, 2017
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
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Duplicate Lint Errors
4 participants