mirror of https://codeberg.org/topola/topola.git
chore: Use `committed` instead of `conventional-pre-commit`
The most important difference in this PR is that we now enforce scope and subject line length. `conventional-pre-commit`, which we have been using until now, does not appear to allow that unlike `committed` which we will be now using. On the other hand, `committed` doesn't allow to require having a scope, unlike `conventional-pre-commit`, but I will probably submit them a PR for this later. I also find it questionable that disabling particular checks is to be done by switching boolean options to false. Doing so by string options would be more future-proof. Also note that this has a check to make sure the commit message starts with a verb. I am fine with this myself, but it may be an overkill.
This commit is contained in:
parent
b000f2b7d8
commit
594bb51a57
|
|
@ -14,9 +14,8 @@ repos:
|
|||
rev: v5.0.2
|
||||
hooks:
|
||||
- id: reuse-lint-file
|
||||
- repo: https://github.com/compilerla/conventional-pre-commit
|
||||
rev: v3.4.0
|
||||
- repo: https://github.com/crate-ci/committed
|
||||
rev: v1.1.7
|
||||
hooks:
|
||||
- id: conventional-pre-commit
|
||||
- id: committed
|
||||
stages: [commit-msg]
|
||||
args: []
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@ steps:
|
|||
RUST_BACKTRACE: 1
|
||||
CARGO_TERM_COLOR: always
|
||||
commands:
|
||||
- cargo install committed
|
||||
- committed develop..HEAD
|
||||
- rustup component add rustfmt
|
||||
- cargo fmt --all -- --check
|
||||
when:
|
||||
|
|
|
|||
|
|
@ -0,0 +1,73 @@
|
|||
# SPDX-FileCopyrightText: 2025 Topola contributors
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
subject_length = 80
|
||||
line_length = 100
|
||||
style = "conventional"
|
||||
|
||||
# Should be the same as the list of directories in crates/ and src/.
|
||||
allowed_scopes = [
|
||||
# Generated using `ls crates | awk '{ print "\"" $1 "\","; }' | sort`.
|
||||
"planar-incr-embed",
|
||||
"specctra-core",
|
||||
"specctra_derive",
|
||||
"topola-cli",
|
||||
"topola-egui",
|
||||
|
||||
# Generated using
|
||||
# `find src -type f | awk '!/lib.rs|mod.rs/ { print "\"" substr($1, 1 + 4, length($1) - 4 - 3) "\","; }' | sort`.
|
||||
"autorouter/autoroute",
|
||||
"autorouter/autorouter",
|
||||
"autorouter/compare_detours",
|
||||
"autorouter/execution",
|
||||
"autorouter/history",
|
||||
"autorouter/invoker",
|
||||
"autorouter/measure_length",
|
||||
"autorouter/place_via",
|
||||
"autorouter/pointroute",
|
||||
"autorouter/ratsnest",
|
||||
"autorouter/remove_bands",
|
||||
"autorouter/selection",
|
||||
"drawing/band",
|
||||
"drawing/bend",
|
||||
"drawing/cane",
|
||||
"drawing/collect",
|
||||
"drawing/dot",
|
||||
"drawing/drawing",
|
||||
"drawing/gear",
|
||||
"drawing/graph",
|
||||
"drawing/guide",
|
||||
"drawing/head",
|
||||
"drawing/loose",
|
||||
"drawing/primitive",
|
||||
"drawing/seg",
|
||||
"geometry/compound",
|
||||
"geometry/edit",
|
||||
"geometry/geometry",
|
||||
"geometry/poly",
|
||||
"geometry/primitive",
|
||||
"geometry/recording_with_rtree",
|
||||
"geometry/shape",
|
||||
"geometry/with_rtree",
|
||||
"graph",
|
||||
"interactor/activity",
|
||||
"interactor/interaction",
|
||||
"interactor/interactor",
|
||||
"layout/layout",
|
||||
"layout/poly",
|
||||
"layout/via",
|
||||
"math/tangents",
|
||||
"router/astar",
|
||||
"router/draw",
|
||||
"router/navcord",
|
||||
"router/navcorder",
|
||||
"router/navmesh",
|
||||
"router/route",
|
||||
"router/router",
|
||||
"specctra/design",
|
||||
"stepper",
|
||||
"triangulation"
|
||||
]
|
||||
|
||||
merge_commit = false
|
||||
Loading…
Reference in New Issue