Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lefthook.yml')
-rw-r--r--lefthook.yml32
1 files changed, 25 insertions, 7 deletions
diff --git a/lefthook.yml b/lefthook.yml
index f29de0a791d..27a237a8fb3 100644
--- a/lefthook.yml
+++ b/lefthook.yml
@@ -23,6 +23,7 @@ pre-push:
markdownlint:
tags: documentation style
files: git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD
+ exclude: "doc/api/graphql/reference/index.md"
glob: 'doc/*.md'
run: yarn markdownlint {files}
yamllint:
@@ -40,11 +41,6 @@ pre-push:
files: git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD
glob: '*.{js,vue,graphql}'
run: yarn run prettier --check {files}
- rubocop:
- tags: backend style
- files: git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD
- glob: '*.{rb,rake}'
- run: REVEAL_RUBOCOP_TODO=0 bundle exec rubocop --config .rubocop.yml --parallel --force-exclusion {files}
sidekiq-queues:
tags: backend
files: git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD
@@ -58,8 +54,9 @@ pre-push:
vale: # Requires Vale: https://docs.gitlab.com/ee/development/documentation/testing.html#install-linters
tags: documentation style
files: git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD
+ exclude: "doc/api/graphql/reference/index.md"
glob: 'doc/*.md'
- 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'
+ 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://vale.sh/docs/vale-cli/installation/."; exit 1; fi'
gettext:
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
@@ -73,6 +70,7 @@ pre-push:
docs-trailing_spaces: # Not enforced in CI/CD pipelines, but reduces the amount of required cleanup: https://gitlab.com/gitlab-org/technical-writing/-/blob/main/.gitlab/issue_templates/tw-monthly-tasks.md#remote-tasks
tags: documentation style
files: git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD
+ exclude: "doc/api/graphql/reference/index.md"
glob: 'doc/*.md'
run: yarn markdownlint:no-trailing-spaces {files}
docs-deprecations:
@@ -85,6 +83,11 @@ pre-push:
files: git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD
glob: 'db/structure.sql'
run: scripts/validate_schema_changes
+ db-migration-name-collisions:
+ tags: database
+ files: git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD
+ glob: '{db/migrate/*.rb,db/post_migrate/*.rb,ee/elastic/migrate/*.rb}'
+ run: scripts/validate_name_collisions_between_migrations
static-verification:
skip: true # This is disabled by default. You can enable this check by adding skip: false in lefthook-local.yml https://github.com/evilmartians/lefthook/blob/master/docs/configuration.md#skip
tags: backend
@@ -95,6 +98,16 @@ pre-push:
tags: backend bundler
glob: 'Gemfile.lock'
run: bundle exec bundler-checksum lint
+ audit_event_types_docs:
+ tags: documentation
+ files: git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD
+ glob: '{config/audit_events/types/*.yml,ee/config/audit_events/types/*yml}'
+ run: bundle exec rake gitlab:audit_event_types:check_docs
+ rubocop:
+ tags: backend style
+ files: git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD
+ glob: '*.{rb,rake}'
+ run: REVEAL_RUBOCOP_TODO=0 bundle exec rubocop --parallel --force-exclusion {files}
scripts:
"merge_conflicts":
@@ -107,6 +120,11 @@ pre-push:
pre-commit:
parallel: true
commands:
+ rubocop:
+ tags: backend style
+ files: git diff --name-only --diff-filter=d --staged
+ glob: '*.{rb,rake}'
+ run: REVEAL_RUBOCOP_TODO=0 bundle exec rubocop --parallel --force-exclusion {files}
secrets-detection:
tags: secrets
files: git diff --name-only --diff-filter=d --staged
@@ -134,7 +152,7 @@ auto-fix:
tags: backend style
files: git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD
glob: '*.{rb,rake}'
- run: REVEAL_RUBOCOP_TODO=0 bundle exec rubocop --config .rubocop.yml --parallel --autocorrect --force-exclusion {files}
+ run: REVEAL_RUBOCOP_TODO=0 bundle exec rubocop --parallel --autocorrect --force-exclusion {files}
gettext:
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