summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2022-06-24 18:06:08 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2022-06-25 08:56:14 +0200
commitb9946b303af88d9a13d130e5cef108f3b1743b56 (patch)
tree29eaf69abe53d16d29414e13fd5bca237e09be46
parent8fd442f7b55b7a394836ddc763a4c4c184effa02 (diff)
downloadptxdist-b9946b303af88d9a13d130e5cef108f3b1743b56.tar.gz
ptxdist-b9946b303af88d9a13d130e5cef108f3b1743b56.tar.xz
ptxd_make_world_lint: add check for whitespace issues in menu files
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r--scripts/lib/ptxd_make_world_lint.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/lib/ptxd_make_world_lint.sh b/scripts/lib/ptxd_make_world_lint.sh
index 3ba68547e..89f32bff8 100644
--- a/scripts/lib/ptxd_make_world_lint.sh
+++ b/scripts/lib/ptxd_make_world_lint.sh
@@ -274,13 +274,19 @@ PTXDIST_LINT_COMMANDS="${PTXDIST_LINT_COMMANDS} cross"
ptxd_make_world_lint_menu() {
local filefd file
- echo "Checking menu files for redundant 'default n' ..."
+ echo "Checking menu file formating and basic syntax ..."
exec {filefd}< <(ptxd_make_world_lint_menu_files)
while read file <&${filefd}; do
if grep -q "\<default n$" "${file}"; then
ptxd_lint_error "'$(ptxd_print_path "${file}")' contains redundant 'default n'."
fi
+ if grep -q "[ ]$" "${file}"; then
+ ptxd_lint_error "'$(ptxd_print_path "${file}")' contains trailing whitespaces."
+ fi
+ if grep -q "^ *[^ ]" "${file}"; then
+ ptxd_lint_error "'$(ptxd_print_path "${file}")' uses spaces instead of tabs."
+ fi
done
exec {filefd}<&-
echo