Hide an Elixir Module from Documentation
Recently I've noticed @moduledoc false sprinkled through some Elixir projects. What's going on? To quote the docs:
Conveniently, Elixir allows developers to hide modules and functions from the documentation, by setting
@doc falseto hide a particular function, or@moduledoc falseto hide the whole module. If a module is hidden, you may even document the functions in the module, but the module itself won't be listed in the documentation...
Why would you see this in a project that doesn't autogenerate docs? Possibly to satisfy a linter like Credo. In a codebase with public APIs, I think this kind of explicit statement is a good practice.
Tweet