blob: b8c1cd2a6ae679e273e5a76e4aff6e8637bc84d9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#!/bin/sh
top_srcdir=${SOURCE_ROOT:-..}
. ${top_srcdir}/test/setup_env.sh
ebegin "Checking spacing style"
out=$(cd ${top_srcdir}; find src -name '*.[ch]' \
! -name queue.h \
-exec grep -n -E \
-e '\<(for|if|switch|while)\(' \
-e '\<(for|if|switch|while) \( ' \
-e ' ;' \
-e '[[:space:]]$' \
-e '\){' \
-e '(^|[^:])//' \
{} +)
[ -z "${out}" ]
eend $? "These lines violate style rules:"$'\n'"${out}"
|