# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2025 The Linux Foundation

[general]
regex-style-search=true
contrib=contrib-title-conventional-commits,contrib-body-requires-signed-off-by

[title-max-length]
line-length=50

# Anchored because gitlint v0.19.1 calls search() for this rule; an
# unanchored pattern would match anywhere in the title and never fail.
[title-match-regex]
regex=^[A-Z][a-zA-Z]*(\([^)]+\))?!?: [A-Z]

[body-max-line-length]
line-length=72

[contrib-title-conventional-commits]
types=Fix,Feat,Chore,Docs,Style,Refactor,Perf,Test,Revert,CI,Build

# A DCO trailer cannot be wrapped, so waive B1 for commits carrying one
# longer than 72 characters. [ignore-body-lines] cannot be used: it
# would hide the sign-off from the signed-off-by check.
[ignore-by-body]
regex=^(?=(Signed-off-by|Co-authored-by): ).{73,}
ignore=B1

[ignore-body-lines]
regex=(.*)https?://(.*)
