Commit Graph
5936 Commits
Author SHA1 Message Date
Clément Fournier 6fa3fb6ef9 Merge branch '7.0.x' into pr/3271 2021-05-25 19:11:05 +02:00
Clément Fournier 1d52700c49 Merge branch 'update-AvoidRethrowingException' into 7.0.x 2021-05-25 19:10:16 +02:00
Clément Fournier 16983ec778 Merge branch 'update-PreserveStackTrace' into 7.0.x 2021-05-25 19:09:59 +02:00
Clément Fournier 03e9e840a2 Update JUnit5TestShouldBePackagePrivate to pmd 7
refs #3247
2021-05-25 13:30:05 +02:00
Clément Fournier a2ad578039 Merge branch 'master' into 7.0.x 2021-05-25 13:21:10 +02:00
Clément Fournier 4048b67dd7 Update release notes 2021-05-25 13:12:12 +02:00
Clément Fournier d33eab202f Merge branch 'master' into pr/3247 2021-05-25 13:05:12 +02:00
Clément Fournier 1e4ab03b8d Merge branch 'master' into pr/3289 2021-05-25 12:43:25 +02:00
Clément Fournier 26316883c7 Update AvoidRethrowingException 2021-05-24 17:54:01 +02:00
Andreas Dangel c2c26cbbb7 [java] Deprecate rule DefaultPackage
Fixes #3206
2021-05-21 10:57:35 +02:00
Andreas Dangel ce8378b5bf [java] Deprecate rule CloneThrowsCloneNotSupportedException
Fixes #3112
2021-05-21 10:12:43 +02:00
Andreas Dangel 26bac0d8da [java] UnnecessaryLocalBeforeReturn - fix test
We report now the declaration of the local variable
that is unnecessary instead of the return.
2021-05-20 14:33:45 +02:00
Andreas Dangel fce7933208 Merge branch 'master' into pmd/7.0.x 2021-05-20 14:05:53 +02:00
Andreas Dangel 89b15cb995 Merge pull request #3279 from oowekyala:issue2639-mkdirs
[core] Fix #2639, create report file directories if they do not exist
2021-05-18 19:53:38 +02:00
Arnaud Jeansen 9e4ea58518 Ignore private modifiers for both methods and inner classes 2021-05-17 09:03:00 +02:00
Clément Fournier 8e8a2b0a39 Fix stackoverflow
Minimize following error:

