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 19:12:25 UTC

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

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