summaryrefslogtreecommitdiffstats
path: root/.clang-format-2
Commit message (Collapse)AuthorAgeFilesLines
* Move clang-formats to build.Steven Moreland2019-01-181-9/+1
| | | | | | | | So they can be used by more projects. Bug: 122835115 Test: manual Change-Id: Ifda92ea584e80eeffc3fc8b7fcc6c67cae4156d6
* Remove PenaltyExcessCharacter from clang-formats.Christopher Ferris2018-07-191-1/+0
| | | | | | | | | This option can cause the number of columns to exceed 100. Bug: 111310533 Test: NA Change-Id: Icbda1ba9afbf68a29f2a13082df6ca65af3c0f37
* Only allow short functions in class definitions.Christopher Ferris2017-03-281-0/+1
| | | | | | | | | The previous rules would force short functions to be on a single line. This change only allows single function lines in class definitions. Test: Ran on a CL and verified single line functions only allowed in Test: class defintions. Change-Id: I5422543fdbb39da842bbd799c19fe2c443ff483c
* Remove extraneous .clang-format filesTom Cherry2017-03-141-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The .clang-format files in the base, debuggerd, adb, libprocinfo, and fastboot subdirectories each differ slightly from the top level .clang-format-2 and .clang-format-4, but not in a substantially meaningful way, as the source files in those directories have not been re-formatted with clang-format. Therefore, let's reduce the differences and use only the two top level clang-format files. Secondly perform some small clean-up of the top level .clang-format files. AllowShortBlocksOnASingleLine is already false in the Google style, so it can be removed. AllowShortFunctionsOnASingleLine should not change between the -2 and -4 versions, so leave it at the Google default style in both, which is 'All'. The diff stats for these changes are: ./base/ Old: 640 insertions(+), 531 deletions(-) New: 563 insertions(+), 808 deletions(-) ./debuggerd/ Old: 910 insertions(+), 886 deletions(-) New: 991 insertions(+), 1023 deletions(-) ./adb/ Old: 2623 insertions(+), 2886 deletions(-) New: 2655 insertions(+), 3103 deletions(-) ./libprocinfo/ Old: 2 insertions(+), 1 deletion(-) New: 4 insertions(+), 18 deletions(-) ./fastboot/ Old: 618 insertions(+), 743 deletions(-) New: 726 insertions(+), 882 deletions(-) ./init/ Old: 1755 insertions(+), 1866 deletions(-) New: 1715 insertions(+), 1952 deletions(-) Test: Above clang-format stats Change-Id: I3f7b8ab0660c8394c5008ba95ea15e70dd22b55b
* Add a 2 width option of clang format.Christopher Ferris2017-03-101-0/+13
Make the default the 4 tab space version. Add a link to the 2 space version for libbacktrace. The only other difference between the 4 space and 2 space tab version is that the 2 space tab version allows short functions on a single line. This is for things like constructors, short destructors, or accessor functions. I believe this is closer to the Google C++ style guide. Bug: 36046320 Test: NA Change-Id: Ida08db18902eeb101f42869dd5590182529d54ef