Skip to content

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

Merged
Gerrit0 merged 3 commits into
TypeStrong:masterfrom
dokmic:master
Apr 26, 2019
Merged

fix: the bug with the negated/commented exclude patterns#1025
Gerrit0 merged 3 commits into
TypeStrong:masterfrom
dokmic:master

Conversation

@dokmic
Copy link
Copy Markdown
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
Comment thread src/test/utils.paths.test.ts Outdated
Comment thread src/test/utils.paths.test.ts Outdated
@Gerrit0
Copy link
Copy Markdown
Collaborator

Gerrit0 commented Apr 26, 2019

Looks good, thanks!

@Gerrit0 Gerrit0 merged commit fa16808 into TypeStrong:master Apr 26, 2019
@aciccarello
Copy link
Copy Markdown
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