mmetc
c4473839c4
Refact pkg/parser/node ( #2953 )
...
* extract method processFilter()
* extract method processWhitelist()
* lint (whitespace, errors)
2024-04-25 17:53:10 +02:00
mmetc
d2c4bc55fc
plugins: use yaml.v3 ( #2969 )
...
* plugins: use yaml.v3
* lint
2024-04-25 17:34:49 +02:00
mmetc
2abc078e53
use go 1.22.2 ( #2826 )
2024-04-25 15:11:08 +02:00
mmetc
845d4542bb
cscli: use yaml.v3 ( #2965 )
...
* cscli: use yaml.v3
* lint
2024-04-25 14:41:02 +02:00
mmetc
718d1c54b2
pkg/database/decisiosn: remove filter parameter, which is always passed empty ( #2954 )
2024-04-23 11:15:27 +02:00
mmetc
b48b728317
cscli support: include stack traces ( #2935 )
2024-04-22 23:54:51 +02:00
mmetc
630cbf0c70
update linter list and descriptions ( #2951 )
2024-04-22 17:18:11 +02:00
mmetc
be97466809
CI: use golangci-lint 1.57 ( #2916 )
2024-03-26 09:30:32 +01:00
mmetc
dd71f0a866
CI: bump lint version and update configuration ( #2901 )
...
* bump golangci-lint to 1.56
* lint (testifylint)
* update lint configuration
* windows test: remove stale code
2024-03-19 10:48:49 +01:00
mmetc
e7ecea764e
pkg/csconfig: use yaml.v3; deprecate yaml.v2 for new code ( #2867 )
...
* pkg/csconfig: use yaml.v3; deprecate yaml.v2 for new code
* yaml.v3: handle empty files
* Lint whitespace, errors
2024-03-04 14:22:53 +01:00
mmetc
e976614645
cscli metrics: rename buckets -> scenarios ( #2848 )
...
* cscli metrics: rename buckets -> scenarios
* update lint configuration
* lint
2024-02-15 14:34:12 +01:00
mmetc
d34fb7e8a8
log processor: share apiclient in output goroutines ( #2836 )
2024-02-13 14:22:19 +01:00
mmetc
df159b0167
update calls to deprecated x509 methods ( #2824 )
2024-02-09 13:55:24 +01:00
mmetc
af1df0696b
refact cscli metric processing ( #2816 )
...
* typos
* refact cscli metric processing
* lint
2024-02-07 11:10:25 +01:00
Thibault "bui" Koechlin
3208a40ef3
Dedicated whitelist metrics ( #2813 )
...
* add proper whitelist metrics : both its own table and an extension to acquis metrics to track discarded/whitelisted lines
2024-02-06 18:04:17 +01:00
mmetc
4e724f6c0a
refact "cscli" root cmd ( #2811 )
...
* refact "cscli" root cmd
* lint (naming, imports, whitespace)
2024-02-06 10:50:28 +01:00
mmetc
8c75efdb2a
lint: disallow naked returns ( #2771 )
2024-01-24 17:31:34 +01:00
mmetc
f75cdeb239
lint: enalble linter "wastedassign" ( #2772 )
2024-01-24 17:31:11 +01:00
mmetc
6ffb68322f
pkg/hubtest: split hubtest_item.go ( #2753 )
...
* split hubtest_item.go, update linter config
* extract loops to methods
* split installParser
* split installScenario
* split installPostoverflow
* split installAppsecRule
* generalize method installHubItems()
2024-01-18 11:09:14 +01:00
mmetc
5d0d5ac9c9
CI: enable code complexity linters ( #2752 )
2024-01-17 21:57:45 +01:00
mmetc
d760b401e6
apiclient: split auth_key, auth_retry, auth_jwt ( #2743 )
2024-01-17 15:08:41 +01:00
mmetc
5622ac8338
CI: enable testifylint ( #2696 )
...
- reverse actual and expected values
- use assert.False, assert.True
- use assert.Len, assert.Emtpy
- use require.Error, require.NoError
- use assert.InDelta
2024-01-05 15:26:13 +01:00
mmetc
da746f77d5
apiserver/apiclient: compact tests ( #2694 )
...
* apiserver/apiclient: compact tests
* update golangci-lint configuration
2024-01-04 17:10:36 +01:00
mmetc
162768bdec
Bump golangci-lint run to 1.55, update defaults ( #2677 )
...
The plan is to enable linters first, then fix issues types one by one.
2023-12-21 12:30:20 +01:00
mmetc
61d4ccbfdd
use go 1.21.1 ( #2418 )
...
* use go 1.21.1, require 1.21
* import "slices" from stdlib
* allow codeql to set version number from tags
* codeql: custom WASM build - the automated one can silently fail
2023-10-04 13:01:57 +02:00
mmetc
c588be0842
golangci-lint: use v1.54, remove unnecessary byte/string conversions ( #2438 )
2023-08-25 16:22:10 +02:00
mmetc
d4c0643122
CI: add fedora-37, -38 to vagrant tests ( #2299 )
2023-06-23 13:59:24 +02:00
mmetc
5ff6bfba9c
CI: build with/require go 1.20 ( #2031 )
2023-02-15 14:27:17 +01:00
mmetc
104f5d1fe6
lint: error handling cleanup ( #1877 )
2022-11-29 09:16:07 +01:00
mmetc
895691dad1
enabled linters: gocritic, nilerr ( #1853 )
2022-11-07 10:36:50 +01:00
mmetc
02d2eab18c
update golangci-lint to 1.50 and fixes ( #1828 )
2022-10-26 15:11:37 +02:00
mmetc
8fecc2c00b
enable staticcheck linter; fixes ( #1806 )
...
- explicitly ignore returned parameters
- replace Walk with faster WalkDir
- log path error during hub dir sync
- colorize static unit tests
- removed duplicate import in crowdsec/main.go
- typos
- func tests: default datasource in tests/var/log instead of /tmp
- action setup-go v3
2022-10-14 16:12:21 +02:00
mmetc
414282a2c9
golangci-lint 1.49 and related fixes ( #1736 )
2022-09-06 13:55:03 +02:00
mmetc
eea07b7a1a
golangci-lint v1.48 and fixes for "usestdlibvars" ( #1711 )
2022-08-16 09:46:10 +02:00
mmetc
10585bfecc
enabled linters and fixes for: misspell, predeclared, unconvert, ineffassign, gosimple, govet ( #1595 )
2022-06-16 14:41:54 +02:00
mmetc
799cc82bb5
functional tests, minor refactoring and lint/cleanup ( #1570 )
...
* cmd/crowdsec: removed log.Fatal()s, added tests and print error for unrecognized argument
* updated golangci-lint to v1.46
* lint/deadcode: fix existing issues
* tests: cscli config backup/restore
* tests: cscli completion powershell/fish
* err check: pflags MarkHidden()
* empty .dockerignore (and explain the reason)
* tests, errors.Wrap
* test for CS_LAPI_SECRET and minor refactoring
* minor style changes
* log cleanup
2022-06-06 15:24:48 +02:00
mmetc
1fc9587919
fix #1283 : update and enable error reports from golangci ( #1523 )
2022-05-25 22:27:50 +02:00