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

Erroneous Errors with checkdocs #2545

Open
pulsipher opened this issue Jul 3, 2024 · 0 comments
Open

Erroneous Errors with checkdocs #2545

pulsipher opened this issue Jul 3, 2024 · 0 comments

Comments

@pulsipher
Copy link

pulsipher commented Jul 3, 2024

Upon updating InfiniteOpt.jl to use checkdocs, I have found that a number docstrings are erroneously detected as not being included in the manual. All these seem to boil down to two types of functions:

First, functions with an abstracted array argument:

"""
   my_func(arr::Vector{<:Real})::Int

Here is a cool docstring.
"""
my_func(arr::Vector{<:Real}) = 42

which I include my docs via a syntax like:

```@docs
my_func(::Vector{<:Real})
```

Second, functions with an optional final positional argument:

"""
   my_func2(a::Int, b::Int = 1)::Int

Here is a cool docstring.
"""
my_func2(a::Int, b::Int = 1) = a + b

which I include in the docs as

```@docs
my_func2(::Int, ::Int)
```

To build the docs, I set warnonly = true and get a warning like:

┌ Warning: 2 docstrings not included in the manual:
│ 
│     MyPkg.my_func :: Tuple{Vector{var"#s108"} where {var"#s108"<:Real}}
│     MyPkg.myfunc2 :: Union{Tuple{Int}, Tuple{Int, Int}}
│ 
│ These are docstrings in the checked modules (configured with the modules keyword)
│ that are not included in canonical @docs or @autodocs blocks.
└ @ Documenter ~/.julia/packages/Documenter/qoyeC/src/utilities/utilities.jl:46

which seems to suggest that the manual is missing docstring entries for myfunc and myfunc2. However, the generated webpages do in fact include the docstrings as expected where I included them in the @docs entries.

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

1 participant