Skip to content
代码片段 群组 项目
提交 3c5f3811 编辑于 作者: Kerri Miller's avatar Kerri Miller 提交者: David Dieulivol
浏览文件

Move rubocop check to pre_commit hook

Running rubocop checks on push is frustrating, as correcting any errors
requires either a new commit or an --amend. By moving rubocop checks to
pre_commit, we can instead prevent issues it complains about from
entering the tree entirely, helping users to prevent stubbing their toe
when they later attempt to push.
上级 0d3884d2
No related branches found
No related tags found
无相关合并请求
......@@ -41,11 +41,6 @@ pre-push:
files: git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD
glob: '*.{js,vue,graphql}'
run: yarn run prettier --check {files}
rubocop:
tags: backend style
files: git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD
glob: '*.{rb,rake}'
run: REVEAL_RUBOCOP_TODO=0 bundle exec rubocop --parallel --force-exclusion {files}
sidekiq-queues:
tags: backend
files: git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD
......@@ -115,6 +110,11 @@ pre-push:
pre-commit:
parallel: true
commands:
rubocop:
tags: backend style
files: git diff --name-only --diff-filter=d --staged
glob: '*.{rb,rake}'
run: REVEAL_RUBOCOP_TODO=0 bundle exec rubocop --parallel --force-exclusion {files}
secrets-detection:
tags: secrets
files: git diff --name-only --diff-filter=d --staged
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册