forked from tricorder-observability/Starship
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.golangci.yml
96 lines (92 loc) · 2.15 KB
/
.golangci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
---
# Config file for golangci-lint, placed here so local run of golangci-lint
# can find this config file.
#
# Super-linter uses a symbol-linked file under .github/linter/.golangci.yml
run:
allow-parallel-runners: true
timeout: 6m
skip-dirs:
- bazel
- devops
- docs
- experimental
- home
- tools
- ui
- src/agent/wasm/programs
output:
sort-results: true
issues:
max-issues-per-linter: 0
max-same-issues: 0
linters:
disable-all: true
enable:
- asciicheck
- errcheck
- godot
- gofumpt
- gofmt
- gosimple
- govet
- ineffassign
- makezero
- misspell
- nakedret
- nolintlint
- nonamedreturns
- predeclared
- staticcheck
- stylecheck
- unused
- lll
- whitespace
- goimports
- revive
- depguard
linters-settings:
errcheck:
check-type-assertions: true
goimports:
local-prefixes: github.com/tricorder
nakedret:
max-func-lines: 0
revive:
rules:
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#package-comments
- name: package-comments
severity: error
disabled: false
- name: argument-limit
severity: error
disabled: false
# TODO(yzhao): Reduce it to 5
arguments: [8]
lll:
# max line length, lines longer will be reported. Default is 120.
# '\t' is counted as 1 character by default, and can be changed with the tab-width option
line-length: 120
# Tab width in spaces.
tab-width: 2
depguard:
list-type: blacklist
packages:
# logging is allowed only by github.com/tricorder/src/utils/log,
# logrus is allowed to use only in log package
- github.com/sirupsen/logrus
ignore-file-rules:
- "**/utils/log/*.go"
staticcheck:
# Deprecated: use the global `run.go` instead.
go: "1.18"
# SAxxxx checks in https://staticcheck.io/docs/configuration/options/#checks
# Default: ["*"]
checks: ["all"]
stylecheck:
# Deprecated: use the global `run.go` instead.
go: "1.18"
# STxxxx checks in https://staticcheck.io/docs/configuration/options/#checks
# Default: ["*"]
# ST1003 is for enforcing camel case.
checks: ["all", "-ST1003"]