Skip to content

Commit

Permalink
setup
Browse files Browse the repository at this point in the history
  • Loading branch information
trapajim committed Apr 12, 2024
1 parent 5e566a1 commit 641ffa9
Show file tree
Hide file tree
Showing 3 changed files with 150 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

name: test-ci

on: [push]

jobs:
test:
needs: pre_job
runs-on: ubuntu-latest
steps:
- name: test
uses: trapajim/go-pipeline-action@v1
with:
go-version: '1.22.2'
go-vet: true
golangci-version: latest
go-test-flags: './... -v'
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@

# Go workspace file
go.work
.idea
.DS_STORE
131 changes: 131 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
run:
# Include test files or not.
# Default: true
tests: false
issues-exit-code: 2

# If set we pass it to "go list -mod={option}". From "go help modules":
# If invoked with -mod=readonly, the go command is disallowed from the implicit
# automatic updating of go.mod described above. Instead, it fails when any changes
# to go.mod are needed. This setting is most useful to check that go.mod does
# not need updates, such as in a continuous integration and testing system.
# If invoked with -mod=vendor, the go command assumes that the vendor
# directory holds the correct copies of dependencies and ignores
# the dependency descriptions in go.mod.
#
# Allowed values: readonly|vendor|mod
# By default, it isn't set.
modules-download-mode: readonly

# Define the Go version limit.
# Mainly related to generics support since go1.18.
# Default: use Go version from the go.mod file, fallback on the env var `GOVERSION`, fallback on 1.18
go: '1.18'

linters:
# Disable all linters.
# Default: false
disable-all: true
# Enable specific linter
# https://golangci-lint.run/usage/linters/#enabled-by-default
enable:
- typecheck
- errcheck
- ineffassign
- govet
- staticcheck
- gofmt
- cyclop
- asciicheck
- bidichk
- bodyclose
- contextcheck
- dupl
- errchkjson
- errorlint
- execinquery
- exhaustive
- exportloopref
- funlen
- gocognit
- gosec
- loggercheck
- makezero
- noctx
- reassign
- rowserrcheck
- sqlclosecheck
- nilerr
- durationcheck
- asasalint
- forbidigo
# - containedctx
# - deadcode
# - decorder
# - depguard
# - dogsled
# - dupword
# - errname
# - exhaustivestruct
# - exhaustruct
# - forcetypeassert
# - gci
# - gochecknoglobals
# - gochecknoinits
# - goconst
# - gocritic
# - gocyclo
# - godot
# - godox
# - goerr113
# - gofumpt
# - goheader
# - goimports
# - golint
# - gomnd
# - gomoddirectives
# - gomodguard
# - goprintffuncname
# - gosimple
# - grouper
# - ifshort
# - importas
# - interfacebloat
# - interfacer
# - ireturn
# - lll
# - maintidx
# - maligned
# - misspell
# - nakedret
# - nestif
# - nilnil
# - nlreturn
# - nolintlint
# - nonamedreturns
# - nosnakecase
# - nosprintfhostport
# - paralleltest
# - prealloc
# - predeclared
# - promlinter
# - revive
# - scopelint
# - structcheck
# - stylecheck
# - tagliatelle
# - tenv
# - testableexamples
# - testpackage
# - thelper
# - tparallel
# - unconvert
# - unparam
# - unused
# - usestdlibvars
# - varcheck
# - varnamelen
# - wastedassign
# - whitespace
# - wrapcheck
# - wsl

0 comments on commit 641ffa9

Please sign in to comment.