codersrank-org / repo_info_extractor

Use this script to extract data from your private repo. This data is used to calculate your score. https://codersrank.io
MIT License
143 stars 70 forks source link

Exclude popular dependency directories #131

Open peti2001 opened 4 years ago

peti2001 commented 4 years ago

In some repositories, the dependencies are also included. With a simple string matching in the path we can exclude them. eg:

matfax commented 4 years ago

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.

matfax commented 4 years ago

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.