You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4php-dev@logging.apache.org by "Ivan Habunek (JIRA)" <ji...@apache.org> on 2012/06/15 14:50:42 UTC

[jira] [Created] (LOG4PHP-182) Improve coding standards by using PHP_CodeSniffer

Ivan Habunek created LOG4PHP-182:
------------------------------------

             Summary: Improve coding standards by using PHP_CodeSniffer
                 Key: LOG4PHP-182
                 URL: https://issues.apache.org/jira/browse/LOG4PHP-182
             Project: Log4php
          Issue Type: Improvement
          Components: Code
    Affects Versions: 2.2.1
            Reporter: Ivan Habunek
            Assignee: Ivan Habunek
            Priority: Minor


The coding standards for the project are defined in: 
http://logging.apache.org/log4php/contributingpatches.html

I propose to create a ruleset for PHP_CodeSniffer which reflects these standards, and to run a check as a part of our build process.

Some rules may need to be better defined.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (LOG4PHP-182) Improve coding standards by using PHP_CodeSniffer

Posted by "Ivan Habunek (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LOG4PHP-182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13437375#comment-13437375 ] 

Ivan Habunek commented on LOG4PHP-182:
--------------------------------------

I have decided to leave this for after 2.3.0 release. It's overdue and I don't want to delay it any further.

For now, I have replaced phpdoc with apigen. It works very well and output template is nice. We can consider phpdoc again once version 2 is stable (currently in alpha).
                
> Improve coding standards by using PHP_CodeSniffer
> -------------------------------------------------
>
>                 Key: LOG4PHP-182
>                 URL: https://issues.apache.org/jira/browse/LOG4PHP-182
>             Project: Log4php
>          Issue Type: Improvement
>          Components: Code
>    Affects Versions: 2.2.1
>            Reporter: Ivan Habunek
>            Assignee: Ivan Habunek
>            Priority: Minor
>
> The coding standards for the project are defined in: 
> http://logging.apache.org/log4php/contributingpatches.html
> I propose to create a ruleset for PHP_CodeSniffer which reflects these standards, and to run a check as a part of our build process.
> Some rules may need to be better defined.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Comment Edited] (LOG4PHP-182) Improve coding standards by using PHP_CodeSniffer

Posted by "Bruce Ingalls (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LOG4PHP-182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13397735#comment-13397735 ] 

Bruce Ingalls edited comment on LOG4PHP-182 at 6/20/12 6:36 PM:
----------------------------------------------------------------

You'll also want to run PhpMD.

I'm partial to PEAR style, which seems to be most popular. It has some differences with log4php style, but is the closest of all CodeSniffer styles. It is unfortunate that log4php installs like a PEAR lib (but not yet a PHAR package), yet has a little different style.

Note that my small contribution started as PEAR style, which I then had to 'fix' into log4php style, which was not too bad.
Also note that ApiGen seems to be replacing PhpDoc/umentor, but currently is compatible.

I believe that I mentioned earlier, that there are 3rd party CodeSniffer plugins; one checks the minimum required version of PHP. Another checks code for PHP v5.2 keywords deprecated in v5.3. I'd start with using a deprecation check in your continuous integration.

                
      was (Author: bingalls):
    You'll also want to run PhpMD.

I'm partial to PEAR style, which seems to be most popular. It has some differences with log4php style, but is the closest of all CodeSniffer styles. It is unfortunate that log4php installs like a PEAR lib (but not yet a PHAR package), yet has a little different style.

Note that my small contribution started as PEAR style, which I then had to 'fix' into log4php style, which was not too bad.
Also note that ApiGen seems to be replacing PhpDoc/umentor, but currently is compatible.
                  
> Improve coding standards by using PHP_CodeSniffer
> -------------------------------------------------
>
>                 Key: LOG4PHP-182
>                 URL: https://issues.apache.org/jira/browse/LOG4PHP-182
>             Project: Log4php
>          Issue Type: Improvement
>          Components: Code
>    Affects Versions: 2.2.1
>            Reporter: Ivan Habunek
>            Assignee: Ivan Habunek
>            Priority: Minor
>
> The coding standards for the project are defined in: 
> http://logging.apache.org/log4php/contributingpatches.html
> I propose to create a ruleset for PHP_CodeSniffer which reflects these standards, and to run a check as a part of our build process.
> Some rules may need to be better defined.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (LOG4PHP-182) Improve coding standards by using PHP_CodeSniffer

Posted by "Bruce Ingalls (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LOG4PHP-182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13397735#comment-13397735 ] 

Bruce Ingalls commented on LOG4PHP-182:
---------------------------------------

You'll also want to run PhpMD.

I'm partial to PEAR style, which seems to be most popular. It has some differences with log4php style, but is the closest of all CodeSniffer styles. It is unfortunate that log4php installs like a PEAR lib (but not yet a PHAR package), yet has a little different style.

Note that my small contribution started as PEAR style, which I then had to 'fix' into log4php style, which was not too bad.
Also note that ApiGen seems to be replacing PhpDoc/umentor, but currently is compatible.
                
> Improve coding standards by using PHP_CodeSniffer
> -------------------------------------------------
>
>                 Key: LOG4PHP-182
>                 URL: https://issues.apache.org/jira/browse/LOG4PHP-182
>             Project: Log4php
>          Issue Type: Improvement
>          Components: Code
>    Affects Versions: 2.2.1
>            Reporter: Ivan Habunek
>            Assignee: Ivan Habunek
>            Priority: Minor
>
> The coding standards for the project are defined in: 
> http://logging.apache.org/log4php/contributingpatches.html
> I propose to create a ruleset for PHP_CodeSniffer which reflects these standards, and to run a check as a part of our build process.
> Some rules may need to be better defined.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira