* Re: [ANNOUNCE] kernel-patch-validator - Tool to validate patches before submission
[not found] <ZppSfKGao4PQvRJd@kroah.com>
@ 2025-07-17 16:29 ` Ignacio Peña
2025-07-17 16:34 ` Greg KH
0 siblings, 1 reply; 4+ messages in thread
From: Ignacio Peña @ 2025-07-17 16:29 UTC (permalink / raw)
To: Greg KH; +Cc: linux-kernel-mentees
On Thu, Jul 17, 2025 at 08:15:00AM -0400, Greg KH wrote:
> Note, it is now 2025, so this check keeps failing :)
Haha, you caught me! The irony of a date validation tool having its own
date bug... I've already fixed it to properly check against the current
year instead of hardcoding 2025.
> Overall, I like the idea, the implementation needs a bit of work, see
> the few github issues I opened on it for details found in my testing.
Thank you so much for taking the time to test it and open those issues!
I really appreciate the detailed feedback. I've been working through them
this morning:
- Fixed the 2025 check (now validates against current date)
- Fixed the `set -e` issue so it shows all errors instead of bailing out
- Updated stable email validation to accept both formats
- Removed all the emojis (they looked unprofessional anyway)
> Can you add some of these checks to checkpatch.pl itself? That would be
> the best thing to do in the end. Having to use different tools makes
> things harder to keep in sync and to remember to use at all.
You're absolutely right about this. Having separate tools is definitely
not ideal - I often forgot to run my own validator!
I'm thinking the best approach would be:
1. Port the most useful checks to checkpatch.pl (like the changelog
placement check that would have saved me from your bot's rejection!)
2. Keep the workflow helpers separate (find-bugs.sh, test-patch.sh)
since they do more than just validation
Would you prefer if I start with small individual patches to checkpatch.pl
for each check, or should I put together an RFC first to discuss which
checks would be most valuable to integrate?
I built this tool mainly to understand what I was doing wrong. Now that
I've learned from my mistakes (thanks to you and Dan's feedback), it
makes total sense to help others by putting these checks where everyone
will actually use them.
Thanks,
Ignacio
^ permalink raw reply [flat|nested] 4+ messages in thread
* [ANNOUNCE] kernel-patch-validator - Tool to validate patches before submission
@ 2025-07-17 7:54 Ignacio Peña
2025-07-17 12:15 ` Greg KH
0 siblings, 1 reply; 4+ messages in thread
From: Ignacio Peña @ 2025-07-17 7:54 UTC (permalink / raw)
To: linux-kernel-mentees
Hi everyone,
After getting patches rejected multiple times for common mistakes, I built
a tool to validate patches before submission. It catches issues that
frequently lead to rejections.
Features:
- 21+ automated checks based on real maintainer feedback
- Validates format, DCO, changelog placement, dates
- Integrated checkpatch.pl with enhanced reporting
- Tools to find first contributions (find-bugs.sh)
- Patch series validation
Available at: https://github.com/ipenas-cl/kernel-patch-validator
Quick usage:
$ git format-patch -1
$ validate-patch.sh 0001-your-patch.patch
Example issues it catches:
- Future dates (2025 bug from wrong system clock)
- Missing changelog in v2+ patches after --- marker
- Multiple logical changes in one patch
- Wrong Signed-off-by format
The tool includes additional scripts:
- find-bugs.sh: Finds spelling errors, checkpatch issues
- test-patch.sh: Safe testing workflow
- contribution-checklist.sh: Readiness assessment
Each check is based on actual rejection feedback. Hope this helps other
newcomers avoid the same mistakes.
Feedback and contributions welcome!
Thanks,
Ignacio Peña
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [ANNOUNCE] kernel-patch-validator - Tool to validate patches before submission
2025-07-17 7:54 Ignacio Peña
@ 2025-07-17 12:15 ` Greg KH
0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2025-07-17 12:15 UTC (permalink / raw)
To: Ignacio Peña; +Cc: linux-kernel-mentees
On Thu, Jul 17, 2025 at 03:54:17AM -0400, Ignacio Peña wrote:
> Hi everyone,
>
> After getting patches rejected multiple times for common mistakes, I built
> a tool to validate patches before submission. It catches issues that
> frequently lead to rejections.
>
> Features:
> - 21+ automated checks based on real maintainer feedback
> - Validates format, DCO, changelog placement, dates
> - Integrated checkpatch.pl with enhanced reporting
> - Tools to find first contributions (find-bugs.sh)
> - Patch series validation
>
> Available at: https://github.com/ipenas-cl/kernel-patch-validator
>
> Quick usage:
> $ git format-patch -1
> $ validate-patch.sh 0001-your-patch.patch
>
> Example issues it catches:
> - Future dates (2025 bug from wrong system clock)
Note, it is now 2025, so this check keeps failing :)
Overall, I like the idea, the implementation needs a bit of work, see
the few github issues I opened on it for details found in my testing.
Can you add some of these checks to checkpatch.pl itself? That would be
the best thing to do in the end. Having to use different tools makes
things harder to keep in sync and to remember to use at all.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-07-17 16:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <ZppSfKGao4PQvRJd@kroah.com>
2025-07-17 16:29 ` [ANNOUNCE] kernel-patch-validator - Tool to validate patches before submission Ignacio Peña
2025-07-17 16:34 ` Greg KH
2025-07-17 7:54 Ignacio Peña
2025-07-17 12:15 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox