Repository navigation
Improve ci logs - #13
Merged
Merged
Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Diagnostics (warnings/errors) handling and JSON warning duplication need adjustment to better match the intended CI stream separation and avoid redundant report content.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 2
Open (2)
What changed in this PR
This PR modernizes cargo-oxidate’s CI-facing output by introducing structured reporting (including JSON), adding verbosity controls, and making suggestion generation/reporting more robust and machine-consumable.
Changes:
- Add
--quiet/--verboseprogress controls and--format text|jsonfinal-output mode. - Introduce a structured
RunReport(policy/summary/diagnostics/suggestions) and a JSON schema v1 renderer. - Improve suggestion generation outcomes (new
Unavailablevariant) and convert cache failures into non-fatal warnings.
| File | Description |
|---|---|
| tests/suggest_fix_cli.rs | Updates assertions to match new suggestion/outcome messaging. |
| tests/ci_output_cli.rs | Adds integration coverage for stdout vs stderr behavior across verbosity modes. |
| tests/ci_json_cli.rs | Adds integration coverage for JSON schema output and error behavior. |
| src/suggest/tests/generate_suggestions_tests.rs | Updates tests for Outcome::Unavailable and progress callback plumbing. |
| src/suggest/tests.rs | Adapts suggestion test helper to new generate_suggestions signature. |
| src/suggest.rs | Adds Outcome::Unavailable and an on_progress callback for suggestion checks. |
| src/report/json.rs | Implements JSON report schema v1 + unit tests. |
| src/report.rs | Refactors text reporting into RunReport-driven rendering with policy/summary sections. |
| src/policy.rs | Normalizes exemptions and replaces Unknown with MissingPublishDate { reason }. |
| src/main/tests.rs | Adds unit tests for CLI parsing and report/exit-code behavior. |
| src/main.rs | Wires verbosity/format flags, structured reporting, diagnostics, and suggestion progress. |
| src/cache.rs | Converts cache load/save failures into structured warnings. |
| src/api.rs | Plumbs cache warnings through the client lifecycle and returns non-fatal save warnings. |
| README.md | Documents new flags, CI stream semantics, JSON output contract, and exit codes. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

No description provided.