-
Notifications
You must be signed in to change notification settings - Fork 370
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inconsistent formatting since clang-format 9 merge #2276
Comments
I noticed that the build log shows that clang-format-11 is used on Github: https://github.com/mlober/nest-simulator/runs/4941813778?check_suite_focus=true#step:9:4002 Since different clang-format versions have slightly different built-in rules, this might be the problem. Which version of clang-format did you use for the local check on your computer? @jougs Could the problem be that nest-simulator/build_support/ci_build.sh Line 97 in b50d76f
|
On my computer, I checked with clang-format version 10 and fixed one of the files. After pushing it, the checks on github worked again. So for this particular file at least, the formatting of clang-format 10 and 11 (as you said) should be the same. |
Our logic concerning clang-format is different: The code should conform to clang-format-9. We just need to fix the way we run it on Github. |
I see the issue with the files. Some functions in them are formatted to the new standard and some are not. nest-simulator/nestkernel/nest_time.h Line 618 in b50d76f
|
@terhorstd and myself are working towards a solution, where each static code analysis check is its own job and all files are checked continuously instead of only the changed ones. That should eliminate the problem of new changes shadowing formatting errors in previously made changes, but will still take a bit of time until it's in a mergeable state. Regarding the issue of not specifying the version in clang-format in our build-scripts on the CI, I created #2279 that again nails down the version of |
Describe the bug
Found files with inconsistent formatting:
To Reproduce
Steps to reproduce the behavior:
checkout to master and run clang-format on any of the files above.
in terminal:
diff -u nestkernel/node_collection.h /dev/stdin <<<$(clang-format nestkernel/node_collection.h)
Expected behavior
No difference when running clang-format on the (untouched) files above.
Desktop/Environment (please complete the following information):
Additional context
see static tests failing here: https://github.com/mlober/nest-simulator/runs/4941813778?check_suite_focus=true
After fixing the formatting of one of the files, the static checks on github ran perfectly, even though the other files were still broken --> The testsuit seems to only check for changes (?)
The text was updated successfully, but these errors were encountered: