summaryrefslogtreecommitdiff
path: root/utils/uncrustify.cfg
diff options
context:
space:
mode:
Diffstat (limited to 'utils/uncrustify.cfg')
-rw-r--r--utils/uncrustify.cfg33
1 files changed, 21 insertions, 12 deletions
diff --git a/utils/uncrustify.cfg b/utils/uncrustify.cfg
index deddbc6b4..86d9a03f5 100644
--- a/utils/uncrustify.cfg
+++ b/utils/uncrustify.cfg
@@ -11,6 +11,12 @@
# The first part of this file controls what automated changes Uncrustify makes.
#################################################################################
+# Files are in UTF-8
+utf8_force = true
+
+# Unix style newlines
+newlines = lf
+
# We use tabs to indent up to brace level, but spaces to align continuation
# lines. For example:
#
@@ -61,20 +67,23 @@ align_var_def_star_style = 2 # dangling
# rerunning uncrustify with different settings might remove those extra spaces.
align_keep_extra_space = true
-# Align variable definitions in function bodies, at the toplevel, and inside
-# structs.
-#
-# The 'thresh' (threshold) values define the maximum number of extra spaces
-# uncrustify will insert. So align will be done with a maximum of 1 extra
-# space, otherwise the variable will not be aligned with its neighbour.
-align_var_def_thresh = 1
-align_var_struct_thresh = 1
+# Ensure arithmetic operators are properly spaced, e.g:
+# foo = 1 + (2 / 4);
+sp_arith = force
+sp_arith_additive = force
+
+# Ensure spaces between assignments, e.g.:
+# foo = 2;
+# foo += 2;
+sp_assign = force
-# The 'span' values define how many lines uncrustify will 'jump' in order to
-# consider two variable definitions as neighbours.
-align_var_def_span = 1
-align_var_struct_span = 4
+# Ensure there is space between '*' and '(', e.g.:
+# typedef GNode* (* ForeachFunc) (...);
+sp_ptr_star_paren = remove
+# Remove spaces between '*', e.g.:
+# gchar **foo;
+sp_between_ptr_star = remove
#################################################################################
# IGNORES