Open bijayrungta opened 10 years ago
In the PHP_CodeSniffer such case is handled as you're suggesting: https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer.php#L1754-L1816
@schmittjoh you can actually took camel caps validation logic from there.
Thanks @aik099 But how can we set this rule in Scrutinizer?
Theoretically, this should be done automatically for you. We will have a look.
On Fri, Jun 27, 2014 at 12:14 AM, Bija Rungta notifications@github.com wrote:
Thanks @aik099 https://github.com/aik099 But how can we set this rule in Scrutinizer?
— Reply to this email directly or view it on GitHub https://github.com/scrutinizer-ci/scrutinizer/issues/223#issuecomment-47287080 .
@schmittjoh , the @bijayrungta probably meant, that PHP Analyzer camel caps detection rules doesn't cover all edge cases, like it's done in PHP CodeSniffer.
I think its better to use Caps for a Word which in itself is an abbreviation. (Maybe upto 2-3 Characters only)
Here the Function name was isCBEnabled, whee CB is an abbreviation.
Or this could be an Option to opt in/allow this.
see Issue (Id: Generic.NamingConventions.CamelCapsFunctionName.NotCamelCaps)