My application has a compile dependency to a library A. There is a specific function in this library which I know that causes performance problems. But it is not deprecated and if you don't have this prior information you would think that it is safe to use it. I'm looking for a way to somehow deprecate this function or prevent it from being called directly.
Would it be possible to achieve this via static analysis tools or builtin compiler flags?
I have checked scalafix but it was too complicated to setup for just this kind of linting. I ended up using wartremover and adding a custom wart.
Custom warts sit in a subproject as shown in this example.
I have created a custom wart by simply modifying builtin EitherProjectionPartial wart.