Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 3.5.3

Request #20299 Inline comment sniff forces empty line after post statement comment
Submitted: 2014-06-17 15:20 UTC
From: aik099 Assigned: squiz
Status: Closed Package: PHP_CodeSniffer (version 1.5.3)
PHP Version: 5.4.20 OS: Linux
Roadmaps: (Not assigned)    
Subscription  


 [2014-06-17 15:20 UTC] aik099 (Alexander Obuhovich)
Description: ------------ In following code the inline comment sniff is complaining, that there must be no empty line after inline comment: ---code begin--- $some_var = 'something'; // This is cool var. echo 'cool'; ---code end--- I think that empty line check after inline comment should only be applied when the inline comment is the only thing there is on that line. For case, when I place inline comment after other code (so they are on same line) no such checks needs to be performed.

Comments

 [2014-06-24 11:33 UTC] squiz (Greg Sherwood)
-Summary: Inline comment sniff empty line error +Summary: Inline comment sniff forces empty line after post statement comment -Type: Bug +Type: Feature/Change Request -Assigned To: +Assigned To: squiz
 [2014-06-24 11:34 UTC] squiz (Greg Sherwood)
-Status: Assigned +Status: Closed
I think that is a fair change. I've committed it here: https://github.com/squizlabs/PHP_CodeSniffer/commit/d04c71c41a4ade139e9162163 6450ead755ac502