Skip to content
This repository has been archived by the owner on Apr 10, 2019. It is now read-only.

Remove megacheck warning #311

Merged
merged 3 commits into from
Jul 7, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ type Config struct { // nolint: aligncheck
Checkstyle bool
EnableGC bool
Aggregate bool
EnableAll bool

DeadlineJSONCrutch string `json:"Deadline"`
}
Expand Down
5 changes: 4 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ func enableAllAction(app *kingpin.Application, element *kingpin.ParseElement, ct
for linter := range linterDefinitions {
config.Enable = append(config.Enable, linter)
}
config.EnableAll = true
return nil
}

Expand Down Expand Up @@ -783,7 +784,9 @@ func replaceWithMegacheck(enabled []string) []string {
}
}
if staticcheck && gosimple && unused {
warning("staticcheck, gosimple, and unused are all set, using megacheck instead")
if !config.EnableAll {
warning("staticcheck, gosimple and unused are all set, using megacheck instead")
}
return append(revised, "megacheck")
}
return enabled
Expand Down