Skip to content

Commit e6059cb

Browse files
authored
dev: remove IdentifierMarker (#5523)
1 parent 1400552 commit e6059cb

File tree

8 files changed

+10
-297
lines changed

8 files changed

+10
-297
lines changed
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//golangcitest:args -Eunparam
22
package testdata
33

4-
func unparamUnused(a, b uint) uint { // want "`unparamUnused` - `b` is unused"
4+
func unparamUnused(a, b uint) uint { // want "unparamUnused - b is unused"
55
a++
66
return a
77
}

pkg/golinters/unparam/testdata/unparam_cgo.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ func _() {
2525
C.free(unsafe.Pointer(cs))
2626
}
2727

28-
func unparamUnusedCGO(a, b uint) uint { // want "`unparamUnusedCGO` - `b` is unused"
28+
func unparamUnusedCGO(a, b uint) uint { // want "unparamUnusedCGO - b is unused"
2929
a++
3030
return a
3131
}
+6-6
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
//golangcitest:args -Eunused
22
package testdata
33

4-
func fn1() {} // want "func `fn1` is unused"
4+
func fn1() {} // want "func fn1 is unused"
55

66
//nolint:unused
77
func fn2() { fn3() }
88

9-
func fn3() {} // want "func `fn3` is unused"
9+
func fn3() {} // want "func fn3 is unused"
1010

11-
func fn4() { fn5() } // want "func `fn4` is unused"
11+
func fn4() { fn5() } // want "func fn4 is unused"
1212

13-
func fn5() {} // want "func `fn5` is unused"
13+
func fn5() {} // want "func fn5 is unused"
1414

15-
func fn6() { fn4() } // want "func `fn6` is unused"
15+
func fn6() { fn4() } // want "func fn6 is unused"
1616

17-
type unusedStruct struct{} // want "type `unusedStruct` is unused"
17+
type unusedStruct struct{} // want "type unusedStruct is unused"
1818

1919
type unusedStructNolintUnused struct{} //nolint:unused

pkg/golinters/unused/testdata/unused_cgo.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ func _() {
2525
C.free(unsafe.Pointer(cs))
2626
}
2727

28-
func fn1() {} // want "func `fn1` is unused"
28+
func fn1() {} // want "func fn1 is unused"

pkg/lint/runner.go

-3
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,6 @@ func NewRunner(log logutils.Log, cfg *config.Config, goenv *goutil.Env,
9090

9191
processors.NewGeneratedFileFilter(cfg.Linters.Exclusions.Generated),
9292

93-
// Must be before exclude because users see already marked output and configure excluding by it.
94-
processors.NewIdentifierMarker(),
95-
9693
processors.NewExclusionRules(log.Child(logutils.DebugKeyExclusionRules), lineCache,
9794
&cfg.Linters.Exclusions),
9895

pkg/result/processors/identifier_marker.go

-145
This file was deleted.

pkg/result/processors/identifier_marker_test.go

-139
This file was deleted.

test/run_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ func TestSortedResults(t *testing.T) {
365365
Run().
366366
ExpectExitCode(exitcodes.IssuesFound).ExpectOutputEq(
367367
"testdata/sort_results/main.go:15:13: Error return value is not checked (errcheck)" + "\n" +
368-
"testdata/sort_results/main.go:12:5: var `db` is unused (unused)" + "\n",
368+
"testdata/sort_results/main.go:12:5: var db is unused (unused)" + "\n",
369369
)
370370
}
371371

0 commit comments

Comments
 (0)