Closed everLEEst closed 7 years ago
Looks awfully similar to #9... What are the contents of uncrustify.cfg? Is it created correctly?
I think it should be fixed now. But I could be wrong, so please re-open if it's not the case.
yeah let me check it tomorrow. thanks a lot for fast resolve :) 👍 by the way, have you any plan to apply range formatting feature? It only needs really few code changes with using '--frag' option in uncrustify, and actually I locally modify the feature and it works well with block selections. If you don't mind I could just contribute my code as well.
Why not ? I simply didn't know Uncrustify had this option. Has it always been there or is it only past a certain version ?
ftp://history.knowsley.gov.uk/hpux/Development/Tools/uncrustify-0.60/uncrustify-0.60.man.html at least the link said the option was exist in 2009, and my opensource project formatting rule is really something special even powerful uncrustify cannot supporting them fully, so I generally use some modified version based in 2014, and it works well in that version though. But yeah they have really weak documents so hardly find the way of using it. my project don't allow rewrite code for formatting which can be changed git author, so I need range format option and I find that these option can be useful :)
I'm having the same issue. Everytime I click on uncrustify.cfg it gives the error Unable to open 'Uncrustify configuration': Cannot read property 'tag' of undefined.
The uncrustify.cfg is generated by using uncrustify.create
This issue should be reopened
I have had this issue as well when I last worked on this extension... I'll try to see where it comes from. In the meantime, simply re-creating the file can fix it, sometimes it doesn't work and sometimes it does work.
I recreated the file like 5 times in a row and it didn't work any of the 5 times
When I open the file in vim it is empty, maybe the problem is that it doesn't setup the file correctly?
Yes, the problem is that the file is not written properly. But it's random, sometimes it works for me...
You can manually create the file with uncrustify --update-config-with-doc > uncrustify.cfg
for now. If that doesn't work...
Your command didn't work, using this command uncrustify --update-config-with-doc -c uncrustify.cfg > uncrustify.cfg
did work for me.
Ok, what version of uncrustify do you have ?
v0.59
So this version simply needs an original config file with newer versions don't... Creating an empty file first and then filling it (just like you did) works with any version, so I guess this is how I should handle it.
Hopefully this won't need to be re-opened again
after creating uncrustify.cfg by uncrustify.create, If I try to open the file, it always failed with 'Cannot read property 'tag' of undefined.'