Closed Arcanemagus closed 8 years ago
PHPCS assumes that if you are passing in standard input to it, you want that input checked. None of the ignore rules will be processed as they are only used when traversing the file system looking for files to process.
I'll leave this as a feature request as it may be possible to implement in the 3.0 refactor. Not 100% sure though, and not 100% sure if I should actually make this change.
It looks like we will just be re-implementing this in linter-phpcs
, I'm not actually to sure what I would define as "correct" behavior here as the option only really makes sense when scanning a directory but apparently is in use for single files as well.
I figured out a way of doing it in 3.0.
Awesome, thanks!
When feeding a file to PHPCS via
stdin
the defined method of telling PHPCS what the file name is is to prepend the content with a single line of the format:Unfortunately it appears that this "self-defined file name" is not respected when running the test for the
--ignore
option.Discovered in https://github.com/AtomLinter/linter-phpcs/issues/66, where we may be working around this issue, but I figured it should be filed here to hopefully be fixed in the source :wink:.