Conceptual
Login

Kernel Coding Style and the checkpatch Script

The kernel has written rules about how code and commit messages should look, and a script that checks a patch against them automatically. For Rust files the script checks the things formatting tools do not, such as commit message shape, licence tags and stray whitespace. Running it yourself catches the mechanical objections before a human sees them. A patch that fails it often gets no further review at all.

Questions this Concept answers

  • Why run that script yourself before posting a patch?