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

Insert license headers to all files in the workspace also tries to add headers to gitignored dependency folders #131

Open
SeriousBug opened this issue Apr 18, 2022 · 2 comments

Comments

@SeriousBug
Copy link

*** Please make sure to use this template to report issue. Any issue report that does not follow this template will be ignored. ***

Runtime environment

  • OS (version): Linux (latest ArchLinux)
  • VS Code version: 1.66.2
  • VS Code build number (if possible):
  • other extensions installed:

You can confirm installed extensions by calling "Extensions: Show Installed Extensions", or
just click extensions tab in the case you are using VS Code 1.3+.

Behaviors

Expected behavior

The "Insert license headers to all files in the workspace" should only add headers to files that are in the workspace proper, and not to folders like node_modules or target (rust build directory). I have these folders in .gitignore.

Actual behavior

Licenser tries to apply the header to these files as well. This causes the process to take very long and also means

Steps to reproduce the issue

  1. Create a new project, or grab an existing project that uses node.js.
  2. Use npm or yarn to grab all dependencies for that project.
  3. Use the command to add license headers to all files in the workspace. This step will take a few minutes, and you can see afterwards that the dependency files under node_modules will have the header too.
@SeriousBug
Copy link
Author

SeriousBug commented Apr 18, 2022

It also would be nice to have an option to ignore certain types of files, like svg files which I wouldn't want to add license information into.

It also added license information to files that it really shouldn't, like Cargo.toml, .vscode/settings.json, LICENSE.txt, app.json and such. The `json' files are especially bad because not all json parsers support comments.

@mhp-borisbojic
Copy link

It also would be nice to have an option to ignore certain types of files, like svg files which I wouldn't want to add license information into.

It also added license information to files that it really shouldn't, like Cargo.toml, .vscode/settings.json, LICENSE.txt, app.json and such. The `json' files are especially bad because not all json parsers support comments.

Exactly this I wanted to mention as well ... it would be nice to exclude certain file types, especially JSON files ...

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