-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.golangci.yml
More file actions
52 lines (44 loc) · 1.35 KB
/
Copy path.golangci.yml
File metadata and controls
52 lines (44 loc) · 1.35 KB
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
# golangci-lint configuration
# Docs: https://golangci-lint.run/usage/configuration/
run:
timeout: 5m
modules-download-mode: readonly
linters:
enable:
- errcheck # check for unchecked errors
- gosimple # suggest code simplifications
- govet # report suspicious constructs
- ineffassign # detect unused assignments
- staticcheck # broad static analysis
- unused # report unused code
- gofmt # enforce gofmt formatting
- goimports # enforce import grouping
- misspell # fix common spelling mistakes
- gosec # security checks
- revive # general linter, fast drop-in for golint
- godot # check comment endings
- noctx # detect http calls without context
linters-settings:
goimports:
local-prefixes: github.com/bethropolis/localgo
revive:
rules:
- name: exported
disabled: false
- name: unused-parameter
disabled: false
gosec:
excludes:
- G304 # file path provided as taint input (common in CLI tools)
- G306 # file permissions (used intentionally in storage)
godot:
scope: declarations
issues:
exclude-rules:
# Relax some rules in test files
- path: _test\.go
linters:
- errcheck
- gosec
max-same-issues: 0
max-issues-per-linter: 0