blob: 36badd9b21f1c99cd1465923d9d58d1ec31d9960 [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
Akash Sonief452f12024-12-12 18:20:28 +053058 skip-files:
59 - _test\.go$
60 skip-dirs:
61 - voltha-go-controller/tests/mocks
62 - internal/test/mocks
vinokuma926cb3e2023-03-29 11:41:06 +053063
64# golangci.com configuration
65# https://github.com/golangci/golangci/wiki/Configuration
66service:
Akash Sonief452f12024-12-12 18:20:28 +053067 golangci-lint-version: 1.61.0 # use the fixed version to not introduce new linters unexpectedly
vinokuma926cb3e2023-03-29 11:41:06 +053068 prepare:
69 - echo "here I can run custom commands, but no preparation needed for this repo"
70issues:
71 exclude:
72 - 'G114: Use of net/http serve function that has no support for setting timeouts'