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

More comprehensive scrutinizer config. #571

Merged
merged 2 commits into from
May 3, 2016

Conversation

jrfnl
Copy link
Contributor

@jrfnl jrfnl commented Apr 29, 2016

Prevents builds in forks throwing different results (Scutinizer uses a config cascading merge).

Includes minor code changes based on Scrutinizer feedback.
Also reset the Scrutinizer filtered issues and only re-filtered persistent issues we can't currently get rid off for varying reasons.

@jrfnl jrfnl force-pushed the feature/scrutinizer-config branch 5 times, most recently from 2e38827 to f17ecd1 Compare April 29, 2016 06:52
@@ -2713,7 +2713,7 @@ protected function get_row_actions( $item ) {
}

$prefix = ( defined( 'WP_NETWORK_ADMIN' ) && WP_NETWORK_ADMIN ) ? 'network_admin_' : '';
return apply_filters( "tgmpa_{$prefix}plugin_action_links", array_filter( $action_links ), $item['slug'], $item, $this->view_context );
return apply_filters( 'tgmpa_' . $prefix . 'plugin_action_links', array_filter( $action_links ), $item['slug'], $item, $this->view_context );
Copy link
Member

Choose a reason for hiding this comment

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

AFAIK, filters (and the action hook below) need to be named with interpolation, for WP-Parser to be able to read the single string. Unless WP-Parser has been updated to read the first arg token, instead of the first string token...

Copy link
Contributor Author

@jrfnl jrfnl May 2, 2016

Choose a reason for hiding this comment

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

Intresting. I didn't know that. Bit of a shame that they're promoting bad practices that way, but fair enough.
I'll try and figure out the rule which triggered this change and turn it off in the config.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also just wondering: we're not using the WP-Parser, so why should we be led by what it can parse ?

Copy link
Member

Choose a reason for hiding this comment

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

While we're not, there may be plugins and themes that are using it, so TGMPA shouldn't be the cause of them getting duff auto-generated documentation because it tripped up in some way.

Of course, we could use WP-Parser if we wanted to create some technical API documentation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fair point.

Of course, we could use WP-Parser if we wanted to create some technical API documentation.

I was considering something like that at some point once all the hooks are documented.
All the same, if the WP Parser is that finicky, we may want to consider using WP Hook documentor instead. At least it parses all variants of hooks ;-)

Or maybe better: fix WP Parser ... (yet another project to fix... sigh)

@GaryJones
Copy link
Member

Probably should have been separate commits - the config file is fine to merge, but one small query on one of the fixes means the PR can't be merged immediately.

@jrfnl
Copy link
Contributor Author

jrfnl commented May 2, 2016

See my above comment - exactly the reason why I put in one PR (though I can easily make it two commits of course).

@GaryJones
Copy link
Member

Are you planning to change these hook names back or not?

@jrfnl
Copy link
Contributor Author

jrfnl commented May 3, 2016

Yes I am, just need to figure out the scrutinizer rule to invert.

@jrfnl jrfnl force-pushed the feature/scrutinizer-config branch from 47c6619 to 1ef8ab4 Compare May 3, 2016 13:30
@jrfnl
Copy link
Contributor Author

jrfnl commented May 3, 2016

Adjusted & turned into two separate commits, one for the config, one for the code adjustments.

The issue is triggered by the WPCS rules, so no specific Scrutinizer rule I can disable for that. In the WPCS config the severity is 0, but clearly Scrutinizer cannot deal with this properly, so ended up filtering out the issue in Scrutinizer itself.

@jrfnl
Copy link
Contributor Author

jrfnl commented May 3, 2016

Hang on - some alignment issues were introduced by the translators comments, let me fix those too.

@jrfnl jrfnl force-pushed the feature/scrutinizer-config branch from 1ef8ab4 to 46b4485 Compare May 3, 2016 13:46
@jrfnl
Copy link
Contributor Author

jrfnl commented May 3, 2016

Ok, all done.

@GaryJones GaryJones merged commit df4d43b into develop May 3, 2016
@GaryJones GaryJones deleted the feature/scrutinizer-config branch May 3, 2016 14:04
@GaryJones GaryJones added this to the 2.6.0 milestone May 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants