Skip to content

Commit eda9d4f

Browse files
committed
Move all check logic into YAML
1 parent 2e13bb6 commit eda9d4f

File tree

20 files changed

+1277
-1719
lines changed

20 files changed

+1277
-1719
lines changed

.golangci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ linters:
4040
- gochecknoglobals # checks that no global variables exist
4141
- cyclop # replaced by revive
4242
- gocyclo # replaced by revive
43+
- forbidigo # needs configuration to be useful
4344
- funlen # replaced by revive
4445
- godox # TODO's are OK
4546
- ireturn # It's OK
@@ -53,13 +54,15 @@ linters:
5354
- lll # [replaced by golines] reports long lines
5455
- mnd # detects magic numbers, duplicated by revive
5556
- nlreturn # [too strict and mostly code is not more readable] checks for a new line before return and branch statements to increase code clarity
57+
- noinlineerr # disallows inline error handling `if err := ...; err != nil {`
5658
- prealloc # [premature optimization, but can be used in some cases] finds slice declarations that could potentially be preallocated
5759
- tagliatelle # needs configuration
5860
- testableexamples # checks if examples are testable (have an expected output)
5961
- testpackage # makes you use a separate _test package
6062
- paralleltest # not every test should be in parallel
6163
- wrapcheck # not required
6264
- wsl # [too strict and mostly code is not more readable] whitespace linter forces you to use empty lines
65+
- wsl_v5 # [too strict and mostly code is not more readable] add or remove empty lines
6366
- zerologlint # detects the wrong usage of zerolog that a user forgets to dispatch zerolog.Event
6467

6568
# All settings can be found here https://github.com/golangci/golangci-lint/blob/HEAD/.golangci.reference.yml
@@ -173,7 +176,7 @@ linters:
173176
arguments:
174177
- max-lit-count: "5"
175178
allow-strs: '"","\n"'
176-
allow-ints: "0,1,2,3,24,30,365,1024,0o600,0o700,0o750,0o755"
179+
allow-ints: "0,1,2,3,24,30,60,100,365,0o600,0o700,0o750,0o755"
177180
allow-floats: "0.0,0.,1.0,1.,2.0,2."
178181
- name: cognitive-complexity
179182
arguments: [55]

Makefile

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,6 @@ clean:
3232
test:
3333
$(GOTEST) -v ./...
3434

35-
lint:
36-
@which golangci-lint > /dev/null 2>&1 || (echo "Installing golangci-lint..." && go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest)
37-
golangci-lint run --timeout=5m ./...
38-
$(GOCMD) vet ./...
39-
$(GOCMD) fmt ./...
40-
4135
deps:
4236
$(GOMOD) download
4337
$(GOMOD) tidy

cmd/agent/analyzer/analyzer.go

Lines changed: 0 additions & 59 deletions
This file was deleted.

cmd/agent/analyzer/antivirus.go

Lines changed: 0 additions & 83 deletions
This file was deleted.

cmd/agent/analyzer/app_firewall.go

Lines changed: 0 additions & 33 deletions
This file was deleted.

0 commit comments

Comments
 (0)