LuchianMihai commented on code in PR #15847: URL: https://github.com/apache/nuttx/pull/15847#discussion_r1957370313
########## tools/nxstyle.c: ########## @@ -2042,6 +2033,17 @@ int main(int argc, char **argv, char **envp) { bswitch = true; } + else if (strncmp(&line[indent], "switch(", 7) == 0) + { + ERROR("Missing whitespace after keyword", lineno, n); + + bswitch = true; + } + else if (strncmp(&line[indent], "case ", 5) == 0 || + strncmp(&line[indent], "default ", 8) == 0) Review Comment: I see this as an example in the documentation ```c switch (...) { case 1: /* Example of a comment following a case selector. */ ... /* Example of a comment preceding a case selector. */ case 2: { /* Example of comment following the case selector. */ int value; ... } break; default: break; } ``` So I guess no space after default keyword -- 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. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org