Skip to main content

Module consistency

Module consistency 

Source

Functions§

check_directory_kind_consistency
Within a multi-file unit (files sharing a qualified name), every file must agree on kind. Handled by check_group_kind_consistency; this check is the v0.4-style directory-level guard which now defers to it.
check_directory_name_consistency
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.
check_group_kind_consistency
Files grouped by qualified name must agree on kind (even across directories).
check_group_module_docs
#1885 (DECISION D): a unit split across files carries at most one module doc — the doc-block above its header. Two or more would have to be joined in some file order, which readers would not expect, so each file that carries one gets bynk.project.duplicate_module_doc, naming every such file (paths /-joined on every platform).
check_path_name_alignment
Each file’s relative path must match its declared qualified name. Two arrangements are valid: