chore: 项目基线(基于 WeKnora 定制版,整理文件忽略规则)
This commit is contained in:
commit
9097ee699d
5769 files changed
+1446466
No files matched your search
@@ -0,0 +1,24 @@
|
||||
version: "2"
|
||||
linters:
|
||||
enable:
|
||||
- lll # 控制行宽
|
||||
- govet
|
||||
- revive
|
||||
settings:
|
||||
lll:
|
||||
line-length: 120
|
||||
tab-width: 4
|
||||
exclusions:
|
||||
paths:
|
||||
# swag embeds OpenAPI as single-line JSON strings; line-length is not meaningful.
|
||||
- docs/docs\.go$
|
||||
rules:
|
||||
# swag annotations and struct tags cannot wrap, so a parameter with its
|
||||
# enum list, a composed response type or a field's swag tags have to
|
||||
# stay on one line.
|
||||
- linters: [lll]
|
||||
source: '^\s*// @(Param|Success|Failure|x-)|(swaggertype|extensions):"'
|
||||
formatters:
|
||||
enable:
|
||||
- gofmt
|
||||
- gofumpt
|
||||
Reference in new issue
Block a user