Last active
August 4, 2022 11:22
-
-
Save vadviktor/3c975be22f3e653709252600737631e7 to your computer and use it in GitHub Desktop.
git hooks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# See https://pre-commit.com for more information | |
# See https://pre-commit.com/hooks.html for more hooks | |
# https://gist.github.com/vadviktor/3c975be22f3e653709252600737631e7 | |
default_language_version: | |
ruby: 2.6.6 | |
repos: | |
- repo: https://github.com/pre-commit/pre-commit-hooks | |
rev: v4.3.0 | |
hooks: | |
- id: trailing-whitespace | |
stages: [ commit ] | |
files: ^apps|spec | |
exclude: | | |
(?x)^( | |
spec/vcr_cassettes/.+?| | |
.+\.snap | |
)$ | |
- repo: https://github.com/adrienverge/yamllint | |
rev: v1.27.1 | |
hooks: | |
- id: yamllint | |
stages: [ commit ] | |
name: Lint Yaml files | |
files: ^config/locales|changelog | |
types: | |
- yaml | |
- repo: local | |
hooks: | |
- id: rubocop | |
stages: [ commit ] | |
name: Lint and autoformat Ruby files | |
language: ruby | |
language_version: 2.6.6 | |
additional_dependencies: | |
- rails:5.2.6.3 | |
- rubocop:0.81.0 | |
- rubocop-performance:1.5.2 | |
- rubocop-rails:2.5.2 | |
entry: rubocop -c .rubocop.yml --force-exclusion --extra-details --display-style-guide --auto-correct --safe | |
types: | |
- ruby | |
- id: brakeman | |
stages: [ commit ] | |
name: Scan for security vulnerabilities | |
language: ruby | |
language_version: 2.6.6 | |
additional_dependencies: | |
- brakeman | |
entry: brakeman -5 --no-pager --skip-files bin/local/ --force | |
types: | |
- ruby | |
- id: annotate | |
stages: [ commit ] | |
name: Annotate model related files | |
language: ruby | |
language_version: 2.6.6 | |
additional_dependencies: | |
- annotate:3.1.1 | |
entry: annotate --frozen | |
types: | |
- ruby |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment