static-code-analysis Questions
1
Solved
Consider the following sample code:
data = []
try:
print data[0]
except IndexError as error:
print error.message
There is nothing syntactically wrong (using Python2.7) with the code except tha...
Groove asked 2/12, 2014 at 5:25
4
Solved
I'm looking for a lint for Perl, something that would catch dead code and other potential problems. Any suggestions?
I have
use strict;
use warnings;
already but I'd like to have more.
Ier asked 26/7, 2011 at 19:10
1
Solved
Is there a way to setup Findbugs (or any other static code analysis tool) in Jenkins to analyse the incoming pull requests and compare the result with the main branch? My goal is to reject pull req...
Dogeared asked 4/9, 2014 at 22:38
1
Code analysis throws error CA1006: Do not nest generic types in member signatures whenever we define custom definitions in the interface contract. What is the best way of handling this so called de...
Hemocyte asked 28/7, 2014 at 5:43
1
Often you join two tables following their foreign key, so that the row in the RHS table will always be found. Adding the join does not affect the number of rows affected by the query. For example
...
Whaling asked 22/7, 2014 at 10:52
3
Background
Sometimes, functions return null on some cases, and yet whoever uses them wasn't aware of it, so NPE is inevitable .
For example (and it's just an example, to show what I'm talking abo...
Ramsdell asked 7/2, 2014 at 10:26
2
I'm running jenkins in my ubuntu desktop.
I need a static code analysis report before pushing my c++ code.
I found that coverity is expensive. I'm looking for free analysis tool.
Is there any...
Zea asked 20/1, 2014 at 15:42
2
Solved
Does anyone know how to obtain lint for Mac, Windows, and Linux? sudo port install lint can't find it.
Canara asked 30/7, 2011 at 5:25
5
Solved
Right now we are maintaining some old project written in VB6 we are planning to implement continuous integration server for it. We would like to implement some code analysis as well to track that m...
Inhaul asked 23/3, 2010 at 10:59
1
Solved
I have my source repository hosted in GitHub. I now want my Sonar instance (deployed on Amazon EC2) to pull from the git repository periodically to analyze the codebase. The project is a simple Jav...
Cashbook asked 18/12, 2012 at 12:12
4
Solved
What are the various tradeoffs for performing static analysis on various levels of code? For instance for Java, why would someone perform static analysis on Java source code vs. Jasmin code vs. Jav...
Hocuspocus asked 26/10, 2011 at 10:43
4
Solved
Since a BSTR is only a typedef for wchar_t* our code base has several (many?) places where string literals are passed to a method expecting a BSTR this can mess up with marshallers or anyone who tr...
Capapie asked 24/1, 2012 at 11:33
1
Solved
I have a fluent, extensible validation helper like:
Assert.That(aParameter).IsNotNull();
It is extensible because the That method is actually generic (That<T>) and uses implicit typing to ...
Kate asked 23/11, 2011 at 15:39
2
I ran into a problem this weekend where method 1 called method 2 which called method 3 which caught exception, and within the exception handling method 1 was called again...
M1 -> M2 -> M3 -...
Dyane asked 21/3, 2011 at 18:0
3
Solved
I am experimenting with applying Code Contracts to my code and I've hit a perplexing problem.
This code is failing to meet the contract but unless I'm being really thick I would expect it to be abl...
Wardwarde asked 27/7, 2011 at 15:15
2
Solved
I have inherited a solution file that uses a MSBuild script to compile multiple solutions. The majority of projects are configured with analysis and rulesets and I have a few unit-test projects tha...
Softspoken asked 18/6, 2011 at 21:31
3
Is it possible to suppress a specific gendarme defect message?
I would like to do this in the source code with a flag or something like it.
Henpeck asked 14/4, 2010 at 13:49
4
Solved
How do I find all the unit tests that may directly or indirectly call a given method?
When I change a method, I wish to know the best tests to run; there must be a tool for this!
As we have lots o...
Egotist asked 25/3, 2011 at 11:12
1
I want to generate a program dependence graph (PDG) from Java Bytecode for further programmatic analysis. Since this is old (the paper is from '87) and presumably well-known technology, I tho...
Valance asked 24/2, 2011 at 11:43
2
Solved
Question
The RUN_CLANG_STATIC_ANALYZER ("Run Static Analyzer") project setting has found important issues in our project. We have addressed them and we want to prevent future issues from creeping ...
Scheck asked 17/2, 2011 at 19:10
4
Solved
For my application I'd like to parse through an assembly and extract every method and store the name of the method and the source code in one of my objects (I defined in my code).
where should I s...
Tailrace asked 17/11, 2010 at 18:37
5
Solved
I'm maintaining/developing a platform for homework testing. It's mostly automatic. What I need to add now is code analysis. I need to check the code for specific constructs.
For example:
Does ...
Deville asked 14/9, 2010 at 15:49
1
Solved
After upgrading to VS 2010 MSBUILD /p:RunCodeAnalysis=true does not work as expected
msbuild solution.sln /p:RunCodeAnalysis=true
To get faster builds we removed the CODE_ANALYSIS constant for t...
Fir asked 5/7, 2010 at 9:49
1
Solved
Using the tip provided by José Adan at http://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/f6dec8c4-9752-4a9b-82fe-0822808fd386/ I was able to get Code Analysis to do spell checking in Br...
Magritte asked 3/2, 2010 at 21:36
5
I have a maven project generated by Spring Roo and use several tools (checkstyle, pmd etc.) to collect information about my project. (namely I am using codehaus' sonar for this)
Roo makes heavy us...
Knecht asked 9/2, 2010 at 8:54
© 2022 - 2024 — McMap. All rights reserved.