229 Commits

Author SHA1 Message Date
Andreas Dangel
e3fd77a63b
[core] Doc and use new CPD option --ignore-sequences 2023-05-19 10:03:29 +02:00
Andreas Dangel
6b4c6b2787
Merge branch 'master' into pr-4470 2023-05-19 09:46:16 +02:00
Andreas Dangel
a35d647fee
[cli] Use RulePriority.name() for completion candidates
This avoids having spaces in the possible values. E.g. MEDIUM_HIGH instead of Medium High.
2023-05-09 21:52:11 +02:00
Andreas Dangel
23756ec662
[cli] Support numeric values for minimum-priority 2023-05-09 20:47:18 +02:00
Andreas Dangel
fa0be31c24
[cli] Add test for minimum-priority 2023-05-09 20:32:26 +02:00
Juan Martín Sotuyo Dodero
cb62fab1c1
Merge pull request #4523 from oowekyala/pmd7.remove-core-cli
[core] Remove old CLI from pmd core
2023-05-02 11:26:29 -03:00
Andreas Dangel
b79e6bd92b
[release] prepare for next development iteration 2023-04-29 23:39:34 +02:00
Andreas Dangel
a97e108269
[release] prepare release pmd_releases/7.0.0-rc2 2023-04-29 23:39:28 +02:00
Clément Fournier
b89970d5fe
Merge branch 'pmd7-textfile-display-name' into clem.pmd7-refactor-cpd 2023-04-29 19:20:38 +02:00
Clément Fournier
82b4d97cb5
Remove old CLI, more doc 2023-04-29 02:52:09 +02:00
Juan Martín Sotuyo Dodero
c54bd846b4 Fix #4484
- Avoid an NPE on properties.
2023-04-18 20:15:48 -03:00
wener
85a0d7f59f Added strings as literal and ignore identifiers in sequences 2023-04-13 17:29:12 +02:00
Andreas Dangel
1c2d77fd6a
Introduce a pmd-languages-deps module
This is kind of a [BOM](https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#bill-of-materials-bom-poms), but different: It defines hard dependencies and not just versions for dependencyManagement.
This new module depends on all languages modules and is used by pmd-cli and by pmd-dist. So, we have only one place to modify, when we add new language modules.
2023-04-06 10:20:42 +02:00
Clément Fournier
837c7952f5
Merge branch 'master' into clem.pmd7-refactor-cpd 2023-04-04 22:11:38 +02:00
Andreas Dangel
d9b2444d7e
[release] prepare for next development iteration 2023-03-25 12:47:33 +01:00
Andreas Dangel
356af8b636
[release] prepare release pmd_releases/7.0.0-rc1 2023-03-25 12:30:51 +01:00
Andreas Dangel
6621603908
[cli] Fix NPE when only --file-list is specified 2023-03-18 11:02:08 +01:00
Clément Fournier
40aa9de6e1
Checkstyle 2023-02-20 14:55:21 +01:00
Clément Fournier
60f28c5c35
Fix cli tests 2023-02-20 14:30:44 +01:00
Clément Fournier
11e2a97c5f
Introduce ts language module 2023-02-20 14:09:07 +01:00
Clément Fournier
a12bbf8dde
Remove duplicated options in AbstractConfiguration
Fix logging issue
2023-02-19 16:51:53 +01:00
Clément Fournier
a3831e95dc
move more things into AbstractConfiguration 2023-02-19 15:39:47 +01:00
Clément Fournier
0134f5e060
Use Path instead of File in CPDConf 2023-02-19 15:02:05 +01:00
Clément Fournier
ddbfc90c14
Fix build 2023-02-12 20:06:28 +01:00
Clément Fournier
fb9f49624d
Delete old CPD Language interface
reorganize cpd modules
2023-02-12 18:03:58 +01:00
Clément Fournier
8fbd830daa
Style and renamings 2023-02-12 17:24:02 +01:00
Clément Fournier
f2cfd8f5a6
More refactorings 2023-02-11 18:43:37 +01:00
Clément Fournier
65d953bfb4
Progress 2023-02-11 18:10:35 +01:00
Clément Fournier
cf81809990
Change a ton of stuff in CPD 2023-02-10 18:21:23 +01:00
Clément Fournier
ef365cd9aa
Merge branch '7.0.x' into pmd7-language-lifecycle 2023-02-02 01:04:53 +01:00
Clément Fournier
a7cf226dae
Merge branch '7.0.x' into pmd7-language-lifecycle 2023-01-30 16:28:19 +01:00
Andreas Dangel
014c28bb1e
Merge branch 'pmd/7.0.x' into pmd7-junit5-part3 2023-01-30 13:36:15 +01:00
Andreas Dangel
78d7033dc4
Fix compile errors 2023-01-30 10:45:52 +01:00
Andreas Dangel
d8b41bab6e
Merge branch 'pmd/7.0.x' into pr-4354 2023-01-30 10:21:50 +01:00
Clément Fournier
32d95a46e8
Merge branch '7.0.x' into pmd7-language-lifecycle 2023-01-27 13:55:39 +01:00
Andreas Dangel
3d530458bb
Remove junit and related dependencies 2023-01-27 11:49:03 +01:00
Andreas Dangel
f1ee39b1f5
Migrate remaining tests to JUnit5 2023-01-27 10:26:49 +01:00
Andreas Dangel
8e558eaeaf
Fixes from review (#4363) 2023-01-26 18:16:39 +01:00
Andreas Dangel
5c9893431f
Merge branch 'pmd/7.0.x' into pmd7-pr-4214 2023-01-26 18:07:54 +01:00
Andreas Dangel
3ab73b7d50
Re-add some cli tests 2023-01-26 16:53:41 +01:00
Andreas Dangel
1861ae5b5f
Move tests from CoreCliTest to PmdCliTest related to --relativize-paths-with 2023-01-26 10:10:22 +01:00
Andreas Dangel
c659e86bea
Add new option --relativize-paths-with to new cli 2023-01-26 10:10:15 +01:00
Andreas Dangel
8fa35ae10d
Remove old --short-names option (cli + ant) 2023-01-26 10:10:09 +01:00
Clément Fournier
310637f357
Merge remote-tracking branch 'origin/clem.pmd7-cpd-deprecations' into clem.pmd7-cpd-deprecations 2023-01-25 17:54:42 +01:00
Clément Fournier
89f959200a
Merge branch '7.0.x' into clem.pmd7-cpd-deprecations 2023-01-25 17:00:10 +01:00
Clément Fournier
2078692d39
Merge branch '7.0.x' into pmd7-language-lifecycle 2023-01-25 00:48:36 +01:00
Clément Fournier
403fcdae82
[core] Move utility classes around 2023-01-23 18:47:52 +01:00
Andreas Dangel
d1d10d1426
[cli] Add "--no-progress" back to PmdCliTest
When running the tests under cygwin, initializing the progressbar fails: The tests stall when executing "tty.exe" to determine the terminal type.
2023-01-22 18:33:26 +01:00
Andreas Dangel
7494fc9ecd
Fixes from review 2023-01-16 15:35:32 +01:00
Andreas Dangel
3afe1aa6d2
Merge branch 'pmd/7.0.x' into pr-4235 2023-01-16 15:07:50 +01:00
Andreas Dangel
0ad3755a2b
Log debug through slf4j directly 2023-01-16 13:23:30 +01:00
Clément Fournier
c6f18c4806
Merge branch '7.0.x' into clem.pmd7-cpd-deprecations 2023-01-08 18:25:01 +01:00
Juan Martín Sotuyo Dodero
729ce9c3b0
Use shorthand method
Co-authored-by: Clément Fournier <clement.fournier@tu-dresden.de>
2022-12-21 12:17:43 -03:00
Clément Fournier
8cdfe24277
Review comments 2022-12-04 18:26:21 +01:00
Juan Martín Sotuyo Dodero
a653ab888e Fix short-circuit checks for tee listeners 2022-11-26 15:45:36 -03:00
Juan Martín Sotuyo Dodero
1042781aa3 Rework to use an initializer class for expansion 2022-11-26 15:34:02 -03:00
Clément Fournier
bb31553e8c
Delete lots of deprecated stuff in CPD core
This includes its CLI
2022-11-26 14:54:09 +01:00
Juan Martín Sotuyo Dodero
eddb8f5911 Checkstyle 2022-11-25 15:48:09 -03:00
Juan Martín Sotuyo Dodero
b836a35c8c [cli] Move CLI progressbar rendering to pmd-cli
- Took the chance to improve how we render it
 - Added support for interactive terminals
 - Improved the overall performance / thread-safety of report rendering to STDOUT
2022-11-25 15:24:57 -03:00
Clément Fournier
cbe98ea71a
Do that with CPD tests too 2022-11-25 18:39:34 +01:00
Clément Fournier
20eb129dfe
Move cli tests from lang modules to cli 2022-11-25 12:19:24 +01:00
Clément Fournier
675710d0e7
Cleanup Cli tests
Remove some deprecated things left over by #4059
2022-11-25 11:28:59 +01:00
Clément Fournier
d3ffc1d212
Merge branch '7.0.x' into pmd7-language-lifecycle 2022-11-24 20:22:58 +01:00
Clément Fournier
5a4205a877
Merge branch '7.0.x' into pr/4059 2022-11-18 11:47:18 +01:00
Juan Martín Sotuyo Dodero
1f43af7d83 Change pmd run to pmd check with no aliases 2022-10-15 02:07:24 -03:00
Juan Martín Sotuyo Dodero
1bcc39d6a3 PMDConfiguration to use stricter types
- No more raw Strings going around
2022-10-15 02:06:53 -03:00
Juan Martín Sotuyo Dodero
cedafa9e0d Allow positional parameters as equivalent to -d 2022-10-15 02:06:53 -03:00
Juan Martín Sotuyo Dodero
48c584c2cf Review feedback 2022-10-15 02:06:53 -03:00
Juan Martín Sotuyo Dodero
c093ce73ac Cleanup module dependencies 2022-10-15 02:06:53 -03:00
Juan Martín Sotuyo Dodero
0de5b8fb03 Fix checkstyle warnings 2022-10-15 02:06:53 -03:00
Juan Martín Sotuyo Dodero
2b3d517581 Fix PMD warnings 2022-10-15 02:06:53 -03:00
Juan Martín Sotuyo Dodero
caa3295511 No need to have a default --use-version 2022-10-15 02:06:53 -03:00
Juan Martín Sotuyo Dodero
50ae4ddeac Try to forcefully disable Picocli ANSI
- This is a blind test to see if this is the cause for Windows' failing the build
2022-10-15 02:06:53 -03:00
Juan Martín Sotuyo Dodero
f1cdacf200 Unwire file separator 2022-10-15 02:06:53 -03:00
Juan Martín Sotuyo Dodero
e093f19577 Unwire absolute paths 2022-10-15 02:06:53 -03:00
Juan Martín Sotuyo Dodero
ee652286c6 Update test to latest changes 2022-10-15 02:06:53 -03:00
Juan Martín Sotuyo Dodero
6c87c704c7 Adapt to latest changes from upstream 2022-10-15 02:06:53 -03:00
Juan Martín Sotuyo Dodero
90e5c52295 Use only lang-version pairs
- no more default/ latest versions
 - this assumes all versions have names, which is till pending, but agreed on
2022-10-15 02:06:52 -03:00
Juan Martín Sotuyo Dodero
cd7e41a9cb Remove name normalization
- Terse names are becoming more strictly defined soon
2022-10-15 02:06:52 -03:00
Juan Martín Sotuyo Dodero
366769cc81 Support languiage aliases in PMD CLI 2022-10-15 02:06:52 -03:00
Juan Martín Sotuyo Dodero
4a6f838d67 Cleanup code 2022-10-15 02:06:52 -03:00
Juan Martín Sotuyo Dodero
24bbf538b7 Fix NPE 2022-10-15 02:06:52 -03:00
Juan Martín Sotuyo Dodero
924ca85ff5 Add ast-dump CLI test 2022-10-15 02:04:12 -03:00
Juan Martín Sotuyo Dodero
a4a5affe83 Include everything in pmd-dist
- Include both the pmd-cli module and the completion script
2022-10-15 02:04:12 -03:00
Juan Martín Sotuyo Dodero
7824595603 Logging cleanups 2022-10-15 02:04:12 -03:00
Juan Martín Sotuyo Dodero
afde91247f Make --no-progress negatable 2022-10-15 02:04:12 -03:00
Juan Martín Sotuyo Dodero
7b416bc12d Clean up todos 2022-10-15 02:04:12 -03:00
Juan Martín Sotuyo Dodero
78d046c7d1 Make fail on violation negatable
- Instead of doing `--fail-on-violation false` we now do `--no-fail-on-violation`
    or `--fail-on-violation` to be explicit about the default
2022-10-15 02:04:12 -03:00
Juan Martín Sotuyo Dodero
029602abac Extract CpdLanguageTypeSupport 2022-10-15 02:04:12 -03:00
Juan Martín Sotuyo Dodero
0641a9c316 Fix help text newlines 2022-10-15 02:04:12 -03:00
Juan Martín Sotuyo Dodero
3689456ebc Implement TreeExportCommand 2022-10-15 02:04:12 -03:00
Juan Martín Sotuyo Dodero
ae1d00d513 Extract converter / iterable pairs
- This will allow better reuse / have consistency by keeping completion
    candidates and convertion tied together
2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero
4d083c1d2b Improve on help message for --ignore-list 2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero
90138b00c6 Extract encoding to a mixin 2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero
01781a3fa8 Rename CliMessages
- It was never used exclusively for CLI
 - It no longer references the CLI command
2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero
85e45dcfef Cleanup code 2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero
f250701c73 Add completion candidates for PMD report properties
- The help is still the only source of truth for which ones are valid
2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero
4a0c735506 Add CpdCommandTest and refactor PmdCommandTest 2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero
301cd0ef34 Even better tests 2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero
5d7e2473f4 Add cpd CLI test 2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero
8e04737715 Add --use-version tests 2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero
15a654e2a6 Finalize unit test of PmdCommand 2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero
5651d772d8 Improve compatibility with PMD 6 CLI 2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero
a1359755a8 Parse test for PmdCommand 2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero
57701e679c Make tests successful 2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero
52d2616181 Add basic CLI test 2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero
ccf6adfcd6 Remove fixed TODO 2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero
af40487933 Add missing --no-progress flag 2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero
a0dcf384bf Add report properties to help message 2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero
4ae3e993b9 Add CPD GUI command 2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero
1d8c8cbe17 Add Checkstyle suppressions 2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero
2c6cd6413c Checkstyle fixes 2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero
ad3aea173f PMD fixes 2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero
ae7ce6b1cb Remove usage of CloseShieldWriter
- commons-io was a test dependency, not worth including it for a single use of a single class
2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero
7f98592467 Accomodate DesignerSubcommand to pmd-ui 2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero
aceec768bc Use proper import, no shaded classes 2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero
f2a2eee71b Update DesignerCommand using enhanced pmd-ui
- this depends on https://github.com/pmd/pmd-designer/pull/52 being merged
    into master and then master merged onto compat-7.0
2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero
83418404c5 Draft DesignerCommand to identify gaps 2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero
df4f1615f8 Unify several flags for PMD and CPD
- start bringing together the way to invoke both processes
2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero
9b5a9dae8e Initial CpdCommand
- lots of opportunities still to shape up the code and unify the way we invoke PMD / CPD
2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero
ddfa945226 Configure source encoding 2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero
844ae1fd7a More class name changes 2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero
924fa96c15 Fix javadoc 2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero
40803d2317 Implement PMD Analysis
- Do cleanup and actually implement the PMD Analysis logic
2022-10-15 02:04:11 -03:00
Juan Martín Sotuyo Dodero
912db372e8 Setup SLF4J for all subcommands
- Have the debug flag shared between all commands and get SLF4J init
2022-10-15 02:04:10 -03:00
Juan Martín Sotuyo Dodero
adb08a9838 Rename classes 2022-10-15 02:04:10 -03:00
Juan Martín Sotuyo Dodero
34729c28e5 Properly handle languages and versions
- Add the candidates and converters for both objects
 - Properly validate the values and pass it to the configuration
 - `--use-version` can now be repeated to set multiple language versions
 - Revise arities of other options to avoid errors
2022-10-15 02:04:10 -03:00
Juan Martín Sotuyo Dodero
172db11114 Update pom autocomplete step 2022-10-15 02:04:09 -03:00
Juan Martín Sotuyo Dodero
ef6c07c9fa Move everything to a separate pmd-cli module
- Have the CLI separate from the standard analysis engine.
 - This allows for easier integration to other tools (ie: IDEs and build toolchains)
 - This allows a self-contained way to setup the commands and have autocomplete scripts include all languages
 - This easily allows to include the pmd designer to expose under a standard command
2022-10-15 02:02:17 -03:00