Linnk / Allman_CodeSniffer

Allman CodeSniffer & Kind of my own personal standards
Other
11 stars 4 forks source link

Issues with ControlSignatureSniff #5

Open roeycohen opened 3 months ago

roeycohen commented 3 months ago

Hi, found some issues in ControlSignatureSniff:

  1. 'while' statements don't fix well without curly braces:
while (true)
     do('something');

will be fixed like this:

while (true) do('something')
  1. comments after 'if' statement will show errors, for example:
    if (true) //some comment
    {
    do('something');
    }

don't know if you're willing to fix this, but I guess it could be nice :) Thanks, Roey