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

Detect if a name has a docstring #51169

Closed
jariji opened this issue Sep 3, 2023 · 1 comment
Closed

Detect if a name has a docstring #51169

jariji opened this issue Sep 3, 2023 · 1 comment

Comments

@jariji
Copy link
Contributor

jariji commented Sep 3, 2023

I want to check all my functions have docstrings but there is no function to check for a docstring.

@stevengj proposes

hasdoc(mod::Module, sym::Symbol) = 
    haskey(Base.Docs.meta(mod), Base.Docs.Binding(mod, sym))

which could go in Test or Docs.

@stevengj
Copy link
Member

stevengj commented Sep 4, 2023

Close as duplicate of #51174, which has a more robust version of hasdoc

@stevengj stevengj closed this as completed Sep 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants