sigs.k8s.io/cluster-api-provider-azure@v1.17.0/.golangci.yml (about)

     1  run:
     2    deadline: 10m
     3    skip-files:
     4    - 'zz_generated\.(\w*)\.go$'
     5    build-tags:
     6      - e2e
     7  linters:
     8    disable-all: true
     9    enable:
    10      - asasalint
    11      - asciicheck
    12      - bidichk
    13      - bodyclose
    14      - containedctx
    15      - decorder
    16      - dogsled
    17      - dupword
    18      - durationcheck
    19      - errcheck
    20      - errchkjson
    21      - errorlint
    22      - execinquery
    23      - exportloopref
    24      - gci
    25      - ginkgolinter
    26      - goconst
    27      - gocritic
    28      - gocyclo
    29      - godot
    30      - gofmt
    31      - goimports
    32      - goprintffuncname
    33      - gosec
    34      - gosimple
    35      - govet
    36      - importas
    37      - ineffassign
    38      - loggercheck
    39      - misspell
    40      - nakedret
    41      - nilerr
    42      - noctx
    43      - nolintlint
    44      - nosprintfhostport
    45      - predeclared
    46      - reassign
    47      - revive
    48      - rowserrcheck
    49      - staticcheck
    50      - stylecheck
    51      - thelper
    52      - typecheck
    53      - unconvert
    54      - unparam
    55      - unused
    56      - usestdlibvars
    57      - whitespace
    58    # Run with --fast=false for more extensive checks
    59    fast: true
    60  
    61  linters-settings:
    62    importas:
    63      no-unaliased: true
    64      alias:
    65        # Kubernetes
    66        - pkg: k8s.io/api/core/v1
    67          alias: corev1
    68        - pkg: k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1
    69          alias: apiextensionsv1
    70        - pkg: k8s.io/apimachinery/pkg/apis/meta/v1
    71          alias: metav1
    72        - pkg: k8s.io/apimachinery/pkg/api/errors
    73          alias: apierrors
    74        - pkg: k8s.io/apimachinery/pkg/util/errors
    75          alias: kerrors
    76        # Controller Runtime
    77        - pkg: sigs.k8s.io/controller-runtime
    78          alias: ctrl
    79        # CAPI
    80        - pkg: sigs.k8s.io/cluster-api/api/v1beta1
    81          alias: clusterv1
    82        # CAPI exp
    83        - pkg: sigs.k8s.io/cluster-api/exp/api/v1beta1
    84          alias: expv1
    85        # CAPZ
    86        - pkg: sigs.k8s.io/cluster-api-provider-azure/api/v1beta1
    87          alias: infrav1
    88        # CAPZ exp
    89        - pkg: sigs.k8s.io/cluster-api-provider-azure/exp/api/v1beta1
    90          alias: infrav1exp
    91        - pkg: sigs.k8s.io/cluster-api-provider-azure/util/webhook
    92          alias: webhookutils
    93        # Azure
    94        - pkg: github.com/Azure/go-autorest/autorest/azure
    95          alias: azureautorest
    96        # ASO
    97        - pkg: github.com/Azure/azure-service-operator/v2/api/resources/v1api20200601
    98          alias: asoresourcesv1
    99        # Azureutil
   100        - pkg: sigs.k8s.io/cluster-api-provider-azure/util/azure
   101          alias: azureutil
   102        # Deprecated
   103        - pkg: github.com/Azure/go-autorest/autorest/to
   104          alias: deprecated-use-k8s.io-utils-pointer
   105    gocritic:
   106      enabled-tags:
   107        - "experimental"
   108    godot:
   109      #   declarations - for top level declaration comments (default);
   110      #   toplevel     - for top level comments;
   111      #   all          - for all comments.
   112      scope: toplevel
   113      exclude:
   114      - '^ \+.*'
   115      - '^ ANCHOR.*'
   116    gosec:
   117      excludes:
   118      - G307 # Deferring unsafe method "Close" on type "\*os.File"
   119      - G108 # Profiling endpoint is automatically exposed on /debug/pprof
   120    revive:
   121      rules:
   122        - name: exported
   123          arguments:
   124            - disableStutteringCheck
   125    staticcheck:
   126      go: "1.22"
   127    stylecheck:
   128      go: "1.22"
   129    unused:
   130      go: "1.22"
   131  
   132  issues:
   133    exclude-rules:
   134      - path: '(\w*)conversion.go'
   135        text: "use underscores in Go names|receiver name (.+) should be consistent|methods on the same type should have the same receiver name"
   136      - path: 'mock(\w+)/doc.go$'
   137        text: "use underscores in package names|don't use an underscore in package name"
   138      - path: (^test/|_test.go$)
   139        linters:
   140          - dogsled
   141          - goconst
   142          - godot
   143          - prealloc
   144      - path: (^test/|_test.go$)
   145        text: exported (.+) should have comment( \(or a comment on this block\))? or be unexported
   146      - source: \"github.com/onsi/(ginkgo/v2|gomega)\"
   147        text: "should not use dot imports"
   148    include:
   149    - EXC0012  # revive: check for comments
   150    - EXC0014  # revive: check for comments
   151    max-issues-per-linter: 0
   152    max-same-issues: 0