-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Invalid severity type for Code Climate export format #5349
Comments
Hey, thank you for opening your first Issue ! 🙂 If you would like to contribute we have a guide for contributors. |
Hello, you should apply your mapping of severities through the configuration: https://golangci-lint.run/usage/configuration/#severity-configuration I will create a PR to reject non-allowed severity names. We will not embed a mapping. |
@ldez Thanks for looking into this issue and making quick changes! However, I think (do correct me if I am wrong) the severity configuration does not address the need because it blankets the severity for all rules in the linter. For example, if I can understand that embedding severity mappings can be problematic because it can be up to one's interpretation. Wondering if, perhaps, we could expose configuration options to map severity for this use-case? For example: severity:
rewrite:
low: "info"
medium: "minor"
high: "major"
warning: "error"
error: "blocker" |
I created a local implementation, but currently, I prefer to limit new elements during the work on v2. #5300 Your idea will be used, but after the work on v2. |
Cool, many thanks for your consideration! |
Welcome
typecheck
section of the FAQ.Description of the problem
Using the
code-climate
export format, there may be instances where the exported file does not have the correct severity type as defined by the Code Climate severity types:Looking at Code Climate printer in the code base, it seems that the severity is emitted as-is when in fact there may be some mapping we could have done.
Version of golangci-lint
Configuration
$ golangci-lint run --verbose --print-issued-lines=false --out-format code-climate:golangci-lint.json,line-number
Go environment
Validation
Supporter
The text was updated successfully, but these errors were encountered: