Skip to content

Commit c95d5ea

Browse files
jsoreffhammerl
andauthored
Update 0276-problem-matchers.md (#1105)
* Update 0276-problem-matchers.md Update to reflect current behavior * Update docs/adrs/0276-problem-matchers.md Co-authored-by: Ferenc Hammerl <31069338+fhammerl@users.noreply.github.com>
1 parent ea67ff9 commit c95d5ea

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

docs/adrs/0276-problem-matchers.md

+9-7
Original file line numberDiff line numberDiff line change
@@ -10,29 +10,31 @@ Compilation failures during a CI build should surface good error messages.
1010

1111
For example, the actual compile errors from the typescript compiler should bubble as issues in the UI. And not simply "tsc exited with exit code 1".
1212

13-
VSCode has an extensible model for solving this type of problem. VSCode allows users to configure which problems matchers to use, when scanning output. For example, a user can apply the `tsc` problem matcher to receive a rich error output experience in VSCode, when compiling their typescript project.
13+
VSCode has an extensible model for solving this type of problem. VSCode allows users to configure which [problems matchers](https://code.visualstudio.com/docs/editor/tasks#_defining-a-problem-matcher) to use, when scanning output. For example, a user can apply the `tsc` problem matcher to receive a rich error output experience in VSCode, when compiling their typescript project.
1414

1515
The problem-matcher concept fits well with "setup" actions. For example, the `setup-nodejs` action will download node.js, add it to the PATH, and register the `tsc` problem matcher. For the duration of the job, the `tsc` problem matcher will be applied against the output.
1616

1717
## Decision
1818

1919
### Registration
2020

21-
#### Using `##` command
21+
#### Using `::` command
2222

23-
`##[add-matcher]path-to-problem-matcher-config.json`
23+
`::add-matcher::path-to-problem-matcher-config.json`
2424

25-
Using a `##` command allows for flexibility:
25+
Using a `::` command allows for flexibility:
2626
- Ad hoc scripts can register problem matchers
2727
- Allows problem matchers to be conditionally registered
2828

2929
Note, if a matcher with the same name is registered a second time, it will clobber the first instance.
3030

31-
#### Unregister using `##` command
31+
Note, at some point the syntax changed from `##` to `::`.
32+
33+
#### Unregister using `::` command
3234

3335
A way out for rare cases where scoping is a problem.
3436

35-
`##[remove-matcher]owner`
37+
`::remove-matcher::owner`
3638

3739
For this to be usable, the `owner` needs to be discoverable. Therefore, debug print the owner on registration.
3840

@@ -104,7 +106,7 @@ message: ; expected
104106
fromPath: C:\myrepo\myproject\ConsoleApp1\ClassLibrary1\ClassLibrary1.csproj
105107
```
106108

107-
Additionally the line will appear red in the web UI (prefix with `##[error]`).
109+
Additionally the line will appear red in the web UI (prefix with `::error`).
108110

109111
Note, an error does not imply task failure. Exit codes communicate failure.
110112

0 commit comments

Comments
 (0)