Reputation: 709
I'm implementing the Maven CPD PMD plug-in to to spot and (fail the build) if any instances of code duplication are presennt in the project.
This all works fine. However, The output error to the terminal in intellij idea is in the form:
Terminal output:
CPD Failure: Found 31 lines of duplicated code at locations:
[INFO] C:\Users\bob\Documents\Project\Folder\src\main\java\HelloWorld.java line 330
[INFO] C:\Users\bob\Documents\Project\Folder\src\main\java\HelloWorld.java line 428
This works fine and how it should do,
although, I recently had experience implementing Maven Check Style plug-in, which output error looks like this :
[INFO] C:\Users\bob\Documents\Project\Folder\src\main\java\HelloWorld.java:428
This is infinitely more useful as I can just click on this "file path" and go directly to the file and line where this error occurs ie. HelloWorld.java at line 428.
so, my question is, is there anyway of getting intellij idea to "recognise" the output in the form:
[INFO] C:\Users\bob\Documents\Project\Folder\src\main\java\HelloWorld.java line 428
and making this "clickable" ??
Any help or insights will be greatly appreciated as having to manually navigate to the class is really annoying :( (especially as I have hundreds of errors).
Thanks all.. :)
Upvotes: 4
Views: 2538
Reputation: 1
The "Console File Caddy" plugin handles this beautifully, including file line/column
Upvotes: 0
Reputation: 2702
With Intellij can you run your code using a Run Configuration rather than using the terminal? This will give you what you want.
Also, as a comment, Visual Studio Code does exactly what you want out of the box.
Upvotes: 0