Skip to content

reviewdog

reviewdog #2405

Workflow file for this run

name: reviewdog
on:
pull_request:
branches: [ main ]
merge_group:
jobs:
rubocop:
name: rubocop
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- run: bundle exec rubocop -v
- name: rubocop
uses: reviewdog/action-rubocop@v2
with:
rubocop_version: gemfile
rubocop_extensions: rubocop-rails:gemfile rubocop-rspec:gemfile rubocop-performance:gemfile
skip_install: true
use_bundler: true
rubocop_flags: --config ./.rubocop.yml
fail_on_error: true
reporter: github-pr-review
brakeman:
name: brakeman
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- run: bundle exec brakeman -v
- uses: reviewdog/action-setup@v1
- name: brakeman
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
bundle exec brakeman --quiet --format tabs | reviewdog \
-f=brakeman -name="brakeman" \
-reporter="github-pr-review" \
-fail-on-error
haml_lint:
name: haml-lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- uses: reviewdog/action-setup@v1
- run: bundle exec haml-lint -v
- name: haml-lint
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
bundle exec haml-lint app/views | reviewdog \
-f=haml-lint -name="haml-lint" \
-reporter="github-pr-review" \
-fail-on-error
eslint:
name: eslint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- run: npm install eslint@9 @stylistic/eslint-plugin@2
- run: npx eslint -v
- uses: reviewdog/action-eslint@v1
with:
eslint_flags: 'app/assets/javascripts'
fail_on_error: true
reporter: github-pr-review
stylelint:
name: stylelint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- run: |
npm install stylelint@~14.2.0 \
[email protected] \
stylelint-scss@~4.1.0 \
stylelint-order@~5.0.0 \
stylelint-declaration-strict-value@~1.8.0
- run: npx stylelint -v
- uses: reviewdog/action-stylelint@v1
with:
github_token: ${{ secrets.github_token }}
fail_on_error: true
reporter: github-pr-review
stylelint_input: 'app/assets/stylesheets/**/*.scss'