Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .git-hooks/detect-api-keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ def main(argv=None):
if match != None:
files_with_key.append((name, filename, i + 1, match.end()))

if files_with_key:
for file in files_with_key:
print(key_found_message(file))
return 1
else:
return 0
if files_with_key:
for file in files_with_key:
print(key_found_message(file))
return 1
else:
return 0


if __name__ == "__main__":
Expand Down
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ repos:
description: Checks for AWS or Datadog API keys
entry: ".git-hooks/detect-api-keys.py"
language: python
exclude: tests