nuttx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-nuttx] patacongo edited a comment on pull request #1079: nxstyle: Fix distinction be source and header file for long lines.
Date Tue, 19 May 2020 23:59:06 GMT

patacongo edited a comment on pull request #1079:
URL: https://github.com/apache/incubator-nuttx/pull/1079#issuecomment-631144775


   > The reason was this:
   > 
   > In past conversation you had told me that readability was more important than line
length and that long lines were OK in arch headers. The code base reflected that.
   
   I have no recollection of that in the past.  But we cut a lot of corners in the past that
we no longer do.
   
   > It is sad to me that the code has become less readable and information has been removed
to accommodate the line length. I took pride in following your tradition of reflecting the
datasheets in the headers.
   
   This I disagree with 1000%.  The headers should not duplicate all of the information in
the datasheets.  That is just wrong.  Comments should simply identify the field.  Look in
the data sheet if you want a long detailed description.  Don't force it to the right side
of a #define.  That is hideous.
   
   That was never a tradition.  The tradition is the coding standard.  I quote:  "Comments
to the Right of Statements. Comments to the right of statements in C source files are _discouraged_.
If such comments are used, they should be (1)  _very short so that they do not exceed the
line width_  (typically 78 characters), (2) fit on one line, and (3) be aligned so that the
comment begins in the same comment on each line."  https://cwiki.apache.org/confluence/display/NUTTX/Coding+Standard#comments
   
   That is the tradition.  That is the standard for right hand comments that has existed for
10 years or so.  One thing we don't follow now is _fit on one line_.  There are plenty of
long multi-line comments to the right in the code base.  
   
   @hartmannathan I am sure you noticed the typo "be aligned so that the comment begins in
the same _comment_ on each line."  Of course that should have been _column_.  I bet that made
you cringe.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



Mime
View raw message