diff --git a/README.md b/README.md index cebd1f8f7..82385d6e1 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ DMT includes **9 specialized linters** to validate different aspects of your Dec | Linter | Purpose | Key Checks | |--------|---------|------------| | [**Container**](pkg/linters/container/README.md) | Container configuration validation | Duplicate names, env vars, security contexts, probes, resource limits, mount-points | -| [**Documentation**](pkg/linters/docs/README.md) | Documentation quality | README presence, bilingual support, no cyrillic in English docs | +| [**Documentation**](pkg/linters/docs/README.md) | Documentation quality | README presence, bilingual support, no cyrillic in English docs, markdown style | | [**Hooks**](pkg/linters/hooks/README.md) | Hook validation | Hook syntax, ingress configurations | | [**Images**](pkg/linters/images/README.md) | Image build instructions | Dockerfile best practices, werf configuration | | [**Module**](pkg/linters/module/README.md) | Module structure | module.yaml format, OpenAPI conversions, oss.yaml, license files | diff --git a/go.mod b/go.mod index 62ee25b0a..a4cb736eb 100644 --- a/go.mod +++ b/go.mod @@ -20,6 +20,7 @@ require ( github.com/iancoleman/strcase v0.3.0 github.com/itchyny/gojq v0.12.19 github.com/kyokomi/emoji v2.2.4+incompatible + github.com/ldmonster/go-markdownlint v0.0.2 github.com/mitchellh/go-homedir v1.1.0 github.com/mitchellh/go-wordwrap v1.0.1 github.com/mitchellh/mapstructure v1.5.0 diff --git a/go.sum b/go.sum index 5a1dafe4f..3842380a8 100644 --- a/go.sum +++ b/go.sum @@ -24,6 +24,7 @@ github.com/AzureAD/microsoft-authentication-extensions-for-go/cache v0.1.1 h1:WJ github.com/AzureAD/microsoft-authentication-extensions-for-go/cache v0.1.1/go.mod h1:tCcJZ0uHAmvjsVYzEFivsRTN00oz5BEsRgQHu5JZ9WE= github.com/AzureAD/microsoft-authentication-library-for-go v1.3.2 h1:kYRSnvJju5gYVyhkij+RTJ/VR6QIUaCfWeaFm2ycsjQ= github.com/AzureAD/microsoft-authentication-library-for-go v1.3.2/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= +github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= github.com/BurntSushi/toml v1.5.0 h1:W5quZX/G/csjUnuI8SUYlsHs9M38FC7znL0lIO+DvMg= github.com/BurntSushi/toml v1.5.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= github.com/Code-Hex/go-generics-cache v1.5.1 h1:6vhZGc5M7Y/YD8cIUcY8kcuQLB4cHR7U+0KMqAA0KcU= @@ -273,6 +274,8 @@ github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0 github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/kyokomi/emoji v2.2.4+incompatible h1:np0woGKwx9LiHAQmwZx79Oc0rHpNw3o+3evou4BEPv4= github.com/kyokomi/emoji v2.2.4+incompatible/go.mod h1:mZ6aGCD7yk8j6QY6KICwnZ2pxoszVseX1DNoGtU2tBA= +github.com/ldmonster/go-markdownlint v0.0.2 h1:Szznt3Ua53TinxKPKlSY7iw5BmEPANg9+6ojtPrQYm0= +github.com/ldmonster/go-markdownlint v0.0.2/go.mod h1:d501SE7F9c34YnMsZWiPJikJ/hcl6PgS9y3bKe62cwY= github.com/linode/linodego v1.46.0 h1:+uOG4SD2MIrhbrLrvOD5HrbdLN3D19Wgn3MgdUNQjeU= github.com/linode/linodego v1.46.0/go.mod h1:vyklQRzZUWhFVBZdYx4dcYJU/gG9yKB9VUcUs6ub0Lk= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= diff --git a/internal/module/module.go b/internal/module/module.go index 4ec79441f..c2571f763 100644 --- a/internal/module/module.go +++ b/internal/module/module.go @@ -311,6 +311,11 @@ func mapDocumentationRules(linterSettings *pkg.LintersSettings, configSettings * rules.ReadmeRule.SetLevel(globalRules.ReadmeRule.Impact, fallbackImpact) rules.CyrillicInEnglishRule.SetLevel(globalRules.NoCyrillicExcludeRules.Impact, fallbackImpact) rules.NoLangKeyRule.SetLevel(globalRules.NoLangKeyRule.Impact, fallbackImpact) + // markdownlint defaults to warn (non-fatal) rather than error. Unlike the + // other documentation rules, the linter-level impact (fallbackImpact) is + // intentionally NOT used as the fallback here — only an explicit rule-level + // markdownlint impact overrides the warn default. + rules.MarkdownlintRule.SetLevel(globalRules.MarkdownlintRule.Impact, pkg.Warn.String()) } func mapModuleRules(linterSettings *pkg.LintersSettings, configSettings *config.LintersSettings, globalConfig *global.Linters) { diff --git a/pkg/config.go b/pkg/config.go index df87f1f6a..982e9f9e2 100644 --- a/pkg/config.go +++ b/pkg/config.go @@ -87,6 +87,7 @@ type DocumentationLinterRules struct { BilingualRule RuleConfig CyrillicInEnglishRule RuleConfig NoLangKeyRule RuleConfig + MarkdownlintRule RuleConfig } type NoCyrillicLinterConfig struct { diff --git a/pkg/config/global/global.go b/pkg/config/global/global.go index 266a865d1..e99757907 100644 --- a/pkg/config/global/global.go +++ b/pkg/config/global/global.go @@ -96,6 +96,7 @@ type DocumentationRules struct { ReadmeRule RuleConfig `mapstructure:"readme"` NoCyrillicExcludeRules RuleConfig `mapstructure:"cyrillic-in-english"` NoLangKeyRule RuleConfig `mapstructure:"no-lang-key"` + MarkdownlintRule RuleConfig `mapstructure:"markdownlint"` } type OpenAPILinterConfig struct { diff --git a/pkg/linters/docs/README.md b/pkg/linters/docs/README.md index 27ee07c9b..3f7821f57 100644 --- a/pkg/linters/docs/README.md +++ b/pkg/linters/docs/README.md @@ -2,7 +2,7 @@ ## Overview -The **Documentation Linter** validates module documentation to ensure proper structure, completeness, and language consistency. This linter enforces bilingual documentation requirements, checks for documentation file presence, and validates that English documentation doesn't contain cyrillic characters. +The **Documentation Linter** validates module documentation to ensure proper structure, completeness, and language consistency. This linter enforces bilingual documentation requirements, checks for documentation file presence, validates that English documentation doesn't contain cyrillic characters, and ensures markdown files follow deckhouse markdown style conventions. Proper documentation is critical for Deckhouse modules as it helps users understand module features, configuration options, and usage patterns. The linter ensures documentation meets quality standards and is accessible to both English and Russian-speaking audiences. @@ -14,6 +14,7 @@ Proper documentation is critical for Deckhouse modules as it helps users underst | [bilingual](#bilingual) | Validates documentation exists in both English and Russian | ✅ | enabled | | [cyrillic-in-english](#cyrillic-in-english) | Validates English documentation doesn't contain cyrillic characters | ✅ | enabled | | [no-lang-key](#no-lang-key) | Validates documentation front matter doesn't contain `lang` key | ✅ | enabled | +| [markdownlint](#markdownlint) | Validates markdown files in docs/ follow deckhouse markdown style | ✅ | enabled | "Configurable" means that this rule can be configured using the `.dmtlint.yaml` file, including customizing the rule's parameters and/or disabling the rule. @@ -388,6 +389,129 @@ linters-settings: --- +### markdownlint + +**Purpose:** Ensures markdown files in the `docs/` directory follow consistent deckhouse markdown style conventions (headings, lists, code blocks, etc.). + +**Description:** + +This rule runs the [go-markdownlint](https://github.com/ldmonster/go-markdownlint) library against every `.md` file under `docs/` (recursively, including `docs/internal/...`) and reports any markdown style violations. The built-in rule set is enabled by default; only a fixed set of deckhouse-specific overrides is applied (line-length limits, blanks-around-headings, duplicate-heading siblings, etc.). + +Unlike the other documentation rules, `markdownlint` reports at `warn` **by default** — its findings are shown but do not fail the run. Set `impact: error` to make violations fatal. + +**What it checks:** + +1. Recursively scans all `.md` files under `docs/` (top-level and nested, e.g. `docs/internal/`) +2. Lints each file with the built-in markdownlint rules using the deckhouse configuration overrides +3. Reports the rule name(s), description, file path and line number for each violation + +**Why it matters:** + +Consistent markdown style across all modules makes the documentation easier to read, review and maintain, and keeps it aligned with the rest of the deckhouse documentation. + +**Rule reference:** + +Findings are reported as `MDxxx/rule-name …`. Look up the code below to see what it means. Rules marked *(tuned)* use deckhouse-specific settings. + +| Rule (as shown in the error) | What it means | +|------------------------------|---------------| +| MD001 / heading-increment | Heading levels must increase one at a time — no jump from `#` to `###`. | +| MD003 / heading-style | Heading style must be consistent (ATX `#`, not closed `# … #` or setext). | +| MD005 / list-indent | List items at the same level must share the same indentation. | +| MD007 / ul-indent | Nested bullet lists must be indented by the expected amount. | +| MD009 / no-trailing-spaces | No trailing spaces at the end of a line. | +| MD010 / no-hard-tabs | No hard tabs — use spaces. | +| MD011 / no-reversed-links | Reversed link syntax `(text)[url]` instead of `[text](url)`. | +| MD012 / no-multiple-blanks | No multiple consecutive blank lines. | +| MD013 / line-length *(tuned)* | Line too long. Limits: 1000 chars (headings 128, code blocks 400). | +| MD014 / commands-show-output | `$` before shell commands only when their output is shown. | +| MD018 / no-missing-space-atx | Space required after `#` in a heading (`# Title`, not `#Title`). | +| MD019 / no-multiple-space-atx | At most one space after `#` in a heading. | +| MD020 / no-missing-space-closed-atx | Space required inside a closed heading `# Title #`. | +| MD021 / no-multiple-space-closed-atx | At most one space inside a closed heading. | +| MD022 / blanks-around-headings *(tuned)* | Headings must be surrounded by blank lines (1 above, 1 below). | +| MD023 / heading-start-left | Headings must start at the beginning of the line (no indent). | +| MD024 / no-duplicate-heading *(tuned)* | No duplicate heading text — checked among sibling headings only. | +| MD025 / single-title / single-h1 | Only one top-level (`#`) heading per document. | +| MD026 / no-trailing-punctuation *(tuned)* | No trailing punctuation in headings (`. , ; : !` and CJK variants). | +| MD027 / no-multiple-space-blockquote | At most one space after `>` in a blockquote. | +| MD028 / no-blanks-blockquote | No blank line inside a blockquote (it splits it in two). | +| MD029 / ol-prefix *(tuned)* | Ordered-list numbering — all `1.` or strictly ascending (`one_or_ordered`). | +| MD030 / list-marker-space | Correct number of spaces after a list marker. | +| MD031 / blanks-around-fences | Fenced code blocks must be surrounded by blank lines. | +| MD034 / no-bare-urls | Bare URLs must be wrapped in `<…>` or `[text](url)`. | +| MD035 / hr-style | Horizontal-rule style must be consistent (e.g. always `---`). | +| MD036 / no-emphasis-as-heading | Don't use bold/italic text in place of a heading. | +| MD037 / no-space-in-emphasis | No spaces inside emphasis markers (`**bold**`, not `** bold **`). | +| MD038 / no-space-in-code | No spaces inside inline code (`` `code` ``, not `` ` code ` ``). | +| MD039 / no-space-in-links | No spaces inside link text (`[link]`, not `[ link ]`). | +| MD040 / fenced-code-language | Fenced code blocks must declare a language after the opening fence (e.g. `yaml`, `bash`). | +| MD041 / first-line-heading / first-line-h1 *(tuned)* | First line must be a top-level heading (front-matter `title` counts). | +| MD042 / no-empty-links | No empty links (`[text]()`). | +| MD045 / no-alt-text | Images must have alt text (`![alt](img.png)`). | +| MD046 / code-block-style | Code-block style must be consistent within a file (fenced vs indented). | +| MD047 / single-trailing-newline | File must end with exactly one newline. | +| MD048 / code-fence-style | Code-fence style must be consistent (all fences use backticks, or all use tildes `~~~`). | +| MD049 / emphasis-style | Italic style must be consistent (`*` or `_`). | +| MD050 / strong-style | Bold style must be consistent (`**` or `__`). | +| MD052 / reference-links-images | Reference links/images must point to a defined label. | +| MD053 / link-image-reference-definitions | Reference definitions (`[label]: url`) must be used — no unused ones. | +| MD055 / table-pipe-style | Table leading/trailing pipe (`\|`) style must be consistent. | +| MD056 / table-column-count | Every table row must have the same number of columns. | +| MD058 / blanks-around-tables | Tables must be surrounded by blank lines. | +| MD059 / descriptive-link-text | Link text must be descriptive — not `here`, `link`, `click here`. | + +Three rules are enabled but effectively inert under the deckhouse config, so you will not see them fire: **MD043** (required-headings — no required structure is set), **MD044** (proper-names — the name list is empty) and **MD054** (link-image-style — all link/image styles are allowed by default). + +Rules **disabled** on purpose (never reported): MD002 (first-heading-h1, deprecated), MD004 (ul-style), MD032 (blanks-around-lists), MD033 (no-inline-html — HTML is allowed), MD051 (link-fragments — Deckhouse anchors only exist after the doc build), MD060 (table-column-style). + +**Examples:** + +❌ **Incorrect** - Duplicate top-level heading (MD025) and missing trailing newline (MD047): + +```markdown + +# My Module + +# My Module +``` + +(file has no trailing newline) + +**Error:** +``` +MD025/single-title/single-h1 Multiple top-level headings in the same document +File: docs/README.md +Line: 3 + +MD047/single-trailing-newline Files should end with a single newline character +File: docs/README.md +Line: 3 +``` + +✅ **Correct** - Single top-level heading and trailing newline: + +```markdown + +# My Module +``` + +**Configuration:** + +To make this rule fatal, or to disable it: + +```yaml +# .dmtlint.yaml +linters-settings: + documentation: + rules: + markdownlint: + impact: error # fail the run on violations (default is warn) + # impact: ignored # disable the rule entirely +``` + +--- + ## Configuration The Documentation linter can be configured at both the module level and for individual rules. diff --git a/pkg/linters/docs/documentation.go b/pkg/linters/docs/documentation.go index e05bb1c3a..45b716453 100644 --- a/pkg/linters/docs/documentation.go +++ b/pkg/linters/docs/documentation.go @@ -44,6 +44,8 @@ func (l *Documentation) Run(m *module.Module) { rules.NewCyrillicInEnglishRule().CheckFiles(m, errorList.WithMaxLevel(l.cfg.Rules.CyrillicInEnglishRule.GetLevel())) rules.NewNoLangKeyRule().CheckFiles(m, errorList.WithMaxLevel(l.cfg.Rules.NoLangKeyRule.GetLevel())) + + rules.NewMarkdownRule().CheckFiles(m, errorList.WithMaxLevel(l.cfg.Rules.MarkdownlintRule.GetLevel())) } func (l *Documentation) Name() string { diff --git a/pkg/linters/docs/rules/markdown.go b/pkg/linters/docs/rules/markdown.go new file mode 100644 index 000000000..b8dc165dc --- /dev/null +++ b/pkg/linters/docs/rules/markdown.go @@ -0,0 +1,211 @@ +// Copyright 2026 Flant JSC +// Licensed under the Apache License, Version 2.0 + +package rules + +import ( + "context" + "os" + "path/filepath" + "strings" + + gomarkdownlint "github.com/ldmonster/go-markdownlint" + + "github.com/deckhouse/dmt/internal/fsutils" + "github.com/deckhouse/dmt/pkg" + "github.com/deckhouse/dmt/pkg/errors" +) + +const ( + MarkdownlintRuleName = "markdownlint" +) + +func NewMarkdownRule() *MarkdownRule { + return &MarkdownRule{ + RuleMeta: pkg.RuleMeta{ + Name: MarkdownlintRuleName, + }, + } +} + +type MarkdownRule struct { + pkg.RuleMeta + pkg.PathRule +} + +func (r *MarkdownRule) CheckFiles(m pkg.Module, errorList *errors.LintRuleErrorsList) { + errorList = errorList.WithRule(r.GetName()) + + if !r.Enabled(m.GetName()) { + return + } + + modulePath := m.GetPath() + if modulePath == "" { + return + } + + docsPath := filepath.Join(modulePath, "docs") + if _, err := os.Stat(docsPath); err != nil { + return + } + + // README.md is checked by a separate Deckhouse pipeline and excluded from + // markdownlint (testing/.markdownlintignore contains "README.md"), so skip + // it here too. Combined into one predicate because GetFiles ORs its filters: + // a separate exclusion filter would be defeated by the ".md" extension match. + files := fsutils.GetFiles(docsPath, false, func(_, path string) bool { + return filepath.Ext(path) == ".md" && filepath.Base(path) != "README.md" + }) + + var mdFiles []string + + for _, fileName := range files { + relFromModule := fsutils.Rel(modulePath, fileName) + if !r.Enabled(relFromModule) { + continue + } + + mdFiles = append(mdFiles, fileName) + } + + r.checkFiles(modulePath, mdFiles, errorList) +} + +func (r *MarkdownRule) checkFiles(modulePath string, files []string, errorList *errors.LintRuleErrorsList) { + if len(files) == 0 { + return + } + + cfg := gomarkdownlint.ConfigFromMap(deckhouseMarkdownlintConfig()) + + results, err := gomarkdownlint.LintFiles(context.Background(), files, cfg) + if err != nil { + errorList. + WithFilePath(modulePath). + WithValue(err.Error()). + Errorf("markdownlint failed: %s", err) + + return + } + + for file, errs := range results { + relPath := fsutils.Rel(modulePath, file) + for _, mdErr := range errs { + errorList. + WithFilePath(relPath). + WithLineNumber(mdErr.LineNumber). + Errorf("%s %s", strings.Join(mdErr.RuleNames, "/"), mdErr.RuleDescription) + } + } +} + +// deckhouseMarkdownlintConfig returns the markdownlint configuration. +// go-markdownlint enables every built-in rule by default (ruleDefaultEnable is +// true when the "default" key is absent), so we do not set "default" and only +// list the rule overrides below. +func deckhouseMarkdownlintConfig() map[string]any { + return map[string]any{ + // MD002/first-heading-h1/first-header-h1 - First heading should be a top-level heading (deprecated) + "MD002": false, + + // MD004/ul-style - Unordered list style + "MD004": false, + + // MD013/line-length - Line length + "MD013": map[string]any{ + "line_length": 1000, // Number of characters + "heading_line_length": 128, // Number of characters for headings + "code_block_line_length": 400, // Number of characters for code blocks + "code_blocks": true, // Include code blocks + "tables": true, // Include tables + "headings": true, // Include headings + "headers": true, // Include headings (deprecated alias) + "strict": false, // Strict length checking + "stern": false, // Stern length checking + }, + + // MD060/table-column-style - Table column style. + "MD060": false, + + // MD022/blanks-around-headings/blanks-around-headers - Headings should be surrounded by blank lines + "MD022": map[string]any{ + "lines_above": 1, // Blank lines above heading + "lines_below": 1, // Blank lines below heading + }, + + // MD024/no-duplicate-heading/no-duplicate-header - Multiple headings with the same content + "MD024": map[string]any{ + "siblings_only": true, // Only check sibling headings + }, + + // MD026/no-trailing-punctuation - Trailing punctuation in heading + "MD026": map[string]any{ + "punctuation": ".,;:!。,;:!", // Punctuation characters + }, + + // MD029/ol-prefix - Ordered list item prefix + "MD029": map[string]any{ + "style": "one_or_ordered", // List style + }, + + // MD033/no-inline-html - Inline HTML + "MD033": false, + + // MD032/blanks-around-lists - Lists should be surrounded by blank lines + "MD032": false, + + // MD041/first-line-heading/first-line-h1 - First line in a file should be a top-level heading + "MD041": map[string]any{ + "level": 1, // Heading level + "front_matter_title": `^\s*title\s*[:=]`, // RegExp for matching title in front matter + }, + + // MD042/no-empty-links - No empty links + "MD042": true, + + // MD043/required-headings/required-headers - Required heading structure + "MD043": map[string]any{ + "headings": nil, // List of headings + "headers": nil, // List of headings (deprecated alias) + }, + + // MD044/proper-names - Proper names should have the correct capitalization + "MD044": map[string]any{ + "names": []string{}, // List of proper names + "code_blocks": true, // Include code blocks + }, + + // MD045/no-alt-text - Images should have alternate text (alt text) + "MD045": true, + + // MD046/code-block-style - Code block style + "MD046": map[string]any{ + "style": "consistent", // Block style + }, + + // MD047/single-trailing-newline - Files should end with a single newline character + "MD047": true, + + // MD048/code-fence-style - Code fence style + "MD048": map[string]any{ + "style": "consistent", // Code fence style + }, + + // MD049/emphasis-style - Emphasis style should be consistent + "MD049": map[string]any{ + "style": "consistent", // Emphasis style should be consistent + }, + + // MD050/strong-style - Strong style should be consistent + "MD050": map[string]any{ + "style": "consistent", // Strong style should be consistent + }, + + // MD051/link-fragments - Link fragments should be valid. + // Disabled: Deckhouse docs reference anchors that only exist after the + // Jekyll/OpenAPI build (e.g. #parameters-...) or via Kramdown IALs + // ({: #id}), which a static linter cannot resolve. + "MD051": false, + } +} diff --git a/test/e2e/testdata/documentation/markdownlint-rules-clean/expected.yaml b/test/e2e/testdata/documentation/markdownlint-rules-clean/expected.yaml new file mode 100644 index 000000000..a525e0bdb --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-clean/expected.yaml @@ -0,0 +1,52 @@ +description: >- + One file per markdownlint rule under docs/, each written in the correct form + from the rule documentation. Verifies dmt's markdownlint rule does not falsely + fire on valid input. Assertions are scoped to the documentation linter's + markdownlint rule; findings from other linters (readme, bilingual, ...) are + intentionally ignored. +expectPass: + # No markdownlint finding at all across the correct-form corpus. + - {linter: documentation, rule: markdownlint} + - {linter: documentation, rule: markdownlint, textContains: "MD001/"} + - {linter: documentation, rule: markdownlint, textContains: "MD003/"} + - {linter: documentation, rule: markdownlint, textContains: "MD005/"} + - {linter: documentation, rule: markdownlint, textContains: "MD007/"} + - {linter: documentation, rule: markdownlint, textContains: "MD009/"} + - {linter: documentation, rule: markdownlint, textContains: "MD010/"} + - {linter: documentation, rule: markdownlint, textContains: "MD011/"} + - {linter: documentation, rule: markdownlint, textContains: "MD012/"} + - {linter: documentation, rule: markdownlint, textContains: "MD013/"} + - {linter: documentation, rule: markdownlint, textContains: "MD014/"} + - {linter: documentation, rule: markdownlint, textContains: "MD018/"} + - {linter: documentation, rule: markdownlint, textContains: "MD019/"} + - {linter: documentation, rule: markdownlint, textContains: "MD020/"} + - {linter: documentation, rule: markdownlint, textContains: "MD021/"} + - {linter: documentation, rule: markdownlint, textContains: "MD022/"} + - {linter: documentation, rule: markdownlint, textContains: "MD023/"} + - {linter: documentation, rule: markdownlint, textContains: "MD024/"} + - {linter: documentation, rule: markdownlint, textContains: "MD025/"} + - {linter: documentation, rule: markdownlint, textContains: "MD026/"} + - {linter: documentation, rule: markdownlint, textContains: "MD027/"} + - {linter: documentation, rule: markdownlint, textContains: "MD028/"} + - {linter: documentation, rule: markdownlint, textContains: "MD029/"} + - {linter: documentation, rule: markdownlint, textContains: "MD030/"} + - {linter: documentation, rule: markdownlint, textContains: "MD031/"} + - {linter: documentation, rule: markdownlint, textContains: "MD034/"} + - {linter: documentation, rule: markdownlint, textContains: "MD035/"} + - {linter: documentation, rule: markdownlint, textContains: "MD036/"} + - {linter: documentation, rule: markdownlint, textContains: "MD037/"} + - {linter: documentation, rule: markdownlint, textContains: "MD038/"} + - {linter: documentation, rule: markdownlint, textContains: "MD039/"} + - {linter: documentation, rule: markdownlint, textContains: "MD040/"} + - {linter: documentation, rule: markdownlint, textContains: "MD041/"} + - {linter: documentation, rule: markdownlint, textContains: "MD042/"} + - {linter: documentation, rule: markdownlint, textContains: "MD045/"} + - {linter: documentation, rule: markdownlint, textContains: "MD046/"} + - {linter: documentation, rule: markdownlint, textContains: "MD047/"} + - {linter: documentation, rule: markdownlint, textContains: "MD048/"} + - {linter: documentation, rule: markdownlint, textContains: "MD049/"} + - {linter: documentation, rule: markdownlint, textContains: "MD050/"} + - {linter: documentation, rule: markdownlint, textContains: "MD052/"} + - {linter: documentation, rule: markdownlint, textContains: "MD055/"} + - {linter: documentation, rule: markdownlint, textContains: "MD056/"} + - {linter: documentation, rule: markdownlint, textContains: "MD058/"} diff --git a/test/e2e/testdata/documentation/markdownlint-rules-clean/module/.helmignore b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/.helmignore new file mode 100644 index 000000000..6b8710a71 --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/.helmignore @@ -0,0 +1 @@ +.git diff --git a/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md001.md b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md001.md new file mode 100644 index 000000000..f7a56c225 --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md001.md @@ -0,0 +1,5 @@ +# MD001 clean + +## Section + +### Subsection diff --git a/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md003.md b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md003.md new file mode 100644 index 000000000..b8ce5afa2 --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md003.md @@ -0,0 +1,3 @@ +# MD003 clean + +## Second heading diff --git a/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md005.md b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md005.md new file mode 100644 index 000000000..1744065de --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md005.md @@ -0,0 +1,5 @@ +# MD005 clean + +- Item + - Nested one + - Nested two diff --git a/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md007.md b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md007.md new file mode 100644 index 000000000..464edcb11 --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md007.md @@ -0,0 +1,4 @@ +# MD007 clean + +- Item + - Nested by two spaces diff --git a/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md009.md b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md009.md new file mode 100644 index 000000000..582bc4d03 --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md009.md @@ -0,0 +1,3 @@ +# MD009 clean + +Text without trailing spaces. diff --git a/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md010.md b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md010.md new file mode 100644 index 000000000..17dddbfb8 --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md010.md @@ -0,0 +1,3 @@ +# MD010 clean + +Text indented with spaces only. diff --git a/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md011.md b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md011.md new file mode 100644 index 000000000..870ec9090 --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md011.md @@ -0,0 +1,3 @@ +# MD011 clean + +[correct link](https://example.com/) diff --git a/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md012.md b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md012.md new file mode 100644 index 000000000..b01cdfc21 --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md012.md @@ -0,0 +1,5 @@ +# MD012 clean + +First paragraph. + +Second paragraph. diff --git a/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md013.md b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md013.md new file mode 100644 index 000000000..b3658694c --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md013.md @@ -0,0 +1,3 @@ +# MD013 clean + +A reasonably short line of text. diff --git a/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md014.md b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md014.md new file mode 100644 index 000000000..24d0b8360 --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md014.md @@ -0,0 +1,6 @@ +# MD014 clean + +```sh +ls +cat foo +``` diff --git a/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md018.md b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md018.md new file mode 100644 index 000000000..2dce603fe --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md018.md @@ -0,0 +1,3 @@ +# MD018 clean + +## Proper spacing diff --git a/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md019.md b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md019.md new file mode 100644 index 000000000..0f40b0d39 --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md019.md @@ -0,0 +1,3 @@ +# MD019 clean + +## Single space diff --git a/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md020.md b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md020.md new file mode 100644 index 000000000..c086bee90 --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md020.md @@ -0,0 +1,3 @@ +# MD020 clean # + +## Second heading ## diff --git a/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md021.md b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md021.md new file mode 100644 index 000000000..dbeaedffb --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md021.md @@ -0,0 +1,3 @@ +# MD021 clean # + +## Second heading ## diff --git a/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md022.md b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md022.md new file mode 100644 index 000000000..ca02e1051 --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md022.md @@ -0,0 +1,7 @@ +# MD022 clean + +Text. + +## Section + +More text. diff --git a/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md023.md b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md023.md new file mode 100644 index 000000000..d21533185 --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md023.md @@ -0,0 +1,5 @@ +# MD023 clean + +Text. + +## Section starts at left diff --git a/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md024.md b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md024.md new file mode 100644 index 000000000..ee1aca1d3 --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md024.md @@ -0,0 +1,5 @@ +# MD024 clean + +## First section + +## Second section diff --git a/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md025.md b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md025.md new file mode 100644 index 000000000..bc052b620 --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md025.md @@ -0,0 +1,3 @@ +# MD025 clean + +## Only one top-level heading diff --git a/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md026.md b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md026.md new file mode 100644 index 000000000..77b486a5c --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md026.md @@ -0,0 +1,3 @@ +# MD026 clean + +## Section without punctuation diff --git a/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md027.md b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md027.md new file mode 100644 index 000000000..400a496a5 --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md027.md @@ -0,0 +1,3 @@ +# MD027 clean + +> Quote with a single space. diff --git a/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md028.md b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md028.md new file mode 100644 index 000000000..c38f3eb05 --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md028.md @@ -0,0 +1,4 @@ +# MD028 clean + +> Quote line one. +> Quote line two. diff --git a/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md029.md b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md029.md new file mode 100644 index 000000000..85b4e8e0c --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md029.md @@ -0,0 +1,5 @@ +# MD029 clean + +1. First +2. Second +3. Third diff --git a/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md030.md b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md030.md new file mode 100644 index 000000000..3b90ffc2a --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md030.md @@ -0,0 +1,3 @@ +# MD030 clean + +- Item with one space diff --git a/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md031.md b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md031.md new file mode 100644 index 000000000..5a1aec2bd --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md031.md @@ -0,0 +1,9 @@ +# MD031 clean + +Text. + +```text +code +``` + +More text. diff --git a/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md034.md b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md034.md new file mode 100644 index 000000000..9d710cdbc --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md034.md @@ -0,0 +1,3 @@ +# MD034 clean + +Visit for details. diff --git a/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md035.md b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md035.md new file mode 100644 index 000000000..86cf92175 --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md035.md @@ -0,0 +1,11 @@ +# MD035 clean + +Text. + +--- + +More. + +--- + +End. diff --git a/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md036.md b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md036.md new file mode 100644 index 000000000..30a43b44a --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md036.md @@ -0,0 +1,5 @@ +# MD036 clean + +## Real heading + +Text. diff --git a/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md037.md b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md037.md new file mode 100644 index 000000000..2ee3be7a7 --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md037.md @@ -0,0 +1,3 @@ +# MD037 clean + +Here is some **bold** text. diff --git a/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md038.md b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md038.md new file mode 100644 index 000000000..ee87772e8 --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md038.md @@ -0,0 +1,3 @@ +# MD038 clean + +Here is a `code` span. diff --git a/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md039.md b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md039.md new file mode 100644 index 000000000..e361dbe1c --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md039.md @@ -0,0 +1,3 @@ +# MD039 clean + +[a link](https://example.com/) diff --git a/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md040.md b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md040.md new file mode 100644 index 000000000..bfe5e668c --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md040.md @@ -0,0 +1,5 @@ +# MD040 clean + +```text +code with a language +``` diff --git a/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md041.md b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md041.md new file mode 100644 index 000000000..2f835ab28 --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md041.md @@ -0,0 +1,3 @@ +# MD041 clean + +First line is a top-level heading. diff --git a/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md042.md b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md042.md new file mode 100644 index 000000000..63aac1a05 --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md042.md @@ -0,0 +1,3 @@ +# MD042 clean + +[valid link](https://example.com/) diff --git a/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md045.md b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md045.md new file mode 100644 index 000000000..d0f20fc60 --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md045.md @@ -0,0 +1,3 @@ +# MD045 clean + +![descriptive alt text](image.png) diff --git a/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md046.md b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md046.md new file mode 100644 index 000000000..ca4189745 --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md046.md @@ -0,0 +1,9 @@ +# MD046 clean + +```text +first +``` + +```text +second +``` diff --git a/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md047.md b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md047.md new file mode 100644 index 000000000..60c06b780 --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md047.md @@ -0,0 +1,3 @@ +# MD047 clean + +Text ends with a single newline. diff --git a/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md048.md b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md048.md new file mode 100644 index 000000000..a85987d85 --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md048.md @@ -0,0 +1,9 @@ +# MD048 clean + +```text +a +``` + +```text +b +``` diff --git a/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md049.md b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md049.md new file mode 100644 index 000000000..95457e78c --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md049.md @@ -0,0 +1,3 @@ +# MD049 clean + +This is *italic* and this is *also italic*. diff --git a/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md050.md b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md050.md new file mode 100644 index 000000000..ab5c2ec96 --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md050.md @@ -0,0 +1,3 @@ +# MD050 clean + +This is **strong** and this is **also strong**. diff --git a/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md052.md b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md052.md new file mode 100644 index 000000000..a9a280212 --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md052.md @@ -0,0 +1,5 @@ +# MD052 clean + +[text][label] is defined below. + +[label]: https://example.com/ diff --git a/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md055.md b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md055.md new file mode 100644 index 000000000..bde6fc09b --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md055.md @@ -0,0 +1,5 @@ +# MD055 clean + +| Header | Value | +| ------ | ----- | +| Cell | Data | diff --git a/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md056.md b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md056.md new file mode 100644 index 000000000..74428da26 --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md056.md @@ -0,0 +1,5 @@ +# MD056 clean + +| Header | Value | +| ------ | ----- | +| Cell | Data | diff --git a/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md058.md b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md058.md new file mode 100644 index 000000000..77eafd64c --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/docs/md058.md @@ -0,0 +1,9 @@ +# MD058 clean + +Text before. + +| Header | Value | +| ------ | ----- | +| Cell | Data | + +Text after. diff --git a/test/e2e/testdata/documentation/markdownlint-rules-clean/module/module.yaml b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/module.yaml new file mode 100644 index 000000000..946e7e723 --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/module.yaml @@ -0,0 +1,8 @@ +name: test-module-markdownlint-rules-clean +namespace: d8-test +weight: 100 +stage: Experimental +descriptions: + en: "Test module used to verify markdownlint reports nothing on valid docs" +requirements: + deckhouse: ">=1.68.0" diff --git a/test/e2e/testdata/documentation/markdownlint-rules-clean/module/openapi/config-values.yaml b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/openapi/config-values.yaml new file mode 100644 index 000000000..03b0d8bfe --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/openapi/config-values.yaml @@ -0,0 +1,2 @@ +type: object +properties: {} diff --git a/test/e2e/testdata/documentation/markdownlint-rules-clean/module/openapi/values.yaml b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/openapi/values.yaml new file mode 100644 index 000000000..03b0d8bfe --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-clean/module/openapi/values.yaml @@ -0,0 +1,2 @@ +type: object +properties: {} diff --git a/test/e2e/testdata/documentation/markdownlint-rules-violations/expected.yaml b/test/e2e/testdata/documentation/markdownlint-rules-violations/expected.yaml new file mode 100644 index 000000000..123b48a23 --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-violations/expected.yaml @@ -0,0 +1,50 @@ +description: >- + One file per markdownlint rule under docs/, each violating exactly that rule + as described in the rule documentation. Verifies dmt's markdownlint rule + reports every rule it has enabled. Assertions are scoped to the documentation + linter's markdownlint rule; findings from other linters are ignored. + Not asserted because go-markdownlint v0.0.5 emits no finding for the + documented violation (fixture kept for when the engine starts reporting it): MD028. +expect: + - {linter: documentation, rule: markdownlint, textContains: "MD001/"} + - {linter: documentation, rule: markdownlint, textContains: "MD003/"} + - {linter: documentation, rule: markdownlint, textContains: "MD005/"} + - {linter: documentation, rule: markdownlint, textContains: "MD007/"} + - {linter: documentation, rule: markdownlint, textContains: "MD009/"} + - {linter: documentation, rule: markdownlint, textContains: "MD010/"} + - {linter: documentation, rule: markdownlint, textContains: "MD011/"} + - {linter: documentation, rule: markdownlint, textContains: "MD012/"} + - {linter: documentation, rule: markdownlint, textContains: "MD013/"} + - {linter: documentation, rule: markdownlint, textContains: "MD014/"} + - {linter: documentation, rule: markdownlint, textContains: "MD018/"} + - {linter: documentation, rule: markdownlint, textContains: "MD019/"} + - {linter: documentation, rule: markdownlint, textContains: "MD020/"} + - {linter: documentation, rule: markdownlint, textContains: "MD021/"} + - {linter: documentation, rule: markdownlint, textContains: "MD022/"} + - {linter: documentation, rule: markdownlint, textContains: "MD023/"} + - {linter: documentation, rule: markdownlint, textContains: "MD024/"} + - {linter: documentation, rule: markdownlint, textContains: "MD025/"} + - {linter: documentation, rule: markdownlint, textContains: "MD026/"} + - {linter: documentation, rule: markdownlint, textContains: "MD027/"} + - {linter: documentation, rule: markdownlint, textContains: "MD029/"} + - {linter: documentation, rule: markdownlint, textContains: "MD030/"} + - {linter: documentation, rule: markdownlint, textContains: "MD031/"} + - {linter: documentation, rule: markdownlint, textContains: "MD034/"} + - {linter: documentation, rule: markdownlint, textContains: "MD035/"} + - {linter: documentation, rule: markdownlint, textContains: "MD036/"} + - {linter: documentation, rule: markdownlint, textContains: "MD037/"} + - {linter: documentation, rule: markdownlint, textContains: "MD038/"} + - {linter: documentation, rule: markdownlint, textContains: "MD039/"} + - {linter: documentation, rule: markdownlint, textContains: "MD040/"} + - {linter: documentation, rule: markdownlint, textContains: "MD041/"} + - {linter: documentation, rule: markdownlint, textContains: "MD042/"} + - {linter: documentation, rule: markdownlint, textContains: "MD045/"} + - {linter: documentation, rule: markdownlint, textContains: "MD046/"} + - {linter: documentation, rule: markdownlint, textContains: "MD047/"} + - {linter: documentation, rule: markdownlint, textContains: "MD048/"} + - {linter: documentation, rule: markdownlint, textContains: "MD049/"} + - {linter: documentation, rule: markdownlint, textContains: "MD050/"} + - {linter: documentation, rule: markdownlint, textContains: "MD052/"} + - {linter: documentation, rule: markdownlint, textContains: "MD055/"} + - {linter: documentation, rule: markdownlint, textContains: "MD056/"} + - {linter: documentation, rule: markdownlint, textContains: "MD058/"} diff --git a/test/e2e/testdata/documentation/markdownlint-rules-violations/module/.helmignore b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/.helmignore new file mode 100644 index 000000000..6b8710a71 --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/.helmignore @@ -0,0 +1 @@ +.git diff --git a/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md001.md b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md001.md new file mode 100644 index 000000000..1eb409e90 --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md001.md @@ -0,0 +1,3 @@ +# MD001 bad + +### Skipped level two diff --git a/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md003.md b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md003.md new file mode 100644 index 000000000..89faa273d --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md003.md @@ -0,0 +1,3 @@ +# MD003 bad + +## Closed heading ## diff --git a/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md005.md b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md005.md new file mode 100644 index 000000000..79e73c27b --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md005.md @@ -0,0 +1,5 @@ +# MD005 bad + +- Item + - Nested one + - Misaligned item diff --git a/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md007.md b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md007.md new file mode 100644 index 000000000..e34ef4fa7 --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md007.md @@ -0,0 +1,5 @@ +# MD007 bad + +* One + * Two indented four spaces + * Three indented eight spaces diff --git a/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md009.md b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md009.md new file mode 100644 index 000000000..ef1ad270c --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md009.md @@ -0,0 +1,3 @@ +# MD009 bad + +Text with one trailing space. diff --git a/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md010.md b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md010.md new file mode 100644 index 000000000..780ed1e11 --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md010.md @@ -0,0 +1,3 @@ +# MD010 bad + +Column1 Column2 separated by a hard tab. diff --git a/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md011.md b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md011.md new file mode 100644 index 000000000..95a010a77 --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md011.md @@ -0,0 +1,3 @@ +# MD011 bad + +(reversed link)[https://example.com/] diff --git a/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md012.md b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md012.md new file mode 100644 index 000000000..d089bf53c --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md012.md @@ -0,0 +1,6 @@ +# MD012 bad + +First paragraph. + + +Second paragraph. diff --git a/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md013.md b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md013.md new file mode 100644 index 000000000..3110cc829 --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md013.md @@ -0,0 +1,3 @@ +# MD013 bad + +word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word diff --git a/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md014.md b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md014.md new file mode 100644 index 000000000..9be9e2439 --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md014.md @@ -0,0 +1,6 @@ +# MD014 bad + +```sh +$ ls +$ cat foo +``` diff --git a/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md018.md b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md018.md new file mode 100644 index 000000000..c9e5b1076 --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md018.md @@ -0,0 +1,3 @@ +# MD018 bad + +##Missing space after hash diff --git a/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md019.md b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md019.md new file mode 100644 index 000000000..8e1ca4993 --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md019.md @@ -0,0 +1,3 @@ +# MD019 bad + +## Multiple spaces after hash diff --git a/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md020.md b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md020.md new file mode 100644 index 000000000..aca30c824 --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md020.md @@ -0,0 +1,3 @@ +# MD020 bad # + +##Missing inner spaces## diff --git a/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md021.md b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md021.md new file mode 100644 index 000000000..ee23ee930 --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md021.md @@ -0,0 +1,3 @@ +# MD021 bad # + +## Multiple inner spaces ## diff --git a/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md022.md b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md022.md new file mode 100644 index 000000000..a77f3af26 --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md022.md @@ -0,0 +1,2 @@ +# MD022 bad +Text immediately after the heading. diff --git a/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md023.md b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md023.md new file mode 100644 index 000000000..7c13466a4 --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md023.md @@ -0,0 +1,5 @@ +# MD023 bad + +Text. + + ## Indented heading diff --git a/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md024.md b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md024.md new file mode 100644 index 000000000..39736208e --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md024.md @@ -0,0 +1,5 @@ +# MD024 bad + +## Duplicate + +## Duplicate diff --git a/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md025.md b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md025.md new file mode 100644 index 000000000..3ad412e8a --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md025.md @@ -0,0 +1,3 @@ +# MD025 bad + +# Second top-level heading diff --git a/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md026.md b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md026.md new file mode 100644 index 000000000..a20ce4754 --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md026.md @@ -0,0 +1,3 @@ +# MD026 bad heading with a period. + +Text. diff --git a/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md027.md b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md027.md new file mode 100644 index 000000000..109b1a446 --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md027.md @@ -0,0 +1,3 @@ +# MD027 bad + +> Quote with two spaces. diff --git a/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md028.md b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md028.md new file mode 100644 index 000000000..4ea907070 --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md028.md @@ -0,0 +1,5 @@ +# MD028 bad + +> Quote one. + +> Quote two. diff --git a/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md029.md b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md029.md new file mode 100644 index 000000000..9f3ef3bde --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md029.md @@ -0,0 +1,4 @@ +# MD029 bad + +1. First +3. Third diff --git a/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md030.md b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md030.md new file mode 100644 index 000000000..a4c01ce4e --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md030.md @@ -0,0 +1,3 @@ +# MD030 bad + +- Item with two spaces after marker diff --git a/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md031.md b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md031.md new file mode 100644 index 000000000..de65d7ace --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md031.md @@ -0,0 +1,8 @@ +# MD031 bad + +Text. +```text +code +``` + +More text. diff --git a/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md034.md b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md034.md new file mode 100644 index 000000000..e294ee8ba --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md034.md @@ -0,0 +1,3 @@ +# MD034 bad + +Visit https://example.com/ for details. diff --git a/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md035.md b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md035.md new file mode 100644 index 000000000..465b7cac5 --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md035.md @@ -0,0 +1,11 @@ +# MD035 bad + +Text. + +--- + +More. + +*** + +End. diff --git a/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md036.md b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md036.md new file mode 100644 index 000000000..4830f4404 --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md036.md @@ -0,0 +1,5 @@ +# MD036 bad + +**Emphasis used as a heading** + +Text. diff --git a/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md037.md b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md037.md new file mode 100644 index 000000000..38aeb774f --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md037.md @@ -0,0 +1,3 @@ +# MD037 bad + +Here is some ** bold ** text. diff --git a/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md038.md b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md038.md new file mode 100644 index 000000000..8ef457adc --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md038.md @@ -0,0 +1,3 @@ +# MD038 bad + +Here is a `code ` span. diff --git a/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md039.md b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md039.md new file mode 100644 index 000000000..bbe4be060 --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md039.md @@ -0,0 +1,3 @@ +# MD039 bad + +[ a link ](https://example.com/) diff --git a/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md040.md b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md040.md new file mode 100644 index 000000000..eaf1d6add --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md040.md @@ -0,0 +1,5 @@ +# MD040 bad + +``` +code without a language +``` diff --git a/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md041.md b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md041.md new file mode 100644 index 000000000..965ce9ab2 --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md041.md @@ -0,0 +1,3 @@ +This is not a heading. + +# Later heading diff --git a/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md042.md b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md042.md new file mode 100644 index 000000000..db3cce574 --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md042.md @@ -0,0 +1,3 @@ +# MD042 bad + +[empty link]() diff --git a/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md045.md b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md045.md new file mode 100644 index 000000000..ba10d3445 --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md045.md @@ -0,0 +1,3 @@ +# MD045 bad + +![](image.png) diff --git a/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md046.md b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md046.md new file mode 100644 index 000000000..36fc3378e --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md046.md @@ -0,0 +1,11 @@ +# MD046 bad + +Text. + + indented code block + +More. + +```text +fenced code +``` diff --git a/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md047.md b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md047.md new file mode 100644 index 000000000..19541996d --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md047.md @@ -0,0 +1,3 @@ +# MD047 bad + +Text without a trailing newline. \ No newline at end of file diff --git a/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md048.md b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md048.md new file mode 100644 index 000000000..07e4051d6 --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md048.md @@ -0,0 +1,9 @@ +# MD048 bad + +```text +a +``` + +~~~text +b +~~~ diff --git a/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md049.md b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md049.md new file mode 100644 index 000000000..0d916154c --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md049.md @@ -0,0 +1,3 @@ +# MD049 bad + +This is *italic* and this is _also italic_. diff --git a/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md050.md b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md050.md new file mode 100644 index 000000000..33d43aafe --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md050.md @@ -0,0 +1,3 @@ +# MD050 bad + +This is **strong** and this is __also strong__. diff --git a/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md052.md b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md052.md new file mode 100644 index 000000000..df9621431 --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md052.md @@ -0,0 +1,3 @@ +# MD052 bad + +[text][undefined-label] is not defined. diff --git a/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md055.md b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md055.md new file mode 100644 index 000000000..1f27fb272 --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md055.md @@ -0,0 +1,5 @@ +# MD055 bad + +| Header | Value | +| ------ | ----- | +Cell | Data | diff --git a/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md056.md b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md056.md new file mode 100644 index 000000000..a21873823 --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md056.md @@ -0,0 +1,6 @@ +# MD056 bad + +| Header | Value | +| ------ | ----- | +| Cell | Data | +| Lonely | diff --git a/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md058.md b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md058.md new file mode 100644 index 000000000..afccb6e5c --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/docs/md058.md @@ -0,0 +1,8 @@ +# MD058 bad + +Text before. + +| Header | Value | +| ------ | ----- | +| Cell | Data | +> Blockquote immediately after. diff --git a/test/e2e/testdata/documentation/markdownlint-rules-violations/module/module.yaml b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/module.yaml new file mode 100644 index 000000000..1c6a0161b --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/module.yaml @@ -0,0 +1,8 @@ +name: test-module-markdownlint-rules-violations +namespace: d8-test +weight: 100 +stage: Experimental +descriptions: + en: "Test module used to verify markdownlint reports nothing on valid docs" +requirements: + deckhouse: ">=1.68.0" diff --git a/test/e2e/testdata/documentation/markdownlint-rules-violations/module/openapi/config-values.yaml b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/openapi/config-values.yaml new file mode 100644 index 000000000..03b0d8bfe --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/openapi/config-values.yaml @@ -0,0 +1,2 @@ +type: object +properties: {} diff --git a/test/e2e/testdata/documentation/markdownlint-rules-violations/module/openapi/values.yaml b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/openapi/values.yaml new file mode 100644 index 000000000..03b0d8bfe --- /dev/null +++ b/test/e2e/testdata/documentation/markdownlint-rules-violations/module/openapi/values.yaml @@ -0,0 +1,2 @@ +type: object +properties: {}