mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-17 23:37:54 +00:00
Set-up Problem Matchers (#18598)
This commit is contained in:
parent
b37825f2e2
commit
e789b8d4c1
21
.github/stylelint-matcher.json
vendored
Normal file
21
.github/stylelint-matcher.json
vendored
Normal file
|
@ -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
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
12
.github/workflows/linter.yml
vendored
12
.github/workflows/linter.yml
vendored
|
@ -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: .
|
||||
|
|
Loading…
Reference in a new issue