← 返回
未分类 中文

Changelog Linter

Validate CHANGELOG.md files against the Keep a Changelog format (keepachangelog.com). Checks version ordering, date formats, section types, link references,...
验证 CHANGELOG.md 文件是否符合 Keep a Changelog 格式(keepachangelog.com),检查版本顺序、日期格式、章节类型、链接引用等。
charlie-morrison charlie-morrison 来源
未分类 clawhub v1.0.1 1 版本 100000 Key: 无需
★ 0
Stars
📥 396
下载
💾 1
安装
1
版本
#latest

概述

Changelog Linter

Validate CHANGELOG.md files against the Keep a Changelog specification.

Commands

All commands use the bundled Python script at scripts/changelog_linter.py.

1. Lint a changelog

python3 scripts/changelog_linter.py lint <file> [--strict] [--format text|json|markdown]

Run all validation rules against a CHANGELOG.md file.

Flags:

  • --strict — exit code 1 on any warning (not just errors)
  • --format — output format: text (default), json, markdown

2. List versions

python3 scripts/changelog_linter.py versions <file> [--format text|json]

Extract and display all versions with dates and change counts.

3. Validate version ordering

python3 scripts/changelog_linter.py order <file> [--format text|json]

Check that versions are in descending semver order.

4. Check links

python3 scripts/changelog_linter.py links <file> [--format text|json]

Verify that all version headers have corresponding link references at the bottom.

Lint Rules (16 total)

Structure (5 rules)

  1. missing-title — File doesn't start with # Changelog
  2. missing-description — No description paragraph after title
  3. no-versions — No version entries found
  4. empty-version — Version section has no change entries
  5. unreleased-missing — No [Unreleased] section

Versions (4 rules)

  1. invalid-version — Version doesn't follow semver (MAJOR.MINOR.PATCH)
  2. invalid-date — Date doesn't follow ISO 8601 (YYYY-MM-DD)
  3. version-order — Versions not in descending order
  4. duplicate-version — Same version appears twice

Sections (3 rules)

  1. invalid-section — Section type not in spec (Added/Changed/Deprecated/Removed/Fixed/Security)
  2. empty-section — Section header with no list items
  3. section-order — Sections not in recommended order

Formatting (4 rules)

  1. missing-link-ref — Version header has no corresponding link reference
  2. broken-link-ref — Link reference exists but URL is empty or malformed
  3. inconsistent-bullets — Mixed bullet styles (- and *)
  4. trailing-whitespace — Lines with trailing whitespace

Output Formats

Text (default)

CHANGELOG.md:15 error [invalid-date] Version 1.2.0 has invalid date: "March 2024" (expected YYYY-MM-DD)
CHANGELOG.md:28 warning [empty-section] Section "Deprecated" under 1.1.0 has no entries
CHANGELOG.md:45 warning [missing-link-ref] Version 1.0.0 has no link reference

3 issues (1 error, 2 warnings)

JSON / Markdown

Standard structured output with issues, summary, and version list.

CI Integration

- name: Lint Changelog
  run: python3 scripts/changelog_linter.py lint CHANGELOG.md --strict

Exit codes: 0 = valid, 1 = issues found.

版本历史

共 1 个版本

  • v1.0.1 当前
    2026-05-07 06:39 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

it-ops-security

Vulnerability Prioritizer

charlie-morrison
在CVSS评分之外,利用EPSS、CISA KEV、资产关键性、可达性分析以及利用成熟度进行漏洞优先级排序
★ 1 📥 515
dev-programming

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 681 📥 329,284
dev-programming

Mcporter

steipete
使用 mcporter CLI 直接列出、配置、认证及调用 MCP 服务器/工具(支持 HTTP 或 stdio),涵盖临时服务器、配置编辑及 CLI/类型生成功能。
★ 196 📥 67,935