Skip to content

ci: report the LuaLS problem count LuaLS actually reports - #7877

Open
Rathoz wants to merge 3 commits into
mainfrom
chore/fix-luals-problem-count
Open

ci: report the LuaLS problem count LuaLS actually reports#7877
Rathoz wants to merge 3 commits into
mainfrom
chore/fix-luals-problem-count

Conversation

@Rathoz

@Rathoz Rathoz commented Jul 29, 2026

Copy link
Copy Markdown
Member

What

The luals-code-style step summary counted lines containing Warning, which overcounts — a single diagnostic can span several lines.

  • Reported 263; LuaLS itself reports 238
  • Now uses LuaLS's own totals, and adds files-with-problems
  • Gating behaviour untouched — only the summary lines change
Files scanned Files with problems Problems
LuaLS check 1710 142 238

No delta vs the base branch, because the count isn't deterministic — 237–240 across 8 runs on identical code, in both pretty and json output, and there's no --threads flag to pin it. Files-with-problems was stable at 142 every run, so that's the number to watch. The summary says so inline.

Split out of #7863, which keeps the annotation coverage metric.

How it was tested

  • Verified in CI on a throwaway branch: this job skips unless lua/wikis/**/*.lua changes, so a one-byte commons change was needed to trigger it. Reported 1710 / 142 / 238, matching local measurement on a different OS/arch.
  • Extraction cross-checked against LuaLS's --check_format=json output (142 files both ways)

The step summary counted lines containing "Warning":

    $(cat luals-check | grep 'Warning' | wc -l)

That gives 263 where LuaLS itself reports 238, because a single diagnostic can
span several lines. Use the totals LuaLS prints, and add files-with-problems
alongside them.

No delta is reported against the base, because the count is not deterministic:
237-240 across 8 runs on identical code, in both pretty and json output, with no
--threads flag to pin the analysis. Files-with-problems was stable at 142 in
every run, so that is the number worth watching, and the summary says as much.

Gating behaviour is untouched; only the summary lines change.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 29, 2026 09:15
@Rathoz
Rathoz requested review from a team as code owners July 29, 2026 09:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Rathoz added a commit that referenced this pull request Jul 29, 2026
Two unrelated changes were sharing a branch: a new metric and a fix to an
existing one. Split so they can be reviewed and reverted independently.

The LuaLS summary fix now lives in #7877. luals-code-style here is byte
identical to main again; this branch only adds annotation coverage.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@Rathoz
Rathoz requested a review from mbergen July 29, 2026 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants