| Joey Armstrong | 89c812c | 2024-01-12 19:00:20 -0500 | [diff] [blame] | 1 | #Copyright 2018-2024 Open Networking Foundation (ONF) and the ONF Contributors |
| Andrea Campanella | 8eee471 | 2020-08-25 17:35:24 +0200 | [diff] [blame] | 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. |
| mgouda | d611f4c | 2025-10-30 14:49:27 +0530 | [diff] [blame] | 14 | version: "2" |
| 15 | |
| 16 | linters: |
| 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 Campanella | 8eee471 | 2020-08-25 17:35:24 +0200 | [diff] [blame] | 58 | |
| 59 | linters-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 Kankanala | 92dfdf8 | 2025-03-23 22:07:09 +0530 | [diff] [blame] | 68 | enable: |
| 69 | - shadow |
| 70 | - fieldalignment |
| Andrea Campanella | 8eee471 | 2020-08-25 17:35:24 +0200 | [diff] [blame] | 71 | golint: |
| 72 | min-confidence: 0 |
| 73 | |
| 74 | gocyclo: |
| Holger Hildebrandt | d4d66e9 | 2020-10-27 15:40:08 +0000 | [diff] [blame] | 75 | min-complexity: 20 |
| Andrea Campanella | 8eee471 | 2020-08-25 17:35:24 +0200 | [diff] [blame] | 76 | |
| 77 | misspell: |
| 78 | locale: US |
| mpagenko | 38662d0 | 2021-08-11 09:45:19 +0000 | [diff] [blame] | 79 | ignore-words: |
| 80 | - cancelled |
| Andrea Campanella | 8eee471 | 2020-08-25 17:35:24 +0200 | [diff] [blame] | 81 | |
| mgouda | d611f4c | 2025-10-30 14:49:27 +0530 | [diff] [blame] | 82 | formatters: |
| Andrea Campanella | 8eee471 | 2020-08-25 17:35:24 +0200 | [diff] [blame] | 83 | enable: |
| Andrea Campanella | 8eee471 | 2020-08-25 17:35:24 +0200 | [diff] [blame] | 84 | - gofmt |
| Akash Reddy Kankanala | 92dfdf8 | 2025-03-23 22:07:09 +0530 | [diff] [blame] | 85 | - goimports |
| Andrea Campanella | 8eee471 | 2020-08-25 17:35:24 +0200 | [diff] [blame] | 86 | |
| mgouda | d611f4c | 2025-10-30 14:49:27 +0530 | [diff] [blame] | 87 | # run: |
| 88 | # modules-download-mode: vendor |
| Andrea Campanella | 8eee471 | 2020-08-25 17:35:24 +0200 | [diff] [blame] | 89 | |
| 90 | issues: |
| mgouda | d611f4c | 2025-10-30 14:49:27 +0530 | [diff] [blame] | 91 | 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 |