Kaynağa Gözat

golangci.yml: skip some tests

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Sebastiaan van Stijn 4 yıl önce
ebeveyn
işleme
22ce0f8faa
1 değiştirilmiş dosya ile 10 ekleme ve 1 silme
  1. 10 1
      hack/validate/golangci-lint.yml

+ 10 - 1
hack/validate/golangci-lint.yml

@@ -81,6 +81,10 @@ issues:
     - text: "(G201|G202): SQL string (formatting|concatenation)"
       linters:
         - gosec
+    # FIXME: evaluate these and fix where needed: G307: Deferring unsafe method "*os.File" on type "Close" (gosec)
+    - text: "G307: Deferring unsafe method"
+      linters:
+        - gosec
     # FIXME temporarily suppress these. See #39924
     - text: "SA1019: .*\\.Xattrs is deprecated: Use PAXRecords instead"
       linters:
@@ -93,6 +97,11 @@ issues:
     - text: "SA1019: httputil.ErrPersistEOF"
       linters:
         - staticcheck
+    # FIXME temporarily suppress these for false positives in tests (see https://github.com/dominikh/go-tools/issues/1022)
+    - text: "SA5011"
+      path: _test\.go
+      linters:
+        - staticcheck
     # This code is doing some fun stuff with reflect and it trips up the linter.
     - text: "field `foo` is unused"
       path: "libnetwork/options/options_test.go"
@@ -105,4 +114,4 @@ issues:
       path: libnetwork/network.go
       linters:
         - structcheck
-        - unused
+        - unused