diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-10 18:11:00 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-10 18:11:00 +0300 |
commit | ad2d90fb2475c9660b04951cd93ee969cf78c09b (patch) | |
tree | e416d05f5fc0043b1b3c04837e22b2890886e9a6 /lefthook.yml | |
parent | 5103041796d8b3cfcfc5fdb010ebc6a3bb814df1 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lefthook.yml')
-rw-r--r-- | lefthook.yml | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/lefthook.yml b/lefthook.yml index 6a80713450f..d5c0230f12b 100644 --- a/lefthook.yml +++ b/lefthook.yml @@ -96,6 +96,7 @@ pre-push: "merge_conflicts": 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/configuration.md#skip runner: bash + pre-commit: parallel: true commands: @@ -103,3 +104,27 @@ pre-commit: tags: secrets files: git diff --name-only --diff-filter=d --staged run: 'if command -v gitleaks > /dev/null 2>&1; then gitleaks protect --no-banner --staged --redact --verbose; else echo "WARNING: gitleaks is not installed. Please install it. See https://github.com/zricethezav/gitleaks#installing."; fi' + +auto-fix: + parallel: true + commands: + frontend: + tags: frontend style + files: git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD + glob: '*.{js,vue}' + run: 'yarn run lint:eslint:fix {files} && yarn run prettier --write --list-different {files}' + jsonlint: + tags: style + files: git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD + glob: '*.{json}' + run: scripts/lint-json --format --verbose {files} + prettier-graphql: + tags: frontend style + files: git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD + glob: '*.{graphql}' + run: yarn run prettier --write --list-different {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 --parallel --autocorrect --force-exclusion {files} |