Skip to content

Commit

Permalink
add staticcheck config files to appease the linter
Browse files Browse the repository at this point in the history
So that we can start using it in CI, meaning that we enforce
that all the checks which already pass keep on passing.
This way, we can gradually improve and reduce the length of the
list of disabled checks, ensuring that we make progress forward.

Updates #3335.

Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
Change-Id: I8a3c1ed549dee39059932d8ca14755b473a8c47c
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1204981
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
Reviewed-by: Paul Jolly <paul@myitcv.io>
  • Loading branch information
mvdan committed Dec 1, 2024
1 parent afafedb commit 9d10fe1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/golangorgx/staticcheck.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# ./internal/golangorgx/... is vendored from intenral golang.org/x/... code
# so we don't maintain nor lint that code, at least not for now.
checks = ["-all"]
13 changes: 13 additions & 0 deletions staticcheck.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Run the default check list, minus some that don't pass just yet.
# TODO: fix most of the issues below and re-enable their checks.
checks = [
"inherit",
"-SA1019", # use of deprecated APIs
"-SA4000", # identical expressions in && or || logic
"-SA4004", # loop broken unconditionally
"-SA4006", # value never used
"-S1008", # simplify if/else to bool expression
"-S1011", # simplify loop with append
"-ST1006", # non-generic receiver names
"-U1000", # unused code
]

0 comments on commit 9d10fe1

Please sign in to comment.