scripts/check: run style check for test files

Co-authored-by: @johanmalm
This commit is contained in:
tokyo4j 2025-10-20 04:02:34 +09:00 committed by Hiroaki Yamamoto
parent d8260feef2
commit 261ec3c509
3 changed files with 8 additions and 2 deletions

View file

@ -19,7 +19,7 @@ run_checks () {
return $? return $?
fi fi
find src/ include/ clients/ \( -name "*.c" -o -name "*.h" \) -type f -print0 | find src/ include/ clients/ t/ \( -name "*.c" -o -name "*.h" \) -type f -print0 |
nice xargs -0 --max-args 1 --max-procs $(nproc) \ nice xargs -0 --max-args 1 --max-procs $(nproc) \
scripts/checkpatch.pl --terse --no-tree --strict --file scripts/checkpatch.pl --terse --no-tree --strict --file
return $? return $?

View file

@ -5661,6 +5661,7 @@ sub process {
$var !~ /^(?:GString|GError|GHashTable)/ && $var !~ /^(?:GString|GError|GHashTable)/ &&
$var !~ /^(?:__FreeBSD__)/ && $var !~ /^(?:__FreeBSD__)/ &&
$var !~ /^(?:RsvgRectangle|RsvgHandle)/ && $var !~ /^(?:RsvgRectangle|RsvgHandle)/ &&
$var !~ /^(?:CMUnitTest)/ &&
$var !~ /^(?:XKB_KEY_XF86Switch_VT_1)/ && $var !~ /^(?:XKB_KEY_XF86Switch_VT_1)/ &&
#Ignore SI style variants like nS, mV and dB #Ignore SI style variants like nS, mV and dB

View file

@ -68,7 +68,12 @@ test_buf_add_fmt(void **state)
static void static void
test_buf_add_char(void **state) test_buf_add_char(void **state)
{ {
const char long_string[] = "123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"; static const char long_string[] =
"123456789012345678901234567890123456789012345678901234567890 "
"123456789012345678901234567890123456789012345678901234567890 "
"123456789012345678901234567890123456789012345678901234567890 "
"123456789012345678901234567890123456789012345678901234567890 "
"123456789012345678901234567890123456789012345678901234567890 ";
size_t len = strlen(long_string); size_t len = strlen(long_string);
/* /*