From 359212e8ee02e02a58bcbb73f6c6a02fa19fd65b Mon Sep 17 00:00:00 2001 From: Dan Luhring Date: Wed, 23 Dec 2020 11:35:17 -0500 Subject: [PATCH] Disable lint rule prealloc Signed-off-by: Dan Luhring --- .golangci.yaml | 4 ++-- syft/source/mock_resolver.go | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.golangci.yaml b/.golangci.yaml index 238fb91fa..4d468d8a8 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -31,7 +31,6 @@ linters: - misspell - nakedret - nolintlint - - prealloc - rowserrcheck - scopelint - staticcheck @@ -55,5 +54,6 @@ linters: # - lll # without a way to specify per-line exception cases, this is not usable # - maligned # this is an excellent linter, but tricky to optimize and we are not sensitive to memory layout optimizations # - nestif +# - prealloc # following this rule isn't consistently a good idea, as it sometimes forces unnecessary allocations that result in less idiomatic code # - testpackage -# - wsl \ No newline at end of file +# - wsl diff --git a/syft/source/mock_resolver.go b/syft/source/mock_resolver.go index 2689de82b..03f67fb47 100644 --- a/syft/source/mock_resolver.go +++ b/syft/source/mock_resolver.go @@ -2,9 +2,10 @@ package source import ( "fmt" - "github.com/anchore/syft/internal/file" "io/ioutil" "os" + + "github.com/anchore/syft/internal/file" ) var _ Resolver = (*MockResolver)(nil)