https://github.com/spring-projects/spring-framework/blob/f5e8f4983f7653169f3da8a3287499fce93cadd4/spring-beans/src/main/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor.java#L587
2021-05-15 22:10:04 +02:00
Clément Fournier 987da9a6c8 Fix message 2021-05-15 20:29:40 +02:00
Clément Fournier c063e14d0c Merge branch '7.0.x' into pr/3271 2021-05-15 17:13:49 +02:00
Clément Fournier dde7b19f97 Add test for #2642
Was fixed by c0eba42f29
in pmd 6.27.0 (bisected)
2021-05-14 19:38:17 +02:00
Clément Fournier e54c4dc366 Fix #2639
Tests are in pmd core, current cli tests
are only in pmd-java unfortunately.
2021-05-14 17:42:16 +02:00
Clément Fournier 53e4515e5e Merge branch 'pr/3249'
Refs #3249
2021-05-14 16:53:32 +02:00
Clément Fournier 53bba780c3 Merge branch 'pr/3274' 2021-05-14 16:51:13 +02:00
Clément Fournier 514c1a8561 Merge branch 'master' into pr/3275 2021-05-14 16:46:54 +02:00
Clément Fournier db41beab9e Merge branch 'pr/3261'
Refs #3261
2021-05-14 16:44:47 +02:00
Clément Fournier 6d1e2e037f Merge branch 'pr/3268'
Refs #3268
2021-05-14 16:43:37 +02:00
Clément Fournier 2137cf4b80 Merge branch 'master' into constructorcallsoverridablemethod-fix-IOOBE 2021-05-14 16:43:07 +02:00
Andreas Dangel 00418c1a8d Update pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/codestyle/xml/OnlyOneReturn.xml 2021-05-13 19:26:35 +02:00
Andreas Dangel 45098b801e [doc] Update release notes (#3275) 2021-05-13 19:24:17 +02:00
Andreas Dangel b9550a1488 [java] UnnecessaryLocalBeforeReturn - fix FN with lambda and anon class
The rule uses rule chain now, so that each return is visited,
also in lambdas and anonymous classes.

This FN has been found via #2687.

[skip ci]
2021-05-13 19:17:45 +02:00
Andreas Dangel ebdbec7a1b [java] OnlyOneReturn - fix FN with anonymous class
Converts this rule to use rulechain. Now all method
declarations are visited regardless where they are
nested.

This FN has been found via #2687.
2021-05-13 19:02:20 +02:00
Andreas Dangel 7c2fffb3ee [doc] AvoidReassigningParameters - improve rule doc
Fixes #2219
2021-05-13 15:19:31 +02:00
Andreas Dangel 5fceb94462 [java] AvoidReassigningParameters - report only one violation per param 2021-05-13 15:01:10 +02:00
Andreas Dangel d2db4ba053 Merge branch 'master' into issue-3254-avoidreassigningparameters 2021-05-13 14:51:05 +02:00
Clément Fournier 3e94623971 Merge branch '7.0.x' into update-PreserveStackTrace 2021-05-13 12:27:59 +02:00
Andreas Dangel 399106116f Merge pull request #3253 from oowekyala:update-UseDiamondOperator
[java] Update rule UseDiamondOperator #3253
2021-05-13 11:18:25 +02:00
Andreas Dangel 5b814aa4b1 Merge pull request #3270 from oowekyala:java-classpath-resilience
[java] Improve resilience to broken classpath #3270
2021-05-13 10:49:19 +02:00
Clément Fournier c8416e9e3d Merge branch '7.0.x' into update-PreserveStackTrace 2021-05-12 14:50:49 +02:00
Clément Fournier 3b0389f291 Change message again 2021-05-11 21:46:21 +02:00
Clément Fournier 71bbbfdffb Ignore exceptions that are named "ignored" 2021-05-11 21:43:37 +02:00
Clément Fournier 0f00865c59 Allow PrivilegedActionException#getCause 2021-05-11 20:37:21 +02:00
Andreas Dangel 6369c96943 [java] Update rule OptimizableToArrayCall 2021-05-11 19:49:02 +02:00
Clément Fournier 88b0cda3b3 Rule doc and messages 2021-05-11 17:58:09 +02:00
Clément Fournier b04730684d Support conditional expr 2021-05-11 17:40:44 +02:00
Clément Fournier 6e4fda8f5b Fix stackoverflow in some cases 2021-05-11 17:22:26 +02:00
Clément Fournier 13319f4471 More tests 2021-05-11 16:23:13 +02:00
Clément Fournier 513841e374 Constraint dataflow to be single-assignment
This will avoid some FPs at the cost of some FNs.
The rule doesn't handle branches in control flow or loops.
2021-05-11 15:19:06 +02:00
Clément Fournier 7b693aae1a Ignore new Exception(new Problem(originalException))
These are cases where the exception is consumed by the constructor
transitively.
Since we're processing everything recursively now we're effectively
exploring the dataflow graph... only in an indirect way, without respect
for ordering of statements... This can be improved later, and ideally
generalized to help other rules.
2021-05-11 15:14:29 +02:00
Clément Fournier 8bba9b070b Ignore InvocationTargetException#getTargetException 2021-05-11 15:04:28 +02:00
Clément Fournier 51b491ca7a add some test cases for future 2021-05-11 14:57:29 +02:00
Clément Fournier 4e9d06b8da Add wrap function for ContextedRuntimeException 2021-05-10 21:49:00 +02:00