aboutsummaryrefslogtreecommitdiff
path: root/rh/hooks.py
diff options
context:
space:
mode:
Diffstat (limited to 'rh/hooks.py')
-rw-r--r--rh/hooks.py11
1 files changed, 3 insertions, 8 deletions
diff --git a/rh/hooks.py b/rh/hooks.py
index 1d7eb3f..c90c0a3 100644
--- a/rh/hooks.py
+++ b/rh/hooks.py
@@ -425,15 +425,10 @@ def check_ktfmt(project, commit, _desc, diff, options=None):
('${PREUPLOAD_FILES}',), filtered)
result = _run(cmd)
if result.stdout:
- paths = [os.path.join(project.dir, x.file) for x in filtered]
fixup_cmd = [ktfmt] + args
- error = (
- '\nKotlin files need formatting.\n' +
- 'To reformat the kotlin files in this commit:\n' +
- rh.shell.cmd_to_str(fixup_cmd + paths)
- )
- return [rh.results.HookResult('ktfmt', project, commit, error=error,
- files=paths, fixup_cmd=fixup_cmd)]
+ return [rh.results.HookResult(
+ 'ktfmt', project, commit, error='Formatting errors detected',
+ files=[x.file for x in filtered], fixup_cmd=fixup_cmd)]
return None