2021-01-29 00:20:46 +05:30
pre-push :
parallel : true
commands :
danger :
run : bundle exec danger dry_run
eslint :
tags : frontend style
2021-04-17 20:07:23 +05:30
files : git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD
2021-04-29 21:17:54 +05:30
glob : '*.{js,vue}'
2021-04-17 20:07:23 +05:30
run : yarn run lint:eslint {files}
2021-01-29 00:20:46 +05:30
haml-lint :
tags : view haml style
2021-04-17 20:07:23 +05:30
files : git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD
2021-04-29 21:17:54 +05:30
glob : '*.html.haml'
2021-01-29 00:20:46 +05:30
run : bundle exec haml-lint --config .haml-lint.yml {files}
markdownlint :
tags : documentation style
2021-04-17 20:07:23 +05:30
files : git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD
2021-04-29 21:17:54 +05:30
glob : 'doc/*.md'
2021-01-29 00:20:46 +05:30
run : yarn markdownlint {files}
2021-04-17 20:07:23 +05:30
stylelint :
2021-01-29 00:20:46 +05:30
tags : stylesheet css style
2021-04-17 20:07:23 +05:30
files : git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD
2021-04-29 21:17:54 +05:30
glob : '*.scss{,.css}'
run : yarn stylelint {files}
2021-04-17 20:07:23 +05:30
prettier :
tags : frontend style
files : git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD
2021-04-29 21:17:54 +05:30
glob : '*.{js,vue,graphql}'
2021-04-17 20:07:23 +05:30
run : yarn run prettier --check {files}
2021-01-29 00:20:46 +05:30
rubocop :
tags : backend style
2021-04-17 20:07:23 +05:30
files : git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD
2021-04-29 21:17:54 +05:30
glob : '*.rb'
run : REVEAL_RUBOCOP_TODO=0 bundle exec rubocop --parallel --force-exclusion {files}
2021-12-11 22:18:48 +05:30
graphql_docs :
tags : documentation
files : git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD
glob : '{app/graphql/**/*.rb,ee/app/graphql/**/*.rb}'
run : bundle exec rake gitlab:graphql:check_docs
2021-01-29 00:20:46 +05:30
vale: # Requires Vale : https://docs.gitlab.com/ee/development/documentation/#install-linters
tags : documentation style
2021-04-17 20:07:23 +05:30
files : git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD
2021-04-29 21:17:54 +05:30
glob : 'doc/*.md'
2021-01-29 00:20:46 +05:30
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-09-30 23:02:18 +05:30
gettext :
2021-10-27 15:23:28 +05:30
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-09-30 23:02:18 +05:30
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-10-27 15:23:28 +05:30
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}