Skip to content

Adds --hook:ignore-file, --hook:ignore-dir #38

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

TekWizely
Copy link
Owner

@TekWizely TekWizely commented Apr 22, 2025

ignore-file patterns are based on simple bash pattern matching.

Vendor exclusions are now subject to the ignore-dir logic.


Relates to #23, #24, #33, #37

cc: @balihb Hoping you can help me test this. I think you would add --hook:ignore-dir=.cache as an argument to your hook invocation.

I haven't even tested myself yet so this is very alpha-level :)

ignore-file patterns are based on simple bash pattern matching.

Vendor exclusions are now subject to the ignore-dir logic.
@balihb
Copy link

balihb commented Apr 22, 2025

It works perfectly! Arigatō gozaimasu! ❤️

…urce= directives as being relative to the script they're in.
…ttern is not file-specific and could just match a directory, causing its files/folders to be ignored.

formatting: Normalized leading whitespace to tabs
docs: add 'Passing Ignore Patterns To Hooks' section
refactor: modify is_path_ignored_by_dir_pattern to take a directory as the argument
refactor: use case-statements for pattern matching
@TekWizely
Copy link
Owner Author

@balihb Could you check this updated version and see if it still works for you?

@TekWizely
Copy link
Owner Author

TekWizely commented Jul 29, 2025

@DariaKunoichi Could you take a look at this and see if it could meet your needs ?

@TekWizely
Copy link
Owner Author

@spkane could you take a look at this and see if it could meet your needs ?

@spkane
Copy link

spkane commented Jul 29, 2025

@spkane could you take a look at this and see if it could meet your needs ?

I can’t easily test this at the moment, as my original issue was raised when I was working for another organization, but the general functionality looks good and will hopefully prove useful in the future.

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.

3 participants