You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ go install -v github.com/quasilyte/go-ruleguard/cmd/ruleguard@latest
$ cd some-big-go-repo # I chose the go-ruleguard repository
$ # the next command may complete without error, repeat until you see the stack trace
$ ruleguard -e 'm.Match("$x{}", "make($x)").Where(m["x"].Type.Is("map[$k]$v"))' ./...
This is the same trick we did with gogrep matcher.
The caller is supposed to pass the state that is not
shared between different threads.
For the most use cases, ruleguard has worker/runner based
concurrency, so it's easy to pass this state from the
worker that owns that state and doesn't share it with
other workers.
Also added some E2E tests that compile a ruleguard binary
with `-race` and run it using all test rules over the ruleguard
own source code. If any of these rules cause a data race,
this test fails.
To avoid the slower test times, I removed the `-race` from
the basic test as they do not involve any concurrent behavior
anyway, so it was just a waste of time.
Fixes#372Fixes#368
This is the same trick we did with gogrep matcher.
The caller is supposed to pass the state that is not
shared between different threads.
For the most use cases, ruleguard has worker/runner based
concurrency, so it's easy to pass this state from the
worker that owns that state and doesn't share it with
other workers.
Also added some E2E tests that compile a ruleguard binary
with `-race` and run it using all test rules over the ruleguard
own source code. If any of these rules cause a data race,
this test fails.
To avoid the slower test times, I removed the `-race` from
the basic test as they do not involve any concurrent behavior
anyway, so it was just a waste of time.
Fixes#372Fixes#368
To reproduce:
stack trace
The text was updated successfully, but these errors were encountered: