diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6ecd0c52acd2..c14732bf2d01 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -47,3 +47,11 @@ repos: common/amount\.(.*)| .*/test/.* )$ + + # Reimplementation of `make check-discouraged-functions` for pygrep. + - id: check-discouraged-functions + name: Check for usage of discouraged funtions + language: pygrep + entry: '[^a-z_/](?:fgets|fputs|gets|scanf|sprintf)\(' + types: [c] + exclude: ccan\/|contrib\/