Yeah, that is pretty much what it does already: it tries to recognize test files and skip them. Dupehound is available for 12 languages Today.
Some languages like RUst you mentioned, have a clear tag that says "this is a test," but others do not, so the tool has to guess from file names and ends up missing some and skipping too much.
Also as I mentioned on the answer below, sometimes you actually do want to see the repeats inside tests, or normal code repeats on purpose too. So I am leaning toward letting users wave off one specific case by hand instead of skipping everything blindly.
What I use for: I use for identifying duplicated code. It is deterministic, doesn't use AI, offline, runs from CLI and is super fast (and free).
What I dislike: I won't say it I dislike, but it is not a tool that does all the jobs of a code review. For instance, it doesn't flag security issues. It is superfocused on code duplication (it performs better than Sonar for this use case) and is specifically useful for large codebases. Disclaimer: I am one of the collaborators, so take it with a grain of salt https://github.com/Rafaelpta/dupehound
agreed, but imo terminal and any conversational interface is not a silver bullet. Example: signup up for a ai assistant that lives in the email. Can't cancelled it bcs the founder assumed that since you ask anything in natural language every problem the user might have is solved. This is just pushing problems to users.
So true, just built a deterministic system to identify duplicated code. It's offline and doesn't use AI on purpose, since a gate that blocks your CI has to give the exact same answer every time, and finding dupes means comparing every function against every other (that's index work). It does NOT use AI. But ironically, I used AI to build it (https://github.com/Rafaelpta/dupehound )
[email protected]