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

bazel: provide way to run lint in bazel #65518

Merged
merged 1 commit into from
May 27, 2021

Commits on May 27, 2021

  1. bazel: provide way to run lint in bazel

    With this patch, lints can be run with `bazel run build/bazelutil:lint`.
    The test binary takes the typical Go command-line arguments, so e.g.
    `bazel run build/bazelutil:lint -- -test.v`.
    
    We model this as a `sh_binary` that depends on the lint test binary as
    well as all the dependencies that it has (`roachvet`, `crlfmt`, and
    others). The shell script is a light wrapper that finds the actual
    location of all the dependencies and stages them all in the `PATH`
    appropriately. We also need to munge `LDFLAGS` because the linter calls
    into the compiler in a couple places, and `cgo` wants to link into some
    of the C libraries (`libedit`, `libproj`, etc.)
    
    There are a couple tests that are still broken, which are skipped for
    now. As a next step, we'll want to get this running in CI.
    
    Closes cockroachdb#61555
    
    Release note: None
    rickystewart committed May 27, 2021
    Configuration menu
    Copy the full SHA
    155a8fa View commit details
    Browse the repository at this point in the history