[VOL-5475] upgrade go to 1.24.5 and golangci-lint version to 2.2.2
Signed-off-by: mgouda <madhumati.gouda@radisys.com>
Change-Id: I0d7ded6f836ae4a579d0167b491f01e10ada4b13
diff --git a/.golangci.yml b/.golangci.yml
index be5b4a3..d42a821 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -11,6 +11,50 @@
#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
+ - staticcheck
+ - unused
+ - unparam
+ exclusions:
+ rules:
+ - path: ".*_test.go"
+ linters:
+ - govet
+ - fieldalignment
+ - staticcheck
+ - text: "weak cryptographic primitive"
+ linters:
+ - gosec
+ - text: "Error return value of `rxCallbackEntry.cbFunction` is not checked"
+ linters:
+ - gocritic
+ - text: "Error return value of `oo.sendNextRequest` is not checked"
+ linters:
+ - gocritic
+ - text: "Error return value of `oo.pDevOmciCC.send` is not checked"
+ linters:
+ - gocritic
+ - text: "Error return value of `onuDeviceEntry.mibDbClass` is not checked"
+ linters:
+ - gocritic
+ - text: "SA1019: voltha.ImageDownload is deprecated"
+ linters:
+ - staticcheck
+ - text: 'G115: integer overflow conversion'
+ linters:
+ - gosec
linters-settings:
govet:
@@ -35,41 +79,29 @@
ignore-words:
- cancelled
-linters:
+formatters:
enable:
- #- gocritic
- #- gochecknoglobals
- #- gochecknoinits
- - gocyclo
- gofmt
- - govet
- - ineffassign
- - misspell
- - gosec
- - errcheck
- goimports
- - gosimple
- - staticcheck
- - unused
- - unparam
-run:
- modules-download-mode: vendor
+# run:
+# modules-download-mode: vendor
issues:
- exclude-rules:
- - text: "weak cryptographic primitive"
- linters:
- - gosec
- - path: ".*_test.go"
- linters:
- - govet
- - fieldalignment
- exclude:
- - "Error return value of `rxCallbackEntry.cbFunction` is not checked"
- - "Error return value of `oo.sendNextRequest` is not checked"
- - "Error return value of `oo.pDevOmciCC.send` is not checked"
- - "Error return value of `onuDeviceEntry.mibDbClass` is not checked"
- - "SA1019: voltha.ImageDownload is deprecated"
- - 'G115: integer overflow conversion'
- exclude-use-default: false
+ modules-download-mode: vendor
+ # exclude-rules:
+ # - text: "weak cryptographic primitive"
+ # linters:
+ # - gosec
+ # - path: ".*_test.go"
+ # linters:
+ # - govet
+ # - fieldalignment
+ # exclude:
+ # - "Error return value of `rxCallbackEntry.cbFunction` is not checked"
+ # - "Error return value of `oo.sendNextRequest` is not checked"
+ # - "Error return value of `oo.pDevOmciCC.send` is not checked"
+ # - "Error return value of `onuDeviceEntry.mibDbClass` is not checked"
+ # - "SA1019: voltha.ImageDownload is deprecated"
+ # - 'G115: integer overflow conversion'
+ # exclude-use-default: false