Commit Graph

4 Commits

Author SHA1 Message Date
Daniel Verkamp
ac1818748c astyle: change "add-braces" to "j" for compatibility
Older astyle releases called this option "add-brackets" ("add-braces"
was added in astyle 3.0), so for compatibility with both, use the short
option name (-j), which is the same in both.

Change-Id: If6ee3065281219d84549f93588079bf0f1f947a2
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/391477
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-12-13 21:23:27 -05:00
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
Daniel Verkamp
fb87f80c20 scripts/check_format.sh: only check tracked files
Change-Id: Ie6370bbcbcf08cb365ac54f53e8794ecdcbdedd9
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-04-26 16:35:34 -07:00
Daniel Verkamp
7004492324 build: check formatting with astyle
Change-Id: Ic09b4dd7ccccb557e8236fc0b7e3105fce1644b3
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2015-09-23 09:05:51 -07:00