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

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  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 20 - 4 = ?

 
 [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