Skip to content

Fix/issue 204 coverageHtml empty#218

Merged
MishaKav merged 3 commits intomainfrom
fix/issue-204-coveragehtml-empty
Aug 30, 2025
Merged

Fix/issue 204 coverageHtml empty#218
MishaKav merged 3 commits intomainfrom
fix/issue-204-coveragehtml-empty

Conversation

@MishaKav
Copy link
Owner

@MishaKav MishaKav commented Aug 30, 2025

Summary by CodeRabbit

  • Bug Fixes

    • Resolved issue where HTML coverage output could be empty when using XML coverage files.
    • Ensured consistent HTML report generation for both text and XML coverage inputs, improving reliability of coverage comments in CI.
  • Documentation

    • Updated changelog for version 1.1.57 with details of fixes and release date.
  • Chores

    • Bumped application version to 1.1.57.

MishaKav and others added 3 commits August 30, 2025 15:21
- Fixed HTML output logic to use getCoverageXmlReport for XML coverage files
- Previously getCoverageReport was always called, returning empty HTML for XML files
- Now properly handles both text and XML coverage file types
- Resolves issue where coverageHtml output was empty with pytest-xml-coverage-path

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@coderabbitai
Copy link

coderabbitai bot commented Aug 30, 2025

Walkthrough

Version bumped to 1.1.57, changelog updated, and HTML coverage generation logic now branches to XML-specific reporting when covXmlFile is provided, ensuring correct HTML output for both text and XML coverage inputs.

Changes

Cohort / File(s) Summary
Release notes
CHANGELOG.md
Added entry for v1.1.57 (2025-08-30) noting two bugfixes: empty coverageHtml with XML fixed; proper HTML generation for text and XML coverage types.
Package metadata
package.json
Version updated from 1.1.56 to 1.1.57; no other changes.
Coverage generation logic
src/index.js
HTML coverage now uses conditional generator: getCoverageXmlReport(newOptions) when covXmlFile is truthy; otherwise getCoverageReport(newOptions). Output handling unchanged.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant CLI as CLI/Runner
  participant Index as src/index.js
  participant TxtRpt as getCoverageReport
  participant XmlRpt as getCoverageXmlReport

  User->>CLI: Run coverage task with options
  CLI->>Index: newOptions (may include covXmlFile)
  alt covXmlFile provided
    Index->>XmlRpt: generate HTML from XML
    XmlRpt-->>Index: { html, ... }
  else no covXmlFile
    Index->>TxtRpt: generate HTML from text report
    TxtRpt-->>Index: { html, ... }
  end
  Index-->>CLI: coverageHtml (from output.html)
  note over Index,CLI: Control flow updated to select XML or text report path
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I hop through lines, with whiskers bright,
Switch tracks for XML, now HTML’s right.
A version bump—thump-thump—so neat,
Reports now render crisp and sweet.
In fields of code I pause, then gleam:
1.1.57—a tidy dream. 🐇✨

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/issue-204-coveragehtml-empty

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions
Copy link
Contributor

Coverage

Coverage Report
FileStmtsMissCoverMissing
functions/example_completed
   example_completed.py641970%33, 39–45, 48–51, 55–58, 65–70, 91–92
functions/example_manager
   example_manager.py441175%31–33, 49–55, 67–69
   example_static.py40295%60–61
functions/my_exampels
   example.py20200%1–31
functions/resources
   resources.py26260%1–37
TOTAL105573930% 

Tests Skipped Failures Errors Time
109 2 💤 1 ❌ 0 🔥 0.583s ⏱️

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
CHANGELOG.md (1)

3-11: Changelog entry reads well; tiny grammar nit.
Consider “Fix coverageHtml output being empty …” for clarity. If you want to satisfy markdownlint MD001, switch “#### Changes” to “### Changes” (and ideally align across the file).

Apply grammar tweak:

- - fix coverageHtml output empty when using XML coverage files (#204)
+ - Fix coverageHtml output being empty when using XML coverage files (#204)
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 9638e4b and 18ff0e1.

⛔ Files ignored due to path filters (2)
  • dist/index.js is excluded by !**/dist/**
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (3)
  • CHANGELOG.md (1 hunks)
  • package.json (1 hunks)
  • src/index.js (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
src/index.js (2)
src/parseXml.js (2)
  • getCoverageXmlReport (50-78)
  • options (7-15)
src/parse.js (5)
  • getCoverageReport (22-51)
  • data (216-268)
  • data (189-213)
  • coverage (167-179)
  • options (271-275)
🪛 markdownlint-cli2 (0.17.2)
CHANGELOG.md

7-7: Heading levels should only increment by one level at a time
Expected: h3; Actual: h4

(MD001, heading-increment)

🔇 Additional comments (1)
package.json (1)

3-3: Version bump to 1.1.57 — LGTM.
Matches changelog intent; no issues.

@MishaKav MishaKav linked an issue Aug 30, 2025 that may be closed by this pull request
@MishaKav MishaKav merged commit 1bdbba8 into main Aug 30, 2025
5 checks passed
@MishaKav MishaKav deleted the fix/issue-204-coveragehtml-empty branch August 30, 2025 12:35
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.

coverageHtml is empty

1 participant