def unread
import bolt@1.27.0.0/src/lint/plan.bend as Planimport Base
import bolt@1.27.0.0/src/finding.bend as F
358# one finding for each source that could not be read
359def unread(gs: List<&2, Got>) -> List<&2, F.Finding>:
360 match gs:
361 case Nil{}:
362 Nil{}
363 case Con{Got{+path, None{}}, rest}:
364 F.Finding{path, 0, 0, 0, "read", "Cannot read this file."} <> unread(rest)
365 case Con{Got{_path, Some{_text}}, rest}:
366 unread(rest)