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 16, 2024
1 parent 3182d79 commit aaf2f08
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 @@ -40,3 +40,11 @@ repos:
entry: (->|\.)(milli)?satoshis(?!.*\/\*\ Raw:)|(?<!sizeof)\(struct\ amount_(m)?sat\)
types: [ c ]
exclude: 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 aaf2f08

Please sign in to comment.