-
Notifications
You must be signed in to change notification settings - Fork 8
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
Collapse output to 20 items #160
Conversation
🦋 Changeset detectedLatest commit: f3b4263 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Interesting considerations, thanks for the early update! I looked at the code and realized that I forgot to mention one important detail in the issue description. I originally envisioned this as a purely cosmetic thing rather than a linter feature, and as such, I planned that this functionality would be added to the pretty reporter rather than the linter core. This way, all reporters get the same full diagnostics, but some reporters might choose to hide some. The inspiration for this feature came from Biome, they also have a 20-diagnostic limit. Here's how they show it: That's why I don't think we should make this thing configurable or even disable-able. If one wants to see all diagnostics, I think it's not because they want to read all of them individually. For mass-reading of diagnostics, the JSON reporter is probably better. I suggest we write "X diagnostics were hidden, run with The severity consideration is a very good point, I agree that we probably want to sort the errors first and then, if there's space left, print warnings too. If there's a rule that has produced only warnings, then we only print its diagnostics if all the errors have been printed. |
Oh, yeah, actually it makes sense to make it a cosmetic thing and move |
Overall the code looks good, I only have minor concerns about over-abstracting — such as having an entire feature for this, and also making the quota a modifiable parameter. Seems like the code could be simpler by keeping it all in one function |
@illright Let me know if you think we must rephrase/change it somehow |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for noticing the bundle size workflow issue, my mistake! I think we can replace everything that isn't /[0-9a-zA-Z-._]/
(ref) with -
to overcome this.
The solution is good overall, but slightly hard to understand, I made some suggestions to improve clarity, let me know what you think
Co-authored-by: Lev Chelyadinov <[email protected]>
It looks like I fixed all the issues, please review when you have time |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, now the code is good! There is one potential issue in the workflow, and I figured I'd also throw in a little non-blocking suggestion as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, this seems good to go!
commit: |
Closes #51
The solution is still raw and it's an early PR, so you can see the general approach and we can clarify some details.
runRules
fromapp.ts
needs to return someReport
interface, so it contains not just diagnostics but also some meta info about them. We need this to display the number of shown vs hidden diagnostics etc. other fields may appear in the future.