Add a quality gate for tests, Clippy, and the model sources

This commit is contained in:
Thorsten Sommer committed 2026-09-13 11:42:10 +02:00
1 parent caf2aba4b9
commit 58b9aa42f9
10 files changed
+484 -7

No files matched your search

@@ -265,7 +265,15 @@ public sealed class ModelRuleBuilder(string patternText, ModelRuleKind ruleKind,
/// <returns>The rule, to go on stating.</returns>
public ModelRuleBuilder Rank(int rank, string reason)
{
_ = reason;
//
// Asking for a reason is what the second parameter does; insisting that it says something
// is what keeps an empty string from passing for one. Without this, the way to write a rank
// nobody can account for is still open, and it is the one thing the computed specificity
// exists to get rid of.
//
if (string.IsNullOrWhiteSpace(reason))
throw new ArgumentException($"The rule \"{patternText}\" of {origin} sets the rank {rank} without saying what the computed specificity gets wrong here.", nameof(reason));
this.explicitRank = rank;
return this;
}