...
1#
2# Copyright 2021 The Sigstore Authors.
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16linters:
17 enable:
18 - asciicheck
19 - unused
20 - errcheck
21 - errorlint
22 - forbidigo
23 - gofmt
24 - goimports
25 - gosec
26 - gocritic
27 - importas
28 - prealloc
29 - revive
30 - misspell
31 - stylecheck
32 - tparallel
33 - unconvert
34 - unparam
35 - whitespace
36linters-settings:
37 forbidigo:
38 forbid:
39 # Forbid using os.Getenv and os.LookupEnv with COSIGN_ variables in favor of
40 # pkg/cosign/env package
41 # Reference: https://github.com/sigstore/cosign/issues/2236
42 - 'os\.Getenv.*'
43 - 'os\.LookupEnv.*'
44 exclude_godoc_examples: false
45output:
46 uniq-by-line: false
47issues:
48 exclude-rules:
49 - path: _test\.go
50 linters:
51 - errcheck
52 - gosec
53 # We want to allow using os.Getenv and os.Setenv in tests because it
54 # might be easier (and needed in some cases)
55 - forbidigo
56 max-issues-per-linter: 0
57 max-same-issues: 0
58run:
59 issues-exit-code: 1
60 timeout: 10m
View as plain text