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

Add module option to lint and breaking rules #65

Merged
merged 2 commits into from
May 22, 2024
Merged

Conversation

srikrsna-buf
Copy link
Member

Related to #63. This adds support for the module option introduced in the plugin versions v1.32.1. Users need to specify the module option to specify which module rules to apply for a given target.

With v1, the rule expects the config of the current module:

buf_lint_test(
    name = "bar_proto_lint",
    config = "//barapis:buf.yaml", # Config of the current module located at `barapis` directory
    targets = [":bar_proto"],
)

With v2 we refer to the root buf.yaml and specify the module that the current proto target belongs to:

buf_lint_test(
    name = "bar_proto_lint",
    config = "//:buf.yaml", # The root `buf.yaml`
    module = "barapis", # The path or full module name that this target belongs to
    targets = [":bar_proto"],
)

@srikrsna-buf srikrsna-buf requested a review from emcfarlane May 22, 2024 09:56
@srikrsna-buf srikrsna-buf changed the title Add module option to lint and breaking rules. Add module option to lint and breaking rules May 22, 2024
@srikrsna-buf srikrsna-buf merged commit 6a38b28 into main May 22, 2024
6 of 7 checks passed
@srikrsna-buf srikrsna-buf deleted the sk/v2/config branch May 22, 2024 11:42
@srikrsna-buf srikrsna-buf mentioned this pull request May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants