Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Dec 7, 2021

Conversation

jcking
Copy link
Collaborator

@jcking jcking commented Nov 2, 2021

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
Copy link
Collaborator Author

jcking commented Nov 2, 2021

@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
Member

Does adding that file change anything in the current formatting?

@mike-lischke
Copy link
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