Due to some maintenance issues, this service has been switched in read-only mode, you can find more information about the why

and how to migrate your plugin documentation in this blogpost

Skip to end of metadata
Go to start of metadata

Plugin Information

View PRQA on the plugin site for more information.

Older versions of this plugin may not be safe to use. Please review the following warnings before using an older version:

Official Maintainer

Currently developed by

Originally developed by

A plug-in for doing static code analysis using PRQA.
This plug-in was developed and maintained by Praqma up until release 1.2.2. Programming Research Ltd is currently maintaining the plug-in. Please direct service and feature requests directly to Programming Research.

Programming Research Static Analysis Plug-in

This plug-in enables the PRQA static analysis tools QA·C and QA·C++ to be integrated easily with Jenkins.

This plug-in is maintained by Programming Research. It was originally developed and maintained by Praqma as far as release 1.2.2, and is currently being developed by Present Technologies. All service and feature requests should be sent directly to Programming Research.

Plug-in version 3.0.1 supports PRQA Framework version 2.2.0 and later. PRQA Jenkins Plug-in support Jenkins version up to 2.107.2.

Features

This plug-in allows source code to be analyzed with QA·C or QA·C++, PRQA’s static analysis tools. The plug-in performs the following key tasks in the post-build stage automatically:

  • Analyzes a PRQA project – optionally including dataflow and cross module analysis.
  • Generates a compliance report
  • Compares the total number of messages in the project against a configurable threshold and sets the build status to ‘unstable’ if the threshold is exceeded. This can be used as a gateway to preventing subsequent tasks from running.
  • Optionally uploads the analysis results to QA·Verify, the PRQA web-based Quality Management System

This plug-in is able to analyze configured PRQA projects. 

The projects are configured using PRQA Framework. They can be configured using PRQA tools to support the old analysis interface.

The plug-in allows the automation of the creation and analysis of PRQA-enabled projects. This enables the analysis to be performed as a part of a continuous integration strategy.

The plug-in displays a graphical history depicting the number of messages, and overall compliance levels in the project. 

Download

Download the latest version manually HERE or alternatively, use the Jenkins CI Update Center. Earlier versions of the plugin are available in archive.

Prerequisites for "PRQA Framework"

Supported versions of PRQA Framework

PRQA Jenkins plug-in currently supports PRQA Framework 2.2.0 and later. If you encounter any issues drop us a note.

Installed Applications

Prior to installing and using the PRQA Jenkins plug-in, you need to ensure that the following PRQA applications are installed:

  • PRQA Framework 
  • Reprise license manager
  • QA·Verify Server (Optional)

PRQA Framework Configuration

The plug-in should be configured to use the installed version of PRQA Framework. This is done by navigating to the 'Manage Jenkins' > 'Global Tool Configuration', and adding the information about PRQA Framework installation.

To add details of PRQA Framework, press the Add PRQA Framework button.

This is an example of a PRQA Framework configuration, where the default installation directories have been used. The plug-in will automatically expand locations and add the necessary bin folders to the path.  Please enter the correct details for the PRQA Framework installation.

As there might have multiple versions of PRQA Framework installed on the machine, it is best practice to include the PRQA Framework version number (or some other identification in the PRQA Framework Installation Name). The plug-in allows multiple versions of the PRQA Framework to be installed.

Support for PRQA tools prior to PRQA Framework 2.2.0

PRQA Jenkins 3.0.0 (or above) no longer supports PRQA tools prior to PRQA Framework 2.2.0. If you require support for previous version of PRQA tools please consider using an older version of the plug-in from archive. Download links are available above.

QA·Verify Configuration

PRQA Jenkins plug-in can be configured to use a QA·Verify server instance if required. This is done through the options available at 'Manage Jenkins' > 'Configure System'.

To add details of a QA·Verify server instance, click the 'Add' button.

This is an example of a QA·Verify configuration. Please add the correct credentials for the QA·Verify Server.

PRQA Static Analysis Configuration

Creation of PRQA Framework Project

PRQA Jenkins plug-in requires that the PRQA Project is already set up - namely that the PRQA Project file (prqaproject.xml) exists and is populated with all the necessary information to perform the analysis.

If the PRQA project is not part of the source project, it can be created as a build step prior to the PRQA static analysis. This step determines the location of the project file.

To do this, select 'Add build step'. If the build machine is a Windows machine then select the 'Execute Windows' batch command option. Otherwise, select the 'Execute shell' option.

It is possible that one of these steps is already set up to run the make or some other build script. This step can be used instead of adding a new step.

Enter into the command box the command line entry options to create and configure the PRQA project.

QA·CLI provides a command line interface to PRQA Framework and PRQA Tools. QACLI allows these to be integrated with builds on build servers. It features a command line interface in the format:

> qacli <subcommand> [options...]

where related features are grouped under a subcommand.

The address of the PRQA license server should be set where the system can retrieve a license. The following command can be used to accomplish this:

> qacli admin --set-license-server <port (hostname)ip>

where the argument refers to an application layer address, for example, 5055@192.168.1.10 or 5055@myhost.

A PRQA project file contains the names of all configuration files that contain related settings. Creating a new PRQA project file is a case of specifying the directory where the project should be created, and specifying the configuration files that it should contain. A PRQA project consists of:

  • at least one Compiler Compatibility Template (CCT)
  • one Rule Configuration File (RCF)
  • one Analysis Configuration File (ACF)

The PRQA project can also contain:

  • a Naming Convention File (NCF)
  • a Version Control Compatibility File (VCF)
  • a QA·Verify Connection File (QCF)

The following command creates a new PRQA project file:

> qacli admin --qaf-project-config --qaf-project <directory> --cct <path> --rcf <path> --acf <path>

For example:

> qacli admin --qaf-project-config --P . --C MS_VC+_CL_16_x86_C.cct  --C MS_VC+_CL_16_x86_C++.cct --A default.acf -R default-1.0.rcf

After creating the PRQA project file, the next task is to populate it with the source files and analysis data (i.e. the include paths and macro definitions used to compile each source file) from the build. This data can be extracted using build process monitoring. PRQA will monitor the build process, extract the relevant data and add it to the specified project.

The following command can be used to accomplish this:

> qacli admin -P <project-path> --build-command <command>

where project-path is a path to a valid PRQA project file ,and build-command is a command that will set the build in motion and compile the files.

If the build command contains more than one word, it should be enclosed within quotes. If the build command is complex (e.g. has quotes within it), the command should be placed in a script. The path of this script should be used as the argument.

The above command can be reused to replace the old data with the data gathered from the build. This is useful for keeping PRQA projects synchronized with the build projects.

For example:

> qacli admin -P . --build make

Configuration of the PRQA Static Analysis

The PRQA Jenkins plug-in enables the configuration of the PRQA static analysis as part of Jenkins jobs. In the job configuration, simply add a post-build action, by selecting 'Configure' on the job homepage.

Click on the Add post-build action button and select 'Programming Research Report'.

Conditional execution of PRQA static analysis

By default, the PRQA analysis is always performed, regardless of whether project build steps pass or fail. Please select 'Run PRQA Analysis only when build is successful' to perform the analysis in the event that build steps are successful.

Configuration of PRQA Framework

The details of the static analysis with PRQA Framework can be configured using the following PRQA Jenkins plug-in options:

PRQA Framework Installation:

Select one of the PRQA Framework installations that was set up in the Global Tools Configuration section.

PRQA Framework Project:

Enter the path to the directory containing the PRQA project file, prqaproject.xml, for the project to be analyzed.

If the project file is in the top level directory of this module in the repository, then this can be left blank.

It is also possible to create a PRQA project file as a prior build step: that step will determine the location of the project file.

If the project file is inside the Jenkins workspace, then you can just supply the relative path to the directory from the project root directory.

The plug-in will automatically run static analysis on this project and produce the report.

License Server:

To use a custom license server, select 'Set Custom license server' and enter the license server address.

Dependencies based analysis:

The plug-in will by default analyze all the source files. The amount of time taken to analyze the project can be reduced by only analyzing the source files that need analysis.

Select 'Enable dependency-based analysis' if this condensed analysis is required. Only source files that have changed, or have no previous analysis output, will be analyzed. Files that have up to date analysis output will not be analyzed.

Project Based Cross-Module Analysis:

Project Based Cross-Module Analysis (CMA) is performed once all of the source files have been analyzed. CMA must be enabled to fully enforce a coding standard.

Note that CMA may take a long time to complete. If enabled, it will always be run regardless of the dependency-based analysis setting.

If Project Based Cross-Module Analysis is required, select 'Run Project Based CMA Analysis'.

The plug-in will by default analyze all the source files. The amount of time taken to analyze the project can be decreased by only analyzing the source files that need analysis.

Select 'Enable dependency based analysis' if this condensed analysis is required. Only source files that have changed' or have no previous analysis output, will be analyzed. Files that have up to date analysis output will not be analyzed.

Reports:


The generation of reports in the event that errors are found during the static analysis, can be disabled by selecting 'Generate report on analysis error'.

PRQA Jenkins plug-in support the configuration of multiple reports: code review, metrics and  suppressions report.

Jenkins startup options

To ensure that reports are shown correctly, Jenkins' Content Security Policy configuration needs to be overridden using the hudson.model.DirectoryBrowserSupport.CSP property. The option must be added to Jenkins startup:

    java -Dhudson.model.DirectoryBrowserSupport.CSP="sandbox; default-src 'none'; img-src 'self'; style-src 'self' 'unsafe-inline';" -jar jenkins.war

 

Upload results to QA·Verify

One of the most powerful features is the ability to upload the results of the analysis to QA·Verify. This enables Developers to see the in-depth results of the analysis including annotated source code via a web browser showing the exact location of the coding standard violations. The non-compliances can then be fixed before re-committing the code.

It also allows deviations from the coding standard to be added, managed and reported providing the proof required to comply with coding standards such as MISRA C.

QA·Verify also allows other stakeholders such as Managers and even Customers to view the quality information. They are able to see how many defects there are in the code – and whether this is increasing or decreasing. This visibility of project level information equips Managers with the data needed to make decisions or where to deploy resources if required.

If the results need to be uploaded to QA·Verify, select 'Upload results to QA·Verify'. This will enable uploading the project analysis as a snapshot to QA·Verify.

Select a server configuration to be used when uploading to QA·Verify that was set up in the global Jenkins configuration.

To automatically upload the static analysis results into QA·Verify, select 'Upload results to QA·Verify'. This will enable uploading the project analysis as a snapshot to QA·Verify.

Enter the name of the QA·Verify project to be uploaded. Once a project has been uploaded to QA·Verify, the project name must stay the same, otherwise the snapshot will not be attached to the correct project. It is recommended that you first create the project in QA·Verify, so that you can verify that the project configuration is correct before uploading snapshots.

Code upload settings control how the source code is uploaded to QA·Verify.

  • All code uploaded will unconditionally upload all source and header files to QA·Verify so they will not need to access the repository. The VCS can still be used during upload to obtaain the file versions and authors - specify a VCS configuration file below.
  • No code uploaded will not upload any code. QA·Verify will retrieve all required code from the repository. A VCS configuration file must be specified below.
  • Only code not in VCS will only upload files that are not in the Version Control System (e.g. generated files). Files that are in the repository will not be uploaded.

Specify the full path to the top level of the source directory structure as the source origin. The source origin will default to the current workspace if nothing is specified

This value is only used when source code is uploaded to QA·Verify (i.e. using All code uploaded or Only code not in VCS settings) and is used to remove the leading parts of pathnames in the Web Message Browser.

Specify Thresholds for PRQA Static Analysis

The number of messages generated by the PRQA static analysis can be compared against thresholds for build stability. If a threshold is exceeded, the build status is set to unstable. This can be used as a gateway to prevent subsequent tasks from running.

The messages are organized into message levels according to the severity of the message, with Level 0 being the lowest.

The thresholds can be set to operate at a message level, allowing the severity of the messages to be taken into account. Code that contains low-severity maintenance and style issues may pass but code that contains critical issues would fail.

There are three kinds of threshold: Messages, File Compliance and Project Compliance.

Message Threshold Level

This sets the message level from which the message total is calculated. Only messages from this level and above are summed to give the message total that is used for the Messages Threshold comparison. Note that File and Project Compliance thresholds are not affected by this setting.

Message Compliance Threshold

Either enter the 'Maximum messages target' or select 'Continuous improvement'.

The 'Maximum messages target' is the total number of messages that are allowed on all levels for all the files in the project. Messages in header files are de-duplicated (i.e. they are only counted once and not for each source file with which the header is included).

The 'Message Compliance value' is the total number of messages for all the files in the project that are at the 'Message Threshold Level' or above.

If the 'Message Compliance value' for the build is higher than the 'Maximum messages target', the build is marked as unstable.

'Continuous improvement' states that the 'Message Compliance value' for the build will be less than or equal to the 'Message Compliance value' found in the previous build. If the 'Message Compliance value' for the build is higher, the build is marked as unstable.

Project Compliance Threshold

Either enter the 'Project compliance target' or select 'Continuous improvement'.

The 'Project Compliance target' is the minimum percentage of message groups (a coding standard ‘rule’) that have no messages in the project.

The 'Project Compliance level' is the percentage of message groups that have no messages in the project.

If the 'Project Compliance level' for the build is lower than the 'Project Compliance target', the build is marked as unstable.

'Continuous improvement' states that the 'Project Compliance level' for this build will be greater than or equal to the 'Project Compliance level' for the previous build. If the 'Project Compliance level' for the build is lower, the build is marked as unstable.

File Compliance Threshold

Either enter the 'File Compliance target' or select 'Continuous improvement'.

The 'File Compliance target' is the minimum mean across all files of the percentage of message groups (a coding standard ‘rule’) that have no messages in each file.

The 'File Compliance level' is the mean across all files of the percentage of message groups that have no messages in each file.

If the 'File Compliance level' for the build is lower than the 'File Compliance target', the build is marked as unstable.

'Continuous improvement' states that the 'File Compliance level' for this build will be greater than or equal to the 'File Compliance level' for the previous build. If the 'File Compliance level' is lower, the build is marked as unstable.

A high 'File Compliance level' and low 'Project Compliance level' indicate that each file violates only a small number of rules but that each file violates a different rule.

If the 'File' and 'Project Compliance levels' are close, then each file is violating more or less the same rules.

If any of these thresholds are not met, then the build will be marked as unstable. Note that only configuration errors or analysis errors will mark the build as failed.

The PRQA Jenkins plug-in will be set by default to 'No thresholds'.

PRQA Static Analysis results

The PRQA Jenkins plug-in automatically creates graphs showing the current number of messages and the current compliance levels in the Job project page. It also shows:

  • Historical depiction of the overall compliance history.
  • Link to the QA·Verify server that was used in the upload. 
  • Relevant build artifacts in the artifacts list, for easy access to generated reports and logs.

 

Release notes

Changelog

Version 3.0.1 - 2018-04-17

Version 3.0.0 - 2017-11-11

  • Added support for Jenkins 2.x
  • Added ability to upload to multiple QA·Verify servers.
  • Added ability to customize QA·Verify snapshot name based on environment variables.
  • Improved static analysis progress information during Job execution.
  • Improved error handling of inconsistencies in the PRQA Framework configuration.

Version 2.0.12

  • Fixed the wiki page and broken links for download 

Version 2.0.11

  • QA·Framework 1.0.5 support
  • Fixed: Graphs not getting generated (JENKINS-22763)

Version 2.0.11

  • QA·Framework 1.0.5 support
  • Fixed: Graphs not getting generated (JENKINS-22763)

Version 2.0.9

  • QA·Framework 1.0.3 support

Version 1.2.2

  • Fixed: Graph should use messages within the current selected threshold (JENKINS-20045)

Version 1.2.1

  • Fixed: Graph incorrectly scales to max number of messages (JENKINS-18018)
  • Improved the behaviour of the plug-in. New way to add thresholds.

Version 1.2

  • Implemented File list as a report source. (JENKINS-17283)
  • Tool installations. You can now configure multiple versions of PRQA tools for use. (JENKINS-17282)
  • Better threshold handling. (JENKINS-15905)

Version 1.1.3

  • Fixed a small issue with missing CMA in upload part. 

Version 1.1.2

  • Fixed an error introduced in 1.1.1 which caused analysis without CMA option to fail.

Version 1.1.1

Version 1.1.0

Version 1.0.5

  • Fixed an issue with incorrect permissions for logging in JENKINS-14802

Version 1.0.4

  • Fixed layout issues with the new publishers as a drop-down list feature in JENKINS-13786

Version 1.0.3

Version 1.0.2

  • Fixed a critical issue that would cause Jenkins clients to exit abruptly and terminate the underlying JVM: JENKINS-13761 
  • Fixed various spelling issues in GUI: JENKINS-13777
  • Updated Programming Research Icon: JENKINS-13778

Version 1.0.1

  • Fixed various cosmetic issues and corrected a few spelling mistakes.
  • Fixed logic error in 'Max. Messages' comparison.
  • Changed it so that threshold values are now stored on a per-build basis.
  • Changed fields to default to 0.
  • Removed 'Java' from the list of supported products.
  • Made project link graphs slightly larger than before.

Version 1.0

  • First official Jenkins release.
  • Shows threshold graphs.
  • Fixed bug where quick consecutive builds would lock workspace files.

 

