mirror of
https://github.com/scratchfoundation/golangci-lint.git
synced 2025-08-28 22:28:43 -04:00
Add versions, improve deprecation system, improve linters page (#1854)
This commit is contained in:
parent
b6a6faa982
commit
8db518cee0
5 changed files with 156 additions and 39 deletions
|
@ -52,9 +52,16 @@ func NewRunner(cfg *config.Config, log logutils.Log, goenv *goutil.Env, es *lint
|
|||
// print deprecated messages
|
||||
if !cfg.InternalCmdTest {
|
||||
for name, lc := range enabledLinters {
|
||||
if lc.IsDeprecated() {
|
||||
log.Warnf("The linter '%s' is deprecated due to: %s", name, lc.DeprecatedMessage)
|
||||
if !lc.IsDeprecated() {
|
||||
continue
|
||||
}
|
||||
|
||||
var extra string
|
||||
if lc.Deprecation.Replacement != "" {
|
||||
extra = fmt.Sprintf(" Replaced by %s.", lc.Deprecation.Replacement)
|
||||
}
|
||||
|
||||
log.Warnf("The linter '%s' is deprecated (since %s) due to: %s %s", name, lc.Deprecation.Since, lc.Deprecation.Message, extra)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue