diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 049a97ed..dbb6c2fd 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -269,9 +269,9 @@ jobs: mkdir -p llm/build/darwin/$ARCH/stub/bin touch llm/build/darwin/$ARCH/stub/bin/ollama_llama_server if: ${{ startsWith(matrix.os, 'macos-') }} - - uses: golangci/golangci-lint-action@v4 + - uses: golangci/golangci-lint-action@v6 with: - args: --timeout 8m0s -v + args: --timeout 8m0s -v ${{ startsWith(matrix.os, 'windows-') && '' || '--disable gofmt --disable goimports' }} test: strategy: matrix: diff --git a/.golangci.yaml b/.golangci.yaml index 56a40df1..cfe06e07 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -9,8 +9,9 @@ linters: - contextcheck - exportloopref - gocheckcompilerdirectives - - gofmt - - goimports + # conditionally enable this on linux/macos + # - gofmt + # - goimports - intrange - misspell - nilerr diff --git a/llm/memory.go b/llm/memory.go index 8b5d8541..1c2e476b 100644 --- a/llm/memory.go +++ b/llm/memory.go @@ -5,9 +5,9 @@ import ( "log/slog" "github.com/ollama/ollama/api" + "github.com/ollama/ollama/envconfig" "github.com/ollama/ollama/format" "github.com/ollama/ollama/gpu" - "github.com/ollama/ollama/envconfig" ) // This algorithm looks for a complete fit to determine if we need to unload other models diff --git a/server/images.go b/server/images.go index 6f23f0c1..d1d49061 100644 --- a/server/images.go +++ b/server/images.go @@ -24,10 +24,10 @@ import ( "github.com/ollama/ollama/api" "github.com/ollama/ollama/auth" + "github.com/ollama/ollama/envconfig" "github.com/ollama/ollama/format" "github.com/ollama/ollama/llm" "github.com/ollama/ollama/parser" - "github.com/ollama/ollama/envconfig" "github.com/ollama/ollama/types/errtypes" "github.com/ollama/ollama/types/model" "github.com/ollama/ollama/version" diff --git a/types/model/name_test.go b/types/model/name_test.go index 117d6333..66ce4c33 100644 --- a/types/model/name_test.go +++ b/types/model/name_test.go @@ -386,8 +386,8 @@ func FuzzName(f *testing.F) { func TestIsValidNamespace(t *testing.T) { cases := []struct { - username string - expected bool + username string + expected bool }{ {"", false}, {"a", true},