Skip to content
This repository has been archived by the owner on Mar 29, 2021. It is now read-only.

Create a global override of issues severity. #19

Closed
dufrannea opened this issue Apr 18, 2016 · 4 comments
Closed

Create a global override of issues severity. #19

dufrannea opened this issue Apr 18, 2016 · 4 comments
Assignees

Comments

@dufrannea
Copy link

Hi,

Right now when using TSLint.MSBuild, all issues are reported as errors. I understand this is a tslint problem (palantir/tslint#345) that will be fixed at some point, but right now this issue prevents me from using tslint.

Most of the issues raised by other linters/analysers in my projects are warnings, and I do not want errors to show up for spacing issues.

There might be another way of doing this I am not aware of, if not, would you consider adding a msbuild property (something like TSLintTreatErrorsAsWarnings) for this purpose ?

Cheers

@JoshuaKGoldberg
Copy link
Owner

Having a build property for this is a good idea.

It would be better to have it as something like TSLintErrorsSeverity, with a default to error severity. That way we could also treat them as logs, etc.

@dufrannea
Copy link
Author

I agree it'd be better to have a parameter for severity.
I would be glad to look into this if you want.
Let me know !

@JoshuaKGoldberg
Copy link
Owner

:) Please do!

@JoshuaKGoldberg
Copy link
Owner

JoshuaKGoldberg commented Jun 24, 2016

https://blogs.msdn.microsoft.com/msbuild/2006/11/02/msbuild-visual-studio-aware-error-messages-and-message-formats/

As of 0.4.X, the error output format is:

1>C:\Code\Test\TypeScriptHTMLApp1\TypeScriptHTMLApp1\app.ts(18,13): warning : trailing whitespace
1>C:\Code\Test\TypeScriptHTMLApp1\TypeScriptHTMLApp1\app.ts(25,5): warning : forbidden var keyword
1>C:\Code\Test\TypeScriptHTMLApp1\TypeScriptHTMLApp1\app.ts(26,5): warning : forbidden var keyword
1>C:\Code\Test\TypeScriptHTMLApp1\TypeScriptHTMLApp1\app.ts(9,44): warning : ' should be "
1>C:\Code\Test\TypeScriptHTMLApp1\TypeScriptHTMLApp1\app.ts(25,38): warning : ' should be "

@JoshuaKGoldberg JoshuaKGoldberg self-assigned this Jun 24, 2016
JoshuaKGoldberg pushed a commit that referenced this issue Jul 2, 2016
Optional MSBuild error severity override, as `"error"` or `"warning"`.

Fixes #19.
JoshuaKGoldberg pushed a commit that referenced this issue Jul 2, 2016
* Added an optional `TSLintErrorSeverity` flag

Optional MSBuild error severity override, as `"error"` or `"warning"`.

Fixes #19.

* Fixed README.md ordering for error severity

* Moved the "X errors found" message above errors

Now that error printing is a source of errors (albeit very unlikely) it
makes sense to have the summary first.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants