Re: PHP-Codesniffer ruleset configuration options

From: Date: Tue, 30 Oct 2012 13:31:36 +0000
Subject: Re: PHP-Codesniffer ruleset configuration options
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-31661@lists.php.net to get a copy of this message
Hi! On 29 October 2012 22:23, Greg Sherwood <gsherwood@squiz.net> wrote: > Hi Nico, > > It is not currently possible in the stable version, but I did add this a > couple of weeks ago in the development version. These are the docs: > > <!-- > You can also change the type of a message from error to > warning and vice versa. > --> > <rule ref="Generic.Commenting.Todo.CommentFound"> > <type>error</type> > </rule> > <rule ref="Squiz.Strings.DoubleQuoteUsage.ContainsVar"> > <type>warning</type> > </rule> > > I'm hoping that the next version will be out this week. If you can't wait, > you can try out the new version from github: > > git clone git://github.com/squizlabs/PHP_CodeSniffer.git > cd PHP_CodeSniffer > php scripts/phpcs ... Thanks for your quick answer! That's good news. Just one little further question: Why do you use elements rather than XML-Attributes for this? I'd expect something simliar to this: <rule ref="Squiz.Strings.DoubleQuoteUsage.ContainsVar" type="warning" /> To my mind, this is shorter and expresses that the type is a property of the referenced rule... I agree in using elements for parameters, i.e. a "parameter structure". But I'd add general properties as XML attributes in order to take full advantage of xml configuration files. Just my 2 cents :) Greetings Nico

« previous php.pear.general (#31661) next »