mirror of
https://github.com/foomo/keel.git
synced 2025-10-16 12:35:34 +00:00
chore: fix needs
This commit is contained in:
parent
b3cf575dad
commit
54b4154426
51
.github/linters/.golangci.yml
vendored
Normal file
51
.github/linters/.golangci.yml
vendored
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
linters-settings:
|
||||||
|
gci:
|
||||||
|
local-prefixes: github.com/foomo/keel
|
||||||
|
revive:
|
||||||
|
rules:
|
||||||
|
- name: indent-error-flow
|
||||||
|
disabled: true
|
||||||
|
gocritic:
|
||||||
|
enabled-tags:
|
||||||
|
- diagnostic
|
||||||
|
- performance
|
||||||
|
- style
|
||||||
|
disabled-tags:
|
||||||
|
- experimental
|
||||||
|
- opinionated
|
||||||
|
disabled-checks:
|
||||||
|
- ifElseChain
|
||||||
|
settings:
|
||||||
|
hugeParam:
|
||||||
|
sizeThreshold: 512
|
||||||
|
|
||||||
|
linters:
|
||||||
|
enable:
|
||||||
|
- bodyclose
|
||||||
|
- dogsled
|
||||||
|
- dupl
|
||||||
|
- exhaustive
|
||||||
|
- exportloopref
|
||||||
|
- gci
|
||||||
|
- goconst
|
||||||
|
- gocritic
|
||||||
|
- gocyclo
|
||||||
|
- gofmt
|
||||||
|
- goprintffuncname
|
||||||
|
- gosec
|
||||||
|
- ifshort
|
||||||
|
- misspell
|
||||||
|
- nakedret
|
||||||
|
- noctx
|
||||||
|
- nolintlint
|
||||||
|
- prealloc
|
||||||
|
- revive
|
||||||
|
- promlinter
|
||||||
|
- rowserrcheck
|
||||||
|
- sqlclosecheck
|
||||||
|
- stylecheck
|
||||||
|
- thelper
|
||||||
|
- tparallel
|
||||||
|
- unconvert
|
||||||
|
- unparam
|
||||||
|
- whitespace
|
||||||
18
.github/workflows/checks.yml
vendored
18
.github/workflows/checks.yml
vendored
@ -1,14 +1,19 @@
|
|||||||
|
# This workflow runs all dockerfiles in this repo
|
||||||
name: checks
|
name: checks
|
||||||
|
|
||||||
on: [push, workflow_dispatch]
|
on:
|
||||||
|
# Triggers the workflow on push or pull request events but only for the main branch
|
||||||
|
push:
|
||||||
|
# Allows you to run this workflow manually from the Actions tab
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
GO_VERSION: 1.17
|
GO_VERSION: 1.17
|
||||||
GOLANGCI_LINT_VERSION: v1.43.0
|
GOLANGCI_LINT_VERSION: v1.43.0
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
go-matrix:
|
go_matrix:
|
||||||
name: Resolve Modules
|
name: go matrix
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
||||||
@ -19,11 +24,12 @@ jobs:
|
|||||||
matrix=$(find . -type f -name "go.mod" -printf "{\"folder\":\"%h\"}," | sed -e 's/,$//')
|
matrix=$(find . -type f -name "go.mod" -printf "{\"folder\":\"%h\"}," | sed -e 's/,$//')
|
||||||
echo "Matrix: $matrix"
|
echo "Matrix: $matrix"
|
||||||
echo ::set-output name=matrix::{\"include\":[$(echo $matrix)]}
|
echo ::set-output name=matrix::{\"include\":[$(echo $matrix)]}
|
||||||
go-lint:
|
go_lint:
|
||||||
name: lint
|
name: go lint
|
||||||
|
needs: go_matrix
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix: ${{ fromJson(needs.go-matrix.outputs.matrix) }}
|
matrix: ${{ fromJson(needs.go_matrix.outputs.matrix) }}
|
||||||
env:
|
env:
|
||||||
GOFLAGS: -mod=readonly
|
GOFLAGS: -mod=readonly
|
||||||
GOPROXY: https://proxy.golang.org
|
GOPROXY: https://proxy.golang.org
|
||||||
|
|||||||
@ -1,15 +1,12 @@
|
|||||||
|
# Minimum golangci-lint version required: v1.42.0
|
||||||
run:
|
run:
|
||||||
timeout: 5m
|
timeout: 3m
|
||||||
skip-dirs:
|
skip-dirs:
|
||||||
- tmp
|
- tmp
|
||||||
|
|
||||||
linters-settings:
|
linters-settings:
|
||||||
gci:
|
gci:
|
||||||
local-prefixes: github.com/foomo/keel
|
local-prefixes: github.com/foomo/keel
|
||||||
golint:
|
|
||||||
min-confidence: 0
|
|
||||||
goimports:
|
|
||||||
local-prefixes: github.com/foomo/keel
|
|
||||||
revive:
|
revive:
|
||||||
rules:
|
rules:
|
||||||
- name: indent-error-flow
|
- name: indent-error-flow
|
||||||
@ -27,70 +24,34 @@ linters-settings:
|
|||||||
settings:
|
settings:
|
||||||
hugeParam:
|
hugeParam:
|
||||||
sizeThreshold: 512
|
sizeThreshold: 512
|
||||||
lll:
|
|
||||||
line-length: 150
|
|
||||||
|
|
||||||
linters:
|
linters:
|
||||||
disable-all: true
|
|
||||||
enable:
|
enable:
|
||||||
- bodyclose
|
- bodyclose
|
||||||
- deadcode
|
|
||||||
- dogsled
|
- dogsled
|
||||||
- dupl
|
- dupl
|
||||||
- exhaustive
|
- exhaustive
|
||||||
- exportloopref
|
- exportloopref
|
||||||
- gci
|
- gci
|
||||||
- goconst
|
- goconst
|
||||||
|
- gocritic
|
||||||
|
- gocyclo
|
||||||
- gofmt
|
- gofmt
|
||||||
- gofumpt
|
|
||||||
- goimports
|
|
||||||
- revive
|
|
||||||
- goprintffuncname
|
- goprintffuncname
|
||||||
- govet
|
- gosec
|
||||||
- ineffassign
|
- ifshort
|
||||||
- misspell
|
- misspell
|
||||||
- nakedret
|
- nakedret
|
||||||
- noctx
|
- noctx
|
||||||
- nolintlint
|
- nolintlint
|
||||||
- prealloc
|
- prealloc
|
||||||
|
- revive
|
||||||
|
- promlinter
|
||||||
- rowserrcheck
|
- rowserrcheck
|
||||||
- sqlclosecheck
|
- sqlclosecheck
|
||||||
- staticcheck
|
|
||||||
- structcheck
|
|
||||||
- stylecheck
|
- stylecheck
|
||||||
- typecheck
|
- thelper
|
||||||
|
- tparallel
|
||||||
- unconvert
|
- unconvert
|
||||||
- unparam
|
- unparam
|
||||||
- unused
|
|
||||||
- varcheck
|
|
||||||
- whitespace
|
- whitespace
|
||||||
- errcheck
|
|
||||||
- gocritic
|
|
||||||
- gosimple
|
|
||||||
|
|
||||||
- gocyclo
|
|
||||||
- gosec
|
|
||||||
- lll
|
|
||||||
- exportloopref
|
|
||||||
|
|
||||||
# unused
|
|
||||||
# - godot
|
|
||||||
# - gocognit
|
|
||||||
# - nlreturn
|
|
||||||
# - gochecknoglobals
|
|
||||||
# - gochecknoinits
|
|
||||||
# - depguard
|
|
||||||
# - goheader
|
|
||||||
# - gomodguard
|
|
||||||
|
|
||||||
# don't enable:
|
|
||||||
# - asciicheck
|
|
||||||
# - funlen
|
|
||||||
# - godox
|
|
||||||
# - goerr113
|
|
||||||
# - gomnd
|
|
||||||
# - interfacer
|
|
||||||
# - maligned
|
|
||||||
# - nestif
|
|
||||||
# - testpackage
|
|
||||||
# - wsl
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user