Markdown File Linting
This job lints markdown files as part of the validation CI stage. It is designated to run on all branches. If any errors are found, the generated JUnit test report will let you know what errors were found.
You can include your linting rules in .markdownlint.json
which should be within the root of your repository. for the available rules please see the docs.
This job provides the following badge:
- None
Dependencies
- Optional file
.markdownlint.json
in repository root with any rules you wish to specify
your .gitlab-ci.yml changes
To use this job add the following to your .gitlab-ci.yml
file
stages:
- validation
include:
- local: CI/validation/.gitlab-ci.yml
Markdown Linting:
extends:
- .Lint_Markdown
CI/CD Variables required
var name | Description |
---|---|
MDLINT_PATH | Optional specifies the path to lint. defaults to "**/*.md" |
MDLINT_EXCLUDE_PATHS | optional Specifies the paths to exclude from linting. Defaults to "!gitlab-ci" |
MD_LINT_CONFIG-PATH | Optional Specifies a path whenre the lint config file is. defaults to none. this variable enables you to specify a config that will be copied to the project root folder. Note: if specified, the file will be deleted at the end of the linting job. |
Job Workflow
-
installs the required job dependencies
-
Lints any markdow file found in
$MDLINT_PATH
, excluding paths$MDLINT_EXCLUDE_PATHS
Artifacts
- JUnit test report located at
$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/tests/*.junit.xml
Gitlab job Definition
When you include this definition the following makes up the job definition
Note
Docs Still under development
About:
This page forms part of our Project Gitlab-CI.
Page Metadata
Version: ToDo: place files short git commit hereDate Created: 2021-08-11
Date Edited: 2023-05-23
Contribution:
Would You like to contribute to our Gitlab-CI project? You can assist in the following ways:
- Edit This Page If there is a mistake or a way you can improve it.
- Add a Page to the Manual if you would like to add an item to our manual
- Raise an Issue if there is something about this page you would like to improve, and git is unfamiliar to you.
ToDo: Add the page list of contributors