golines formatter: baseformatter option not available
Closed this issue · 3 comments
Welcome
- Yes, I'm using a binary release within 2 latest releases. Only such installations are supported.
- Yes, I've searched similar issues on GitHub and didn't find any.
- Yes, I've read the
typechecksection of the FAQ. - Yes, I've tried with the standalone linter if available (e.g., gocritic, go vet, etc.).
- I agree to follow this project's Code of Conduct
How did you install golangci-lint?
asdf/mise-en-place
Description of the problem
As of now the base-formatter option from golines is not available to modify via golangci lint.
Option documentation in the fork:
This means that we cannot use other formatters (like gofumpt), along with golines.
I see that in the integration file in this particular repo, the base command is hardcoded.
Can this option be propogated in the config so that we can use golines with other formatters as needed?
Version of golangci-lint
$ golangci-lint --version
# Paste output heregolangci-lint has version 2.6.0 built with go1.25.3 from fb09c37 on 2025-10-29T19:41:04Z
Configuration
# paste configuration file or CLI flags hereformatters:
enable:
- golines
exclusions:
paths:
- third_party$
- builtin$
settings:
golines:
# Shorten single-line comments.
# Default: false
shorten-comments: true
Go environment
$ go version && go env
# paste output herego version go1.25.3 linux/amd64
Verbose output of running
$ golangci-lint cache clean
$ golangci-lint run -v
# paste output hereNA
A minimal reproducible example or link to a public repository
// add your code hereNA
Validation
- Yes, I've included all information above (version, config, etc.).
Supporter
- I am a sponsor/backer through GitHub or OpenCollective
This means that we cannot use other formatters (like gofumpt), along with golines.
It's possible to enable gofumpt along with golines in config:
formatters:
enable:
- golines
- gofumpt
exclusions:
paths:
- third_party$
- builtin$
settings:
golines:
# Shorten single-line comments.
# Default: false
shorten-comments: trueHello,
Inside golangci-lint, the base formatter is hardcoded because other formatters are already available in golangci-lint. https://golangci-lint.run/docs/configuration/file/#formatters-configuration.
The base formatter is mainly a CLI option for golines.
This option doesn't make sense inside golangci-lint and will not be added.
Thank you for your response !