mmetc
c17d42278f
replace go-acc, richgo with gotestsum ( #3567 )
2025-04-14 16:21:32 +02:00
mmetc
2b70dbf3e5
cscli hub/items: always show action plan; fix --interactive in pipes ( #3451 )
2025-02-21 00:17:01 +01:00
mmetc
5136d928ed
lint: gocritic/typeDefFirst (ensure type definitions come before methods) ( #3404 )
...
* lint: gocritic/typeDefFirst (ensure type definitions come before methods)
* lint
2025-02-17 10:55:18 +01:00
mmetc
49fb24c3b1
lint: enable errcheck; add allowlist and explicit checks ( #3403 )
...
* lint: enable errcheck with explicit allow list
* add explicit error checks
* windows tests
* windows nolint
2025-01-16 16:13:10 +01:00
mmetc
6529215775
CI: golangci-lint 1.63 ( #3396 )
2025-01-16 13:22:08 +01:00
mmetc
4e6e6dec65
lint: explicit error checks ( #3388 )
...
* errcheck: tests
* fflag errcheck
* http_test errcheck (avoid duplicate metric registration)
2025-01-02 12:33:54 +01:00
mmetc
78f4b85311
pkg/cwhub - refact Downloader ( #3382 )
...
* pkg/cwhub - refact Downloader
* single method interfaces
* lint
2024-12-27 11:49:14 +01:00
mmetc
a1d26bdc5b
cscli: improved hub management ( #3352 )
2024-12-26 15:21:52 +01:00
mmetc
ecf34c2fa1
lint/deep-exit: avoid log.Fatal ( #3367 )
...
* lint/deep-exit: don't fail on invalid alert
* lint/deep-exit: kinesis_test.go
* lint/deep-exit: watcher_test.go
* lint/deep-exit: parsing_test.go
* lint/deep-exit: client_test.go
2024-12-18 16:43:19 +01:00
mmetc
b93b240bd4
lint: enable (some) gocritic checks ( #3238 )
...
* lint: gocritic configuration
* lint: octal literals
* lint: gocritic (filepath.Join)
* ling: gocritic (badRegexp, regexpSimplify)
* lint: gocritic (preferStringWriter)
* lint: gocritic (emtpyStringTest)
* filepath.Clean(a+b) -> filepath.Join(a, b)
* gofumpt
2024-09-17 17:07:30 +02:00
mmetc
5f22c78fcf
enable linters: copyloopvar, intrange ( #3184 )
...
* enable linters: copyloopvar, intrange
* lint
2024-09-17 16:10:56 +02:00
mmetc
ce085dc4cd
logs and user messages: use "parse" and "serialize" instead of marshal/unmarshal ( #3240 )
2024-09-17 13:19:14 +02:00
mmetc
cae76baa3a
refact acquisition: build profiles (optionally exclude datasources from final binary) ( #3217 )
...
example
$ make BUILD_PROFILE=minimal
or
$ make EXCLUDE=datasource_s3,datasource_kinesis
2024-09-12 17:26:39 +02:00
blotus
a3d7900b5f
update expr ( #3144 )
2024-07-22 12:14:46 +02:00
mmetc
8a259fd25b
lint (copyloopvar) ( #2971 )
2024-06-20 22:13:26 +02:00
mmetc
fd433a7e73
cscli: refactor "cscli setup" to avoid global variable ( #3075 )
...
* cscli refactor: extract method cliSetup.detect()
* cscli refactor: extract method cliSetup.install()
* cscli refactor: extract method cliSetup.dataSources()
* cscli refactor: method ccliSetup.validate()
* skip redundant pre-loop checks
2024-06-12 11:07:10 +02:00
mmetc
dd6cf2b844
pkg/cwhub: use explicit context for item install, upgrade ( #3067 )
2024-06-07 17:32:52 +02:00
mmetc
659feec496
cscli: don't print timestamps ( #2984 )
...
* cscli: don't print timestamps
* lint (whitespace, errors)
2024-05-06 10:43:54 +02: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
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
ffcab0b2bc
Refactor hub management and cscli commands ( #2545 )
2023-11-24 15:57:32 +01:00
lperdereau
92f923cfa8
Loki integration #2 ( #2306 )
...
* Add support for loki datasource
---------
Co-authored-by: Mathieu Lecarme <mathieu@garambrogne.net>
Co-authored-by: Sebastien Blot <sebastien@crowdsec.net>
Co-authored-by: Thibault "bui" Koechlin <thibault@crowdsec.net>
2023-11-22 13:31:39 +01:00
mmetc
338141f067
Refact cscli hub / pkg/cwhub (part 5) ( #2521 )
...
* remove unused yaml tags
* cscli/cwhub: deduplicate, remove dead code
* log.Fatal -> fmt.Errorf
* deflate utils.go by moving functions to respective files
* indexOf() -> slices.Index()
* ItemStatus() + toEmoji() -> Item.status()
* Item.versionStatus()
* move getSHA256() to loader.go
2023-10-06 13:59:51 +02:00
mmetc
95ed308207
cscli setup: accept stdin; fix proftpd detection test and service unmask ( #2496 )
2023-09-29 12:58:35 +02:00
mmetc
ffadd42779
update dependency on go-cs-lib; drop the pkg/ part ( #2393 )
2023-07-28 16:35:08 +02:00
mmetc
8bfeb7d90d
Update go dependencies ( #2293 )
...
- update fatih/color (fix windows issue)
- update mongo-driver (fix build issue)
- go.mod: merge two "require" blocks
- update semver dependency (same version as indirect dep), fix test checks in cscli setup
- remove gotest.tools dependency (use testify, cstest)
- update x/ exp, mod, sys dependencies
2023-06-22 11:31:41 +02:00
mmetc
8da9d5eefd
don't log notification error if not running under systemd ( #2274 )
2023-06-08 15:04:48 +02:00
mmetc
b2d3520519
decouple bouncer dependencies: use go-cs-lib in test code ( #2229 )
2023-05-25 15:37:44 +02:00
blotus
6aaf3cd50b
Update expr to 1.12.2 ( #2110 )
2023-03-09 16:56:11 +01:00
mmetc
b6be18ca65
cscli setup ( #1923 )
...
Detect running services and generate acquisition configuration
2023-02-06 07:33:04 +01:00