Quantcast
Channel: MSBuild forum
Viewing all articles
Browse latest Browse all 2763

StyleCop warning not suppressed

$
0
0

I want to suppress stylecop warnings for a method. So I added the following SuppressMessage:

[SuppressMessage("Microsoft.StyleCop.CSharp.Naming", "SA1306:FieldNamesMustBeginWithLowerCaseLetter", Justification = "MDS tables names need to be in capital letters")]
internal static class OffersDataProcessor
{
    public static async Task<List<Offer>> RetrieveAndProcessOffersAsync(string BaseUrl, string baseUrlKey)
    {
       ...
    }
    ...
}

But this is still giving a warning on a console build: D:\ProjectSolutionDir\ProjectSolution\Helpers\OffersDataProcessor.cs(26, 1): warning : SA1306 : CSharp.Naming : Variable names and private field names must start with a lower-case letter: BaseUrl. [D:\ProjectSolutionDir\ProjectSolution.csproj]

The line 26, 1 is where BaseUrl is present. I added the CODE_ANALYSIS symbol as described in this link:

http://www.codeproject.com/Articles/281404/Suppressing-Code-Analysis-Warning

But that didn't help either.

Should I add something else to suppress the warnings?

Thanks!

Viewing all articles
Browse latest Browse all 2763


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>