Philipp Schuster
62345cd6fd
misc: gitlint: allow more prefixes disabling 72 width limit
...
Suggested-by Alyssa Ross [0].
[0]: https://github.com/cloud-hypervisor/cloud-hypervisor/pull/7471#discussion_r2519894440
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de >
On-behalf-of: SAP philipp.schuster@sap.com
2025-11-13 19:16:45 +00:00
Philipp Schuster
77e042237d
ci: improve gitlint (max line length in body with exceptions)
...
Follow-up of 5aa1540c5d but way more
mature. We now use custom gitlint rules written in Python to better
handle the max line length, with respect to a few valid exceptions.
Recognizing code blocks or compiler output, as discussed, is not
trivial and hard to get right for all corner-cases. Therefore, this
commit is a pragmatic way forward. The CI job should be kept optional.
Allowed exceptions for the 72 line length limit are now:
1. links in the following three common patterns:
https://example.com/very-long-links/very-long-links/very-long-links/very-long-links/very-long-links/very-long-links/very-long-links
[0] https://example.com/very-long-links/very-long-links/very-long-links/very-long-links/very-long-links/very-long-links/very-long-links
[0]: https://example.com/very-long-links/very-long-links/very-long-links/very-long-links/very-long-links/very-long-links/very-long-links
2. code blocks (anything between the three backticks)
```
let x = "very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_"
```
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de >
On-behalf-of: SAP philipp.schuster@sap.com
2025-05-09 14:50:23 +01:00
Philipp Schuster
5aa1540c5d
ci: gitlint now ignores long lines from links
...
This helps to prevent annoying CI failures when one adds useful resources into
a commit message, such as [0].
One can test this locally using: `gitlint --commits HEAD~1..HEAD`
[0]
https://example.com/?lorem-ipsum-lorem-ipsum-lorem-ipsum-lorem-ipsum-lorem-ipsum-lorem-ipsum-lorem-ipsum-lorem-ipsum-lorem-ipsum-lorem-ipsum-lorem-ipsum-lorem-ipsum-lorem-ipsum-lorem-ipsum
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de >
On-behalf-of: SAP philipp.schuster@sap.com
2025-03-19 16:11:26 +00:00
Bo Chen
07475d2bc1
gitlint: Increase the title length limit to 72
...
This is particularly useful for commits with long component names. Of
course, it is better to have concise subject that is less than 50 char.
Signed-off-by: Bo Chen <chen.bo@intel.com >
2023-11-17 08:43:19 -08:00
Ruslan Mstoi
ea7999e064
build: add gitlint commit message linter
...
Implement commit message check workflow using gitlint
Fixes : #5840
Signed-off-by: Ruslan Mstoi <ruslan.mstoi@intel.com >
2023-11-16 16:09:17 +00:00