I’m looking at someone else’s test module and at the top they have
@moduledoc false
I assume this is because the tests are internal and documentation is not supposed to be exposed to the outside.
So if I want to give comments to other developers about what this module does am I supposed to just use many #? Is there a better way if I have lots of lines of comments?
You are being way too sheepish here. If you feel a module should have docs, make it have docs. Nobody is going to bludgeon you to death because you wanted to improve code readability.
Also there’s nothing wrong with comments either but they don’t get automatically surfaced when you generate docs for your module(s).
So this project was written by someone else who has since left. I checked and credo is a dependency. So what did you do? Do you comment test modules differently?
Since test modules don’t really need a @moduledoc (Disclaimer: I’m not a seasoned veteran), I just put @moduledoc false so that Credo would shut up.
Having gained some experience since the last time I used Credo, what I would do now is to relax those rules a bit. Maybe disable the rule in the test modules at least (I don’t know the specifics of customizing Credo rules, but I know that it can be done to some degree or another).
But I don’t think there is a particularly compelling reason to require a @moduledoc tag for a test module. Like @dimitarvp said, if you need one, then use one. Otherwise, it’s just unnecessary cruft IMO.
EDIT: Relevant link with tips on removing the rule (if that’s your thing):