LuchianMihai commented on PR #2501:
URL: https://github.com/apache/nuttx-apps/pull/2501#issuecomment-2298051446

   Strictly regarding the [C Coding 
Standard](https://nuttx.apache.org/docs/latest/contributing/coding_style.html), 
is stated that the:
   
   > Comments to the right of statements in C source files are discouraged.
   
   > Indentation Comments should, typically, be placed before the code section 
to which they apply. The comment indentation should be the same as the follow 
indentation rules as the following code (if applicable).
   
   Now there is nothing explicitly stating that there should not be comments to 
the right of __if statements__, but I saw no comment at the right of the 
statement throughout the examples given there (in C Coding Standard page).
   
   My change will report an error if there is anything to the right of the 
statement, because checking that the comment is correctly formatted (as the 
comment should be indented accordingly) would be harder, and maybe not worth 
the time penalty for checking that corner case. Maybe we can report this as an 
warning?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to