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

FR: Expand style/useless-do to more built-ins #18

Open
NoahTheDuke opened this issue May 16, 2024 · 2 comments
Open

FR: Expand style/useless-do to more built-ins #18

NoahTheDuke opened this issue May 16, 2024 · 2 comments
Labels
enhancement New feature or request rule-idea A suggestion for a new rule

Comments

@NoahTheDuke
Copy link
Owner

As seen in these clj-kondo issues 1, 2, 3:

  • comment
  • delay via fn*
  • dosync via sync
  • dotimes via when
  • io! via do
  • letfn via letfn*
  • locking via try
  • sync via fn
  • while via when
  • with-bindings via fn
  • with-in-str via binding
  • with-local-vars via try
  • with-out-str via binding
  • catch within try
  • finally within try

Maybe include some mechanism for expanding this list? Configuration perhaps.

@NoahTheDuke NoahTheDuke added enhancement New feature or request rule-idea A suggestion for a new rule labels May 16, 2024
@NoahTheDuke
Copy link
Owner Author

Actually, given how style/useless-do is written, it covers all of these already because it only checks that it's not wrapping ~@body and it's not in an anonymous function literal.

@NoahTheDuke
Copy link
Owner Author

I'm a fool. style/useless-do is about single-element do calls. Instead, I want something like lint/redundant-do, an expansion of lint/loop-do.

@NoahTheDuke NoahTheDuke reopened this Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request rule-idea A suggestion for a new rule
Projects
None yet
Development

No branches or pull requests

1 participant