A local variable or parameter starts with a capital letter
What it finds
.NET names locals and parameters in camelCase, so that they stand apart from types, properties and methods, which are PascalCase. Names written entirely in capitals, such as ID or X, are left alone.
From the rule's source, local_name_casing.rs.
class Totals{ int Sum(int First, int second)tx0 reports: First starts with a capital letter { int Total = First + second;tx0 reports: Total starts with a capital letter int ID = 1; return Total + ID; }} 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:local-name-casing" = "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:local-name-casing] reason="..."tx0 explain tx0/csharp:local-name-casing shows the same in the terminal. Found a false positive? Report it.