8527 Commits

Author SHA1 Message Date
Andreas Dangel
c95817a75d
Merge branch 'main' into issue-4813 2024-10-22 20:55:38 +02:00
Andreas Dangel
5ffb953191
[java] CouplingBetweenObjects: improve violation message
When we add the actual count to the message,
we can more easily verify that the rule works
as expected.
2024-10-18 10:42:42 +02:00
Andreas Dangel
867b142ee4
Use plugin-classpath to simplify javacc-wrapper.xml
javacc is on the antrun plugin's classpath.
The javacc jar file doesn't need to be copied
explicitly.
2024-10-13 12:28:16 +02:00
Aryant Tripathi
9a123bff94 Support wrapper class in BooleanGetMethodName rule (#5253)\n \n - Updated XPath rule to include both primitive and wrapper class:\n (PrimitiveType[@Kind = 'boolean'] or ClassType[pmd-java:typeIs('java.lang.Boolean')])\n - Added test cases to ensure that methods returning are also flagged correctly.\n - Ensured the rule enforces consistent method naming for both primitive and wrapper types. 2024-10-11 22:37:01 +05:30
Aryant Tripathi
9077c6a71f Support wrapper class in BooleanGetMethodName rule (#5253)\n \n - Updated XPath rule to include both primitive and wrapper class:\n (PrimitiveType[@Kind = 'boolean'] or ClassType[pmd-java:typeIs('java.lang.Boolean')])\n - Added test cases to ensure that methods returning are also flagged correctly.\n - Ensured the rule enforces consistent method naming for both primitive and wrapper types. 2024-10-11 22:34:07 +05:30
Aryant Tripathi
36f713b4c7
Merge branch 'pmd:main' into 5253/feature/support-boolean-wrapper-in-get-method-rule 2024-10-11 22:30:29 +05:30
Aryant Tripathi
ed6312e3ba Support wrapper class in BooleanGetMethodName rule (#5253)\n \n - Updated XPath rule to include both primitive and wrapper class:\n (PrimitiveType[@Kind = 'boolean'] or ClassType[pmd-java:typeIs('java.lang.Boolean')])\n - Added test cases to ensure that methods returning are also flagged correctly.\n - Ensured the rule enforces consistent method naming for both primitive and wrapper types. 2024-10-11 22:29:42 +05:30
Aryant Tripathi
8b2af2db8a Support wrapper class in BooleanGetMethodName rule (#5253)
- Updated XPath rule to include both  primitive and  wrapper class:
                  (PrimitiveType[@Kind = 'boolean'] or ClassType[pmd-java:typeIs('java.lang.Boolean')])
                - Added test cases to ensure that methods returning  are also flagged correctly.
                - Ensured the rule enforces consistent method naming for both primitive and wrapper types.
2024-10-10 20:44:06 +05:30
Aryant Tripathi
54dfabea9b Support Boolean wrapper class for BooleanGetMethodName rule (#5253) 2024-10-09 10:00:02 +05:30
Andreas Dangel
ff1b9b2cdd
[java] SwitchStmtsShouldHaveDefault - test for multiple case constants 2024-10-08 17:15:18 +02:00
Clément Fournier
b724b4dd33
Fix DataflowPassTest 2024-10-07 18:18:32 +02:00
Clément Fournier
2c1a7f026e
Fix NPE with empty pattern list 2024-10-07 16:51:50 +02:00
Andreas Dangel
59403fc9e1
[java] SwitchStmtsShouldHaveDefault - also ignore record pattern 2024-10-05 10:39:55 +02:00
Andreas Dangel
0c858b0a7b
[java] SwitchStmtsShouldHaveDefault should ignore patterns
Fixes #4813
2024-10-04 16:05:45 +02:00
Andreas Dangel
a0818d5ab2
[doc] Document renamed/old rule names 2024-10-04 15:54:21 +02:00
Andreas Dangel
c6fd064054
Merge branch 'main' into pr-5225 2024-10-04 10:02:40 +02:00
Andreas Dangel
c0023dd942
[java] Rename UnitTestShouldIncludeAssert again
to make it consistent and always use singular "UnitTest"
Follow-up on #4532 and #4965
2024-10-04 09:32:55 +02:00
Andreas Dangel
9fbaa4fbfb
[java] Update quickstart.xml with renamed UnitTest* rules 2024-10-04 09:25:21 +02:00
Andreas Dangel
463ca964dc
[java] Rename JUnit rules with overly restrictive names (#4965)
Merge pull request #4965 from Monits:issue-4532
2024-10-03 20:07:50 +02:00
Andreas Dangel
525435bd68
[java] Keep bestpractices.xml sorted alphabetically 2024-10-03 19:59:29 +02:00
Andreas Dangel
c5246eca46
Renamed JUnit4TestShouldUseAfterAnnotation
- call it UnitTest... to be agnostic to the testing framework
2024-10-03 19:52:56 +02:00
Andreas Dangel
4796da0fb2
Renamed JUnit4TestShouldUseBeforeAnnotation
- call it UnitTest... to be agnostic to the testing framework
2024-10-03 19:51:13 +02:00
lukasgraef
7dcab3f189 Fix static analysis findings 2024-09-30 20:48:20 +02:00
lukasgraef
39b8bdf171 Review Finding: Check for type java.nio.FileSystems 2024-09-30 20:13:01 +02:00
Andreas Dangel
5fe19b2096
[release] Prepare next development version [skip ci] 2024-09-27 11:43:22 +02:00
Andreas Dangel
d8d4d3d061
[release] prepare release pmd_releases/7.6.0 2024-09-27 11:08:53 +02:00
Andreas Dangel
4930e98706
[java] Fix #5046 - FPs in LocalVariableCouldBeFinal (#5191)
Merge pull request #5191 from oowekyala:issue5046-localVariableCouldBeFinal-fp-catch
2024-09-26 15:21:51 +02:00
lukasgraef
ddb1eb8dd8 [java] Fix #5067: CloseResource: False positive for FileSystems.getDefault() 2024-09-21 16:03:36 +02:00
lukasgraef
8ea3f32f5f [java] Fix #5068: Class incorrectly identified as non-instantiatable 2024-09-21 14:12:12 +02:00
Juan Martín Sotuyo Dodero
59c88e9bb0 Adjust skip signature to fix #5207 2024-09-14 00:34:23 -03:00
Juan Martín Sotuyo Dodero
31efceae4d Add failing test case for #5207 2024-09-14 00:34:10 -03:00
Juan Martín Sotuyo Dodero
48c2e325dc Remove NBSP 2024-09-11 19:01:33 -03:00
Clément Fournier
9ecc8897be
Fix #5190 - NPE caused by null type 2024-09-04 13:39:41 +02:00
Clément Fournier
68820a4c77
Fix #5046 - FPs in LocalVariableCouldBeFinal
This adds FNs to UnusedAssignment
2024-09-03 11:35:33 +02:00
Clément Fournier
9d925b513d
Add test case for #5190 2024-09-03 11:16:56 +02:00
Clément Fournier
fe341cf400
Cleanup things with implicit classes 2024-09-01 21:35:50 +02:00
Andreas Dangel
2ed25964b8
[release] Prepare next development version [skip ci] 2024-08-30 10:52:17 +02:00
Andreas Dangel
74ada426af
[release] prepare release pmd_releases/7.5.0 2024-08-30 10:31:09 +02:00
Andreas Dangel
537dab95e4
[java] Support Java 23 (#5112)
Merge pull request #5112 from issue-5062-support-java-23
2024-08-29 17:39:04 +02:00
Andreas Dangel
ada303de83
[doc] Document new java language prop xStrictTypeRes 2024-08-29 17:30:45 +02:00
Andreas Dangel
488807ff90
[java] Add testcase for #5048 2024-08-29 16:58:16 +02:00
Andreas Dangel
20b667d7e4
Merge branch 'master' into pr-5179 2024-08-29 16:55:38 +02:00
Andreas Dangel
773f792dd6
[java] Fix #5162 SingularField FP with synchronized block (#5178)
Merge pull request #5178 from oowekyala:issue5162-singularfield-synchronized
2024-08-29 13:05:50 +02:00
Andreas Dangel
610f937bc4
[java] Update AvoidSynchronizedAtMethodLevel message to mention ReentrantLock, new rule AvoidSynchronizedStatement (#5175)
Merge pull request #5175 from chonton:ReentrantLock
2024-08-29 12:50:13 +02:00
Andreas Dangel
3c3be3c81d
[doc] Update release notes (#5175) 2024-08-29 12:48:14 +02:00
Andreas Dangel
93db59bea5
Apply suggestions from code review 2024-08-29 12:41:02 +02:00
Clément Fournier
672fd635c9
Improve error handling of semantic exceptions 2024-08-28 13:23:43 +02:00
Andreas Dangel
93bfe7df0f
Merge branch 'master' into issue-5062-support-java-23 2024-08-27 20:09:09 +02:00
Andreas Dangel
d7d8c9cb29
[java] Rename ASTImportDeclaration#isModuleImport 2024-08-27 19:58:07 +02:00
Clément Fournier
9c0c7f28e2
Throw typeres failures instead of catching them
They will be surfaced as processing errors
2024-08-26 13:21:41 +02:00