RL007: ChangelogVersionMatch

Overview

Property Value
ID RL007
Name ChangelogVersionMatch
Group release
Severity WARNING

Description

Checks that the changelog contains an entry for the current version.

Missing changelog entries can cause:

  • Users not knowing what changed in a release
  • Incomplete release documentation
  • Difficulty tracking breaking changes
  • Poor communication about bug fixes and features

What it checks

The check searches the changelog for a section matching the version in pyproject.toml:

# pyproject.toml
[project]
version = "1.2.3"

The check looks for version headers in various formats:

## [1.2.3]              # Keep a Changelog format
## [1.2.3] - 2024-01-15 # With date
## 1.2.3                # Simple format
# 1.2.3                 # Header format

Changelog files checked: CHANGELOG.md, CHANGELOG.rst, CHANGES.md, NEWS.md, HISTORY.md, and variants.

How to fix

Add a changelog entry for the current version:

Simple format

# Changelog

## 1.2.3

- Added new feature X
- Fixed bug in Y

## 1.2.2

- Previous changes

Release workflow

Update changelog before bumping version:

  1. Add changes under [Unreleased] as you work
  2. When releasing, rename [Unreleased] to [X.Y.Z] - YYYY-MM-DD
  3. Add new empty [Unreleased] section
  4. Commit changelog with version bump

Configuration

Skip this check

[tool.pycmdcheck]
skip = ["RL007"]

CLI

pycmdcheck --skip RL007