0% found this document useful (0 votes)
4 views10 pages

QAPlug Tutorial: Code Review & Integration

The document is a tutorial for QAPlug, detailing how to get started with code review, create and manage analysis profiles, and integrate with Sonar for real-time analysis. It includes instructions on activating on-the-fly checks, importing and exporting analysis profiles, and updating QAPlug. Additionally, it provides links to current releases and contact information for SolDevelo, the vendor of QAPlug.

Uploaded by

daiduan623
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views10 pages

QAPlug Tutorial: Code Review & Integration

The document is a tutorial for QAPlug, detailing how to get started with code review, create and manage analysis profiles, and integrate with Sonar for real-time analysis. It includes instructions on activating on-the-fly checks, importing and exporting analysis profiles, and updating QAPlug. Additionally, it provides links to current releases and contact information for SolDevelo, the vendor of QAPlug.

Uploaded by

daiduan623
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Tutorial – QA Plug 2023/5/1, 23:52

TUTORIAL Professional Services

Please check our oNer:


Getting Started With QAPlug:
Code Review Software Development
Creating your own analysis pro4le Outsourcing
Import and export analysis pro4les ([Link]
QAPlug actualization development-outsourcing)
How to activate on-the-@y checks (QAPlug Real-Time Analysis) using QAPlug inspection
Integrating Sonar with QAPlug Application Development
([Link]
development)

Code Review Mobile & Web Solutions


To make a review of your code using QAPlug, 4rst you have to select the scope. ([Link]
Please select 4le, package or the whole directory by right mouse click. and-web-solutions)

Cloud Infrastructure & Hosting


Services
([Link]
infrastructure-hosting-services)

Testing & Quality Assurance


([Link]
and-quality-assurance)

More information at: SolDevelo


