Closed Good1Cheese closed 1 year ago
I've published version 0.9.0 which should fix the cause of this warning, can you see if it works with that?
No, still not working.
When I format any glua file, it still gives me:
Failed to pretty print code, most likely due to syntax errors.
In extension log there isn't any error.
If I use GLuaFixer via cmd, everything works fine.
That means glualint either returned an error code or no output at all, which as the message suggests is usually the cause of syntax errors. Can you share the file you're trying to format? Does regular linting work (i.e. are you seeing warnings/errors from the linter if you intentionally add something bad)?
Can you also open a terminal inside vscode (ctrl+` or View -> Terminal) and run glualint --version
from there, does that work and what does it print?
glualint lint
works and gives me a lot of warnings
glualint --version
also works and prints 1.24.4
This seems to be a problem with glualint 1.24.4 and up, I'll look into it but for now a workaround is to use version 1.24.3
Thanks for support! Actually works with 1.24.3 version.
See https://github.com/FPtje/GLuaFixer/issues/154
Could you change the command to the following? That would use the newer CLI. Note that this newer interface is also already quite old.
const args = ['pretty-print', '--stdin', 'indentation', indentation];
const args = ['pretty-print', '--stdin', 'indentation', indentation];
const args = ['pretty-print', '--stdin', '--indentation', indentation];
works for me
I realized the new interface existed when debugging this issue, but figured it was a new addition. At first I wanted to implement a version check and fall back to the older command if required, but if you say it's already quite old I'll just switch over completely and assume people keep their glualint up to date
Switched to the newer CLI and fixed the issue with indendation, 0.10.0 should show up on the extension store soon
Everything works with version 1.24.5
When I open any GLua file and try to format it, vscode-glualint extension gives me error:
Cannot read properties of undefined (reading 'document')
I have installed both glualint and vscode-glualint Also glualint folder is added to PATH