Open FrostKiwi opened 3 weeks ago
Nice work, I had some code in local to test it, it could be even better to use an optional regex group for the column tag in order for the regex to support both log format without having to care if glslang support the option, such as /(WARNING|ERROR):\s+(\d|.*):(\d+):(?:(\d+):)\s+(.*)/
, this way, no need to check for the option support, and it will work for both versions of glslang
it could be even better to use an optional regex group for the column tag in order for the regex to support both log format without having to care if glslang support the option, such as
/(WARNING|ERROR):\s+(\d|.*):(\d+):(?:(\d+):)\s+(.*)/
Didn't consider this. A good change, I added it and removed the check for the --error-column
argument. I had to modify the regex some more, because it kept matching against stdin
in the non---error-column
case. Code got definitely simpler 👍
Hope to address that vscode-glsllint
only matches the first error and ignores the rest of the errors in a following PR.
@FrostKiwi thanks for the PR, I will have a look into it.
Until now,
glslangValidator
did not output error columns, sovscode-glsllint
displayed the error at the start of the line, in column 1. Thanks to @antaalt and his https://github.com/KhronosGroup/glslang/pull/3614, we now have the error column reported byglslangValidator
. This Pull Request adds compatibility for this.--error-column
)Functionality
If you have updated
glslangValidator
to a version that supports this, you can specify--error-column
amongglsllint.glslangValidatorArgs
. Like this:"glsllint.glslangValidatorArgs": ["--error-column"]
Since there is no official release version yet, nightly builds of
glslangValidator
can be had here: https://github.com/KhronosGroup/glslang/releases/tag/main-totIf
--error-column
is among the arguments, a new regex is used to pull the column and display the error squiggly accordingly.