PragmaTwice commented on code in PR #1491:
URL:
https://github.com/apache/incubator-kvrocks/pull/1491#discussion_r1225747754
##########
x.py:
##########
@@ -192,15 +193,24 @@ def clang_tidy(dir: str, jobs: Optional[int],
clang_tidy_path: str, run_clang_ti
run(run_command, *options, *regexes, verbose=True, cwd=basedir)
-def golangci_lint() -> None:
- go = find_command('go', msg='go is required for testing')
- gopath = run_pipe(go, 'env', 'GOPATH').read().strip()
- bindir = Path(gopath).absolute() / 'bin'
- binpath = bindir / 'golangci-lint'
- if not binpath.exists():
- output = run_pipe('curl', '-sfL',
'https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh',
- verbose=True)
- run('sh', '-s', '--', '-b', str(bindir), 'v1.49.0', verbose=True,
stdin=output)
+def golangci_lint(golangci_lint_path: str) -> None:
+ binpath = ""
+ golangci_command = find_command(golangci_lint_path, msg="golangci-lint is
required")
Review Comment:
It seems if it is not found in `$PATH` (according to the default argument),
the script will abort. However, I think we have no such requirement in the
original code.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]