[gnome-builder] beautifier plugin: do some changes to config files
- From: Sébastien Lafargue <slafargue src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] beautifier plugin: do some changes to config files
- Date: Sun, 7 Jan 2018 21:20:26 +0000 (UTC)
commit 672a931c34ff3bc71f8ab3950b522f0ff9bf4ebf
Author: Sebastien Lafargue <slafargue gnome org>
Date: Sun Jan 7 21:47:01 2018 +0100
beautifier plugin: do some changes to config files
src/plugins/beautifier/config/c-sharp/config.ini | 2 +-
src/plugins/beautifier/config/c/config.ini | 6 +-
src/plugins/beautifier/config/c/gnu-indent.cfg | 2 +-
src/plugins/beautifier/config/c/kr.cfg | 2 +-
src/plugins/beautifier/config/c/linux-kernel.cfg | 70 ++++++--------------
src/plugins/beautifier/config/d/config.ini | 2 +-
src/plugins/beautifier/config/global.ini | 3 +
.../beautifier/config/html/tidy-autoindent.cfg | 1 +
src/plugins/beautifier/config/html/tidy-indent.cfg | 1 +
src/plugins/beautifier/config/objc/config.ini | 2 +-
10 files changed, 33 insertions(+), 58 deletions(-)
---
diff --git a/src/plugins/beautifier/config/c-sharp/config.ini
b/src/plugins/beautifier/config/c-sharp/config.ini
index 9db426c..16f8c1d 100644
--- a/src/plugins/beautifier/config/c-sharp/config.ini
+++ b/src/plugins/beautifier/config/c-sharp/config.ini
@@ -5,6 +5,6 @@ default = mono
[mono]
-command-pattern = uncrustify -c @c@ -f @s@
+command-pattern = uncrustify -c @c@ -f @s@ -l CS
config = mono.cfg
name = Mono and C-sharp uncrustify
diff --git a/src/plugins/beautifier/config/c/config.ini b/src/plugins/beautifier/config/c/config.ini
index 974044e..a9c4c7c 100644
--- a/src/plugins/beautifier/config/c/config.ini
+++ b/src/plugins/beautifier/config/c/config.ini
@@ -6,18 +6,18 @@ default = gnu
[gnu]
-command-pattern = uncrustify -c @c@ -f @s@
+command-pattern = uncrustify -c @c@ -f @s@ -l C
config = gnu-indent.cfg
name = Gnu identation
[k&r]
-command-pattern = uncrustify -c @c@ -f @s@
+command-pattern = uncrustify -c @c@ -f @s@ -l C
config = kr.cfg
name = Kernighan and Ritchie
[linux-kernel]
-command-pattern = uncrustify -c @c@ -f @s@
+command-pattern = uncrustify -c @c@ -f @s@ -l C
config = linux-kernel.cfg
name = Linux Kernel
diff --git a/src/plugins/beautifier/config/c/gnu-indent.cfg b/src/plugins/beautifier/config/c/gnu-indent.cfg
index 3f7f76d..1e887ac 100644
--- a/src/plugins/beautifier/config/c/gnu-indent.cfg
+++ b/src/plugins/beautifier/config/c/gnu-indent.cfg
@@ -71,7 +71,7 @@ sp_func_proto_paren = remove # "int foo ();" vs "int foo();"
# align_right_cmt_span = 3
# align_pp_define_span = 3
# align_pp_define_gap = 4
-# align_number_left = TRUE
+# align_number_right = TRUE
# align_typedef_span = 5
# align_typedef_gap = 3
diff --git a/src/plugins/beautifier/config/c/kr.cfg b/src/plugins/beautifier/config/c/kr.cfg
index 872de86..9e6660f 100644
--- a/src/plugins/beautifier/config/c/kr.cfg
+++ b/src/plugins/beautifier/config/c/kr.cfg
@@ -71,7 +71,7 @@ sp_func_proto_paren = remove # "int foo ();" vs "int foo();"
# align_right_cmt_span = 3
# align_pp_define_span = 3
# align_pp_define_gap = 4
-# align_number_left = TRUE
+# align_number_right = TRUE
# align_typedef_span = 5
# align_typedef_gap = 3
diff --git a/src/plugins/beautifier/config/c/linux-kernel.cfg
b/src/plugins/beautifier/config/c/linux-kernel.cfg
index eb2cd12..7b49a9d 100644
--- a/src/plugins/beautifier/config/c/linux-kernel.cfg
+++ b/src/plugins/beautifier/config/c/linux-kernel.cfg
@@ -1,13 +1,16 @@
#
# uncrustify config file for the linux kernel
# https://github.com/uncrustify/uncrustify/blob/master/etc/linux-indent.cfg
+#
indent_with_tabs = 2 # 1=indent to level only, 2=indent with tabs
+align_with_tabs = TRUE # use tabs to align
+align_on_tabstop = TRUE # align on tabstops
input_tab_size = 8 # original tab size
output_tab_size = 8 # new tab size
indent_columns = output_tab_size
-indent_label = 1 # pos: absolute col, neg: relative column
+indent_label = 2 # pos: absolute col, neg: relative column
#
@@ -25,12 +28,9 @@ nl_while_brace = remove # "while () {" vs "while () \n {"
nl_switch_brace = remove # "switch () {" vs "switch () \n {"
nl_brace_while = remove # "} while" vs "} \n while" - cuddle while
nl_brace_else = remove # "} else" vs "} \n else" - cuddle else
-sp_brace_else = force
-sp_else_brace = force
nl_func_var_def_blk = 1
nl_fcall_brace = remove # "list_for_each() {" vs "list_for_each()\n{"
nl_fdef_brace = add # "int foo() {" vs "int foo()\n{"
-nl_after_label_colon = true # "fail:\nfree(foo);" vs "fail: free(foo);"
# nl_after_return = TRUE;
# nl_before_case = 1
@@ -39,33 +39,31 @@ nl_after_label_colon = true # "fail:\nfree(foo);" vs "fail: free(foo);"
# Source code modifications
#
-mod_paren_on_return = remove # "return 1;" vs "return (1);"
-#mod_full_brace_if = remove # "if (a) a--;" vs "if (a) { a--; }"
-mod_full_brace_if_chain = true
-mod_full_brace_for = remove # "for () a--;" vs "for () { a--; }"
-mod_full_brace_do = remove # "do a--; while ();" vs "do { a--; } while ();"
-mod_full_brace_while = remove # "while (a) a--;" vs "while (a) { a--; }"
-mod_full_brace_nl = 3 # don't remove if more than 3 newlines
+# mod_paren_on_return = remove # "return 1;" vs "return (1);"
+# mod_full_brace_if = remove # "if (a) a--;" vs "if (a) { a--; }"
+# mod_full_brace_for = remove # "for () a--;" vs "for () { a--; }"
+# mod_full_brace_do = remove # "do a--; while ();" vs "do { a--; } while ();"
+# mod_full_brace_while = remove # "while (a) a--;" vs "while (a) { a--; }"
#
# inter-character spacing options
#
-sp_return_paren = force # "return (1);" vs "return(1);"
+# sp_return_paren = force # "return (1);" vs "return(1);"
sp_sizeof_paren = remove # "sizeof (int)" vs "sizeof(int)"
sp_before_sparen = force # "if (" vs "if("
sp_after_sparen = force # "if () {" vs "if (){"
sp_after_cast = remove # "(int) a" vs "(int)a"
-sp_inside_braces = force # "{ 1 }" vs "{1}"
-sp_inside_braces_struct = force # "{ 1 }" vs "{1}"
-sp_inside_braces_enum = force # "{ 1 }" vs "{1}"
-sp_assign = force
-sp_arith = force
-sp_bool = force
-sp_compare = force
-sp_assign = force
-sp_after_comma = force
+sp_inside_braces = add # "{ 1 }" vs "{1}"
+sp_inside_braces_struct = add # "{ 1 }" vs "{1}"
+sp_inside_braces_enum = add # "{ 1 }" vs "{1}"
+sp_assign = add
+sp_arith = add
+sp_bool = add
+sp_compare = add
+sp_assign = add
+sp_after_comma = add
sp_func_def_paren = remove # "int foo (){" vs "int foo(){"
sp_func_call_paren = remove # "foo (" vs "foo("
sp_func_proto_paren = remove # "int foo ();" vs "int foo();"
@@ -75,9 +73,6 @@ sp_func_proto_paren = remove # "int foo ();" vs "int foo();"
# Aligning stuff
#
-align_with_tabs = TRUE # use tabs to align
-align_on_tabstop = TRUE # align on tabstops
-# align_keep_tabs = true
align_enum_equ_span = 4 # '=' in enum definition
# align_nl_cont = TRUE
# align_var_def_span = 2
@@ -90,33 +85,8 @@ align_right_cmt_span = 3
# align_pp_define_span = 8;
# align_pp_define_gap = 4;
-cmt_star_cont = true
+# cmt_star_cont = FALSE
# indent_brace = 0
-nl_func_paren = remove
-nl_func_decl_start = remove
-nl_func_decl_empty = remove
-nl_func_decl_args = remove
-nl_func_decl_end = remove
-sp_inside_paren = remove
-sp_inside_square = remove
-sp_inside_paren_cast = remove
-sp_inside_fparen = remove
-sp_inside_sparen = remove
-sp_paren_paren = remove
-sp_before_ptr_star = force
-sp_after_ptr_star = remove
-sp_between_ptr_star = remove
-align_func_params = true
-align_var_struct_span = 6
-
-eat_blanks_after_open_brace = true
-eat_blanks_before_close_brace = true
-pp_indent = remove
-
-nl_start_of_file = remove
-nl_end_of_file = force
-nl_end_of_file_min = 1
-nl_comment_func_def = 1
diff --git a/src/plugins/beautifier/config/d/config.ini b/src/plugins/beautifier/config/d/config.ini
index 8cb16c4..9d37e48 100644
--- a/src/plugins/beautifier/config/d/config.ini
+++ b/src/plugins/beautifier/config/d/config.ini
@@ -6,6 +6,6 @@ default = d
[d]
-command-pattern = uncrustify -c @c@ -f @s@
+command-pattern = uncrustify -c @c@ -f @s@ -l D
config = d.cfg
name = D uncrustify
diff --git a/src/plugins/beautifier/config/global.ini b/src/plugins/beautifier/config/global.ini
index e2e1c72..0327096 100644
--- a/src/plugins/beautifier/config/global.ini
+++ b/src/plugins/beautifier/config/global.ini
@@ -4,3 +4,6 @@
map = c
default = k&r
+[python3]
+
+map = python
diff --git a/src/plugins/beautifier/config/html/tidy-autoindent.cfg
b/src/plugins/beautifier/config/html/tidy-autoindent.cfg
index ac198fa..ec0c8b9 100644
--- a/src/plugins/beautifier/config/html/tidy-autoindent.cfg
+++ b/src/plugins/beautifier/config/html/tidy-autoindent.cfg
@@ -1,4 +1,5 @@
// sample config file for HTML tidy
+show-info: no
indent: auto
indent-spaces: 2
wrap: 72
diff --git a/src/plugins/beautifier/config/html/tidy-indent.cfg
b/src/plugins/beautifier/config/html/tidy-indent.cfg
index f0af220..4f99007 100644
--- a/src/plugins/beautifier/config/html/tidy-indent.cfg
+++ b/src/plugins/beautifier/config/html/tidy-indent.cfg
@@ -1,4 +1,5 @@
// sample config file for HTML tidy
+show-info: no
indent: yes
indent-spaces: 2
wrap: 72
diff --git a/src/plugins/beautifier/config/objc/config.ini b/src/plugins/beautifier/config/objc/config.ini
index 6cc062a..be71b45 100644
--- a/src/plugins/beautifier/config/objc/config.ini
+++ b/src/plugins/beautifier/config/objc/config.ini
@@ -6,6 +6,6 @@ default = objc
[objc]
-command-pattern = uncrustify -c @c@ -f @s@
+command-pattern = uncrustify -c @c@ -f @s@ -OC
config = objc.cfg
name = Objective C uncrustify
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]