Nick: dhendrix E-mail: none Board: Example for CB:43602 Contents: This is intended to demonstrate CB:43602 $ cat foo.c int foo(void) { int x; /* hlelo world */ for(x=0; x< 5; x ++) printf( "foo" ) ; return 0; } $ git add foo.c && time git commit -sm "foo" Replacing all version templates with v1.2-75-gc9904ea-dirty. Checking that VCS 'staged' source conforms to coding style ======== The following differences were found between the code to commit and the clang-format rules: --- a/foo.c 2020-07-21 21:20:11.453320809 -0700 +++ b/foo.c 2020-07-21 21:20:17.075913065 -0700 @@ -3,7 +3,7 @@ int x; /* hlelo world */ - for(x=0; x< 5; x ++) - printf( "foo" ) ; -return 0; + for (x = 0; x < 5; x++) + printf("foo"); + return 0; } You can apply these changes with: git apply /tmp/pre-commit-clang-format-1595391617.patch (may need to be called from the root directory of your repository) ======== Running checkpatch ERROR: spaces required around that '=' (ctx:VxV) #12: FILE: foo.c:6: + for(x=0; x< 5; x ++) ^ ERROR: spaces required around that '<' (ctx:VxW) #12: FILE: foo.c:6: + for(x=0; x< 5; x ++) ^ ERROR: space prohibited before that '++' (ctx:WxB) #12: FILE: foo.c:6: + for(x=0; x< 5; x ++) ^ ERROR: space required before the open parenthesis '(' #12: FILE: foo.c:6: + for(x=0; x< 5; x ++) WARNING: space prohibited before semicolon #13: FILE: foo.c:7: + printf( "foo" ) ; ERROR: space prohibited after that open parenthesis '(' #13: FILE: foo.c:7: + printf( "foo" ) ; ERROR: space prohibited before that close parenthesis ')' #13: FILE: foo.c:7: + printf( "foo" ) ; total: 6 errors, 1 warnings, 9 lines checked Please consider fixing these issues. [checkpatch 5ac87b8] foo 1 file changed, 9 insertions(+) create mode 100644 foo.c