Skip to content

Commit

Permalink
fixup! fixup! [#56] Dump all the errors from different files
Browse files Browse the repository at this point in the history
  • Loading branch information
Sereja313 committed Sep 23, 2022
1 parent 069434e commit ea21a9e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions src/Xrefcheck/Command.hs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import Xrefcheck.CLI (Options (..), addTraversalOptions, addVerifyOptions, defau
import Xrefcheck.Config (Config (..), ScannersConfig (..), defConfig, normaliseConfigFilePaths)
import Xrefcheck.Core (Flavor (..))
import Xrefcheck.Progress (allowRewrite)
import Xrefcheck.Scan (FormatsSupport, scanRepo, specificFormatsSupport, ScanResult (..))
import Xrefcheck.Scan (FormatsSupport, scanRepo, specificFormatsSupport, ScanResult (..), ScanError (..))
import Xrefcheck.Scanners.Markdown (markdownSupport)
import Xrefcheck.System (askWithinCI)
import Xrefcheck.Verify (verifyErrors, verifyRepo)
Expand Down Expand Up @@ -63,7 +63,7 @@ defaultAction Options{..} = do
when oVerbose $
fmtLn $ "=== Repository data ===\n\n" <> indentF 2 (build repoInfo)

unless (null scanErrs) $ reportScanErrs scanErrs
unless (null scanErrs) . reportScanErrs $ sortBy (compare `on` seFile) scanErrs

verifyRes <- allowRewrite showProgressBar $ \rw -> do
let fullConfig = addVerifyOptions (cVerification config) oVerifyOptions
Expand Down
32 changes: 16 additions & 16 deletions tests/golden/check-scan-errors/expected.gold
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
=== Scan errors found ===

➥ In file ./check-second-file.md
➥ In file ./check-scan-errors.md
scan error at src:9:1-30:

⛀ Annotation "ignore file" must be at the top of markdown or right after comments at the top


➥ In file ./no_paragraph_eof.md
scan error at src:9:1-36:
➥ In file ./check-scan-errors.md
scan error at src:13:1-36:

⛀ Expected a PARAGRAPH after "ignore paragraph" annotation, but found EOF
⛀ Expected a PARAGRAPH after "ignore paragraph" annotation, but found HEADING


➥ In file ./no_link_eof.md
scan error at src:9:1-31:
➥ In file ./check-scan-errors.md
scan error at src:17:1-31:

⛀ Expected a LINK after "ignore link" annotation


➥ In file ./check-scan-errors.md
scan error at src:9:1-30:
scan error at src:21:1-50:

Annotation "ignore file" must be at the top of markdown or right after comments at the top
Unrecognised option "unrecognised-annotation" perhaps you meant <"ignore link"|"ignore paragraph"|"ignore file">


➥ In file ./check-scan-errors.md
scan error at src:13:1-36:
➥ In file ./check-second-file.md
scan error at src:9:1-30:

Expected a PARAGRAPH after "ignore paragraph" annotation, but found HEADING
Annotation "ignore file" must be at the top of markdown or right after comments at the top


➥ In file ./check-scan-errors.md
scan error at src:17:1-31:
➥ In file ./no_link_eof.md
scan error at src:9:1-31:

⛀ Expected a LINK after "ignore link" annotation


➥ In file ./check-scan-errors.md
scan error at src:21:1-50:
➥ In file ./no_paragraph_eof.md
scan error at src:9:1-36:

Unrecognised option "unrecognised-annotation" perhaps you meant <"ignore link"|"ignore paragraph"|"ignore file">
Expected a PARAGRAPH after "ignore paragraph" annotation, but found EOF


Scan errors dumped, 7 in total.
Expand Down

0 comments on commit ea21a9e

Please sign in to comment.