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

Incorrect suggestion when using reducers #245

Open
Kineolyan opened this issue Sep 20, 2021 · 1 comment
Open

Incorrect suggestion when using reducers #245

Kineolyan opened this issue Sep 20, 2021 · 1 comment

Comments

@Kineolyan
Copy link

When using reducer methods instead of standard map or filter, kibit seems to get confused.
With the following code, kibit suggests to replace into [] by vec:

(into [] (r/filter even? (r/map inc (range 10))))

However, this is not valid as vec is not a supported collection producer, unlike into.

If you need, I can provide the small lein project I cooked to test this.

Additional info

Clojure version: 1.10.1
Kibit version via lein-kibit: 0.1.8

@Kineolyan
Copy link
Author

Beyond this being an error, is there a way to tell kibit to ignore a function or a form?
Currently, this is the only pattern that causes me issues. But this suggestion makes the whole lein kibit returns an error code, which makes it impossible to use as a CI check.

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

No branches or pull requests

1 participant