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/02/03 16:17:09 UTC

[GitHub] [incubator-nuttx] patacongo opened a new pull request #204: tools/nxstyle.c: Ignore inttypes.h constants.

patacongo opened a new pull request #204: tools/nxstyle.c:  Ignore inttypes.h constants.
URL: https://github.com/apache/incubator-nuttx/pull/204
 
 
   Eliminate warnings.  Ignore mixed case identifies beginning with PRIx.
   These most likely come from inttypes.h and we nxstyle must tolerate
   those definitions even though they do not follow the coding style.

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

[GitHub] [incubator-nuttx] patacongo commented on a change in pull request #204: tools/nxstyle.c: Ignore inttypes.h constants.

Posted by GitBox <gi...@apache.org>.
patacongo commented on a change in pull request #204: tools/nxstyle.c:  Ignore inttypes.h constants.
URL: https://github.com/apache/incubator-nuttx/pull/204#discussion_r374301101
 
 

 ##########
 File path: tools/nxstyle.c
 ##########
 @@ -1265,27 +1265,38 @@ int main(int argc, char **argv, char **envp)
 
               if (have_upper && have_lower)
                 {
+                  /* REVISIT:  Although pre-processor definitions are
+                   * supposed to be all upper-case, there are exceptions
+                   * such as using 'p' for a decimal point or 'MHz'.
+                   * Those will be reported here, but probably should be
+                   * considered false alarms.
+                   */
+
+                  /* Ignore inttype.h strings beginning with PRIx */
+
+                  if (ident_index >= 4 &&
+                     (strncmp(&line[ident_index], "PRIx", 4) == 0))
+                    {
+                      /* No error */
+                    }
+
 
 Review comment:
   This exception in nxstyle is because of standard definitionss that do not follow the coding style.
   No nonstandard definitions should be grandfathered in; such definitions should eventually be changed to follow the coding standard.  Let's not formalize coding standard violations.  Let's fix them.

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

[GitHub] [incubator-nuttx] davids5 commented on a change in pull request #204: tools/nxstyle.c: Ignore inttypes.h constants.

Posted by GitBox <gi...@apache.org>.
davids5 commented on a change in pull request #204: tools/nxstyle.c:  Ignore inttypes.h constants.
URL: https://github.com/apache/incubator-nuttx/pull/204#discussion_r374286827
 
 

 ##########
 File path: tools/nxstyle.c
 ##########
 @@ -1265,27 +1265,38 @@ int main(int argc, char **argv, char **envp)
 
               if (have_upper && have_lower)
                 {
+                  /* REVISIT:  Although pre-processor definitions are
+                   * supposed to be all upper-case, there are exceptions
+                   * such as using 'p' for a decimal point or 'MHz'.
+                   * Those will be reported here, but probably should be
+                   * considered false alarms.
+                   */
+
+                  /* Ignore inttype.h strings beginning with PRIx */
+
+                  if (ident_index >= 4 &&
+                     (strncmp(&line[ident_index], "PRIx", 4) == 0))
+                    {
+                      /* No error */
+                    }
+
 
 Review comment:
   We have some SD card constants and the like that are in the code base. Do they stay? If so adding an allowed words (grandfathered) table  may be of use 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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-nuttx] Ouss4 merged pull request #204: tools/nxstyle.c: Ignore inttypes.h constants.

Posted by GitBox <gi...@apache.org>.
Ouss4 merged pull request #204: tools/nxstyle.c:  Ignore inttypes.h constants.
URL: https://github.com/apache/incubator-nuttx/pull/204
 
 
   

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