blob: d42a82136e169c3b965fe72f87c8668332f7e622 [file] [log] [blame]
Joey Armstrong89c812c2024-01-12 19:00:20 -05001#Copyright 2018-2024 Open Networking Foundation (ONF) and the ONF Contributors
Andrea Campanella8eee4712020-08-25 17:35:24 +02002#
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.
mgoudad611f4c2025-10-30 14:49:27 +053014version: "2"
15
16linters:
17 enable:
18 #- gocritic
19 #- gochecknoglobals
20 #- gochecknoinits
21 - gocyclo
22 - govet
23 - ineffassign
24 - misspell
25 - gosec
26 - errcheck
27 - staticcheck
28 - unused
29 - unparam
30 exclusions:
31 rules:
32 - path: ".*_test.go"
33 linters:
34 - govet
35 - fieldalignment
36 - staticcheck
37 - text: "weak cryptographic primitive"
38 linters:
39 - gosec
40 - text: "Error return value of `rxCallbackEntry.cbFunction` is not checked"
41 linters:
42 - gocritic
43 - text: "Error return value of `oo.sendNextRequest` is not checked"
44 linters:
45 - gocritic
46 - text: "Error return value of `oo.pDevOmciCC.send` is not checked"
47 linters:
48 - gocritic
49 - text: "Error return value of `onuDeviceEntry.mibDbClass` is not checked"
50 linters:
51 - gocritic
52 - text: "SA1019: voltha.ImageDownload is deprecated"
53 linters:
54 - staticcheck
55 - text: 'G115: integer overflow conversion'
56 linters:
57 - gosec
Andrea Campanella8eee4712020-08-25 17:35:24 +020058
59linters-settings:
60 govet:
61 settings:
62 printf:
63 funcs:
64 - (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof
65 - (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf
66 - (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf
67 - (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf
Akash Reddy Kankanala92dfdf82025-03-23 22:07:09 +053068 enable:
69 - shadow
70 - fieldalignment
Andrea Campanella8eee4712020-08-25 17:35:24 +020071 golint:
72 min-confidence: 0
73
74 gocyclo:
Holger Hildebrandtd4d66e92020-10-27 15:40:08 +000075 min-complexity: 20
Andrea Campanella8eee4712020-08-25 17:35:24 +020076
77 misspell:
78 locale: US
mpagenko38662d02021-08-11 09:45:19 +000079 ignore-words:
80 - cancelled
Andrea Campanella8eee4712020-08-25 17:35:24 +020081
mgoudad611f4c2025-10-30 14:49:27 +053082formatters:
Andrea Campanella8eee4712020-08-25 17:35:24 +020083 enable:
Andrea Campanella8eee4712020-08-25 17:35:24 +020084 - gofmt
Akash Reddy Kankanala92dfdf82025-03-23 22:07:09 +053085 - goimports
Andrea Campanella8eee4712020-08-25 17:35:24 +020086
mgoudad611f4c2025-10-30 14:49:27 +053087# run:
88# modules-download-mode: vendor
Andrea Campanella8eee4712020-08-25 17:35:24 +020089
90issues:
mgoudad611f4c2025-10-30 14:49:27 +053091 modules-download-mode: vendor
92 # exclude-rules:
93 # - text: "weak cryptographic primitive"
94 # linters:
95 # - gosec
96 # - path: ".*_test.go"
97 # linters:
98 # - govet
99 # - fieldalignment
100 # exclude:
101 # - "Error return value of `rxCallbackEntry.cbFunction` is not checked"
102 # - "Error return value of `oo.sendNextRequest` is not checked"
103 # - "Error return value of `oo.pDevOmciCC.send` is not checked"
104 # - "Error return value of `onuDeviceEntry.mibDbClass` is not checked"
105 # - "SA1019: voltha.ImageDownload is deprecated"
106 # - 'G115: integer overflow conversion'
107 # exclude-use-default: false