-
Notifications
You must be signed in to change notification settings - Fork 42
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
Shouldn't github.com/quasilinte/go-ruleguard/ruleguard
import github.com/quasilyte/go-ruleguard/dsl
? 🤔
#224
Comments
github.com/quasilinte/go-ruleguard/ruleguard
import github.com/quasilyte/go-ruleguard/dsl
? 🤔 github.com/quasilinte/go-ruleguard/ruleguard
import github.com/quasilyte/go-ruleguard/dsl
? 🤔
Hmm. I need to think about it. I don't want every user to have But if someone is already using @cristaloleg do you have any thoughts on this? |
We can add |
As far as I can see it totally makes sense: I don’t get @cristaloleg response since a |
I came here to +1. We spent hours trying to figure out why golangci-lint was not running ruleguard. This is why. |
I think it won't work for golangci-lint to include But as it's no GOPATH era anymore, Go modules are separate contexts. When you're checking a project with golangci-lint, package lookup depends on that very module context, so it will have to include Any technical ( |
Is there any other way to use ruleguard check my project code without modifying the go.mod file in the project. |
It is stated in the README.md that it is required to run
go get -v -u github.com/quasilyte/go-ruleguard/dsl
before the use of ruleguard.Programs that utilize ruleguard using the
github.com/quasilinte/go-ruleguard/ruleguard
package (likego-critic
orgolangci-lint
) certainly not called the previous mentionedgo get
command. Therefore it would be necessary for users to run thego get
by themself before running one of these programs.In a dockerzied version of these programs this becomes more difficult.
A solution would be that those programs import
github.com/quasilyte/go-ruleguard/dsl
, however I feel it would be better thatgithub.com/quasilinte/go-ruleguard/ruleguard
should import thedsl
package by itself and therefore the programs have everything ready by design.The text was updated successfully, but these errors were encountered: