Installing CodeScan for IntelliJ
  • 11 Aug 2022
  • 2 Minutes to read
  • Contributors
  • Dark
    Light

Installing CodeScan for IntelliJ

  • Dark
    Light

The CodeScan IntelliJ plugin provides on-the-fly feedback to developers on bugs and quality issues, it is a fully-integrated user experience in the IntelliJ IDE.

The plugin is derived from SonarLint™.

Note:

CodeScan and VS Code Plugin as of now will not work along with the SonarLint™ installation, so first you must uninstall SonarLint™.

image.png

Installation

You will need:

  • For Self Hosted: a working SonarQube™ (7.9+) installation and licensed CodeScan (4.4+) plugin to get started (see here).
  • For Cloud: A CodeScan Cloud organization with a valid license or trial.
  • NodeJS for Javascript support.

To install CodeScan for IntelliJ:

  • Navigate to the Settings > Plugins.
  • Click on Marketplace tab at the top of the settings window,
  • Search CodeScan and install the plugin.
  • Restart IntelliJ for the changes to take effect.

Setup Connected Mode

Set up configuration with the CodeScan by following the steps below if you need to set up a new one.

  1. Go to Settings (preferences on Mac).
    image.png

  2. Select or double click on Tools and choose CodeScan in the dropdown.

  3. You will see another Settings tab under which you can see the (+) icon, click on it.
    image.png

Note:

Make sure you select the checkbox which says "Automatically trigger analysis".

  1. It opens a new popup window, where you have to give the Configuration name and choose the connection type of your preference.
    image.png
Note

If you're using the CodeScan European instance with the Codescan IntelliJ plugin, select Connect to a server and enter https://app-eu.codescan.io in the CodeScan URL section.
image.png

  1. Click Next.
  2. Now it will take you to another window where you can enter your token.
Note:

If you are a CodeScan Cloud user, clicking on create token takes you directly to CodeScan Cloud window where you can generate the token.

  1. Click Next after you enter the token.
  2. A new window shows up where you can choose the Organization (If you are part of multiple organizations) which you want to configure.
    image.png
  3. Once you choose the Organization, click on Next and then Finish.

To Bind the project with CodeScan:

  1. Go to File > Settings > CodeScan > Project settings.
  2. Select the checkbox which says Bind the project with CodeScan/CodeScan Cloud.
    image.png
  3. Select the Connection under the Project binding that you have just setup or choose from the existing one and the project you want to bind and analyze.
  4. Click on Apply, for the changes to be applied.
  5. You will be able to see the errors under the CodeScan window at the bottom in the IDE if there are any, automatically, for the file which is open.
  6. If the errors don't show up immediately, reopen the file and you will be able to see the changes.
    image.png

Was this article helpful?