Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
feat: deprecated varcheck and deadcode
  • Loading branch information
ldez committed Aug 21, 2022
commit 2936cd236cbcc9adb6d4ef52321e978733c125d2
9 changes: 5 additions & 4 deletions pkg/lint/lintersdb/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,8 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
WithSince("v1.0.0").
WithLoadForGoAnalysis().
WithPresets(linter.PresetUnused).
WithURL("https://github.com/remyoudompheng/go-misc/tree/master/deadcode"),
WithURL("https://github.com/remyoudompheng/go-misc/tree/master/deadcode").
Deprecated("The owner seems to have abandoned the linter.", "v1.49.0", "unused"),

linter.NewConfig(golinters.NewDepguard(depGuardCfg)).
WithSince("v1.4.0").
Expand Down Expand Up @@ -714,6 +715,7 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
WithLoadForGoAnalysis().
WithPresets(linter.PresetUnused).
WithURL("https://github.com/opennota/check").
Deprecated("The owner seems to have abandoned the linter.", "v1.49.0", "unused").
WithNoopFallback(m.cfg),

linter.NewConfig(golinters.NewStylecheck(stylecheckCfg)).
Expand Down Expand Up @@ -786,7 +788,8 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
WithSince("v1.0.0").
WithLoadForGoAnalysis().
WithPresets(linter.PresetUnused).
WithURL("https://github.com/opennota/check"),
WithURL("https://github.com/opennota/check").
Deprecated("The owner seems to have abandoned the linter.", "v1.49.0", "unused"),

linter.NewConfig(golinters.NewVarnamelen(varnamelenCfg)).
WithSince("v1.43.0").
Expand Down Expand Up @@ -831,9 +834,7 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
golinters.NewStaticcheck(staticcheckCfg).Name(): true,
golinters.NewUnused(unusedCfg).Name(): true,
golinters.NewGosimple(gosimpleCfg).Name(): true,
golinters.NewVarcheck(varcheckCfg).Name(): true,
golinters.NewIneffassign().Name(): true,
golinters.NewDeadcode().Name(): true,
golinters.NewTypecheck().Name(): true,
}
return enableLinterConfigs(lcs, func(lc *linter.Config) bool {
Expand Down
2 changes: 1 addition & 1 deletion test/testdata/deadcode.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//golangcitest:args -Edeadcode
//golangcitest:args -Edeadcode --internal-cmd-test
package testdata

var y int
Expand Down
2 changes: 1 addition & 1 deletion test/testdata/varcheck.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//golangcitest:args -Evarcheck
//golangcitest:args -Evarcheck --internal-cmd-test
package testdata

var v string // want "`v` is unused"