Skip to content
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

Exclude popular dependency directories #131

Open
peti2001 opened this issue Aug 24, 2020 · 2 comments
Open

Exclude popular dependency directories #131

peti2001 opened this issue Aug 24, 2020 · 2 comments

Comments

@peti2001
Copy link
Collaborator

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
@matfax
Copy link
Contributor

matfax commented Aug 31, 2020

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
Copy link
Contributor

matfax commented Aug 31, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants