Fix up nolintlint comments and urls (#1164)

This commit is contained in:
Andrew Shannon Brown 2020-05-24 00:08:14 -07:00 committed by GitHub
parent 57e4203661
commit 90a8cd41bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -243,9 +243,9 @@ linters-settings:
allow-leading-space: true allow-leading-space: true
# Exclude following linters from requiring an explanation. Default is []. # Exclude following linters from requiring an explanation. Default is [].
allow-no-explanation: [] 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 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 require-specific: true
rowserrcheck: rowserrcheck:
packages: packages:

View File

@ -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 // nolintlint must be last because it looks at the results of all the previous linters for unused nolint directives
linter.NewConfig(golinters.NewNoLintLint()). linter.NewConfig(golinters.NewNoLintLint()).
WithPresets(linter.PresetStyle). 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") == "" isLocalRun := os.Getenv("GOLANGCI_COM_RUN") == ""

View File

@ -258,7 +258,7 @@ func TestNolintUnused(t *testing.T) {
return NewNolint(log, dbManager, enabledLintersMap) 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{ nolintlintIssueVarcheck := result.Issue{
Pos: token.Position{ Pos: token.Position{
Filename: fileName, Filename: fileName,