Name the four kinds of breach, the two level rules and the round title's spelling, and table the step-up rules
This commit is contained in:
@@ -29,8 +29,11 @@ def committed_file_breaches(directory: str) -> list[Breach]:
|
||||
known = set(before.splitlines())
|
||||
added = "\n".join(line for line in after.splitlines() if line not in known)
|
||||
breaches += [dataclasses.replace(breach, marked=added) for breach in file_breaches(path, before, added, after)]
|
||||
# The index copy and the work-tree copy of a file can breach the same way; the first stands.
|
||||
return list({(breach.rule, breach.detail): breach for breach in reversed(breaches)}.values())[::-1]
|
||||
# The work-tree copy and the index copy of a file can breach the same way; the first found, the work tree's, stands.
|
||||
first: dict[tuple[str, str], Breach] = {}
|
||||
for breach in breaches:
|
||||
first.setdefault((breach.rule, breach.detail), breach)
|
||||
return list(first.values())
|
||||
|
||||
|
||||
def tracked_names(top: str) -> set[str]:
|
||||
|
||||
Reference in New Issue
Block a user