hamlib/scripts/astylerc
Nate Bargmann 022ba0f48b Add preferred astylerc configuration
Astyle is a code formatting utility that can quickly reformat a source
file based on the settings of its configuration file.  The added
configuration file will format to a style mostly consistent with the
Linux Kernel Style guide:

https://www.kernel.org/doc/Documentation/CodingStyle

While conformance to this document is not the goal, it supplies a
reasonable set of guidelines to be used in Hamlib.
2016-02-14 13:40:35 -06:00

32 lines
885 B
Text

# astylerc--custom options for astyle
# Intended to follow the Linux style guide as closely as possible:
# https://www.kernel.org/doc/Documentation/CodingStyle
# Linux kernel style formatting/indenting.
style=linux
# Use tabs with a width of 8 spaces.
indent=force-tab=8
# Pad empty lines around header blocks (e.g. 'if', 'for', 'while'...).
break-blocks
# Remove extra space padding around parenthesis on the inside and outside.
unpad-paren
# Insert space padding around operators.
pad-oper
# Insert space padding after paren headers only (e.g. 'if', 'for', 'while'...).
pad-header
# Attach a pointer operator (*) to name (name) and reference operator (&)
# to type (type).
align-pointer=name
align-reference=type
# Don't break one-line blocks.
keep-one-line-blocks
# Don't break complex statements and multiple statements residing on a single line.
keep-one-line-statements