Skip to content
Closed
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
2 changes: 1 addition & 1 deletion lint-install.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ func goLintCmd(root string, level string, fix bool) string {
return fmt.Sprintf("$(GOLANGCI_LINT_BIN) run%s", suffix)
}

return fmt.Sprintf(`find . -name go.mod -execdir "$(GOLANGCI_LINT_BIN)" run -c "$(GOLINT_CONFIG)"%s \;`, suffix)
return fmt.Sprintf(`find . -name go.mod -execdir "$(CURDIR)/$(GOLANGCI_LINT_BIN)" run -c "$(GOLINT_CONFIG)"%s \;`, suffix)
Copy link
Contributor

@mmlb mmlb Feb 16, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already have LINT_ROOT which I think we should use instead of CURDIR, to avoid having 2 variables with similar values. Also, I think it would be better to update the TOOL_BIN variable(s) in Makefile.tmpl instead of fixing here. That way the Makefiles are where most of the logic lives and the go binary is mostly just dealing with enabling certain functionality. We wouldn't be mixing logic among 2 different processes/times ("buildtime" and "runtime"). We should probably just do this for all the binaries.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tstromberg thoughts on this?

}

// shellLintCmd returns the appropriate shell lint command for a project.
Expand Down