From d0f360c92e5e271a03f08e4660bebb0d8c10e095 Mon Sep 17 00:00:00 2001 From: Ryan Johnson Date: Sat, 12 Oct 2024 00:05:25 -0400 Subject: [PATCH] chore: update golangci-lint configuration Updates `golangci-lint` configuration. Signed-off-by: Ryan Johnson --- .golangci.yml | 46 +++++++++++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 19 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 9c0135ba7..a69dafbb9 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,33 +1,41 @@ -issues: - max-per-linter: 0 - max-same-issues: 0 - exclude: - - SA4004 - - SA1019 - - G402 - - G404 - - G115 - - GetOkExists +# © Broadcom. All Rights Reserved. +# The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. +# SPDX-License-Identifier: MPL-2.0 -run: - deadline: 30m +# For more information about the golangci-lint configuration file, refer to: +# https://golangci-lint.run/usage/configuration/ + +issues: + exclude-rules: + # Exclude staticcheck for some rules. + - linters: [staticcheck] + text: "G115|G402|G404|GetOkExists|SA1006|SA1019|SA4004|SA4006|SA4010|SA4017|SA5007|SA6005|SA9004" linters: disable-all: true enable: - - misspell + - errcheck - gofmt - - unused - - staticcheck - - gosec - goimports + - gosimple - govet + - gosec + - ineffassign - misspell - - gosimple - staticcheck - - ineffassign + - unconvert - unused +run: + deadline: 30m + +output: + formats: + - format: colored-line-number + linters-settings: errcheck: - ignore: github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema:ForceNew|Set,fmt:.*,io:Close + exclude-functions: + - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema:ForceNew|Set" + - "fmt:.*" + - "io:Close"