Open sigurdm opened 4 months ago
This should only apply to library
statements in public libraries.
Meaning, it doesn't have to apply to files in:
bin/
,lib/src/
test/
example/
hook/
Basically, only files in lib/
excluding lib/src/
.
It's also entirely reasonable that we should complain about missing library statement. Because all libraries will have a documentation page, even if they don't have a library statement.
As this would be a massively breaking, impossible-to-land change, I think this will take the shape of a new lint rule 😄
I agree, a new lint is probably the best path forward, maybe something like public_library_api_docs
. I'm not sure I'd restrict it to public libraries that have a library
directive, though. Seems like all public libraries should have docs?
See https://github.com/dart-lang/pana/issues/1355 for a bit of discussion