go_dreamfactory/.golangci.yml
2022-09-08 15:49:17 +08:00

33 lines
864 B
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

run:
skip-dirs:
- pb
- sys/configure/
tests: false
go: '1.18'
output:
# format: json
sort-results: true
linters:
disable-all: true
enable:
- nilerr
# 检查没有判断err的场景这些没有检查的场景可能导致致命bug在某些场景
- errcheck
# 简化代码
- gosimple
# 检查源代码、报告可疑的结构体如果Printf函数调用参数没有对齐字符串格式
- govet
# 检查没有使用参数
- ineffassign
# 专业做静态检查的工具其它的工具只是一个简单的github仓库
- staticcheck
# 类似编译的前端解析和检查type
- typecheck
# 检查没有使用的go代码包含没有使用的常量、变量、函数、和类型
- unused
# more linters https://golangci-lint.run/usage/linters/
linters-settings:
funlen:
statements: 60