From e789b8d4c13bae4cbc7e156b073b4e46accd8b34 Mon Sep 17 00:00:00 2001 From: Yamagishi Kazutoshi Date: Fri, 17 Jun 2022 05:09:43 +0900 Subject: [PATCH] Set-up Problem Matchers (#18598) --- .github/stylelint-matcher.json | 21 +++++++++++++++++++++ .github/workflows/linter.yml | 12 ++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 .github/stylelint-matcher.json diff --git a/.github/stylelint-matcher.json b/.github/stylelint-matcher.json new file mode 100644 index 000000000..cdfd4086b --- /dev/null +++ b/.github/stylelint-matcher.json @@ -0,0 +1,21 @@ +{ + "problemMatcher": [ + { + "owner": "stylelint", + "pattern": [ + { + "regexp": "^([^\\s].*)$", + "file": 1 + }, + { + "regexp": "^\\s+((\\d+):(\\d+))?\\s+(✖|×)\\s+(.*)\\s{2,}(.*)$", + "line": 2, + "column": 3, + "message": 5, + "code": 6, + "loop": true + } + ] + } + ] +} diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index fd535ea9a..f77a9720e 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -50,8 +50,19 @@ jobs: # Full git history is needed to get a proper list of changed files within `super-linter` fetch-depth: 0 + - name: Set-up Node.js + uses: actions/setup-node@v3 + with: + node-version: 16.x + cache: yarn - name: Intall dependencies run: yarn install --frozen-lockfile + - name: Set-up RuboCop Problem Mathcher + uses: r7kamura/rubocop-problem-matchers-action@v1 + - name: Set-up Stylelint Problem Matcher + uses: xt0rted/stylelint-problem-matcher@v1 + # https://github.com/xt0rted/stylelint-problem-matcher/issues/360 + - run: echo "::add-matcher::.github/stylelint-matcher.json" ################################ # Run Linter against code base # @@ -61,6 +72,7 @@ jobs: env: CSS_FILE_NAME: stylelint.config.js DEFAULT_BRANCH: main + NO_COLOR: 1 # https://github.com/xt0rted/stylelint-problem-matcher/issues/360 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} JAVASCRIPT_ES_CONFIG_FILE: .eslintrc.js LINTER_RULES_PATH: .