[core] Backport to PMD6 changes to accomodate PicoCli in PMD7#4161
Conversation
- Companion PR for pmd#4059 - Add deprecations and path the way for the upcoming changes to the CLI in PMD7
Generated by 🚫 Danger |
adangel
left a comment
There was a problem hiding this comment.
Thanks!
I noticed recently, we use "-stress" in PMDCoverageTest, but I think it's really not needed.
"-benchmark" is used in the same test class. But it is also used in maven-pmd-plugin. Do we need to change anything on this side? (probably not for pmd6, but for pmd7?)
| m.put("-no-cache", "--no-cache"); | ||
| m.put("-v", "--use-version"); // In PMD 7, -v will enable verbose mode | ||
| m.put("-V", "--verbose"); // In PMD 7, -V will show the tool version | ||
| m.put("-min", "--minimum-priority"); |
There was a problem hiding this comment.
I was just wondering about deprecating "-min", but it actually fixes #3426 👍
| readonly CLASSNAME="net.sourceforge.pmd.util.viewer.Viewer" | ||
| ;; | ||
| "cpdgui") | ||
| echo "'cpdgui' is deprecated and will be removed in PMD 7.0.0, use 'cpd-gui' instead." |
There was a problem hiding this comment.
pmd cpd-gui
This command is not working in Command Prompt. It just open window for a moment then automatically close.
There was a problem hiding this comment.
@VishV-Android please, open a new issue with full details.
There was a problem hiding this comment.
@jsotuyod #4913 (comment)
New issue created with details.
It's not. The
Benchmark is useful (does print timing report to stderr), but it's now implemented fully at pmd-cli in PMD7… I did so because:
I didn't think about Maven honestly… Maven would not be able to pass the flag (it can call the rendering itself though), but does it make sense? is there really a case for this flag existing on Maven? Is this flag useful to anyone else beyond ourselves to measure the impact of changes we do to PMD? |
👍
I found the original feature request here: https://issues.apache.org/jira/browse/MPMD-181 |
Co-authored-by: Clément Fournier <clement.fournier@tu-dresden.de>
oowekyala
left a comment
There was a problem hiding this comment.
A couple of comments that came to me when using PMDConfiguration in PMD 7. I will submit a PR for PMD 6.52.0
| * | ||
| * @return URI | ||
| */ | ||
| public URI getUri() { |
There was a problem hiding this comment.
I think this name is too vague and we should at least rename it (eg to getSourceDbUri or so)... Maybe it's also the right time to deprecate this feature altogether. It's untested, and it's completely unclear how to use it at all.
| return inputFilePath == null ? null : inputFilePath.toString(); | ||
| } | ||
|
|
||
| public Path getInputFile() { |
There was a problem hiding this comment.
Similarly, this is very vague and confusing given we have getInputPathList and other similar methods. I would name this getInputFileListPath maybe
| return ignoreFilePath == null ? null : ignoreFilePath.toString(); | ||
| } | ||
|
|
||
| public Path getIgnoreFile() { |
Describe the PR
-language,-version,-minoptions #3426Related issues
-language,-version,-minoptions #3426Ready?
./mvnw clean verifypasses (checked automatically by github actions)