1 Star 0 Fork 22

中国电建集团河南工程有限公司 / Bytebase

forked from Gitee 极速下载 / Bytebase 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
.golangci.yaml 2.44 KB
AI 代码解读
一键复制 编辑 原始数据 按行查看 历史
Danny Xu 提交于 2023-07-31 17:04 . chore: 30m (#7304)
# WARNING: please install diffutils macOS Ventura by: brew install diffutils
# https://github.com/golangci/golangci-lint/discussions/3327
linters:
enable:
- errcheck
- goimports
- revive
- govet
- staticcheck
- misspell
- gocritic
- sqlclosecheck
- rowserrcheck
- nilerr
- godot
- forbidigo
# golangci-lint run --exclude="Rollback,logger.Sync,pgInstance.Stop"
issues:
include:
# https://golangci-lint.run/usage/configuration/#command-line-options
- EXC0012
- EXC0013
- EXC0014
- EXC0015
exclude:
- Rollback
- logger.Sync
- pgInstance.Stop
- fmt.Printf
- fmt.Print
- Enter(.*)_(.*)
- Exit(.*)_(.*)
run:
timeout: 30m
build-tags:
- mysql
skip-dirs:
- proto/generated-go
- frontend
linters-settings:
goimports:
# Put imports beginning with prefix after 3rd-party packages.
# It's a comma-separated list of prefixes.
local-prefixes: github.com/bytebase/bytebase
revive:
# Default to run all linters so that new rules in the future could automatically be added to the static check.
enable-all-rules: true
rules:
# The following rules are too strict and make coding harder. We do not enable them for now.
- name: file-header
disabled: true
- name: line-length-limit
disabled: true
- name: function-length
disabled: true
- name: max-public-structs
disabled: true
- name: function-result-limit
disabled: true
- name: banned-characters
disabled: true
- name: argument-limit
disabled: true
- name: cognitive-complexity
disabled: true
- name: cyclomatic
disabled: true
- name: confusing-results
disabled: true
- name: add-constant
disabled: true
- name: flag-parameter
disabled: true
- name: nested-structs
disabled: true
- name: import-shadowing
disabled: true
- name: early-return
disabled: true
gocritic:
disabled-checks:
- ifElseChain
govet:
settings:
printf: # The name of the analyzer, run `go tool vet help` to see the list of all analyzers
funcs: # Run `go tool vet help printf` to see the full configuration of `printf`.
- common.Errorf
forbidigo:
forbid:
- 'fmt\.Errorf(# Please use errors\.Wrap\|Wrapf\|Errorf instead)?'
- 'ioutil\.ReadDir(# Please use os\.ReadDir)?'
1
https://gitee.com/hnec/Bytebase.git
git@gitee.com:hnec/Bytebase.git
hnec
Bytebase
Bytebase
main

搜索帮助