suppression

Excluding FxCop rule in source.

Hi, In a project I'm working on FxCop shows me lots of (and I mean more than 400) errors on the InitializeComponent() methods generated by the Windows Forms designer. Most of those errors are just the assignment of the Text property of labels. I'd like to suppress those methods in source, so I copied the suppression code generated by F...

Suppress the duplicate values in group, SSRS Reports

Hi, I have an SSRS report where the date should be grouped by project category the project code in the category is repeating in side the group how do I suppress the value Please help me to get an idea. Thanks,brijit ...

FxCop Suppression

I have a control on an Asp.Net page, on that page is a control with the name "PaReq" that violates the rule: CA1704:IdentifiersShouldBeSpelledCorrectly I've used suppression before I'm not sure how to suppress this error since it is defined in the generated file. I could do this in a custom dictionary but that would mean all the ...

How can you get FxCop rule CA1726 to ignore a prefered term?

FxCop has a rule (CA1726) that checks for preferred terms. This looks for words like "Dont" and tells you to replace them with better words like "Do not". Generally this is fine, however one of the terms it objects to is "Flag". At our firm, the business deals with Flags meaning those cloth things at the end of flagpoles. Suppressing thi...

Sourcesafe command line options

I am having an issue with the Microsoft Visual Sourcesafe command line options that I'm hoping someone has run across and can assist me with. I have the following line in a DOS batch file. "c:\Program Files\Microsoft Visual SourceSafe\ss.exe" GET "$/Development Projects/Activity" -GL"C:\Compile\Activity" -R -Q -Yname,passwor...

Exception clogging up my IDE

I'm scanning for dead links on one of my pages. On one i get many "A first chance exception of type 'System.Net.WebException' occurred in System.dll" Dozens of them. How do i have MSVC# NOT display them? i am catching all of these exceptions since i am testing the link (in fact its called testStatus, request only head and returns a bool ...

What event do I need to supress to stop IE from "Dinging" when I press enter in a text box?

On simple forms with one text box pressing enter submits the form (and this is great for easy search forms) However on a form with multiple fields, pressing Enter in an input="text" box won't do anything (e.g. submit) but in IE it "Dings" as if you have tried to delete an undeletable object. The question is... what event do I need to s...

Crystal Reports: Suppressing a field conditionaly according to group name in current page

Hi! I have a group named: "Group #1 Name" and as you know when viewing the report at the first page in Group 1 section we see the title of group but this is not appears in next page till we navigate to next group. Now i want to display the current Group Title navigating by user in the header of page to help user know currently is in witc...

gcc warning" 'will be initialized after'

I am getting a lot of these warnings from 3rd party code that I cannot modify. Is there a way to disable this warning or at least disable it for certain areas (like #pragma push/pop in VC++)? Example: list.h:1122: warning: `list<LogOutput*, allocator<LogOutput*> >::node_alloc_' will be initialized after list.h:1117: warning: `alloca...

Code analysis: Global project/assembly suppression

I have several CA1704:IdentifiersShouldBeSpelledCorrectly warnings that I want to suppress. Basically they refer to the company name which is deemed to be spelled incorrectly. The company name is part of several namespaces in my project, and in order to suppress all the warnings I need to add a lot of suppressions to the GlobalSuppressio...

Is there a way to circumvent CA1726:UsePreferredTerms?

I have a problem with the code analysis rule CA1726:UsePreferredTerms. Our business domain has two crucial concepts named Case and Flag. According to CA, it's apparently a deadly sin to use these names, however I really don't care since, as I said, they are crucial concepts in our domain model. CA complains not only about the type declar...

How can you suppress checkstyle checks within a block of code only for specific rules?

In turning off Checkstyle for a segment of code, is there a syntax that would supress only specific checks. So rather than just // CHECKSTYLE:OFF code // CHECKSTYLE:ON you could have something like // CHECKSTYLE:OFF:RequireThis, code // CHECKSTYLE:ON In cases where we are purposely making an exception to the style, it would be nice ...

FXCop Suppress Warning CA1800 (Unnecessary Casts)

I have the following code: [SuppressMessage( "Microsoft.Performance", "CA1800:DoNotCastUnnecessarily" )] private static void SetTestConnectionString( Component table ) { if( table is Object1 ) { fn1( (Object1)table ); } // ... a few more if statements for different Classes } However, when I run FxCop over this ...

No overload for 'insert_method_here' matches delegate 'System.EventHandler'

I am trying to build a program that has a button, and everytime that button is clicked, it moves the button and adds to the score. However, I am trying to disable the Enter key, or suppress the command when pressed. Here is what I have so far private void button1_Click(object sender, EventArgs e, KeyEventArgs k) { if (k.KeyC...

"Suppress Warning" menuitem in Visual Studio 2010 is not available

Hi all, I'm using Visual Studio 2010 Ultimate, and it seems that I cannot suppress warnings in the way I used in VS2008. My project is in C#, and when I right click a warning in the "Error List" window (e.g. for a missing XML-comment of a public type), I do not have the usual menu item to suppress this warning (neither in code nor in ...