Skip to content

Conversation

@jrfnl
Copy link
Contributor

@jrfnl jrfnl commented Sep 8, 2020

This prevents code passed via STDIN from not being scanned because STDIN is not part of an include/exclude pattern.

I've made the same adjustment to both the File::process(), as well as the File::addMessage() method.

Note: using trim() to remove potential quotes around STDIN which are sometimes passed by IDEs. (based on previous experiences with sniffs checking file names).

Also note that the changes look more extensive than they really are due to the indentation change. Looking at the files while ignoring whitespace changes will show the real diff (4 lines).

Fixes #3107

Note: using `trim()` to remove potential quotes around `STDIN` which are sometimes passed by IDEs.
Note: using `trim()` to remove potential quotes around `STDIN` which are sometimes passed by IDEs.
@3ynm
Copy link

3ynm commented Sep 8, 2020

Tested, it works. Thanks! :D

@gsherwood gsherwood modified the milestones: 3.6.0, 3.5.7 Sep 25, 2020
@gsherwood gsherwood modified the milestones: 3.5.7, 3.6.0 Oct 13, 2020
@gsherwood gsherwood merged commit 8cbba26 into squizlabs:master Oct 22, 2020
@jrfnl jrfnl deleted the feature/3107-dont-check-stdin-against-ignore-include-paths branch October 22, 2020 23:16
@jrfnl
Copy link
Contributor Author

jrfnl commented Oct 22, 2020

@gsherwood Uh.. I thought you wanted to wait with including this change for v 3.6.0 ? It's not included in the 3.5.7 changelog now.

@gsherwood
Copy link
Member

No idea how that got in there - must have forgotten to remove it.

Thanks for letting me know. Will release 3.5.8 today with this reverted.

@jrfnl
Copy link
Contributor Author

jrfnl commented Oct 23, 2020

@gsherwood Would you like me to resubmit the PR or will you just cherrypick the commits from the earlier merge ?

@gsherwood
Copy link
Member

Would you like me to resubmit the PR or will you just cherrypick the commits from the earlier merge ?

I was just going to cherry pick them.

gsherwood added a commit that referenced this pull request Oct 26, 2020
@gsherwood
Copy link
Member

Thanks for the PR. It's been merged in again now. And that's again for letting me know it was in the release.

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.

Sniff include patterns never match content from STDIN

3 participants