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

[FR]: Support clippy from rules_rust #385

Open
mrmeku opened this issue Sep 10, 2024 · 0 comments
Open

[FR]: Support clippy from rules_rust #385

mrmeku opened this issue Sep 10, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@mrmeku
Copy link
Contributor

mrmeku commented Sep 10, 2024

What is the current behavior?

Currently linting for rust is not supported by rules_lint. Rules_rust can run clippy, the rust linter, but it follows different idioms than rules_lint.

Describe the feature

Utilize the existing aspect from rules_rust to enable running clippy with rules_lint

To run clippy the rules_rust way you would augment your .bazelrc file with

# https://bazelbuild.github.io/rules_rust/rust_clippy.html
build --aspects=@rules_rust//rust:defs.bzl%rust_clippy_aspect
build --output_groups=+clippy_checks
build --@rules_rust//:clippy.toml=//:clippy.toml

We want to create a rules_lint shapped aspect that can be configured by

load("@aspect_rules_lint//lint:clippy.bzl", "lint_clippy_aspect")
eslint = lint_eslint_aspect(
    configs = "//:clippy.toml",
)

In so doing, we can enable rules_lint users to run clippy without augmenting their .bazelrc and leave requesting the clippy_checks output group to the aspect CLI or other mechanism to run rules_lint

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants