summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonovan Baarda <abo@minkirri.apana.org.au>2018-02-23 15:19:47 +1100
committerDonovan Baarda <abo@minkirri.apana.org.au>2018-02-23 15:19:47 +1100
commitcc0e89b8b26ba1c2a7c5eaf9b2c0bbad056b9764 (patch)
treee4892f21235f35664cab898d7d645ea00c3c8af0
parent5f14b81376b3dafce8e09373e6dadd2a78e94eb3 (diff)
downloadlibrsync-cc0e89b8b26ba1c2a7c5eaf9b2c0bbad056b9764.tar.gz
Change tidy and tidyc targets to have -l80 -ppi2.
-rw-r--r--CMakeLists.txt8
1 files changed, 4 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8796e94..14936b5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -230,8 +230,8 @@ add_custom_target(tidy
#
# Hide the enclosing 'extern "C" {...}' block for indenting in librsync.h
COMMAND sed -r -i "s:^(extern \"C\") \\{:\\1;:; s:^\\}(\\s+/\\* extern \"C\" \\*/):;\\1:" src/librsync.h
- # 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 -sob -T FILE -T Rollsum -T rs_result ${tidy_SRCS}
+ # Linux format with no tabs, indent 4, preproc indent 2, 80 columns, format comments, swallow blank lines.
+ COMMAND indent -linux -nut -i4 -ppi2 -l80 -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.
@@ -243,8 +243,8 @@ add_custom_target(tidy
# Code tidyc target to reformat all code and comments with https://github.com/dbaarda/tidyc.
add_custom_target(tidyc
COMMENT "Reformatting all code and comments to preferred coding style."
- # Recomended format, reformat linebreaks, reformat comments, reformat docbook, docbook autobrief.
- COMMAND tidyc -R -C -ppi0 -T FILE -T Rollsum -T rs_result ${tidy_SRCS}
+ # Recomended format, reformat linebreaks, reformat comments, 80 columns.
+ COMMAND tidyc -R -C -l80 -T FILE -T Rollsum -T rs_result ${tidy_SRCS}
VERBATIM
)