-
Notifications
You must be signed in to change notification settings - Fork 185
Open
Description
Seeing the PR #973 (thanks for the PR!), I am considering if we can check if the indent is 4 spaces without tabs in CI. Right now I am seeing the following tools.
- clang-format: https://clang.llvm.org/docs/ClangFormat.html
- GNU indent: https://www.gnu.org/software/indent/
If we only check if C files don't include tabs. We may just apply the following kind of script.
$ cat check_no_tab.sh
#!/bin/bash
set -eu
if grep -rPn '\t' ext/openssl/; then
echo "FAIL"
exit 1
fi
echo "OK"
exit 0
OK case:
$ ./check_no_tab.sh
OK
Error case:
$ ./check_no_tab.sh
ext/openssl/ossl_ssl.c:3302: DefIVarID(hostname);
FAIL
What do you think?
Metadata
Metadata
Assignees
Labels
No labels