KW-CODESTYLE(1)

πŸ“¦ version 0.10, in ubuntu stonking

πŸ’… kw-codestyle β€” Checkpatch wrapper ✨

okay bestie, welcome to kw-codestyle, aka the Checkpatch wrapper β€” yes that's the manual name, we're keeping it, it's iconic πŸŽ€


🌸 SYNOPSIS 🌸

kw (c | codestyle)
kw (c | codestyle) [<directory> | <file> | <patch>]
kw (c | codestyle) [--verbose] [<directory> | <file> | <patch>]

πŸ¦‹ DESCRIPTION πŸ¦‹

so. checkpatch is genuinely one of the most fabulous scripts the Linux Kernel ever handed us πŸ’– its whole job is helping devs actually follow the code style the project adopted, and honestly? slay. respect the style guide.

this command here is a wrapper for checkpatch, and its whole goal is making that tool way less of a hassle to use. lowkey a glow-up for your workflow ✨

and here's the fun part: you can point it at a single file, a whole entire directory, or just a single patch β€” your call, main character energy, you decide πŸ‘‘


πŸ’– OPTIONS πŸ’–

  • <directory>, <file>, <patch> β€” these tell kw which files to actually run checkpatch on 🫢 and if you don't give it anything? it defaults to the current working directory β€” but only if that dir is a kernel tree. no kernel tree, no vibe check 😭
  • --verbose β€” shows you the commands being executed under the hood πŸ‘€ like, the whole ~behind the scenes~ of what's actually running. we love transparency fr fr

⭐ EXAMPLES ⭐

for all of these, we're assuming the relevant fields in your config files β€” which live by default in .kw/ β€” are already set up πŸŽ€ not set up? that's a you problem bestie, go fix it first.

also, strong rec: use kw config for managing your local and global configurations. that's the move, trust πŸ’… iykyk

okay so for checking the code style:

cd <kernel-path>
kw c drivers/iio/dummy/
kw c drivers/iio/dummy/iio_simple_dummy.c

first you roll into your kernel path like it's your own house 🏑 then you either vibe-check a whole directory, or you get surgical about one specific .c file. both correct, both ate πŸ”₯

heads up: the <kernel-path> in that cd is a placeholder, not a real path β€” swap in yours, don't come for me πŸ™ˆ

and that's the whole page, bestie!! 🌈 go forth and make your code style immaculate, the kernel devs will literally thank you πŸ§šπŸ’œ

β€” written from the kw-codestyle manual page, "Checkpatch wrapper" section / footer, with all the source + version + date energy folded in right here at the end ✨ periodt πŸ’…

πŸ“¦ where this page comes from