diff options
author | Mike Frysinger <vapier@google.com> | 2023-06-09 00:12:41 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@google.com> | 2023-06-22 16:04:09 +0000 |
commit | b1f4a748ae42aadf971f23f402951266e1318eb4 (patch) | |
tree | df45552228519740aa718de88862c83d854a9f94 | |
parent | e7cbdee8173cea8445374476e410f8935c3a957c (diff) | |
download | repohooks-b1f4a748ae42aadf971f23f402951266e1318eb4.tar.gz |
hooks: rustfmt: drop custom format suggestion
Rely on the common framework to display & run fixup commands.
Bug: None
Test: unittests
Change-Id: I1242e0a9cf4bc160b0e20aed1bf16d606aa3ddc9
-rw-r--r-- | rh/hooks.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/rh/hooks.py b/rh/hooks.py index c90c0a3..e5ca8eb 100644 --- a/rh/hooks.py +++ b/rh/hooks.py @@ -943,11 +943,9 @@ def check_rustfmt(project, commit, _desc, diff, options=None): # TODO(b/164111102): rustfmt stable does not support --check on stdin. # If no error is reported, compare stdin with stdout. if data != result.stdout: - msg = ('To fix, please run: ' + - rh.shell.cmd_to_str(cmd + [d.file])) ret.append(rh.results.HookResult( - 'rustfmt', project, commit, error=msg, - files=(d.file,))) + 'rustfmt', project, commit, error='Files not formatted', + files=(d.file,), fixup_cmd=cmd)) return ret |