Use consistent code formatting in src cpp files #1214
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.
Update
.editorconfig
with rules for.cpp
files in thesrc
directory and fix code formatting issues in those files.Of the 84
.cpp
files within thesrc
directory, about 30 of them were formatted with tabs for the majority of the file. So I added this rule in.editorconfig
to make 4 spaces the default indentation style for.cpp
files in thesrc
directory:For the most part, if a file had a mix of spaces and tabs for indentation, I'd use the indentation style which was used for the majority of lines in that file. For instance, if a file was mostly using spaces for indentation, I'd make sure that
.editorconfig
statesindent_style = space
for that file and I'd convert all the tabs to spaces in that file.To run editorconfig-checker on the files that pertain to this pull request and verify that they now obey all the rules defined for them in
.editorconfig
: