unused-code / unused

A tool to identify potentially unused code.
https://unused.codes
MIT License
283 stars 11 forks source link

unused is unnecessarily bound to the assumption that the codebase being assessed is using git #31

Closed joshuaclayton closed 3 years ago

joshuaclayton commented 3 years ago

This occurs in a couple of areas; notably, in TagsReader, we use git to determine a path to locate a tags file.

The larger issue is the use of git in the CodebaseFiles crate (https://github.com/unused-code/unused/blob/main/crates/codebase_files/src/lib.rs). In here, we're using git ls-files to generate the list of files to assess. In reality, this should probably use something like the ignore crate to ensure it honors gitignore files correctly but without direct coupling to git.