aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/check-patches
Commit message (Collapse)AuthorAgeFilesLines
* check-patches: fix non-posix regexJohannes Thyssen Tishman2024-01-251-3/+3
| | | | | | | | | The usage of '+' to match 'one or more occurrences' of a regex is only POSIX compliant when used in an Extended Regular Expression (ERE). Link: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html Signed-off-by: Johannes Thyssen Tishman <johannes@thyssentishman.com> Acked-by: Robin Jarry <robin@jarry.cc>
* check-patches: enforce trailer listBence Ferdinandy2024-01-181-0/+27
| | | | | | | | | | | | With the new Changelog-*: trailers it's important that trailers are not misspelled accidentally and to cut down on trailer clutter. Add an explicit list of accepted trailers with their preferred ordering and some explanation where warranted to CONTRIBUTING. Enforce the list in CI. Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com> Reviewed-by: Moritz Poldrack <moritz@poldrack.dev> Acked-by: Robin Jarry <robin@jarry.cc>
* check-patches: enforce prose on changelog entriesBence Ferdinandy2024-01-181-0/+6
| | | | | | | | | | Check if the Changelog-*: trailers have proper English sentences starting with a capital letter and ending in a period. Update CONTRIBUTING with an explicit mention of this. Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com> Reviewed-by: Moritz Poldrack <moritz@poldrack.dev> Acked-by: Robin Jarry <robin@jarry.cc>
* check-patches: check for a prefix in commit titleBence Ferdinandy2024-01-181-0/+4
| | | | | | | | | | The contributing guidelines ask for a use of a short prefix in the commit title. Delegate nitpicking about the existence of the prefix to the CI. Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com> Reviewed-by: Moritz Poldrack <moritz@poldrack.dev> Acked-by: Robin Jarry <robin@jarry.cc>
* check-patches: factorize codeRobin Jarry2024-01-181-7/+12
| | | | | | | Reduce code duplication. Signed-off-by: Robin Jarry <robin@jarry.cc> Reviewed-by: Bence Ferdinandy <bence@ferdinandy.com>
* lint,validate: fix for openbsdRobin Jarry2023-12-141-2/+3
| | | | | | | | | | | | | | - Remove GNU specific stuff (ln -v, mktemp --tempdir, grep --color) - Remove GCC specific flags in sendemail-validate (-Warith-conversion) - Add -std=c99 and -Wpedantic and fix the reported warnings. - Explicitly call gmake everywhere. - Run our custom analyzer standalone. Golangci lint plugins are not supported on OpenBSD. Indirect dependency to golang.org/x/mod is required somehow... Reported-by: Johannes Thyssen Tishman <johannes@thyssentishman.com> Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Johannes Thyssen Tishman <johannes@thyssentishman.com>
* check-patches: complain if title is longer than 72 charactersBence Ferdinandy2023-09-271-0/+5
| | | | | | | | | | | | Although git commit titles can be a lot longer that 72 characters it is sensible to limit it somewhere. Many people recommend a maximum of 50 characters, other places allow for slightly longer, github for examples truncates titles at 72, our benevolent maintainer tries to aim for 60. Considering the above 72 seems like a comfortable hard limit. Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com> Reviewed-by: Moritz Poldrack <moritz@poldrack.dev> Acked-by: Robin Jarry <robin@jarry.cc>
* contrib: update sendemail-validate hookRobin Jarry2023-08-041-1/+1
| | | | | | | | | With git 2.41, git send-email exports a patch counter to the validate hook. Copy the example hook from git and adapt it for aerc. Link: https://github.com/git/git/commit/3c8d3adeae83 Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Tim Culverhouse <tim@timculverhouse.com>
* check-patches: report all errorsRobin Jarry2023-02-281-14/+18
| | | | | | | Instead of skipping to the next patch after the first error, report all issues. Change the output to make it more user friendly. Signed-off-by: Robin Jarry <robin@jarry.cc>
* check-patches: ignore .mailmap for author and s-o-b trailer checkRobin Jarry2022-12-201-1/+1
| | | | | | | We don't care that they are known in .mailmap as long as both match. Reported-by: Moritz Poldrack <moritz@poldrack.dev> Signed-off-by: Robin Jarry <robin@jarry.cc>
* contributing: add tooling for git send-emailRobin Jarry2022-12-141-0/+39
Add a gitconfig target in the Makefile to configure a new clone with sane defaults: - set subject prefix - set correct mailing list address - enable sendemail.validate - install sendemail-validate hook The sendemail-validate hook will make a shallow clone of the current upstream repo, apply every patch on it and run some checks (a stripped down version of what is run by the upstream CI). Add a new check-patches script that verifies that the commit message actually contains something and that the Signed-off-by trailer from the patch author is present. Call check-patches in both the CI and the sendemail-validate hook. Update CONTRIBUTING.md accordingly. Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Tim Culverhouse <tim@timculverhouse.com>