Skip to content

Commit

Permalink
chore(lint): skips true|false for goconst (opendatahub-io#1110)
Browse files Browse the repository at this point in the history
As we have labels and annotations with values either `true` or `false`
we often compare them in the code. This leads to complains of `goconst`
linter about extracting these "magic words" to constants. As this are
obvious values to check against there's little benefit of doing so.

This change configures `goconst` for golangci-lint runner to skip such
cases.

(cherry picked from commit 2b7f7da)
  • Loading branch information
bartoszmajsak authored and VaishnaviHire committed Jul 24, 2024
1 parent f2124ca commit 5371448
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ linters-settings:
- dot
skip-generated: false
custom-order: true
goconst:
ignore-strings: "true|false"
errcheck:
check-type-assertions: true
exhaustive:
Expand Down

0 comments on commit 5371448

Please sign in to comment.