diff --git a/.golangci.example.yml b/.golangci.example.yml index 4f9cdb5cb88f..8ee42020baa4 100644 --- a/.golangci.example.yml +++ b/.golangci.example.yml @@ -243,9 +243,9 @@ linters-settings: allow-leading-space: true # Exclude following linters from requiring an explanation. Default is []. allow-no-explanation: [] - # Enable to require an explanation after each nolint directive. Default is false. + # Enable to require an explanation of nonzero length after each nolint directive. Default is false. require-explanation: true - # Enable to require an explanation after each nolint directive. Default is false. + # Enable to require nolint directives to mention the specific linter being suppressed. Default is false. require-specific: true rowserrcheck: packages: diff --git a/pkg/lint/lintersdb/manager.go b/pkg/lint/lintersdb/manager.go index 634cdc28c3bb..f00fd0b37aab 100644 --- a/pkg/lint/lintersdb/manager.go +++ b/pkg/lint/lintersdb/manager.go @@ -275,7 +275,7 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config { // nolintlint must be last because it looks at the results of all the previous linters for unused nolint directives linter.NewConfig(golinters.NewNoLintLint()). WithPresets(linter.PresetStyle). - WithURL("https://github.com/golangci-lint/pkg/golinters/nolintlint"), + WithURL("https://github.com/golangci/golangci-lint/blob/master/pkg/golinters/nolintlint/README.md"), } isLocalRun := os.Getenv("GOLANGCI_COM_RUN") == "" diff --git a/pkg/result/processors/nolint_test.go b/pkg/result/processors/nolint_test.go index 9fe50c4c6b7d..b400ad2be0b5 100644 --- a/pkg/result/processors/nolint_test.go +++ b/pkg/result/processors/nolint_test.go @@ -258,7 +258,7 @@ func TestNolintUnused(t *testing.T) { return NewNolint(log, dbManager, enabledLintersMap) } - // the issues below the nolintlint issues that would be generated for the test file + // the issue below is the nolintlint issue that would be generated for the test file nolintlintIssueVarcheck := result.Issue{ Pos: token.Position{ Filename: fileName,