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