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

Suggested additional rules #53

Open
jleider opened this issue Feb 1, 2021 · 0 comments
Open

Suggested additional rules #53

jleider opened this issue Feb 1, 2021 · 0 comments

Comments

@jleider
Copy link

jleider commented Feb 1, 2021

First, thanks for putting together this plugin, I already found a few places in our codebase that were simplified by the usage of this so kudos!

I have some suggestions that could make this even better. These are some common patterns I've seen as a result of refactors or just not paying enough attention:

  • Replace map + getOrElse with fold
  • Replace chain + lifting return val with map
    • e.g. O.chain(x => O.some(f(x))) ==> O.map(x => f(x))

Additionally, IntelliJ has quite a number of "inspections" for Scala that could be used as inspiration and ported over to this linter.

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