atlassian / bazel-tools

Reusable bits for Bazel
Apache License 2.0
113 stars 36 forks source link

golangci-lint does not depend on SDK libs #51

Closed terinjokes closed 5 years ago

terinjokes commented 5 years ago

The golangci-lint rule does not depend on the SDK libraries. This results in a warning from govet (and possibly other linters):

WARN [runner] Can't run linter govet: can't typecheck package: can't init std types: import of type fmt.Stringer failed: can't find import: fmt

By adding depset(sdk.libs) to the transitive dependencies list the compiled libraries are added to execution directory and everything is happy.

https://github.com/atlassian/bazel-tools/blob/02472d814d1867de2ad75801760732c9e595c9d9/golangcilint/def.bzl#L27-L30

ash2k commented 5 years ago

@terinjokes if you send a PR I'll happily merge it. Also, sign the CLA please if you do so.

terinjokes commented 5 years ago

Hey Mikhail.

It doesn't look like I can view the CLA without providing personal information to DocuSign. So I don't think I'll be doing so.

Hopefully my bug reports provide enough information to replicate and resolve.

On Wed, Mar 20, 2019, 5:33 PM Mikhail Mazurskiy notifications@github.com wrote:

@terinjokes https://github.com/terinjokes if you send a PR I'll happily merge it. Also, sign the CLA please if you do so.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/atlassian/bazel-tools/issues/51#issuecomment-475078922, or mute the thread https://github.com/notifications/unsubscribe-auth/AAQsZdO3gU5a2hL8H0exUZ19E8s-c4DEks5vYtNOgaJpZM4bpzYf .