Updated to use Google style for formatting #307
Merged
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.
This PR contains the result of running just
clang-format style=Google
on the usgscsm code. This standardizes spacing, bracket-placement, header-ordering, max line length, etc, but doesn't contain changes resulting from static analysis andcpplint
does still find some additional changes that need to be made by hand. (I'm not sure if these additional changes should be in this PR or a subsequent one. I was leaning toward a subsequent one just so the automated changes and hand-changes could be in separate PRs. The changes left to be made are a much smaller list than the changes in this PR.)I tested a few formats, and picked Google style because I somewhat arbitrarily liked the way the results looked the best. I have results locally for the following formats if anyone would like to see some alternatives: LLVM, GNU, Mozilla, Chromium, WebKit. I picked these to test because
clang-format
could automatically fix code to follow these standards. I'm also open to other "auto-fix formatting" tools if anyone has any other suggestions!