A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.pmd-code.org/latest/pmd_devdocs_building_vscode.html below:

Building PMD with VS Code

Table of Contents

Warning: It is not recommend to use VS Code for developing. See Known Issues below.

Import PMD Project

This needs to be done only once.

  1. Install Visual Studio Code
  2. Select File > Open Folder… and choose the already checked out PMD source folder.
  3. Install Extension Pack for Java
  4. After a while, you should see in the Explorer under “Java Projects” all the modules. This is the “Java Project Explorer”.
Running Unit Tests

Note:

You’ll get the notification “Build failed”. You can try to ignore the error and continue, but you might end up with “Unresolved compilation problems”. See below under “Known Issues” for more information.

PMD currently is still built for Java 8 and the VS Code plugin chooses a Java 8 runtime. For building however, we use Java 11 and also the tests require some Java 11 features. You might need to override the java version manually: Ctlr+Shift+P and enter “configure java runtime”. There you can override the java version for each project/module.

Running / Debugging PMD

Note:

If you want to run/debug other PMD modules than PMD Java, then you need to add additional dependencies to PMD CLI as scope test, e.g.

        <dependency>
            <groupId>net.sourceforge.pmd</groupId>
            <artifactId>pmd-apex</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
Formatter configuration

Select File > Preferences > Settings and search for “java format settings”. Then enter the full path to eclipse/pmd-eclipse-code-formatter.xml from the “build-tools” repository.

Running the Designer

The designer lives in a separate repository, that you’ll need to fork and clone first: Designer repository

git clone git@github.com:your_user_name/pmd-designer.git
  1. Select File > Add Folder to Workspace… and choose the pmd-designer source folder.
  2. Wait until the project has been successfully imported.
  3. Navigate to class DesignerStarter and run it.
Known Issues

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4