Lint the PR's own diff, not the release branch's divergence from master - #3882
Conversation
Super-linter picks its file set with a two-dot diff against DEFAULT_BRANCH, which was hardcoded to master. For a PR based on a release branch that means the file set is the whole master-to-release-branch divergence rather than the files the PR touches: PR #3881 changes 4 Kotlin files but got 144 linted, including master-only files that don't exist on the branch and are logged as "exists in commit data, but not found on file system, skipping...". The result is that every PR based on commcare_2.64 fails the Kotlin lint job on pre-existing violations it did not introduce and cannot fix in scope. #3880 and #3877 both fail it, with passing Builds. Pointing DEFAULT_BRANCH at github.base_ref makes the diff base the branch the PR actually targets. No change for PRs into master, where base_ref is master.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe linter workflow now sets Estimated code review effort: 1 (Trivial) | ~3 minutes Merge Risk: ⚪ Minimal · up to This localized workflow change is merge-ready after normal checks and review; no actionable merge-blocking risk remains. Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.) Full details: Description checkResolution Add the required sections from the repository template. Include the ticket or design document, explain the rationale and branch-selection behavior, describe validation and safety considerations, identify automated test coverage, and complete the Labels and Review checklist.
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3882 +/- ##
============================================
- Coverage 33.04% 32.95% -0.10%
+ Complexity 5864 5854 -10
============================================
Files 999 999
Lines 59398 59398
Branches 7093 7093
============================================
- Hits 19628 19573 -55
- Misses 37528 37586 +58
+ Partials 2242 2239 -3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
shubham1g5
left a comment
There was a problem hiding this comment.
Great to see this fixed!
Comment on verbosity: we can remove the comment and the complete PR description here as both of them do not provide extra context other than code diff and can be omitted without sacrificing correctness or context.
Point
DEFAULT_BRANCHatgithub.base_refso the diff base is the branch the PR actually targets.