Skip to content

fix: the bug with the negated/commented exclude patterns #1025

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

Merged
merged 3 commits into from
Apr 26, 2019
Merged

fix: the bug with the negated/commented exclude patterns #1025

merged 3 commits into from
Apr 26, 2019

Conversation

dokmic
Copy link
Contributor

@dokmic dokmic commented Apr 25, 2019

As from the Minimatch documentation, it should be possible to use ! at the beginning of the pattern to negate that. Same works for # which can deactivate the whole pattern.

The fix adds the following possibilities for the exclude patterns:

  • Patterns starting with ! (e.g. !src/**/api.ts, !/home/user/src/**/api.ts) should exclude everything except the glob following after that.
  • Patterns starting with # (e.g. #src/**/api.ts) should do nothing.
  • Patterns starting with multiple ! will be negated multiple times accordingly.

Fixes #1024.

@dokmic dokmic changed the title Resolves #1024: bug with the negated/commented exclude patterns resolves #1024: bug with the negated/commented exclude patterns Apr 25, 2019
@dokmic dokmic changed the title resolves #1024: bug with the negated/commented exclude patterns #1024 resolves the bug with the negated/commented exclude patterns Apr 25, 2019
@dokmic dokmic changed the title #1024 resolves the bug with the negated/commented exclude patterns fix: the bug with the negated/commented exclude patterns Apr 25, 2019
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Apr 26, 2019

Looks good, thanks!

@Gerrit0 Gerrit0 merged commit fa16808 into TypeStrong:master Apr 26, 2019
@aciccarello
Copy link
Collaborator

Thanks for the contribution!

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.

Negated/commented Minimatch expressions are not working
3 participants