[dmt] feat: add markdownlint documentation rule#399
Draft
fuldaxxx wants to merge 8 commits into
Draft
Conversation
Signed-off-by: Ruslan Gorbunov <ruslan.gorbunov@flant.com>
Signed-off-by: Ruslan Gorbunov <ruslan.gorbunov@flant.com>
Signed-off-by: Ruslan Gorbunov <ruslan.gorbunov@flant.com>
Signed-off-by: Ruslan Gorbunov <ruslan.gorbunov@flant.com>
Signed-off-by: Ruslan Gorbunov <ruslan.gorbunov@flant.com>
Signed-off-by: Ruslan Gorbunov <ruslan.gorbunov@flant.com>
Signed-off-by: Ruslan Gorbunov <ruslan.gorbunov@flant.com>
Signed-off-by: Ruslan Gorbunov <ruslan.gorbunov@flant.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds a new
markdownlintrule to the documentation linter. The rule checks.mdfiles in a module'sdocs/directory for compliance with a unified markdown style (Deckhouse conventions) using thego-markdownlint(https://github.com/ldmonster/go-markdownlint) library.What the rule does:
.mdfiles underdocs/(including nested ones, e.g. docs/internal/...)markdownlintrules with a fixed set of deckhouse-specific overrides (line-length limits, blanks-around-headings, duplicate-heading siblings, consistent code-fence/emphasis/strong styles, trailing newline, etc.)Changes:
pkg/linters/docs/rules/markdown.go— MarkdownRule implementation with deckhouseMarkdownlintConfig()pkg/linters/docs/documentation.go— invoke the new rule in Documentation.Run()pkg/config.go,pkg/config/global/global.go,internal/module/module.go— add MarkdownlintRule to the config and map the impact levelgo.mod/go.sum— github.com/ldmonster/go-markdownlint dependencypkg/linters/docs/README.md— rule documentationtest/e2e/testdata/documentation/markdownlint-violations/— e2e test case (duplicate h1 + missing trailing newline)Example