raiden00pl opened a new pull request, #19920: URL: https://github.com/apache/nuttx/pull/19920
## Summary The standard requires braces after 'if', 'else', 'while', 'for' and 'do' even when the body is a single statement. Nothing checked this. First commit from https://github.com/apache/nuttx/pull/19555 There are many violations of this rule upstream, none of them are fixed in this PR ## Impact missing coding style check in nxstyle ## Testing before this change, lines like below was accepted: ``` 43 if (1) continue; 44 45 while (1) continue; 46 47 if (1) 48 continue; 49 50 while (1) 51 continue; 52 ``` with this change nxstyle return errors: ``` /home/raiden00/git/RTOS/nuttx/nuttx-nxstyle-fixes/test.c:43:9: error: Statement on same line as 'if' /home/raiden00/git/RTOS/nuttx/nuttx-nxstyle-fixes/test.c:45:12: error: Statement on same line as 'while' /home/raiden00/git/RTOS/nuttx/nuttx-nxstyle-fixes/test.c:48:4: error: Missing braces after 'if' /home/raiden00/git/RTOS/nuttx/nuttx-nxstyle-fixes/test.c:51:4: error: Missing braces after 'while' ``` -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
