2020-10-30 06:08:54 +00:00
pre-push :
parallel : true
commands :
danger :
run : bundle exec danger dry_run
eslint :
tags : frontend style
2021-03-04 09:10:52 +00:00
files : git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD
2021-03-16 15:11:17 +00:00
glob : '*.{js,vue}'
2021-03-02 00:11:26 +00:00
run : yarn run lint:eslint {files}
2020-10-30 06:08:54 +00:00
haml-lint :
tags : view haml style
2021-03-04 09:10:52 +00:00
files : git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD
2021-03-16 15:11:17 +00:00
glob : '*.html.haml'
2020-10-30 06:08:54 +00:00
run : bundle exec haml-lint --config .haml-lint.yml {files}
2020-11-03 12:08:55 +00:00
markdownlint :
tags : documentation style
2021-03-04 09:10:52 +00:00
files : git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD
2021-03-16 15:11:17 +00:00
glob : 'doc/*.md'
2020-11-03 12:08:55 +00:00
run : yarn markdownlint {files}
2021-02-18 09:09:23 +00:00
stylelint :
2020-10-30 06:08:54 +00:00
tags : stylesheet css style
2021-03-04 09:10:52 +00:00
files : git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD
2021-03-16 15:11:17 +00:00
glob : '*.scss{,.css}'
run : yarn stylelint {files}
2021-02-17 15:09:21 +00:00
prettier :
tags : frontend style
2021-03-04 09:10:52 +00:00
files : git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD
2021-03-16 15:11:17 +00:00
glob : '*.{js,vue,graphql}'
2021-02-17 15:09:21 +00:00
run : yarn run prettier --check {files}
2020-10-30 06:08:54 +00:00
rubocop :
tags : backend style
2021-03-04 09:10:52 +00:00
files : git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD
2021-03-16 15:11:17 +00:00
glob : '*.rb'
2021-03-18 12:09:01 +00:00
run : REVEAL_RUBOCOP_TODO=0 bundle exec rubocop --parallel --force-exclusion {files}
2021-03-18 06:11:52 +00:00
vale: # Requires Vale : https://docs.gitlab.com/ee/development/documentation/#install-linters
2020-11-03 12:08:55 +00:00
tags : documentation style
2021-03-04 09:10:52 +00:00
files : git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD
2021-03-16 15:11:17 +00:00
glob : 'doc/*.md'
2020-11-03 12:08:55 +00:00
run : if command -v vale 2> /dev/null; then vale --config .vale.ini --minAlertLevel error {files}; else echo "Vale not found. Install Vale"; fi
2021-06-28 18:08:39 +00:00
gettext :
skip: true # This is disabled by default. You can enable this check by adding skip : false in lefhook-local.yml https://github.com/evilmartians/lefthook/blob/master/docs/full_guide.md#skipping-commands
tags : backend frontend view haml
files : git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD | while read file;do git diff --unified=1 $(git merge-base origin/master HEAD)..HEAD $file | grep -Fqe '_(' && echo $file;done; true
glob : "*.{haml,rb,js,vue}"
run : bin/rake gettext:updated_check