fix: skip fmt-directive and indent processing for inline comments (#305)#307
fix: skip fmt-directive and indent processing for inline comments (#305)#307mbhall88 wants to merge 2 commits into
Conversation
…akemake#305) Inline comments (e.g. `""" # comment`) were being passed through the same fmt-directive and indentation logic as standalone comments, causing incorrect context exits and indentation changes. Detect inline comments by checking that the previous token is on the same line, and bypass block-level comment handling for them. closes snakemake#305
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughIn ChangesInline comment classification and regression test
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 #307 +/- ##
=======================================
Coverage 96.87% 96.87%
=======================================
Files 13 13
Lines 1662 1664 +2
Branches 343 344 +1
=======================================
+ Hits 1610 1612 +2
Misses 24 24
Partials 28 28
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Inline comments (e.g.
""" # comment) were being passed through the same fmt-directive and indentation logic as standalone comments, causing incorrect context exits and indentation changes. Detect inline comments by checking that the previous token is on the same line, and bypass block-level comment handling for them.closes #305
Summary by CodeRabbit