Skip to content

Commit

Permalink
Merge pull request #189 from williamtheaker/main
Browse files Browse the repository at this point in the history
Add problem matcher for rubocop.
  • Loading branch information
dafyddcrosby authored Nov 17, 2023
2 parents 1ed5d4e + 7cd12df commit 9e44ba8
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 12 deletions.
32 changes: 32 additions & 0 deletions .github/rubocop_matcher.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"problemMatcher": [
{
"owner": "rubocop-error",
"severity": "error",
"pattern": [
{
"regexp": "^(.+):(\\d+):(\\d+): C: ((.+): .+)$",
"file": 1,
"line": 2,
"column": 3,
"message": 4,
"code": 5
}
]
},
{
"owner": "rubocop-warning",
"severity": "warning",
"pattern": [
{
"regexp": "^(.+):(\\d+):(\\d+): W: ((.+): .+)$",
"file": 1,
"line": 2,
"column": 3,
"message": 4,
"code": 5
}
]
}
]
}
14 changes: 2 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,10 @@ jobs:
run: bundle install
- name: Run rspec
run: bundle exec rspec
- name: Enable rubocop matcher
run: echo "::add-matcher::.github/rubocop_matcher.json"
- name: Run rubocop
run: bundle exec rubocop --display-cop-names
# This doesn't work on PRs from forks due to GITHUB_TOKEN, which makes
# it kinda useless for now
# https://github.com/andrewmcodes/rubocop-linter-action/issues/68
# rubocop:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout repository
# uses: actions/checkout@v3
# - name: Run Rubocop Linter
# uses: andrewmcodes/rubocop-linter-action@v3.2.0
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
markdown:
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit 9e44ba8

Please sign in to comment.