xiaoxiang781216 commented on a change in pull request #12: nxstyle improvements with No tooling URL: https://github.com/apache/incubator-nuttx/pull/12#discussion_r361989296
########## File path: tools/nxstyle.c ########## @@ -135,67 +211,98 @@ int main(int argc, char **argv, char **envp) int externc_lineno; /* Last line where 'extern "C"' declared */ int linelen; /* Length of the line */ int maxline; /* Lines longer that this generate warnings */ + bool silent; /* Used with go not go test option */ int n; int i; + int c; + extern char *optarg; + extern int optopt; + extern int optind; - maxline = 78; - filename = argv[1]; + g_gonogo = false; + maxline = 78; + filename = argv[1]; + silent = false; Review comment: 1.remove filename assignment: not valid, and dup with 275 2.change maxline to g_maxline? let's make all command line option to global for consistence 3.Can we merge g_gonogo and silient into one(e.g. g_verbose)? g_verbose == 0, no output g_verbose == 1, PASS/FAIL g_verbose == 2, each fail line 4.Move the assignment to variable definition: static int g_verbose = 2; static int g_maxline = 78; .... ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services