Skip to content

golangci-lint run config for outputs #378

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
radar07 opened this issue May 5, 2025 · 2 comments · Fixed by #386
Closed

golangci-lint run config for outputs #378

radar07 opened this issue May 5, 2025 · 2 comments · Fixed by #386
Labels
bug Something isn't working

Comments

@radar07
Copy link
Contributor

radar07 commented May 5, 2025

Describe the bug

A clear and concise description of what the bug is.

Affected version

Please run docker run -i --rm ghcr.io/github/github-mcp-server ./github-mcp-server --version and paste the output below

Steps to reproduce the behavior

  1. Run golangci-lint run with golangci version >= 2.

Expected vs actual behavior

Running golangci-lint run returns an error.

Error: can't load config: can't unmarshal config by viper (flags, file): 1 error(s) decoding:

* 'output.formats' expected a map, got 'string'
Failed executing command with error: can't load config: can't unmarshal config by viper (flags, file): 1 error(s) decoding:

* 'output.formats' expected a map, got 'string'

Logs

I'm trying to setup the project in my local machine by going through the CONTRIBUTING guide. And running golangci-lint run returns this error.

I noticed that the .golangci.yml was migrated to the latest config. Is migrating the config is the right thing to do?

@radar07 radar07 added the bug Something isn't working label May 5, 2025
@williammartin williammartin added bug Something isn't working and removed bug Something isn't working labels May 6, 2025
@williammartin
Copy link
Collaborator

golangci-lint version 2 is only 6 weeks old or so (https://github.com/golangci/golangci-lint/releases/tag/v2.0.0) and we haven't updated our CI from version 1 (https://github.com/github/github-mcp-server/blob/e56c096e398faf9cf49f528816c208d931f9d834/.github/workflows/lint.yaml)

I would welcome a PR that fixes this, and updates our CI and documentation to require golangci-lint version 2.

@radar07
Copy link
Contributor Author

radar07 commented May 6, 2025

I would love to raise a PR and am looking forward to some suggestions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants