Skip to content

Commit fb2d782

Browse files
authored
fix custom hook logic (#150)
1 parent 986ec7a commit fb2d782

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

.git-hooks/detect-api-keys.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,12 @@ def main(argv=None):
6161
if match != None:
6262
files_with_key.append((name, filename, i + 1, match.end()))
6363

64-
if files_with_key:
65-
for file in files_with_key:
66-
print(key_found_message(file))
67-
return 1
68-
else:
69-
return 0
64+
if files_with_key:
65+
for file in files_with_key:
66+
print(key_found_message(file))
67+
return 1
68+
else:
69+
return 0
7070

7171

7272
if __name__ == "__main__":

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ repos:
1616
description: Checks for AWS or Datadog API keys
1717
entry: ".git-hooks/detect-api-keys.py"
1818
language: python
19+
exclude: tests

0 commit comments

Comments
 (0)