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
lots of indent errors #7869
Comments
hello @hiroMTB! since last year there is a .clang-format file in the repository. it follows pretty well the previous formatting, with a little bit more spaces around some markers. about auto-formatting, there was sort of a "soft decision" made not to blanket the git history with a "clang-format" white-space commits, but to reformat when a file needs a change (the commits being squashed, it can be performed as a separate commit in for the PR review, but it will no show up in the final history/blame (and the whitespace exclusion in git works relatively well to not register as "changes")). also sometimes macros and "nicely indented data tables" are better to exclude from clang-format, which means a manual review is always preferable after a reformat. there are different ways to apply the formatting; the |
Wow! Thank you for your detailed explanation. I will try clang-format and automator. if we rely on manual review, probably we will keep seeing indent errors for future. But I can understand your point too. |
it would be great to format the entire core in one PR, but this has the potential to break a lot of PRs. |
oh! I see, good point! |
well when I looked last year nothing clear was found, and I subscribed here NVIDIA/stdexec#905 thinking that when @ericniebler figures it out we can evaluate their choices... |
clang-format is definitely the way. However it does not explicitly support A Style.
|
I found quite lots of indent errors like below. Those are only part of it.
Is there a way to auto-formating code before PR or each commit?
openFrameworks/libs/openFrameworks/3d/of3dPrimitives.cpp
Lines 111 to 113 in 2b8cab2
openFrameworks/libs/openFrameworks/3d/of3dPrimitives.cpp
Lines 170 to 179 in 2b8cab2
openFrameworks/libs/openFrameworks/app/ofAppGlutWindow.cpp
Lines 30 to 46 in 2b8cab2
openFrameworks/libs/openFrameworks/app/ofAppGLFWWindow.cpp
Lines 76 to 81 in 2b8cab2
openFrameworks/libs/openFrameworks/app/ofAppGLFWWindow.cpp
Lines 383 to 389 in 2b8cab2
openFrameworks/libs/openFrameworks/app/ofAppNoWindow.cpp
Lines 32 to 41 in 2b8cab2
openFrameworks/libs/openFrameworks/app/ofAppNoWindow.h
Lines 37 to 43 in 2b8cab2
openFrameworks/libs/openFrameworks/graphics/of3dGraphics.cpp
Lines 13 to 18 in 2b8cab2
The text was updated successfully, but these errors were encountered: