Skip to content

[dmt] update copyright year and add no_lang_key tests#365

Merged
ldmonster merged 1 commit into
mainfrom
chore/add-tests-for-no-lang-key-lint
May 19, 2026
Merged

[dmt] update copyright year and add no_lang_key tests#365
ldmonster merged 1 commit into
mainfrom
chore/add-tests-for-no-lang-key-lint

Conversation

@fuldaxxx
Copy link
Copy Markdown
Member

@fuldaxxx fuldaxxx commented May 18, 2026

Description

Unit tests for the no-lang-key documentation linter rule (pkg/linters/docs/rules/no_lang_key.go). Covers front matter parsing, lang: key detection with line number reporting, integration
through CheckFiles with mock modules, exclude rules, edge cases (empty path, subdirectories, non-md files).

Why do we need it, and what problem does it solve?

The no-lang-key rule was added without test coverage. Without tests, any future refactoring of front matter parsing or lang: key detection logic could silently introduce regressions - for example, false positives on language: keys, missed detection when lang: appears with tabs instead of spaces, or incorrect behavior when lang: is present in the document body outside
front matter.

Signed-off-by: Ruslan Gorbunov <ruslan.gorbunov@flant.com>
@fuldaxxx fuldaxxx changed the title [chore] update copyright year and add no_lang_key tests [dmt] update copyright year and add no_lang_key tests May 18, 2026
@fuldaxxx fuldaxxx self-assigned this May 18, 2026
@fuldaxxx fuldaxxx requested review from ipaqsa and ldmonster May 18, 2026 15:03
@fuldaxxx fuldaxxx marked this pull request as ready for review May 18, 2026 15:24
@ldmonster ldmonster merged commit 5691d7d into main May 19, 2026
4 checks passed
@ldmonster ldmonster deleted the chore/add-tests-for-no-lang-key-lint branch May 19, 2026 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants