GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — ci: point at the new warnings when an ESLint ceiling is exceeded by teeohhem · Pull Request #3607 · ClickHouse/ClickStack Conversation
Contributor
SummaryWhen a PR pushes a package over its
Ceilings are unchanged.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsEach package lints with `--max-warnings N`, set at or near the current count. When a PR adds one warning, ESLint prints "too many warnings" inside hundreds of pre-existing ones and the summary still says "0 errors", so the failure is hard to diagnose. Pre-commit runs eslint with `--quiet`, so warnings never surface before CI. Add scripts/ci/eslint-warnings.mjs, a wrapper around the ESLint CLI: - Ceiling mode (package `lint` scripts): same output and exit code as before, plus, when over the ceiling, a summary listing the warnings on lines changed since the merge-base with the PR base, and GitHub error annotations on those lines. Falls back to warnings in changed files when a type change makes a type-aware rule fire on untouched code. When under the ceiling, prints the count to lower it to. - Staged mode (lint-staged): replaces `eslint --fix --quiet`. Fails on errors as before, and on warnings only when they sit on lines the commit changes, so editing a file with old warnings doesn't block the commit.
|
There was an error while loading. Please reload this page.
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
🟡 Tier 3 — StandardIntroduces new logic, modifies core functionality, or touches areas with non-trivial risk. Why this tier:
Additional context: touches background tasks or the delivery pipeline lightly (6 lines, under the 30-line bar for Tier 4), 1 file(s) in private internal-tooling packages, excluded from the line count Review process: Full human review — logic, architecture, edge cases. Stats
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Duplicate code analysisNo new duplicate code introduced by this PR. jscpd compared this branch against |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| results = JSON.parse(readFileSync(outFile, 'utf8')); | ||
| } catch { | ||
| // ESLint crashed (bad config, bad flag) and has already said why. | ||
| process.exit(status || 2); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
🔵 minor — process.exit inside try/finally skips the temp-dir cleanup
When ESLint crashes, process.exit(status || 2) exits before the finally block's rmSync(tmp) runs, so a /tmp/eslint-warnings-* directory is left behind on every crash. Call rmSync before exiting, or return a sentinel value and exit from main after the finally has run.
Advisory. Fix if it is a small defect in code this PR changes; otherwise reply in the thread. Do not widen the PR or touch files it did not already change. How to respond
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| if (staged) { | ||
| const changed = changedLines(root, true); | ||
| const fresh = changed | ||
| ? warnings.filter(w => changed.addedLines.get(w.filePath)?.has(w.line)) |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
🔵 minor — Staged-mode filter repeats newWarnings' line match and has no test
warnings.filter(w => changed.addedLines.get(w.filePath)?.has(w.line)) copies the onLines predicate in newWarnings. The staged branch also has no test: nothing covers onlyErrorsAnd, which keeps warnings by object identity via .raw, or the rule that errors still block. Pull the predicate into an exported helper (e.g. warningsOnLines) that both modes use. Add a test that runs onlyErrorsAnd on the results fixture and checks that errors are kept, warnings on unchanged lines are dropped, and warningCount is recomputed.
Advisory. Fix if it is a small defect in code this PR changes; otherwise reply in the thread. Do not widen the PR or touch files it did not already change. How to respond
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
PR Review
4 finding(s): 🔴 0 critical · 🟠 0 major · 🔵 4 minor None could be anchored to changed lines; they are listed below. Findings outside the changed lines4 minor
Severity is the reviewer's own estimate and is used for ordering, not filtering. No finding blocks merge automatically; a maintainer decides. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Knip only reads the first file after `node --test`, so it flagged the new eslint-warnings test as unused.
There was an error while loading. Please reload this page.
E2E Test Results✅ All tests passed • 465 passed • 1 skipped • 1324s
Tests ran across 4 shards in parallel. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Deep Review✅ No critical issues found. This is a well-constructed CI/tooling change. The core safety property holds: in ceiling mode the over-limit branch returns 🟡 P2 — recommended
🔵 P3 nitpicks (2)
Reviewers (5): correctness, adversarial, testing, maintainability, project-standards. Testing gaps: No finding blocks merge automatically. A maintainer will expect P0/P1 findings in code this PR changes to be fixed; P2/P3 are your call -- fix or reply. Never fix findings about surrounding code here; reply instead. Do not widen the PR. How to respond |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
4bff6237
Deployed
At least 1 approving review is required to merge this pull request.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.