diff options
-rw-r--r-- | rh/hooks.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/rh/hooks.py b/rh/hooks.py index e5ca8eb..457a440 100644 --- a/rh/hooks.py +++ b/rh/hooks.py @@ -858,13 +858,14 @@ def check_gofmt(project, commit, _desc, diff, options=None): return None gofmt = options.tool_path('gofmt') - cmd = [gofmt, '-l'] + options.args((), filtered) + cmd = [gofmt, '-l'] + options.args() + fixup_cmd = [gofmt, '-w'] + options.args() + ret = [] for d in filtered: data = rh.git.get_file_content(commit, d.file) result = _run(cmd, input=data) if result.stdout: - fixup_cmd = [gofmt, '-w'] ret.append(rh.results.HookResult( 'gofmt', project, commit, error=result.stdout, files=(d.file,), fixup_cmd=fixup_cmd)) |