-
Notifications
You must be signed in to change notification settings - Fork 42
fix: use golangci-lint in favour of go-critic #550
Conversation
Detected by golangci-lint
💔 Tests Failed
Expand to view the summary
Build stats
Test stats 🧪
Test errorsExpand to view the tests failures
|
Test | Results |
---|---|
Failed | 5 |
Passed | 67 |
Skipped | 20 |
Total | 92 |
Genuine test errors
💔 There are test failures but not known flaky tests, most likely a genuine test failure.
- Name:
Initializing / End-To-End Tests / fleet_agent_endpoint_integration / Un-enrolling Elastic Agent stops Elastic Endpoint – Agent Endpoint Integration
- Name:
Initializing / End-To-End Tests / fleet_fleet_mode_agent / Un-enrolling the centos agent – Fleet Mode Agent
- Name:
Initializing / End-To-End Tests / fleet_fleet_mode_agent / Un-enrolling the debian agent – Fleet Mode Agent
- Name:
Initializing / End-To-End Tests / fleet_fleet_mode_agent / Revoking the enrollment token for the centos agent – Fleet Mode Agent
- Name:
Initializing / End-To-End Tests / fleet_fleet_mode_agent / Revoking the enrollment token for the debian agent – Fleet Mode Agent
The errors are also existing in master, so not related. Going to merge |
Did not mentioned here, but those errors seems related to a change in elasticsearch/kibana: It feels that kibana/elasticsearch are not creating Fleet setup throwing/raising an In tests:
In Kibana logs:
For a similar reason, any try to unenroll an agent fails with similar error:
In Kibana logs:
Would this PR be related? elastic/kibana#87053. Also reported by Kibana QA here: elastic/kibana#86864 |
* fix: remove var type as per golint's suggestion * chore: add golangci-lint precommit hook * chore: remove go-critic in fafvour of golangci-lint * chore: remove TOML hook * chore: add go-vet hook * fix: remove unused variable Detected by golangci-lint * fix: remove unused Go file, which caused lint errors
* fix: remove var type as per golint's suggestion * chore: add golangci-lint precommit hook * chore: remove go-critic in fafvour of golangci-lint * chore: remove TOML hook * chore: add go-vet hook * fix: remove unused variable Detected by golangci-lint * fix: remove unused Go file, which caused lint errors
…use golangci-lint in favour of go-critic (#550) backport for 7.x (#553) * chore: simplify jUnit format generation with gotestsum (#549) * fix: use golangci-lint in favour of go-critic (#550) * fix: remove var type as per golint's suggestion * chore: add golangci-lint precommit hook * chore: remove go-critic in fafvour of golangci-lint * chore: remove TOML hook * chore: add go-vet hook * fix: remove unused variable Detected by golangci-lint * fix: remove unused Go file, which caused lint errors
…use golangci-lint in favour of go-critic (#550) backport for 7.10.x (#554) * chore: simplify jUnit format generation with gotestsum (#549) * fix: use golangci-lint in favour of go-critic (#550) * fix: remove var type as per golint's suggestion * chore: add golangci-lint precommit hook * chore: remove go-critic in fafvour of golangci-lint * chore: remove TOML hook * chore: add go-vet hook * fix: remove unused variable Detected by golangci-lint * fix: remove unused Go file, which caused lint errors
What does this PR do?
It replaces
go-critic
withgolangci-lint
, also adding go-vet (https://golang.org/cmd/vet/) and removing tomlv (no TOML files in the project) hooks.In the process of testing each hook we identified minor flaws that we have fixed in this PR:
Why is it important?
Go-critic fails to be fetched on CI (a clean environment) because its dependency to
go-ruleguard
seems to be broken after a package rename (See quasilyte/go-ruleguard#151).Go-critic
project also suggest using it undergolangci-lint
: https://github.com/go-critic/go-criticChecklist
make notice
in the proper directory)Author's Checklist