Rusty Russell
06a54606a3
check-includes: allow redundant "config.h"
...
We should actually be including this (as it may define _GNU_SOURCE
etc) before any system headers. But where we include <assert.h> we
often didn't, because check-includes would complain that the headers
included it too.
Weaken that check, and include config.h in C files before assert.h.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-02-04 12:02:36 +10:30
Rusty Russell
fbb494fba3
devtools/create-gossipstore: clean up enough to pass check-source.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-04-08 04:41:43 +00:00
William Casarin
f8fa4213f1
tools: use /usr/bin/env bash instead of /bin/bash
...
These commands fail on systems that do not have bash under /bin
Signed-off-by: William Casarin <jb55@jb55.com>
2018-07-24 00:25:43 +00:00
Jan Sarenik
9f519afc5d
tools/check-includes.sh: shellcheck recommended fixes
...
$ shellcheck --version
ShellCheck - shell script analysis tool
version: 0.5.0
license: GNU General Public License, version 3
website: https://www.shellcheck.net
$ make check-source
...
In tools/check-includes.sh line 14:
if [[ $(grep -cE "^#((ifndef|define) ${HEADER_ID}|endif /\* ${HEADER_ID} \*/)$" "${HEADER_FILE}") != 3 ]]; then
^-- SC1117: Backslash is literal in "\*". Prefer explicit escaping: "\\*".
In tools/check-includes.sh line 28:
git ls-files | grep -v 'ccan/' | grep -E "\.${1}"'$'
^-- SC1117: Backslash is literal in "\.". Prefer explicit escaping: "\\.".
2018-07-04 01:48:21 +00:00
practicalswift
e078fcefdd
Add check-includes.sh: Find redundant includes. Check ifndef:s.
2018-03-25 23:54:21 +00:00