PrivCheck - Library to check for private api usage in Elixir

In Elixir it is quite easy to use private API’s without realizing, especially if the developer is just copying code from a blog post since there are no warnings or errors emitted when using private APIs. In fact many Elixir developers don’t realize that @moduledoc false indicates that they should not call into that module, and similarly for @doc false functions. So I have created the PrivCheck library that will automatically warn you when you are calling into the private implementation details of a library.

Current status is ready to be tried but not battle-tested.

GitHub: GitHub - axelson/priv_check: Library to check for private api usage in Elixir
Hex: priv_check | Hex

Note: PrivCheck owes an immense amount of gratitude to Boundary since a significant portion of the code was inspired by that library.

Please try it out and let me know what you think!

13 Likes

Awesome! I’ll start using this.

1 Like

Woohoo! :clinking_glasses:

1 Like

Will this be an integrated (thogh hopefully optional) linter for the LS?

1 Like

Possibly in the future, but it would need a lot of testing. But for anyone that’s interested now it works with ElixirLS as long as you follow the instructions in the readme.

1 Like