I have been using uncrustify to format apex code for quite some time and its been working as expected other then formatting soql queries but from past few days if I press alt + shift + F it doesn't work and I get no error other then below warning.

write EPIPE

enter image description here

other then uncrustify I am familiar with Aura helper but the problem with aura helper is if I write code like below

Account act      = new Account();
act.Name         = 'name';
act.custField__c = 'testvalue';

it will format it like below

Account act = new Account();
act.Name = 'name';
act.custField__c = 'testvalue';

I uninstalled all the extension and vs code and then re installed everything but still I am getting the same issue.

I would highly appreciate if anyone would help me to resolve EPIPE error from uncrustify or stop aura helper to indent code like above

  • Have you looked at using prettier which the documentation mentions? There's also a prettier apex plugin. Uncrustify doesn't officially support apex (essentially using java mode) if I remember correctly, so that makes it difficult to get assistance when you run into issues. – Kris Goncalves Mar 9 at 12:40
  • thank you Kris for responding, yes I have installed prettier apex plugin as well, it is slower and works same as aura helper but after I finish the installation of prettier apex plugin my Uncrustify started working I don't get the error now, I have no clue now that why it wasn't working earlier and why it is working now. :) – gs650x Mar 11 at 14:25

Try enabling debugging for uncrustify in VS Code setting and then in "output" window you will see your error. In my case that was a deprecated tag that I needed to change. Also, check if you specified path to uncrustify executable file in settings.json ("uncrustify.executablePath.windows" if you use windows).

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.