Skip to content

Conversation

@humorless
Copy link
Member

This PR updates the defstyled clj-kondo analysis hook to correctly handle all permutations of the macro, resolving an issue: a runtime exception.

Bug Fixes: Resolved ClassCastException (java.lang.Boolean cannot be cast to clojure.lang.Associative)

The original hook implementation returned {:node true} in the branch where fn-tag was not a list (i.e., when the style definition lacked a function body).

clj-kondo expects a valid AST node (an Associative data structure) in the :node key. Returning a boolean caused the parser to fail at the namespace level.

Fix: The false branch now correctly returns the AST for the original node, preventing the exception.

@humorless humorless merged commit 235299f into main Dec 1, 2025
3 checks passed
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