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

Update .clang-format #103

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

arcondello
Copy link
Member

@arcondello arcondello commented Oct 26, 2020

  • Change ColumnLimit to 80, otherwise it will try to use as much space as possible
  • Change AccessModifierOffset to -3 to make it consistent with Google style

See also #90

* Change ColumnLimit to 80, otherwise it will try to use as much
space as possible
* Change AccessModifierOffset: -3 to make it consistent with
Google style
NamespaceIndentation: Inner

# Scaled by a factor of 2 such that the base indent is 4
AccessModifierOffset: -2
AccessModifierOffset: -3
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is Google's style "indent by one", or "indent by half indent width"?

I have always interpreted it as the latter, but have never checked.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://google.github.io/styleguide/cppguide.html#Class_Format says "indent by 1", though of course they also say "indent by 2". FWIW, https://github.com/google/styleguide complains about private/public/etc being 2, but not about the overall indent being 4.

Copy link
Member

@randomir randomir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

80 char columns seem OK (especially after reading this). Not sure about the access modifier offset.

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.

None yet

2 participants