summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonovan Baarda <abo@minkirri.apana.org.au>2018-02-19 22:37:21 +1100
committerDonovan Baarda <abo@minkirri.apana.org.au>2018-02-19 22:37:21 +1100
commit69049cec2fd053e982e6ae83155d4506e05d1f37 (patch)
tree59bdb4e681184f4e808643ee8b840b418b22bcad
parentd5507b676423f41485589ac5bf1b8a3824ce6034 (diff)
downloadlibrsync-69049cec2fd053e982e6ae83155d4506e05d1f37.tar.gz
For tidy add -sob and make sed remove trailing whitespace.
-rw-r--r--CMakeLists.txt9
1 files changed, 5 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 80d0ca0..0c162a5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -229,10 +229,11 @@ add_custom_target(tidy
# format them correctly. Rather than do that, we just postprocess with sed.
#
# Linux format with no tabs, indent 4, 120 wide code, 80 wide comments, format column1 comments.
- COMMAND indent -linux -nut -i4 -l120 -lc80 -fc1 -fca -T FILE -T Rollsum -T rs_result ${tidy_SRCS}
- # Remove space between * or & and identifier after userdefined types, and
- # remove space after type cast for userdefined types like indent -ncs.
- COMMAND sed -r -i "s:((${TYPE_RE}|${CAST_RE}) (&|\\*+)) :\\1:g; s:(${CAST_RE}) :\\1:g;" ${tidy_SRCS}
+ COMMAND indent -linux -nut -i4 -l120 -lc80 -fc1 -fca -sob -T FILE -T Rollsum -T rs_result ${tidy_SRCS}
+ # Remove space between * or & and identifier after userdefined types,
+ # remove space after type cast for userdefined types like indent -ncs,
+ #and remove trailing whitespace.
+ COMMAND sed -r -i "s:((${TYPE_RE}|${CAST_RE}) (&|\\*+)) :\\1:g; s:(${CAST_RE}) :\\1:g; s:\\s+$::" ${tidy_SRCS}
VERBATIM
)
# Code tidyc target to reformat all code and comments with https://github.com/dbaarda/tidyc.