-
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
Feature: Add --out flag to ng lint #4959
Comments
The next release will allow you to properly redirect the output to a file. |
Closing as answered. Thanks to @moritz-h for implementing it! |
Awesome. Thank you! |
@filipesilva @clydin @philipooo ng lint --format pmd > result.xml
tr -d '\n' < result.xml > result-fix.xml # all text in one line for sed
sed -i -e 's/<\/pmd><pmd version="tslint">//g' result-fix.xml # fix xml |
Hello, which release has the --out option in? I can't seem to find it in the code. |
Thanks for the workaround, @moritz-h. I had some trouble on Windows but got it working with two commands:
|
@LayZeeDK The problem with messed up xml is fixed long time ago. See the issue I referenced above.
|
This was never actually added from what I can see, please revisit this. It would be a great simplification. |
It would be really great to have that "--output" option. Right now the only possibility to store the tslint result in a file is by redirecting standard output stream to a file, but it sometimes includes the ANSI escapes (colors) in the generated file, making the file not well-formatted. Example: Thanks |
@GregorioPerego It appears redirecting to a file is the intended way to do this. The fix mentioned above by @moritz-h was to enable that. If the format is non-human readable and there are illegal characters in the output then that would be a separate bug on it's own. |
|
@westonpace yes, that sounds about right, thank you |
Hey guys, I think you should reconsider this issue. Given the default setup creates two projects ("example" and "example-e2e") when we run
the result file ends up containing both xml documents like so
|
@leandro-manifesto that's a separate defect that needs to be fixed. |
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. |
Use-case
In our CI we use SonarQube and the TypeScript plugin which can parse the tslint output and translate it into issues. To generate the output I want to use
ng lint
.Request
Because there is no way to store the output of
ng lint --format json
into a valid json file it would be useful to add the--out
argument and pass it to tslint.The text was updated successfully, but these errors were encountered: