diff --git a/.github/csc.json b/.github/csc.json new file mode 100644 index 0000000..764ede5 --- /dev/null +++ b/.github/csc.json @@ -0,0 +1,17 @@ +{ + "problemMatcher": [ + { + "owner": "csc", + "pattern": [ + { + "regexp": "^([^\\s].*)\\((\\d+|\\d+,\\d+|\\d+,\\d+,\\d+,\\d+)\\):\\s+(error|warning|info)\\s+(CS\\d+)\\s*:\\s*(.*)$", + "file": 1, + "location": 2, + "severity": 3, + "code": 4, + "message": 5 + } + ] + } + ] +} \ No newline at end of file diff --git a/src/setup-dotnet.ts b/src/setup-dotnet.ts index dc5e2fd..212d01b 100644 --- a/src/setup-dotnet.ts +++ b/src/setup-dotnet.ts @@ -1,5 +1,6 @@ import * as core from '@actions/core'; import * as installer from './installer'; +import * as path from 'path'; async function run() { try { @@ -14,7 +15,9 @@ async function run() { } // TODO: setup proxy from runner proxy config - // TODO: problem matchers registered + + const matchersPath = path.join(__dirname, '..', '.github'); + console.log(`##[add-matcher]${path.join(matchersPath, 'csc.json')}`); } catch (error) { core.setFailed(error.message); }