Skip to content

Commit

Permalink
.golangci.yml: add lint to check for usage of testtime in non-test code
Browse files Browse the repository at this point in the history
Signed-off-by: Oliver Calder <[email protected]>
  • Loading branch information
olivercalder committed Nov 12, 2024
1 parent c474929 commit dc40fa8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,14 @@ linters-settings:
deny:
- pkg: "os/user"
desc: "Please use osutil/user instead. See https://github.com/canonical/snapd/pull/13776"
testtime:
files:
- "!$test"
deny:
- pkg: "github.com/snapcore/snapd/testtime"
desc: "Cannot use testtime outside of test code"
- pkg: "github.com/canonical/snapd/testtime"
desc: "Cannot use testtime outside of test code"

misspell:
# Correct spellings using locale preferences for US or UK.
Expand Down

0 comments on commit dc40fa8

Please sign in to comment.