mirror of
https://github.com/ollama/ollama.git
synced 2025-03-18 13:51:45 +01:00
Changes in #8002 introduced fixes for bugs with mangling JSON Schemas. It also fixed a bug where the server would silently fail when clients requested invalid formats. It also, unfortunately, introduced a bug where the server would reject requests with an empty format, which should be allowed. The change in #8127 updated the code to allow the empty format, but also reintroduced the regression where the server would silently fail when the format was set, but invalid. This commit fixes both regressions. The server does not reject the empty format, but it does reject invalid formats. It also adds tests to help us catch regressions in the future. Also, the updated code provides a more detailed error message when a client sends a non-empty, but invalid format, echoing the invalid format in the response. This commits also takes the opportunity to remove superfluous linter checks.
44 lines
710 B
YAML
44 lines
710 B
YAML
run:
|
|
timeout: 5m
|
|
linters:
|
|
enable:
|
|
- asasalint
|
|
- bidichk
|
|
- bodyclose
|
|
- containedctx
|
|
- contextcheck
|
|
- errcheck
|
|
- gocheckcompilerdirectives
|
|
- gofmt
|
|
- gofumpt
|
|
- gosimple
|
|
- govet
|
|
- ineffassign
|
|
- intrange
|
|
- makezero
|
|
- misspell
|
|
- nilerr
|
|
- nolintlint
|
|
- nosprintfhostport
|
|
- staticcheck
|
|
- tenv
|
|
- unconvert
|
|
- unused
|
|
- usestdlibvars
|
|
- wastedassign
|
|
- whitespace
|
|
linters-settings:
|
|
staticcheck:
|
|
checks:
|
|
- all
|
|
- -SA1019 # omit Deprecated check
|
|
severity:
|
|
default-severity: error
|
|
rules:
|
|
- linters:
|
|
- gofmt
|
|
- goimports
|
|
- intrange
|
|
- usestdlibvars
|
|
severity: info
|