Skip to content

Get up and running with Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.

1.7 KB
Raw Blame
version: "2"
linters:
  enable:
    - asasalint
    - bidichk
    - bodyclose
    - containedctx
    - depguard
    - gocheckcompilerdirectives
    - intrange
    - makezero
    - misspell
    - nilerr
    - nolintlint
    - nosprintfhostport
    - unconvert
    - usetesting
    - wastedassign
    - whitespace
  disable:
    - errcheck
    - usestdlibvars
  settings:
    depguard:
      rules:
        test-only-packages:
          files:
            - $all
            - "!$test"
            - "!**/mlx/mlxtest/*.go"
          deny:
            - pkg: github.com/ollama/ollama/internal/testutil
              desc: test helpers may only be imported by test files
            - pkg: github.com/ollama/ollama/mlx/mlxtest
              desc: test helpers may only be imported by test files
            - pkg: github.com/ollama/ollama/mlx/mlxthread/mlxthreadtest
              desc: test helpers may only be imported by test files
    govet:
      disable:
        - unusedresult
    staticcheck:
      checks:
        - all
        - -QF* # disable quick fix suggestions
        - -SA1019
        - -ST1000 # package comment format
        - -ST1003 # underscores in package names
        - -ST1005 # error strings should not be capitalized
        - -ST1012 # error var naming (ErrFoo)
        - -ST1016 # receiver name consistency
        - -ST1020 # comment on exported function format
        - -ST1021 # comment on exported type format
        - -ST1022 # comment on exported var format
        - -ST1023 # omit type from declaration
severity:
  default: error
  rules:
    - linters:
        - gofmt
        - goimports
        - intrange
      severity: info
formatters:
  enable:
    - gofmt
    - gofumpt