Add necessary code to support it

This commit is contained in:
Peter Jung 2025-02-03 10:53:13 +01:00
parent 425727ef9d
commit 71965f1383
4 changed files with 10 additions and 0 deletions

View file

@ -128,6 +128,12 @@
entry: detect-private-key
language: python
types: [text]
- id: detect-web3-private-key
name: detect web3 private key
description: detects the presence of web3 private keys.
entry: detect-web3-private-key
language: python
types: [text]
- id: double-quote-string-fixer
name: fix double quoted strings
description: replaces double quoted strings with single quoted strings.

View file

@ -110,6 +110,9 @@ The following arguments are available:
#### `detect-private-key`
Checks for the existence of private keys.
#### `detect-web3-private-key`
Checks for the existence of web3 private keys. Add `# web3-private-key-ok` to the end of the line to ignore false positives.
#### `double-quote-string-fixer`
This hook replaces double quoted strings with single quoted strings.

View file

@ -49,6 +49,7 @@ console_scripts =
destroyed-symlinks = pre_commit_hooks.destroyed_symlinks:main
detect-aws-credentials = pre_commit_hooks.detect_aws_credentials:main
detect-private-key = pre_commit_hooks.detect_private_key:main
detect-web3-private-key = pre_commit_hooks.detect_web3_private_key:main
double-quote-string-fixer = pre_commit_hooks.string_fixer:main
end-of-file-fixer = pre_commit_hooks.end_of_file_fixer:main
file-contents-sorter = pre_commit_hooks.file_contents_sorter:main