typelevel / typelevel/typelevel-scalafix

Lint cats instance imports

Open
#7 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Scala
Stars
27
Forks
8
PR merge metrics
No merged PRs in 30d

Description

There's already a rule for this in cats itself, intended to help with the 2.2.0 upgrade I believe.
https://github.com/typelevel/cats/blob/3314acd0e921140d939aafffd745a98d55556814/scalafix/rules/src/main/scala/fix/Cats_v2_2_0.scala

But since these instances are not deprecated (I assume that there are Reasons), it is easy to use them in new code by mistake (I just cleaned up a use in one of my projects, which is why I thought we might add this).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked Cats_v2_2_0.scala rule and inspect the existing Scalafix rules in this repository to understand how imports are matched and reported. Confirm which Cats instance imports should be flagged, then verify that the new rule catches those imports without affecting intended usage.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.