Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
175 views

I am applying code analysis rules to a C# project and am trying to evaluate the merits of CA1859: Use concrete types when possible for improved performance. Performance is only one consideration here, ...
Neil T's user avatar
  • 3,351
0 votes
1 answer
37 views

As part of the CI/CD for our project we run code coverage analysis on the pipeline using a similar command to: dotnet test D:\a\1\s\OurSln.sln --logger trx --results-directory D:\a\_temp --...
something5143's user avatar
-1 votes
1 answer
96 views

Given the below code, how would I access the myVar declaration, using pygccxml? #include <windows.h> void someFunction() { LPBYTE myVar; }
fwrgcannpve's user avatar
0 votes
0 answers
13 views

We have a monolithic application and we want to create multiple service based projects(REST APIs). Is there a product available in market which can measure some of the improvements such as How much ...
Sanjay's user avatar
  • 313
0 votes
1 answer
61 views

Very strange message when analyzing the source code. int? x; if (x == null) { // } The operand can't be null, so the condition is always 'true'. Remove the condition.dartunnecessary_null_comparison ...
mezoni's user avatar
  • 11.3k
2 votes
1 answer
233 views

I have a .NET project that references a library from another project via an internal NuGet server. The referenced project uses third party code analyzers (StyleCop) also referenced via NuGet and does ...
Kyle McClellan's user avatar
1 vote
2 answers
93 views

Is it possible to tell Visual Studio to not analyze a specific file? In this case, GlobalSuppressions.cs. I can't find any setting for it in options. I'm also trying to avoid messing up my code with ...
SteinTech's user avatar
  • 4,144
0 votes
1 answer
70 views

I have a function in my code. I need to count the lines of code in its call tree. That is, I need to count the number of lines in this function, plus all the lines of code in the functions it calls, ...
Rodion Degtyar's user avatar
0 votes
0 answers
57 views

I want to know if it is possible to create custom code analyzer for TypeScript like you can for C# and VB# with Roslyn? Are there some frameworks/projects I can leverage to do access AST and semantic ...
SENya's user avatar
  • 1,492
2 votes
1 answer
64 views

I would like to know if it is possible to add custom code analyzer for F# like you can for C# / VB# with Roslyn? Are there some frameworks/projects I can leverage to do it? In addition, I would like ...
SENya's user avatar
  • 1,492
1 vote
1 answer
178 views

The note quoted in the title can often be found in the documentation of GTk4. My question is this: Is there a technical way to check a program to determine whether all relevant data has been duly ...
Holger's user avatar
  • 1,200
1 vote
0 answers
104 views

In the following C code the code analysys (the one from C/C++ vscode extension) highlights an error on DEFINE_INDEXING_FUNCTION macro, but when I compile the code with GCC (gcc -Wall -Wextra filename....
yurich's user avatar
  • 157
1 vote
1 answer
727 views

how to convert this values into sarif Vulnerablilites: { "id": "66c5b89700fbf372c2f1f182", "method": "post", "path": "/user", "type&...
cloudnetwork's user avatar
5 votes
0 answers
153 views

I am trying to verify with jqassistant that we only implement logback (and slf4j) for logging. I'm using version: 2.4.0 and the analyze goal seems to be successful but it shouldn't be. For testing ...
Rensykes's user avatar
2 votes
1 answer
99 views

I'm experiencing an unexpected shut down with jqassistant 2.4.0. Neo4J is provoking a fatal exception. Interestingly with jqassistant 2.0.10 I'm not experiencing this problem. I have an application ...
Rensykes's user avatar
2 votes
0 answers
95 views

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
49 views

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
2 votes
1 answer
80 views

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,442
1 vote
1 answer
571 views

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,204
1 vote
0 answers
110 views

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
  • 442
0 votes
1 answer
2k views

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
282 views

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
166 views

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
144 views

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
  • 431
0 votes
1 answer
3k views

(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
42 views

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,212
2 votes
1 answer
241 views

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
0 votes
1 answer
586 views

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
  • 9,317
3 votes
0 answers
347 views

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
725 views

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,683
4 votes
0 answers
575 views

According to this documentation I can decorate a method with NotNullIfNotNull attribute. However the following code does not work: using System.Diagnostics.CodeAnalysis; var a = await Test("abc&...
Luke Vo's user avatar
  • 21.6k
3 votes
2 answers
168 views

I'm trying to retrieve a type of Byte for a unit test, yet when I do a simple cast as shown below, I get the code analysis info in VS that the cast is redundant. Why? Clearly the cast is needed to ...
rory.ap's user avatar
  • 35.7k
0 votes
1 answer
55 views

I have a generic method that ensures an IEnumerable is not null or empty. public static void IsNotNullOrEmpty<T>(IEnumerable<T> enumerable) { if (enumerable == null || !enumerable.Any()...
user246392's user avatar
  • 3,147
0 votes
1 answer
906 views

I'm trying to perform Code Quality test using GitLab CQ tool applying to my .NET 7 project. I'm a quite new it this, so, firstly I added default trigger to my .gitlab-ci.yml for getting this job ...
anatol's user avatar
  • 1,810
0 votes
1 answer
73 views

I'm referencing the BlingFireNuget package in my csproj. It adds a bunch of files to my project, including a couple cs files, like BlingFireUtils.cs. These are adding hundreds of code analysis ...
UnionP's user avatar
  • 1,768
0 votes
2 answers
381 views

I've got the instruction to understand a MIPS - code. One line of it is the following one: and $t6, $zero, $zero Which purpose does it have ? There is the and - instruction of two zero - constants. So ...
Coder's user avatar
  • 11
-2 votes
1 answer
4k views

As the below code is having nested if conditions, sonarcube complexity is increasing. Need to reduce the cognitive complexity from 33 to 15 allowed. I have tried placing only one try block and one ...
A R's user avatar
  • 11
2 votes
0 answers
144 views

Warning C6386, as described by Microsoft, "...indicates that the writable extent of the specified buffer might be smaller than the index used to write to it. This defect can cause buffer overrun&...
yuno's user avatar
  • 29
0 votes
1 answer
698 views

I have some C# solutions which use StyleCop analyser and Ruleset file with some custom rules. Then I have updated Visual Studio from 17.4 to 17.5.1 and ReSharper stopped tracking violations of rules. ...
Lgeprorok's user avatar
  • 115
0 votes
1 answer
403 views

I was looking (hoping) for a simple mapping from each android OS version to a version of Java. More specifically. I am focusing on the Android OS side (not the application side), the ART: what version ...
triom's user avatar
  • 11
0 votes
1 answer
137 views

The following code doesn't produce any warning or error: int? test1 = null; var test2 = test1 + 123; test1++; var test3 = test1; test2 and test3 end up being null. I find this rather unintuitive and ...
Jez's user avatar
  • 30.5k
1 vote
1 answer
4k views

I am new to sonarqube and I don't understand how it works. I have downloaded the latest sonarqube image, I run a simple container and the application starts, everything ok. Community Edition Version 9....
Manu's user avatar
  • 91
0 votes
0 answers
54 views

I am making a PyCharm plugin that will generate code examples based on a Python class. The user will be able to select a class and the plugin will generate code examples that utilise the attributes ...
Svetoslav Tsenov's user avatar
3 votes
0 answers
271 views

We have implemented weather API controller to update weather data and inherited ControllerBase in API controller with APIController action filter like below and enabled security code scan. using ...
Amrutha's user avatar
  • 31
0 votes
0 answers
57 views

In one of our .net Projects we have a Build/Publish discrepancy. The Build succeeds but the publish fails. The reason for that: We have a lot of shared Projects which are just dependencies but are not ...
Dres Baumann's user avatar
0 votes
1 answer
136 views

I'm writing a static code analysis tool in Python. Here's a sample of a code that needs to be analyzed: import { component$, useClientEffect$, } from '@builder.io/qwik' import Swiper from '...
Mohammad Miras's user avatar
1 vote
1 answer
377 views

I'm developing a .Net Standard 2.0 library offering dynamic compilation but there are always missing references. A consumer using .Net Core, calls an Api with his source code as text, implementing a ...
Adam Paquette's user avatar
1 vote
1 answer
766 views

I have downloaded ReSharper to Visual Studio 2022. I need to run code analysis to check if all varables are named correctly in camelCase. Also I want to implement custom rule that no double or float ...
vytaute's user avatar
  • 1,548
3 votes
1 answer
338 views

I have a Visual Studio C++ application project MyApp and a Visual Studio C++ library project Lib. The MyApp project has Lib project added as a project reference, as well as $(ProjectDir)..\Lib; added ...
DLT's user avatar
  • 480
3 votes
1 answer
2k views

I'm using the tool xsd.exe in several projects to generate classes for my data model. When turning on documentation file generation in my csproj the compiler starts to show lots of warnings of type: ...
walkslowly's user avatar

1
2 3 4 5
38