[TYPO3-english] Sonar + phpcs not showing violations
PIT Solutions
typo3 at pitsolutions.com
Fri Jan 18 04:56:09 CET 2013
Hi guys !!
I am trying to integrate sonar with php . So i have added some custom rules in my rules folder (please see the attached rule file).
And in my profile i have enabled those rules which are added by my in rules.xml .
Each time when i run sonar-runner command on project i am not getting any violations .
But when run the same command using phpcs it shows errors and warning .
Here is some few lines of my "codesniffer.xml" code and "rules.xml".
codesniffer.xml :
------------------------
<?xml version="1.0" encoding="UTF-8"?>
<checkstyle version="1.3.5">
<file name="/opt/lampp/htdocs/imageMake/typo3conf/ext/cookie_control/ext_emconf.php">
<error line="2" column="1" severity="error" message="You must use "/**" style comments for a file comment" source="Squiz.Commenting.FileComment.WrongStyle"/>
<error line="2" column="1" severity="error" message="You must use "/**" style comments for a file comment" source="PEAR.Commenting.FileComment.WrongStyle"/>
<error line="3" column="1" severity="error" message="Block comment text must start on a new line" source="Squiz.Commenting.BlockComment.NoNewLine"/>
<error line="13" column="1" severity="error" message="Variable "EM_CONF" is not in valid camel caps format" source="Zend.NamingConventions.ValidVariableName.NotCamelCaps"/>
<error line="13" column="1" severity="error" message="Variable "EM_CONF" is not in valid camel caps format" source="Squiz.NamingConventions.ValidVariableName.NotCamelCaps"/>
<error line="13" column="10" severity="error" message="Variable "_EXTKEY" is not in valid camel caps format" source="Zend.NamingConventions.ValidVariableName.NotCamelCaps"/>
<error line="13" column="10" severity="error" message="Variable "_EXTKEY" is not in valid camel caps format" source="Squiz.NamingConventions.ValidVariableName.NotCamelCaps"/>
<error line="14" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed" source="Generic.WhiteSpace.DisallowTabIndent.TabsUsed"/>
<error line="14" column="2" severity="error" message="Array key not aligned correctly; expected 22 spaces but found 1" source="Squiz.Arrays.ArrayDeclaration.KeyNotAligned"/>
<error line="15" column="1" severity="error" message="Spaces must be used to indent lines; tabs are not allowed" source="Generic.WhiteSpace.DisallowTabIndent.TabsUsed"/>
rules.xml :
----------------
<?xml version="1.0" encoding="ISO-8859-1"?>
<rules>
<rule key="TYPO3.Classes.LowercaseClassKeywords.ClassDocComment"
priority="MAJOR">
<category name="Maintainability" />
<name>LowercaseClassKeywords</name>
<configKey>T_CLASS,T_INTERFACE,T_EXTENDS,T_IMPLEMENTS,T_ABSTRACT,T_FINAL,T_VAR,T_CONST,T_PRIVATE,T_PUBLIC,T_PROTECTED
</configKey>
<description>@category tag comment incorrectly indented</description>
</rule>
<rule key="TYPO3.Commenting.FunctionDocComment.TagIndenst"
priority="MAJOR">
<category name="Maintainability" />
<name>Tag comment incorrectly indented</name>
<configKey>TAG_INDENT</configKey>
<description>@category tag comment incorrectly indented</description>
</rule>
<rule
key="TYPO3.Commenting.NoAuthorAnnotationInFunctionDocComment.AuthorAnnotation"
priority="MAJOR">
<category name="Maintainability" />
<name>NoAuthorAnnotationInFunctionDocComment</name>
<configKey>TAG_INDENT</configKey>
<description>@category tag comment incorrectly indented</description>
</rule>
Please help . Thanks in advance.
Sivaprasad.S
More information about the TYPO3-english
mailing list