Commit Graph
7600 Commits
Author SHA1 Message Date
Juan Martín Sotuyo Dodero bbacf3c8b1 Avoid NPEs during type inference
- Since annotated primitives are now stand-alone instances,
ensure they share the supertypes for the unnanotated version,
otherwise, NPEs occur during inference.
2023-01-25 01:41:56 -03:00
Andreas Dangel 478f6dfb09 Fix unit tests 2023-01-16 13:13:30 +01:00
Andreas Dangel f482bbb5a1 Merge branch 'pmd/7.0.x' into pr-4233 2023-01-16 12:27:40 +01:00
Andreas Dangel a220b2c2d2 Merge 'master' into pmd/7.0.x 2023-01-16 11:42:20 +01:00
Andreas Dangel 084a262071 Rename extraData to additionalInfo consistently 2023-01-16 11:01:37 +01:00
Andreas Dangel 10c281824e [java] Verify rule violation message for JUnitTestContainsTooManyAsserts and RedundantFieldInitializer
These contain placeholder like ${variableName} which should
be replaced by the actual value.
2023-01-16 10:01:56 +01:00
Andreas Dangel 0849b42865 Merge branch 'pmd/7.0.x' into pr-4050 2023-01-16 08:18:34 +01:00
Andreas Dangel 81ece009e1 [java] Ignore synthetic methods and fields in tests
When running PMD build for sonar and coveralls, the jacoco agent will insert a synthetic method "$jacocoInit()" and synthetic field "$jacocoData".
Both are not present in the class files on disk, which
are used for the asm-based symbol analyzer.

