Perform auto formatting with microsofts auto formatter on the three e… #2308
+2,770
−2,379
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Free-form text area
Please describe what your PR is adding in terms of features or bugfixes:
This PR proposes to use an established auto formatter for C code, and then applying said formatter in components.
This is of course only possible by treating each different section (TRACE SHARE etc.) as its own little C code.
I propose this in order to improve the readability of the larger components after multiple people with different editors have changed indenting and therefore arrive at inconsistent indenting.
I do not have a strong opinion of which formatter to use, nor which style to set it to. What is important to me, is to make it easy to have a properly indented code to work on.
For this PR I initially used the formatter bundled with the Visual Studio code extension C/C++ from microsoft which is the clang-format tool.
A brief google search indicates that Astyle is another option, if we want something that is not heavily supported by apple or microsoft.
Examples of the microsoft formatter applied to code is in this pull request the Monochromator_bent.comp, Monochromator_bent_complex.comp and Union_mesh.comp.
My contribution contains something else