Top "Code-analysis" questions

Code Analysis is the process of analyzing the code of the application to discover, review, validate or verify certain properties of the application.

'SuppressMessage' for a whole namespace

I use underscores for my test methods for a better readability and I want to suppress FxCop errors/warnings for …

c# .net namespaces code-analysis fxcop
Enabling Microsoft's Code Analysis on .NET Core Projects

Our team uses the Code Analysis feature with a custom ruleset to cause our build to fail if we forget …

c# code-analysis roslyn-code-analysis
How to sanitize and validate user input to pass a Checkmarx scan

I have an endpoint that receives a String from the client as seen below: @GET @Path("/{x}") public Response doSomething(@…

java security code-analysis static-code-analysis checkmarx
How to fix the following PMD violations

I am using PMD to analyze code and it produces a few high priority warnings which I do not know …

java code-analysis static-analysis pmd
How to suppress code analysis messages for all type members?

Let's say I have an enumeration of all currencies: public enum CurrencyType { /// <summary> /// United Arab Emirates dirham /// </…

c# .net code-analysis roslyn fxcop
What tools and techniques do you use to find dead code?

What tools and techniques do you use to find dead code in .NET? In the past, I've decorated methods with …

c# .net refactoring code-analysis
RunCodeAnalysis=true not working in command prompt (MSBuild)

I'm trying to get msbuild to output code analysis info like it does in VS. I have a configuration for …

configuration msbuild code-analysis static-code-analysis
Finding all references to a method with Roslyn

I'm looking to scan a group of .cs files to see which ones call the Value property of a Nullable&…

c# code-analysis roslyn findall
How to suppress StyleCop error SA0102 : CSharp.CsParser : A syntax error has been discovered in file when using generic type parameters attributes

Having the following C# code with generic type parameter attribute: [System.AttributeUsage(System.AttributeTargets.GenericParameter)] public class GenericParameterAttribute : System.Attribute { } …

c# generics code-analysis stylecop
Whats the difference between NP and co-NP

I know their complete counterparts mean that NP - complete is the hardest in the NP problems and co-NP-complete means …

algorithm code-analysis np