You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Dmitrijs Reinmanis (Jira)" <ji...@apache.org> on 2019/10/17 05:09:00 UTC

[jira] [Issue Comment Deleted] (NETBEANS-3243) Code sniffer now working in latest verson

     [ https://issues.apache.org/jira/browse/NETBEANS-3243?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dmitrijs Reinmanis updated NETBEANS-3243:
-----------------------------------------
    Comment: was deleted

(was: Funny! Because I would like to know for myself, how that should work. As I said, I can't find any documentation about this.

Anyway. In options -> PHP -> Code Analysis -> Code Sniffer in "Default Standard" I selected "MySource" and in "Code Sniffe" field I used code like this:
{code:java}
/home/user/project/yii/vendor/squizlabs/php_codesniffer/bin/phpcs --standard=/home/user/project/yii/ruleset.xml -s
In version 8.2 it created code like this:
"/usr/local/ampps/php-5.6/bin/php" "/home/user/project/yii/vendor/squizlabs/php_codesniffer/bin/phpcs" "--standard=/home/user/project/yii/ruleset.xml" "-s" "--runtime-set" "default_standard" "MySource" "--report=xml" "--extensions=php4,php5,php3,phtml,phpt,inc,php" "--encoding=UTF-8" "/home/user/project/yii/console/controllers/TestController.php"{code}
It worked fine, but since version 11.1 same code and configuration creates this code:
{code:java}
"/usr/local/ampps/php-5.6/bin/php" "/home/user/project/yii/vendor/squizlabs/php_codesniffer/bin/phpcs" "--standard=/home/user/project/yii/ruleset.xml" "-s" "--standard=MySource" "--report=xml" "--extensions=phtml,php,php4,php5,php3,phpt,inc" "--encoding=UTF-8" "/home/user/project/yii/console/controllers/TestController.php"{code}
As you can see, it creates now two "standard" attributes and that overwrites my code. I would like to see same result as in version 8.2 or someone could at least explain, how this suppose to work and how else I can point to my custom project standard.

 )

> Code sniffer now working in latest verson
> -----------------------------------------
>
>                 Key: NETBEANS-3243
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-3243
>             Project: NetBeans
>          Issue Type: Bug
>          Components: php - Code Analysis
>    Affects Versions: 11.1
>            Reporter: Dmitrijs Reinmanis
>            Priority: Major
>
> SInce version 11.1 netbeans executes different code sniffer command. In version 8.2 command was executed with "default_standard" attribute. But now it adds "–standard=MySource". Before I could just add my own "standard" attribute and use my custom rules, but now it overwrites it. We have already rules in our project and I just need to add target to that file. But in new version I can't find any way, how to do that. How I can add custom rules now? I can't just skip it, because netbeans requires it. Even if I already added target in my command. I can't find any information about this in google.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists