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

Diagnostics in the IDE #78

Open
aminya opened this issue Jan 15, 2024 · 3 comments
Open

Diagnostics in the IDE #78

aminya opened this issue Jan 15, 2024 · 3 comments

Comments

@aminya
Copy link

aminya commented Jan 15, 2024

dprint prints the errors that it encounters in the output channel of the IDE. However, it doesn't create diagnostics. It would be great if it does.

Instead of this, we can have a proper diagnostic
image

@dsherret
Copy link
Member

dsherret commented Jan 15, 2024

Aren't these kind of diagnostics usually already reported by most IDEs? I'm not sure there would be much value in this because of that and it might get confusing/annoying to get diagnostics from dprint and other sources about the same thing.

@aminya
Copy link
Author

aminya commented Jan 15, 2024

It could be configurable so that the user can decide. In my case, I wanted to replace the Eslint plugin with dprint and use Eslint through Dprint. Having diagnostics is the missing part.

@dsherret
Copy link
Member

Do you have an example of dprint providing a diagnostic, but your editor doesn't? Most people have language servers installed for the language they're using or they get diagnostics that dprint would report OOTB.

image

image

I'm still not sure this is worth the effort. It would be a decent amount of work. Additionally, currently the plugins only return the first diagnostic they encounter rather than all diagnostics for the file. To change plugins to be able to return multiple diagnostics would be further work for both dprint's CLI and for the plugins. Then it reporting all the diagnostics might be too noisy for some users so that would need to be configurable, so probably it should just keep reporting the first one.

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

No branches or pull requests

2 participants