-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlefthook.yml
More file actions
35 lines (31 loc) · 829 Bytes
/
lefthook.yml
File metadata and controls
35 lines (31 loc) · 829 Bytes
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
lint:
commands: &lint
lint-frozen-strings:
glob: "*.rb"
run: bundle exec rubocop --only Style/FrozenStringLiteralComment,Layout/EmptyLineAfterMagicComment --format quiet --autocorrect
rubocop:
commands: &rubocop
rubocop-rspec:
glob: "spec/*"
run: bundle exec rubocop --only RSpec --format quiet
pre-commit:
parallel: true
commands:
<<: [*lint, *rubocop]
standardrb:
glob: "*.rb"
run: bundle exec standardrb {staged_files}
rspec:
glob: "*_spec.rb"
run: bundle exec rspec {staged_files} --format failures
post-checkout:
commands:
bundle-install:
run: bundle check || bundle install
pre-push:
parallel: true
commands:
bundler-audit:
run: bundle audit --update --quiet
rspec:
run: bundle exec rspec --format failures