Skip to content

Commit

Permalink
Add more linters
Browse files Browse the repository at this point in the history
Also restore the check on imports being organised
in 3 groups.

Signed-off-by: David Gageot <david@gageot.net>
  • Loading branch information
dgageot committed Oct 15, 2019
1 parent 74c59d5 commit 6228387
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 6 deletions.
1 change: 0 additions & 1 deletion builder/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ func testConfig(t *testing.T, when spec.G, it spec.S) {
h.AssertEq(t, len(warns), 1)
h.AssertSliceContains(t, warns, "'latest' field on a buildpack is obsolete and will be ignored")
})

})

when("'groups' field is used", func() {
Expand Down
1 change: 0 additions & 1 deletion commands/inspect_builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ func TestInspectBuilderCommand(t *testing.T) {
}

func testInspectBuilderCommand(t *testing.T, when spec.G, it spec.S) {

var (
command *cobra.Command
logger logging.Logger
Expand Down
1 change: 0 additions & 1 deletion commands/set_default_builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ func TestSetDefaultBuilder(t *testing.T) {
}

func testSetDefaultBuilderCommand(t *testing.T, when spec.G, it spec.S) {

var (
command *cobra.Command
logger logging.Logger
Expand Down
1 change: 0 additions & 1 deletion dist/buildpack_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ id = "some.stack.id"
it("returns error", func() {
_, err := dist.NewBuildpack(blob.NewBlob(tmpBpDir))
h.AssertError(t, err, "'buildpack.version' is required")

})
})

Expand Down
9 changes: 8 additions & 1 deletion golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ linters:
enable:
- bodyclose
- deadcode
- dogsled
- gocritic
- goimports
- golint
Expand All @@ -15,11 +16,17 @@ linters:
- ineffassign
- maligned
- misspell
- nakedret
- scopelint
- staticcheck
- structcheck
- stylecheck
- typecheck
- unconvert
- unused
- varcheck
- scopelint
- whitespace

linters-settings:
goimports:
local-prefixes: github.com/buildpack/pack
1 change: 0 additions & 1 deletion internal/archive/archive_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ func testArchive(t *testing.T, when spec.G, it spec.S) {
})

when("is posix", func() {

it.Before(func() {
h.SkipIf(t, runtime.GOOS == "windows", "Skipping on windows")
})
Expand Down

0 comments on commit 6228387

Please sign in to comment.