Detects ineffectual assignments in Go code where variables are assigned but never used.
ineffassign is a static analysis tool for Go that detects ineffectual assignments in code, where a variable is assigned a value but never used afterward. It helps developers identify and remove unnecessary code to improve efficiency and maintainability. The tool focuses on this specific issue without performing full type analysis, making it fast and straightforward.
Go developers and teams looking to improve code quality by eliminating dead or redundant code, particularly those integrating linting tools into their development workflow.
Developers choose ineffassign for its reliability in detecting ineffectual assignments with zero false positives, its simplicity in integration, and its focus on a common code smell without the overhead of complex analysis.
Detect ineffectual assignments in Go code.
As stated in the README, the tool is designed to never report incorrect ineffectual assignments, ensuring reliable results that developers can trust without manual verification.
The README highlights commands like `ineffassign ./...`, making it straightforward to analyze all packages in a project with minimal setup or configuration.
It returns exit code 1 if problems are found and 3 for invalid arguments, as per the README, facilitating easy integration into automated pipelines for continuous code quality checks.
Since it focuses on ineffectual assignments without full type analysis, it operates quickly and with low overhead, ideal for frequent use in development workflows.
The README admits it misses cases like assignments to struct fields due to no type analysis, meaning it may not catch all ineffectual assignments in complex codebases.
It does not consider type information, which can lead to undetected inefficiencies in scenarios involving interfaces, methods, or indirect variable usage.
While it reports issues, it lacks detailed suggestions for fixes or explanations, requiring developers to manually inspect and resolve each flagged assignment.
A PHP parser written in PHP
:sparkles: Monorepo for all the tooling which enables ESLint to support TypeScript
Static Type Checker for Python
🐶 Automated code review tool integrated with any code analysis tools regardless of programming language
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.