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

Warn about comments between docstring and the documented object? #46067

Open
mgkurtz opened this issue Jul 16, 2022 · 0 comments
Open

Warn about comments between docstring and the documented object? #46067

mgkurtz opened this issue Jul 16, 2022 · 0 comments
Labels
docsystem The documentation building system

Comments

@mgkurtz
Copy link
Contributor

mgkurtz commented Jul 16, 2022

I was quite puzzled to find out, that comments between docstrings and the documented objects are disallowed. As where @pfitzseb and @simeonschaub in JuliaDebug/JuliaInterpreter.jl/issues/538. This is actually the documented behavior and was discussed some time ago. But besides @JeffBezanson’s argument, that “it would be pretty confusing if a string still acted as a doc string despite any number of intervening blank and comment lines” the discussion did not cover the point of comments between doc string and documented object.

"The great foo"
# TODO: Implement this properly.
foo = 42

Here "The great foo" does nothing at all. So I wonder, whether code, that does nothing but has a chance to have been intended to do something (document foo) could perhaps throw a warning? That could help confused people like me, to find out, what they did wrong.

@rfourquet rfourquet added the docsystem The documentation building system label Sep 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docsystem The documentation building system
Projects
None yet
Development

No branches or pull requests

2 participants