On 05/09/2016 01:48 PM, Daniel Pfeifer wrote:
> "AllowShortFunctionsOnASingleLine: Inline" is default in the Mozilla
> preset. This line can be removed.
Yes, thanks.
> What is your rationale for "IndentCaseLabels: false"? I find that
> indenting them increases readability when switch statements use
> hanging braces. If the opening "{" is on a separate line, indenting
> the labels does not improve readability that much.
I experimented with it and liked the reduced horizontal space usage,
especially given the column limit. However I see you're right about
this case:
switch (x) {
case 1: {
} break;
default: {
}
}
versus
switch (x) {
case 1: {
} break;
default: {
}
}
We can drop that line.
> What is the rationale for "ColumnLimit: 79"? To make a line fit on old
> school terminals, 80 should be OK. To make a diff or an email response
> fit on old school terminals, two extra spaces are reserved. That leads
> to a column limit of 78. Where does 79 come from?
That has been CMake's limit for a long time. Since we're changing the
style anyway we might as well go with the more common 80 chars that is
default in the Mozilla style.
This brings us to:
---
# This configuration requires clang-format 3.8 or higher.
BasedOnStyle: Mozilla
AlignOperands: false
AlwaysBreakAfterReturnType: None
AlwaysBreakAfterDefinitionReturnType: None
Standard: Cpp03
...
-Brad
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers