Skip to content

Commit bb1c9cc

Browse files
Benjamin-PhilipJuliaLawall
authored andcommitted
scripts: coccicheck: warn on unset debug file
coccicheck prints debug logs to stdout unless a debug file has been set. This makes it hard to read coccinelle's suggested changes, especially for someone new to coccicheck. From this commit, we warn about this behaviour from within the script on an unset debug file. Explicitly setting the debug file to /dev/null suppresses the warning while keeping the default. Signed-off-by: Benjamin Philip <benjamin.philip495@gmail.com> Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
1 parent 8952cfe commit bb1c9cc

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

scripts/coccicheck

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,11 @@ coccinelle () {
260260
}
261261

262262
if [ "$DEBUG_FILE" = "" ]; then
263+
echo 'You have not explicitly specified the debug file to use.'
264+
echo 'Using default "/dev/null" as debug file.'
265+
echo 'Debug logs will be printed to stdout.'
266+
echo 'You can specify the debug file with "make coccicheck DEBUG_FILE=<debug_file>"'
267+
echo ''
263268
DEBUG_FILE="/dev/null"
264269
fi
265270

0 commit comments

Comments
 (0)