|
1 | | -# Copyright 2022 Google LLC. |
2 | | -# |
3 | | -# Licensed under the Apache License, Version 2.0 (the "License"); |
4 | | -# you may not use this file except in compliance with the License. |
5 | | -# You may obtain a copy of the License at |
6 | | -# |
7 | | -# http://www.apache.org/licenses/LICENSE-2.0 |
8 | | -# |
9 | | -# Unless required by applicable law or agreed to in writing, software |
10 | | -# distributed under the License is distributed on an "AS IS" BASIS, |
11 | | -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
12 | | -# See the License for the specific language governing permissions and |
13 | | -# limitations under the License. |
14 | | -# .golangci.yml |
| 1 | +version: "2" |
15 | 2 | linters: |
16 | | - disable-all: true |
| 3 | + default: none |
17 | 4 | enable: |
18 | | - - goimports |
19 | | - - revive |
20 | 5 | - importas |
21 | | -issues: |
22 | | - exclude-use-default: false |
23 | | -linters-settings: |
24 | | - importas: |
25 | | - no-unaliased: true |
26 | | - alias: |
27 | | - - pkg: "github.com/GoogleCloudPlatform/cloud-sql-proxy-operator/internal/api/v1alpha1" |
28 | | - alias: "cloudsqlapi" |
29 | | - revive: |
30 | | - rules: |
31 | | - - name: blank-imports |
32 | | - - name: context-as-argument |
33 | | - - name: context-keys-type |
34 | | - - name: dot-imports |
35 | | - - name: error-return |
36 | | - - name: error-strings |
37 | | - - name: error-naming |
38 | | - # - name: exported |
39 | | - - name: if-return |
40 | | - - name: increment-decrement |
41 | | - - name: var-naming |
42 | | - - name: var-declaration |
43 | | - - name: package-comments |
44 | | - - name: range |
45 | | - - name: receiver-naming |
46 | | - - name: time-naming |
47 | | - - name: unexported-return |
48 | | - - name: indent-error-flow |
49 | | - - name: errorf |
50 | | - - name: empty-block |
51 | | - - name: superfluous-else |
52 | | - - name: unused-parameter |
53 | | - - name: unreachable-code |
54 | | - - name: redefines-builtin-id |
55 | | - - name: range-val-in-closure |
56 | | - - name: range-val-address |
57 | | - - name: import-shadowing |
58 | | -run: |
59 | | - timeout: 5m |
| 6 | + - revive |
| 7 | + settings: |
| 8 | + importas: |
| 9 | + alias: |
| 10 | + - pkg: github.com/GoogleCloudPlatform/cloud-sql-proxy-operator/internal/api/v1alpha1 |
| 11 | + alias: cloudsqlapi |
| 12 | + no-unaliased: true |
| 13 | + revive: |
| 14 | + rules: |
| 15 | + - name: blank-imports |
| 16 | + - name: context-as-argument |
| 17 | + - name: context-keys-type |
| 18 | + - name: dot-imports |
| 19 | + - name: error-return |
| 20 | + - name: error-strings |
| 21 | + - name: error-naming |
| 22 | + - name: if-return |
| 23 | + - name: increment-decrement |
| 24 | + - name: var-naming |
| 25 | + - name: var-declaration |
| 26 | + - name: package-comments |
| 27 | + - name: range |
| 28 | + - name: receiver-naming |
| 29 | + - name: time-naming |
| 30 | + - name: unexported-return |
| 31 | + - name: indent-error-flow |
| 32 | + - name: errorf |
| 33 | + - name: empty-block |
| 34 | + - name: superfluous-else |
| 35 | + - name: unused-parameter |
| 36 | + - name: unreachable-code |
| 37 | + - name: redefines-builtin-id |
| 38 | + - name: range-val-in-closure |
| 39 | + - name: range-val-address |
| 40 | + - name: import-shadowing |
| 41 | + exclusions: |
| 42 | + generated: lax |
| 43 | + paths: |
| 44 | + - third_party$ |
| 45 | + - builtin$ |
| 46 | + - examples$ |
| 47 | +formatters: |
| 48 | + enable: |
| 49 | + - goimports |
| 50 | + exclusions: |
| 51 | + generated: lax |
| 52 | + paths: |
| 53 | + - third_party$ |
| 54 | + - builtin$ |
| 55 | + - examples$ |
0 commit comments