uncrustify FEATURE force spaces around operators, parentheses
diff --git a/src/diff.c b/src/diff.c
index 57f25e2..e0b0b7b 100644
--- a/src/diff.c
+++ b/src/diff.c
@@ -326,7 +326,7 @@
     }
 
     /* key */
-    if ((schema->nodetype == LYS_LIST) && ((*op == LYD_DIFF_OP_REPLACE) || (*op ==LYD_DIFF_OP_CREATE))) {
+    if ((schema->nodetype == LYS_LIST) && ((*op == LYD_DIFF_OP_REPLACE) || (*op == LYD_DIFF_OP_CREATE))) {
         if (second_pos) {
             buflen = bufused = 0;
             LY_CHECK_RET(lyd_path_list_predicate(userord_item->inst[second_pos - 1], key, &buflen, &bufused, 0));
diff --git a/src/hash_table.c b/src/hash_table.c
index 928a963..5506ca8 100644
--- a/src/hash_table.c
+++ b/src/hash_table.c
@@ -56,7 +56,7 @@
 lydict_clean(struct dict_table *dict)
 {
     unsigned int i;
-    struct dict_rec *dict_rec  = NULL;
+    struct dict_rec *dict_rec = NULL;
     struct ht_rec *rec = NULL;
 
     LY_CHECK_ARG_RET(NULL, dict,);
@@ -70,7 +70,7 @@
              * dictionary are supposed to be removed using lydict_remove()
              * before calling lydict_clean()
              */
-            dict_rec  = (struct dict_rec *)rec->val;
+            dict_rec = (struct dict_rec *)rec->val;
             LOGWRN(NULL, "String \"%s\" not freed from the dictionary, refcount %d", dict_rec->value, dict_rec->refcount);
             /* if record wasn't removed before free string allocated for that record */
 #ifdef NDEBUG
diff --git a/src/parser_yin.c b/src/parser_yin.c
index 2e549a7..5ec0bb4 100644
--- a/src/parser_yin.c
+++ b/src/parser_yin.c
@@ -833,7 +833,7 @@
     type->range = calloc(1, sizeof *type->range);
     LY_CHECK_ERR_RET(!type->range, LOGMEM(ctx->xmlctx->ctx), LY_EMEM);
     LY_CHECK_RET(yin_parse_restriction(ctx, LY_STMT_RANGE, type->range));
-    type->flags |=  LYS_SET_RANGE;
+    type->flags |= LYS_SET_RANGE;
 
     return LY_SUCCESS;
 }
diff --git a/src/plugins_types.c b/src/plugins_types.c
index 83f9bd4..e2fad91 100644
--- a/src/plugins_types.c
+++ b/src/plugins_types.c
@@ -648,7 +648,7 @@
     /* prepare canonized value */
     if (d) {
         int count = sprintf(buf, "%" PRId64 " ", d);
-        if ( (d > 0 && (count - 1) <= type_dec->fraction_digits)
+        if ((d > 0 && (count - 1) <= type_dec->fraction_digits)
                 || (count - 2) <= type_dec->fraction_digits ) {
             /* we have 0. value, print the value with the leading zeros
              * (one for 0. and also keep the correct with of num according
@@ -892,7 +892,7 @@
                     }
                 }
 
-                if (iscanonical &&items->count && type_bits->bits[u].position < ((struct lysc_type_bitenum_item*)items->objs[items->count - 1])->position) {
+                if (iscanonical && items->count && type_bits->bits[u].position < ((struct lysc_type_bitenum_item*)items->objs[items->count - 1])->position) {
                     iscanonical = 0;
                 }
                 inserted = ly_set_add(items, &type_bits->bits[u], 0);
diff --git a/src/tree_schema.c b/src/tree_schema.c
index 66eb3ab..9b32314 100644
--- a/src/tree_schema.c
+++ b/src/tree_schema.c
@@ -217,7 +217,7 @@
         }
 
         if (ly_parse_nodeid(&id, &prefix, &prefix_len, &name, &name_len) != LY_SUCCESS) {
-            LOGERR(ctx, LY_EINVAL, "Invalid qpath \"%s\" - invalid nodeid \"%.*s\".", qpath, id- qpath, qpath);
+            LOGERR(ctx, LY_EINVAL, "Invalid qpath \"%s\" - invalid nodeid \"%.*s\".", qpath, id - qpath, qpath);
             return NULL;
         }
         if (prefix) {
@@ -1374,7 +1374,7 @@
                         free(match_name);
                         match_name = wn;
                         wn = NULL;
-                        match_len = dir_len + 1 +len;
+                        match_len = dir_len + 1 + len;
                         match_format = format_aux;
                         continue;
                     }
diff --git a/src/tree_schema_compile.c b/src/tree_schema_compile.c
index 8f493a4..686d634 100644
--- a/src/tree_schema_compile.c
+++ b/src/tree_schema_compile.c
@@ -4244,7 +4244,7 @@
     struct lysc_node *iter;
 
     if (add) { /* set flag */
-        for (; parent &&  parent->nodetype == LYS_CONTAINER && !(parent->flags & LYS_MAND_TRUE) && !(parent->flags & LYS_PRESENCE);
+        for (; parent && parent->nodetype == LYS_CONTAINER && !(parent->flags & LYS_MAND_TRUE) && !(parent->flags & LYS_PRESENCE);
                 parent = parent->parent) {
             parent->flags |= LYS_MAND_TRUE;
         }
diff --git a/src/xml.c b/src/xml.c
index 8bdfb07..b46d015 100644
--- a/src/xml.c
+++ b/src/xml.c
@@ -408,7 +408,7 @@
                     in += 6; /* &quot; */
                 } else {
                     LOGVAL(ctx, LY_VLOG_LINE, &xmlctx->line, LYVE_SYNTAX,
-                           "Entity reference \"%.*s\" not supported, only predefined references allowed.", 10, &in[offset-1]);
+                           "Entity reference \"%.*s\" not supported, only predefined references allowed.", 10, &in[offset - 1]);
                     goto error;
                 }
                 offset = 0;
diff --git a/src/xpath.c b/src/xpath.c
index de1d41e..0f5c744 100644
--- a/src/xpath.c
+++ b/src/xpath.c
@@ -888,7 +888,7 @@
         memcpy(trg->val.scnodes, src->val.scnodes, src->used * sizeof *src->val.scnodes);
     } else if (src->type == LYXP_SET_BOOLEAN) {
         set_fill_boolean(trg, src->val.bln);
-    } else if (src->type ==  LYXP_SET_NUMBER) {
+    } else if (src->type == LYXP_SET_NUMBER) {
         set_fill_number(trg, src->val.num);
     } else if (src->type == LYXP_SET_STRING) {
         set_fill_string(trg, src->val.str, strlen(src->val.str));
diff --git a/uncrustify.cfg b/uncrustify.cfg
index 3516199..4fa60cf 100644
--- a/uncrustify.cfg
+++ b/uncrustify.cfg
@@ -71,13 +71,13 @@
 utf8_force                      = true     # true/false
 
 # Add or remove space between 'do' and '{'.
-sp_do_brace_open                = ignore    # ignore/add/remove/force
+sp_do_brace_open                = force     # ignore/add/remove/force
 
 # Add or remove space between '}' and 'while'.
-sp_brace_close_while            = ignore    # ignore/add/remove/force
+sp_brace_close_while            = force     # ignore/add/remove/force
 
 # Add or remove space between 'while' and '('.
-sp_while_paren_open             = ignore    # ignore/add/remove/force
+sp_while_paren_open             = force     # ignore/add/remove/force
 
 #
 # Spacing options
@@ -85,20 +85,20 @@
 
 # Add or remove space around non-assignment symbolic operators ('+', '/', '%',
 # '<<', and so forth).
-sp_arith                        = ignore    # ignore/add/remove/force
+sp_arith                        = force     # ignore/add/remove/force
 
 # Add or remove space around arithmetic operators '+' and '-'.
 #
 # Overrides sp_arith.
-sp_arith_additive               = ignore    # ignore/add/remove/force
+sp_arith_additive               = force     # ignore/add/remove/force
 
 # Add or remove space around assignment operator '=', '+=', etc.
-sp_assign                       = ignore    # ignore/add/remove/force
+sp_assign                       = force     # ignore/add/remove/force
 
 # Add or remove space around '=' in C++11 lambda capture specifications.
 #
 # Overrides sp_assign.
-sp_cpp_lambda_assign            = ignore   # ignore/add/remove/force
+sp_cpp_lambda_assign            = force    # ignore/add/remove/force
 
 # Add or remove space after the capture specification of a C++11 lambda when
 # an argument list is present, as in '[] <here> (int x){ ... }'.
@@ -124,28 +124,28 @@
 # Add or remove space before assignment operator '=', '+=', etc.
 #
 # Overrides sp_assign.
-sp_before_assign                = ignore    # ignore/add/remove/force
+sp_before_assign                = force    # ignore/add/remove/force
 
 # Add or remove space after assignment operator '=', '+=', etc.
 #
 # Overrides sp_assign.
-sp_after_assign                 = ignore   # ignore/add/remove/force
+sp_after_assign                 = force    # ignore/add/remove/force
 
 # Add or remove space in 'NS_ENUM ('.
-sp_enum_paren                   = ignore    # ignore/add/remove/force
+sp_enum_paren                   = force    # ignore/add/remove/force
 
 # Add or remove space around assignment '=' in enum.
-sp_enum_assign                  = ignore   # ignore/add/remove/force
+sp_enum_assign                  = force    # ignore/add/remove/force
 
 # Add or remove space before assignment '=' in enum.
 #
 # Overrides sp_enum_assign.
-sp_enum_before_assign           = ignore   # ignore/add/remove/force
+sp_enum_before_assign           = force    # ignore/add/remove/force
 
 # Add or remove space after assignment '=' in enum.
 #
 # Overrides sp_enum_assign.
-sp_enum_after_assign            = ignore    # ignore/add/remove/force
+sp_enum_after_assign            = force    # ignore/add/remove/force
 
 # Add or remove space around assignment ':' in enum.
 sp_enum_colon                   = ignore    # ignore/add/remove/force
@@ -164,25 +164,25 @@
 sp_before_pp_stringify          = ignore    # ignore/add/remove/force
 
 # Add or remove space around boolean operators '&&' and '||'.
-sp_bool                         = ignore    # ignore/add/remove/force
+sp_bool                         = force     # ignore/add/remove/force
 
 # Add or remove space around compare operator '<', '>', '==', etc.
-sp_compare                      = ignore    # ignore/add/remove/force
+sp_compare                      = force     # ignore/add/remove/force
 
 # Add or remove space inside '(' and ')'.
-sp_inside_paren                 = ignore    # ignore/add/remove/force
+sp_inside_paren                 = remove    # ignore/add/remove/force
 
 # Add or remove space between nested parentheses, i.e. '((' vs. ') )'.
-sp_paren_paren                  = ignore    # ignore/add/remove/force
+sp_paren_paren                  = remove    # ignore/add/remove/force
 
 # Add or remove space between back-to-back parentheses, i.e. ')(' vs. ') ('.
-sp_cparen_oparen                = ignore    # ignore/add/remove/force
+sp_cparen_oparen                = remove    # ignore/add/remove/force
 
 # Whether to balance spaces inside nested parentheses.
 sp_balance_nested_parens        = false     # true/false
 
 # Add or remove space between ')' and '{'.
-sp_paren_brace                  = ignore    # ignore/add/remove/force
+sp_paren_brace                  = force     # ignore/add/remove/force
 
 # Add or remove space between nested braces, i.e. '{{' vs '{ {'.
 sp_brace_brace                  = ignore    # ignore/add/remove/force