blob: 1147894187796b0e17e04f9e5382b4e6cb5b5c09 [file] [log] [blame]
#Copyright 2018-2024 Open Networking Foundation (ONF) and the ONF Contributors
#
#Licensed under the Apache License, Version 2.0 (the "License");
#you may not use this file except in compliance with the License.
#You may obtain a copy of the License at
#
#http://www.apache.org/licenses/LICENSE-2.0
#
#Unless required by applicable law or agreed to in writing, software
#distributed under the License is distributed on an "AS IS" BASIS,
#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#See the License for the specific language governing permissions and
#limitations under the License.
version: "2"
linters:
enable:
#- gocritic
#- gochecknoglobals
#- gochecknoinits
- gocyclo
- govet
- ineffassign
- misspell
- gosec
- errcheck
- whitespace
- staticcheck
- unused
- unparam
exclusions:
rules:
- text: "weak cryptographic primitive"
linters:
- gosec
- path: ".*_test.go"
linters:
- govet
- fieldalignment
- staticcheck
- text: "SA1019:"
linters:
- staticcheck
- text: 'G115: integer overflow conversion'
linters:
- gosec
linters-settings:
govet:
settings:
printf:
funcs:
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf
enable:
- shadow
- fieldalignment
golint:
min-confidence: 0
gocyclo:
min-complexity: 17
misspell:
locale: US
formatters:
enable:
- gofmt
- goimports
run:
modules-download-mode: vendor