From 2f8bcef621bca3429a8ca9ec24275c4b443747ac Mon Sep 17 00:00:00 2001 From: Amir Zarrinkafsh Date: Tue, 28 Apr 2020 16:39:54 +1000 Subject: [PATCH] [CI] Adjust linting default excludes to align with goreportcard (#934) --- .golangci.yml | 11 +++++++++++ internal/configuration/validator/keys.go | 1 + 2 files changed, 12 insertions(+) diff --git a/.golangci.yml b/.golangci.yml index 6bb377f81..f5cd7247e 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -21,5 +21,16 @@ linters: - whitespace issues: + exclude: + - Error return value of .((os\.)?std(out|err)\..*|.*Close|.*Flush|os\.Remove(All)?|.*printf?|os\.(Un)?Setenv). is not checked + - func name will be used as test\.Test.* by other packages, and that stutters; consider calling this + - (possible misuse of unsafe.Pointer|should have signature) + - ineffective break statement. Did you mean to break out of the outer loop + - Use of unsafe calls should be audited + - Subprocess launch(ed with variable|ing should be audited) + - (G104|G307) + - (Expect directory permissions to be 0750 or less|Expect file permissions to be 0600 or less) + - Potential file inclusion via variable + exclude-use-default: false max-issues-per-linter: 0 max-same-issues: 0 \ No newline at end of file diff --git a/internal/configuration/validator/keys.go b/internal/configuration/validator/keys.go index 6d07b7cbc..78bc39a29 100644 --- a/internal/configuration/validator/keys.go +++ b/internal/configuration/validator/keys.go @@ -8,6 +8,7 @@ import ( "github.com/authelia/authelia/internal/utils" ) +// ValidateKeys determines if a provided key is valid. func ValidateKeys(validator *schema.StructValidator, keys []string) { var errStrings []string for _, key := range keys {