-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added golangci-lint and multiple fixes for all kind of checks
The most important: * Added golangci to github workflow * Bumped version of go to 1.22 to fix for loops vars * Removed cluster logic since dead code and better one in #30 * Fixed unauthorized access to application resource * Fixed not checked user struct type conversion in API * Multiple security and style fixes
- Loading branch information
Showing
48 changed files
with
548 additions
and
875 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
run: | ||
concurrency: 4 | ||
timeout: 10m | ||
tests: false | ||
allow-parallel-runners: true | ||
allow-serial-runners: true | ||
|
||
output: | ||
show-stats: true | ||
|
||
linters: | ||
# Disable all linters. | ||
# Default: false | ||
disable-all: true | ||
# Enable specific linter | ||
# https://golangci-lint.run/usage/linters/#enabled-by-default | ||
enable: | ||
- asasalint | ||
- asciicheck | ||
- bidichk | ||
- bodyclose | ||
- canonicalheader | ||
- containedctx | ||
- contextcheck | ||
- copyloopvar | ||
#- cyclop | ||
- decorder | ||
#- depguard | ||
- dogsled | ||
#- dupl | ||
- dupword | ||
- durationcheck | ||
#- err113 | ||
#- errcheck # Maybe in the future? | ||
- errchkjson | ||
- errname | ||
#- errorlint | ||
- exhaustive | ||
#- exhaustruct | ||
- fatcontext | ||
#- forbidigo | ||
- forcetypeassert | ||
#- funlen | ||
#- gci | ||
- ginkgolinter | ||
- gocheckcompilerdirectives | ||
#- gochecknoglobals | ||
#- gochecknoinits | ||
- gochecksumtype | ||
#- gocognit | ||
#- goconst | ||
#- gocritic | ||
#- gocyclo | ||
#- godot | ||
#- godox | ||
- gofmt | ||
#- gofumpt | ||
- goheader | ||
- goimports | ||
- gomoddirectives | ||
- gomodguard | ||
- goprintffuncname | ||
- gosec | ||
- gosimple | ||
- gosmopolitan | ||
- govet | ||
- grouper | ||
- importas | ||
- inamedparam | ||
- ineffassign | ||
- interfacebloat | ||
- intrange | ||
#- ireturn | ||
#- lll | ||
- loggercheck | ||
#- maintidx | ||
- makezero | ||
- mirror | ||
- misspell | ||
#- mnd | ||
- musttag | ||
#- nakedret | ||
#- nestif | ||
- nilerr | ||
#- nilnil | ||
#- nlreturn | ||
- noctx | ||
- nolintlint | ||
#- nonamedreturns | ||
- nosprintfhostport | ||
- paralleltest | ||
#- perfsprint | ||
#- prealloc | ||
- predeclared | ||
- promlinter | ||
- protogetter | ||
- reassign | ||
#- revive # not supporting snake_case for vars | ||
- rowserrcheck | ||
- sloglint | ||
- spancheck | ||
- sqlclosecheck | ||
- staticcheck | ||
#- stylecheck | ||
- tagalign | ||
#- tagliatelle | ||
- tenv | ||
- testableexamples | ||
- testifylint | ||
- testpackage | ||
- thelper | ||
- tparallel | ||
- typecheck | ||
- unconvert | ||
- unparam | ||
- unused | ||
- usestdlibvars | ||
#- varnamelen | ||
- wastedassign | ||
- whitespace | ||
#- wrapcheck | ||
#- wsl | ||
- zerologlint | ||
|
||
linters-settings: | ||
gosec: | ||
excludes: | ||
- G115 # integer overflow conversion - disabled due to found no proper way to fix those |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.