Skip to content

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