Commit Graph

12 Commits

Author SHA1 Message Date
gillespi314
6fb3a87ae9
Enable errcheck linter for golangci-lint (#8899) 2022-12-05 16:50:49 -06:00
Lucas Manuel Rodriguez
1a6380d590
Fix deprecated virtual runner and golangci-lint deprecated checkers (#7716) 2022-09-13 10:48:21 -03:00
Roberto Dip
bfd98557f9
update golangci-lint version (#7115) 2022-08-09 15:42:35 -03:00
Michal Nicpon
d4be5ad2a1
add upgrade tests (#6596)
* add upgrade tests

* fix lint issues

go.mod

* remove req.cnf

* revert unrelated changes

* make version configurable in test

* fix golangci-lint ruleguard issue

Related to https://github.com/go-critic/go-critic/issues/1152
Need to have github.com/quasilyte/go-ruleguard/dsl

* fix lint issues

* fix

* clean up docker-compose.yml

* fix http request

* add readme

* fix lint issues

* address feedback

* fix

* add platform

* address feedback

* run go fmt
2022-07-19 15:11:51 -06:00
Tomas Touceda
7f8099db57
Add sandbox fleet serve config (#6619)
* Add sandbox fleet serve config

* Update docs

* Maybe fix lint issues

* Add lint dep
2022-07-12 18:21:15 -03:00
Lucas Manuel Rodriguez
4cfeaa1580
Do not use golangci action for better reproducibility (use make lint-go) (#6175)
* Do not use golangci action for better reproducibility

* Add fix to trigger build

* Fix all reported issues

* fix more lint errors

* Add missing import

* Remove unused method

* Remove change not necessary
2022-06-10 18:52:24 -03:00
Roberto Dip
894fa22c71
implement a thin wrapper around stdlib errors (#5733)
This solves #5679 , and also implements #5515, #5509 and lays the ground for #5516

With the introduction of Wrap, Is and As in the standard library, we've now got built-in support for wrapping.

On top of that, a common pattern in the community is to define errors tailored to the context of each project while still conforming to the error and Unwrap interfaces (see Upspin, Chromium)

The output now includes stack traces and additional info
2022-05-18 11:47:55 -03:00
Guillaume Ross
1884726f55
Adding gosec linter (#4437)
* Adding gosec linter

Adding gosec (Static application security testing) linter.

* Testing gosec exclusion in golangci-lint

G110 is being triggered - testing if exclude works, then will revert and leave the excludes section there for future needs.

Also adding some tests to exclude rules

* Update .golangci.yml

Testing gosec allow list of rules

* Update .golangci.yml

Trying gosec deny list of rules

* Update .golangci.yml

Reconfiguring G306 alert to use 644, less stringent, and adding every file with current warnings to exclusions. Once this is all buttoned up and running on NEW files, we will go back and address all issues or put a comment stating why the file is excluded here.

* Update .golangci.yml

Removing exclusion to see if lint now fails

* Update .golangci.yml

Removing most exclusions to test

* Update .golangci.yml

Removing 100% of exclusions for more testing

* Update .golangci.yml

Re-adding exclusions slowly and testing to be sure we only exclude what is needed

* Update .golangci.yml

Adding all exclusions and comments per category pointing to github issues for investigating and cleaning up over time.
2022-03-07 09:10:35 -05:00
Martin Angers
c997f853e5
Make creation of http.Client uniform across the codebase (#3097) 2021-11-24 15:56:54 -05:00
Martin Angers
69a4985cac
Use new error handling approach in other packages (#2954) 2021-11-22 09:13:26 -05:00
Martin Angers
3ae57a0242
Create errors with ctxerr, add the call to store them in redis (#2786) 2021-11-15 09:11:38 -05:00
Martin Angers
e61cb7e0db
Configure golangci-lint for the whole repository
Add a relatively minimal set of linters that raise safe and 
mostly un-opinionated issues with the code. It runs 
automatically on CI via a github action.
2021-08-24 13:35:03 -04:00