aboutsummaryrefslogtreecommitdiff
path: root/rh/hooks.py
diff options
context:
space:
mode:
Diffstat (limited to 'rh/hooks.py')
-rw-r--r--rh/hooks.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/rh/hooks.py b/rh/hooks.py
index b77ee42..1f59dd2 100644
--- a/rh/hooks.py
+++ b/rh/hooks.py
@@ -330,7 +330,8 @@ def check_gofmt(project, commit, _desc, diff, options=None):
if not filtered:
return
- cmd = ['gofmt', '-l'] + options.args((), filtered)
+ gofmt = options.tool_path('gofmt')
+ cmd = [gofmt, '-l'] + options.args((), filtered)
ret = []
for d in filtered:
data = rh.git.get_file_content(commit, d.file)
@@ -442,5 +443,6 @@ TOOL_PATHS = {
'clang-format': 'clang-format',
'cpplint': os.path.join(TOOLS_DIR, 'cpplint.py'),
'git-clang-format': 'git-clang-format',
+ 'gofmt': 'gofmt',
'pylint': 'pylint',
}