scrutinizer-ci / scrutinizer

Legacy repository - archives past feature requests/bug reports
https://scrutinizer-ci.com/docs
140 stars 36 forks source link

Suggestion: Improvements in Coding Style Feedback for camel caps format functions. #223

Open bijayrungta opened 10 years ago

bijayrungta commented 10 years ago

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)

aik099 commented 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.

bijayrungta commented 10 years ago

Thanks @aik099 But how can we set this rule in Scrutinizer?

schmittjoh commented 10 years ago

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 .

aik099 commented 10 years ago

@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.