In my GlobalSuppression.cs
I often end up with long justifications. I want those to span multiple lines, but don't want to gloabally suppress SA1118. Ideally it would be something like this:
[module: SuppressMessage(
"Microsoft.Design",
"CA1056:UriPropertiesShouldNotBeStrings",
Justification = @"
A really long multi-line
justification for suppressing
this.")]
[module: SuppressMessage(
"StyleCop.CSharp.ReadabilityRules",
"SA1118:ParameterMustNotSpanMultipleLines",
Justification = "Justifications can get long.",
Scope = "type",
Target = "GlobalSuppression")]
But that doesn't seem to work. If I take off the Scope
and Target
it does.
On a side note, the syntax for Target is really cryptic. I would love to find a reference or some instructions on how to generate proper Target
strings by hand (i don't use Visual Studio).