Skip to content

Report lint warnings only on changed lines - #110

Merged
konard merged 2 commits into
mainfrom
issue-103-d3c4f4ecdbd1
Jul 20, 2026
Merged

Report lint warnings only on changed lines#110
konard merged 2 commits into
mainfrom
issue-103-d3c4f4ecdbd1

Conversation

@konard

@konard konard commented Jul 20, 2026

Copy link
Copy Markdown
Member

Fixes #103

Problem

Every Release run re-emitted the same local/no-changelog-comments warnings from files already on the default branch (33 in run 29434577797), hiding new actionable findings.

Solution

  • scripts/lint-changed-lines.mjs: parses git diff -U0 into per-file changed line sets and filters ESLint results — errors always kept, warnings kept only when they land on a changed line (whole file for new/untracked files).
  • scripts/lint.mjs: new npm run lint entry point that lints everything, reports filtered results, and prints how many warnings were suppressed. LINT_ALL_WARNINGS=1 (or npm run lint:all) restores the full output.
  • eslint.config.js: disables the rule for docs/case-studies/** fixtures and for tests/no-changelog-comments.test.js, which intentionally contain historical wording.

Verification

tests/lint-changed-lines.test.js proves an unchanged baseline warning is not re-annotated while a warning on a newly changed line is, and that errors survive filtering.

$ npm run lint          # 0 problems (21 warnings on unchanged lines suppressed)
$ LINT_ALL_WARNINGS=1 npm run lint   # 21 warnings
$ node --test tests/lint-changed-lines.test.js   # 6/6 pass

Adding .gitkeep for PR creation (default mode).
This file will be removed when the task is complete.

Issue: #103
@konard konard self-assigned this Jul 20, 2026
@konard konard changed the title [WIP] Do not repeat unchanged no-changelog-comments warnings on every run Report lint warnings only on changed lines Jul 20, 2026
@konard
konard marked this pull request as ready for review July 20, 2026 12:01
@konard

konard commented Jul 20, 2026

Copy link
Copy Markdown
Member Author

Working session summary

Done — PR #110 is ready: #110

  • scripts/lint-changed-lines.mjs filters ESLint results: errors always reported, warnings only on lines changed vs. the base branch (whole file for new/untracked files).
  • scripts/lint.mjs is the new npm run lint; it prints how many warnings were suppressed and honors LINT_ALL_WARNINGS=1 / npm run lint:all.
  • eslint.config.js turns the rule off for docs/case-studies/** and the rule's own test.
  • tests/lint-changed-lines.test.js (6 tests, passing) covers changed vs. unchanged findings and error preservation. Local lint/format checks pass.

This summary was automatically extracted from the AI working session output.

@konard

konard commented Jul 20, 2026

Copy link
Copy Markdown
Member Author

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost: $0.892618

📊 Context and tokens usage:

  • 42.9K / 1M (4%) input tokens, 8.5K / 128K (7%) output tokens

Total: (44 new + 29.3K cache writes + 770.9K cache reads) input tokens, 8.5K output tokens, $0.892619 cost

🤖 Models used:

  • Tool: Anthropic Claude Code
  • Requested: opus (claude-opus-4-8)
  • Thinking level: off (disabled)
  • Model: Claude Opus 4.8 (claude-opus-4-8)

📎 Log file uploaded as Gist (645KB)


Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard
konard merged commit ea5a144 into main Jul 20, 2026
30 checks passed
@konard

konard commented Jul 20, 2026

Copy link
Copy Markdown
Member Author

🎉 Auto-merged

This pull request has been automatically merged by hive-mind.

  • All CI checks have passed

Auto-merged by hive-mind with --auto-merge flag

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

Successfully merging this pull request may close these issues.

Do not repeat unchanged no-changelog-comments warnings on every run

1 participant