Skip to content

fix: report lint findings during compile and check - #1034

Open
e54-bot wants to merge 3 commits into
mainfrom
impl/1032
Open

e54-bot wants to merge 3 commits into
mainfrom
impl/1032

Conversation

@e54-bot

@e54-bot e54-bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

compile and check previously reported a clean result when the lint registry already identified a static risk. Both now include the enabled lint findings in normal diagnostics and summary counts, as required by the owner decision on #1032.

  • Reuse the configured lint service and preserve finding codes, severities, source locations, evidence classes, and boundedness metadata.
  • Accept the same lint configuration and rule override flags as lint. Warnings preserve success; error-level lint findings fail and prevent compile output from replacing an existing destination.
  • Document both commands and test JSON parity, plain warning counts, project configuration, CLI overrides, output preservation, and verdicts before diagnostic selection.
  • Preserve the existing nested iterator rule and OPY lowering. Move the existing compile CLI handler and its overwrite test into a command module to satisfy the repository's file-growth guard.

Verification:

  • cargo test -p wright-cli --test compile_check_lint --test compile_check_lint_policy: passed (4 tests).
  • cargo fmt --all -- --check: passed.
  • git diff --check and the repository size guard: passed.
  • Workspace clippy and tests are running; final results will be recorded before delivery.
  • Ran check, lint, analyze, inspect, and compile on the issue's OPY expression in en-US and zh-CN: all succeeded; compile/check carry the same static-indicator warning as lint.
  • Compared emitted output with the installed release for that expression: byte-identical in both locales.
  • Ran the same five workflows on the pinned reproducer-bastion-prophet.ws and bastion.ow fixtures: all succeeded; compile/check diagnostic finding sets match lint (16 and 19 findings respectively).
  • Checked plain-text warning counts and error/disable overrides on the OPY reproduction: passed for both commands.

Ablation: reused the existing registry, configuration parser, diagnostic shape, and verdict machinery; introduced no policy switch, result schema, dependency, or rule changes. Removed duplicate project-policy coverage while retaining distinct stdin and path/config regressions.

Unverified: no Overwatch client was available, so client importability and the exact iterator nesting limit remain unconfirmed. The complete current Bastion source project was not rebuilt; validation used the issue's minimized OPY expression and existing pinned project artifacts. No UI files changed, so UI gates do not apply. Remote CI is pending.

Fixes #1032

Refine the existing nested-binder-lambda warning to require an element or
index read in the nested iterator's source or per-element arguments. Keep
reads confined to deeper iterator bodies from creating redundant warnings,
and explain the unconfirmed client import risk in diagnostics and docs.

Cover all iterator pairs, source-only reads, deeper scopes, CLI locations,
severity overrides, and rule disablement without changing OPY lowering.

Fixes #1032
Restore the existing lint rule and OPY behavior before implementing the
owner-approved compile/check diagnostic integration.
Run the configured lint registry for compile and check, preserving finding
codes, severities, source locations, evidence classes, and exit behavior.
Apply the same lint policy flags on both commands and refuse compile
output when a lint finding has error severity.

Document the diagnostic contract and cover warning counts, JSON findings,
project policy, CLI overrides, and failure before output or selection.

Fixes #1032

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

Detect nested Current Array Element scope (any([...]) inside a filter lambda) that the Workshop client rejects

2 participants