Add deadmut linter #6752
Replies: 1 comment
|
A few notes that I expect to come up: Relation to False positives. deadmut stays quiet unless the mutation is certainly lost: any later read, including in
History. The repository dates from February 2026 (as |
Uh oh!
There was an error while loading. Please reload this page.
Repository URL
https://github.com/go-by-value/deadmut
Analyzer Requirements
go/analysis.go.mod<= 1.25.0.Analyzer Goal
Finds bugs
Analyzer Description
Reports writes to a range loop value copy that have no effect: direct field writes, pointer-receiver method calls, and
&varguments, when the copy is never read afterwards. Whether a callee writes through its pointer receiver or parameter is computed as a fact across packages, so read-only methods are not reported.Analyzer License
MIT
Analyzer License Checks
LICENSE(capitalized).Analyzer Details
init().panic().log.Fatal().os.Exit().Repository Details
v1.0.0,v0.1.0(0.0.xare not valid).Repository Recommendations
.gitignore(IDE files, binaries, OS files, etc. should not be committed).mainas the default branch name.Pull Request
All reactions