Skip to content

Commit

Permalink
Clean up revive linter config, tweak golangci output (#30980)
Browse files Browse the repository at this point in the history
The `errorCode` and `warningCode` options were removed at some point,
they are not recognized by golangci-lint any more at least and they do
not match their published json schema. `confidence` and
`ignore-generated-header` are at the default value so does not need to
be configured.

https://golangci-lint.run/usage/linters/#revive
  • Loading branch information
silverwind authored May 18, 2024
1 parent 821d2fc commit 0289924
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ run:

output:
sort-results: true
sort-order: [file]
show-stats: true

linters-settings:
stylecheck:
Expand All @@ -40,11 +42,7 @@ linters-settings:
- ifElseChain
- singleCaseSwitch # Every time this occurred in the code, there was no other way.
revive:
ignore-generated-header: false
severity: warning
confidence: 0.8
errorCode: 1
warningCode: 1
severity: error
rules:
- name: atomic
- name: bare-return
Expand Down

0 comments on commit 0289924

Please sign in to comment.