File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ linters:
4040 - gosec # Detects security problems.
4141 - govet
4242 - ineffassign
43+ - importas # Enforces consistent import aliases.
4344 - misspell # Detects commonly misspelled English words in comments.
4445 - nakedret # Detects uses of naked returns.
4546 - nilerr # Detects code that returns nil even if it checks that the error is not nil.
@@ -108,6 +109,21 @@ linters:
108109 lll :
109110 line-length : 200
110111
112+ importas :
113+ # Do not allow unaliased imports of aliased packages.
114+ no-unaliased : true
115+
116+ alias :
117+ # Enforce alias to prevent it accidentally being used instead of our
118+ # own errdefs package (or vice-versa).
119+ - pkg : github.com/containerd/errdefs
120+ alias : cerrdefs
121+ - pkg : github.com/opencontainers/image-spec/specs-go/v1
122+ alias : ocispec
123+ # Enforce that gotest.tools/v3/assert/cmp is always aliased as "is"
124+ - pkg : gotest.tools/v3/assert/cmp
125+ alias : is
126+
111127 nakedret :
112128 # Disallow naked returns if func has more lines of code than this setting.
113129 # Default: 30
You can’t perform that action at this time.
0 commit comments