cofyc / vim-uncrustify

Use uncrustify in vim, supports range formatting.
http://yechengfu.com
14 stars 8 forks source link

Doesn't handle config misconfiguration #1

Open ErikReider opened 3 years ago

ErikReider commented 3 years ago

Gnomes default config for Vala includes some options that are deprecated and unknown. When only deprecated options exist (no unknown), the formatter includes the uncrustify warning message in the temp file created. When a unknown option is used, the formatter command returns a 1. https://github.com/cofyc/vim-uncrustify/blob/ec68cfe0da4feb55ef822ed0346d20bcb0147885/plugin/uncrustify.vim#L70

When running uncrustify in the terminal, the formatted runs as usual even with the strange options. The options used are:

deprecated: sp_cpp_lambda_paren = force
deprecated: sp_word_brace = ignore
unknown: align_number_left = false

Everything works as expected when commenting those lines out

cofyc commented 3 years ago

can you help fix this? I don't have time to work on it.