repo_info_extractor
repo_info_extractor copied to clipboard
Exclude popular dependency directories
In some repositories, the dependencies are also included. With a simple string matching in the path we can exclude them. eg:
- node_modules (node.js)
- vendor (Go)
- etc
For JS, files containing min or dist in their path are also affected.
yarn v2 (aka berry) advises to commit ca. 2MB of its direct .js dependencies into version control as well, changing with each version.
It's located in the .yarn folder and in the root (.pnp.js or .pnp.*).
vendor will also cover PHP composer default.
I gave it another thought. There might be more paths than one might expect.
As I noticed, you already detect .gitignore properly.
There is this complete list of gitignore templates that could be mapped to the existing set of languages.
These templates contain all files that need to be considered, given any common language.
It could be imported as a git submodule and then, the .gitignore file could be extended or created so that it reflects the initially detected languages.