-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathuncrustify.cfg
More file actions
82 lines (69 loc) · 4.45 KB
/
Copy pathuncrustify.cfg
File metadata and controls
82 lines (69 loc) · 4.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# ============================================================
# Uncrustify — Perfil "PintLike" para Vala
# Equivalente a .vscode/formatter.xml (perfil Java "PintLike")
# ============================================================
# ── Fin de línea ─────────────────────────────────────────────
newlines = lf # siempre LF
# ── Indentación (4 espacios, sin tabulaciones) ────────────────
indent_with_tabs = 0 # 0 = sólo espacios
indent_columns = 4
input_tab_size = 4
output_tab_size = 4
# Indentar el contenido de namespaces y clases
indent_namespace = true
indent_class = true
# Indentación de continuación = 1 nivel (= 4 espacios)
# Equivale a: continuation_indentation = 1
indent_continue = 4
# ── Longitud máxima de línea ──────────────────────────────────
# Equivale a: lineSplit = 120
code_width = 120
# No unir líneas ya partidas manualmente
# Equivale a: join_wrapped_lines = false
ls_for_split_full = true
ls_func_split_full = true
# ── Llaves: clases / métodos / constructores → siguiente línea ─
# Equivale a: brace_position_for_type_declaration = next_line
# brace_position_for_method_declaration = next_line
# brace_position_for_constructor_declaration = next_line
nl_class_brace = force # class Foo {\n → class Foo\n{
nl_fdef_brace = force # void foo() {\n → void foo()\n{
# ── Llaves: bloques de control → misma línea (end_of_line) ────
# Equivale a: brace_position_for_block = end_of_line
nl_if_brace = remove
nl_else_brace = remove
nl_elseif_brace = remove
nl_for_brace = remove
nl_while_brace = remove
nl_do_brace = remove
nl_switch_brace = remove
nl_brace_else = remove # } else (no newline entre } y else)
nl_brace_while = remove # } while (do-while)
# ── Espacios: paréntesis en declaraciones y llamadas ──────────
# Equivale a: insert_space_before_opening_paren_in_method_declaration = do not insert
# insert_space_before_opening_paren_in_method_invocation = do not insert
sp_func_def_paren = remove # void foo() — sin espacio antes de (
sp_func_call_paren = remove # foo() — sin espacio antes de (
sp_func_proto_paren = remove # prototipo — sin espacio antes de (
# ── Espacios: paréntesis en control flow ─────────────────────
# Equivale a: insert_space_before_opening_paren_in_if = insert
# insert_space_before_opening_paren_in_for = insert
# insert_space_before_opening_paren_in_while = insert
sp_before_paren = ignore # deja sp_* específicos tomar el control
sp_before_sparen = add # espacio antes de ( en if/for/while/switch
# ── Espacios: comas ───────────────────────────────────────────
# Equivale a: insert_space_after_comma_in_* = insert
# insert_space_before_comma_in_* = do not insert
sp_after_comma = force
sp_before_comma = remove
# ── Líneas en blanco ──────────────────────────────────────────
# Equivale a: blank_lines_before_method = 1
# blank_lines_between_type_declarations = 1
nl_after_func_body = 2 # 2 newlines = 1 línea en blanco tras }
nl_after_func_body_class = 2
eat_blanks_before_close_brace = true # sin línea en blanco antes del } de clase
nl_max = 2 # máximo 1 línea en blanco consecutiva
nl_min_blank_before_block_cmt = 1 # 1 línea en blanco antes de comentarios de bloque
# Equivale a: blank_lines_after_imports = 1
# (En Vala los "imports" son directivas "using"; uncrustify no las trata
# específicamente, pero nl_max = 2 evita acumulación excesiva.)