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

Collapse output to 20 items #160

Merged
merged 23 commits into from
Jan 22, 2025
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
e55b9fa
Implement diagnostic quota logic
daniilsapa Jan 2, 2025
f3bdce4
Move diagnostic collapsing logic to pretty-printer
daniilsapa Jan 4, 2025
9d837bd
Add severity to consideration when collapsing the report, refactor th…
daniilsapa Jan 6, 2025
43e7f83
Add a changeset
daniilsapa Jan 6, 2025
f22685c
Merge branch 'next' into feature/collapse-output
daniilsapa Jan 6, 2025
75db8ef
Fix conflicts in pnpm-lock.yaml
daniilsapa Jan 6, 2025
66bbf39
Fix vitest version for pretty-reporter
daniilsapa Jan 6, 2025
8d3d231
Fix pnpm-lock issue
daniilsapa Jan 6, 2025
a58aa82
Count all autofixable diagnostics
daniilsapa Jan 11, 2025
b1df9d4
Update packages/pretty-reporter/src/index.ts
daniilsapa Jan 11, 2025
b9f7f58
Use s function for conditional pluralization
daniilsapa Jan 11, 2025
75d2b77
Fix the test case, remove unnecessary condition
daniilsapa Jan 11, 2025
42bfc21
Remove the unnecessary wrapper function, refactor test cases
daniilsapa Jan 11, 2025
d466eb9
Try to fix the size workflows
daniilsapa Jan 11, 2025
e98db05
Remove artifact duplicate
daniilsapa Jan 11, 2025
2e10bde
Use while loop instead of for
daniilsapa Jan 11, 2025
742a4f0
Fix sanitization command syntax
daniilsapa Jan 11, 2025
d43c8cc
Fix a typo in the workflow code
daniilsapa Jan 11, 2025
57ef178
Fix the issue with the loop
daniilsapa Jan 11, 2025
7566326
Make pretty-reporter test run along with the others
daniilsapa Jan 11, 2025
22f6650
Fix the size workout
daniilsapa Jan 11, 2025
84a40a9
Simplify the condition, remove the unnecessary comment
daniilsapa Jan 16, 2025
f3b4263
Add branch name sanitization to the trusted part of the size workflow
daniilsapa Jan 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use while loop instead of for
daniilsapa committed Jan 11, 2025

Verified

This commit was signed with the committer’s verified signature.
lgou2w MoonLake
commit 2e10bde1b27f3229f9fbde6b54dac9d32f07b56a
3 changes: 2 additions & 1 deletion packages/pretty-reporter/src/collapse-diagnostics.ts
Original file line number Diff line number Diff line change
@@ -6,8 +6,9 @@ function distributeQuota(buckets: Array<number>, quota: number) {
const allItemsCount = buckets.reduce((acc, bucket) => acc + bucket, 0)
const quotaPerBucket = buckets.slice(0).fill(0)
let remainingQuota = Math.min(quota, allItemsCount)
let i = 0

for (let i = 0; remainingQuota > 0; i += 1) {
while (remainingQuota > 0) {
const numOfItemsInBucket = buckets[i]
const assignedQuotaForBucket = quotaPerBucket[i]