diff options
| author | Théo Zimmermann | 2020-05-16 19:09:39 +0200 |
|---|---|---|
| committer | Théo Zimmermann | 2020-05-16 19:09:39 +0200 |
| commit | 05e811a81de90ce698c4f0317d549dc01dc13e17 (patch) | |
| tree | 1f963703d2f4930737c51bfa954e493a643bcd11 /tools | |
| parent | accac86855ce0ca6e5e18efe88aeb7d46785fcc6 (diff) | |
| parent | 632f709b95f4fa47e86e5c498b995eb9c2cf2ff6 (diff) | |
Merge PR #12277: Checking validity of coqdoc file name (fixes #12265)
Reviewed-by: Zimmi48
Ack-by: randomdross
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/coqdoc/dune | 2 | ||||
| -rw-r--r-- | tools/coqdoc/main.ml | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/tools/coqdoc/dune b/tools/coqdoc/dune index 9c0a6ccffe..e3c792f277 100644 --- a/tools/coqdoc/dune +++ b/tools/coqdoc/dune @@ -9,6 +9,6 @@ (name main) (public_name coqdoc) (package coq) - (libraries str coq.config)) + (libraries str coq.config coq.clib)) (ocamllex cpretty) diff --git a/tools/coqdoc/main.ml b/tools/coqdoc/main.ml index 1be247366d..6ebf9b71d6 100644 --- a/tools/coqdoc/main.ml +++ b/tools/coqdoc/main.ml @@ -127,6 +127,9 @@ let rec name_of_path p name dirname suffix = let coq_module filename = let bfname = Filename.chop_extension filename in let dirname, fname = normalize_filename bfname in + let _ = match Unicode.ident_refutation fname with + | Some err -> eprintf "\ncoqdoc: not a valid filename %s.v\n" fname; exit 1 + | None -> () in let rec change_prefix = function (* Follow coqc: if in scope of -R, substitute logical name *) (* otherwise, keep only base name *) |
