-
-
Notifications
You must be signed in to change notification settings - Fork 86
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
Ignore items from .gitignore #126
Comments
I just came here with the same problem - a lot of times this leads to duplication of |
For that kind of workflow, it might be even better (to have a feature) to just only include git tracked files (e.g. https://stackoverflow.com/questions/15606955/how-can-i-make-git-show-a-list-of-the-files-that-are-being-tracked). Note that there are also workflows in which you need to apply the plugin to files specifically ignored by .gitignore, for example to set a header for files in target/generated-sources (my usecase, a commercial lib with large parts being code-generated and that also has a source-edition, which needs the headers). Note however that I already use P.S. This plugin is very nice! Makes my life a lot easier. |
I guys, |
I think the suggestion, if implemented, is to use generic solution - gitignore was provided as the most popular example. AFAIK from cursory look at the code there are already parts that handle git and svn specific things. |
@woj-tek : yes right but they are extensions used to provided properties for the header templates. They are not meant to modify the scanning behaviour. The problem with looking at SCM ignore list is that there are several ways to set patterns for each SCM. In example in git you can ignore through the Going through another way and asking for each folder for the list of ignored files using some SCM tool (aka So as I said, this is not impossible, but would be a big change in the plugin code since we would need to implement some sort of scanning extensions (a little like the properties extensions) that can be queried for each visited file by the plugin, and also make sure to support correctly the different kind of exclusions capabilities for each SCM. |
@mathieucarbou if we wanted we could also purelly delegate to git the knowledge of files to parse.
For sure it would be faster than trying to do by hand. |
For git, using We just need to wire things properly in the plugin and set some rules if the user provides its own include/exclude filters on top of that. Reminder:
So if we have a "use git ignored patterns flag" that we activate, we could build a list of the ignored files (equivalent of |
Would it be possible to automatically exclude files that are found in .gitignore (maybe SVN ignore too, but that's probably a bit harder, since it's an SVN property)?
I get this currently when building my project:
Sure, I can manually exclude the .checkstyle file, however, it would be nice to automatically ignore files that aren't in the Git repository.
The text was updated successfully, but these errors were encountered: