-
C/C++test 2024.1 Product Release Announcement
We‘re excited to announce the launch of C/C++test 2024.1, featuring an array of product improvements. Organizations need to stay current with the persistent changes in the latest security coding guidelines, so Parasoft made updates in support of static analysis for: * CWE Top 25 + On the Cusp 2023 * OWASP API Security Top…
-
C/C++test 2024.1 Product Release Announcement
We‘re excited to announce the launch of C/C++test 2024.1, featuring an array of product improvements. Organizations need to stay current with the persistent changes in the latest security coding guidelines, so Parasoft made updates in support of static analysis for: * CWE Top 25 + On the Cusp 2023 * OWASP API Security Top…
-
AUTOSAR A7-1-3 - False positive on "const" qualifier
I'm using Parasoft C++Test Professional 2023.1 and I'm getting false positives on AUTOSAR Rule A7-1-3 which states that "CV-qualifiers shall be placed on the right hand side of the type that is a typedef or a using name" Take this example: #include <cstdint>#include <typeinfo>#include <iostream>#include <string>namespace…
-
AUTOSAR A2-7-3 - False positive on implementation
I'm using Parasoft C++Test Professional 2023.1 and I'm getting false positives on AUTOSAR Rule A2-7-3 which states that "Every declaration needs to provide a proper documentation." The false positives happen when a function is declared in a .hpp file, while being defined/implemented in the corresponding .cpp file, but it…
-
WARNING: invalid compiler option -E (ignored)
How do i resolve this issue? All the files in my current execution are being skipped. [ERROR] Code Analysis for .c finished with code 1 (ipro) 1. >> WARNING: invalid compiler option -E (ignored) error: argument to option -x (#) is out of range Error preprocessing file ".c": Process exited with code: 1 Could not preprocess…
-
How to create a rule using RuleWizard to identify a comparison operator?
I am creating a Parasoft rule for C/C++test using RuleWizard that flags whenever a type std::string is used as an argument within certain function calls. For example, this line should be a violation since it uses the variable 'mytestString' without a call to .c_str() LOG_TRACE(7, "ParasoftTestProj::main() Some TRACE…
-
How to create a rule in RuleWizard to check if the filename contains the foldername?
I want to create a rule that checks if a filename contains the foldername at the beginning of the file, for example: I have a folder named "folder1" containing a folder named "folder2" which contains a c file. This file should be named: "folder1_folder2_myFile.c" Is it possible to create such a rule with the rule wizard?
-
error #10010: errors encountered during linking;
Hi great parasoft family First of all I wish good and health days, I really need help,the errors and warning as follows, C/C++test analysis errors in /deneme09042021 1. Test execution: error linking test executable for Test unit for selected sources. error #10198-D: no input section is linked in warning #10202-D: no…
-
fatal error C1083: Cannot open include file: 'vector': No such file or directory
Hi: I am using parasoft cpptest standard to do static analysis for my visual studio project, when I run it in command line, it should it can't find the system headers like stdio.h, vector etc. I already put the vc include path into system path, but it seems not working, any ideas? thanks. "C:\Program Files…
-
C++ test Report: Could not build Analysis data
I have a C++ project that is built in Eclipse with GCC/G++ compiler. The project can be compiled successfully and run without problems, but when I try to perform static analysis via cpptestcli, the report generated show the following error: ........./ConfigMgr/Common/ConfigParser.cppBugDetective checker: could not build…
-
How do I create a custom static analysis rule to check that a variable is of a certain data type?
More specifically, how do I check that the variable in an if condition is of a pointer type, when the variable is a pointer dereference? I have tried "left hand side:variable" > "filter:pointer", "left hand side:variable" > "type:pointer" and "left hand side:pointer", and none of them works. This rule wizard is proving to…
-
How do I create a custom static analysis rule to count the number of pre-compilation directives?
Hi, how do I create a custom rule to count the total number of pre-compilation directives in my entire software using the Rule Wizard? I had spent an entire day attempting only to fail.
-
Parasoft plugin 10.4.3 for visual studio skips all files
I was using 10.4.1 previously and had no issue with running static analysis. However, once I updated to 10.4.3, all the tests skips all the files, checking 0/0 files. Is there some incompatibility between the 2 versions or is there some necessary steps to be taken for updating from 10.4.1 to 10.4.3?
-
Static analysis with preprocessor directives
I am running static analysis tool on C code and getting a MISRA2012 Rule 5.5b violation: The names of macros that exist prior to preprocessing should be distinct from the identifiers that exist after preprocessing (c99) [MISRAC2012-RULE_5_5-b]. It appears the cpptestcli is processing both the #ifdef clause and the #else…
-
Running SA & UT to cover conditionally compiled code
I am trying to figure out the best solution for running static analysis and unit tests on all of our C++ code. There are 3 different pieces of hardware that our code runs on. We have sections of our code that are compiled out depending on name we pass in to the compiler, IE: “-DHW1”. This is the primary way our main…
-
Parasoft support for [[fallthrough]]
Does Parasoft Static Analysis support standard [[fallthrough]] attribute or gcc attribute((fallthrough))? If not, are there plans to support them?
-
how to customize METRICS-39 ?
I am trying to create a version of METRICS-39 with a different threshold. I have duplicated the rule and modified the RULEMAP. However when I open the rule in the wizard there doesn't appear to be a way to modify the threshold like other rules. what am I missing?
-
best static analysis rule for arithmetic complexity?
Hello, I have found a few metrics that appear to address operator complexity. Halstead is the metric you find online. It looks like C++test supports several different Halstead complexity calculations but; a. they are not all enabled b. the ones that are enabled are not setup for violation detection. I also found VOCF which…
-
Suitability of Parasoft C/C++ for performing Static Code Analysis
Hi All , My necessity is to evaluate options to consider usage of Parasoft C/C++ for conducting Static code analysis ( i) whether Parasoft C/C++ integrates seamlessly into VS 2015(IDE) , GIT and Jenkins ii) does it involve C++/CLI (Managed C++) for static analysis in addition to languages used C, C++, MFC & C#, .NET iii)…
-
Static Analysis Rule
Hi, I analyse my code with recommended rule set but I noticed the following thing; I can easly detect array out of bound for example; int scores[] {100, 90, 80}; for (int i = 0; i <= scores.size() ; i++) // I take a violation about array out of bound error { ..... } But I have a method which takes transpose of matris. My…
-
Keil uVision Static Analysis Problem
I worked with Keil uVision. For analysing Keil uVision code I followed instruction of the https://docs.parasoft.com/display/CPPDESKE1041/Keil+MDK-ARM+Support document. I create bdf file and I import my code and bdf file to standalone C++test ide. Then I tried to do static analysis for this code. In the parasoft document it…
-
cpptestcli error:unable to find parasoft test installation
When I want to work command line and try to run static analysis in command line take cpptestcli error:unable to find parasoft test installation error. Related image is added to question.
-
Static Analysis Skipped File
Hi, I run static analysis via command line and I obtain successful result. There have a no error while execution. But I noticed that the Skipped info. What is it? I did not understand the meaning of it. I attached related screen shot to discussion.
-
Generate a Report from Persistent Violations for Static Analysis
When I run Static Analysis over my code base using Eclipse, any violations that pop up will be listed under Quality Tasks. Under the Configuration Running tab (or view), at the conclusion of the run, it states how many quality tasks were found, gives me the progress bar, and then at the bottom allows me to generate a…
-
Keil uVision Static Analysis Quick Start
In this post, I will go over how to get started with using C++test static analysis on Keil uVision projects. In this example, I will be using the C++test example MDK-ARM Sensor project. This can be found within ${CPPTEST_HOME}/Examples/Embedded/MDK-ARM/Sensor. In this post I will use the following: C++test 10.4.2…
-
Static analysis violation
Hi I run the recommeded rules in c++test. I take a several violation in code. I did not interpret one violation which says 'Value 42 is out of acceptable range' lower than 30'. What does the meaning of it? I did not understand violation. The sreen shot of violation is attached to question.
-
Report Count and GUI Count Inconsistent
I am running Static Analysis across an entire workspace worth of projects with some key characteristics: Eclipse: Kepler Parasoft: 10.3.4 Number of Projects: ~160 Number of Files: ~ 1000 .c/.cpp and ~1000.h Configuration Properties: 1. Limit is not set on number of violations per rule 2. Check box for "static/Flow Analysis…
-
Parasoft Static Analysis Jobs are Inconsistent
Hello, I am running Static Analysis across an entire workspace worth of projects with some key characteristics: Eclipse: Kepler Parasoft: 10.3.4 Number of Projects: ~160 Number of Files: ~ 1000 .c/.cpp and ~1000.h Configuration Properties: 1. Limit is not set on number of violations per rule 2. Check box for "static/Flow…
-
Inconsistencies in Counting Inside Static Analysis Report
Hello, I am running Static Analysis across an entire workspace worth of projects with some key characteristics: Eclipse: Kepler Parasoft: 10.3.4 Number of Projects: ~160 Number of Files: ~ 1000 .c/.cpp and ~1000.h Configuration Properties: 1. Limit is not set on number of violations per rule 2. Check box for "static/Flow…
-
Java Code Conventions
I want to analyse my code which is written with Java according to "Java Code Conventions" rules. Does parasoft include "Java Code Conventions" rules? Does parasoft have any option for selecting these rules?
-
Parasoft Jtest 10.4.2 Milestone 2 Build Available Now
Our development teams have been working diligently and have put together a milestone 2 release of Jtest 10.4.2. They have added many great features thus far and are continuing to make our next release even better. The items below are included in this milestone release. Static Analysis & Security Testing * Helps…
-
Reporting Static Analysis Result to DTP
Hi, I use Parasoft which is pluged in with Visual Studio 2013. I enabled DTP. I run static analysis via Parasoft then I obtained the attached image. The image says that I should enable reporting result to DTP via Preference tab but I did it. I want to show static analysis result on Dashboard on DTP. How can I transfer…
-
Misra rule violation shows up when not running static test on full project
Hi, when running static analysis with misra rules we get a lot of extra rule violations when running the analysis on a single module (single folder). The rule 20.9 "macro might not be defined" accounts for all of the extra violations. When the analysis is run on the full project, these do not show up. The project was…
-
Jtest support for OWASP Top 10 - 2017 available
OWASP Top 10 - 2017 has finally been released today. Some old items were merged, some removed, and a few new ones added. A new configuration for static analysis will be in the next release of Jtest, but for now you can download it directly from here. Get your jump start on OWASP Top 10 support.
-
Copy Constructors and Copy Assignment Operators Static Analysis Rule [MRM-49]
Rule: MRM-49-3 --> A copy constructor and a copy assignment operator shall be declared for classes that contain pointers to data items or nontrivial destructors. This Static Analysis rule requires that I have to adhere to the Rule of 3 (now rule of 5 if moves are included). We have a destructor defined, but not the copy…
-
Creating Custom Coding Rule for Comments
I am looking to create a custom ruleset to check whether code contains certain comments (block comments/normal comments) during static analysis. Any assistance on this regard would be highly appreciated
-
"Comments shall not be nested." Custom Rule in Static Analysis
Hi, I have to add this rule to perform a static analysis. The rule is the MISRA C RULE 9. "Comments shall not be nested". Can someone help me? Thanks.
-
Create custom rule during Static Analysis in Rule Wizard
Hi everyone. I've some issues to make this rule in Rule Wizard: "Only ISO 9899 standard C shall be used." I hope somebody could help me. Thank you.
-
Static analysis - custom rule for ascii characters >127
Hi, I have to create a custom rule that checks that ascii characters > 127 are not present. I have some issues doing it. Can someone help me? The rule is: "Define identifiers shall be as following: < DEFINE_NAME > = D _ < USER_NAME > Where: < USER_NAME > length is at most 12 characters and not composed by ascii characters…
-
Add .cpp file to static code analysis
Hello, We are using the Automation C/C++ test tool to run static code analysis on our make based project. Is there any way to add .cpp files to the static analysis run. We don't want to include these files in our makefile but just want to run it through static analysis.
-
Static Analysis Findings by Run Report
Is there a widget or an easy way in DTP that lets you view the static analysis findings for a particular run? The documentation (Link: https://docs.parasoft.com/display/DTP533/Static+Analysis+Findings+by+Run+Report) shows a tedious way to get a run id. Just wondering if there was an easier way to display it in the…
-
Parasoft Support for OWASP Top 10 - 2017 available now.
Parasoft has configurations available for static analysis to support OWASP Top 10 - 2017. OWASP Top 10 - 2017 was released today. Some old items were merged, some removed, and a few new ones added. New configurations for static analysis will be in the next release of each product, but for now you can download them directly…