You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2020/03/18 00:15:33 UTC

[GitHub] [incubator-nuttx] adamfeuer commented on issue #583: [Do Not Merge] experimental clang-format code-formatting tool

adamfeuer commented on issue #583: [Do Not Merge] experimental clang-format code-formatting tool
URL: https://github.com/apache/incubator-nuttx/pull/583#issuecomment-600361350
 
 
   @davids5 here are some comments from Greg:
   
     * It is destroying indentation randomly (like line 71 of clock.h).
     * It is destroying the careful alignment of prototypes like line 90
       and beyond.
     * It removes all vertical alignment, some optional and some required.
     * This is crazy.  It moved a left bracket onto the same line as a
       definition (line 54 of clock_dow.c)
     * in clock_systimer.c, pre-processor definitions must not be indented
       when use in the code section (numerous places).
       https://cwiki.apache.org/confluence/display/NUTTX/Coding+Standard#indentation
     * in clock_systimespec.c, line 134.  The indentation was correct.  The
       tool ruined it.  Also line 142 it again destroys the proper
       alignment of the first line of C comment blocks. Numerous other places.
     * in clock_timekeeping.c, line 88 abd line 105 spurious destruction of
       vertical alignment.
     * And on an on..  There is too much there to review.
   
   <hr> 
   
   Some more comments from Greg:
   
   I mentioned in the previous email that the tools was screwing up
   vertifcal alignment is places where it is recommend and in places where
   is it required.  Here is an example of the later:
   
     * sched/irq/irq.h
       <https://github.com/apache/incubator-nuttx/compare/master...starcat-io:explore/clang-format-sched#diff-08538ebd3dc53f5f85f131c24c84be9d>,
       beginning at line 75 all veritical alignment of right hand comments
       lost.
   
   A few more:
   
     * clock_timespec_subtract.c
       <https://github.com/apache/incubator-nuttx/compare/master...starcat-io:explore/clang-format-sched#diff-906c272ac7c0b95506056c0c431ab276>,
       insanity at line 69.  Similar nonsense at group_setuid.c
       <https://github.com/apache/incubator-nuttx/compare/master...starcat-io:explore/clang-format-sched#diff-f39b80ac9e4440e2d2889ef55425f3ef>
       line 76, group_signal.c
       <https://github.com/apache/incubator-nuttx/compare/master...starcat-io:explore/clang-format-sched#diff-750c9acf01eefd4c69e3186ceb9519bd>
       , line 90 and other places
     * nx_smpstart.c,
       <https://github.com/apache/incubator-nuttx/compare/master...starcat-io:explore/clang-format-sched#diff-8195c6cbcb792a1f2e6b337039a1d111>line
       120, removes required spacing after semi-colon
     * It seems to screw up the indentation after any conditional logic. 
       Like nx_bringup.c
       <https://github.com/apache/incubator-nuttx/compare/master...starcat-io:explore/clang-format-sched#diff-9aa86408017fde10647798c88d4c62b0>,
       line 79-110
     * group_malloc.c,
       <https://github.com/apache/incubator-nuttx/compare/master...starcat-io:explore/clang-format-sched#diff-6cb24cb106c424372fc4dd44e55b8a07>line
       51, screw sup indentation of conditional.  also group_zalloc.c
       <https://github.com/apache/incubator-nuttx/compare/master...starcat-io:explore/clang-format-sched#diff-87884d55782f00d26a012863add30407>,
       line 47 and other places
     * group_setupidlefiles.c
       <https://github.com/apache/incubator-nuttx/compare/master...starcat-io:explore/clang-format-sched#diff-aa3bb2f5a7f4db9b96218e96098ea53c>,
       line 118 more destruction of indentation.  Also nx_bringup.c
       <https://github.com/apache/incubator-nuttx/compare/master...starcat-io:explore/clang-format-sched#diff-9aa86408017fde10647798c88d4c62b0>,
       line 74 and other places
     * nx_start.c
       <https://github.com/apache/incubator-nuttx/compare/master...starcat-io:explore/clang-format-sched#diff-e36621b38d26a5eeb9f0c9c779931e7b>
       , all braces trashed beginning at line 253.  Right alignment of all
       comments lost.
   

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


With regards,
Apache Git Services