[PATCH] utils: checkstyle.py: Warn when no valid Signed-off-by line is found
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Mon Aug 5 17:33:53 CEST 2024
On Mon, Aug 05, 2024 at 12:25:56PM +0100, Kieran Bingham wrote:
> Quoting Quentin Schulz (2024-08-05 11:46:24)
> > On 8/5/24 12:43 PM, Milan Zamazal wrote:
> > > Laurent Pinchart <laurent.pinchart at ideasonboard.com> writes:
> > >
> > >> All commits to libcamera must include a Signed-off-by line, and that
> > >> rule is enforced through git hooks and CI. This however doesn't prevent
> > >> patches from being submitted without an SoB tag, as noticed multiple
> > >> times in the past. Extend the checkstyle.py trailer checker to issue a
> > >> warning when the SoB line is missing to try and improve the situation.
> > >>
> > >> Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> > >
> > > Reviewed-by: Milan Zamazal <mzamazal at redhat.com>
> > >
> > > Now how to check that checkstyle.py has been run before a patch is
> > > submitted. ;-)
> >
> > b4 can do this (though still on client side).
> >
> > b4 prep --check
> >
> > if you don't run it once before b4 send is called, it'll complain (but
> > not force you to run it).
> >
> > c.f. b4.prep-perpatch-check-cmd in
> > https://b4.docs.kernel.org/en/latest/config.html#contributor-oriented-settings
I don't think there are easy ways to enforce client-side tests before
patches get submitted, without taking over control of the client
machine. Making sure the tests can be run easily is my favourite
approach. checkstyle.py is easy to use, and when set up as a post-commit
hook, it gets even easier. That's why I try to ensure checkstyle.py will
catch most common issues. If a developer submits a patch with an issue
that checkstyle.py would have caught, we can tell them to install the
git hook.
> I always keep the checkstyle hooks as a post-commit hook. I find this the
> best way (for me) as it will always run while developing, and provide me
> with fast feedback - but not prevent me from continuing in my work.
>
> 'cp ./utils/hooks/post-commit .git/hooks/'
>
> Always running, all of the time is a great way IMO to know it's been run
> before submitting ;-)
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list