]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix msCompile problem matcher on VScode on Windows (#31068)
authorTemporalOroboros <TemporalOroboros@gmail.com>
Sat, 17 Aug 2024 06:33:16 +0000 (23:33 -0700)
committerGitHub <noreply@github.com>
Sat, 17 Aug 2024 06:33:16 +0000 (23:33 -0700)
Either VSCode's integrated shell or dotnet has a default behaviour where it inserts newlines into stdout/stderr to make the lines wrap at the console width. Since msCompile works based on lines this makes it fail to detect build warnings correctly. Depending on where the line break occurs this can result in a truncated error message, a correct error message with a truncated filepath for the error, or the errror just straight up missing.
Adding 'ForceNoAlign' to the logging parameters for dotnet build disables this behaviour and gives msCompile actually useful input to sift for errors. End result is all the errors are detected and listed with the correct error messages and filepaths.

.vscode/tasks.json

index 2865cc0fbfa4eeba033c0422c8f9f3fc8e0807e3..1e95fb41b06512c5011ba8aad1a7721df613fdea 100644 (file)
@@ -10,7 +10,7 @@
             "args": [
                 "build",
                 "/property:GenerateFullPaths=true", // Ask dotnet build to generate full paths for file names.
-                "/consoleloggerparameters:NoSummary" // Do not generate summary otherwise it leads to duplicate errors in Problems panel
+                "/consoleloggerparameters:'ForceNoAlign;NoSummary'" // Do not generate summary otherwise it leads to duplicate errors in Problems panel
             ],
             "group": {
                 "kind": "build",
@@ -29,9 +29,9 @@
                 "build",
                 "${workspaceFolder}/Content.YAMLLinter/Content.YAMLLinter.csproj",
                 "/property:GenerateFullPaths=true",
-                "/consoleloggerparameters:NoSummary"
+                "/consoleloggerparameters:'ForceNoAlign;NoSummary'"
             ],
             "problemMatcher": "$msCompile"
         }
     ]
-}
\ No newline at end of file
+}