xiaoxiang781216 commented on a change in pull request #12: nxstyle improvements with No tooling URL: https://github.com/apache/incubator-nuttx/pull/12#discussion_r362020748
########## File path: tools/nxstyle.c ########## @@ -669,25 +757,25 @@ int main(int argc, char **argv, char **envp) { if (!btabs) { - fprintf(stderr, "TABs found. First detected at line %d:%d\n", - lineno, n); + ERROR("TABs found. First detected", lineno, n); btabs = true; } } else if (line[n] == '\r') { if (!bcrs) { - fprintf(stderr, "Carriage returns found. " - "First detected at line %d:%d\n", lineno, n); + ERROR("Carriage returns found. " + "First detected", lineno, n); bcrs = true; } } else if (line[n] != ' ') { - fprintf(stderr, - "Unexpected white space character %02x found at line %d:%d\n", - line[n], lineno, n); + snprintf(buffer, sizeof(buffer), Review comment: Why format to buffer first? can we call ERROR directly? ---------------------------------------------------------------- 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