Skip to content

"lint --format checkstyle" produces invalid output #4791

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

Closed
Typhlosaurus opened this issue Feb 17, 2017 · 1 comment · Fixed by #4917
Closed

"lint --format checkstyle" produces invalid output #4791

Typhlosaurus opened this issue Feb 17, 2017 · 1 comment · Fixed by #4917

Comments

@Typhlosaurus
Copy link

OS?

Mac OSX (Yosemite? El Capitan?)

Versions.

@angular/cli: 1.0.0-beta.32.3 [1.0.0-beta.31]
node: 6.9.5
os: darwin x64
@angular/common: 2.4.7
@angular/compiler: 2.4.7
@angular/core: 2.4.7
@angular/forms: 2.4.7
@angular/http: 2.4.7
@angular/platform-browser: 2.4.7
@angular/platform-browser-dynamic: 2.4.7
@angular/router: 3.4.7
@angular/cli: 1.0.0-beta.32.3
@angular/compiler-cli: 2.4.7

Repro steps.

Basic problem occurs straight after project is generated.

The log given by the failure.

n/a

Mention any other details that might be useful.

When generating checkstyle output (for use in Jenkins etc) using ng lint --format checkstyle there is no standard way to send just the xml output to a file - you have to redirect stdout, which then includes the summary line All files pass linting. or Lint errors found in the listed files. at the end of the output.

Furthermore on success no xml output is produced at all causing xml parse errors. Tslint itself does produce xml output on success so this would appear to be actively suppressed.

moritz-h added a commit to moritz-h/angular-cli that referenced this issue Feb 20, 2017
Add output option to ng lint command to redirect lint result to file.

Fix angular#4791
moritz-h added a commit to moritz-h/angular-cli that referenced this issue Feb 22, 2017
Print linting result only for human-readable formats, to not mess up xml, json, ... output.

Fix angular#4791
@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 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
1 participant