-
Hi, Do you see any problem with command below and the reason why it runs soooo slow? Thanks docker run \
--rm \
--tty \
--workdir /source \
--volume ${PWD}:/source:ro \
--volume ${PWD}/tmp/golangci:/root/.cache:rw \
golangci/golangci-lint:v1.60.3 golangci-lint run --verbose --config golangci.yaml INFO golangci-lint has version 1.60.3 built with go1.23.0 from c2e095c0 on 2024-08-22T21:51:56Z
INFO [config_reader] Used config file golangci.yaml
INFO [lintersdb] Active 50 linters: [asciicheck bidichk bodyclose containedctx decorder dogsled dupl durationcheck errcheck errname errorlint exhaustive forbidigo forcetypeassert funlen gochecknoglobals gochecknoinits gocognit goconst gocritic gocyclo godot goimports gosec gosimple govet ineffassign interfacebloat lll makezero misspell nakedret nestif nilerr nilnil nlreturn noctx nonamedreturns prealloc rowserrcheck sloglint sqlclosecheck stylecheck tenv unconvert unparam unused usestdlibvars wastedassign whitespace]
INFO [loader] Go packages loading at mode 575 (deps|exports_file|files|imports|compiled_files|name|types_sizes) took 38.010156635s
INFO [runner/filename_unadjuster] Pre-built 0 adjustments in 155.602521ms
INFO [linters_context/goanalysis] analyzers took 5m28.949602817s with top 10 stages: buildir: 2m16.073312749s, exhaustive: 40.022216746s, printf: 33.911185s, ctrlflow: 33.010373316s, fact_purity: 23.831024044s, bidichk: 9.075444414s, wastedassign: 7.982315882s, dupl: 5.634203254s, gocritic: 5.360372371s, goimports: 4.725916441s
INFO [runner] Issues before processing: 214, after processing: 0
INFO [runner] Processors filtering stat (in/out): skip_files: 214/214, skip_dirs: 214/214, exclude: 85/85, filename_unadjuster: 214/214, exclude-rules: 85/0, invalid_issue: 214/214, path_prettifier: 214/214, identifier_marker: 85/85, cgo: 214/214, autogenerated_exclude: 214/85
INFO [runner] processing took 440.312744ms with stages: path_prettifier: 315.281196ms, autogenerated_exclude: 116.739199ms, identifier_marker: 5.144875ms, exclude-rules: 2.400753ms, skip_dirs: 591.211µs, invalid_issue: 96.411µs, cgo: 24.371µs, filename_unadjuster: 16.628µs, nolint: 5.708µs, sort_results: 5.537µs, uniq_by_line: 1.245µs, skip_files: 1.035µs, max_same_issues: 949ns, fixer: 932ns, exclude: 766ns, source_code: 719ns, max_from_linter: 417ns, path_shortener: 238ns, diff: 212ns, max_per_file_from_linter: 124ns, path_prefixer: 112ns, severity-rules: 106ns
INFO [runner] linters took 1m8.075126192s with stages: goanalysis_metalinter: 1m7.631139507s
INFO File cache stats: 58 entries of total size 103.0KiB
INFO Memory: 917 samples, avg is 215.8MB, max is 464.4MB
INFO Execution took 1m46.282639685s $ tree tmp/
tmp/
├── golangci
│ ├── 00
│ │ ├── 000ab77b0ae7fe5ddc06f61d80dd9c8bc4fcc5a999479869292c216e7bfa2e1e-d
│ │ ├── ....
│ │ └── 00dedcbaf5dd36c49447863279d4bf0649eb1838d56074e8076fc688dff92fca-d
│ ├── 01
│ │ ├── 01140c8cf7100baa02be88890391dc695717b5cc4895d160e9fc29fd84d984b0-d
.... run:
concurrency: 4
timeout: 5m
tests: true
modules-download-mode: readonly
allow-parallel-runners: true
go: "1.23.0"
output:
sort-results: true
linters-settings:
decorder:
dec-order:
- const
- var
- type
- func
errcheck:
check-blank: true
exclude-functions:
- (github.com/jackc/pgx/v5.Tx).Rollback(context.Context)
- (*github.com/me/pkg/xrest.Response).Write
funlen:
lines: 100
statements: 50
gocognit:
min-complexity: 20
gocyclo:
min-complexity: 20
misspell:
locale: UK
nestif:
min-complexity: 2
sloglint:
context: "all"
static-msg: true
args-on-sep-lines: true
forbidden-keys:
- time
- level
- message
- log.time
- log.level
- log.message
- log.caller
- svc.name
- svc.env
- svc.ver
linters:
disable-all: true
enable:
- asciicheck
- bidichk
- bodyclose
- containedctx
- decorder
- dogsled
- dupl
- durationcheck
- errcheck
- errname
- errorlint
- exhaustive
- forbidigo
- forcetypeassert
- funlen
- gochecknoglobals
- gochecknoinits
- gocognit
- goconst
- gocritic
- gocyclo
- godot
- goimports
- gosimple
- gosec
- govet
- ineffassign
- interfacebloat
- lll
- makezero
- misspell
- nakedret
- nestif
- nilerr
- nilnil
- nlreturn
- noctx
- nonamedreturns
- rowserrcheck
- prealloc
- sloglint
- sqlclosecheck
- stylecheck
- tenv
- typecheck
- unconvert
- unparam
- unused
- usestdlibvars
- wastedassign
- whitespace
issues:
max-issues-per-linter: 0
max-same-issues: 0
exclude-rules:
- path: main.go
linters:
- forbidigo
- funlen
- sloglint
- path: _test.go
linters:
- funlen |
Beta Was this translation helpful? Give feedback.
Answered by
ldez
Sep 9, 2024
Replies: 1 comment 4 replies
-
I can see several elements:
|
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This element
--volume ${PWD}/tmp/golangci:/root/.cache:rw
implies this:And because
--volume ${PWD}:/source:ro
, the${PWD}/tmp/golangci
folder is also 2 times inside the container:So
tmp
folder is inside the project, like the other project files.You should remove this folder and using something like that:
docker run \ --rm \ --tty \ --workdir /source \ --volume ${PWD}:/source:ro \ --volume /t…