Browse Source

golangci-lint: fix "golint" not ignoring generated files

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Sebastiaan van Stijn 5 years ago
parent
commit
fe3c14d5ba
1 changed files with 5 additions and 6 deletions
  1. 5 6
      hack/validate/golangci-lint.yml

+ 5 - 6
hack/validate/golangci-lint.yml

@@ -22,12 +22,6 @@ linters:
       - bundles
       - bundles
       - docs
       - docs
 
 
-    skip-files:
-      - ".*\\.pb\\.go"
-      - "dockerversion/version_autogen.go"
-      - "api/types/container/container_.*"
-      - "api/types/volume/volume_.*"
-
 linters-settings:
 linters-settings:
   govet:
   govet:
     check-shadowing: false
     check-shadowing: false
@@ -40,6 +34,11 @@ issues:
         - errcheck
         - errcheck
         - gosec
         - gosec
 
 
+    # Suppress golint complaining about generated types in api/types/
+    - text: "type name will be used as (container|volume)\\.(Container|Volume).* by other packages, and that stutters; consider calling this"
+      path: "api/types/(volume|container)/"
+      linters:
+        - golint
     - text: "(G201|G202): SQL string (formatting|concatenation)"
     - text: "(G201|G202): SQL string (formatting|concatenation)"
       linters:
       linters:
         - gosec
         - gosec