For now, all synthetic methods and fields are ignored
and not just the two jacoco specific ones.
2023-01-10 11:22:57 +01:00
Andreas Dangel 11a33a536d [java] CommentDefaultAccessModifier - extend test case for junit5
Refs #3859
2023-01-10 10:24:47 +01:00
Matthew LuckamandAndreas Dangel f6504a6875 add more accurate test description
Co-authored-by: Andreas Dangel <andreas.dangel@adangel.org>
2023-01-09 10:17:47 -05:00
Matthew Luckam de4fb8239f add co.elastic.clients.util.VisibleForTesting to collection of default
suppressed annotations for rule CommentDefaultAccessModifierRule
2023-01-09 10:17:37 -05:00
Clément Fournier d60145e703 Merge branch '7.0.x' into clem.type-annots-in-infer 2023-01-08 18:31:03 +01:00
Clément Fournier 6a5888cb8b Merge branch '7.0.x' into violation-decorators 2023-01-08 18:28:14 +01:00
Andreas Dangel ad87340729 Fix dogfood pmd violations 2023-01-01 16:56:49 +01:00
Andreas Dangel 6a6acb9b43 [maven-release-plugin] prepare for next development iteration 2022-12-31 18:22:10 +01:00
Andreas Dangel 37103451bf [maven-release-plugin] prepare release pmd_releases/6.53.0 2022-12-31 18:22:04 +01:00
Andreas Dangel 597e30cfd7 Merge pull request #4276 from kdebski85:issue-4266-compact-constructor-with-lambda-pmd7
[java] Add test for lambda in record compact constructor (pmd7) #4276
2022-12-31 17:16:07 +01:00
Andreas Dangel 94b3793d9d Fix rule tests 2022-12-31 17:11:02 +01:00
Andreas Dangel ebe4ebe71c Fix compile errors 2022-12-31 16:26:31 +01:00
Andreas Dangel 44914419e2 Merge branch 'master' into pmd/7.0.x 2022-12-31 16:17:32 +01:00
Andreas Dangel f0e113c376 Merge pull request #4274 from kdebski85:issue-4266-compact-constructor-with-lambda
[java] Fix finding lambda scope in record compact constructor #4274
2022-12-31 15:35:47 +01:00
Andreas Dangel 62d789526a [java] DoNotUseThreads: more tests 2022-12-31 15:30:57 +01:00
Andreas Dangel 11867b0d3d Merge pull request #4265 from adangel:issue-4164-AvoidAssertAsIdentifier
[java][doc] AvoidAssertAsIdentifier and AvoidEnumAsIdentifier - clarify use case #4265
2022-12-31 15:13:19 +01:00
Andreas Dangel 3dd0f84ef6 Merge pull request #4264 from adangel:issue-4250-WhileLoopWithLiteralBoolean
[java] WhileLoopWithLiteralBoolean - don't limit to two bool literals #4264
2022-12-31 15:11:09 +01:00
Andreas Dangel b81df9681e Merge pull request #4262 from adangel:issue-2127-deprecate-excessive-length-rules
[java] Deprecate rules ExcessiveClassLength and ExcessiveMethodLength #4262
2022-12-31 15:09:40 +01:00
Andreas Dangel 67230ed7b0 Merge pull request #4260 from adangel:issue-4166-UnusedPrivateField-annotations
[java] UnusedPrivateField - add new property reportForAnnotations #4260
2022-12-31 15:07:12 +01:00
Krzysztof Debski 8226d117cf [java] Add test for lambda in record compact constructor 2022-12-29 11:09:54 +01:00
Krzysztof Debski c714806447 [java] Fix finding lambda scope in record compact constructor 2022-12-28 10:37:58 +01:00
Andreas Dangel 51c688f142 Disable progressbar in cli tests to fix builds under Windows 2022-12-20 16:32:01 +01:00
Andreas Dangel 2cdef852c5 [java][doc] AvoidAssertAsIdentifier and AvoidEnumAsIdentifier - clarify use case
Fixes #4164
2022-12-19 16:13:11 +01:00
Andreas Dangel 87c991f31d [java] DoNotUseThreads: Fix false negatives with field declarations
in anonymous classes
2022-12-19 15:55:22 +01:00
Andreas Dangel c2de15e4c5 [java] WhileLoopWithLiteralBoolean - fix false positives 2022-12-19 15:26:43 +01:00
Andreas Dangel d7bab260b3 [java] WhileLoopWithLiteralBoolean - don't limit to two bool literals
Fixes #4250
2022-12-17 19:58:47 +01:00
Andreas Dangel 8e72aaf9ab PR review fixups 2022-12-17 18:38:20 +01:00
Andreas Dangel bef608058b [java] UnusedPrivateField - rename property "reportForAnnotations"
And other PR review fixups
2022-12-17 18:20:14 +01:00
Clément Fournier ca216efd0f Properly reset log level in slf4j-simple
Fix #4234
2022-12-17 16:32:03 +01:00
Clément Fournier f850049ff7 Fix tests 2022-12-16 12:49:16 +01:00
Clément Fournier 036ca0aacc Cache annotations on symbols 2022-12-16 12:48:59 +01:00
Clément Fournier be67448edb Simplify tests 2022-12-10 14:34:48 +01:00
Clément Fournier d9db994fcd Reuse built annotations by caching them on the node 2022-12-10 13:50:58 +01:00
Andreas Dangel 0f9a0f4876 [java] Update quickstart.xml - remove deprecated Excessive*Length rules 2022-12-09 20:37:44 +01:00
Andreas Dangel 7237d0c076 [doc] Consistently document deprecated and renamed rules 2022-12-09 20:37:23 +01:00
Andreas Dangel e8510fa7da [java] Deprecate base class ExcessiveLengthRule 2022-12-09 20:32:58 +01:00
Clément Fournier a6f9ef06dc Merge branch '7.0.x' into clem.type-annots-in-infer 2022-12-09 19:01:00 +01:00
Andreas Dangel 330594d51d [java] Deprecate rules ExcessiveClassLength and ExcessiveMethodLength
Fixes #2127
2022-12-09 15:23:56 +01:00
Andreas Dangel ac7373bbc0 [java] Compile test sources only once
In the parent pom, the "default-testCompile" execution
is disabled in favor of "java-test-compile". Just
override the configuration for "java-test-compile"
instead of re-adding the default execution.
2022-12-08 21:06:07 +01:00
Andreas Dangel cf2cf60fb0 [java] Ignore synthetic methods and fields in tests
When running PMD build for sonar and coveralls, the jacoco agent will insert a synthetic method "$jacocoInit()" and synthetic field "$jacocoData".
Both are not present in the class files on disk, which
are used for the asm-based symbol analyzer.

For now, all synthetic methods and fields are ignored
and not just the two jacoco specific ones.
2022-12-08 21:04:33 +01:00
Andreas Dangel 5a3ff840aa [java] UnusedPrivateField - add new property "annotations"
Fixes #4166
2022-12-08 19:03:29 +01:00
Clément Fournier fd8ab45dea Fix build 2022-12-08 00:25:37 +01:00
Clément Fournier bccbd18b54 Fix more comments 2022-12-07 23:53:20 +01:00