Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

public_member_api_docs should also highlight library statements. #4962

Open
sigurdm opened this issue May 2, 2024 · 3 comments
Open

public_member_api_docs should also highlight library statements. #4962

sigurdm opened this issue May 2, 2024 · 3 comments
Labels
lint-request P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug

Comments

@sigurdm
Copy link
Contributor

sigurdm commented May 2, 2024

See dart-lang/pana#1355 for a bit of discussion

image
@jonasfj
Copy link
Member

jonasfj commented May 2, 2024

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.

@srawlins
Copy link
Member

srawlins commented May 2, 2024

As this would be a massively breaking, impossible-to-land change, I think this will take the shape of a new lint rule 😄

@bwilkerson
Copy link
Member

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?

@srawlins srawlins added type-enhancement A request for a change that isn't a bug lint-request P2 A bug or feature request we're likely to work on labels May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lint-request P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

4 participants