static-analysis Questions

2

I've got a .h file that is included by both C and C++ source files. Its contents is wrapped in #ifdef __cplusplus extern "C" { #endif ... #ifdef __cplusplus } #endif Yet, when I includ...
Wellappointed asked 21/6, 2021 at 9:47

4

I m in process of understanding and building a static code analysis tool for a proprietary language from a big company. Reason for doing this , I have to review a rather large code base , and a sta...
Pratique asked 17/12, 2010 at 6:37

7

Solved

I'm writing the startup code for an embedded system -- the code that loads the initial stack pointer before jumping to the main() function -- and I need to tell it how many bytes of stack my applic...
Shaky asked 17/6, 2011 at 14:51

3

Solved

Problem: I am setting up jenkins + sonar + github integration for automatic pullrequest static code check through sonar. My Configuration: Installed Sonar with github Installed jenkins In jenkin...

5

Solved

I'm using a closed-source application that loads Lua scripts and allows some customization through modifying these scripts. Unfortunately that application is not very good at generating useful log ...
Moorwort asked 14/5, 2009 at 22:48

3

Is it possible to determine whether or not a javascript function is "pure", using javascript? A function is said to be pure when it behaves in a predictable way, in the sense that for each x, th...

4

Is there any static code analysis tool for terraform? I tried tflint. But it doesn't support output of module or attributes of resources. any other suggestion please
Tarango asked 30/1, 2018 at 10:42

4

Solved

When developing C++ code, I often find myself trying to do something for all the data members belonging to a class. Classic examples are in the copy constructor and assignment operator. Another pla...
Municipal asked 5/2, 2021 at 2:11

1

I have a simple home made linter that I use for work, it's invoked like this: python3 scripts/lint.py FILENAME The output is completely standard linter-style output, like: path/to/file.yang:5:19: ...
Lyns asked 19/1, 2021 at 14:2

1

I have a private methods in some low level classes that are not currently in use, but I don't want the "Method x is never used" warning potentially obscuring other more important warnings...
Melodics asked 16/12, 2020 at 17:56

1

Solved

I would like to express, with Frama-c and the WP plug-in, that the stringCompare function written below acts as "it is supposed to" - namely: That given identical input strings, the funct...
Ube asked 9/12, 2020 at 8:39

5

Solved

One of the things I like about Typescript in VS Code is the ability to find all references to a function with Shift+F12 (or right-click). Is it possible to get to this mapping programatically, or t...
Kamalakamaria asked 11/1, 2018 at 12:55

0

I am trying to perform WCET analysis using OTAWA on tasking-Framework. However , the tool is unable to resolve indirect jump instructions. I investigated the source of these indirect jumps and I fo...
Viafore asked 19/11, 2020 at 14:41

4

Solved

Does anyone know if there's a good tool for analyzing JavaScript code and detecting type errors? I know that JavaScript itself is weakly and dynamically typed, but it would be really nice if I coul...
Archimage asked 8/2, 2011 at 5:23

2

Solved

I have a dependency as source in my project that I have no control over. I'm using cmake's clang-tidy integration to analyze my code, and this dependency is firing A LOT of warnings. Is there a way...
Wabash asked 31/3, 2018 at 19:54

3

Solved

I'm looking for a code duplication tool that is language agnostic. It's easy to find language specific code duplication tools (for Java, C, PHP, ...), but I'd like to run some code duplicatio...

2

Is there a linter that detects usages of functions that are marked as deprecated with the @deprecated decorator from the deprecated package? e.g. in from deprecated import deprecated def realfun()...
Jaquiss asked 29/10, 2020 at 14:51

4

Solved

This is my pom.xml: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.o...
Piliform asked 11/10, 2017 at 13:4

1

Solved

To implement checks for some magic _get() functions, I'm trying to implement a "class reflection extension". The manual mentions how to write the extension files themselves, and to instal...
Lunsford asked 28/8, 2020 at 14:10

4

Solved

I have following code. I am getting "Avoid using Literals in Conditional Statements." warning in PMD on line number 5. List<Object> listObj = getData(); if (listObj.isEmpty()) { throw new ...
Seldun asked 10/8, 2016 at 7:40

3

Solved

I'm trying to make a PHP regex to extract functions from php source code. Until now i used a recursive regex to extract everything between {} but then it also matches stuff like if statements. When...
Induct asked 21/3, 2010 at 20:0

2

Solved

I ran into a method today that is .. not used anywhere .. but is tested. Since it is used by a test, IntelliJ did not flag the method as 'unused'. Does IntelliJ allow for the following search cond...
Levitation asked 11/12, 2012 at 19:25

1

Solved

While reviewing a codebase, I came upon a particular piece of code that triggered a warning regarding an "out of bounds access". After looking at the code, I could not see a way for the r...
Edmundedmunda asked 23/6, 2020 at 18:15

6

Has anyone come across a tool to report on commented-out code in a .NET app? I'm talking about patterns like: //var foo = "This is dead"; And /* var foo = "This is dead"; */ This won't be fou...
Kampala asked 11/4, 2011 at 21:1

1

Solved

When I start to use an existing app/codebase, I'm often confounded by which environment variables it's wired to use. People make bad docs, and I hate hunting and being disoriented by this part of a...
Groundnut asked 3/6, 2020 at 16:51

© 2022 - 2024 — McMap. All rights reserved.