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

Modifications to the phpcs.xml are picked up and won't allow a commit #27

Closed
bswatson opened this issue Dec 15, 2015 · 2 comments
Closed
Assignees
Labels

Comments

@bswatson
Copy link
Collaborator

No description provided.

@stevegrunwell
Copy link
Owner

Do you happen to have the diff handy that triggered this? Furthermore, does the phpcs.xml file happen to include the fix from #12?:

<!--
    Don't get angry about checking files that don't contain code
    @link https://github.com/stevegrunwell/wp-enforcer/issues/12
-->
<rule ref="Internal.NoCodeFound">
    <severity>0</severity>
</rule>

@bswatson
Copy link
Collaborator Author

The rule is in place. The diff itself doesn't matter, as it would be triggered by any modification to an xml file. Here's the output when modifying phpcs.xml:

git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree commit -q -F /var/folders/_5/mckw00b54539yk2gkw642sp00000gn/T/SourceTreeTemp.PCzPtn 
Running PHP_CodeSniffer...

FILE: ~/project/phpcs.xml
----------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 1 LINE
----------------------------------------------------------------------
 1 | ERROR | [ ] Short PHP opening tag used; expected "<?php" but
   |       |     found "<?"
 1 | ERROR | [ ] Missing file doc comment
 1 | ERROR | [x] Expected 1 space before "="; 0 found
 1 | ERROR | [x] Expected 1 space after "="; 0 found
 1 | ERROR | [x] String "1.0" does not require double quotes; use
   |       |     single quotes instead
----------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------

Time: 57ms; Memory: 4Mb

Please fix coding standards errors before committing
Completed with errors, see above

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

No branches or pull requests

2 participants