Skip to content

Commit

Permalink
ci: Switch to commitlint
Browse files Browse the repository at this point in the history
Commitlint's CLI also allows linting (ranges of) already existing
commits. This will come in handy in the future for automatically
checking all commits of a pull request.
  • Loading branch information
Wuestengecko committed Dec 15, 2023
1 parent 0329cdb commit 9993dcc
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 25 deletions.
24 changes: 24 additions & 0 deletions .commitlintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# SPDX-FileCopyrightText: Copyright DB Netz AG and the capellambse contributors
# SPDX-License-Identifier: CC0-1.0
rules:
body-leading-blank: [2, always]
footer-leading-blank: [2, always]
scope-case: [2, always, lower-case]
subject-case: [2, always, sentence-case]
subject-empty: [2, never]
subject-full-stop: [2, never, .]
subject-max-length: [2, always, 72]
type-empty: [2, never]
type-enum: [2, always, [
build,
chore,
ci,
docs,
feat,
fix,
merge,
perf,
refactor,
revert,
test,
]]
17 changes: 12 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ repos:
rev: 23.9.1
hooks:
- id: black
- repo: local
- repo: local # mypy
hooks:
- id: mypy
name: mypy
Expand All @@ -114,7 +114,7 @@ repos:
- types-requests==2.25.11
- types-setuptools==68.0.0.1
- types-six==1.16.21.8
- repo: local
- repo: local # pylint
hooks:
- id: pylint
name: pylint
Expand All @@ -128,7 +128,14 @@ repos:
rev: v2.1.0
hooks:
- id: reuse
- repo: https://github.com/qoomon/git-conventional-commits
rev: v2.6.5
- repo: local # commitlint
hooks:
- id: conventional-commits
- id: commitlint
name: commitlint
entry: commitlint -e
language: node
stages: [commit-msg]
pass_filenames: false
always_run: true
additional_dependencies:
- "@commitlint/cli"
18 changes: 0 additions & 18 deletions git-conventional-commits.json

This file was deleted.

2 changes: 0 additions & 2 deletions git-conventional-commits.json.license

This file was deleted.

0 comments on commit 9993dcc

Please sign in to comment.