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

Run custom error-prone checks without directly depending on library that exports them #6113

Closed
vmax opened this issue Sep 10, 2018 · 5 comments
Labels
P3 We're not considering working on this, but happy to review a PR. (No assignee) team-Rules-Java Issues for Java rules type: feature request

Comments

@vmax
Copy link
Contributor

vmax commented Sep 10, 2018

Description of the problem / feature request:

After writing a custom check for error-prone, I'd like to have it ran on all Java targets without explicily depending on it.

Feature requests: what underlying problem are you trying to solve with this feature?

Ensuring code is correct without checking that plugin was included in dependencies

Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

Here are the sources for custom check

What operating system are you running Bazel on?

macOS 10.13.6

What's the output of bazel info release?

release 0.14.1

Have you found anything relevant by searching the web?

I know I could make a java_library with exported_plugins but I'll have to ensure all of my targets are depending on it in order for check to be performed.

@vmax
Copy link
Contributor Author

vmax commented Sep 10, 2018

Quoting @oferb:

One option would be to apply it per directory. That way, we could more easily control whitelisting when gradually introducing new custom checks to the codebase.

@cushon
Copy link
Contributor

cushon commented Sep 10, 2018

@vmax there's some support for enabling the built-in checks based on a Bazel package pattern (e.g. //your/project/...): #3427 (comment)

It's currently harder to use that approach for custom checks, but we could improve that. Does that style of configuration look like it would work for your use-case?

@cushon cushon added the team-Rules-Java Issues for Java rules label Sep 10, 2018
@vmax
Copy link
Contributor Author

vmax commented Sep 14, 2018

@cushon this seems like a good start. As I understand, we can't enable custom checks from bazel's command line opts yet, right?

cc @oferb

@jin
Copy link
Member

jin commented Jan 14, 2019

@lberki could you add a priority to this issue, please?

@jin jin added the untriaged label Jan 14, 2019
@lberki lberki added the P3 We're not considering working on this, but happy to review a PR. (No assignee) label Feb 5, 2019
@lberki lberki removed the untriaged label Mar 14, 2019
@vmax vmax closed this as completed Jan 20, 2022
@guw
Copy link
Contributor

guw commented Mar 8, 2023

@vmax You closed the issue as completed. Can you share some insights how you implemented it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 We're not considering working on this, but happy to review a PR. (No assignee) team-Rules-Java Issues for Java rules type: feature request
Projects
None yet
Development

No branches or pull requests

5 participants