-
Notifications
You must be signed in to change notification settings - Fork 19
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
Track unused code #65
Comments
Hey Karol, Thanks for your kind words 😄 I can totally relate to a problem that you're describing, my first reaction would be that maybe a linter rule would suffice but your explanation makes sense. Codechecks is totally permissionless platform - you can start creating your own "plugin" anytime you want, it doesn't require any changes to the common code. You can see examples of full community diven codechecks for example here. That being said, I am happy to help you with development in any way possible, just let me know :) You can read some pieces of documention about writing your own checks here PS: we should meet next time I am gonna visit Wrocław :) If you would be in Warsaw ping me! PS2: Speaking about interesting things that you can build using |
Perfect! It's Hacktoberfest, maybe I should give this one a shot.
Agreed! I believe
We totally should! |
Hello and thank you for your work.
I was wondering if you're interested in making Code Checks track how much dead code is introduced by a PR.
The problem
When making changes to a codebase, it's common to leave code that is exported but never used. It was useful once, but it's not anymore. Unless there are good reasons to leave it in the project, it should be deleted and restored from Git history if need be.
Solutions
There are tools capable of spotting such scenarios:
no-unused-exports
The problem with some of these tools is that they find too many false positives or they don't provide an escape hatch to mark something as not used now, but let's leave it there. For this reason, using them to prune dead code in a precommit/prepush task may be too aggressive.
I believe there is a use case for them though. If a CI check detected the amount of dead code has increased (and presented the Δ), then this information alone is already useful. I'm not sure if the build should fail or not, but merely being presented with such a warning could help keep our codebases cleaner.
Please let me know what you think, and thanks again for your wonderful tool.
The text was updated successfully, but these errors were encountered: