blob: 4f7df6be0362d70b489d7a4dba509a6a06adff15 [file] [log] [blame]
vinokuma926cb3e2023-03-29 11:41:06 +05301#
2# Copyright 2023-present Open Networking Foundation
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#
15
16linters-settings:
17 govet:
18 check-shadowing: true
19 settings:
20 printf:
21 funcs:
22 - (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof
23 - (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf
24 - (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf
25 - (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf
26 enable:
27 - fieldalignment
28
29 golint:
30 min-confidence: 0
31
32 gocyclo:
33 min-complexity: 30
34
35 misspell:
36 locale: US
37
38linters:
39 disable-all: true
40 enable:
41 - govet
42 - errcheck
43 - goconst
44 - gofmt
45 - whitespace
46 - goimports
47 - gosimple
48 - ineffassign
49 - gocyclo
50 - misspell
51 - staticcheck
52 - unused
53 - gosec
54
55run:
56 issues-exit-code: 1
57 timeout: 10m
58
59# golangci.com configuration
60# https://github.com/golangci/golangci/wiki/Configuration
61service:
62 golangci-lint-version: 1.50.1 # use the fixed version to not introduce new linters unexpectedly
63 prepare:
64 - echo "here I can run custom commands, but no preparation needed for this repo"
65issues:
66 exclude:
67 - 'G114: Use of net/http serve function that has no support for setting timeouts'