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

rule/argument-always-wildcard: End location is always the end of the line #915

Closed
charlieegan3 opened this issue Jul 15, 2024 · 5 comments
Closed
Labels
bug Something isn't working

Comments

@charlieegan3
Copy link
Member

There is this issue with the argument location:

screenshot_2024-07-12_at_11 49 37

I am not sure what the best fix is:

a) just highlight the arg itself is too small (we've avoided having single char items before)
b) highlighting the whole line is ambiguous
c) naming the violation title with the argument number involves changing the title of the violation to be templated...

Open to ideas, but I feel like what we have is better than a) & b) at least.

@charlieegan3 charlieegan3 added the bug Something isn't working label Jul 15, 2024
@anderseknert
Copy link
Member

I have a fix for this on a dev branch. Was planning to hold off on it until I had “back ported” end location awareness to all existing rules, but that turned out to be a LOT of work, lol, so I can push what I have done so far tonight 😊

@anderseknert
Copy link
Member

It’ll only highlight the wildcard btw, but it doesn’t look too bad when not at the start of line.

@charlieegan3
Copy link
Member Author

👍 thanks Anders. No rush, I don't think it's a must-have for the next release but if you get something up we can get it in.

@anderseknert
Copy link
Member

PR up in #917 ... it's very much just a start, but I think the implementation is sound... a ton of work ahead needed to backport all existing rules though, so that's something we'll need to collaborate on later.

Please do try it out in your LSP client of choice for the rules backported so far, and compare against main. IMHO, this is a huge improvement in that context, and I'm really keen to see this for all of our rules :)

@anderseknert
Copy link
Member

Fixed in #917 ... I think :) We can discuss later if there's a better way to highlight here than a single character, but at least it's correct, as opposed to highlighting the whole line after the arg.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants