@@ -54,17 +54,26 @@ EOF
# 1 Source file
#
function tool_c_style() {
- astyle --options=none --lineend=linux --mode=c \
- --style=linux \
- --indent=force-tab=8 \
- --indent-col1-comments \
- --min-conditional-indent=0 \
- --max-continuation-indent=80 \
- --pad-oper \
- --align-pointer=name \
- --align-reference=name \
- --max-code-length=80 \
- --break-after-logical < "$1"
+ # filter on astyle version
+ case "$(astyle -V)" in
+ "Artistic Style Version 3.6.3")
+ # continuation lines indented vs aligned
+ cat "$1"
+ ;;
+ *)
+ astyle --options=none --lineend=linux --mode=c \
+ --style=linux \
+ --indent=force-tab=8 \
+ --indent-col1-comments \
+ --min-conditional-indent=0 \
+ --max-continuation-indent=80 \
+ --pad-oper \
+ --align-pointer=name \
+ --align-reference=name \
+ --max-code-length=80 \
+ --break-after-logical < "$1"
+ ;;
+ esac
}
#
Create a list of known bad versions of astyle and ignore them. Signed-off-by: Paul Moore <paul@paul-moore.com> --- tools/check-syntax | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-)