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

Update No Ref Siblings to Use Rolodex #543

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

califlower
Copy link

@califlower califlower commented Sep 6, 2024

Note: This is my first contribution, so if you want something a particular way please let me know! I tried to keep everything as consistent as possible between the changes

  1. Updates the No Ref Siblings component to use the Rolodex in order to properly traverse all referenced files.
  2. Adds in the origin field to the rule result otherwise it wasn't possible to get the file in which the rule was used in. I used idx.FindNodeOrigin(val) instead of idx.FindNode(key) because using the key returned nil each time.

I can add a test for this if needed, but I wasn't sure how to test the No Ref Siblings rule for multiple files.

Fixes:

Remove extra spacing between lines

Add whitespace to match original file
Copy link
Owner

@daveshanley daveshanley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is good! thank you for fixing this.

@daveshanley
Copy link
Owner

daveshanley commented Nov 21, 2024

@califlower - Would you be able to rebase, I would like to add this!

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