Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Is it normal for golangci-lint to take ~20 mins to run?#1002

Unanswered
deqinganz asked this question inQ&A
Discussion options

We have a small module that configured golangci-lint to run when PR raised.

We found that cache restoring / saving took a long time. Here is an example:

The action took 18m 48s, where

  • Lint

"Restored cache for golangci-lint from key xxx in 692571ms"
"Ran golangci-lint in 3544ms"

  • Post Lint

"Saved cache for golangci-lint in 417064ms"

Is this normal? Or is there any configuration that we can tune to speed up?
(btw in GHA's cache I can see the golang-ci caches are around 2G~4G)

You must be logged in to vote

Replies: 2 comments 1 reply

Comment options

Just triedskip-cache: true and it only takes 17 seconds to run.

You must be logged in to vote
0 replies
Comment options

Please, provide the version of golangci-lint, go itself and your config.

You must be logged in to vote
1 reply
@deqinganz
Comment options

golangci-lint version: v1.54.2
go: 1.21

confg:

# https://golangci-lint.run/usage/configuration/---run:  timeout: 3m  skip-dirs:    - integration/stub/fixtures  skip-dirs-use-default: true  tests: falseissues:  exclude-use-default: true  fix: falseoutput:  sort-results: truelinters:  enable-all: true  disable:    - exhaustivestruct    - exhaustruct    - depguard    - dupl    - errorlint    - gochecknoglobals    - goerr113    - gomnd    - nlreturn    - noctx    - wrapcheck    - wsl    - maligned    - tagalign    - ireturn    - gofumpt         # Using goimports    - interfacer      # Deprecated as of v1.38.0    - scopelint       # Deprecated as of v1.39.0    - golint          # Deprecated as of v1.41.0    - ifshort         # Deprecated as of v1.48.0    - deadcode        # Deprecated as of v1.49.0    - varcheck        # Deprecated as of v1.49.0    - rowserrcheck    # is disabled because of go1.18    - sqlclosecheck   # is disabled because of go1.18    - structcheck     # is disabled because of go1.18    - wastedassign    # is disabled because of go1.18    - nosnakecase     # openAPI models use snakecaselinters-settings:  exhaustive:    default-signifies-exhaustive: true  gci:    sections:      - standard      - default      - prefix(github.com/myproject)      - blank    section-seperators:      - newLine  goimports:    local-prefixes: github.com/myproject/xplore  gomoddirectives:    replace-local: true    replace-allow-local: true    replace-allow-list:      - github.com/ugorji/go      - golang.org/x/crypto      - cloud.google.com/go/bigquery  importas:    no-unaliased: true    alias:      - pkg: github.com/sirupsen/logrus        alias: log      - pkg: github.com/myproject/xplore-pkg/http        alias: xhttp  staticcheck:    # SA4027 (*net/url.URL).Query returns a copy    # modifying it doesn't change the URL    checks:      - all      - -SA4027  varnamelen:    ignore-type-assert-ok: true    ignore-map-index-ok: true    ignore-chan-recv-ok: true    ignore-names:      - db    # Shorthand for database      - err   # Shorthand for error      - fn    # Shorthand for function      - id    # Shorthand for identifier      - it    # Shorthand for iterator      - tx    # Shorthand for transaction      - wg    # Shorthand for sync.WaitGroup      - i     # For-loop index      - j     # Nested-for-loop index      - v     # Shorthand for value
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Q&A
Labels
None yet
2 participants
@deqinganz@Antonboom

[8]ページ先頭

©2009-2025 Movatter.jp