blob: 6da1be50103c6188bc21625d5b9618f30fd2fe26 [file] [log] [blame]
Girish Gowdru6a80bbd2019-07-02 07:36:09 -07001#Copyright 2018-present Open Networking Foundation
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
15linters-settings:
16 govet:
17 check-shadowing: true
18 settings:
19 printf:
20 funcs:
21 - (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof
22 - (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf
23 - (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf
24 - (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf
25 golint:
26 min-confidence: 0
27
28 gocyclo:
29 min-complexity: 15
30
31 misspell:
32 locale: US
33
34linters:
35 disable-all: true
36 enable:
37 - gofmt
38 - govet
39 - gocyclo
40 - golint
41 - ineffassign
42 - misspell
43
44run:
45 skip-dirs:
46 - vendor
47 modules-download-mode: vendor
48
49issues:
50 exclude-rules:
51 - text: "weak cryptographic primitive"
52 linters:
53 - gosec
54 exclude:
55 - "don't use underscores in Go names; method Adapter_descriptor"
56 - "don't use underscores in Go names; method Device_types"
57 - "don't use underscores in Go names; method Adopt_device"
58 - "don't use underscores in Go names; method Reconcile_device"
59 - "don't use underscores in Go names; method Abandon_device"
60 - "don't use underscores in Go names; method Disable_device"
61 - "don't use underscores in Go names; method Reenable_device"
62 - "don't use underscores in Go names; method Reboot_device"
63 - "don't use underscores in Go names; method Self_test_device"
64 - "don't use underscores in Go names; method Delete_device"
65 - "don't use underscores in Go names; method Get_device_details"
66 - "don't use underscores in Go names; method Update_flows_bulk"
67 - "don't use underscores in Go names; method Update_flows_incrementally"
68 - "don't use underscores in Go names; method Update_pm_config"
69 - "don't use underscores in Go names; method Receive_packet_out"
Devmalya Pauldd23a992019-11-14 07:06:31 +000070 - "don't use underscores in Go names; method Suppress_event"
71 - "don't use underscores in Go names; method Unsuppress_event"
Girish Gowdru6a80bbd2019-07-02 07:36:09 -070072 - "don't use underscores in Go names; method Get_ofp_device_info"
73 - "don't use underscores in Go names; method Get_ofp_port_info"
74 - "don't use underscores in Go names; method Process_inter_adapter_message"
75 - "don't use underscores in Go names; method Download_image"
76 - "don't use underscores in Go names; method Get_image_download_status"
77 - "don't use underscores in Go names; method Cancel_image_download"
78 - "don't use underscores in Go names; method Activate_image_update"
79 - "don't use underscores in Go names; method Revert_image_update"
kesavand39e0aa32020-01-28 20:58:50 -050080 - "don't use underscores in Go names; method Disable_port"
81 - "don't use underscores in Go names; method Enable_port"
Girish Gowdru6a80bbd2019-07-02 07:36:09 -070082 exclude-use-default: false
83
84# golangci.com configuration
85# https://github.com/golangci/golangci/wiki/Configuration
86service:
87 golangci-lint-version: 1.17.1 # use the fixed version to not introduce new linters unexpectedly
88 prepare:
89 - echo "here I can run custom commands, but no preparation needed for this repo"