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 3.x compat: Implement recognition of the --ignore-annotations setting #1051

Merged

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Jul 25, 2017

This PR is part of the PHPCS 3.x compatibility PR series.

PHPCS 3.x introduces a --ignore-annotations command line option to ignore any and all inline file ignore / line ignore / coding standard setting changes etc.

This PR ensures that the WPCS specific whitelist comments will also be ignored if the --ignore-annotations command line option is passed.

Fixes #862

@jrfnl jrfnl added this to the 0.13.0 milestone Jul 25, 2017
@jrfnl jrfnl mentioned this pull request Jul 25, 2017
* @return bool True if annotations should be ignored, false otherwise.
*/
public static function ignore_annotations( File $phpcsFile = null ) {
// @TODO THIS NEEDS SOME CAREFUL & THOROUGH TESTING!
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm assuming that this comment is intended to be left in the code for now?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh darn! No, that comment should be removed. Was a WIP comment to myself & I have tested it since and confirmed it works as expected.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JDGrimes I've removed the comment now.

@jrfnl jrfnl force-pushed the WPCS-0.13.0/feature/phpcs-3.x-support-ignore-annotations branch from 49b7f3e to 6dc72a5 Compare July 25, 2017 13:19
@JDGrimes JDGrimes merged commit 172a180 into develop Jul 26, 2017
@JDGrimes JDGrimes deleted the WPCS-0.13.0/feature/phpcs-3.x-support-ignore-annotations branch July 26, 2017 12:46
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.

3 participants