-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
code-climate: add check_name field #5086
code-climate: add check_name field #5086
Conversation
Hey, thank you for opening your first Pull Request ! |
The linter name cannot be empty, so there's no need for default. The description should not be changed to avoid breaking changes. The severity is optional, and it should be controlled with the severity configuration: https://golangci-lint.run/usage/configuration/#severity-configuration |
01271d4
to
5a52843
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@Wani4ka thanks for this I'm curious, did you see any change in the way GitLab reports the issues? |
GitLab self-hosted is used in my work, and I tried to make an integration of golangci-lint and ci code quality by uploading linter job artifacts, but it wasn't interpreted as a correct report. I may presume that the reason could be in the job misconfiguration, but I decided to start investigating the issue by checking the job artifact and golangci-lint source code and found this field mismatch. I'll check the job configuration later, but anyways I think this change might be useful |
I checked gitlab code and it will have no effect (the example JSON in the link you quoted confirms it). Maybe it would one day. But not for now. But it's great that golangci-lint code climate report respects the expected format 👍 |
Are you sure? The Ruby code doesn't seem to handle it but JS code handles it.
|
I was talking about the fact the check_name field is not used in the way GitLab represents the code climate results. But maybe, I don't get what you just said, or I missed something. If then, I'm sorry about it. |
CodeClimateIssue declares to contain just enough fields to support Gitlab CI Code Quality. But there's a field called
check_name
, which is not generated by golangci-lint, but is stated as required in both Code Climate spec and Gitlab CI Code Quality reference. I moved linter's name from thedescription
field to thecheck_name
field. I'm not sure if there can be any issue made by an unknown linter, but I made a default value for this field as well, just to be sure.I also updated the corresponding test and the link to the Gitlab page (the previous one reported 404).