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

plugin marks whole file as warning #173

Closed
ArtsiomCh opened this issue Jun 3, 2022 · 3 comments · Fixed by #174
Closed

plugin marks whole file as warning #173

ArtsiomCh opened this issue Jun 3, 2022 · 3 comments · Fixed by #174
Labels
bug Something isn't working

Comments

@arturbosch
Copy link
Member

Thanks for the report.

This one seems easy to fix but is a bit tricky.
Normally we would just check if the reported KtElement of the detekt finding is a KtFile and act accordingly but as the kotlin intellij plugin is based on kotlin-compiler but detekt has to be based on kotlin-compiler-embeddable for Gradle and co, we can't access Finding.entity.ktElement or else the classloader will crash.

One idea I have is to check if the start and end offsets of the Finding are the same as the PsiFile and use a file level annotation.

@arturbosch arturbosch added the bug Something isn't working label Jun 3, 2022
@arturbosch
Copy link
Member

Just prototyped an idea and it seems it works.
Maybe still a little too much attention grabing but better than before?

2022-06-03T20:49:07,407094174+02:00

@SnyersK
Copy link

SnyersK commented Jun 15, 2022

Is there a way to disable this new behaviour?
Or at least group them into one such (expandable) line?

Some older files with multiple formatting issues, stack a multitude of those yellow lines.
This doesn't leave much room to actually read code, so it's quite intrusive.

Aside from that, that settings wheel just shows an empty window.
Not sure if this is as expected?

an example:
Screenshot 2022-06-15 at 17 15 14

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
3 participants