Commit 74244377 authored by Marcel Amirault's avatar Marcel Amirault

Merge branch 'eread/relative-link-extension-rule' into 'master'

Check for incorrect extension on internal links

See merge request gitlab-org/gitlab!26627
parents 19b7883d 96ab8c67
---
# Checks that internal links have .md extenstion and not .html extension.
#
# For a list of all options, see https://errata-ai.github.io/vale/styles/
extends: existence
message: Link %s must use the .md file extension.
link: https://docs.gitlab.com/ee/development/documentation/styleguide.html#links-to-internal-documentation
level: error
scope: raw
raw:
- '\[.+\]\((https?:){0}[\w\/\.]+(\.html).*\)'
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
The Audit Events API allows you to retrieve [instance audit events](../administration/audit_events.md#instance-events-premium-only). The Audit Events API allows you to retrieve [instance audit events](../administration/audit_events.md#instance-events-premium-only).
To retrieve audit events using the API, you must [authenticate yourself](README.html#authentication) as an Administrator. To retrieve audit events using the API, you must [authenticate yourself](README.md#authentication) as an Administrator.
### Retrieve all instance audit events ### Retrieve all instance audit events
...@@ -126,7 +126,7 @@ Example response: ...@@ -126,7 +126,7 @@ Example response:
The Group Audit Events API allows you to retrieve [group audit events](../administration/audit_events.md#group-events-starter). The Group Audit Events API allows you to retrieve [group audit events](../administration/audit_events.md#group-events-starter).
To retrieve group audit events using the API, you must [authenticate yourself](README.html#authentication) as an Administrator or an owner of the group. To retrieve group audit events using the API, you must [authenticate yourself](README.md#authentication) as an Administrator or an owner of the group.
### Retrieve all group audit events ### Retrieve all group audit events
......
...@@ -14,7 +14,7 @@ POST /api/v4/markdown ...@@ -14,7 +14,7 @@ POST /api/v4/markdown
| --------- | ------- | ------------- | ------------------------------------------ | | --------- | ------- | ------------- | ------------------------------------------ |
| `text` | string | yes | The Markdown text to render | | `text` | string | yes | The Markdown text to render |
| `gfm` | boolean | no (optional) | Render text using GitLab Flavored Markdown. Default is `false` | | `gfm` | boolean | no (optional) | Render text using GitLab Flavored Markdown. Default is `false` |
| `project` | string | no (optional) | Use `project` as a context when creating references using GitLab Flavored Markdown. [Authentication](README.html#authentication) is required if a project is not public. | | `project` | string | no (optional) | Use `project` as a context when creating references using GitLab Flavored Markdown. [Authentication](README.md#authentication) is required if a project is not public. |
```shell ```shell
curl --header Content-Type:application/json --data '{"text":"Hello world! :tada:", "gfm":true, "project":"group_example/project_example"}' https://gitlab.example.com/api/v4/markdown curl --header Content-Type:application/json --data '{"text":"Hello world! :tada:", "gfm":true, "project":"group_example/project_example"}' https://gitlab.example.com/api/v4/markdown
......
...@@ -169,7 +169,7 @@ Like [Get file from repository](repository_files.md#get-file-from-repository) yo ...@@ -169,7 +169,7 @@ Like [Get file from repository](repository_files.md#get-file-from-repository) yo
## Create new file in repository ## Create new file in repository
This allows you to create a single file. For creating multiple files with a single request see the [commits API](commits.html#create-a-commit-with-multiple-files-and-actions). This allows you to create a single file. For creating multiple files with a single request see the [commits API](commits.md#create-a-commit-with-multiple-files-and-actions).
```plaintext ```plaintext
POST /projects/:id/repository/files/:file_path POST /projects/:id/repository/files/:file_path
...@@ -204,7 +204,7 @@ Parameters: ...@@ -204,7 +204,7 @@ Parameters:
## Update existing file in repository ## Update existing file in repository
This allows you to update a single file. For updating multiple files with a single request see the [commits API](commits.html#create-a-commit-with-multiple-files-and-actions). This allows you to update a single file. For updating multiple files with a single request see the [commits API](commits.md#create-a-commit-with-multiple-files-and-actions).
```plaintext ```plaintext
PUT /projects/:id/repository/files/:file_path PUT /projects/:id/repository/files/:file_path
...@@ -250,7 +250,7 @@ Currently GitLab Shell has a boolean return code, preventing GitLab from specify ...@@ -250,7 +250,7 @@ Currently GitLab Shell has a boolean return code, preventing GitLab from specify
## Delete existing file in repository ## Delete existing file in repository
This allows you to delete a single file. For deleting multiple files with a single request, see the [commits API](commits.html#create-a-commit-with-multiple-files-and-actions). This allows you to delete a single file. For deleting multiple files with a single request, see the [commits API](commits.md#create-a-commit-with-multiple-files-and-actions).
```plaintext ```plaintext
DELETE /projects/:id/repository/files/:file_path DELETE /projects/:id/repository/files/:file_path
......
...@@ -224,8 +224,8 @@ Pipelines, and their component jobs and stages, are defined in the [`.gitlab-ci. ...@@ -224,8 +224,8 @@ Pipelines, and their component jobs and stages, are defined in the [`.gitlab-ci.
In particular: In particular:
- Jobs are the [basic configuration](yaml/README.html#introduction) component. - Jobs are the [basic configuration](yaml/README.md#introduction) component.
- Stages are defined using the [`stages`](yaml/README.html#stages) keyword. - Stages are defined using the [`stages`](yaml/README.md#stages) keyword.
For all available configuration options, see the [GitLab CI/CD Pipeline Configuration Reference](yaml/README.md). For all available configuration options, see the [GitLab CI/CD Pipeline Configuration Reference](yaml/README.md).
......
...@@ -85,7 +85,7 @@ the following preparations into account. ...@@ -85,7 +85,7 @@ the following preparations into account.
- Make migrations reversible by using the `change` method or include a `down` method when using `up`. - Make migrations reversible by using the `change` method or include a `down` method when using `up`.
- Include either a rollback procedure or describe how to rollback changes. - Include either a rollback procedure or describe how to rollback changes.
- Add the output of the migration(s) to the MR description. - Add the output of the migration(s) to the MR description.
- Add tests for the migration in `spec/migrations` if necessary. See [Testing Rails migrations at GitLab](testing_guide/testing_migrations_guide.html) for more details. - Add tests for the migration in `spec/migrations` if necessary. See [Testing Rails migrations at GitLab](testing_guide/testing_migrations_guide.md) for more details.
#### Preparation when adding or modifying queries #### Preparation when adding or modifying queries
......
...@@ -99,7 +99,7 @@ Larger instruction sets may have subsections covering specific phases of the pro ...@@ -99,7 +99,7 @@ Larger instruction sets may have subsections covering specific phases of the pro
Where appropriate, provide examples of code or configuration files to better clarify intended usage. Where appropriate, provide examples of code or configuration files to better clarify intended usage.
- Write a step-by-step guide, with no gaps between the steps. - Write a step-by-step guide, with no gaps between the steps.
- Include example code or configurations as part of the relevant step. Use appropriate markdown to [wrap code blocks with syntax highlighting](../../user/markdown.html#colored-code-and-syntax-highlighting). - Include example code or configurations as part of the relevant step. Use appropriate markdown to [wrap code blocks with syntax highlighting](../../user/markdown.md#colored-code-and-syntax-highlighting).
- Start with an h2 (`##`), break complex steps into small steps using - Start with an h2 (`##`), break complex steps into small steps using
subheadings h3 > h4 > h5 > h6. _Never skip a hierarchy level, such subheadings h3 > h4 > h5 > h6. _Never skip a hierarchy level, such
as h2 > h4_, as it will break the TOC and may affect the breadcrumbs. as h2 > h4_, as it will break the TOC and may affect the breadcrumbs.
......
...@@ -642,19 +642,15 @@ do not use this option until further notice. ...@@ -642,19 +642,15 @@ do not use this option until further notice.
Don't: Don't:
```md - `../../merge_requests/`
[merge requests](../../merge_requests/) - `../../issues/tags.html`
[issues](../../issues/tags.html) - `../../issues/tags.html#stages`
[issue tags](../../issues/tags.html#stages)
```
Do: Do:
```md - `../../merge_requests/index.md`
[merge requests](../../merge_requests/index.md) - `../../issues/tags.md`
[issues](../../issues/tags.md) - `../../issues/tags.md#stages`
[issue tags](../../issues/tags.md#stages)
```
- Using the Markdown extension is necessary for the [`/help`](index.md#gitlab-help) - Using the Markdown extension is necessary for the [`/help`](index.md#gitlab-help)
section of GitLab. section of GitLab.
......
...@@ -782,7 +782,7 @@ All tests in `spec/javascripts/` will eventually be migrated to `spec/frontend/` ...@@ -782,7 +782,7 @@ All tests in `spec/javascripts/` will eventually be migrated to `spec/frontend/`
Before May 2018, `features/` also contained feature tests run by Spinach. These tests were removed from the codebase in May 2018 ([#23036](https://gitlab.com/gitlab-org/gitlab-foss/issues/23036)). Before May 2018, `features/` also contained feature tests run by Spinach. These tests were removed from the codebase in May 2018 ([#23036](https://gitlab.com/gitlab-org/gitlab-foss/issues/23036)).
See also [Notes on testing Vue components](../fe_guide/vue.html#testing-vue-components). See also [Notes on testing Vue components](../fe_guide/vue.md#testing-vue-components).
## Test helpers ## Test helpers
......
...@@ -101,10 +101,10 @@ subgraph "CNG-mirror pipeline" ...@@ -101,10 +101,10 @@ subgraph "CNG-mirror pipeline"
### Auto-stopping of Review Apps ### Auto-stopping of Review Apps
Review Apps are automatically stopped 2 days after the last deployment thanks to Review Apps are automatically stopped 2 days after the last deployment thanks to
the [Environment auto-stop](../../ci/environments.html#environments-auto-stop) feature. the [Environment auto-stop](../../ci/environments.md#environments-auto-stop) feature.
If you need your Review App to stay up for a longer time, you can If you need your Review App to stay up for a longer time, you can
[pin its environment](../../ci/environments.html#auto-stop-example) or retry the [pin its environment](../../ci/environments.md#auto-stop-example) or retry the
`review-deploy` job to update the "latest deployed at" time. `review-deploy` job to update the "latest deployed at" time.
The `review-cleanup` job that automatically runs in scheduled The `review-cleanup` job that automatically runs in scheduled
......
...@@ -245,7 +245,7 @@ group. ...@@ -245,7 +245,7 @@ group.
1. Introduced in GitLab 12.2. 1. Introduced in GitLab 12.2.
1. Default project creation role can be changed at: 1. Default project creation role can be changed at:
- The [instance level](admin_area/settings/visibility_and_access_controls.md#default-project-creation-protection). - The [instance level](admin_area/settings/visibility_and_access_controls.md#default-project-creation-protection).
- The [group level](group/index.html#default-project-creation-level). - The [group level](group/index.md#default-project-creation-level).
### Subgroup permissions ### Subgroup permissions
......
...@@ -76,7 +76,7 @@ The Prometheus server will [automatically detect and monitor](https://prometheus ...@@ -76,7 +76,7 @@ The Prometheus server will [automatically detect and monitor](https://prometheus
- `prometheus.io/port` to define the port of the metrics endpoint. - `prometheus.io/port` to define the port of the metrics endpoint.
- `prometheus.io/path` to define the path of the metrics endpoint. Defaults to `/metrics`. - `prometheus.io/path` to define the path of the metrics endpoint. Defaults to `/metrics`.
CPU and Memory consumption is monitored, but requires [naming conventions](prometheus_library/kubernetes.html#specifying-the-environment) in order to determine the environment. If you are using [Auto DevOps](../../../topics/autodevops/), this is handled automatically. CPU and Memory consumption is monitored, but requires [naming conventions](prometheus_library/kubernetes.md#specifying-the-environment) in order to determine the environment. If you are using [Auto DevOps](../../../topics/autodevops/), this is handled automatically.
The [NGINX Ingress](../clusters/index.md#installing-applications) that is deployed by GitLab to clusters, is automatically annotated for monitoring providing key response metrics: latency, throughput, and error rates. The [NGINX Ingress](../clusters/index.md#installing-applications) that is deployed by GitLab to clusters, is automatically annotated for monitoring providing key response metrics: latency, throughput, and error rates.
...@@ -834,7 +834,7 @@ If the "No data found" screen continues to appear, it could be due to: ...@@ -834,7 +834,7 @@ If the "No data found" screen continues to appear, it could be due to:
- No successful deployments have occurred to this environment. - No successful deployments have occurred to this environment.
- Prometheus does not have performance data for this environment, or the metrics - Prometheus does not have performance data for this environment, or the metrics
are not labeled correctly. To test this, connect to the Prometheus server and are not labeled correctly. To test this, connect to the Prometheus server and
[run a query](prometheus_library/kubernetes.html#metrics-supported), replacing `$CI_ENVIRONMENT_SLUG` [run a query](prometheus_library/kubernetes.md#metrics-supported), replacing `$CI_ENVIRONMENT_SLUG`
with the name of your environment. with the name of your environment.
- You may need to re-add the GitLab predefined common metrics. This can be done by running the [import common metrics rake task](../../../administration/raketasks/maintenance.md#import-common-metrics). - You may need to re-add the GitLab predefined common metrics. This can be done by running the [import common metrics rake task](../../../administration/raketasks/maintenance.md#import-common-metrics).
......
...@@ -269,7 +269,7 @@ Once the Code Quality job has completed: ...@@ -269,7 +269,7 @@ Once the Code Quality job has completed:
The Code Quality widget in the merge request compares the reports from the base and head of the branch, The Code Quality widget in the merge request compares the reports from the base and head of the branch,
then lists any violations that will be resolved or created when the branch is merged. then lists any violations that will be resolved or created when the branch is merged.
- The full JSON report is available as a - The full JSON report is available as a
[downloadable artifact](../../../ci/pipelines/job_artifacts.html#downloading-artifacts) [downloadable artifact](../../../ci/pipelines/job_artifacts.md#downloading-artifacts)
for the `code_quality` job. for the `code_quality` job.
If multiple jobs in a pipeline generate a code quality artifact, only the artifact from If multiple jobs in a pipeline generate a code quality artifact, only the artifact from
......
...@@ -285,7 +285,7 @@ https://example.gitlab.com/<namespace>/<project>/badges/<branch>/coverage.svg?st ...@@ -285,7 +285,7 @@ https://example.gitlab.com/<namespace>/<project>/badges/<branch>/coverage.svg?st
## Environment Variables ## Environment Variables
[Environment variables](../../../ci/variables/README.html#gitlab-cicd-environment-variables) can be set in an environment to be available to a runner. [Environment variables](../../../ci/variables/README.md#gitlab-cicd-environment-variables) can be set in an environment to be available to a runner.
## Deploy Keys ## Deploy Keys
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment