sigs.k8s.io/cluster-api-provider-azure@v1.14.3/.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      - prealloc
    46      - predeclared
    47      - reassign
    48      - revive
    49      - rowserrcheck
    50      - staticcheck
    51      - stylecheck
    52      - thelper
    53      - typecheck
    54      - unconvert
    55      - unparam
    56      - unused
    57      - usestdlibvars
    58      - whitespace
    59    # Run with --fast=false for more extensive checks
    60    fast: true
    61  
    62  linters-settings:
    63    importas:
    64      no-unaliased: true
    65      alias:
    66        # Kubernetes
    67        - pkg: k8s.io/api/core/v1
    68          alias: corev1
    69        - pkg: k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1
    70          alias: apiextensionsv1
    71        - pkg: k8s.io/apimachinery/pkg/apis/meta/v1
    72          alias: metav1
    73        - pkg: k8s.io/apimachinery/pkg/api/errors
    74          alias: apierrors
    75        - pkg: k8s.io/apimachinery/pkg/util/errors
    76          alias: kerrors
    77        # Controller Runtime
    78        - pkg: sigs.k8s.io/controller-runtime
    79          alias: ctrl
    80        # CAPI
    81        - pkg: sigs.k8s.io/cluster-api/api/v1beta1
    82          alias: clusterv1
    83        # CAPI exp
    84        - pkg: sigs.k8s.io/cluster-api/exp/api/v1beta1
    85          alias: expv1
    86        # CAPZ
    87        - pkg: sigs.k8s.io/cluster-api-provider-azure/api/v1beta1
    88          alias: infrav1
    89        # CAPZ exp
    90        - pkg: sigs.k8s.io/cluster-api-provider-azure/exp/api/v1beta1
    91          alias: infrav1exp
    92        - pkg: sigs.k8s.io/cluster-api-provider-azure/util/webhook
    93          alias: webhookutils
    94        # Azure
    95        - pkg: github.com/Azure/go-autorest/autorest/azure
    96          alias: azureautorest
    97        # ASO
    98        - pkg: github.com/Azure/azure-service-operator/v2/api/resources/v1api20200601
    99          alias: asoresourcesv1
   100        # Azureutil
   101        - pkg: sigs.k8s.io/cluster-api-provider-azure/util/azure
   102          alias: azureutil
   103        # Deprecated
   104        - pkg: github.com/Azure/go-autorest/autorest/to
   105          alias: deprecated-use-k8s.io-utils-pointer
   106    gocritic:
   107      enabled-tags:
   108        - "experimental"
   109    godot:
   110      #   declarations - for top level declaration comments (default);
   111      #   toplevel     - for top level comments;
   112      #   all          - for all comments.
   113      scope: toplevel
   114      exclude:
   115      - '^ \+.*'
   116      - '^ ANCHOR.*'
   117    gosec:
   118      excludes:
   119      - G307 # Deferring unsafe method "Close" on type "\*os.File"
   120      - G108 # Profiling endpoint is automatically exposed on /debug/pprof
   121    revive:
   122      rules:
   123        - name: exported
   124          arguments:
   125            - disableStutteringCheck
   126    staticcheck:
   127      go: "1.20"
   128    stylecheck:
   129      go: "1.20"
   130    unused:
   131      go: "1.20"
   132  
   133  issues:
   134    exclude-rules:
   135      - path: '(\w*)conversion.go'
   136        text: "use underscores in Go names|receiver name (.+) should be consistent|methods on the same type should have the same receiver name"
   137      - path: 'mock(\w+)/doc.go$'
   138        text: "use underscores in package names|don't use an underscore in package name"
   139      - path: (^test/|_test.go$)
   140        linters:
   141          - dogsled
   142          - goconst
   143          - godot
   144          - prealloc
   145      - path: (^test/|_test.go$)
   146        text: exported (.+) should have comment( \(or a comment on this block\))? or be unexported
   147      - source: \"github.com/onsi/(ginkgo/v2|gomega)\"
   148        text: "should not use dot imports"
   149    include:
   150    - EXC0012  # revive: check for comments
   151    - EXC0014  # revive: check for comments
   152    max-issues-per-linter: 0
   153    max-same-issues: 0