From 716f3366fcf2162549ec979126ee7415320e952b Mon Sep 17 00:00:00 2001 From: dehnert Date: Wed, 4 Dec 2013 10:30:22 +0100 Subject: [PATCH] Added configuration file for astyle (a code-formatting tool) that is tailored to our formatting style. Former-commit-id: ba2f428b6f19932464516e5408431212e03cdda7 --- util/astyle/options.astyle | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 util/astyle/options.astyle diff --git a/util/astyle/options.astyle b/util/astyle/options.astyle new file mode 100644 index 000000000..5f02d356d --- /dev/null +++ b/util/astyle/options.astyle @@ -0,0 +1,34 @@ +# Select overall style. +--style=google +--mode=c +--recursive + +# Attach brackets to namespaces and classes. +--attach-namespaces +--attach-classes + +# Of course, namespaces should also be indented. +--indent-namespaces + +# C++ comments starting in column 1 are also supposed to be indented properly. +--indent-col1-comments + +# Add space padding around operators. +--pad-oper + +# Put the pointer/reference operators next to the variable. +--align-pointer=type + +# Add brackets to conditional one-line statements. +--add-brackets + +# Convert tabs to spaces in non-indentation part of the line as well. +--convert-tabs + +# Remove spaces in definition of C++ templates. +--close-templates + +# Don't let lines get too long. +--max-code-length=140 + +--verbose