Skip to content
Merged
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
5 changes: 4 additions & 1 deletion llvm/utils/git/code-format-helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ def format_run(self, changed_files: List[str], args: FormatArgs) -> Optional[str
def hook_main():
# fill out args
args = FormatArgs()
args.verbose = False
args.verbose = os.getenv("FORMAT_HOOK_VERBOSE", False)

# find the changed files
cmd = ["git", "diff", "--cached", "--name-only", "--diff-filter=d"]
Expand All @@ -338,6 +338,9 @@ def hook_main():
print(f"Couldn't find {fmt.name}, can't check " + fmt.friendly_name.lower())

if len(failed_fmts) > 0:
print(
"Pre-commit format hook failed, rerun with FORMAT_HOOK_VERBOSE=1 environment for verbose output"
)
sys.exit(1)

sys.exit(0)
Expand Down
Loading