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 rule.AttrComments func #1394

Closed
wants to merge 1 commit into from
Closed

Conversation

pcj
Copy link
Contributor

@pcj pcj commented Dec 15, 2022

What type of PR is this?

Feature

What package or component does this PR mostly affect?

all

What does this PR do? Why is it needed?

Allows programmatic access to the assignment expression comments.

Which issues(s) does this PR fix?

Fixes #1389

@achew22
Copy link
Member

achew22 commented Dec 17, 2022

@pcj I think this is a lot more in line with what I would have expected. That said, it still has us exporting a non-primitive type from another package into our public API. Not asking you to do any code writing on this front, but curious about a couple of things.

  • Is this a situation where we'd benefit from a rule.AddComment method? To me that seems even more discoverable as an API surface than AttrComments?
  • Do you have more precise manipulation you're looking for here? Do you have maybe an example of the before/after that you're looking to get?

@kusaeva
Copy link

kusaeva commented Oct 26, 2023

Hi @pcj!
Could you please rebase the PR to make a patch applicable for the latest version of bazel-gazelle?

@fmeum
Copy link
Member

fmeum commented Dec 28, 2023

This was done in #1700

@pcj
Copy link
Contributor Author

pcj commented Jan 3, 2024

Glad to see this was finally merged, thanks.

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.

Rule API: can't access the assigment statements
4 participants