-
Notifications
You must be signed in to change notification settings - Fork 11
93 lines (93 loc) · 2.75 KB
/
reviewdog.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
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 \
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'