Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion scripts/dev/quickstyle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,9 @@ function gostyle() {
local golangci_lint_bin
golangci_lint_bin="$(resolve_tool_path golangci-lint)" || golangci_lint_bin=""
if [[ -n "${golangci_lint_bin}" && -x "${golangci_lint_bin}" ]]; then
"${golangci_lint_bin}" run --allow-parallel-runners "${godirs[@]}" --fix && (( status == 0 ))
# cd here and drop the gitroot prefix so we lint this clone, like CI.
local prefix="${gitroot}/"
(cd "${gitroot}" && "${golangci_lint_bin}" run --allow-parallel-runners "${godirs[@]#"$prefix"}" --fix) && (( status == 0 ))
status=$?
else
ewarn "No golangci-lint binary found, but the repo has a config file. Skipping..."
Expand Down
Loading