From da2f6a5e33bf2f6ce3ccbab61f4d3361e63a9f52 Mon Sep 17 00:00:00 2001 From: Danny McCormick Date: Mon, 17 Jun 2019 16:32:07 -0400 Subject: [PATCH] Add eslint problem matchers --- .github/eslint-compact.json | 18 +++++++++++++++++ .github/eslint-stylish.json | 40 +++++++++++++++++++++++++++++++++++++ lib/setup-node.js | 2 ++ src/setup-node.ts | 2 ++ 4 files changed, 62 insertions(+) create mode 100644 .github/eslint-compact.json create mode 100644 .github/eslint-stylish.json diff --git a/.github/eslint-compact.json b/.github/eslint-compact.json new file mode 100644 index 00000000..dd151e12 --- /dev/null +++ b/.github/eslint-compact.json @@ -0,0 +1,18 @@ +{ + "problemMatcher": [ + { + "owner": "tsc", + "pattern": [ + { + "regexp": "/^(.+):\\sline\\s(\\d+),\\scol\\s(\\d+),\\s(Error|Warning|Info)\\s-\\s(.+)\\s\\((.+)\\)$/", + "file": 1, + "line": 2, + "character": 3, + "severity": 4, + "message": 5, + "code": 6 + } + ] + } + ] +} \ No newline at end of file diff --git a/.github/eslint-stylish.json b/.github/eslint-stylish.json new file mode 100644 index 00000000..9574eafe --- /dev/null +++ b/.github/eslint-stylish.json @@ -0,0 +1,40 @@ +{ + "problemMatcher": [ + { + "owner": "eslint-stylish", + "pattern": [ + { + "regexp": "^([^\\s].*)$", + "file": 1 + }, + { + "regexp": "^\\s+(\\d+):(\\d+)\\s+(error|warning|info)\\s+(.*)\\s\\s+(.*)$", + "line": 1, + "column": 2, + "severity": 3, + "message": 4, + "code": 5, + "loop": true + } + ] + }, + { + "owner": "eslint-stylish", + "pattern": [ + { + "regexp": "^([^\\s].*)$", + "file": 1 + }, + { + "regexp": "^\\s+(\\d+):(\\d+)\\s+(error|warning|info)\\s+(.*)\\s\\s+(.*)$", + "line": 1, + "column": 2, + "severity": 3, + "message": 4, + "code": 5, + "loop": true + } + ] + } + ] +} \ No newline at end of file diff --git a/lib/setup-node.js b/lib/setup-node.js index 10614ba5..fcc5f4e2 100644 --- a/lib/setup-node.js +++ b/lib/setup-node.js @@ -31,6 +31,8 @@ function run() { } // TODO: setup proxy from runner proxy config console.log('##[add-matcher].github/tsc.json'); + console.log('##[add-matcher].github/eslint-stylish.json'); + console.log('##[add-matcher].github/eslint-compact.json'); } catch (error) { core.setFailed(error.message); diff --git a/src/setup-node.ts b/src/setup-node.ts index 18625d8f..fb7443ea 100644 --- a/src/setup-node.ts +++ b/src/setup-node.ts @@ -15,6 +15,8 @@ async function run() { // TODO: setup proxy from runner proxy config console.log('##[add-matcher].github/tsc.json'); + console.log('##[add-matcher].github/eslint-stylish.json'); + console.log('##[add-matcher].github/eslint-compact.json'); } catch (error) { core.setFailed(error.message); }