Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

phpcs_input_file ignored for --ignore test #733

Closed
Arcanemagus opened this issue Oct 6, 2015 · 4 comments
Closed

phpcs_input_file ignored for --ignore test #733

Arcanemagus opened this issue Oct 6, 2015 · 4 comments
Milestone

Comments

@Arcanemagus
Copy link

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:

phpcs_input_file: filePathGoesHere

Unfortunately it appears that this "self-defined file name" is not respected when running the test for the --ignore option.

Discovered in AtomLinter/linter-phpcs#66, where we may be working around this issue, but I figured it should be filed here to hopefully be fixed in the source 😉.

@gsherwood
Copy link
Member

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.

@gsherwood gsherwood added this to the 3.0 milestone Oct 6, 2015
@Arcanemagus
Copy link
Author

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.

@gsherwood
Copy link
Member

I figured out a way of doing it in 3.0.

@Arcanemagus
Copy link
Author

Awesome, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants