Skip to content

Commit 7892153

Browse files
authored
feat: remove alternative names (#5472)
1 parent 45f39cc commit 7892153

File tree

16 files changed

+5
-222
lines changed

16 files changed

+5
-222
lines changed

docs/src/docs/product/performance.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Less `GOGC` values trigger garbage collection more frequently and golangci-lint
3333

3434
- build `ssa.Program` once
3535

36-
Some linters (megacheck, interfacer, unparam) work on SSA representation.
36+
Some linters (staticcheck, gosec, unparam) work on SSA representation.
3737
Building of this representation takes 1.5 seconds on 8 kLoC repo and 6 seconds on `$GOROOT/src`.
3838

3939
- parse source code and build AST once
@@ -49,9 +49,9 @@ Less `GOGC` values trigger garbage collection more frequently and golangci-lint
4949
2. Smart linters scheduling
5050

5151
We schedule linters by a special algorithm which takes estimated execution time into account. It allows
52-
to save 10-30% of time when one of heavy linters (megacheck etc) is enabled.
52+
to save 10-30% of time when one of heavy linters (e.g., staticcheck) is enabled.
5353

5454
3. Don't fork to run shell commands
5555

56-
All linters has their version fixed with go modules, they are builtin
56+
All linters have their versions fixed with Go modules, they are built-in,
5757
and you don't need to install them separately.

pkg/golinters/gosec/testdata/gosec.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,6 @@ func Gosec() {
1414
log.Print(h)
1515
}
1616

17-
func GosecNolintGas() {
18-
h := md5.New() //nolint:gas
19-
log.Print(h)
20-
}
21-
2217
func GosecNolintGosec() {
2318
h := md5.New() //nolint:gosec
2419
log.Print(h)

pkg/golinters/gosimple/testdata/gosimple.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,3 @@ func GosimpleNolintGosimple(ss []string) {
2020
}
2121
}
2222
}
23-
24-
func GosimpleNolintMegacheck(ss []string) {
25-
if ss != nil { //nolint:megacheck
26-
for _, s := range ss {
27-
log.Printf(s)
28-
}
29-
}
30-
}

pkg/golinters/govet/testdata/govet.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,6 @@ func GovetShadow(f io.Reader, buf []byte) (err error) {
2424
return
2525
}
2626

27-
func GovetNolintVet() error {
28-
return &os.PathError{"first", "path", os.ErrNotExist} //nolint:vet
29-
}
30-
31-
func GovetNolintVetShadow() error {
32-
return &os.PathError{"first", "path", os.ErrNotExist} //nolint:vetshadow
33-
}
34-
3527
func GovetPrintf() {
3628
x := "dummy"
3729
fmt.Printf("%d", x) // want "printf: fmt.Printf format %d has arg x of wrong type string"

pkg/golinters/loggercheck/testdata/logrlint_compatiblity.go

Lines changed: 0 additions & 28 deletions
This file was deleted.

pkg/golinters/staticcheck/testdata/staticcheck.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,6 @@ func StaticcheckNolintStaticcheck() {
1616
x = x //nolint:staticcheck
1717
}
1818

19-
func StaticcheckNolintMegacheck() {
20-
var x int
21-
x = x //nolint:megacheck
22-
}
23-
2419
func StaticcheckPrintf() {
2520
x := "dummy"
2621
fmt.Printf("%d", x) // want "SA5009: Printf format %d has arg #1 of wrong type"

pkg/golinters/staticcheck/testdata/staticcheck_in_megacheck.go

Lines changed: 0 additions & 26 deletions
This file was deleted.

pkg/golinters/stylecheck/testdata/stylecheck.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,3 @@ func StylecheckNolintStylecheck(x int) {
2323
return
2424
}
2525
}
26-
27-
func StylecheckNolintMegacheck(x int) {
28-
switch x {
29-
case 1:
30-
return
31-
default: //nolint:megacheck // want "ST1015: default case should be first or last in switch statement"
32-
return
33-
case 2:
34-
return
35-
}
36-
}

pkg/golinters/stylecheck/testdata/stylecheck_not_in_megacheck.go

Lines changed: 0 additions & 10 deletions
This file was deleted.

pkg/golinters/unused/testdata/unused.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,3 @@ func fn6() { fn4() } // want "func `fn6` is unused"
1717
type unusedStruct struct{} // want "type `unusedStruct` is unused"
1818

1919
type unusedStructNolintUnused struct{} //nolint:unused
20-
21-
type unusedStructNolintMegacheck struct{} //nolint:megacheck

0 commit comments

Comments
 (0)