numam-spdk/.astylerc
Daniel Verkamp 59970a89be astyle: enforce braces around single-line statements
Require braces around all conditional statements, e.g.:

    if (cond)
        statement();

becomes:

    if (cond) {
        statement();
    }

This is the style used through most of the SPDK code, but several
exceptions crept in over time.  Add the astyle option to make sure we
are consistent.

Change-Id: I5a71980147fe8dfb471ff42e8bc06db2124a1a7f
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/390914
Reviewed-by: <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-12-11 11:19:32 -05:00

28 lines
778 B
Plaintext

# Bracket Style
style=kr # K&R brackets
add-braces # Add braces to one-line conditional statements
keep-one-line-blocks # Don't break blocks that are on one line
# Indentation
indent=force-tab=8 # Use tabs for indentation, spaces for minor alignment
min-conditional-indent=0
# Padding
unpad-paren # Remove all spaces with parens that aren't requested below
pad-oper # Put spaces around operators
pad-header # Put spaces between if/while/for etc. and the first paren
# Pointers
align-pointer=name # Align the * next to the variable name
# Line wrapping
max-code-length=100 # 100 character line limit
break-after-logical # For if statements, wrap to the next line after logical operator
# Line endings
lineend=linux # LF line endings
# General options
suffix=none
formatted