We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7be3772 commit 44e907bCopy full SHA for 44e907b
.pre-commit-config.yaml
@@ -17,3 +17,14 @@ repos:
17
hooks:
18
- id: shellcheck
19
args: [ -fgcc ]
20
+
21
+- repo: local
22
+ hooks:
23
+ # Reimplementation of `make check-amount-access` for pygrep.
24
+ - id: check-amount-access
25
+ name: Check amount_msat and amount_sat members are not accessed directly
26
+ description: "Don't access amount_msat and amount_sat members directly without a good reason since it risks overflow."
27
+ language: pygrep
28
+ entry: (->|\.)(milli)?satoshis(?!.*\/\*\ Raw:)|(?<!sizeof)\(struct\ amount_(m)?sat\)
29
+ types: [ c ]
30
+ exclude: common/amount|.*/test/.*
0 commit comments