Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [code-analysis]

Code Analysis is the process of analyzing the code of the application to discover, review, validate or verify certain properties of the application. This is useful during the process of development and for testing the application before it is put in production mode, especially for checking the security related aspects.

code-analysis
2 votes
0 answers
79 views

What is the Time Complexity of a function if there is an upper limit to the variable

I have the following piece of code. void foo(int n){ n=n*n; for (int i=0;i<n;i++){ if(n<10) cout << i; else break; } } Now I wanted to ask if the time complexity ...
Muhammad Taha Ali's user avatar
1 vote
0 answers
19 views

Can I use Microsoft's CA3001 code analysis rule in .NET Framework?

Can I use Microsoft's CA3xxx code analysis rules in .NET Framework 4.x? They don't show up in my ruleset: Is there a way to bring them in? Is this documented anywhere? SO and Google searches are ...
Patrick Szalapski's user avatar
0 votes
0 answers
47 views

White-Listing specific words for Code Analysis rule IDE1006: "These words must begin with upper case characters"

In a C# / .NET project, we have enabled Code Analysis during the build. We use the .editorconfig to customize which rules are enabled/disabled, and the severity (suggestion/warning/error). One rule ...
Saqib's user avatar
  • 7,372
0 votes
1 answer
121 views

How I can run code analysis in .NET 6 / 8 application on Debug -> Start

I'm trying to configure my .NET 6 / 8 projects to run code analysis also on Debug => Start Debugging (F5) or Debug => Start Without Debugging (ctrl+F5) , but I can't do that. Writing something ...
Faber's user avatar
  • 2,194
0 votes
0 answers
65 views

Some code analysis IDE* rules stops build only in buld server but not on local machine

I have .editorconfig file for example with this one rule dotnet_diagnostic.IDE0018.severity = error I have Directory.Build.props with <Project> <PropertyGroup> <LangVersion>...
Raptor's user avatar
  • 402
0 votes
1 answer
858 views

Are there any way to export Sonarlint report from Intellij?

I generated the Sonarlint report in Intellij. But there is no any options to export as document. Is it possible to export a report in Intellij?
Dhushy_A's user avatar
1 vote
1 answer
166 views

generate incoming call graph

I'm trying to pretty print the method calls until a specific method for example let's take "DisplayHelp" from this simple random repository I expect for something like Shell.ctor -> ...
ravid's user avatar
  • 39
0 votes
1 answer
156 views

Find line of text in MsgBox with a string literal with VBA regex

I want to know if a line of code in a certain format exists in a workbook's modules, in this case a MsgBox with a string literal, by VBA regex. pattern1 is found, but pattern2 is not found even when ...
Noam Brand's user avatar
0 votes
0 answers
120 views

Don't resolve typedefs in Visual Studio 2022 tooltips

My program includes OpenCV headers. As a result, Visual Studio resolves a simple std::vector<int> as this: How can I force Visual Studio to ignore typedefs when detecting the type of a variable?...
Arno's user avatar
  • 301
-1 votes
1 answer
827 views

Disable "Code analysis" in Visual Studio Code with C++

(Note: this EDITed version is a truncated part of the original OP (kept at the bottom), after this correct comment. Two separate questions 1 and 2 were also posted. All this improves SO.) I am slowly ...
sancho.s ReinstateMonicaCellio's user avatar
1 vote
0 answers
36 views

error CS1056: Unexpected character '$' during code analysis [duplicate]

When I am running the build in C# code analysis from the command line with msbuild on some code I get: (CoreCompile target) -> SLIP.cs(10,51): error CS1056: Unexpected character '$' [....Libraries....
Gerhard's user avatar
  • 7,013
2 votes
1 answer
129 views

Generate a 'readonly record struct' using Roslyn

I can't generate a readonly record struct using Roslyn. My code: using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; var tree = SyntaxFactory.CompilationUnit() .AddMembers( ...
ASi's user avatar
  • 23
-2 votes
1 answer
166 views

How can I see debug info about the VS Code Cpptools extension's IntelliSense and Code Analysis?

I've setup VS Code with the ms-vscode.cpptools extension to open my C++ project and I see the IntelliSense and Code Analysis tools running. But I never see anything in my code to suggest they're ...
parsley72's user avatar
  • 8,889
1 vote
0 answers
229 views

dotnet Code Analysis ignoring certain entries in .editorconfig file

In a test project I am trying to ignore certain Code Analysis warnings, but I am struggling to understand what I am missing. I have a simple dotnet6.0 console app with the following structure. Project ...
William James's user avatar
0 votes
2 answers
504 views

How can you distinguish between a standard library call, a third-party library call, and an API call from the repository?

I am working on a project where I have to determine whether a particular call or import is: From the standard library of the language (Python) I'm using. (I am already considering to use sys....
Exploring's user avatar
  • 3,051

15 30 50 per page
1
2 3 4 5
126