feat(ci): add CI pipeline with linting, building, and testing jobs

This commit is contained in:
Avinash Sridhar 2025-05-27 13:44:56 -04:00 • committed by Toby Padilla
commit 9d0565de62

122
.golangci.yml Normal file
View file

@ -0,0 +1,122 @@
# GolangCI-Lint configuration
# See: https://golangci-lint.run/usage/configuration/
run:
timeout: 5m
modules-download-mode: readonly
linters:
enable:
- errcheck
- gosimple
- govet
- ineffassign
- staticcheck
- typecheck
- unused
- asasalint
- asciicheck
- bidichk
- bodyclose
- containedctx
- contextcheck
- cyclop
- dupl
- durationcheck
- errname
- errorlint
- execinquery
- exhaustive
- exportloopref
- forbidigo
- funlen
- gci
- gocognit
- goconst
- gocritic
- gocyclo
- godox
- gofmt
- goimports
- gomnd
- gomoddirectives
- gomodguard
- goprintffuncname
- gosec
- grouper
- importas
- ireturn
- lll
- makezero
- misspell
- nakedret
- nestif
- nilerr
- nilnil
- noctx
- nolintlint
- nosnakecase
- nosprintfhostport
- predeclared
- promlinter
- reassign
- revive
- rowserrcheck
- sqlclosecheck
- stylecheck
- tenv
- testpackage
- thelper
- tparallel
- unconvert
- unparam
- usestdlibvars
- wastedassign
- whitespace
linters-settings:
cyclop:
max-complexity: 15
funlen:
lines: 100
statements: 50
gocognit:
min-complexity: 15
gocyclo:
min-complexity: 15
goconst:
min-len: 3
min-occurrences: 3
gomnd:
checks:
- argument
- case
- condition
- operation
- return
lll:
line-length: 120
misspell:
locale: US
nestif:
min-complexity: 8
issues:
exclude-rules:
# Exclude some linters from running on tests files.
- path: _test\.go
linters:
- gomnd
- funlen
- gocyclo
- errcheck
- dupl
- gosec
# Ignore long lines in generated code
- path: docs/
linters:
- lll
# Ignore magic numbers in test files
- path: integrationtests/
linters:
- gomnd