Commit Graph

7868 Commits

Author SHA1 Message Date
fea41bcc8a Merge branch 'pmd/7.0.x' into pr-4379 2023-02-23 11:48:43 +01:00
8bdfc9538b Merge pull request #4377 from adangel:pmd6-java-20
[java] Add support for java 20 #4377
2023-02-23 11:34:37 +01:00
057e02f279 Merge branch 'pmd/7.0.x' into rule-improvements 2023-02-21 01:14:24 -03:00
3a5d2cb3ee Add more tests 2023-02-21 00:57:57 -03:00
c041fa4bd3 Fix xpath expression 2023-02-21 00:57:32 -03:00
b25c16f94d Remove usages of PMD.EOL 2023-02-20 15:17:41 +01:00
17364a997b [doc] CPD - use non deprecated --dir cli option 2023-02-17 11:39:03 +01:00
e2bb0c8480 Reuse names and extensions for CPD language 2023-02-17 09:04:15 +01:00
2c3f945b4d Merge branch 'master' into pmd/7.0.x 2023-02-16 20:53:46 +01:00
af7640f136 [java] Fix #4393 MissingStaticMethodInNonInstantiatableClass: Fix false-positive for field-only class 2023-02-16 10:48:32 +01:00
7f543c6ff4 Merge branch 'pmd/7.0.x' into pmd7-java-20 2023-02-10 13:40:52 +01:00
eee8b95a68 Merge pull request #4060 from oowekyala:pmd7-language-lifecycle
[core] Language lifecycle #4060
2023-02-10 10:34:38 +01:00
64a3ec45a5 Remove forgotten log call 2023-02-08 12:49:58 +01:00
d31b8f618c Fix #4359 2023-02-08 12:43:37 +01:00
00cc3ba9b2 Add tests
Refs #4355
2023-02-08 12:24:45 +01:00
9401208c97 Merge branch '7.0.x' into pr/4355 2023-02-07 19:34:09 +01:00
ba799f74c6 [java] Update parser messages for preview features
- These are more aligned to the official javac -Xlint:preview messages.
- Update URLs to openjdk.org
2023-02-06 20:49:25 +01:00
db40a769f1 Details 2023-02-04 20:25:16 +01:00
cac5b15b56 [java] Fix build errors, update LanguageLevelChecker
- Update Java20PreviewTreeDumpTest to JUnit5
- Remove GuardedPatterns
- Don't use PatternExpression in case labels
- Update javadocs
2023-02-04 20:14:40 +01:00
ae55297984 Update javadoc 2023-02-04 20:09:21 +01:00
7a31f67ee5 Fix some details 2023-02-04 19:53:38 +01:00
f30f904f9d Merge 'pmd6-java-20' into pmd7-java-20 2023-02-04 19:10:37 +01:00
e80e4cf204 [java] Fix javadoc warnings 2023-02-03 20:03:32 +01:00
3ac021da02 [java] Remove support for named record patterns 2023-02-03 19:54:19 +01:00
4ec06b71fe [java] Add more examples for record patterns 2023-02-03 19:48:12 +01:00
600ad870db [java] Support record patterns in for-each loops 2023-02-03 19:37:28 +01:00
50cdb99a7f [java] Update sample files for Pattern Matching for switch 2023-02-03 18:49:50 +01:00
36fb459bd9 [java] Correct grammar regarding default case label
Update ExhaustiveSwitch so that it compiles with java 20. "case default" is not allowed anymore.
2023-02-03 17:09:58 +01:00
1843ff51c7 [java] Simplify null case label grammar
Update DealingWithNull to that it compiles with java 20. Some cases are not allowed anymore.
2023-02-03 16:41:19 +01:00
35a11574ed [java] Remove language version 18-preview 2023-02-03 15:49:19 +01:00
c46a2d31bf [java] Add new language versions 20 and 20-preview 2023-02-03 14:55:43 +01:00
ef365cd9aa Merge branch '7.0.x' into pmd7-language-lifecycle 2023-02-02 01:04:53 +01:00
a7cf226dae Merge branch '7.0.x' into pmd7-language-lifecycle 2023-01-30 16:28:19 +01:00
014c28bb1e Merge branch 'pmd/7.0.x' into pmd7-junit5-part3 2023-01-30 13:36:15 +01:00
643b78757d Merge pull request #4371 from oowekyala:diagnostic-ruleset
[java] Move TypeResTest rule out of security.xml #4371
2023-01-30 12:33:53 +01:00
0547d907b0 Merge pull request #4356 from fix-closeresource-rule
[java] Fix NPE in CloseResourceRule #4356
2023-01-30 11:22:35 +01:00
adf6766288 Fix unit tests 2023-01-30 10:42:26 +01:00
d8b41bab6e Merge branch 'pmd/7.0.x' into pr-4354 2023-01-30 10:21:50 +01:00
bfba220219 Fix unit test 2023-01-30 09:40:32 +01:00
d2db3954e1 Merge branch 'pmd/7.0.x' into pr-4351 2023-01-30 09:27:25 +01:00
cde72a6367 Merge branch '7.0.x' into pr/4365 2023-01-29 16:37:09 +01:00
c2601b37b7 Simplify DoNotUseThreads rule
- No point in filterint out constructor calls, and then immediately search for them
 - If we already checked for the fiel / local var declaration type, no need to do it again
2023-01-28 14:20:46 -03:00
c93f4cad9b Revamp MissingStaticMethodInNonInstantiatableClass
- Somewhat simplify the XPath
 - Make it more robust:
   - private static methods are not ok
   - Check actual return statement types rather than the method signature, as inheritance may muddy the waters
   - We don't need the methods from the nested class to be public, just not private
   - Same applies to the nested class itself
2023-01-28 14:15:18 -03:00
648d4e9a24 Avoid re-parsing the method signature 2023-01-28 14:13:59 -03:00
bbd898549e Remove dead container
- The values were stored but never read
2023-01-28 14:13:30 -03:00
5772440a79 [maven-release-plugin] prepare for next development iteration 2023-01-28 10:31:53 +01:00
de1b12b060 [maven-release-plugin] prepare release pmd_releases/6.54.0 2023-01-28 10:31:46 +01:00
85b41623cf Merge pull request #4353 from oowekyala/pmd7.micro-opts
[core] Micro optimizations for Node API
2023-01-27 19:44:44 -03:00
ba18f3b364 Improve CommentSize 2023-01-27 16:45:03 +01:00
a9c61cc49d Move TypeResTest rule out of security.xml
Fix #4367
2023-01-27 16:43:42 +01:00