2020-10-30 02:08:54 -04:00
pre-push :
parallel : true
commands :
danger :
2022-03-23 20:07:27 -04:00
run : bundle exec rake danger_local
2020-10-30 02:08:54 -04:00
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-10-25 05:12:21 -04:00
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-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'
2022-04-06 08:08:29 -04:00
run : 'if [ $VALE_WARNINGS ]; then minWarnings=warning; else minWarnings=error; fi; if command -v vale > /dev/null 2>&1; then if ! vale --config .vale.ini --minAlertLevel $minWarnings {files}; then echo "ERROR: Fix any linting errors and make sure you are using the latest version of Vale."; exit 1; fi; else echo "ERROR: Vale not found. For more information, see https://docs.errata.ai/vale/install."; exit 1; 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}
2022-02-17 01:17:38 -05:00
docs-deprecations :
tags : documentation
files : git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD
glob : 'data/deprecations/*.yml'
run : echo "Changes to deprecation files detected. Checking deprecations..\n"; bundle exec rake gitlab:docs:check_deprecations
docs-removals :
tags : documentation
files : git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD
glob : 'data/removals/**/*.yml'
run : echo "Changes to removals files detected. Checking removals..\n"; bundle exec rake gitlab:docs:check_removals