QAPlug CheeckStyle, FindBugs and PMD - dineshmadhup/Core-Java GitHub Wiki

How to use QAPlug with IntelliJ IDEA Java IDE to ANALYZE Java Code

QAPlug:

Dealing with QAPlug for Java code, We learn three tools together which is checkstyle, FindBugs and PMD. Checkstyle: Using this tool, your code is constantly inspected for coding standard deviations. FindBugs: It is open source tool available to detect bugs in code and provide you suggestions for fix. PMD: It is open source tool available to analyze the source code.


Without any further wait, lets make developers like us life easier. Lets Proceed...


Step by Step instructions:


Step:1

Open your pre-installed IntelliJ IDEA IDE then press CMD + Shift + A (For MAC) or Ctrl + Shift + A (For Windows) and hit enter. Type settings in "Enter Action: " box and hit enter again as shown in below diagram.

qaplug-1

Step:2

After you hit in step-1, you will see following window In Plugins search box, type QAPLUG and hit Enter.If you see No plugins found as in below diagram, just click "Search in repositories" as shown in below screen capture.

qaplug-2

Step:3

In this step, you can the list of plugins in which you click Install button one by one. You can ignore QAPlug-Hammurapi, which is not our topic of interest.

qaplug-3

As soon as you finish to install QAPlug, you select next, for example QAPlug-Checkstyle and Install. And So on...

qaplug-4

After you finish all four required plugins. Hit restart IntelliJ IDEA IDE. And you are done.


Analyzing the Code with QAPlug

Open your project which you would like to analyze. Right click your project and select ANALYZE => ANALYZE CODE

qaplug-5

Select your project

In this step, its your choice to select the project you would like to test. I recommend you to select "whole project".

qaplug-6

Result:

You will see the output after analyzing your complete code.

qaplug-7

If you see the analysis result on right side: Problem found: 1 FindBugs: 0 Checkstyle: 1 PMD: 0

Let me show you how to fix this Reliability issue.

The warning message is: Method 'home' is not designed for extension - needs to be abstract, final or empty. Let me make home method final and run the test again.

qaplug-8

Result after final keyword:

qaplug-9

You see...there is no problems at all now. Thank you QAPlug for making our life easier. Thank you.

⚠️ **GitHub.com Fallback** ⚠️