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

Upgrade go.mod to use most recent ruleguard v0.3.13 #297

Merged
merged 4 commits into from
Nov 3, 2021

Conversation

sebastien-rosset
Copy link
Contributor

@sebastien-rosset sebastien-rosset commented Nov 2, 2021

I ran the following script to update the dependencies. How about adding this script to the git repo?

set -ex
cd rules
go get github.com/quasilyte/go-ruleguard
go get github.com/quasilyte/go-ruleguard/dsl
go mod tidy
cd -
cd _test/regress/issue193
go get github.com/go-ruleguard/rg1
go mod tidy
cd -
cd cmd/gorules
go get github.com/quasilyte/go-ruleguard
go mod tidy
cd -
go get github.com/quasilyte/go-ruleguard/dsl
go get github.com/quasilyte/go-ruleguard/rules
go mod tidy

@quasilyte , doing this would help to reduce the number of entries in golangci-lint:
https://github.com/golangci/golangci-lint/blob/master/go.sum#L621-L627

@@ -3,7 +3,7 @@ module github.com/quasilyte/go-ruleguard/rules
go 1.15

require (
github.com/quasilyte/go-ruleguard v0.3.1-0.20210203134552-1b5a410e1cc8
github.com/quasilyte/go-ruleguard/dsl v0.3.0
github.com/quasilyte/go-ruleguard v0.3.13
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm unclear why go.sum still has the go-ruleguard/dsl v0.3.0 entry after the update:

github.com/quasilyte/go-ruleguard/dsl v0.3.0/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU=

@quasilyte
Copy link
Owner

It's unclear why _test/* things can affect people depending on the ruleguard in any way. I though Go ignores directories starting with _ even if they contain the Go code.

@sebastien-rosset
Copy link
Contributor Author

It's unclear why _test/* things can affect people depending on the ruleguard in any way. I though Go ignores directories starting with _ even if they contain the Go code.

You are right, maybe these commands can be removed, though presumably it does not hurt to update as well?

cd _test/regress/issue193
go get github.com/go-ruleguard/rg1
go mod tidy

@quasilyte
Copy link
Owner

I think their versions should be bumped too.
But I was trying to figure out the extent of the problem explained in the original message.

@quasilyte quasilyte merged commit 34f5283 into quasilyte:master Nov 3, 2021
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

Successfully merging this pull request may close these issues.

2 participants