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

   > Hi @xiaoxiang781216 , @acassis
   > 
   > 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).
   > 
   
   @patacongo @acassis what's your opinion?
   
   > 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?
   
   The code base is large, new check will break many codes which pass the ci 
before. So, we need be more conservative here.


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