Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: actually enable golangci-lint #6362

Merged
merged 2 commits into from
May 21, 2019
Merged

ci: actually enable golangci-lint #6362

merged 2 commits into from
May 21, 2019

Conversation

Stebalien
Copy link
Member

@Stebalien Stebalien commented May 21, 2019

also fixes #6320 (golangci-lint will fail if something doesn't compile)

@@ -599,8 +600,8 @@ Filters default to those specified under the "Swarm.AddrFilters" config key.
}

var output []string
for _, f := range swrm.Filters.Filters() {
s, err := mafilter.ConvertIPNet(f)
for _, f := range swrm.Filters.FiltersForAction(mafilter.ActionDeny) {
Copy link
Member Author

Choose a reason for hiding this comment

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

Moving away from deprecated APIs.

@@ -14,7 +14,7 @@ import (
$shortpkg "$pkg"
)

var Plugins = $shortpkg.Plugins
var Plugins = $shortpkg.Plugins //nolint
Copy link
Member Author

Choose a reason for hiding this comment

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

Don't lint because this is "unused".

Copy link
Member

@magik6k magik6k left a comment

Choose a reason for hiding this comment

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

1 nit, rest lgtm

@@ -16,17 +16,17 @@ func TestResolveNoComponents(t *testing.T) {
}

_, err = resolve.Resolve(n.Context(), n.Namesys, n.Resolver, path.Path("/ipns/"))
if err != path.ErrNoComponents {
t.Fatal("Should error with no components (/ipns/).", err)
if err == nil {
Copy link
Member

Choose a reason for hiding this comment

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

We probably want to check more than 'there was an error'

Copy link
Member Author

Choose a reason for hiding this comment

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

But I'm lazy... fine.

Copy link
Contributor

@michaelavila michaelavila left a comment

Choose a reason for hiding this comment

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

I had a small question about a test, but nothing I'd block the work over. LGTM. 👍

namesys/resolve/pathresolver_test.go Outdated Show resolved Hide resolved
@Stebalien Stebalien merged commit 480780e into master May 21, 2019
@Stebalien Stebalien deleted the ci/really-enable-lint branch May 21, 2019 19:50
@Stebalien Stebalien restored the ci/really-enable-lint branch May 30, 2019 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CI isn't failing for go tests that don't compile
3 participants