Commit 90f37b7e
90f37b7ef5e7Merged
Dmitrii Zhiliaev <[email protected]> · 1 year ago · 7 files · ~6 modified · -1 deleted
Description
feat: golangci lint new config
Details
- Commit
- 90f37b7ef5e7
- Parent
- 8123d191a0ee
.golangci.ymldeleted
1-
# options for analysis running2-
run:3-
timeout: 10m4-
build-tags:5-
- integration6-
7-
output:8-
# sorts results by: filepath, line and column9-
sort-results: true10-
11-
linters:12-
enable-all: true13-
disable:14-
- perfsprint15-
- paralleltest16-
- recvcheck17-
- wrapcheck18-
- gochecknoglobals # we use globals19-
- musttag # we don't need tags always20-
- depguard # we know what we do. We can check extra deps via PRs changes.21-
- contextcheck # we don't need contexts everywhere22-
- revive # piece of shit23-
- execinquery # deprecated24-
- exhaustruct # it requires to initialize billions of fields, I ain't monkey to fix these25-
- gci # we use gofumpt26-
- gochecknoinits # we want to use `init()` functions27-
- gocyclo # we use cyclop28-
- godox # get rid of TODOs29-
- err113 # need to create wrapped static errors30-
- goimports # we use gofumpt31-
- gomnd # renamed to mnd32-
- mnd # we want to keep magic numbers33-
- inamedparam34-
- interfacebloat # we want huge interfaces35-
- ireturn # sometimes we need to return interfaces36-
- nakedret # sometimes we have to use naked returns37-
- nonamedreturns # we do want some named returns38-
- varnamelen # I don't think short names are bad39-
- wsl # lots of style checks40-
41-
# all available settings of specific linters42-
linters-settings:43-
# https://golangci-lint.run/usage/linters/#lll44-
tagalign:45-
# Align and sort can be used together or separately.46-
# Whether enable align. If true, the struct tags will be aligned.47-
# Default: true.48-
align: false49-
# Whether enable tags sort.50-
# If true, the tags will be sorted by name in ascending order.51-
# eg: `xml:"bar" json:"bar" validate:"required"` -> `json:"bar" validate:"required" xml:"bar"`52-
# Default: true53-
sort: true54-
order:55-
- yaml56-
- yml57-
- json58-
- toml59-
- mapstructure60-
- binding61-
- validate62-
cyclop:63-
# the maximal code complexity to report64-
max-complexity: 1365-
# the maximal average package complexity. If it's higher than 0.0 (float) the check is enabled (default 0.0)66-
package-average: 0.067-
# should ignore tests (default false)68-
skip-tests: true69-
70-
dogsled:71-
# checks assignments with too many blank identifiers; default is 272-
max-blank-identifiers: 273-
74-
dupl:75-
# tokens count to trigger issue, 150 by default76-
threshold: 10077-
78-
errcheck:79-
# report about not checking of errors in type assertions: `a := b.(MyStruct)`;80-
# default is false: such cases aren't reported by default.81-
check-type-assertions: false82-
83-
# report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`;84-
# default is false: such cases aren't reported by default.85-
check-blank: false86-
87-
exclude-functions:88-
- fmt:.*89-
- io/ioutil:^Read.*90-
91-
errorlint:92-
# Check whether fmt.Errorf uses the %w verb for formatting errors. See the readme for caveats93-
errorf: true94-
# Check for plain type assertions and type switches95-
asserts: true96-
# Check for plain error comparisons97-
comparison: true98-
99-
exhaustive:100-
# check switch statements in generated files also101-
check-generated: false102-
# indicates that switch statements are to be considered exhaustive if a103-
# 'default' case is present, even if all enum members aren't listed in the104-
# switch105-
default-signifies-exhaustive: true106-
107-
forbidigo:108-
# Forbid the following identifiers (identifiers are written using regexp):109-
forbid:110-
- ^print.*$111-
- 'fmt\.Print.*'112-
113-
114-
funlen:115-
lines: 69116-
statements: 75117-
118-
gocognit:119-
# minimal code complexity to report, 30 by default (but we recommend 10-20)120-
min-complexity: 15121-
122-
nestif:123-
# minimal complexity of if statements to report, 5 by default124-
min-complexity: 6125-
126-
goconst:127-
# minimal length of string constant, 3 by default128-
min-len: 3129-
# minimal occurrences count to trigger, 3 by default130-
min-occurrences: 3131-
132-
gocritic:133-
enabled-tags:134-
- diagnostic135-
- experimental136-
- opinionated137-
- performance138-
- style139-
140-
disabled-checks:141-
- commentedOutCode142-
- typeSwitchVar143-
- whyNoLint144-
- yodaStyleExpr145-
146-
settings:147-
captLocal: # must be valid enabled check name148-
# whether to restrict checker to params only (default true)149-
paramsOnly: true150-
elseif:151-
# whether to skip balanced if-else pairs (default true)152-
skipBalanced: true153-
hugeParam:154-
# size in bytes that makes the warning trigger (default 80)155-
sizeThreshold: 80156-
nestingReduce:157-
# min number of statements inside a branch to trigger a warning (default 5)158-
bodyWidth: 5159-
rangeExprCopy:160-
# size in bytes that makes the warning trigger (default 512)161-
sizeThreshold: 512162-
# whether to check test functions (default true)163-
skipTestFuncs: true164-
rangeValCopy:165-
# size in bytes that makes the warning trigger (default 128)166-
sizeThreshold: 32167-
# whether to check test functions (default true)168-
skipTestFuncs: true169-
ruleguard:170-
# path to a gorules file for the ruleguard checker171-
rules: ""172-
truncateCmp:173-
# whether to skip int/uint/uintptr types (default true)174-
skipArchDependent: true175-
underef:176-
# whether to skip (*x).method() calls where x is a pointer receiver (default true)177-
skipRecvDeref: true178-
unnamedResult:179-
# whether to check exported functions180-
checkExported: true181-
182-
gofmt:183-
# simplify code: gofmt with `-s` option, true by default184-
simplify: true185-
186-
gofumpt:187-
# Choose whether to use the extra rules that are disabled188-
# by default189-
extra-rules: false190-
191-
gomoddirectives:192-
# Allow local `replace` directives. Default is false.193-
replace-local: false194-
# List of allowed `replace` directives. Default is empty.195-
replace-allow-list:196-
- launchpad.net/gocheck197-
# Allow to not explain why the version has been retracted in the `retract` directives. Default is false.198-
retract-allow-no-explanation: false199-
# Forbid the use of the `exclude` directives. Default is false.200-
exclude-forbidden: false201-
202-
gosec:203-
# To select a subset of rules to run.204-
# Available rules: https://github.com/securego/gosec#available-rules205-
includes:206-
- G401207-
- G306208-
- G101209-
# To specify a set of rules to explicitly exclude.210-
# Available rules: https://github.com/securego/gosec#available-rules211-
excludes:212-
- G204213-
# To specify the configuration of rules.214-
# The configuration of rules is not fully documented by gosec:215-
# https://github.com/securego/gosec#configuration216-
# https://github.com/securego/gosec/blob/569328eade2ccbad4ce2d0f21ee158ab5356a5cf/rules/rulelist.go#L60-L102217-
config:218-
G306: "0600"219-
G101:220-
pattern: "(?i)example"221-
ignore_entropy: false222-
entropy_threshold: "80.0"223-
per_char_threshold: "3.0"224-
truncate: "32"225-
226-
gosimple:227-
# https://staticcheck.io/docs/options#checks228-
checks:229-
- all230-
231-
govet:232-
# settings per analyzer233-
settings:234-
printf: # analyzer name, run `go tool vet help` to see all analyzers235-
funcs: # run `go tool vet help printf` to see available settings for `printf` analyzer236-
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof237-
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf238-
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf239-
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf240-
241-
enable-all: true242-
disable:243-
- shadow244-
245-
lll:246-
# max line length, lines longer will be reported. Default is 120.247-
# '\t' is counted as 1 character by default, and can be changed with the tab-width option248-
line-length: 128249-
# tab width in spaces. Default to 1.250-
tab-width: 1251-
252-
makezero:253-
# Allow only slices initialized with a length of zero. Default is false.254-
always: false255-
256-
misspell:257-
# Correct spellings using locale preferences for US or UK.258-
# Default is to use a neutral variety of English.259-
# Setting locale to US will correct the British spelling of 'colour' to 'color'.260-
locale: US261-
262-
nakedret:263-
# make an issue if func has more lines of code than this setting and it has naked returns; default is 30264-
max-func-lines: 30265-
266-
nolintlint:267-
# Enable to ensure that nolint directives are all used. Default is true.268-
allow-unused: false269-
# Enable to require nolint directives to mention the specific linter being suppressed. Default is false.270-
require-specific: true271-
272-
273-
prealloc:274-
# XXX: we don't recommend using this linter before doing performance profiling.275-
# For most programs usage of prealloc will be a premature optimization.276-
277-
# Report preallocation suggestions only on simple loops that have no returns/breaks/continues/gotos in them.278-
# True by default.279-
simple: true280-
range-loops: true # Report preallocation suggestions on range loops, true by default281-
for-loops: false # Report preallocation suggestions on for loops, false by default282-
283-
promlinter:284-
# Promlinter can't infer all metrics name in static analysis.285-
# Enable strict mode will also include the errors caused by failing to parse the args.286-
strict: false287-
# Please refer to https://github.com/yeya24/promlinter#usage for detailed usage.288-
disabled-linters: []289-
# - "Help"290-
# - "MetricUnits"к291-
292-
# - "Counter"293-
# - "HistogramSummaryReserved"294-
# - "MetricTypeInName"295-
# - "ReservedChars"296-
# - "CamelCase"297-
# - "lintUnitAbbreviations"298-
299-
predeclared:300-
# comma-separated list of predeclared identifiers to not report on301-
ignore: ""302-
# include method names and field names (i.e., qualified names) in checks303-
q: false304-
305-
revive:306-
enable-all-rules: true307-
308-
rules:309-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#add-constant310-
- name: add-constant311-
severity: warning312-
disabled: true313-
arguments:314-
- maxLitCount: "3"315-
allowStrs: '""'316-
allowInts: "0,1,2"317-
allowFloats: "0.0,0.,1.0,1.,2.0,2."318-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#argument-limit319-
- name: argument-limit320-
severity: warning321-
disabled: true322-
arguments: [4]323-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#atomic324-
- name: atomic325-
severity: warning326-
disabled: false327-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#banned-characters328-
- name: banned-characters329-
severity: warning330-
disabled: false331-
arguments: ["Ω", "Σ", "σ", "7"]332-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#bare-return333-
- name: bare-return334-
severity: warning335-
disabled: true336-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#blank-imports337-
- name: blank-imports338-
severity: warning339-
disabled: false340-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#bool-literal-in-expr341-
- name: bool-literal-in-expr342-
severity: warning343-
disabled: false344-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#call-to-gc345-
- name: call-to-gc346-
severity: warning347-
disabled: false348-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#cognitive-complexity349-
- name: cognitive-complexity350-
severity: warning351-
disabled: true352-
arguments: [7]353-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#confusing-naming354-
- name: confusing-naming355-
severity: warning356-
disabled: true357-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#confusing-results358-
- name: confusing-results359-
severity: warning360-
disabled: false361-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#constant-logical-expr362-
- name: constant-logical-expr363-
severity: warning364-
disabled: false365-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#context-as-argument366-
- name: context-as-argument367-
severity: warning368-
disabled: false369-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#context-keys-type370-
- name: context-keys-type371-
severity: warning372-
disabled: true373-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#cyclomatic374-
- name: cyclomatic375-
severity: warning376-
disabled: true377-
arguments: [3]378-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#datarace379-
- name: datarace380-
severity: warning381-
disabled: false382-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#deep-exit383-
- name: deep-exit384-
severity: warning385-
disabled: true386-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#defer387-
- name: defer388-
severity: warning389-
disabled: false390-
arguments:391-
- ["call-chain", "loop"]392-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#dot-imports393-
- name: dot-imports394-
severity: warning395-
disabled: false396-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#duplicated-imports397-
- name: duplicated-imports398-
severity: warning399-
disabled: false400-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#early-return401-
- name: early-return402-
severity: warning403-
disabled: true404-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#empty-block405-
- name: empty-block406-
severity: warning407-
disabled: false408-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#empty-lines409-
- name: empty-lines410-
severity: warning411-
disabled: false412-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#error-naming413-
- name: error-naming414-
severity: warning415-
disabled: false416-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#error-return417-
- name: error-return418-
severity: warning419-
disabled: false420-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#error-strings421-
- name: error-strings422-
severity: warning423-
disabled: false424-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#errorf425-
- name: errorf426-
severity: warning427-
disabled: false428-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#exported429-
- name: exported430-
severity: warning431-
disabled: true432-
arguments:433-
- "checkPrivateReceivers"434-
- "sayRepetitiveInsteadOfStutters"435-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#file-header436-
- name: file-header437-
severity: warning438-
disabled: true439-
arguments:440-
- This is the text that must appear at the top of source files.441-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#flag-parameter442-
- name: flag-parameter443-
severity: warning444-
disabled: true445-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#function-result-limit446-
- name: function-result-limit447-
severity: warning448-
disabled: true449-
arguments: [2]450-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#function-length451-
- name: function-length452-
severity: warning453-
disabled: true454-
arguments: [10, 0]455-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#get-return456-
- name: get-return457-
severity: warning458-
disabled: true459-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#identical-branches460-
- name: identical-branches461-
severity: warning462-
disabled: false463-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#if-return464-
- name: if-return465-
severity: warning466-
disabled: true467-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#increment-decrement468-
- name: increment-decrement469-
severity: warning470-
disabled: false471-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#indent-error-flow472-
- name: indent-error-flow473-
severity: warning474-
disabled: false475-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#import-shadowing476-
- name: import-shadowing477-
severity: warning478-
disabled: false479-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#line-length-limit480-
- name: line-length-limit481-
severity: warning482-
disabled: true483-
arguments: [80]484-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#max-public-structs485-
- name: max-public-structs486-
severity: warning487-
disabled: false488-
arguments: [3]489-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#modifies-parameter490-
- name: modifies-parameter491-
severity: warning492-
disabled: false493-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#modifies-value-receiver494-
- name: modifies-value-receiver495-
severity: warning496-
disabled: false497-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#nested-structs498-
- name: nested-structs499-
severity: warning500-
disabled: true501-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#optimize-operands-order502-
- name: optimize-operands-order503-
severity: warning504-
disabled: false505-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#package-comments506-
- name: package-comments507-
severity: warning508-
disabled: true509-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#range510-
- name: range511-
severity: warning512-
disabled: false513-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#range-val-in-closure514-
- name: range-val-in-closure515-
severity: warning516-
disabled: false517-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#range-val-address518-
- name: range-val-address519-
severity: warning520-
disabled: false521-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#receiver-naming522-
- name: receiver-naming523-
severity: warning524-
disabled: false525-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#redefines-builtin-id526-
- name: redefines-builtin-id527-
severity: warning528-
disabled: false529-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#string-of-int530-
- name: string-of-int531-
severity: warning532-
disabled: false533-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#string-format534-
- name: string-format535-
severity: warning536-
disabled: false537-
arguments:538-
- - "core.WriteError[1].Message"539-
- "/^([^A-Z]|$)/"540-
- must not start with a capital letter541-
- - "fmt.Errorf[0]"542-
- '/(^|[^\.!?])$/'543-
- must not end in punctuation544-
- - panic545-
- '/^[^\n]*$/'546-
- must not contain line breaks547-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#struct-tag548-
- name: struct-tag549-
severity: warning550-
disabled: true551-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#superfluous-else552-
- name: superfluous-else553-
severity: warning554-
disabled: false555-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#time-equal556-
- name: time-equal557-
severity: warning558-
disabled: false559-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#time-naming560-
- name: time-naming561-
severity: warning562-
disabled: false563-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#var-naming564-
- name: var-naming565-
severity: warning566-
disabled: false567-
arguments:568-
- ["ID"] # AllowList569-
- ["VM"] # DenyList570-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#var-declaration571-
- name: var-declaration572-
severity: warning573-
disabled: false574-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unconditional-recursion575-
- name: unconditional-recursion576-
severity: warning577-
disabled: false578-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unexported-naming579-
- name: unexported-naming580-
severity: warning581-
disabled: true582-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unexported-return583-
- name: unexported-return584-
severity: warning585-
disabled: true586-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unhandled-error587-
- name: unhandled-error588-
severity: warning589-
disabled: true590-
arguments:591-
- "fmt.Printf"592-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unnecessary-stmt593-
- name: unnecessary-stmt594-
severity: warning595-
disabled: true596-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unreachable-code597-
- name: unreachable-code598-
severity: warning599-
disabled: false600-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unused-parameter601-
- name: unused-parameter602-
severity: warning603-
disabled: true604-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unused-receiver605-
- name: unused-receiver606-
severity: warning607-
disabled: true608-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#useless-break609-
- name: useless-break610-
severity: warning611-
disabled: false612-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#waitgroup-by-value613-
- name: waitgroup-by-value614-
severity: warning615-
disabled: false616-
617-
staticcheck:618-
# https://staticcheck.io/docs/options#checks619-
checks:620-
- all621-
622-
stylecheck:623-
# https://staticcheck.io/docs/options#checks624-
checks:625-
- all626-
- -ST1000627-
- -ST1003628-
- -ST1016629-
- -ST1017630-
- -ST1020631-
- -ST1021632-
- -ST1022633-
# https://staticcheck.io/docs/options#dot_import_whitelist634-
dot-import-whitelist:635-
- fmt636-
# https://staticcheck.io/docs/options#initialisms637-
initialisms:638-
- ACL639-
- API640-
- ASCII641-
- CPU642-
- CSS643-
- DNS644-
- EOF645-
- GUID646-
- HTML647-
- HTTP648-
- HTTPS649-
- ID650-
- IP651-
- JSON652-
- QPS653-
- RAM654-
- RPC655-
- SLA656-
- SMTP657-
- SQL658-
- SSH659-
- TCP660-
- TLS661-
- TTL662-
- UDP663-
- UI664-
- GID665-
- UID666-
- UUID667-
- URI668-
- URL669-
- UTF8670-
- VM671-
- XML672-
- XMPP673-
- XSRF674-
- XSS675-
# https://staticcheck.io/docs/options#http_status_code_whitelist676-
http-status-code-whitelist:677-
- "200"678-
- "400"679-
- "404"680-
- "500"681-
682-
tagliatelle:683-
# check the struck tag name case684-
case:685-
# use the struct field name to check the name of the struct tag686-
use-field-name: false687-
rules:688-
# any struct tag type can be used.689-
# support string case:690-
# `camel`, `pascal`, `kebab`, `snake`, `goCamel`, `goPascal`, `goKebab`, `goSnake`, `upper`, `lower`691-
json: snake692-
yaml: snake693-
694-
testifylint:695-
enable-all: true696-
disable:697-
- require-error698-
699-
testpackage:700-
# regexp pattern to skip files701-
skip-regexp: (export|internal)_test\.go702-
703-
thelper:704-
# The following configurations enable all checks. It can be omitted because all checks are enabled by default.705-
# You can enable only required checks deleting unnecessary checks.706-
test:707-
first: true708-
name: true709-
begin: true710-
benchmark:711-
first: true712-
name: true713-
begin: true714-
tb:715-
first: true716-
name: true717-
begin: true718-
719-
unparam:720-
# Inspect exported functions, default is false. Set to true if no external program/library imports your code.721-
# XXX: if you enable this setting, unparam will report a lot of false-positives in text editors:722-
# if it's called for subdir of a project it can't find external interfaces. All text editor integrations723-
# with golangci-lint call it on a directory with the changed file.724-
check-exported: false725-
726-
whitespace:727-
multi-if: false # Enforces newlines (or comments) after every multi-line if statement728-
multi-func: false # Enforces newlines (or comments) after every multi-line function signature729-
730-
wrapcheck:731-
# An array of strings that specify substrings of signatures to ignore.732-
# If this set, it will override the default set of ignored signatures.733-
# See https://github.com/tomarrell/wrapcheck#configuration for more information.734-
ignoreSigs:735-
- .Errorf(736-
- errors.New(737-
- errors.Unwrap(738-
- .Wrap(739-
- .Wrapf(740-
- .WithMessage(741-
- .WithMessagef(742-
- .WithStack(743-
ignoreSigRegexps:744-
- \.New.*Error\(745-
ignorePackageGlobs:746-
- context747-
- encoding/*748-
- github.com/pkg/*749-
- github.com/helmwave/helmwave/*750-
751-
wsl:752-
# See https://github.com/bombsimon/wsl/blob/master/doc/configuration.md for753-
# documentation of available settings. These are the defaults for754-
# `golangci-lint`.755-
allow-assign-and-anything: false756-
allow-assign-and-call: true757-
allow-cuddle-declarations: false758-
allow-multiline-assign: true759-
allow-separated-leading-comment: false760-
allow-trailing-comment: false761-
force-case-trailing-whitespace: 0762-
force-err-cuddling: false763-
force-short-decl-cuddling: false764-
strict-append: true765-
766-
issues:767-
exclude-rules:768-
- path: pkg/version/769-
linters:770-
- lll771-
- wrapcheck772-
- path: config\.go773-
linters:774-
- lll775-
- path: _test\.go776-
linters:777-
- containedctx778-
- dupl779-
- dupword780-
- forcetypeassert781-
- funlen782-
- goconst783-
- godot784-
- lll785-
- revive786-
- wrapcheck787-
- dupword788-
789-
- path: cmd/790-
linters:791-
- forbidigo792-
- dupword793-
794-
795-
# Independently from option `exclude` we use default exclude patterns,796-
# it can be disabled by this option. To list all797-
# excluded by default patterns execute `golangci-lint run --help`.798-
# Default value for this option is true.799-
exclude-use-default: false800-
801-
# Maximum issues count per one linter. Set to 0 to disable. Default is 50.802-
max-issues-per-linter: 0803-
804-
# Maximum count of issues with the same text. Set to 0 to disable. Default is 3.805-
max-same-issues: 0806-
807-
# Show only new issues: if there are unstaged changes or untracked files,808-
# only those changes are analyzed, else only changes in HEAD~ are analyzed.809-
# It's a super-useful option for integration of golangci-lint into existing810-
# large codebase. It's not practical to fix all existing issues at the moment811-
# of integration: much better don't allow issues in new code.812-
# Default is false.813-
new: false814-
815-
severity:816-
# Default value is empty string.817-
# Set the default severity for issues. If severity rules are defined and the issues818-
# do not match or no severity is provided to the rule this will be the default819-
# severity applied. Severities should match the supported severity names of the820-
# selected out format.821-
# - Code climate: https://docs.codeclimate.com/docs/issues#issue-severity822-
# - Checkstyle: https://checkstyle.sourceforge.io/property_types.html#severity823-
# - Github: https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-error-message824-
default-severity: error825-
826-
# The default value is false.827-
# If set to true severity-rules regular expressions become case-sensitive.828-
case-sensitive: false829-
830-
# Default value is empty list.831-
# When a list of severity rules are provided, severity information will be added to lint832-
# issues. Severity rules have the same filtering capability as exclude rules except you833-
# are allowed to specify one matcher per severity rule.834-
# Only affects out formats that support setting severity information.835-
rules:836-
- severity: warning837-
linters:838-
- forcetypeassert839-
- funlen840-
- paralleltest841-
- severity: notice842-
linters:843-
- godox844-
pkg/plan/diff.gomodifiedView file
Loading diff…
pkg/plan/up.gomodifiedView file
Loading diff…
pkg/registry/in.gomodifiedView file
Loading diff…
pkg/release/chart.gomodifiedView file
Loading diff…
pkg/release/dependency/graph.gomodifiedView file
Loading diff…
pkg/template/extra.gomodifiedView file
Loading diff…