vscode-uncrustify
vscode-uncrustify copied to clipboard
Extension removes all the code
System
OS: ArchLinux VSCode: 1.45.1 Ext Version: 2.20.1 Uncrustify: Uncrustify-0.71.0-21-d4da2b0f
Last known working version: 2.19.2
Before
After (pressing CTRL-S)
CLI
uncrustify -c uncrustify.cfg -f include/app.h
Parsing: include/app.h as language C-Header
#ifndef __AE_RENDERER_H__
#define __AE_RENDERER_H__
#endif // __AE_RENDERER_H__
"uncrustify.debug": true
- useless, no logging
The issue does not occur when extension is disabled.
Something must have changed in uncrustify-0.71.0 that breaks this.
Using "uncrustify.useReplaceOption": true
works.
@carlolars Sadly not for me https://github.com/LaurentTreguier/vscode-uncrustify/issues/64
Okay, with this and the 2 other issues you opened, something is clearly not right. I'll check with Uncrustify 0.71 when I have the time. The fact that you have no logging is extremely strange however.
Logs: uncrustify-0.70.2, working:
Debug: config file: /c/.../uncrustify.cfg
Debug: launched: uncrustify -l C -c /c/.../uncrustify.cfg
Debug: uncrustify exited with status: 0
Debug: uncrustify exited with error: Parsing: 15443 bytes (15443 chars) from stdin as language C
uncrustify-0.71.0:
Debug: config file: /c/.../uncrustify.cfg
Debug: launched: uncrustify -l C -c /c/.../uncrustify.cfg
Debug: uncrustify exited with status: 1
Debug: uncrustify exited with error: Try running with -h for usage information
Parsing: 0 bytes (0 chars) from stdin as language C
I opened a PR for Uncrustify regarding this issue. Uncrustify 0.71.0 reopens its stdin in binary mode, and NodeJS doesn't like that on Linux it seems; but reopening stdin should only be necessary on Windows.