Skip to content
This repository was archived by the owner on Sep 19, 2023. It is now read-only.

Commit f5833eb

Browse files
committed
PHP Code sniffer and JustCoded rules
0 parents  commit f5833eb

File tree

549 files changed

+72463
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

549 files changed

+72463
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.DS_Store

justcoded/JustCoded-PSR2/ruleset.xml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0"?>
2+
<ruleset name="JustCoded-PSR2">
3+
<description>The PSR-2 coding standard with Tabs identation.</description>
4+
5+
<!-- Include the whole PSR-2 standard -->
6+
<rule ref="PSR2">
7+
<exclude name="Generic.WhiteSpace.DisallowTabIndent"/>
8+
</rule>
9+
10+
<!-- Covers rule: Your indentation should always reflect logical structure. -->
11+
<rule ref="Generic.WhiteSpace.ScopeIndent">
12+
<properties>
13+
<property name="indent" value="4"/>
14+
<property name="tabIndent" value="true"/>
15+
</properties>
16+
</rule>
17+
18+
<!-- Covers rule: Use real tabs and not spaces. -->
19+
<arg name="tab-width" value="4"/>
20+
<rule ref="Generic.WhiteSpace.DisallowSpaceIndent"/>
21+
22+
</ruleset>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0"?>
2+
<ruleset name="JustCoded-WordPress">
3+
<description>WordPress Coding Standards</description>
4+
5+
<rule ref="WordPress-Core"/>
6+
<rule ref="WordPress-Docs"/>
7+
<rule ref="WordPress-Extra"/>
8+
<rule ref="WordPress-VIP"/>
9+
</ruleset>

phpcs/.gitattributes

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/tests export-ignore
2+
/CodeSniffer/Standards/Generic/Tests export-ignore
3+
/CodeSniffer/Standards/MySource/Tests export-ignore
4+
/CodeSniffer/Standards/PEAR/Tests export-ignore
5+
/CodeSniffer/Standards/PSR1/Tests export-ignore
6+
/CodeSniffer/Standards/PSR2/Tests export-ignore
7+
/CodeSniffer/Standards/Squiz/Tests export-ignore
8+
/CodeSniffer/Standards/Zend/Tests export-ignore
9+
.travis.yml export-ignore
10+
package.xml export-ignore

phpcs/.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/CodeSniffer.conf
2+
/phpcs.xml
3+
/phpunit.xml
4+
.idea/*
5+
/vendor/
6+
composer.lock

phpcs/CONTRIBUTING.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Contributing
2+
-------------
3+
4+
Before you contribute code to PHP\_CodeSniffer, please make sure it conforms to the PHPCS coding standard and that the PHP\_CodeSniffer unit tests still pass. The easiest way to contribute is to work on a checkout of the repository, or your own fork, rather than an installed PEAR version. If you do this, you can run the following commands to check if everything is ready to submit:
5+
6+
cd PHP_CodeSniffer
7+
php scripts/phpcs
8+
9+
Which should give you no output, indicating that there are no coding standard errors. And then:
10+
11+
phpunit
12+
13+
Which should give you no failures or errors. You can ignore any skipped tests as these are for external tools.

phpcs/CodeSniffer.conf.dist

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?php
2+
$phpCodeSnifferConfig = array (
3+
'default_standard' => 'PSR2',
4+
'report_format' => 'summary',
5+
'show_warnings' => '0',
6+
'show_progress' => '1',
7+
'report_width' => '120',
8+
)
9+
?>

0 commit comments

Comments
 (0)