Skip to content
This repository has been archived by the owner on Sep 16, 2019. It is now read-only.

Commit

Permalink
Update codesniffer ruleset
Browse files Browse the repository at this point in the history
  • Loading branch information
olefredrik committed Oct 13, 2016
1 parent 21a75ee commit 290a66a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions codesniffer.ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@
<exclude name="WordPress.XSS.EscapeOutput.UnsafePrintingFunction" />
<exclude name="WordPress.XSS.EscapeOutput.OutputNotEscaped" />
<exclude name="WordPress.Arrays.ArrayDeclaration.NoSpaceAfterOpenParenthesis" />
<exclude name="WordPress.Arrays.ArrayDeclarationSpacing.NoSpaceAfterArrayOpener" />
<exclude name="WordPress.Arrays.ArrayDeclarationSpacing.NoSpaceBeforeArrayCloser" />

<exclude name="WordPress.Variables.GlobalVariables" />
<exclude name="WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceAfterOpenParenthesis" />
<exclude name="WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceBeforeCloseParenthesis)" />

This comment has been minimized.

Copy link
@wester97

wester97 Jan 30, 2017

This seems like a typo ...

Expand Down

4 comments on commit 290a66a

@Aetles
Copy link
Contributor

@Aetles Aetles commented on 290a66a Nov 17, 2016

Choose a reason for hiding this comment

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

Why adding more excludes instead of making the code conform to WP code style?

@wester97
Copy link

Choose a reason for hiding this comment

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

I have the same question.

@olefredrik
Copy link
Owner Author

Choose a reason for hiding this comment

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

@Aetles @wester97 : Simply because it's time consuming to keep up with new iterations of WP Coding Standards. I consider the rules that I have excluded as of little importance in relation to whether the code will run correctly. It's a source of frustration when a build fails because of a new rule that is added to the WP Coding Standards repo. Ideally, we should be able to fix build errors automatically with php sniffer on localhost before pushing to github. But it does not seem to me that phpsniffer are in sync with the WP Coding Standards ruleset. Feel free to help me fix this. There is currently an open pull request with a failed build (because of a new WP Coding Standard rule) which I have not had time to look at yet.

@Aetles
Copy link
Contributor

@Aetles Aetles commented on 290a66a Jan 30, 2017

Choose a reason for hiding this comment

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

Thanks for the explanation. I can see the struggle with build failures, a common problem and source of frustration in many other projects too, unfortunately. Still, I prefer consistent code (and other things like best practice for commit messages) but I'm not maintaining this project and that's my personal opinion and I'm free to fork and maintain whatever rules I like there.

Please sign in to comment.