Skip to content

lsp: Report the number of errors encountered during format #8294

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hunger
Copy link
Member

@hunger hunger commented Apr 28, 2025

... in the return code.

So 0 is "all is well", 1 - x is the number of changed files.

255 is a special value that gets reported for IO errors in the lsp code itself.

Fixes: #8229

@ogoffart
Copy link
Member

I'm not sure the number of Slint error is useful. (especially because it is only parse error, but not further semantic error)
I think the goal of #8229 was to run in CI and report an error if there was any changes.
I wonder what other formatter are doing.

@hunger hunger force-pushed the tobias/push-snpupvoqsors branch from 59f7faf to 1756dd5 Compare April 28, 2025 16:37
@ogoffart
Copy link
Member

(this now seem to contain some unrelated changes.)

... in the return code.

So 0 is "all is well", 1 - x is the number files actually
changed.

255 is a special value that gets reported for IO errors
in the lsp code itself.

This changes the code quite a bit: I need to be able
to compare the result to the input, so I can not use the
writer anymore.

Fixes: slint-ui#8229
@hunger hunger force-pushed the tobias/push-snpupvoqsors branch from 1756dd5 to eaa8a4d Compare April 29, 2025 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants