The only top-level type of a file has a name different from the file
What it finds
When OrderService.cs declares CustomerService, searching the tree by file name finds the wrong thing. Generic types, written as `Cache1.cs` or Cache{T}.cs, and partial types split over files such as Parser.Expressions.cs, match by the part before the first ., -, _, backtick or {`.
From the rule's source, type_name_differs_from_file.rs.
Turn it on, off or suppress it
The rule runs from the all tier up. To turn it on in a lower tier, give it a level in tx0.toml:
[rules]
"tx0/csharp:type-name-differs-from-file" = "warning"To keep one finding, suppress it with a reason. tx0 suppress ID --reason "..." writes the comment on the line before the code:
// tx0: ignore[tx0/csharp:type-name-differs-from-file] reason="..."tx0 explain tx0/csharp:type-name-differs-from-file shows the same in the terminal. Found a false positive? Report it.