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:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-04-06 15:08:29 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-04-06 15:08:29 +0300
commit39c98649d20e08428f507e0728b0bd87a299e5cf (patch)
tree6ca0ae12d9498f9158b7f8da9bad97f1517b0d83 /doc/development/documentation/testing.md
parentc16b752f86f78442349b7b2cd9106109de10763b (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/development/documentation/testing.md')
-rw-r--r--doc/development/documentation/testing.md29
1 files changed, 29 insertions, 0 deletions
diff --git a/doc/development/documentation/testing.md b/doc/development/documentation/testing.md
index bb8f6a4b4a9..9facb22669b 100644
--- a/doc/development/documentation/testing.md
+++ b/doc/development/documentation/testing.md
@@ -365,6 +365,35 @@ file for the [`gitlab`](https://gitlab.com/gitlab-org/gitlab) project.
To set up `lefthook` for documentation linting, see
[Pre-push static analysis](../contributing/style_guides.md#pre-push-static-analysis-with-lefthook).
+#### Show Vale warnings on push
+
+By default, `lefthook` shows only Vale errors when pushing changes to a branch. The default branches
+have no Vale errors, so any errors listed here are introduced by commits to the branch.
+
+To also see the Vale warnings when pushing to a branch, set a local environment variable: `VALE_WARNINGS=true`.
+
+Enable Vale warnings on push to improve the documentation suite by:
+
+- Detecting warnings you might be introducing with your commits.
+- Identifying warnings that already exist in the page, which you can resolve to reduce technical debt.
+
+These warnings:
+
+- Don't stop the push from working.
+- Don't result in a broken pipeline.
+- Include all warnings for a file, not just warnings that are introduced by the commits.
+
+To enable Vale warnings on push:
+
+- Automatically, add `VALE_WARNINGS=true` to your shell configuration.
+- Manually, prepend `VALE_WARNINGS=true` to invocations of `lefthook`. For example:
+
+ ```shell
+ VALE_WARNINGS=true bundle exec lefthook run pre-push
+ ```
+
+You can also [configure your editor](#configure-editors) to show Vale warnings.
+
### Show subset of Vale alerts
You can set Visual Studio Code to display only a subset of Vale alerts when viewing files: