Skip to content

Commit ec0ac07

Browse files
committed
New policy: no readmePrefix in dirs without Holmakefile
1 parent e6233d3 commit ec0ac07

File tree

10 files changed

+8
-4
lines changed

10 files changed

+8
-4
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.

developers/readme_gen.sml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,8 +310,14 @@ fun run_full_check () = let
310310
if p = path then "." else remove_prefix (path ^ "/") p
311311
fun check_dir p =
312312
case read_all_lines (p ^ "/Holmakefile") of
313-
NONE => ()
314-
| SOME lines =>
313+
NONE => (* case: Holmake file does not exist *)
314+
let
315+
val _ = assert_for_lines_of (p ^ "/" ^ PREFIX_FILENAME)
316+
(not o Option.isSome)
317+
(fn s => "File not allowed to exist: " ^ s ^ "\n" ^
318+
"Such files are only allowed in directories with a Holmakefile.\nFix: rename the file to " ^ OUTPUT_FILENAME)
319+
in () end
320+
| SOME lines => (* case: Holmake file exists *)
315321
let
316322
val _ = assert_for_lines_of (p ^ "/" ^ PREFIX_FILENAME)
317323
Option.isSome (fn s => "Missing file: " ^ s)
File renamed without changes.
File renamed without changes.

unverified/ocaml-syntax/readmePrefix

Lines changed: 0 additions & 2 deletions
This file was deleted.
File renamed without changes.

0 commit comments

Comments
 (0)