no-empty-attribute-parens
What it does
Section titled “What it does”Reports an attribute with empty parentheses: [Foo()] is [Foo]. Parentheses with a comment in them are not reported. The fix removes the parentheses.
Why it matters
Section titled “Why it matters”The parentheses add two characters and no meaning: the attribute is constructed in both cases with its parameterless constructor.
Example
Section titled “Example”...class C { [A(), B] void F([A, B] int p) { } [A, // why...Configuration
Section titled “Configuration”csharp: lint: rules: no-empty-attribute-parens: warn # off (default), warn, errorEnabled by the presets: csharp/stylecop.
Suppress one line with sudsy-disable-next-line no-empty-attribute-parens in a comment of the file’s language.
Upstream equivalents
Section titled “Upstream equivalents”The same check in other tools; Sudsy reports what each upstream rule reports.
| Tool | Rule | Match |
|---|---|---|
| StyleCop | SA1411 |
full |