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

new CLI option: exclude directories #3287

Closed
rnveach opened this Issue Jun 18, 2016 · 2 comments

Comments

Projects
None yet
2 participants
@rnveach
Member

rnveach commented Jun 18, 2016

Split from #2866 (comment)

Add a new option to the CLI to exclude one or more directories from being scanned for files by CheckStyle.
Many common directories in a project's base (bin, .git, .metadata, etc) can be picked up in a directory scan and almost never contain anything relevant to CheckStyle. Though we usually don't use any files from these scans, just scanning them and holding these files in memory can slow CheckStyle down.

Examples of new exclude option:
Full Path Exclude: java -jar checkstyle-6.19-all.jar -c config.xml -e /excludeDirectory inputs...
Relative Path Exclude: /some/project$ java -jar checkstyle-6.19-all.jar -c config.xml -e path/excludeDirectory inputs... (Exlcudes the absolute path /some/project/path/excludeDirectory)
Regular Expression Exclude: java -jar checkstyle-6.19-all.jar -c config.xml -x "[\\/]excludeDirectory[\\/]" inputs...

-x and -e can be used multiple times in 1 command.

more examples:
Without expression:
java -jar checkstyle-6.19-all.jar -c config.xml D:\project -e D:\project\.metadata -e D:\project\.git -e D:\project\bin
With expression:
java -jar checkstyle-6.19-all.jar -c config.xml D:\project -x "[\\\/](.metadata|.git|bin)[\\\/]"

rnveach added a commit to rnveach/checkstyle that referenced this issue Jun 18, 2016

rnveach added a commit to rnveach/checkstyle that referenced this issue Jun 18, 2016

@romani

This comment has been minimized.

Show comment
Hide comment
@romani

romani Jun 23, 2016

Member

please provide names for full-names of arguments in issue description.

Member

romani commented Jun 23, 2016

please provide names for full-names of arguments in issue description.

rnveach added a commit to rnveach/checkstyle that referenced this issue Jul 17, 2016

rnveach added a commit to rnveach/checkstyle that referenced this issue Jul 17, 2016

rnveach added a commit to rnveach/checkstyle that referenced this issue Jul 17, 2016

rnveach added a commit to rnveach/checkstyle that referenced this issue Jul 21, 2016

rnveach added a commit to rnveach/checkstyle that referenced this issue Jul 21, 2016

rnveach added a commit to rnveach/checkstyle that referenced this issue Jul 26, 2016

rnveach added a commit to rnveach/checkstyle that referenced this issue Jul 26, 2016

romani added a commit that referenced this issue Jul 27, 2016

@romani romani added this to the 7.1 milestone Jul 27, 2016

@romani

This comment has been minimized.

Show comment
Hide comment
@romani

romani Jul 27, 2016

Member

fix is merged

Member

romani commented Jul 27, 2016

fix is merged

@romani romani closed this Jul 27, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment