Skip to content
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

How to pass config file in lint-action? #26

Closed
kushthedude opened this issue Jun 15, 2020 · 5 comments
Closed

How to pass config file in lint-action? #26

kushthedude opened this issue Jun 15, 2020 · 5 comments

Comments

@kushthedude
Copy link

kushthedude commented Jun 15, 2020

Question

How do I pass the .golangci-lint.yml the configuration file in the following action?

@bombsimon
Copy link
Member

Put your config named .golangci.yml according to the docs in the root of your project and the action will use that. This is because golangci-lint will look for config files in all directories from the directory of the first analyzed path up to the root.

If you want to name it something else or store it somewhere else you can use args: --config=/path/to/.golangci-lint.yml in your action.

@kushthedude
Copy link
Author

Thanks @bombsimon , It was not mentioned in the actions readme.

@emil14
Copy link

emil14 commented Aug 1, 2021

Put your config named .golangci.yml according to the docs in the root of your project

It would be great if we could add this to README.md because it's not clear

@bombsimon
Copy link
Member

bombsimon commented Aug 1, 2021

It is mentioned here, is there anything that needs to be clearer?

Since this is not specific for the action but rather the binary run in the action I think this is enough. However, maybe we could mention that the action just runs the binary and all docs and configs is the same for the action with a link to these docs?

@emil14
Copy link

emil14 commented Aug 1, 2021

However, maybe we could mention that the action just runs the binary and all docs and configs is the same for the action with a link to these docs?

It would be great! Documentation is never too clear :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants