Skip to content

Support reading configuration from stdin #3739

Closed
@howardjohn

Description

@howardjohn

Your feature request related to a problem? Please describe.

We would like to read configuration from stdin. The reason is we want to deep merge a few configuration files with yq and pipe them in. This sort of works, but gives an error.

$ echo '' | golangci-lint run -c /dev/stdin
WARN [config_reader] Can't pretty print config file path: can't eval symlinks for path /dev/stdin: lstat /proc/688987/fd/pipe:[50935730]: no such file or directory

(in real world our command is not, echo, of course)

Describe the solution you'd like.

Support config from stdin without warning/error

Describe alternatives you've considered.

For our specific issue, passing multiple config files and having them deep merged would also be suitable. However, this may be complex as different folks have different meanings of "merge"

Additional context.

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: configRelated to .golangci.yml and/or cli optionsenhancementNew feature or improvement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions