]> git.ipfire.org Git - thirdparty/u-boot.git/commit
checkpatch: Add check for space indentation in Kconfig
authorKuan-Wei Chiu <visitorckw@gmail.com>
Mon, 22 Dec 2025 17:42:55 +0000 (17:42 +0000)
committerTom Rini <trini@konsulko.com>
Tue, 6 Jan 2026 19:04:03 +0000 (13:04 -0600)
commiteea1c6ec4ead013fcdbc1f4ee1a5f595d58ca303
tree4dd81d082bdc14c5ea5ac4af76b1464d7bc482d8
parente21edf2620749f1390c9ac3ebe329a6fd261c65a
checkpatch: Add check for space indentation in Kconfig

U-Boot requires Kconfig options to be indented with tabs, whereas Linux
allows spaces. Add a U-Boot specific check to warn when spaces are used
for indentation in Kconfig files.

To ensure this check is executed, move the u_boot_line() invocation in
process() to occur before the valid source file check. Previously,
Kconfig files were skipped by the file extension filter before the
U-Boot specific checks could run.

Example warning:

WARNING: Kconfig indentation should use tabs
+    bool

Link: https://lore.kernel.org/u-boot/20251222162026.GA847766@bill-the-cat/
Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
scripts/checkpatch.pl