.golangci.yml文件配置

version: "2"

run:

timeout: 5m

concurrency: 10

modules-download-mode: readonly

linters:

default: standard

enable:

  • revive

  • cyclop

settings:

staticcheck:

initialisms: [ "ACL", "API", "ASCII", "CPU", "CSS", "DNS", "EOF", "GUID", "HTML", "HTTP", "HTTPS", "ID", "IP", "JSON", "QPS", "RAM", "RPC", "SLA", "SMTP", "SQL", "SSH", "TCP", "TLS", "TTL", "UDP", "UI", "GID", "UID", "UUID", "URI", "URL", "UTF8", "VM", "XML", "XMPP", "XSRF", "XSS", "SIP", "RTP", "AMQP", "DB", "TS" ]

http-status-code-whitelist: [ "200", "400", "404", "500" ]

checks:

  • SA1000

  • SA1001

  • SA1002

  • SA1003

  • SA1004

  • SA1005

  • SA1006

  • SA1007

  • SA1008

  • SA1010

  • SA1011

  • SA1012

  • SA1013

  • SA1014

  • SA1015

  • SA1016

  • SA1017

  • SA1018

  • SA1019

  • SA1020

  • SA1021

  • SA1023

  • SA1024

  • SA1025

  • SA1026

  • SA1027

  • SA1028

  • SA1029

  • SA1030

  • SA1031

  • SA1032

  • SA2000

  • SA2001

  • SA2002

  • SA2003

  • SA3000

  • SA3001

  • SA4000

  • SA4001

  • SA4003

  • SA4004

  • SA4005

  • SA4006

  • SA4008

  • SA4009

  • SA4010

  • SA4011

  • SA4012

  • SA4013

  • SA4014

  • SA4015

  • SA4016

  • SA4017

  • SA4018

  • SA4019

  • SA4020

  • SA4021

  • SA4022

  • SA4023

  • SA4024

  • SA4025

  • SA4026

  • SA4027

  • SA4028

  • SA4029

  • SA4030

  • SA4031

  • SA4032

  • SA5000

  • SA5001

  • SA5002

  • SA5003

  • SA5004

  • SA5005

  • SA5007

  • SA5008

  • SA5009

  • SA5010

  • SA5011

  • SA5012

  • SA6000

  • SA6001

  • SA6002

  • SA6003

  • SA6005

  • SA6006

  • SA9001

  • SA9002

  • SA9003

  • SA9004

  • SA9005

  • SA9006

  • SA9007

  • SA9008

  • SA9009

  • ST1000

  • ST1001

  • ST1003

  • ST1005

  • ST1006

  • ST1008

  • ST1011

  • ST1012

  • ST1013

  • ST1015

  • ST1016

  • ST1017

  • ST1018

  • ST1019

  • ST1020

  • ST1021

  • ST1022

  • ST1023

  • S1000

  • S1001

  • S1002

  • S1003

  • S1004

  • S1005

  • S1006

  • S1007

  • S1008

  • S1009

  • S1010

  • S1011

  • S1012

  • S1016

  • S1017

  • S1018

  • S1019

  • S1020

  • S1021

  • S1023

  • S1024

  • S1025

  • S1028

  • S1029

  • S1030

  • S1031

  • S1032

  • S1033

  • S1034

  • S1035

  • S1036

  • S1037

  • S1038

  • S1039

  • S1040

  • QF1001

  • QF1002

  • QF1003

  • QF1004

  • QF1005

  • QF1006

  • QF1007

  • QF1008

  • QF1009

  • QF1010

  • QF1011

  • QF1012

revive:

max-open-files: 2048

severity: error

enable-all-rules: true

directives:

  • name: specify-disable-reason

severity: error

rules:

  • name: unhandled-error

severity: warning

disabled: false

exclude: [""]

arguments:

  • "fmt.Println"

  • name: package-comments

disabled: true

  • name: var-naming

severity: error

disabled: false

  • name: line-length-limit

arguments:

  • 120

  • name: add-constant

disabled: true

  • name: unused-receiver

disabled: true

exclusions:

paths:

  • ".*\_test\.go " f o r m a t t e r s : e n a b l e : − g o f m t − g o i m p o r t s − g o l i n e s e x c l u s i o n s : p a t h s : − " . ∗ t e s t . g o " formatters: enable: - gofmt - goimports - golines exclusions: paths: - ".*\\_test\\.go "formatters:enable:−gofmt−goimports−golinesexclusions:paths:−".∗test.go"
相关推荐
简佐义的博客6 小时前
破解非模式物种GO/KEGG注释难题
开发语言·数据库·后端·oracle·golang
恋喵大鲤鱼10 小时前
Golang 运算符
golang·运算符
weixin_4373982110 小时前
转Go学习笔记(2)进阶
服务器·笔记·后端·学习·架构·golang
ac.char11 小时前
Golang读取ZIP压缩包并显示Gin静态html网站
golang·html·gin
程序员爱钓鱼1 天前
Go语言项目工程化 — 常见开发工具与 CI/CD 支持
开发语言·后端·golang·gin
月忆3642 天前
Go语言的web框架--gin
golang
GO兔2 天前
开篇:GORM入门——Go语言的ORM王者
开发语言·后端·golang·go
代码讲故事3 天前
多种方法实现golang中实现对http的响应内容生成图片
开发语言·chrome·http·golang·图片·快照·截图