2020-10-30 02:08:54 -04:00
pre-push :
parallel : true
commands :
danger :
run : bundle exec danger dry_run
eslint :
tags : frontend style
2021-03-04 04:10:52 -05:00
files : git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD
2021-03-16 11:11:17 -04:00
glob : '*.{js,vue}'
2021-03-01 19:11:26 -05:00
run : yarn run lint:eslint {files}
2020-10-30 02:08:54 -04:00
haml-lint :
tags : view haml style
2021-03-04 04:10:52 -05:00
files : git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD
2021-03-16 11:11:17 -04:00
glob : '*.html.haml'
2020-10-30 02:08:54 -04:00
run : bundle exec haml-lint --config .haml-lint.yml {files}
2020-11-03 07:08:55 -05:00
markdownlint :
tags : documentation style
2021-03-04 04:10:52 -05:00
files : git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD
2021-03-16 11:11:17 -04:00
glob : 'doc/*.md'
2020-11-03 07:08:55 -05:00
run : yarn markdownlint {files}
2021-02-18 04:09:23 -05:00
stylelint :
2020-10-30 02:08:54 -04:00
tags : stylesheet css style
2021-03-04 04:10:52 -05:00
files : git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD
2021-03-16 11:11:17 -04:00
glob : '*.scss{,.css}'
run : yarn stylelint {files}
2021-02-17 10:09:21 -05:00
prettier :
tags : frontend style
2021-03-04 04:10:52 -05:00
files : git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD
2021-03-16 11:11:17 -04:00
glob : '*.{js,vue,graphql}'
2021-02-17 10:09:21 -05:00
run : yarn run prettier --check {files}
2020-10-30 02:08:54 -04:00
rubocop :
tags : backend style
2021-03-04 04:10:52 -05:00
files : git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD
2021-03-16 11:11:17 -04:00
glob : '*.rb'
2021-03-18 08:09:01 -04:00
run : REVEAL_RUBOCOP_TODO=0 bundle exec rubocop --parallel --force-exclusion {files}
2021-03-18 02:11:52 -04:00
vale: # Requires Vale : https://docs.gitlab.com/ee/development/documentation/#install-linters
2020-11-03 07:08:55 -05:00
tags : documentation style
2021-03-04 04:10:52 -05:00
files : git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD
2021-03-16 11:11:17 -04:00
glob : 'doc/*.md'
2020-11-03 07:08:55 -05: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 14:08:39 -04:00
gettext :
2021-08-08 23:10:10 -04:00
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
2021-06-28 14:08:39 -04:00
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
2021-08-08 23:10:10 -04:00
docs-metadata : # See https://docs.gitlab.com/ee/development/documentation/#metadata
tags : documentation style
files : git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD
glob : 'doc/*.md'
run : scripts/lint-docs-metadata.sh {files}