Skip to content

Commit

Permalink
chore: Add discouraged function check to pre-commit.
Browse files Browse the repository at this point in the history
Reimplements `make check-discouraged-functions` for Python regex.
  • Loading branch information
s373nZ committed Dec 1, 2024
1 parent 7ae1e32 commit b531f46
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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\/

0 comments on commit b531f46

Please sign in to comment.