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

Fix so preignore properly ignores tests #378

Merged
merged 1 commit into from
Mar 22, 2024

Conversation

ericwb
Copy link
Contributor

@ericwb ericwb commented Mar 22, 2024

During testing, it was found that adding a "tests" to .preignore did not result in the ignoring of that directory in the repo.

It seems the path is needed as input to is_ignored() rather than just file name.

Also noticed that .git files are getting scanned. Normally they should be ignored as part of .gitignore, but its not typical to include there. Seems Git automatically ignores that directory. So I added it as a global_patterns to IgnoreFilterManager. Also figured that it would be good to include global_ignore_file_paths as was in the example for this class to exclude user defined ignores and repo defined ignores.

During testing, it was found that adding a "tests" to .preignore
did not result in the ignoring of that directory in the repo.

It seems the path is needed as input to is_ignored() rather than
just file name.

Also noticed that .git files are getting scanned. Normally they
should be ignored as part of .gitignore, but its not typical to
include there. Seems Git automatically ignores that directory.
So I added it as a global_patterns to IgnoreFilterManager. Also
figured that it would be good to include global_ignore_file_paths
as was in the example for this class to exclude user defined ignores
and repo defined ignores.

Signed-off-by: Eric Brown <[email protected]>
@ericwb ericwb merged commit a3623f5 into securesauce:main Mar 22, 2024
7 checks passed
@ericwb ericwb deleted the fix_preignore branch March 22, 2024 18:04
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

Successfully merging this pull request may close these issues.

1 participant