mirror of
https://github.com/silenceper/wechat.git
synced 2026-02-12 00:32:26 +08:00
improve comment ,参考:https://github.com/huacnlee/autocorrect
This commit is contained in:
@@ -53,3 +53,68 @@ linters-settings:
|
||||
lines: 66
|
||||
statements: 50
|
||||
|
||||
errcheck:
|
||||
# Report about not checking of errors in type assertions: `a := b.(MyStruct)`.
|
||||
# Such cases aren't reported by default.
|
||||
# Default: false
|
||||
check-type-assertions: true
|
||||
# report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`.
|
||||
# Such cases aren't reported by default.
|
||||
# Default: false
|
||||
check-blank: true
|
||||
# To disable the errcheck built-in exclude list.
|
||||
# See `-excludeonly` option in https://github.com/kisielk/errcheck#excluding-functions for details.
|
||||
# Default: false
|
||||
disable-default-exclusions: true
|
||||
# List of functions to exclude from checking, where each entry is a single function to exclude.
|
||||
# See https://github.com/kisielk/errcheck#excluding-functions for details.
|
||||
exclude-functions:
|
||||
- io/ioutil.ReadFile
|
||||
- io.Copy(*bytes.Buffer)
|
||||
- io.Copy(os.Stdout)
|
||||
- (*bytes.Buffer).WriteString
|
||||
- (*bytes.Buffer).Write
|
||||
- url.Parse
|
||||
- (*strings.Builder).WriteString
|
||||
- io.WriteString
|
||||
- (*bytes.Buffer).WriteByte
|
||||
- (*hmac.New).Write
|
||||
- (*int)
|
||||
- (*string)
|
||||
- (hash.Hash).Write
|
||||
|
||||
depguard:
|
||||
# Rules to apply.
|
||||
#
|
||||
# Variables:
|
||||
# - File Variables
|
||||
# you can still use and exclamation mark ! in front of a variable to say not to use it.
|
||||
# Example !$test will match any file that is not a go test file.
|
||||
#
|
||||
# `$all` - matches all go files
|
||||
# `$test` - matches all go test files
|
||||
#
|
||||
# - Package Variables
|
||||
#
|
||||
# `$gostd` - matches all of go's standard library (Pulled from `GOROOT`)
|
||||
#
|
||||
# Default: Only allow $gostd in all files.
|
||||
rules:
|
||||
# Name of a rule.
|
||||
main:
|
||||
# Used to determine the package matching priority.
|
||||
# There are three different modes: `original`, `strict`, and `lax`.
|
||||
# Default: "original"
|
||||
list-mode: lax
|
||||
# List of file globs that will match this list of settings to compare against.
|
||||
# Default: $all
|
||||
files:
|
||||
- "!**/*_a _file.go"
|
||||
# List of allowed packages.
|
||||
allow:
|
||||
- $gostd
|
||||
- github.com/OpenPeeDeeP
|
||||
# Packages that are not allowed where the value is a suggestion.
|
||||
deny:
|
||||
- pkg: "github.com/pkg/errors"
|
||||
desc: Should be replaced by standard lib errors package
|
||||
Reference in New Issue
Block a user