diff --git a/coder_sniffer/Drupal/ruleset.xml b/coder_sniffer/Drupal/ruleset.xml index 59da63e2bc6c6617b50d7892c1e7bd64ee144e17..fd3a42b1e23b32b965543c467f1e394ce5187f6b 100644 --- a/coder_sniffer/Drupal/ruleset.xml +++ b/coder_sniffer/Drupal/ruleset.xml @@ -47,16 +47,18 @@ <exclude-pattern>*.tpl.php</exclude-pattern> </rule> + <!-- Generic sniffs --> + <rule ref="Generic.CodeAnalysis.EmptyPHPStatement"/> <rule ref="Generic.CodeAnalysis.UselessOverridingMethod"/> <rule ref="Generic.Files.ByteOrderMark"/> + <rule ref="Generic.Files.LineEndings"/> <rule ref="Generic.Formatting.DisallowMultipleStatements"/> <rule ref="Generic.Formatting.SpaceAfterCast"/> - <rule ref="Generic.Functions.FunctionCallArgumentSpacing"/> + <!-- Already covered by Drupal.WhiteSpace.Comma.NoSpace. --> <rule ref="Generic.Functions.FunctionCallArgumentSpacing.NoSpaceAfterComma"> <severity>0</severity> </rule> - <rule ref="Generic.NamingConventions.ConstructorName"/> <rule ref="Generic.NamingConventions.UpperCaseConstantName"/> <rule ref="Generic.PHP.DeprecatedFunctions"/> @@ -65,13 +67,6 @@ <rule ref="Generic.PHP.UpperCaseConstant"/> <rule ref="Generic.WhiteSpace.DisallowTabIndent"/> - <!-- Use Unix newlines --> - <rule ref="Generic.Files.LineEndings"> - <properties> - <property name="eolChar" value="\n"/> - </properties> - </rule> - <rule ref="MySource.Debug.DebugCode"/> <rule ref="PEAR.Files.IncludingFile"/> <!-- Disable some error messages that we do not want. --> diff --git a/tests/Drupal/bad/BadUnitTest.php b/tests/Drupal/bad/BadUnitTest.php index 59811f28beaa48c90682865ea9b0eec1fb9d472a..15c4f0459f2717c6fa05809228a382d4f1d78449 100644 --- a/tests/Drupal/bad/BadUnitTest.php +++ b/tests/Drupal/bad/BadUnitTest.php @@ -434,6 +434,7 @@ class BadUnitTest extends CoderSniffUnitTest 809 => 1, 823 => 1, 824 => 1, + 836 => 1, ]; }//end switch diff --git a/tests/Drupal/bad/bad.php.fixed b/tests/Drupal/bad/bad.php.fixed index f5fd6185d782d9cc14128ab5a5854d8a5820d3da..71ddbb72ad8fbe77075b129652b6d8478ea4b0ce 100644 --- a/tests/Drupal/bad/bad.php.fixed +++ b/tests/Drupal/bad/bad.php.fixed @@ -884,7 +884,6 @@ function test28() { // Multiple statements on one line are not allowed. echo 'Hi!'; -; /** *