Skip to content

Conventional Commit Messages

If you're contributing to inline-tests, follow this format. It's how we generate changelogs and version bumps automatically.

git commit -m"<type>(<optional scope>): <description>" \
  -m"<optional body>" \
  -m"<optional footer>"

Note: This cheatsheet is opinionated but does not violate the Conventional Commits specification.

Commit Message Formats

General Commit

<type>(<optional scope>): <description>

<optional body>

<optional footer>

Initial Commit

chore: init

Types

Changes relevant to the API or functionality:

  • feat — Commits that add or adjust a feature
  • fix — Commits that fix a bug

Internal changes:

  • refactor — Rewrite or restructure code without changing behavior
  • perf — Special refactor that improves performance
  • style — Code style changes (whitespace, formatting) without behavior change
  • test — Add missing tests or correct existing ones
  • docs — Documentation only changes
  • build — Build system, dependencies, CI/CD changes
  • ci — CI configuration changes
  • chore — Miscellaneous (e.g., .gitignore)

Scopes

The scope provides additional context. It's optional but encouraged.

inline-tests scopes:

  • decorator — @test/@it decorators
  • plugin — pytest plugin and collection
  • cli — itest command
  • types — type definitions

Do not use issue identifiers as scopes.

Breaking Changes

Breaking changes must be indicated by ! before the ::

feat(cli)!: rename command from itest to inline-test

Or include a footer:

feat(decorator): new decorator options

BREAKING CHANGE: @test no longer accepts positional arguments

Description

The description is a concise summary:

  • Mandatory
  • Use imperative, present tense: "add" not "added" or "adds"
  • Think: "This commit will... add timeout parameter"
  • Do not capitalize the first letter
  • Do not end with a period

Versioning Impact

Your commits determine the next version:

Commit Type Version Bump
feat Minor (0.X.0)
fix Patch (0.0.X)
perf Patch (0.0.X)
Breaking change (!) Major (X.0.0)
Others No release

Examples

feat(decorator): add timeout parameter to @test
fix(plugin): handle async test collection correctly
feat(cli): add --filter option for test selection

Filter tests by name pattern.

Closes #42
perf(plugin): skip AST parsing for files without @test
docs: update installation instructions
refactor(plugin): extract InlineModule into separate file

References