Skip to content

Conversation

scgerkin
Copy link

@scgerkin scgerkin commented Aug 12, 2025

Fix for #111

Fixes reader macro handling in :require forms by treating reader macros as comments that attach to the following dependency rather than as independent, sortable elements.

  • Fixed crash: Added :map case to libspec-sort-key to handle complex reader macros like #_{:key value} by treating them as :uneval
  • Fixed positioning: Changed parse-list-with-comments to treat :uneval reader macros as comments that accumulate with regular comments and attach to the next dependency
  • Added unit tests to verify both sorting and complex types behavior
;; Before (incorrect - reader macro moves to wrong position)
(:require
  #_:clj-kondo/ignore  ; ← affects wrong dependency
  [ab.cd.x :as x]
  [ab.cd.y :as y])

;; After (correct - reader macro stays with intended target)
(:require
  [ab.cd.x :as x]
  #_:clj-kondo/ignore  ; ← stays with intended target
  [ab.cd.y :as y])

@codecov-commenter
Copy link

codecov-commenter commented Aug 12, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.83%. Comparing base (d40540a) to head (a8580f9).
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #112      +/-   ##
==========================================
- Coverage   89.94%   89.83%   -0.11%     
==========================================
  Files          20       20              
  Lines        1929     1928       -1     
  Branches       59       59              
==========================================
- Hits         1735     1732       -3     
- Misses        135      137       +2     
  Partials       59       59              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

2 participants