forked from cloudflare/cloudflare-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.golintci.yaml
38 lines (32 loc) · 1.83 KB
/
.golintci.yaml
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
run:
# timeout for analysis, e.g. 30s, 5m, default is 1m
timeout: 1m
# exit code when at least one issue was found, default is 1
issues-exit-code: 1
# include test files or not, default is true
tests: true
# default is true. Enables skipping of directories:
# vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
skip-dirs-use-default: true
modules-download-mode: readonly
linters:
enable:
- bodyclose # ensure HTTP response bodies are successfully closed.
- contextcheck # check we are passing context an inherited context.
- gofmt # checks whether code was gofmt-ed. By default this tool runs with -s option to check for code simplification.
- errname # checks that sentinel errors are prefixed with the `Err`` and error types are suffixed with the `Error``.
- errorlint # used to find code that will cause problems with the error wrapping scheme introduced in Go 1.13.
- godot # check if comments end in a period.
- misspell # finds commonly misspelled English words in comments.
- nilerr # checks that there is no simultaneous return of nil error and an invalid value.
- tparallel # detects inappropriate usage of t.Parallel() method in your Go test codes.
- unparam # reports unused function parameters.
- whitespace # detection of leading and trailing whitespace.
- gosec # inspects source code for security problems.
- bidichk # checks for dangerous unicode character sequences.
- exportloopref # prevent scope issues with pointers in loops.
- goconst # use constants where values are repeated.
- reassign # checks that package variables are not reassigned.
- goimports # checks import grouping and code formatting.
output:
format: colored-line-number