Skip to main content
0 votes
1 answer
139 views

Consider this small function: def test(): x = 1 x = 2 x = 3 return x + 1 Apparently, the first two assignments to x have no effect here and can be removed. Yet surprisingly, pylint/...
Eugene Yarmash's user avatar
-2 votes
1 answer
75 views

We have SemGrep which we are allowed using as a static code analysis tool. I'm trying to write a Java rule which verifies if the variable name has exactly the same name as the field name within the ...
Eleid's user avatar
  • 71
2 votes
4 answers
403 views

#include <stdio.h> #include <stdlib.h> typedef struct { int a; } tempStruct1; typedef struct { int b; } tempStruct2; typedef struct { tempStruct1 *temp1; tempStruct2 *...
IQUnderflow's user avatar
0 votes
0 answers
81 views

In C/C++, it is possible to write something like: // version.h extern const char *branch; extern const char *hash; extern const char *status; extern const char *timestamp; // version.c (...
404 Name Not Found's user avatar
0 votes
0 answers
46 views

First a bit of context. Consider the code: void foo(double* b){ int a = 100; a = 101; b[1] += b[a]; } I have a visitor, that has VisitArraySubscriptExpr(ASE), where I perform ...
tapochki's user avatar
0 votes
0 answers
152 views

Suppose I am working on a library with a decent number of classes, most of them having a bunch of methods, in addition to the basic ctors and dtor. For reasons, the method implementations are spread ...
einpoklum's user avatar
  • 137k
0 votes
1 answer
87 views

When I make a component that relies on something like the currently chosen language for example, or maybe a special query function to fetch data, and I provide either of these things via a ...
ADJenks's user avatar
  • 3,459
1 vote
1 answer
92 views

I want to create an analysis.Analyzer and define a run function on it that runs once per all the codebase, and not once per package. If I check the documentation of the Run field, I see: // Run ...
Manuelarte's user avatar
  • 1,904
0 votes
1 answer
296 views

Is clang-tidy '-checks=clang-analyzer-*' a drop in replacement for scan-build and clang-check -analyze? If I'm using the former, is there any need for using latters again? Previously there are two ...
Sourav Kannantha B's user avatar
1 vote
1 answer
82 views

In the Checkstyle tool what's the difference between the ImportOrder and the CustomImportOrder rules? At the first glance they look similar.
AlexElin's user avatar
  • 1,799
10 votes
3 answers
864 views

I have a following embedded system optimization case (simplified). int main() { while (1) { // Do something if (unrecoverable_error) { __breakpoint(); while(1); } } } ...
qdot's user avatar
  • 6,555
1 vote
0 answers
191 views

Context: I'm using Clazy to analyze my C++ project, which includes the nlohmann/json.hpp header. Problem: Clazy fails to process files that include this header. What I've tried: Wrapping the include ...
mustaphos's user avatar
  • 109
1 vote
1 answer
191 views

Here's the code: <?php declare(strict_types=1); /** * @param array{key?: string} $options */ function hello($options) { var_dump($options); } hello([ 'WRONG_KEY' => '...', ]); I ...
Limon Monte's user avatar
  • 54.8k
1 vote
0 answers
45 views

I tried to find a way to verify deadlock with CPA checker. My goal is to check the "problem of philosofer". I found a lot of problem with CPA checker and threading. Someone can help me find ...
Robbb's user avatar
  • 11
0 votes
1 answer
28 views

Are there any ClangFormat styles (or other tools) which will handle excessive newlines? With two or more newlines after the function parameter parentheses, as in the example below, none of the styles ...
user2023370's user avatar
  • 11.3k

15 30 50 per page
1
2 3 4 5
182