|
1 | | -# ****************************************************************************** |
2 | | -# IBM Cloud Kubernetes Service, 5737-D43 |
3 | | -# (C) Copyright IBM Corp. 2022, 2025 All Rights Reserved. |
4 | | -# |
5 | | -# SPDX-License-Identifier: Apache2.0 |
6 | | -# |
7 | | -# Licensed under the Apache License, Version 2.0 (the "License"); |
8 | | -# you may not use this file except in compliance with the License. |
9 | | -# You may obtain a copy of the License at |
10 | | -# |
11 | | -# http://www.apache.org/licenses/LICENSE-2.0 |
12 | | -# |
13 | | -# Unless required by applicable law or agreed to in writing, software |
14 | | -# distributed under the License is distributed on an "AS IS" BASIS, |
15 | | -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
16 | | -# See the License for the specific language governing permissions and |
17 | | -# limitations under the License. |
18 | | -# ****************************************************************************** |
| 1 | +version: "2" |
19 | 2 | linters: |
20 | | - disable-all: true |
21 | 3 | enable: |
22 | | - - gofmt |
| 4 | + - gocritic |
23 | 5 | - gosec |
24 | | - - gosimple |
25 | | - - staticcheck |
26 | | - - unused |
27 | | - - govet |
| 6 | + - govet # on by default |
| 7 | + - ineffassign # on by default |
28 | 8 | - misspell |
29 | | - - ineffassign |
30 | | - - gocritic |
31 | | - |
32 | | -linters-settings: # please keep this alphabetized |
33 | | - staticcheck: |
34 | | - checks: |
35 | | - - "all" |
36 | | - - "-SA1006" # TODO(fix) Using a printf-style function with a dynamic format string and no arguments can just use a print-style func |
| 9 | + - staticcheck # on by default |
| 10 | + - unused # on by default |
| 11 | + disable: |
| 12 | + - errcheck |
| 13 | + - unconvert |
| 14 | + - unparam |
| 15 | + settings: |
| 16 | + staticcheck: |
| 17 | + checks: |
| 18 | + - all # Enable all checks by default |
| 19 | + - -ST1005 # error strings should not be capitalized / error strings should not end with punctuation or newlines |
| 20 | + - -ST1017 # don't use Yoda conditions |
| 21 | + - -ST1023 # should omit type string from declaration; it will be inferred from the right-hand side |
| 22 | + - -QF1008 # could remove embedded field "ObjectMeta" from selector |
| 23 | + - -QF1011 # could omit type string from declaration; it will be inferred from the right-hand side |
| 24 | + exclusions: |
| 25 | + presets: |
| 26 | + - comments |
| 27 | + - common-false-positives |
| 28 | + - legacy |
| 29 | + - std-error-handling |
| 30 | +formatters: |
| 31 | + enable: |
| 32 | + - gofmt |
0 commit comments