Commit Graph
3455 Commits
Author SHA1 Message Date
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
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 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 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
Andreas Dangel 9c7286bcf2 Merge pull request #3264 from oowekyala:issue2780-doc-DataClass
[java] Fix #2780 DataClass example from documentation results in false
negative
2021-05-10 19:33:28 +02:00
Andreas Dangel 558a4056eb Merge pull request #3263 from
oowekyala:issue1175-UnusedPrivateMethod-MethodSource

[java] Fix #1175 - UnusedPrivateMethod FP with Junit 5 @MethodSource
2021-05-10 19:20:33 +02:00
Arnaud Jeansen 76af096687 PR review: add expected line numbers 2021-05-10 09:41:45 +02:00
Clément Fournier dca0bf9545 Merge branch 'master' into fix-NPE-methodtyperesolution 2021-05-09 13:45:43 +02:00
Andreas Dangel 8208dc9cd6 Merge pull request #3259 from
oowekyala:issue2737-doc-SwitchStmtsShouldHaveDefault

[java] Fix misleading rule message on rule SwitchStmtsShouldHaveDefault
with non-exhaustive enum switch
2021-05-08 19:51:44 +02:00
Andreas Dangel c757369268 Merge pull request #3257 from
oowekyala:issue3248-doc-SingletonClassReturningNewInstance

[java] Fix #3248 - doc of SingletonClassReturningNewInstance
2021-05-08 19:33:06 +02:00
Andreas Dangel 96e9b46b81 Merge pull request #3256 from oowekyala:issue3236-literalsFirstInComparison-and-constants
[java] Fix LiteralsFirstInComparison ignoring constants
2021-05-08 19:28:00 +02:00
Andreas Dangel 3f11c5b4de Merge branch 'master' into pr-3237 2021-05-08 18:54:31 +02:00
Andreas Dangel d7b01ced47 [java] Catch TypeNotPresentExceptions, fix NPE in MethodTypeResolution 2021-05-07 16:19:22 +02:00
Andreas Dangel b1e7bc1c9c [java] ConstructorCallsOverridableMethod - Fix index out of bounds
exception with annotations
2021-05-07 16:17:35 +02:00
Arnaud Jeansen ee691efaf8 Fix JUnit5 interfaces and add more UTs 2021-05-07 14:29:34 +02:00
Clément Fournier abc86702a2 Merge branch 'master' into pr/3262 2021-05-07 12:31:35 +02:00
Clément Fournier a99dfdb41b Merge branch 'pr/3265' 2021-05-07 12:12:22 +02:00
Andreas Dangel db244b0e3b [doc] Update release notes, refs #3266 2021-05-06 15:49:29 +02:00
Andreas Dangel 68c2b9954e [java] LocalVariableCouldBeFinal - fix FN with interfaces, anon classes 2021-05-06 15:44:33 +02:00
Andreas Dangel d3c1dbeb47 [doc] Update release notes, refs #3265 2021-05-06 15:40:47 +02:00
Andreas Dangel 150fec0f6f [java] AvoidReassigningLoopVariables - add more test cases 2021-05-06 15:32:09 +02:00
Andreas Dangel d48cee2258 [java] MethodArgumentCouldBeFinal - fix FN with interfaces 2021-05-06 15:31:43 +02:00
Clément Fournier e73b5484a0 Fix #2780 DataClass example from documentation results in false negative 2021-05-06 15:02:12 +02:00
Andreas Dangel ea35221739 [java] FieldDeclarationsShouldBeAtStartOfClass - FN with anon classes 2021-05-06 14:51:31 +02:00
Clément Fournier ddde7cf484 Fix #1175 - UnusedPrivateMethod FP with Junit 5 @MethodSource 2021-05-06 14:48:21 +02:00
Andreas Dangel 5b67d0ead8 [java] Minor rulechain usage fixes
These are in rules, that are not really in use, so shouldn't
have any effect.
2021-05-06 14:21:56 +02:00
Clément Fournier 6c9ae9b837 Typo 2021-05-06 14:08:39 +02:00
Clément Fournier 223b4e6efe Improve doc of SwitchStmtsShouldHaveDefault, fix #2737 2021-05-06 14:06:28 +02:00
Clément Fournier 6beefe5580 Fix #3248 - doc of SingletonClassReturningNewInstance 2021-05-06 13:45:55 +02:00
Clément Fournier 7d150523c3 Remove catch NPE 2021-05-06 13:37:54 +02:00
Clément Fournier 4c81293163 Fix #3236 2021-05-06 13:29:33 +02:00
Andreas Dangel 9725409daa [java] AvoidReassigningParameters reports violations on wrong line
numbers

Fixes #3254
2021-05-06 11:08:43 +02:00