From d647bb4bd04e98f9edfe68d1633720cde7c67b30 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Fri, 30 May 2025 11:03:04 +0200 Subject: [PATCH] ci: add a problem matcher for ESLint output (#47308) Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: David Sanders --- .github/problem-matchers/eslint-stylish.json | 22 ++++++++++++++++++++ .github/workflows/pipeline-electron-lint.yml | 3 +++ 2 files changed, 25 insertions(+) create mode 100644 .github/problem-matchers/eslint-stylish.json diff --git a/.github/problem-matchers/eslint-stylish.json b/.github/problem-matchers/eslint-stylish.json new file mode 100644 index 000000000000..a98afcfb11b9 --- /dev/null +++ b/.github/problem-matchers/eslint-stylish.json @@ -0,0 +1,22 @@ +{ + "problemMatcher": [ + { + "owner": "eslint-stylish", + "pattern": [ + { + "regexp": "^\\s*([^\\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 + } + ] + } + ] +} diff --git a/.github/workflows/pipeline-electron-lint.yml b/.github/workflows/pipeline-electron-lint.yml index 88445a478a5c..a49ce67b62f8 100644 --- a/.github/workflows/pipeline-electron-lint.yml +++ b/.github/workflows/pipeline-electron-lint.yml @@ -62,6 +62,9 @@ jobs: curl -sL "https://chromium.googlesource.com/chromium/src/+/${chromium_revision}/buildtools/DEPS?format=TEXT" | base64 -d > src/buildtools/DEPS gclient sync --spec="solutions=[{'name':'src/buildtools','url':None,'deps_file':'DEPS','custom_vars':{'process_deps':True},'managed':False}]" + - name: Add ESLint problem matcher + shell: bash + run: echo "::add-matcher::src/electron/.github/problem-matchers/eslint-stylish.json" - name: Run Lint shell: bash run: |