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

ruleguard/typematch: use external matcher state #374

Merged
merged 1 commit into from Jan 30, 2022

Commits on Jan 30, 2022

  1. ruleguard/typematch: use external matcher state

    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 #372
    Fixes #368
    quasilyte committed Jan 30, 2022
    Copy the full SHA
    16cf7f2 View commit details
    Browse the repository at this point in the history