Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cond-> with merge incorrectly trips lint/redundant-call #21

Closed
danieroux opened this issue Aug 14, 2024 · 4 comments
Closed

cond-> with merge incorrectly trips lint/redundant-call #21

danieroux opened this issue Aug 14, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@danieroux
Copy link

This trips [lint/redundant-call] - Single-arg merge always returns the arg:

(let [flag true]
  (cond-> {::foo "FOO"}
    flag (merge {::bar "BAR"})))
@dpassen
Copy link
Contributor

dpassen commented Aug 26, 2024

Just ran into this, happy to see it documented.

@NoahTheDuke
Copy link
Owner

Thanks for the report. I gotta figure out a better way to handle macros than just checking everything for -> in the parent form hah.

@NoahTheDuke NoahTheDuke self-assigned this Aug 27, 2024
@NoahTheDuke NoahTheDuke added the bug Something isn't working label Aug 27, 2024
@NoahTheDuke
Copy link
Owner

Fixed in 72add52, release forthcoming.

@NoahTheDuke
Copy link
Owner

Released in 1.17.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants