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

Example WordPress-Theme phpcs.xml.dist file #91

Open
grappler opened this issue Dec 17, 2016 · 3 comments
Open

Example WordPress-Theme phpcs.xml.dist file #91

grappler opened this issue Dec 17, 2016 · 3 comments

Comments

@grappler
Copy link
Member

An example phpcs.xml.dist could be useful for the theme author that they can place in their theme directory and have the IDE's automatically register it.

<?xml version="1.0"?>
<ruleset name="Theme Name">

 <!--
    The name attribute of the ruleset tag is displayed
    when running PHP_CodeSniffer with the -v command line
    argument. The description tag below is not displayed anywhere
    except in this file, so it can contain information for
    developers who may change this file in the future.
 -->
 <description>A custom coding standard for your theme.</description>

 <!--
    Include all sniffs in the WordPress-Theme standard. Note that the
    path to the standard does not have to be specified as the
    PEAR standard exists inside the PHP_CodeSniffer install
    directory.
 -->
 <rule ref="WordPress-Theme" />

 <!--
    You can hard-code ignore patterns directly into your
    custom standard so you don't have to specify the
    patterns on the command line.

    The following two tags are equivalent to the command line argument:
    --ignore=*/tests/*,*/data/*
 -->
 <exclude-pattern>*/tests/*</exclude-pattern>
 <exclude-pattern>*/node_modules/*</exclude-pattern>

</ruleset>
@dingo-d
Copy link
Member

dingo-d commented May 18, 2019

I think by having forked this to a separate repo we can actually do this, so I'll close this one 🙂

@dingo-d dingo-d closed this as completed May 18, 2019
@jrfnl
Copy link

jrfnl commented May 19, 2019

Reopened: while this file can now be added, it hasn't been added yet.

I think it would be a good idea for such an example ruleset to be added + instructions on how to use it in the readme.

@jrfnl jrfnl reopened this May 19, 2019
@dingo-d dingo-d added this to the 0.2.0 milestone May 20, 2019
@dingo-d dingo-d modified the milestones: 0.2.0, 0.2.x/0.3.0 Next Jul 17, 2019
@dingo-d
Copy link
Member

dingo-d commented Jul 17, 2019

Will add this after 0.2.0.

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

3 participants