History

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.

Benjamin Philip committed 10 months ago

Commit bb1c9cc1 parent 8952cfe1 file · +5 −0Browse files

Showing the changes to scripts (1 of 1 file). Show all

Unified · Split

scripts/coccicheck+5−0
@@ -260,6 +260,11 @@ coccinelle () { · 259 unmodified lines
260}260}
261 261
262if [ "$DEBUG_FILE" = "" ]; then262if [ "$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 ''
263 DEBUG_FILE="/dev/null"268 DEBUG_FILE="/dev/null"
264fi269fi
265 270