k8c.io/api/v3@v3.0.0-20230904060738-b0a93889c0b6/.golangci.yml (about)

     1  # Copyright 2023 The Kubermatic Kubernetes Platform contributors.
     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.
    14  
    15  run:
    16    modules-download-mode: readonly
    17    deadline: 20m
    18    skip-files:
    19      - zz_generated.*.go
    20  
    21  linters:
    22    enable:
    23      - asciicheck
    24      - bidichk
    25      - bodyclose
    26      - depguard
    27      - durationcheck
    28      - errcheck
    29      - errname
    30      - errorlint
    31      - exportloopref
    32      - goconst
    33      - gocritic
    34      - gocyclo
    35      - godot
    36      - gofmt
    37      - gosimple
    38      - govet
    39      - importas
    40      - ineffassign
    41      - misspell
    42      - noctx
    43      - nolintlint
    44      - nosprintfhostport
    45      - predeclared
    46      - promlinter
    47      - staticcheck
    48      - tenv
    49      - unconvert
    50      - unused
    51      - wastedassign
    52      - whitespace
    53    disable-all: true
    54  
    55  linters-settings:
    56    depguard:
    57      include-go-root: true
    58      packages:
    59        - io/ioutil # https://go.dev/doc/go1.16#ioutil
    60        - github.com/ghodss/yaml # use sigs.k8s.io/yaml instead
    61        - sigs.k8s.io/controller-runtime # we never want to pull in the entire kitchen sink
    62        - github.com/kubermatic/machine-controller # prevent import loops across modules
    63        - k8c.io/operating-system-manager # prevent import loops across modules
    64        - k8c.io/dashboard # prevent import loops across modules
    65  
    66    importas:
    67      no-unaliased: true
    68      alias:
    69        - pkg: k8c.io/api/v3/pkg/apis/kubermatic/v1
    70          alias: kubermaticv1
    71        - pkg: k8c.io/api/v3/pkg/apis/ee.kubermatic/v1
    72          alias: kubermaticeev1
    73        - pkg: k8c.io/api/v3/pkg/apis/apps.kubermatic/v1
    74          alias: kubermaticappsv1
    75        - pkg: k8c.io/api/v3/pkg/apis/ee.apps.kubermatic/v1
    76          alias: kubermaticappseev1
    77  
    78        - pkg: k8s.io/api/(\w+)/(v[\w\d]+)
    79          alias: $1$2
    80        - pkg: k8s.io/apimachinery/pkg/apis/meta/v1
    81          alias: metav1
    82        - pkg: k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1
    83          alias: apiextensionsv1
    84        - pkg: k8s.io/apimachinery/pkg/api/errors
    85          alias: apierrors
    86        - pkg: k8s.io/apimachinery/pkg/util/errors
    87          alias: kerrors
    88        - pkg: github.com/Masterminds/semver/v3
    89          alias: semverlib