Uncrustify support
vit9696 opened this issue · 2 comments
Hello,
I tried whatstyle to attempt to generate uncrustify configuration, but no matter which file I pass it, I get no attempts to use uncrustify or create any sample config. This is how it looks basically:
/path/to/whatstyle.py -v --debug popen --info attempt -f uncrustify --html /path/to/src.c
debug_popen: uncrustify --version
debug_popen: len(stdin):0 => returncode:0 len(stdout):20 len(stderr):0
debug_popen: /opt/local/bin/uncrustify --version
debug_popen: len(stdin):0 => returncode:0 len(stdout):20 len(stderr):0
-----------------------
Running whatstyle 0.1.6
Using formatter /opt/local/bin/uncrustify (Uncrustify-0.69.0_f)
Using this for comparing files: /usr/bin/python -u /path/to/whatstyle.py --stdindiff -- #FILENAME#
debug_popen: /opt/local/bin/uncrustify --version
debug_popen: len(stdin):0 => returncode:0 len(stdout):20 len(stderr):0
Round 0 #formatted 1/1 #compared 1/1
Round 0, distance: (326, 7211, 0, 0, 0, 0, 1)
Best distance minimizing differences round 0: (326, 7211, 0, 0, 0, 0, 1)
debug_popen: /opt/local/bin/uncrustify -c /path/toT/whatstyle_uncrustify_adc83b19e793491b1c6ea0fd8b46cd9f32e592fc.cfg -l C --update-config
debug_popen: len(stdin):0 => returncode:0 len(stdout):26773 len(stderr):0
The formatter was run 1 times of which 0 runs were unusable.
### This style was chosen for your uncrustify.cfg
Most likely I miss something, in this case could you please give me a hint where to look first. A naive attempt to debug the process did not help me much so far. Thanks!
P.S. I am using uncrustify from MacPorts in macOS 10.14.5 with whatstyle downloaded from master
Thank you for the detailed report. The --show-config output format changed in uncrustify 0.68 which is now supported as well. Please try the new version that I just pushed.
Sorry for a slow reply, the notification got stacked with the rest of the mail. Your patch resolved the issue. Thank you very much!