([Link]

Current Releases

QAPlug 1.3.29 Dec 12, 2022


– PMD 1.4.8 Dec 13, 2021
(/wp-content/uploads/code_review_large.png) – Checkstyle 1.4.1 Feb 22, 2021
– FindBugs 1.3.10 Nov 29, 2021
In a new window an appropriate analysis scope will be selected
– Hammurapi 1.3.5 Apr 04, 2019
You will be also able to change analysis pro4le which you want to be used.

QAPlug Blog

QAPlug 1.3.29 released


(/wp-content/uploads/code_review_analysis_scope_large.png) ([Link]
3-29-released/)

QAPlug 1.3.28 released


([Link]
3-28-released/)
The results of the analysis will be presented in a separate window with @exible grouping functionality.
QAPlug-PMD 1.4.8 released
([Link]
pmd-1-4-8-released/)

QAPlug-FindBugs 1.3.10 released


([Link]
4ndbugs-1-3-10-released/)

[Link] Page 1 of 10
Tutorial – QA Plug 2023/5/1, 23:52

QAPlug 1.3.27 released


([Link]
3-27-released/)

Vendor

SolDevelo Sp. z o.o.


Regional Court for the City of
Gdańsk
KRS: 0000332728
TAX ID: PL5862240331
REGON: 220828585
Share capital: 60,000.00 PLN
(/wp-content/uploads/code_review_results_large.png) Contact
Email: sales@[Link]
Creating Your Own Analysis Pro!le Phone PL: +48 58 782 45 40
Phone USA: +1 206 357-8481
You can create your own scanning pro4le in QAPlug Coding Rules window.
(Main menu: Settings | Coding Rules ).

(/wp-content/uploads/qaplug_creating_pro4le.png)

You are also able to 4ll speci4c parameters of the coding rules options.

[Link] Page 2 of 10
Tutorial – QA Plug 2023/5/1, 23:52

(/wp-content/uploads/coding_rules_options_large.png)

Import And Export Analysis Pro!les


Import and Export options you can 4nd in Coding Rules settings tab (please see picture below).

You are able to import several coding rules conOguration Oles (eg. Checkstyle, PMD, FindBugs) to one pro4le
simply be repeating import action.

You are also able to export your analysis pro4le to xml con4guration 4le.
Please notice that you are able to decide which modules will be exported.
Generated 4le format depends on the selected modules.

[Link] Page 3 of 10
Tutorial – QA Plug 2023/5/1, 23:52

If you want to use generated 4le in your own tool (FindBugs, PMD, Checkstyle, Sonar, etc.) without any
modi4cations, then you should select only one module at once.

QAPlug Actualization
You can check if QAPlug and its submodules are up to date in QAPlug Settings window.
(Main menu: Settings | QAPlug).

(/wp-content/uploads/qaplug_actualization_large.png)

How To Activate On-The-Fly Checks (QAPlug Real-Time Analysis) Using


QAPlug Inspection
If you want to use QAPlug on-the-@y checks functionality in your IntelliJ IDEA, please
do not forget to activate QAPlug Real-Time Analysis inspection.

Below you can 4nd picture presenting how to do that:

[Link] Page 4 of 10
Tutorial – QA Plug 2023/5/1, 23:52

(/wp-content/uploads/on_the_@y_checks_activate_qaplug_inspection.png)
Please remeber that QAPlug Real-Time Analysis is using Default Project proOle.

If you want to change this pro4le, please use Coding Rules settings tab.

(/wp-content/uploads/coding_rules_how_to_change_default_pro4le.png)

After that step, changes done by you in the code will aNect results of the analysis.

(/wp-content/uploads/on-the-@[Link])

Integrating Sonar With QAPlug


This tutorial shows you how to transfer coding rules con4gured in Sonar into QAPlug.

Sonar is an open source quality management platform, dedicated to continuously analyze and measure source
code quality. It allows you to analyze code using the most popular coding rules like: Checkstyle, Findbugs and
PMD.

Usually, the Sonar code analysis is performed only once or twice a day. What about the situation when we need a
real time analysis?

In this case we can use QAPlug and import coding rules from Sonar.
See how to do that in the steps below:

1. Open Sonar in your web browser.

[Link] Page 5 of 10
Tutorial – QA Plug 2023/5/1, 23:52

(/wp-

content/uploads/[Link])

2. Click on ‘Log in’ button to get access to con4guration area.

(/wp-

content/uploads/[Link])
3. After login, click on ‘Con4guration’ button to set your customized coding rules.

(/wp-content/uploads/coding_rules_how_to_change_default_pro4le.png)

(/wp-

content/uploads/[Link])
4. Click on your pro4le name. (in this case ‘Mifos’).
Home ConfigurationAdministrator»Logout&Search
QualityProfiles EnSomeareprofiles. Restorepretle
EventCategories
Javaprofiles (Create
DefantFilters Name Projects Operations

MIR*
DefaultDashboards 10 Rename CODY

MyProfile
115 Setasdefault Coo

SECURITY
SonarwaywithFindbugs 490 0
Users
Sunchecks 59 COPT

(/wp-
Groups
GiODaRoles

ProjectRoles

PoweredbySonarSourcec-OpenSourceLGPLg-v.2.10-riginso-Documentation-Askaquestionif
SYSTEM
GeneralSettings
EmailSettings
Backup
SystemInfo
Updatecenter

sonar

content/uploads/pro4le_name.png)

5. Modify some rules options and con4rm changes using ‘Update’ button.
SECURITY Sonar Minor
Users Info

Groups
GlobalRoles 10results 4;Download1%BulkChange:
ProjectRoles
ActiveseveritvNameexpandcollaose Plugin
SYSTEM Major AbstractClassWithoutAbstractMethod Pmd
GoneralSettinos

EmailSettings Major Abstractnaming Pmd

Backuc
Minor AnnotationUseStyle Checkstyle
SystemInfo
opedteconter
WMajor Checkstyle
Checksforlonganonumousinnerclasses.

14

(/wp-
sonar Updatemaximumallowablenumberoflines.Defaultis20.
Key: [Link]

(Minor AvoidinlineConditionals Checkstyle

Major AvoldNestedBlocks Checkstyle


Findsnestedblocks

allowinSwitchCasetrue Update [Link].


[Link]

Minor AvoidStarImport Checkstyle

Major Oronatasionerositua Findoves

Major badpractice invokedinSwingthrea Findbugs


Major BooleanExpression Checkstyle

content/uploads/[Link])
6. Click on ‘Home’ button to return to projects page.

[Link] Page 6 of 10
Tutorial – QA Plug 2023/5/1, 23:52

Homs ConfigurationAdministrator»Logout#Search
QualityProfiles Qualityprofiles/java/Mifos
EventCategories
MATTERMOTTES
Codingrules Alerts Projects Permalinks ProfileInheritance Changelag

DefaultFilters Name/Key Plugin Severity


DefaultDashboards Any Any Anv SParen

MyProfile Checkstyle Blocker Active


Findbugs
PMD
SECURITY Minor
Users InTo

GrOnos

GiODaRoles
10results E;Download&BulkChange:
ProjecURoles

(/wp-
Active/SeverityName[expandicollapse] Plugin
SYSTEM Major AbstractClassWithoutAbstractMethod Pmd
Generalsettings

EmailSettings
BMajor Abstractnaming Pmd

Backun
AnnotationUseStyle Checkstyle
SystemInfo
UndateCenter AnonInnerLength Checkstyle
Checksforlonganonymousinnerclasses.

14 QUpdate maximumallowablenumberoflines.Defaultis20.
sonar
Key: [Link]

AvoldInlineConditionals Checkstyle
Malor
AvoidNestedBlocks Checkstyle
FindsnestedDIocks

allowinswichcase: Updat [Link].


e

content/uploads/[Link])

7. Click on project name to check errors in code.

Note: To see modi4ed settings in code rules you should rebuild project(using for example command: mvn
sonar:sonar).

(/wp-

content/uploads/[Link])
8. In Sonar ‘Dashboard’ area, select severity of previously modi4ed rule.

(/wp-

content/uploads/[Link])

9. In ‘Violations Drilldown’ area select modi4ed rule and check error in code.

(/wp-

content/uploads/[Link])

10. Now you’ve checked that modi4ed rules are properly working in Sonar.

The next thing to do is to export that modi4ed rules into QAPlug. To do that you can use Permalinks.
11. Return to ‘Con4guration’ area and select your pro4le.

[Link] Page 7 of 10
Tutorial – QA Plug 2023/5/1, 23:52

Home ConfigurationAdministrator»Logout&Search
QualityProfiles EnSomeareprofiles. Restorepretle
EventCategories
Javaprofiles (Create
DefantFilters Name Projects Operations

MIR*
DefaultDashboards 10 Rename CODY

MyProfile
115 Setasdefault Coo

SECURITY
SonarwaywithFindbugs 490 0
Users
Sunchecks 59 COPT

(/wp-
Groups
GiODaRoles

ProjectRoles

PoweredbySonarSourcec-OpenSourceLGPLg-v.2.10-riginso-Documentation-Askaquestionif
SYSTEM
GeneralSettings
EmailSettings
Backup
SystemInfo
Updatecenter

sonar

content/uploads/pro4le_name1.png)

12. Now, go to ‘Permalinks’ tab.


Sonar-MozillaFirefox
FiretoyT •LAP Erubyon. PAAbilityt.. Fhead-er. @[Mifos.. ImCAP "QAPlug... RIcustom... ncustom..usessbac. -Sonar* Sonar

[Link]
HAmo
ConfigurationAdministrator»Logout=Search

QualityProfiles Qualityprofiles/java/Mitos
EventCategories
Codingrules Alerts Prolects Permalinks ProfileInheritance Changelog
Manualmetries

DefaultFilters NAMAIRAN Siphis

DefaultDashboards Any Any Any Search

MyProfile Checkstyle Blocker


Findbugs Critical active
PMD Major
SECURITY Sonar Mainor

Users Info

GlobalRoles 10results HIDownload19BulkChange:§


FrolectRoles
Acuverseverity Nameexpand/collapse) Plugin
(/wp-
SYSTEM
Major AbstractClassWithoutAbstractMethod Pmd
GeneralSettings

EmailSettings VMajor Abstractnaming Pmo

Backuo
Minor AnnotationUseStyle INKSTITTE

SystemInfo
UpdateCenter Major AnonInnerength Checkstyle

1Minor|Y AvoidInlineConditionals Checkstyle


sonar mMajorIT AvoidNestedBlocks Checkstyle

Minor AvoidStarImport Checkstyle

Major Badpractice-AbstractclassdefinescovariantcompareTo)method Findbugs

Major Badpractice-CertainswingmethodsneedstobeinvokedinSwingthread Findbugs


Major BooleanExpressionComplexity Checksivie

[Link]

content/uploads/[Link])

13. In ‘Permalinks’ tab, right-click on link for chosen coding rule and select ‘Save target as…’
Home Configuration#Administrator»Logout%Scarch
QualityProfiles Qualityprofiles/java/Mifos
EventCategories
manuannonneo
Codingrules Alerts Projects PermalinksProfileinheritance Changelog
DefanitFiliers

DefaultDashboards Checkstvle
http//localhost:9.000/orofles/export?tormat-check Open
MyProfile Findbugs OpeninNewWindow

SECURITY
PMD
SeveTarsetdis...
PrintTarget
Users Cut
Groups
(/wp-
PoweredwySonarS Copy &-v.2.10-Blualst-Dosumentatione-Askaquestionin
GiobaRoles CopyShortout
ProjectRoles Poste

SYSTEM
Properties
GeneralSettings
EmailSettings
Backup
SystemInfo
vodateGenier

sonar

content/uploads/[Link])
14. Save permalink as .xml 4le.

Now, you have 4nished all tasks in Sonar. So, the next step is to open IntelliJ IDEA.

15. In open IDEA window, go to Settings → QAPlug.


Settings

QAPlug
-ProjectSettings[mifos-parent] QAPlugisanIntellijIDEAplugintomanagecodequalitywhichintegratestoolssuchasPMD,CheckstyleandFindbugs.
ECodeStyle
BECompiler
ifCopyright Suppressions
rileColors

FileEncodings Suppressioncomment: SUPPRESSCODINGRULES


Gant
Gradle
-QAPlugautoupdates
GUIDesigner [checkforupdates:Daily
Inspections
Lastcheckforupdates:poniedzialek,wresien5.2011
check&update
Nextcheckforupdates:wtorek,wresier6,2011
gAPIUg
CodingRules. Pluginname Installed Available Pluginstatus
Checkstvle QAPlug 1.2.8 1.2.8 Isuptodate

FindBugs QAPlug-FindBu.. 1.2.4 1.2.4 isgotodare

QAPlug-Hamm... 1.2.3 1.2.3 isuptodate


Hammurapi

(/wp-
QAPlug-Check... 1.2.5 1.2.6 isuotodate
PMD
QAPlug-PMD 1.2.5 isdotodate
ReSOUrCas

Scopes
Spelling
EsTasks
TemplateDataLanguages
Itversioncontrol

XSLTFileAssociations
-IDESettings
Appearance
ConsoleFolding
#Debugger
iSEditor
ExternalDiffTools
ExternalTools
FileTemplates
rilelydes
General

оК cancel Apply Help

content/uploads/[Link])
16. Click on ‘Coding Rules’.

[Link] Page 8 of 10
Tutorial – QA Plug 2023/5/1, 23:52

(/wp-

content/uploads/[Link])

17. Right-click on ‘Project Pro4les’ and select ‘Add Project Pro4le’.

(/wp-

content/uploads/[Link])

18. In the ‘New Pro4le’ window,

4ll the pro4le name,


check ‘Import pro4le’ checkbox,
select location of the exported 4le from Sonar
con4rm creation of the new pro4le by clicking on ‘OK’ button.

(/wp-

content/uploads/[Link])
19. After successfull pro4le import, the summary window will appear.

[Link] Page 9 of 10
Tutorial – QA Plug 2023/5/1, 23:52

(/wp-

content/uploads/[Link])

20. The last step is to check in code that imported rules are working properly. So, open project and analyze code
using QAPlug.

(/wp-

content/uploads/[Link])

Now, you have imported coding rules from Sonar. From this moment, you can check the written code on-the-@y
and 4x errors right away!

Please have in mind that we are planning to simplify and extend the integration of Sonar with QAPlug in the
future.

Copyright © 2022 SolDevelo sp. z o.o. ([Link] • Legal Notice


([Link] • Privacy policy ([Link]
policy/)

[Link] Page 10 of 10

You might also like