41 Comments

  1. Unknown User (v2v)

    Hello,

     Maybe I'm wrong, but I guess you did a typo when you explain the "a proper build step" section, it should be  "Execute Windows Batch Command" instead "Execute shell", at least if you are using windows instead linux.

    Regards

  2. Unknown User (samma845)

    Hi,

    Is the plugin compatible with all versions of QAC?

    Regards,

    Samuel

  3. Unknown User (madsnielsen)

    Hey Samuel,

    We haven't tested with all versions of QAC, but we are reasonably that the plugin will work with QAC 6.0 and up.

    Regards,

    Mads

  4. Unknown User (mickmack)

    Is there any of the older versions that will work with Jenkins core version 1.424.2 ?

    //Mikael

    1. Unknown User (madsnielsen)

      Hey Mikael,

      It should work, no guarantees though. I don't know if the plugin will show up in the update center, but you can go here:

      http://repo.jenkins-ci.org/releases/net/praqma/prqa-plugin/1.1.0/

      and download that .hpi file and the install it manually by upload in jenkins.

      Would be nice if you wanted to test it out.

      Regards,

      Mads

  5. Unknown User (kevin_patel)

    Hello,

    I am new to Jenkins and I have installed the PRQA Plugin and set all the environment variables as suggested on the PRQA Plugin Page.

    But I get the following error,

    This job will create a report with the following selected parameters:
    QAR selected project file:	C:\Program Files (x86)\PRQA\QAC-7.0\projects\ComM\ComM.prj
    QAR selected product:		qac
    QAR selected report type:	Compliance
    
    Attempting to delete old log file: C:\.jenkins\jobs\comM-Autosar\workspace\qavupload.log
    Attempting to delete old log file: C:\.jenkins\jobs\comM-Autosar\workspace\qaimport.log
    Sucessfully cleaned up 0 old file(s)
    Using QAR version:
    Version 1.2
    Analyzing with tool:
    QAC Deep Flow Static Analyser 7.0 build 77 for  Mar 29 2007 for Windows
    ExecutingCommand:
    qaw qac "C:\Program Files (x86)\PRQA\QAC-7.0\projects\ComM\ComM.prj" -mode depend  -maseq "pal %Q %P+ %L+#qar %Q %P+ %L+ -po qar::report_type=Compliance\ Report -po qar::viewing_program=noviewer -po qar::report_format=xhtml -po qar::project_name=%J -po qar::output_path=C:\.jenkins\jobs\comM-Autosar\workspace"
    Finished remote reporting.
    Failed getting results
    java.util.concurrent.ExecutionException: java.io.IOException: Failed in PRQARemoteComplianceReport with message(PrqaCommandLineException)
    Failed in report generation
    	at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:252)
    	at java.util.concurrent.FutureTask.get(FutureTask.java:111)
    	at hudson.remoting.LocalChannel$2.get(LocalChannel.java:77)
    	at net.praqma.jenkins.plugin.prqa.notifier.PRQANotifier.perform(PRQANotifier.java:292)
    	at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
    	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:814)
    	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:786)
    	at hudson.model.Build$BuildExecution.post2(Build.java:183)
    	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:733)
    	at hudson.model.Run.execute(Run.java:1592)
    	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
    	at hudson.model.ResourceController.execute(ResourceController.java:88)
    	at hudson.model.Executor.run(Executor.java:237)
    Caused by: java.io.IOException: Failed in PRQARemoteComplianceReport with message(PrqaCommandLineException)
    Failed in report generation
    	at net.praqma.jenkins.plugin.prqa.PRQARemoteComplianceReport.invoke(PRQARemoteComplianceReport.java:95)
    	at net.praqma.jenkins.plugin.prqa.PRQARemoteComplianceReport.invoke(PRQARemoteComplianceReport.java:20)
    	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2348)
    	at hudson.remoting.LocalChannel$1.call(LocalChannel.java:52)
    	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    	at java.lang.Thread.run(Thread.java:722)
    Caused by: null
    Caught exception with message:
    	Failed in report generation
    Caused by:
    	net.praqma.util.execute.AbnormalProcessTerminationException: 'qaw' n'est pas reconnu en tant que commande interne
    ou externe, un programme ex‚cutable ou un fichier de commandes.
    	at net.praqma.prqa.reports.PRQAReport.executeQAR(PRQAReport.java:194)
    	at net.praqma.prqa.reports.PRQAComplianceReport.generateReport(PRQAComplianceReport.java:45)
    	at net.praqma.prqa.reports.PRQAComplianceReport.generateReport(PRQAComplianceReport.java:16)
    	at net.praqma.jenkins.plugin.prqa.PRQARemoteComplianceReport.invoke(PRQARemoteComplianceReport.java:75)
    	... 8 more
    Caused by: net.praqma.util.execute.AbnormalProcessTerminationException: 'qaw' n'est pas reconnu en tant que commande interne
    ou externe, un programme ex‚cutable ou un fichier de commandes.
    	at net.praqma.util.execute.CommandLine.run(CommandLine.java:189)
    	at net.praqma.util.execute.CommandLine.run(CommandLine.java:74)
    	at net.praqma.prqa.PRQACommandLineUtility.run(PRQACommandLineUtility.java:43)
    	at net.praqma.prqa.products.QAR.generateReportFiles(QAR.java:67)
    	at net.praqma.prqa.reports.PRQAReport.executeQAR(PRQAReport.java:192)
    	... 11 more
    

    What is the PRQARemoteComplianceReport error and how can I resolve this errror?

    Regards,
    Kevin

    1. Unknown User (lars_kruse)

      Hi Kevin.

      The plugin has dependencies to the CLI utilities qaw and qar. These utilities can be downloaded from Programming Research web site. Have a look at the section "Installed applications" on the plugin's wiki.

      The tools must be in the path of the user who runs the Jenkins session.

      Cheers

  6. Unknown User (nitin2803)

    Hi,

    Can  You help me ?

    I want to  create *.prj  file  for project during project builds.

    I saw  convert_ide_proj.tab batch  file  but it requires  script_settings.bat file. 

    please, tell me that  what  does  script_settings.bat contains ?   it contains Configuration of project or what?

    Thanks,

    Nitin Mandani

    1. Unknown User (jstruck)

      Hi Nithin

      I'm nut quite sure if it a link gone bad or... but yes there are a convert_ide_proj.bat file which is the proper way of doing this.

      The script_setting file is the generic setting file, it sets up all sorts of environment variables. But no project specific information only the generic stuff, for the specific info there should be a project_settings.bat file next to your own IDE project file, after you have tried to convert it.

      You should know that with the way Jenkins have implemented build steps, you are still required to configure the tool setup for the plugin on the Jenkins global config page, even though you have just set them up in the build step seconds before. 

      sincerely

      /Jes

      1. Unknown User (nitin2803)

        Thanks for  your quick  reply.

  7. Unknown User (ursbondada)

    Hello,

    I have configured PRQA plugin into jenkins application to generate qac reports.

    my ouptut showing as below


     
    as per above console output, configurations settings of QAC,QAW,QAR are ok. But i was unable to generate compilance report for my folder.
     
    please let me know what is the error
     
    sincerely
    satya
     

    1. Unknown User (madsnielsen)

      Hi Satya,

      I've sent you an email with a suggestion, if you have not recived it you can catch me at this email: man@praqma.net.

      Best Regards,

      Mads

      1. Unknown User (charlesbaudry)

        Hi Mads,

        I'm facing the same problem. Could you please send me the suggestion you've sent to Satya?

        Thanks!

        Best regards,

        Charles

  8. Unknown User (andre)

    Hello,

    Thx for this plugin.

    ich have a problem with the plugin in conjunction with QAC. The QACpp version is running fine.

    It seems that the Compliance Report.xhtml isn't generated.(see the screenshot)

    Add to that there are no chart generated on the job view.

    Hope that someone could give an advice.

    thanks in advance
    Andre

    1. Unknown User (charliezx)

      Hello Andre
      I have the same problem , did you get any advice?

      thanks

      charlie

  9. Unknown User (kd_jm)

    What are the qcncodecs, and where can they be fetched?

    I'm getting this error:

    09:09:01 Programming Research Quality Assurance Plugin version 1.2.0
    09:09:02 QA·C OK - QAC Deep Flow Static Analyser 7.0 build 77 for  Mar 29 2007 for Windows
    09:09:02 QAW OK - qaw version 2.3.2
    09:09:02 QAR OK - Version 2.1
    09:09:02 Report command:
    09:09:02 qaw qac -via "C:\path\to\source_file_list" -via "path\to\options\default_result_command_file" -sfba -maseq "qar %Q %P+ %L+ -po qar::report_type=Compliance\ Report -po qar::viewing_program=noviewer -po qar::report_format=xhtml -po qar::project_name=%J -po qar::output_path=C:\path\to\some\dir"
    09:09:04 java.io.FileNotFoundException: C:\path\to\some\dir\Compliance Report.xhtml (The system cannot find the file specified)
    09:09:04 Build step 'Programming Research Report' marked build as failure
    09:09:04 Finished: FAILURE
    

    When running the qaw command separately in a new command window, this result is given:

    WARNING: No -op specification before first file, QACOUTPATH used (i.e. "C:\path\to\err_met_files\").
    Viewer "noviewer" not available, result will not be rendered.
    Generating - Please wait...
    Cannot find translation codec: qcncodecs
    usage:
    standard.prdf.generator <product> -cmaf <file> options... f1...fn
    standard.prdf.generator <product> -cmaf <file> options... -list filelist
    C:\programs\qar\bin\..\prdf\bin\standard.prdf.generator failed. return code = 10
    
    Trace written to C:\Users\userabc\qar.trace
    Press return to continue:
    Analyser "C:\programs\qar\bin\qar.exe" returns unknown code: 10
    

    My PRQA configuration:

    • Product: QAC
    • Select report source: File list
    • Perform Cross-Module analysis: unchecked
    • Enable dependency based analysis: unchecked
    • Enable dataflow analysis: unchecked
    • Create Compliance Report: unchecked
    • Upload results to QA·Verify: unchecked
    1. Unknown User (madsnielsen)

      Hi there kd,

      It looks like you're not pointing to a filelist file. qaw qac -via "C:\path\to\source_file_list" -via "path\to\options\default_result_command_file"

      Sorry for the late reply. But that must be the reason for the issue you're seeing.

      Best regards,
      Mads

  10. Unknown User (tony_cb)

    Hi,

    First thanks to have this wonderful plugin to make QAC++ check to be done automatically.

    I want to know how can I directly look at the reported warning messages of the source file as we do in the GUI QAC++ message browser ?
    B&R

    tony

    1. Unknown User (madsnielsen)

      Hi Tony!

      First of all thank you for using our plugin! As far as i know, the annotated source you see is stored in a binary file format, which the message browser then decodes.

      I'm gonna query our contacts at PRQA to see if there is any way to provide this functionality, when i have an answer i'll get back to you.

      If you like we can take the conversation via email, you can contact me at this address: man@praqma.net.

      Best regards,

      Mads

      1. Unknown User (charlesbaudry)

        Hi Mads,

        could you please keep me inform about this topic? I'm also interested viewing the results like with the browser.

        Thanks & Best regards

        Charles

        1. Unknown User (madsnielsen)

          Yep i will keep you informed.

      2. Unknown User (tony_cb)

        Hi Mads,

        Thanks for your replay, and I will wait for your good messages.

        I can be contacted by the email address bo-tony.chen@schneider-electric.com

        B&R

        tony

  11. Unknown User (charlesbaudry)

    Hi Mads,

    I have a question related to the suppression report which is generated by the plugin:

    There is a section where the removed warnings are classified by group. Would it be also possible to classify the removed warning per QAC level? (level 1 until 8)

    Thanks in advance!

    Charles

    1. Unknown User (madsnielsen)

      I'll have to look into this, the suppression report is an optional report, and as such we do not use that report to generate build data from.

      The removed warnings are those that you've created a profile for, for QAC to ignore right? If so, that would be considered a new feature and i STRONGLY encourage you to create a detailed Jira feature request explaining in details what you would like to see, that will make it easier for us to estimate the feature, and hopefully get it sponsored by our plugin sponsor. 

      Best regards,

      Mads

  12. Unknown User (bailu8397)

    Hi, 

    I installed and configured the PRQA plugin according to your instruction, but when I started to build, it failed and gave the error message as follows, I am sure that PRQA license service is working, and QAC can be launched successfully. But why it can not access the license data?  

    Started by user anonymous
    Building in workspace D:\Program Files (x86)\Jenkins\jobs\myjob\workspace
    cvs update -d -P -r HEAD -D 03 Jan 2014 14:08:08 +0800 workspace
    cvs rlog -S -d03 Jan 2014 11:26:28 +0800<03 Jan 2014 14:08:08 +0800 word_count
    Programming Research Quality Assurance Plugin version 1.2.2
    This job will create a report with the following selected parameters:
    QAR project file or file list: word_count.prj
    QAR selected product: QA·C
    QAR selected report type: Compliance

    Most likely cause is a misconfigured tool, refer to documentation (https://wiki.jenkins-ci.org/display/JENKINS/PRQA+Plugin) on how to configure them.
    Failed to detect QA·C version
    QAC Deep Flow Static Analyser 8.1.1 (build 174) Sep 18 2012 for Windows
    Copyright (C) Programming Research.

    ******************************************************************************

    The licence request was refused:

    Can't read license data (-102)

    ******************************************************************************

    Build step 'Programming Research Report' marked build as failure
    Finished: FAILURE

    Best regards

    1. Unknown User (madsnielsen)

      Hey bau lu,

      Thanks for trying out the plugin. As far as i know our plugin does not do anything extraordinary, have you made sure that the plugin runs in the same context as when you ran QAC from the command line, the user that runs the jenkins instance must have read access to licensefile and server? Have you made sure that no active rdp sessions are running and taking the license away? 

      Is this a new problem? Or are you just starting out?

      Best regards,

      Mads

      1. Unknown User (bailu8397)

        Hey Mads,

        Thank you for your reply.

        What do you mean by "the same context"? I ran QAC from the command line, the Jenkins service was started from the windows services list, is that the same context? I am sure that the Jenkins server and the QAC license server are in the same computer which is what I am using now, and the license is ready and not taken away.

        I am just starting out, and this error stops me to go a further step...

        In fact, I got a other virtual machine(VMware) which has been configured to work well, that virtual computer have a windows XP OS while mine has a Windows 7. In the virtual computer, if I stop the QAC license

        service, I will got a error message as follows, you can see that it's different with the problem I met.******************************************************************************The license request was refused

        connection refused at server(-111)******************************************************************************

        1. Unknown User (madsnielsen)

          Hey Bai lu,

          By "context" i mean the user acount that runs the jenkins instance, the logged in user and the account that runs the jenkins instance might not be the same, but i don't totally recall the licensing policy and how it is implemented. I really do not know what the error codes mean, and why it happens, i'll forward this conversation to my contact at PRQA, have you read the manual for QAC?

          Look here: http://www.gtx.com/support/faqs/license/acresso/FLEXnet_Licensing_Error_Codes.asp

          Error code-102; A FLEXid borrow error occurred. What that means i have no idea.   

          Best regards,

          Mads

          1. Unknown User (bailu8397)

            I tried to find something in QAC manual, but nothing helpul. Also, QAC is using the reprise for its license manager, the "Error code-102; A FLEXid borrow error occurred" should work for FLEXLM, so I think maybe it can not help......

            I also contact the technical expert in PRQA, he suggested me to use QAC 8.1.2, I tried and failed again with the same error.

            Started by user anonymous
            Building in workspace D:\Program Files (x86)\Jenkins\jobs\myjob\workspace
            cvs update -d -P -r HEAD -D 08 Jan 2014 10:45:16 +0800 workspace
            cvs rlog -S -d08 Jan 2014 10:44:47 +0800<08 Jan 2014 10:45:16 +0800 word_count
            Programming Research Quality Assurance Plugin version 1.2.2
            This job will create a report with the following selected parameters:
            QAR project file or file list: word_count.prj
            QAR selected product: QA·C
            QAR selected report type: Compliance

            Most likely cause is a misconfigured tool, refer to documentation (https://wiki.jenkins-ci.org/display/JENKINS/PRQA+Plugin) on how to configure them.
            Failed to detect QA·C version
            QAC Deep Flow Static Analyser 8.1.2.6187 Sep 11 2013 for Windows 64-bit
            Copyright (C) Programming Research.

            ******************************************************************************

            The licence request was refused:

            Can't read license data (-102)

            ******************************************************************************

            Build step 'Programming Research Report' marked build as failure
            Finished: FAILURE

            1. Unknown User (bailu8397)

              Finally I got through this, I changed the account to the one that I used to log in the windows, and it worked.

               
              It seems that we can not use the local system account to start the Jenkins service.

              Thank you very much, I can go a further step!

  13. Unknown User (thunder860)

    Hello,

    We recently upgraded from QAC 8.1 to QAC 8.2 and started use QAF with our projects; however, we can't seem to get the Jenkins job set up correctly. Any insight you could provide would be extremely helpful.

    Programming Research Quality Assurance Plugin version 2.0.9
    This job will create a report with the following selected parameters:
    workspace location C:\Program Files (x86)\Jenkins\jobs\GP_APPL_QAF_TEST\workspace
    Failed getting results
    This should not be happinging, writing error to log
    Build step 'Programming Research Report' marked build as failure
    Finished: FAILURE
    
    Dec 04, 2014 9:04:32 AM INFO hudson.model.Run execute
    GP_APPL_QAF_TEST #19 main build action completed: SUCCESS
    Dec 04, 2014 9:04:32 AM SEVERE net.praqma.jenkins.plugin.prqa.notifier.PRQANotifier perform
    Unhandled exception
    java.lang.IllegalArgumentException
            at java.lang.ProcessImpl.<init>(Unknown Source)
            at java.lang.ProcessImpl.start(Unknown Source)
            at java.lang.ProcessBuilder.start(Unknown Source)
            at net.praqma.util.execute.CommandLine.run(CommandLine.java:123)
            at net.praqma.prqa.products.QACli.getProductVersion(QACli.java:48)
            at net.praqma.jenkins.plugin.prqa.PRQARemoteToolCheck.invoke(PRQARemoteToolCheck.java:282)
            at net.praqma.jenkins.plugin.prqa.PRQARemoteToolCheck.invoke(PRQARemoteToolCheck.java:53)
            at hudson.FilePath.act(FilePath.java:919)
            at hudson.FilePath.act(FilePath.java:897)
            at net.praqma.jenkins.plugin.prqa.notifier.PRQANotifier.perform(PRQANotifier.java:434)
            at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
            at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:770)
            at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:734)
            at hudson.model.Build$BuildExecution.post2(Build.java:183)
            at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:683)
            at hudson.model.Run.execute(Run.java:1784)
            at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
            at hudson.model.ResourceController.execute(ResourceController.java:89)
            at hudson.model.Executor.run(Executor.java:240)
    

    Thanks!

  14. Unknown User (amoreno)

    Hi,

    First thanks to have this plugin to make QAC++ check to be done automatically.

    My suggestion is to add a new column "Number of  PRQA warnings" to a view  in which you can visualize the total number of warnings in a job .

    Kind regards.

  15. Unknown User (dan_49)

    Hi,

    I use PRQA plugin to check automatically the rules. But i have an error log in qar.trace file :

    standard.prdf.generator failed. return code = 18.

    Where can i find an explication of this code to try to resolve my problem.

    Thanks for your answers.

    1. Unknown User (dan_49)

      The error come from the construction of the .prj file.

      Especially for the first items of the project, even if there are not used, the SubsPers, AnalPers and CompPers should be defined and should really exist.

  16. Unknown User (marco_g)

    Hello,

    i want to use QA C with Jenkins and configured QA C as a PRQA Tool. In the jenkins project i use the Legacy PRQA Tool. After a build i got the following message:

    Programming Research Quality Assurance Plugin version 2.1.0
    This job will create a report with the following selected parameters:
    QAR project file or file list:	C:\Program Files (x86)\Jenkins\workspace\Trial\QA_C_Trial.prj
    QAR selected product:		QA·C
    QAR selected report type:	Compliance
    
    Workspace : C:\Program Files (x86)\Jenkins\workspace\Trial
    ERROR: Step ‘Programming Research Report’ aborted due to exception: 
    java.lang.NoSuchMethodError: net.praqma.prqa.reports.PRQAReport.getEnvironment()Ljava/util/Map;
    	at net.praqma.jenkins.plugin.prqa.PRQARemoteReport.invoke(PRQARemoteReport.java:71)
    	at net.praqma.jenkins.plugin.prqa.PRQARemoteReport.invoke(PRQARemoteReport.java:50)
    	at hudson.FilePath.act(FilePath.java:998)
    	at hudson.FilePath.act(FilePath.java:976)
    	at net.praqma.jenkins.plugin.prqa.notifier.PRQANotifier.perform(PRQANotifier.java:480)
    	at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
    	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:736)
    	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:682)
    	at hudson.model.Build$BuildExecution.post2(Build.java:186)
    	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:627)
    	at hudson.model.Run.execute(Run.java:1762)
    	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    	at hudson.model.ResourceController.execute(ResourceController.java:97)
    	at hudson.model.Executor.run(Executor.java:419)
    Finished: FAILURE

     

     

    If i start the QA C via the project file everythin is fine. Probably i choose a warong config...

    Thnaks marco

     

    1. Unknown User (rubenns)

      I have the same error.

  17. Unknown User (jess)

    Hi, nice to see some activity in the comments section!  I have a few questions (smile)

    What are the advantages of this plugin opposed to triggering through batch file as one would do locally?  Seems to me that QA-C configuration is better stored as files in a vcs repository anyway... 

    Anyway, I tried to use this plugin to set my license server, qacli admin --set-license-server <port (hostname)ip>, as I am having issues with receiving the license through Jenkins.  I have an unlimited version of QA-C 7.2R, but seem to be missing command line interface utility qacli.  Is this usually included with the product or installed with the plugin?  Either way, my Jenkins job cannot find it.

    Lastly, I would like to run QA-C as part of a Jenkin's Pipeline project (as opposed to Freestyle projects, as described) - can you please add the appropriate section(s) to the Pipeline Syntax Snippet Generator?

  18. Unknown User (santhoshvs)

    I got this below error when building with PRQA analysis,Can someone please let me know why i get these kind of errors?
     > Progress(File-based Analysis): ................................... done
    Failed to perform analysis. Will not continue with report generation
    Failed getting results
    java.io.IOException: ERROR: Failed to analyze, please check the analysis command message above for more details
    Build step 'Programming Research Report' changed build result to FAILURE
    Build step 'Programming Research Report' marked build as failure
  19. Unknown User (sbainbridge82)

    Hi,

    I suggest you enter a support request to PRQA via http://www.prqa.com/services/contact-support/ giving details such as version numbers of QAC, QACPP, Jenkins and the PRQA Plugin version.

    Regards,

    Steve

     

    1. Unknown User (santhoshvs)

      Thanks steve.

      Problem was with my build project. it wasn't generating the object files properly. 

      Now it working perfect.

  20. Unknown User (santhoshvs)

    How to exclude/include certain files / folder from QAC analysis..? PRQA plugin doesnt have the option.whatever project path is provided,it analysis and generate report.

    Anyone , Please suggest/advice.