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

strict = true does not work in 0.22 #1003

Closed
tkf opened this issue Apr 27, 2019 · 0 comments · Fixed by #1014
Closed

strict = true does not work in 0.22 #1003

tkf opened this issue Apr 27, 2019 · 0 comments · Fixed by #1014
Milestone

Comments

@tkf
Copy link
Contributor

tkf commented Apr 27, 2019

It seems Documenter 0.22 does not fail on doctest failure even with strict = true?

$ julia --startup-file=no -q
shell> cat docs/src/index.md
# MyPlayground.jl

```jldoctest
julia> 1
2
```

shell> cat docs/make.jl
using Documenter
using MyPlayground

makedocs(
    sitename = "MyPlayground",
    modules = [MyPlayground],
    strict = true,
)

julia> include("docs/make.jl")
[ Info: SetupBuildDirectory: setting up build directory.
[ Info: ExpandTemplates: expanding markdown templates.
[ Info: CrossReferences: building cross-references.
[ Info: CheckDocument: running document checks.
┌ Error: doctest failure in src/index.md:3-6
│
│ ```jldoctest
│ julia> 1
│ 2
```
│
│ Subexpression:
│
│ 1
│
│ Output:
│
│ 2
│
│ Expected output:
│
│ 1
│
│   diff = 21
└ @ Documenter.DocTests ~/.julia/packages/Documenter/G5Sup/src/DocTests.jl:264
[ Info: Populate: populating indices.
[ Info: RenderDocument: rendering document.
[ Info: HTMLWriter: rendering HTML pages.

(v1.3) pkg> st Documenter
    Status `~/.julia/environments/v1.3/Project.toml`
  [e30172f5] Documenter v0.22.3
  [682c06a0] JSON v0.20.0

See the example run on Travis:

@mortenpi mortenpi added this to the 0.22.4 milestone Apr 28, 2019
mortenpi added a commit that referenced this issue May 8, 2019
The issue was introduced in #958, where the push!, which was hidden away
in the DocTests.report function, got accidentally removed. It is not
clear from its name that the report function should have a side-effect
like this, so it is cleaner if the push! calls are next to the report
calls, even if it creates slight code duplication.

Fix #1003
mortenpi added a commit that referenced this issue May 8, 2019
The issue was introduced in #958, where the push!, which was hidden away
in the DocTests.report function, got accidentally removed. It is not
clear from its name that the report function should have a side-effect
like this, so it is cleaner if the push! calls are next to the report
calls, even if it creates slight code duplication.

Fix #1003
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants