]> git.ipfire.org Git - thirdparty/curl.git/commit
checksrc: find bad indentation in conditions without open brace
authorDaniel Stenberg <daniel@haxx.se>
Fri, 28 Apr 2023 16:07:33 +0000 (18:07 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 28 Apr 2023 21:11:00 +0000 (23:11 +0200)
commit9ce7eee07042605045dcfd02a6f5b38ad5c8a05d
tree7a83474325c43f8d34233dae5bad509b2475ce74
parent31303c34e90949847860db82c4768cab1482beda
checksrc: find bad indentation in conditions without open brace

If the previous line starts with if/while/for AND ends with a closed
parenthesis and there's an equal number of open and closed parentheses
on that line, verify that this line is indented $indent more steps, if
not a cpp line.

Also adjust the fall-out from this fix.

Closes #11054
17 files changed:
lib/cf-socket.c
lib/ftp.c
lib/imap.c
lib/inet_ntop.c
lib/ldap.c
lib/mime.c
lib/multi.c
lib/openldap.c
lib/pop3.c
lib/vquic/curl_msh3.c
lib/vquic/curl_ngtcp2.c
lib/vtls/sectransp.c
scripts/checksrc.pl
src/tool_getparam.c
src/tool_operate.c
tests/libtest/lib678.c
tests/server/socksd.c