From 211f0312b0d2bee6595a2dee06605beb26e0fe02 Mon Sep 17 00:00:00 2001 From: Danny McCormick Date: Fri, 21 Jun 2019 09:44:33 -0400 Subject: [PATCH] Add C# problem matcher (#2) * Add c# problem matcher * ##[add-matcher] --- .github/csc.json | 17 +++++++++++++++++ src/setup-dotnet.ts | 5 ++++- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 .github/csc.json 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); }