Commit graph

3 commits

Author SHA1 Message Date
Chris Kay
7944421ba4 build(npm): adhere to Husky deprecation notice
Husky v8 adds the `husky init` subcommand, and v9 changes how it handles
hooks. We no longer need the Husky preamble in our hooks, so update to
the new `init` subcommand and remove the preambles.

Change-Id: I18ea1bbaedbb4213cc04c21413d75c9757ff7986
Signed-off-by: Chris Kay <chris.kay@arm.com>
2024-03-07 16:13:15 +00:00
Chris Kay
d97bade107 build(hooks): add commitlint hook
This change adds a configuration for commitlint - a tool designed to
enforce a particular commit message style - and run it as part of Git's
commit-msg hook. This validates commits immediately after the editor has
been exited, and the configuration is derived from the configuration we
provide to Commitizen.

While the configuration provided suggests a maximum header and body
length, neither of these are hard errors. This is to accommodate the
occasional commit where it may be difficult or impossible to comply
with the length requirements (for example, with a particularly long
scope, or a long URL in the message body).

Change-Id: Ib5e90472fd1f1da9c2bff47703c9682232ee5679
Signed-off-by: Chris Kay <chris.kay@arm.com>
2021-04-19 14:06:25 +01:00
Chris Kay
4b7eee81e3 build(hooks): add Gerrit hook
This change adds the Gerrit commit-msg hook to Husky, such that it now
no longer requires manual installation by the developer.

This hook was pulled directly from the TF-A Gerrit review server.

Change-Id: I79c9b0ce78fd326fda6db7a930b7277690177f28
Signed-off-by: Chris Kay <chris.kay@arm.com>
2021-04-19 14:06:25 +01:00