Skip to content
IonWarpGet started
Conventional Commits

Check Conventional Commits against the spec and against commitlint

A message can be a valid Conventional Commit and still fail commitlint. The specification accepts any type in any case, so Feat: add dark mode is fine by it.[1] commitlint's conventional config accepts eleven types, all in lower case, so it fails that line on two rules.[2]

Example pull request#310

What lands on your pull request · Code Review

P1Retry charges the same order twice
billing/checkout.ts:42 · A timed-out response can charge the order twice
- await payments.charge(order);+ await payments.charge(order, {+   idempotencyKey: order.id,+ });
When payment succeeds but the response times out, the caller retries the same order. Both calls charge it. Pass the stable order ID as the payment idempotency key.

Paste the subjects from your branch, or one whole message. You get both verdicts for each line, the reason a line fails, and the release the commits call for. It is free and needs no signup, and nothing you paste leaves your browser.

Check your commit messages

What are you pasting?

It runs in your browser. Nothing is sent or stored, and there is no signup.

5 of 8 follow the spec, and 3 of the 7 that commitlint checks pass it. Together they call for a major release.

  • feat(auth): add passkey sign-in

    Conventional Commitpasses commitlinta minor release

  • fix: Handle an empty diff.

    Conventional Commitfails commitlint (subject-case, subject-full-stop)a patch release

    • commitlint subject-case: subject must not start with a capital letter
    • commitlint subject-full-stop: subject may not end with a full stop
  • docs: update the setup guide

    Conventional Commitpasses commitlintno release

  • Feat: add dark mode

    Conventional Commitfails commitlint (type-enum, type-case)a minor release

    • commitlint type-enum: type must be one of build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test
    • commitlint type-case: type must be lower case
  • chore(deps)!: drop Node 18

    Conventional Commitpasses commitlintbreaking, a major release

  • refactor : split the review queue

    Not a Conventional Commitfails commitlint (type-empty, subject-empty)

    • Remove the space before the colon.
    • commitlint type-empty: type may not be empty
    • commitlint subject-empty: subject may not be empty
  • Merge pull request #12 from acme/passkeys

    Not a Conventional Commitcommitlint skips it by default

    • There is no colon after a type. Write type: description, as in fix: handle an empty diff.
  • update readme

    Not a Conventional Commitfails commitlint (type-empty, subject-empty)

    • There is no colon after a type. Write type: description, as in fix: handle an empty diff.
    • commitlint type-empty: type may not be empty
    • commitlint subject-empty: subject may not be empty

Where the spec and commitlint part ways

  • Types

    The spec requires feat for a new feature and fix for a bug fix, and it allows any other type.[1] commitlint allows only build, chore, ci, docs, feat, fix, perf, refactor, revert, style and test, written in lower case.[2]

  • The first letter and the full stop

    The spec says nothing about either. commitlint fails a description that starts with a capital letter, though it ignores words in quotes or backticks, and it fails a header that ends with a full stop.[2]

  • Length

    The spec sets no limit. commitlint fails a header longer than 100 characters, and any body or footer line longer than 100 unless that line holds a URL.[2]

  • Merges, reverts and fixups

    commitlint skips headers such as Merge pull request #12, Revert "…" and fixup! without checking them.[3] None of them is a Conventional Commit. If you squash merge with the pull request title as the message, that title is the commit your main branch keeps, so check it too.

  • Breaking changes

    Put ! right before the colon, as in feat(api)!:, or add a footer that starts BREAKING CHANGE: or BREAKING-CHANGE:. The spec requires the capitals, and it names only those two tokens. A footer written breaking change: or BREAKING_CHANGE: does not mark a breaking change.[1]

Make commitlint match what you check here

// commitlint.config.js
export default { extends: ["@commitlint/config-conventional"] };
  1. Which release a commit calls for

    The spec ties three things to a version. A breaking change calls for a major release, feat for a minor one and fix for a patch.[1] semantic-release's default rules also release perf and revert commits as a patch.[4]

  2. Check before you push

    Run git log --format=%s main..HEAD to print the subjects on your branch. Paste them above, one per line, and add the pull request title if you plan to squash with it.

  3. Then review what the commits change

    A good subject says what a change claims to do. IonWarp reads the pull request's diff to check it, and posts one comment with the file and line each finding points to.

Pricing

Simple pricing for your whole team.

One workspace price with seats included. Credits pool across your team. Unlimited repos on every plan.

Starter

$0 /mo

Try AI PR review.

  • 2 reviewers
    • Code Review
    • Security Review
  • 3 seats included
  • 15,000 credits to start, then 5,000/mo
  • About 70 reviews to start, then about 25 a month
  • Unlimited repos
Get Started

Max

$149 /mo

Scale AI PR review.

  • +9 reviewers
    • UX Review
    • API Performance
    • Analytics Review
    • SEO Review
    • Changelog
    • CI/CD Performance
    • Plan Review
    • Repeat-Failure Learnings
    • SOC 2 Review
  • 10 seats included
  • +75,000 credits/mo
  • About 360 reviews a month
  • +$29/mo per added seat
  • Unlimited repos
  • Priority support
Choose Max
Enterprise

Custom reviewers + credits · GitHub Enterprise · SSO/SAML + audit logs · Custom security review + SLA

Contact us
FAQ

Frequently asked questions

What are Conventional Commits?

It is a format for commit messages. The first line holds a type such as feat or fix, an optional scope in parentheses, an optional ! for a breaking change, a colon and a space, and then a description. A body and footers may follow, each after a blank line.

Are Conventional Commits types case sensitive?

Not under the spec. It says tools must not treat them as case sensitive, except for BREAKING CHANGE, which must be in capitals. commitlint's conventional config does require lower-case types.

Which commit types does commitlint allow?

@commitlint/config-conventional allows eleven types, build, chore, ci, docs, feat, fix, perf, refactor, revert, style and test. You can change the list in your own config.

How do I mark a breaking change?

Put ! right before the colon, as in feat(api)!: drop the v1 endpoint, or add a footer that starts BREAKING CHANGE: and describes the change. Either one calls for a major release.

Is this checker free?

Yes. There is no signup and nothing to install. It runs in your browser, and nothing you paste is sent anywhere.

Sources

  1. Conventional Commits 1.0.0Conventional Commits · read
  2. @commitlint/config-conventional, release 21.2.4commitlint on GitHub · read
  3. @commitlint/is-ignored default patterns, release 21.2.4commitlint on GitHub · read
  4. commit-analyzer default release rulessemantic-release on GitHub · read