diff options
author | Andreas Fischer <bantu@phpbb.com> | 2013-10-27 17:50:58 +0100 |
---|---|---|
committer | Andreas Fischer <bantu@phpbb.com> | 2013-10-27 17:50:58 +0100 |
commit | 8c83acb28bb450adf978a0a6eff6bb9819dec1f7 (patch) | |
tree | e08bb442f52f1bae800a655e28788b545d575f83 /build/code_sniffer/ruleset-php-strict.xml | |
parent | c230701e48e393641957fe46fde521f713c203e9 (diff) | |
download | forums-8c83acb28bb450adf978a0a6eff6bb9819dec1f7.tar forums-8c83acb28bb450adf978a0a6eff6bb9819dec1f7.tar.gz forums-8c83acb28bb450adf978a0a6eff6bb9819dec1f7.tar.bz2 forums-8c83acb28bb450adf978a0a6eff6bb9819dec1f7.tar.xz forums-8c83acb28bb450adf978a0a6eff6bb9819dec1f7.zip |
[task/code-sniffer] Add code sniffer rulesets.
PHPBB3-11980
Diffstat (limited to 'build/code_sniffer/ruleset-php-strict.xml')
-rw-r--r-- | build/code_sniffer/ruleset-php-strict.xml | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/build/code_sniffer/ruleset-php-strict.xml b/build/code_sniffer/ruleset-php-strict.xml new file mode 100644 index 0000000000..8580090c69 --- /dev/null +++ b/build/code_sniffer/ruleset-php-strict.xml @@ -0,0 +1,42 @@ +<?xml version="1.0"?> +<ruleset name="phpBB PHP Strict Standard"> + + <description>phpBB coding standard for PHP files</description> + + <rule ref="./ruleset-php-legacy.xml" /> + + <!-- There SHOULD NOT be more than 80 characters per line + There MUST NOT be more than 120 characters per line --> + <!-- + <rule ref="Generic.Files.LineLength"> + <properties> + <property name="lineLimit" value="80"/> + <property name="absoluteLineLimit" value="120"/> + </properties> + </rule> + --> + + <!-- The PHP constants true, false, and null MUST be in lower case. --> + <rule ref="Generic.PHP.LowerCaseConstant" /> + + <!-- PHP keywords MUST be in lower case. --> + <rule ref="Generic.PHP.LowerCaseKeyword" /> + + <!-- There MUST NOT be trailing whitespace at the end of lines. --> + <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace" /> + + <!-- There MUST NOT be whitespace before the first content of a file --> + <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.StartFile" /> + + <!-- There MUST NOT be whitespace after the last content of a file --> + <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EndFile" /> + + <!-- Functions MUST NOT contain multiple empty lines in a row --> + <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines" /> + + <!-- When present, all use declarations MUST go after the namespace declaration. + There MUST be one use keyword per declaration. + There MUST be one blank line after the use block. --> + <rule ref="PSR2.Namespaces.UseDeclaration" /> + +</ruleset> |