feat: add ignore
This commit is contained in:
parent
22db9d53ec
commit
bf01882628
|
@ -0,0 +1,7 @@
|
|||
.idea/
|
||||
go.sum
|
||||
gen_result/
|
||||
etc/comment.yaml
|
||||
etc/comment.dev.yaml
|
||||
client/
|
||||
.DS_Store
|
|
@ -0,0 +1,134 @@
|
|||
run:
|
||||
timeout: 3m
|
||||
# Exit code when at least one issue was found.
|
||||
# Default: 1
|
||||
issues-exit-code: 2
|
||||
# Include test files or not.
|
||||
# Default: true
|
||||
tests: false
|
||||
|
||||
# Reference URL: https://golangci-lint.run/usage/linters/
|
||||
linters:
|
||||
# Disable everything by default so upgrades to not include new - default
|
||||
# enabled- linters.
|
||||
disable-all: true
|
||||
# Specifically enable linters we want to use.
|
||||
enable:
|
||||
# - depguard
|
||||
- errcheck
|
||||
# - godot
|
||||
- gofmt
|
||||
- goimports
|
||||
- gosimple
|
||||
- govet
|
||||
- ineffassign
|
||||
- misspell
|
||||
- revive
|
||||
- typecheck
|
||||
- unused
|
||||
- asasalint
|
||||
- asciicheck
|
||||
- bidichk
|
||||
- bodyclose
|
||||
- contextcheck
|
||||
- wastedassign
|
||||
- whitespace
|
||||
- thelper
|
||||
- tparallel
|
||||
- unconvert
|
||||
- unparam
|
||||
- usestdlibvars
|
||||
- tenv
|
||||
- testableexamples
|
||||
- stylecheck
|
||||
- sqlclosecheck
|
||||
- nosprintfhostport
|
||||
- paralleltest
|
||||
- prealloc
|
||||
- predeclared
|
||||
- promlinter
|
||||
- reassign
|
||||
- rowserrcheck
|
||||
- nakedret
|
||||
- nestif
|
||||
- nilerr
|
||||
- nilnil
|
||||
- nlreturn
|
||||
- noctx
|
||||
- nolintlint
|
||||
- nonamedreturns
|
||||
- decorder
|
||||
- dogsled
|
||||
- dupword
|
||||
- durationcheck
|
||||
- errchkjson
|
||||
- errname
|
||||
- errorlint
|
||||
# - execinquery
|
||||
- exhaustive
|
||||
- exportloopref
|
||||
- forbidigo
|
||||
- forcetypeassert
|
||||
- gochecknoinits
|
||||
- gocognit
|
||||
- goconst
|
||||
- gocritic
|
||||
- gocyclo
|
||||
- goheader
|
||||
- gomoddirectives
|
||||
- goprintffuncname
|
||||
- gosec
|
||||
- grouper
|
||||
- importas
|
||||
- interfacebloat
|
||||
- lll
|
||||
- loggercheck
|
||||
- maintidx
|
||||
- makezero
|
||||
|
||||
issues:
|
||||
exclude-rules:
|
||||
- path: _test\.go
|
||||
linters:
|
||||
- funlen
|
||||
- goconst
|
||||
- interfacer
|
||||
- dupl
|
||||
- lll
|
||||
- goerr113
|
||||
- errcheck
|
||||
- gocritic
|
||||
- cyclop
|
||||
- wrapcheck
|
||||
- gocognit
|
||||
- contextcheck
|
||||
|
||||
exclude-dirs:
|
||||
- internal/logic
|
||||
|
||||
exclude-files:
|
||||
- .*_test.go
|
||||
|
||||
|
||||
|
||||
linters-settings:
|
||||
gci:
|
||||
sections:
|
||||
- standard # Standard section: captures all standard packages.
|
||||
- default # Default section: contains all imports that could not be matched to another section type.
|
||||
gocognit:
|
||||
# Minimal code complexity to report.
|
||||
# Default: 30 (but we recommend 10-20)
|
||||
min-complexity: 40
|
||||
nestif:
|
||||
# Minimal complexity of if statements to report.
|
||||
# Default: 5
|
||||
min-complexity: 10
|
||||
lll:
|
||||
# Max line length, lines longer will be reported.
|
||||
# '\t' is counted as 1 character by default, and can be changed with the tab-width option.
|
||||
# Default: 120.
|
||||
line-length: 200
|
||||
# Tab width in spaces.
|
||||
# Default: 1
|
||||
tab-width: 1
|
|
@ -0,0 +1,71 @@
|
|||
version: "3.9"
|
||||
|
||||
services:
|
||||
app:
|
||||
image: igs170911/comment:v1.0.4
|
||||
container_name: app-service
|
||||
ports:
|
||||
- "8080:8080" # 替換為您的應用服務的公開端口
|
||||
depends_on:
|
||||
- mongo
|
||||
- etcd
|
||||
- redis
|
||||
environment:
|
||||
MONGO_URI: mongodb://mongo:27017/appdb
|
||||
ETCD_ENDPOINT: http://etcd:2379
|
||||
REDIS_HOST: redis
|
||||
REDIS_PORT: 6379
|
||||
networks:
|
||||
- app-network
|
||||
|
||||
mongo:
|
||||
image: mongo:8.0
|
||||
container_name: mongo
|
||||
restart: always
|
||||
ports:
|
||||
- "27017:27017"
|
||||
environment:
|
||||
MONGO_INITDB_ROOT_USERNAME: root
|
||||
MONGO_INITDB_ROOT_PASSWORD: example
|
||||
networks:
|
||||
- app-network
|
||||
volumes:
|
||||
- mongo-data:/data/db
|
||||
|
||||
etcd:
|
||||
image: quay.io/coreos/etcd:v3.5.5
|
||||
container_name: etcd
|
||||
restart: always
|
||||
command: >
|
||||
/usr/local/bin/etcd
|
||||
--data-dir=/etcd-data
|
||||
--name=etcd
|
||||
--listen-client-urls=http://0.0.0.0:2379
|
||||
--advertise-client-urls=http://etcd:2379
|
||||
ports:
|
||||
- "2379:2379"
|
||||
- "2380:2380"
|
||||
networks:
|
||||
- app-network
|
||||
volumes:
|
||||
- etcd-data:/etcd-data
|
||||
|
||||
redis:
|
||||
image: redis:7.0
|
||||
container_name: redis
|
||||
restart: always
|
||||
ports:
|
||||
- "6379:6379"
|
||||
networks:
|
||||
- app-network
|
||||
volumes:
|
||||
- redis-data:/data
|
||||
|
||||
networks:
|
||||
app-network:
|
||||
driver: bridge
|
||||
|
||||
volumes:
|
||||
mongo-data:
|
||||
etcd-data:
|
||||
redis-data:
|
Loading…
Reference in New Issue