fix warnings/hints in nimdoc/tester.nim (#18083)

* fix warnings/hints in nimdoc/tester.nim

* improve err msg for nimdoc/tester.nim and change flag from fixup to nimTestsNimdocFixup

* address comment: put back quit instead of doAssert
This commit is contained in:
Timothee Cour 2021-05-30 13:40:42 -07:00 • committed by GitHub
commit e2ab08603d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 13 deletions

View file

@ -131,6 +131,7 @@ when true:
# BUG: this currently this won't be run since not exported
# but probably should
doAssert false
if false: bazNonExported() # silence XDeclaredButNotUsed
proc z17*() =
# BUG: a comment before 1st doc comment currently doesn't prevent
@ -212,7 +213,7 @@ when true: # tests RST inside comments
when true: # multiline string litterals
proc tripleStrLitTest*() =
runnableExamples:
runnableExamples("--hint:XDeclaredButNotUsed:off"):
## mullitline string litterals are tricky as their indentation can span
## below that of the runnableExamples
let s1a = """
@ -252,12 +253,12 @@ at indent 0
when true: # methods; issue #14691
type Moo = object
method method1*(self: Moo) =
method method1*(self: Moo) {.base.} =
## foo1
method method2*(self: Moo): int =
method method2*(self: Moo): int {.base.} =
## foo2
result = 1
method method3*(self: Moo): int =
method method3*(self: Moo): int {.base.} =
## foo3
1