pub fn check_directory_name_consistency(
parsed: &[ParsedFile],
) -> Result<(), Vec<(PathBuf, CompileError)>>Expand description
Within a multi-file unit (i.e., 2+ files in the same directory that share a qualified name), every file must declare exactly the same name.
In v0.4 the same directory may contain multiple single-file units (one
commons and one context, say), provided each file’s path matches the
last segment of its declared qualified name. Mixed-name files in one
directory are only flagged when they collide on the same name (handled by
check_group_kind_consistency) or when path/name alignment fails.
Each error is paired with the project-relative identity_path of the file
its primary span belongs to (#696) so the CLI can render it against that
file’s source. The “first file” it compares against is a different file, so
its location is carried as a note (not a label, which would underline this
file’s own text).