Hold files to their product's length

A page or source file longer than its product's limit is read in parts, and whoever reads part of a file has not read it. A product therefore declares the most lines its hand-written files may hold, and the directories they live in, in its .wisent-release.json:

"file_line_limit": { "lines": 300, "under": ["src/content/docs", "src/cli", "tests"] }

under names directories relative to the repository root; a file below one of them is judged, and a file elsewhere (a lock file, a generated command listing) is not. A product that declares no file_line_limit is not judged.

Every stado quality check of such a product, including the pre-push check (--pre-push) and the check of one revision (--revision), reads the files each checked revision adds lines to against the published main. A file under a declared directory that then holds more than lines and is longer than it was at the revision's published base is refused:

<revision> of <product> makes <N> file(s) longer past the <lines> lines its .wisent-release.json declares as file_line_limit for <directories>:
<path> holds <now> lines, <before> before this revision
Split each into files of their own, each within <lines> lines, then commit again.

<before> is 0 for a file the revision creates. Only growth is refused: a file already past the limit that a revision shortens or leaves as long passes, so files that were long before the limit was declared are split when they are next changed, not refused on every push.

Refusal Cause What to do
.wisent-release.json declares file_line_limit with lines 0, which no file can hold; … lines is 0 declare a whole number of lines above zero
.wisent-release.json declares file_line_limit with no directory under it holds; … under is an empty list name each directory whose files the limit holds
.wisent-release.json declares file_line_limit with the directory "", which is no path; … an entry of under is empty or only / write each directory as a path relative to the repository root
the manifest schema's refusal, naming file_line_limit, lines or under lines is not a whole number, under is not a list of text, or the declaration carries another key declare exactly {"lines": <number>, "under": [<directory>, …]}
unknown field file_line_limit, expected one of … the Stado running the check predates the declaration install a Stado that reads file_line_limit before a product declares it
git ls-tree failed, so how long <path> was at the published base <base> cannot be read: <git's words> (or git cat-file -p failed) the checkout's git could not read the base repair the checkout named in git's words, then check again
a file refusal whose action is reading a file the revision adds lines to, for its length, naming the file and the operating system's answer a file of the revision could not be read repair what the answer names

Source: this website