I am using current VS Code and have uncrustify updated on a Win10 machine. uncrustify.cfg has been created by the extension.
When trying to format an Apex Class, I get:
Debug: config file: c:\Users\szand\OneDrive\dev\ReleaseVersionReader\uncrustify.cfg
Debug: launched: uncrustify -l JAVA -c c:\Users\szand\OneDrive\dev\ReleaseVersionReader\uncrustify.cfg
Debug: uncrustify exited with error: Parsing: 947 bytes (947 chars) from stdin as language JAVA
For some of my classes it does nothing, for others it reduces identation.
Running locally in powershell against the same file, I see no issues and the file is outputted correctly:
cat .\ReleaseVersionReader.cls | uncrustify -l JAVA -c c:\Users\szand\OneDrive\dev\ReleaseVersionReader\uncrustify.cfg
Parsing: 948 bytes (948 chars) from stdin as language JAVA
public with sharing class ReleaseVersionReader{
// rest of class
While at some point Apex could apparently be formatted as Java (#1), it has never been officially supported (#6). An update in uncrustify probably broke the compatibility...
I am using current VS Code and have uncrustify updated on a Win10 machine. uncrustify.cfg has been created by the extension.
When trying to format an Apex Class, I get:
For some of my classes it does nothing, for others it reduces identation.
Running locally in powershell against the same file, I see no issues and the file is outputted correctly:
I have no clue where I should start looking.