Add C# problem matcher (#2)

* Add c# problem matcher

* ##[add-matcher]
This commit is contained in:
Danny McCormick 2019-06-21 09:44:33 -04:00 committed by GitHub
parent 187843cd79
commit 211f0312b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 1 deletions

17
.github/csc.json vendored Normal file
View File

@ -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
}
]
}
]
}

View File

@ -1,5 +1,6 @@
import * as core from '@actions/core'; import * as core from '@actions/core';
import * as installer from './installer'; import * as installer from './installer';
import * as path from 'path';
async function run() { async function run() {
try { try {
@ -14,7 +15,9 @@ async function run() {
} }
// TODO: setup proxy from runner proxy config // 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) { } catch (error) {
core.setFailed(error.message); core.setFailed(error.message);
} }