Skip to content

Apply a consistent format across the repo#246

Open
caitlinross wants to merge 6 commits into
masterfrom
clang-format
Open

Apply a consistent format across the repo#246
caitlinross wants to merge 6 commits into
masterfrom
clang-format

Conversation

@caitlinross

Copy link
Copy Markdown
Member

The formatting is highly inconsistent across the whole repo. Many files also have vim/emacs modelines. Every time I want to make an edit in a file, my editor wants to apply a ton of changes which is very annoying and makes it difficult to look at diffs. So I removed the modelines, and formatted the code using clang-format. There is also now a clang-format check in CI so we can enforce this in PRs.

I also added the two commits making these changes to a file that will make git blame ignore these code changes so git blame is still useful.

I also added some info on code formatting to the README. It explains how to set up your editor to use clang-format as well as how to run it manually.

clang-format is now the single source of truth for layout, so the
per-file modelines (118 of them, all variations of 'Local variables: /
c-indent-level / vim: ts=8 sts=4 ...') are obsolete and would conflict
with .clang-format if their values ever drifted. Pure deletions
across 118 files; no code touched.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant