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

How to rungolangci-lint fmt?#1216

Answeredbyldez
eafzali asked this question inQ&A
Discussion options

I understand that now the formatters are separated and should be run withgolangci-lint fmt how should I run it using this Github Action?

You must be logged in to vote
Answered by ldezApr 1, 2025

Hello,

You don't need to rungolangci-lint fmt with the github action because the formatters are run as linter by the commandgolangci-lint run.

Replies: 1 comment 3 replies

Comment options

ldez
Apr 1, 2025
Maintainer

Hello,

You don't need to rungolangci-lint fmt with the github action because the formatters are run as linter by the commandgolangci-lint run.

You must be logged in to vote
3 replies
@eafzali
Comment options

But what if I want to only run the formatters for a specific workflow. We used to use--enable-only gci,gofmt --fix flag to do so, which I guess we could still do, but would be nice to have aformatters-only option or something, so it would automatically pick up the enabled formatters in the config file.

@hf-kklein

This comment was marked as off-topic.

@ldez
Comment options

ldezApr 3, 2025
Maintainer

No need to callgofmt manually, just do that (aftergolangci/golangci-lint-action@v7 step):

      -name:fmtrun:golangci-lint fmt --diff --enable gofmt

But I recommend using a configuration file instead.

Answer selected byldez
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Q&A
Labels
None yet
3 participants
@eafzali@ldez@hf-kklein

[8]ページ先頭

©2009-2025 Movatter.jp