Skip to content

Deduplicate no-score risk limitations#13

Closed
rdzehtsiar wants to merge 1 commit into
masterfrom
codex/refactor-no-score-limitations-logic
Closed

Deduplicate no-score risk limitations#13
rdzehtsiar wants to merge 1 commit into
masterfrom
codex/refactor-no-score-limitations-logic

Conversation

@rdzehtsiar

Copy link
Copy Markdown
Owner

Motivation

  • Prevent overlapping language-coverage limitations when there are zero scored Go files so the single direct no_scored_files limitation explains unavailable project risk.
  • Preserve existing warnings for partial Go scoring and keep JSON limitation output deterministic for regression checks.

Description

  • Guard emission of low_language_coverage so it is only added when scored_file_count > 0 instead of whenever confidence is low or none.
  • Guard emission of partial_go_score_coverage so it is only added when scored_file_count > 0 and Go coverage is partial.
  • Add unit tests in src/pipeline/repo_risk_assessor.rs for zero scored files, partial scored files, and healthy Go scoring coverage, and a helper limitation_codes for assertions.
  • Add a CLI/JSON integration test in tests/scanner_cli.rs to assert JSON output contains only the direct no_scored_files limitation (and other unrelated limitations) when no files are scored, plus the limitation_codes helper.

Testing

  • Ran cargo fmt --check and formatting check passed.
  • Ran cargo test and the full test suite passed (all unit and integration tests succeeded).
  • Ran cargo clippy --all-targets --all-features -- -D warnings and lint checks passed without warnings.

Codex Task

@sonarqubecloud

Copy link
Copy Markdown

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions

Copy link
Copy Markdown

Qodana for Rust

It seems all right 👌

No new problems were found according to the checks applied

💡 Qodana analysis was run in the pull request mode: only the changed files were checked
☁️ View the detailed Qodana report

Contact Qodana team

Contact us at qodana-support@jetbrains.com

@rdzehtsiar rdzehtsiar closed this Jun 20, 2026
@rdzehtsiar rdzehtsiar deleted the codex/refactor-no-score-limitations-logic branch June 20, 2026 14:36
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.

2 participants