Golangci-lint for multi-root project
I have a project with number of services (git repos). Each of them has it's own .golangci.yml file. How can I setup linter to run with settings file from it's repository root directory? I'm using file watcher (Settings / Tools / File Watchers) to run linter on save with the following parameters:
Program: golangci-lint
Arguments: run --fast
My project structure:
/project/
/service-1/
/.golangci.yml
/service-2/
/.golangci.yml
Maybe there is a variable like $ProjectFileDir$ but for root directory?
Please sign in to leave a comment.
You can configure a file watcher per-service specifying a corresponding scope. In this case, each file watcher will have its own working directory. Does it work for you?
With file watcher per service I would have to add file watcher each time I add a service in my project. I hoped there is an easier way of doing it.
But yes, it will work for me. Thanks for your help.