Skip to content

Filter: bugfix for shouldIgnorePath() ignoring paths containing the name of a standard - #1

Merged
wvega merged 1 commit into
wvega:issue-2391from
jrfnl:wvega/issue-2391
Jan 29, 2019
Merged

wvega merged 1 commit into
wvega:issue-2391from
jrfnl:wvega/issue-2391

Conversation

@jrfnl

@jrfnl jrfnl commented Jan 29, 2019

Copy link
Copy Markdown

The file list filtering in the Filter class should only take global exclude patterns into account and should ignore sniff specific exclude patterns, which are used/handled in the File::addMessage() method.

This commit fixes this.

Includes:

  • Reworking the initial unit test to use setUpBeforeClass() for the fixtures and a data provider to easily allow for more test cases without code duplication.
  • Adding an additional unit test to verify that top-level exclude patterns are correctly respected.
  • Renaming the test ruleset file to use the xml file extension.
  • Adding the newly introduced unit test files to the package.xml file lists.

Fixes squizlabs#2391

…ame of a standard

The file list filtering in the `Filter` class should only take global exclude patterns into account and should ignore sniff specific exclude patterns, which are used/handled in the `File::addMessage()` method.

This commit fixes this.

Includes:
* Reworking the initial unit test to use `setUpBeforeClass()` for the fixtures and a data provider to easily allow for more test cases without code duplication.
* Adding an additional unit test to verify that top-level exclude patterns are correctly respected.
* Renaming the test ruleset file to use the `xml` file extension.
* Adding the newly introduced unit test files to the `package.xml` file lists.

Fixes 2391
@jrfnl

jrfnl commented Jan 29, 2019

Copy link
Copy Markdown
Author

Note: the build failure is not specific to this PR and there is a PR open already to sort that out: squizlabs#2390

@wvega

wvega commented Jan 29, 2019

Copy link
Copy Markdown
Owner

@jrfnl I just tested this modification on my project and I can confirm that it solves the problem. I'll merge the PR in a moment.

@wvega
wvega merged commit 1cad124 into wvega:issue-2391 Jan 29, 2019
@jrfnl
jrfnl deleted the wvega/issue-2391 branch January 29, 2019 15:33
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.

2 participants