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

VSO formatter should report severity of rule violations #4248

Closed
tklingert opened this issue Oct 24, 2018 · 6 comments
Closed

VSO formatter should report severity of rule violations #4248

tklingert opened this issue Oct 24, 2018 · 6 comments

Comments

@tklingert
Copy link

Bug Report

  • TSLint version: 5.11.0
  • TypeScript version: 2.9.2
  • Running TSLint via: CLI

VSO formatter

tslint -p tsconfig.json -c tslint.json -t vso

##vso[task.logissue type=warning;sourcepath=D:/dev/src/GET/cdm_frontend_WebUI/src/app/app.module.ts;linenumber=32;columnnumber=1;code=no-trailing-whitespace;]trailing whitespace

Verbose formatter

tslint -p tsconfig.json -c tslint.json -t verbose

ERROR: (no-trailing-whitespace) D:/dev/src/GET/cdm_frontend_WebUI/src/app/app.module.ts[32, 1]: trailing whitespace

Expected behavior

VSO formatter doesn't apply hard-coded 'warning' severity too all issues:
vsoFormatter.ts
verboseFormatter.ts

@tcigrand
Copy link

I believe this is purposeful - https://palantir.github.io/tslint/formatters/vso/

@JoshuaKGoldberg
Copy link
Contributor

Do VSO/TFS/VSTS/DevOps logging commands support different severities?

/cc @ian-craig, who's worked with them a bit more.

@ian-craig
Copy link

Yes, see https://github.com/Microsoft/azure-pipelines-tasks/blob/master/docs/authoring/commands.md

I think @tklingert is just suggesting that the bolded "warning" part of the message should be changed to "error".

@tklingert
Copy link
Author

@ian-craig According to the severity provided by the rule, yes.

e.g.

WARNING: .../bar.ts[18, 28]: HttpService is deprecated: use common/api-client/api-client-base instead (sample see common/permission/user-permission-service)
vs
ERROR: .../foo.ts[10,11]: Type declaration of 'any' loses type-safety. Consider replacing it with a more precise type.

@JoshuaKGoldberg
Copy link
Contributor

JoshuaKGoldberg commented Oct 2, 2019

Removing Ignoring the Type: Breaking Change label per #4811. Now accepting PRs!

@adidahiya adidahiya changed the title VSO formatter ignores severity of rules VSO formatter should report severity of rule violations Oct 5, 2019
@JoshuaKGoldberg
Copy link
Contributor

#4286 was merged to address this 🙌

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

5 participants