mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-16 02:23:49 +08:00
This patch adds a workflow to run coccinelle scripts against our codebase. This can be used to find errors in the code base. The initial patch adds a check to find unbalanced heap_form_tuple heap_freetuple occurances. https://coccinelle.gitlabpages.inria.fr/website/
13 lines
274 B
Bash
Executable File
13 lines
274 B
Bash
Executable File
#!/bin/sh
|
|
|
|
SCRIPT_DIR=$(dirname "${0}")
|
|
|
|
true > coccinelle.diff
|
|
|
|
for f in "${SCRIPT_DIR}"/../coccinelle/*.cocci; do
|
|
find "${SCRIPT_DIR}"/.. -name '*.c' -exec spatch --very-quiet -sp_file "$f" {} + | tee -a coccinelle.diff
|
|
done
|
|
|
|
if [ -s coccinelle.diff ] ; then exit 1; fi
|
|
|