This component manages linting of markdown files. By default this component applies a configuration with reasonable settings for software projects.
Usage
Example with one custom setting
This will skip to skip rule MD013.
- Create a new pipeline file
include:
- component: $CI_SERVER_FQDN/xrow-public/ci-tools/common@stable
- component: $CI_SERVER_FQDN/xrow-public/ci-tools/lint-markdown@stable
- Create a file
.markdownlist.yamlto skip ruleMD013.
# Default state for all rules
default: true
extends: null
MD013: false
Inputs
| Name | Description | Default | Type |
| --- | --- | --- | --- |
| allow-failure | Should the pipeline fail if the test fails? | true | boolean |
| config-file | The contents of the lint markdown configuration file, if none exists. See https://github.com/igorshubovych/markdownlint-cli?tab=readme-ov-file#configuration | # Default state for all rules default: true # Path to configuration file to extend extends: null # Disabled due to https://github.com/DavidAnson/markdownlint/issues/535 MD013: false | string |
| ignore-file | The contents of the lint markdown ignore file, if none exists. See https://github.com/igorshubovych/markdownlint-cli?tab=readme-ov-file#ignoring-files | node_modules vendor | string |
| needs | The jobs that this job depends on. | [] | array |
| path | The path to the markdown files. | . | string |
| rules | The jobs that this job depends on. | [{"exists":["**/*.md"],"when":"always"},{"when":"never"}] | array |
| stage | The name of the stage. | lint | string |
| tags | The runners that this job depends on. | [] | array |