-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.golangci.yml
More file actions
83 lines (77 loc) · 2.04 KB
/
Copy path.golangci.yml
File metadata and controls
83 lines (77 loc) · 2.04 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
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
version: "2"
# Note: OCR now uses Ollama HTTP API (no CGO dependencies), so linting works everywhere
# without system dependencies. All packages should lint cleanly.
run:
timeout: 5m
tests: true
modules-download-mode: readonly
build-tags:
- ignore_ocr
linters:
enable:
- errcheck
- govet
- staticcheck
- misspell
- revive
- gocyclo
disable:
# Disabled temporarily - many false positives in test files and output file operations
- gosec
# Disabled - contains WIP v6 parser functions that will be used
- unused
# Disabled - repeated test strings are acceptable in test files
- goconst
settings:
gocyclo:
min-complexity: 16
goconst:
min-len: 3
min-occurrences: 3
misspell:
locale: US
# Exclusion rules
exclusions:
rules:
# Unused code in rmrender is work-in-progress for v6 format parsing
- path: internal/rmrender/
linters:
- unused
# Test files: allow repeated strings and file operations
- path: _test\.go
linters:
- goconst
- gosec
# Directories with 0755 permissions are appropriate for user-facing output
- text: "G301.*MkdirAll.*0755"
linters:
- gosec
# Output files with 0644 permissions are appropriate
- text: "G306.*WriteFile.*0644"
linters:
- gosec
- text: "G302.*OpenFile.*0644"
linters:
- gosec
# State files with 0644 are appropriate for non-sensitive state data
- path: internal/state/state\.go
text: "G306.*WriteFile"
linters:
- gosec
# ZIP extraction with validation is acceptable
- path: internal/converter/converter\.go
text: "(G305|G304|G110)"
linters:
- gosec
# File reading in rmrender is from trusted local files
- path: internal/rmrender/parser\.go
text: "G304"
linters:
- gosec
formatters:
enable:
- gofmt
- goimports
issues:
max-issues-per-linter: 0
max-same-issues: 0