Warning: It is not recommend to use VS Code for developing. See Known Issues below.
Import PMD ProjectThis needs to be done only once.
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 PMDPmdCli
.main
-method. {
"type": "java",
"name": "PmdCli with args",
"request": "launch",
"mainClass": "net.sourceforge.pmd.cli.PmdCli",
"projectName": "pmd-cli",
"args": "check --help",
"classPaths": ["$Test"]
},
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.
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
DesignerStarter
and run it.Some Java files in PMD cannot be compiled with VS Code. The Java plugin for VS Code is based on the Eclipse Java Plugin which uses an own compiler (ejc). This compiler has some subtle differences when dealing with type inference and generics and sometimes cannot compile PMD source code correctly. PMD source is valid, it compiles with openjdk, but just not with ecj.
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â.
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