mirror of
https://github.com/likelovewant/ollama-for-amd.git
synced 2025-12-21 14:26:30 +00:00
ci: restore previous linter rules (#13322)
This commit is contained in:
@@ -1,76 +1,51 @@
|
|||||||
version: "2"
|
version: "2"
|
||||||
linters:
|
linters:
|
||||||
default: none
|
|
||||||
enable:
|
enable:
|
||||||
- asasalint
|
- asasalint
|
||||||
- bidichk
|
- bidichk
|
||||||
- bodyclose
|
- bodyclose
|
||||||
- containedctx
|
- containedctx
|
||||||
- copyloopvar
|
|
||||||
- errcheck
|
|
||||||
- errorlint
|
|
||||||
- exptostd
|
|
||||||
- gocheckcompilerdirectives
|
- gocheckcompilerdirectives
|
||||||
- govet
|
|
||||||
- ineffassign
|
|
||||||
- intrange
|
- intrange
|
||||||
- makezero
|
- makezero
|
||||||
- misspell
|
- misspell
|
||||||
- modernize
|
|
||||||
- nilerr
|
- nilerr
|
||||||
- nilnil
|
|
||||||
- nolintlint
|
- nolintlint
|
||||||
- nosprintfhostport
|
- nosprintfhostport
|
||||||
- perfsprint
|
|
||||||
- prealloc
|
|
||||||
- sloglint
|
|
||||||
- staticcheck
|
|
||||||
- unconvert
|
- unconvert
|
||||||
- unused
|
|
||||||
- usestdlibvars
|
|
||||||
- usetesting
|
- usetesting
|
||||||
- wastedassign
|
- wastedassign
|
||||||
- whitespace
|
- whitespace
|
||||||
|
disable:
|
||||||
|
- errcheck
|
||||||
|
- usestdlibvars
|
||||||
settings:
|
settings:
|
||||||
errcheck:
|
govet:
|
||||||
exclude-functions:
|
disable:
|
||||||
- fmt.Fprintf
|
- unusedresult
|
||||||
perfsprint:
|
|
||||||
strconcat: false
|
|
||||||
concat-loop: false
|
|
||||||
staticcheck:
|
staticcheck:
|
||||||
checks:
|
checks:
|
||||||
- all
|
- all
|
||||||
# Using a deprecated function, variable, constant or field.
|
- -QF* # disable quick fix suggestions
|
||||||
# https://staticcheck.dev/docs/checks/#SA1019
|
|
||||||
- -SA1019
|
- -SA1019
|
||||||
# Incorrect or missing package comment.
|
- -ST1000 # package comment format
|
||||||
# https://staticcheck.dev/docs/checks/#ST1000
|
- -ST1003 # underscores in package names
|
||||||
- -ST1000
|
- -ST1005 # error strings should not be capitalized
|
||||||
# Poorly chosen identifier.
|
- -ST1012 # error var naming (ErrFoo)
|
||||||
# https://staticcheck.dev/docs/checks/#ST1003
|
- -ST1016 # receiver name consistency
|
||||||
- -ST1003
|
- -ST1020 # comment on exported function format
|
||||||
# The documentation of an exported function should start with the function's name.
|
- -ST1021 # comment on exported type format
|
||||||
# https://staticcheck.dev/docs/checks/#ST1020
|
- -ST1022 # comment on exported var format
|
||||||
- -ST1020
|
- -ST1023 # omit type from declaration
|
||||||
# The documentation of an exported type should start with type's name.
|
severity:
|
||||||
# https://staticcheck.dev/docs/checks/#ST1021
|
default: error
|
||||||
- -ST1021
|
rules:
|
||||||
# The documentation of an exported variable or constant should start with variable's name.
|
- linters:
|
||||||
# https://staticcheck.dev/docs/checks/#ST1022
|
- gofmt
|
||||||
- -ST1022
|
- goimports
|
||||||
usestdlibvars:
|
- intrange
|
||||||
http-method: false
|
severity: info
|
||||||
http-status-code: false
|
|
||||||
|
|
||||||
formatters:
|
formatters:
|
||||||
enable:
|
enable:
|
||||||
- gci
|
|
||||||
- gofmt
|
- gofmt
|
||||||
- gofumpt
|
- gofumpt
|
||||||
settings:
|
|
||||||
gci:
|
|
||||||
sections:
|
|
||||||
- standard
|
|
||||||
- default
|
|
||||||
- localmodule
|
|
||||||
|
|||||||
@@ -15,19 +15,19 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
messages := []api.Message{
|
messages := []api.Message{
|
||||||
api.Message{
|
{
|
||||||
Role: "system",
|
Role: "system",
|
||||||
Content: "Provide very brief, concise responses",
|
Content: "Provide very brief, concise responses",
|
||||||
},
|
},
|
||||||
api.Message{
|
{
|
||||||
Role: "user",
|
Role: "user",
|
||||||
Content: "Name some unusual animals",
|
Content: "Name some unusual animals",
|
||||||
},
|
},
|
||||||
api.Message{
|
{
|
||||||
Role: "assistant",
|
Role: "assistant",
|
||||||
Content: "Monotreme, platypus, echidna",
|
Content: "Monotreme, platypus, echidna",
|
||||||
},
|
},
|
||||||
api.Message{
|
{
|
||||||
Role: "user",
|
Role: "user",
|
||||||
Content: "which of these is the most dangerous?",
|
Content: "which of these is the most dangerous?",
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user