From adc0a84f75bf2eb632cf3ff39f2b5b0cea9bb26d Mon Sep 17 00:00:00 2001 From: Mario Celi <mcelicalderon@gitlab.com> Date: Thu, 20 Jul 2023 12:35:03 -0500 Subject: [PATCH] Exclude GraphQL markdown reference from lefthook lints Excluding doc/api/graphql/reference/index.md from vale, markdown-lint and docs-trailing_spaces --- lefthook.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lefthook.yml b/lefthook.yml index 7a3c7e5d1741..85f1f671d55c 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: @@ -58,6 +59,7 @@ 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' gettext: @@ -73,6 +75,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: -- GitLab