Skip to content

Conversation

@mscasso-scanoss
Copy link
Contributor

@mscasso-scanoss mscasso-scanoss commented Jan 30, 2026

Summary by CodeRabbit

  • Version

    • Updated to 5.4.22
  • Bug Fixes

    • Refined component ranking logic to properly evaluate threshold conditions before applying rank-based filtering, improving consistency in edge cases during component matching
    • Corrected report generation to ensure the hits field is always included for snippet-based matches, providing complete match information in scan results

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 30, 2026

📝 Walkthrough

Walkthrough

Version bump to 5.4.22 with two logic adjustments: adding a guard condition to ranking execution in component hint date comparison, and modifying JSON output to always include hits for snippet matches regardless of tolerance settings.

Changes

Cohort / File(s) Summary
Version Update
inc/scanoss.h
Version string incremented from "5.4.21" to "5.4.22".
Ranking Logic
src/match.c
Added guard condition requiring component_rank_max >= 0 before executing URL/rank-based ranking block, potentially skipping ranking logic when this threshold is negative.
JSON Output Formatting
src/report.c
Modified snippet match output to always include hits field in JSON, removing prior dependency on snippet_adjust_tolerance for conditional inclusion.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 Version hops from .21 to .22,
Ranking guards now check before they do,
Snippet hits flow freely, unconfined,
Three tiny tweaks, all carefully aligned! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately references the two main changes: the hit report fix in src/report.c and the ranking configuration fix in src/match.c.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 5.4.22

Tip

🧪 Unit Test Generation v2 is now available!

We have significantly improved our unit test generation capabilities.

To enable: Add this to your .coderabbit.yaml configuration:

reviews:
  finishing_touches:
    unit_tests:
      enabled: true

Try it out by using the @coderabbitai generate unit tests command on your code files or under ✨ Finishing Touches on the walkthrough!

Have feedback? Share your thoughts on our Discord thread!


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

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@scanoss-qg scanoss-qg left a comment

Choose a reason for hiding this comment

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

LGTM

@mscasso-scanoss mscasso-scanoss merged commit 2426ca9 into main Jan 30, 2026
3 checks passed
@mscasso-scanoss mscasso-scanoss deleted the 5.4.22 branch January 30, 2026 12:31
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.

3 participants