gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-exchange] branch master updated: uncrustify config a


From: gnunet
Subject: [GNUnet-SVN] [taler-exchange] branch master updated: uncrustify config and script
Date: Sun, 25 Aug 2019 15:03:29 +0200

This is an automated email from the git hooks/post-receive script.

dold pushed a commit to branch master
in repository exchange.

The following commit(s) were added to refs/heads/master by this push:
     new b1b6786c uncrustify config and script
b1b6786c is described below

commit b1b6786c3b664015fc79b61b0c6d95d17c07f30c
Author: Florian Dold <address@hidden>
AuthorDate: Sun Aug 25 13:40:22 2019 +0200

    uncrustify config and script
---
 contrib/uncrustify.cfg | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++
 contrib/uncrustify.sh  |  3 +++
 2 files changed, 70 insertions(+)

diff --git a/contrib/uncrustify.cfg b/contrib/uncrustify.cfg
new file mode 100644
index 00000000..c9ca7651
--- /dev/null
+++ b/contrib/uncrustify.cfg
@@ -0,0 +1,67 @@
+input_tab_size = 2
+output_tab_size = 2
+
+indent_columns = 2
+indent_with_tabs = 0
+indent_case_brace = 2
+
+code_width=80
+cmd_width=80
+
+sp_cmt_cpp_start=add
+
+ls_for_split_full=true
+ls_func_split_full=true
+ls_code_width=true
+
+# Arithmetic operations in wrapped expressions should be at the start
+# of the line.
+pos_arith=lead
+
+# Fully parenthesize boolean exprs
+mod_full_paren_if_bool=true
+
+# Braces should be on their own line
+nl_fdef_brace=add
+nl_enum_brace=add
+nl_struct_brace=add
+nl_union_brace=add
+nl_if_brace=add
+nl_brace_else=add
+nl_elseif_brace=add
+nl_while_brace=add
+nl_switch_brace=add
+# no newline between "else" and "if"
+nl_else_if=remove
+
+nl_assign_brace=remove
+
+# No extra newlines that cause noisy diffs
+nl_start_of_file=remove
+# If there's no new line, it's not a text file!
+nl_end_of_file=add
+
+sp_inside_paren = remove
+
+sp_arith = add
+sp_arith_additive = add
+
+# We want spaces before and after "="
+sp_before_assign = add
+sp_after_assign = add
+
+# we want "char *foo;"
+sp_after_ptr_star = remove
+sp_between_ptr_star = remove
+
+# we want "if (foo) { ... }"
+sp_before_sparen = add
+
+sp_inside_fparen = remove
+
+# add space before function call and decl: "foo (x)"
+sp_func_call_paren = add
+sp_func_proto_paren = add
+sp_func_proto_paren_empty = add
+sp_func_def_paren = add
+sp_func_def_paren_empty = add
diff --git a/contrib/uncrustify.sh b/contrib/uncrustify.sh
new file mode 100755
index 00000000..09974173
--- /dev/null
+++ b/contrib/uncrustify.sh
@@ -0,0 +1,3 @@
+#!/usr/bin/env bash
+DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
+find "$DIR/../src" \( -name "*.cpp" -o -name "*.c" -o -name "*.h" \) -exec 
uncrustify -c "$DIR/uncrustify.cfg" --replace --no-backup {} +

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]