Skip to content

Add .clang-format file to ensure consistent style of C++ - #3337

Merged
parrt merged 1 commit into
antlr:masterfrom
jcking:clang-format
Dec 7, 2021
Merged

parrt merged 1 commit into
antlr:masterfrom
jcking:clang-format

Conversation

@jcking

@jcking jcking commented Nov 2, 2021

Copy link
Copy Markdown
Collaborator

This change adds a .clang-format file to the root directory to enable consistent styling of C++. It disables all languages except C++ for now (unless we decide to use clang-format for other languages as well). I based it off of LLVM and forced right alignment for pointers and references. It seems to be pretty close, however we can always tweak it going forward as it is very configurable. https://clang.llvm.org/docs/ClangFormatStyleOptions.html

@jcking

jcking commented Nov 2, 2021

Copy link
Copy Markdown
Collaborator Author

@mike-lischke Adds .clang-format configuration so we can get consistent formatting without having to think to much about it. ANTLR can tweak it as we go along and identify things we do not like.

@mike-lischke

Copy link
Copy Markdown
Member

Does adding that file change anything in the current formatting?

@mike-lischke

Copy link
Copy Markdown
Member

@parrt Another C++ patch ready for merging.

@parrt parrt added this to the 4.9.4 milestone Dec 7, 2021
@parrt
parrt merged commit 4318037 into antlr:master Dec 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants