aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2020-10-21 01:03:40 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2020-10-21 01:03:40 +0000
commit3c2527ff293ac3cb690ea0e644988275e2075c94 (patch)
tree7123ba7d87643f6c167df22c25addd069810627f
parent990d2ddcfb722af61893c3f60115caed6b21e3e9 (diff)
parent3785f05256bf78719082cef93aaed3d08c1863d8 (diff)
downloadrepohooks-3c2527ff293ac3cb690ea0e644988275e2075c94.tar.gz
Snap for 6919011 from 3785f05256bf78719082cef93aaed3d08c1863d8 to sc-release
Change-Id: I7b26cb2dc11ee19641428bf06c2d99463d844889
-rw-r--r--rh/hooks.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/rh/hooks.py b/rh/hooks.py
index 491da91..dd4cab3 100644
--- a/rh/hooks.py
+++ b/rh/hooks.py
@@ -771,9 +771,10 @@ def check_gofmt(project, commit, _desc, diff, options=None):
data = rh.git.get_file_content(commit, d.file)
result = _run(cmd, input=data)
if result.stdout:
+ fixup_func = _fixup_func_caller([gofmt, '-w', d.file])
ret.append(rh.results.HookResult(
'gofmt', project, commit, error=result.stdout,
- files=(d.file,)))
+ files=(d.file,), fixup_func=fixup_func))
return ret