Skip to content

dev: remove IdentifierMarker #5523

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 11, 2025
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
2 changes: 1 addition & 1 deletion pkg/golinters/unparam/testdata/unparam.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//golangcitest:args -Eunparam
package testdata

func unparamUnused(a, b uint) uint { // want "`unparamUnused` - `b` is unused"
func unparamUnused(a, b uint) uint { // want "unparamUnused - b is unused"
a++
return a
}
2 changes: 1 addition & 1 deletion pkg/golinters/unparam/testdata/unparam_cgo.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func _() {
C.free(unsafe.Pointer(cs))
}

func unparamUnusedCGO(a, b uint) uint { // want "`unparamUnusedCGO` - `b` is unused"
func unparamUnusedCGO(a, b uint) uint { // want "unparamUnusedCGO - b is unused"
a++
return a
}
12 changes: 6 additions & 6 deletions pkg/golinters/unused/testdata/unused.go
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
//golangcitest:args -Eunused
package testdata

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

//nolint:unused
func fn2() { fn3() }

func fn3() {} // want "func `fn3` is unused"
func fn3() {} // want "func fn3 is unused"

func fn4() { fn5() } // want "func `fn4` is unused"
func fn4() { fn5() } // want "func fn4 is unused"

func fn5() {} // want "func `fn5` is unused"
func fn5() {} // want "func fn5 is unused"

func fn6() { fn4() } // want "func `fn6` is unused"
func fn6() { fn4() } // want "func fn6 is unused"

type unusedStruct struct{} // want "type `unusedStruct` is unused"
type unusedStruct struct{} // want "type unusedStruct is unused"

type unusedStructNolintUnused struct{} //nolint:unused
2 changes: 1 addition & 1 deletion pkg/golinters/unused/testdata/unused_cgo.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ func _() {
C.free(unsafe.Pointer(cs))
}

func fn1() {} // want "func `fn1` is unused"
func fn1() {} // want "func fn1 is unused"
3 changes: 0 additions & 3 deletions pkg/lint/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,6 @@ func NewRunner(log logutils.Log, cfg *config.Config, goenv *goutil.Env,

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

// Must be before exclude because users see already marked output and configure excluding by it.
processors.NewIdentifierMarker(),

processors.NewExclusionRules(log.Child(logutils.DebugKeyExclusionRules), lineCache,
&cfg.Linters.Exclusions),

Expand Down
145 changes: 0 additions & 145 deletions pkg/result/processors/identifier_marker.go

This file was deleted.

139 changes: 0 additions & 139 deletions pkg/result/processors/identifier_marker_test.go

This file was deleted.

2 changes: 1 addition & 1 deletion test/run_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ func TestSortedResults(t *testing.T) {
Run().
ExpectExitCode(exitcodes.IssuesFound).ExpectOutputEq(
"testdata/sort_results/main.go:15:13: Error return value is not checked (errcheck)" + "\n" +
"testdata/sort_results/main.go:12:5: var `db` is unused (unused)" + "\n",
"testdata/sort_results/main.go:12:5: var db is unused (unused)" + "\n",
)
}

Expand Down
Loading