Commit Graph
139 Commits
Author SHA1 Message Date
Andreas Dangel b5e7cbbaf3 verify #1349 VariableNamingConventions : underscore in final but at first position ? 2015-05-09 18:41:42 +02:00
Andreas Dangel 7d630f6cb3 verify #1347 False positive for GuardLogStatementJavaUtil 2015-05-09 18:37:02 +02:00
Andreas Dangel bc41b00206 verify #1346 VariableNamingConventions do not work for method parameters 2015-05-09 18:31:48 +02:00
Andreas Dangel 171fdb877f #1345 UseCollectionIsEmpty throws NullPointerException 2015-05-09 18:25:12 +02:00
Andreas Dangel 3d73198ba9 verify #1340 UseStringBufferForStringAppends False Positive with ternary operator 2015-05-01 18:41:21 +02:00
Andreas Dangel e2a7356ccb verify #1341 pmd:GuardDebugLogging violates LOGGER.debug with format "{}"
It's a duplicate of #1224
2015-05-01 18:33:16 +02:00
Andreas Dangel a0d116ca6d #1335 GuardLogStatementJavaUtil should not apply to SLF4J Logger 2015-05-01 18:27:18 +02:00
Andreas Dangel 857ae074e1 #1342 UseConcurrentHashMap false positive (with documentation example) 2015-04-30 20:07:54 +02:00
Andreas Dangel a720b93431 [maven-release-plugin] prepare for next development iteration 2015-04-20 20:15:12 +02:00
Andreas Dangel de7a81202f [maven-release-plugin] prepare release pmd_releases/5.3.1 2015-04-20 20:15:11 +02:00
Andreas Dangel b6c12fe449 Added deprecated old name for UseSingleton/UseUtilityClass
#1059 and #1339
2015-04-20 19:46:16 +02:00
Andreas Dangel fdb54ecc0e #1337 False positive "Avoid throwing raw exception types" when exception is not thrown 2015-04-18 18:21:11 +02:00
Andreas Dangel 1910a6844c #1332 False Positive: UnusedPrivateMethod 2015-04-18 10:04:31 +02:00
Björn Kautler d8961a903a Fix NullPointerException in ClassScope.resolveGenericType() 2015-04-14 11:24:23 +02:00
Björn Kautler f310138f9d Fix NullPointerException in ClassScope.qualifyTypeName() 2015-04-14 11:24:21 +02:00
Björn Kautler e8c36b34f8 Make TypeSet resolvers null-safe 2015-04-14 11:24:20 +02:00
Andreas Dangel 29a32bb2a7 #1333 Error while processing Java file with Lambda expressions 2015-04-13 20:01:28 +02:00
Andreas Dangel c44a89cce3 [maven-release-plugin] prepare for next development iteration 2015-04-01 20:06:39 +02:00
Andreas Dangel 094c9c0ec9 [maven-release-plugin] prepare release pmd_releases/5.3.0 2015-04-01 20:06:38 +02:00
Andreas Dangel 330708a35b #1197 JUnit4TestShouldUseTestAnnotation for private method 2015-03-27 20:47:58 +01:00
Andreas Dangel ddb7c89505 #1307 False positive: SingularField and lambda-expression 2015-03-27 20:36:18 +01:00
Andreas Dangel 79b92b71f1 #1322 MethodReturnsInternalArray on private methods 2015-03-26 20:33:57 +01:00
Andreas Dangel e46bea857a #1323 False positive case of UseAssertTrueInsteadOfAssertEquals 2015-03-26 20:25:19 +01:00
Andreas Dangel 65c2493ec7 #1325 Inner class declared within a method fails to parse (ClassCastException) 2015-03-26 19:54:04 +01:00
Andreas Dangel 12cc353d38 #1324 MethodReturnsInternalArray false positive with clone() 2015-03-25 21:31:17 +01:00
Andreas Dangel e57007e1be dogfood, whitespaces 2015-03-25 20:16:55 +01:00
Andreas Dangel b7bf3fbb8c dogfood, whitespaces 2015-03-22 00:15:08 +01:00
Andreas Dangel 10ae0fb999 dogfood, whitespaces 2015-03-21 23:30:55 +01:00
Andreas Dangel 0c69ed6f8b PMD exit with status 4 if violations have been found. 2015-03-21 19:03:03 +01:00
Andreas Dangel 28dfbeabf8 #1321 CPD format XML fails with NullPointer 2015-03-15 19:39:09 +01:00
Andreas Dangel 65398d9eed #1319 PMD stops with NoClassDefFoundError (typeresolution) 2015-03-15 18:49:45 +01:00
Andreas Dangel a153b974cc #1320 Enhance SimplifyBooleanReturns checks 2015-03-15 18:49:41 +01:00
Andreas Dangel dd6affeb6e Use new pmd-build plugin, adjust some rule documentation for markdown changes 2015-03-15 14:59:55 +01:00
Andreas Dangel 9367879e69 #1277 Delete BooleanInversion as it makes no sense
Deprecate the rule for now - to be completely deleted later
2015-03-15 10:51:57 +01:00
Andreas Dangel dff3bfb359 #1283 Rename UncommentedEmptyMethod to UncommentedEmptyMethodBody 2015-03-09 20:57:35 +01:00
Andreas Dangel c74b43baf2 #1317 RuntimeException when parsing class with multiple lambdas
Removing Java8MultipleLambdasTest from java8 integration, as it can
be tested with java < 8 in pmd-java
2015-03-07 21:12:04 +01:00
Brice Dutheil 18f393da3c Introduces java 8 integration test module
* Only for testing pmd-java
* Activated only if the jdk is 1.8
2015-03-01 22:11:51 +01:00
Brice Dutheil 28d1764428 Improves pmd jdk8 readiness
* Upgrade asm so that it understands default method and static methods in interfaces jdk8 class files
* see 9b91690f21 for ASM4 support
2015-03-01 22:09:33 +01:00
Brice Dutheil c50d84ff24 Replaces with spaces only (was mixed whitespaces) 2015-03-01 22:04:17 +01:00
Andreas Dangel acb8b49aa8 #1302 False Positive: UnusedPrivateField when accessed by inner class 2015-02-21 11:53:38 +01:00
Andreas Dangel 33212c7da3 #1302 False Positive: UnusedPrivateField when accessed by inner class 2015-02-21 11:29:44 +01:00
Andreas Dangel bdf9c19a1d #1304 UseCollectionIsEmpty false positive comparing to 1 2015-02-21 11:26:12 +01:00
Shuyang ZhouandAndreas Dangel cd8325dff3 #1303 OverrideBothEqualsAndHashcodeRule does not work on class implements resolvable interfaces 2015-02-21 11:16:13 +01:00
Andreas Dangel 9b8496ab16 #1305 variable declaration inside switch causes ClassCastException 2015-02-20 20:28:39 +01:00
Andreas Dangel 21d7ebb809 Fixes for java9 2015-02-20 19:19:16 +01:00
Robert Whitebit cd52e39b08 [JUnit] Check assertion message present in assertEquals with delta
A missing assertion message for assertEquals(double, double, double)
is detected in most cases now. If the assertEquals method has two
arguments, an assertion message is missing, if the assertEquals method
has three arguments, the first one has to be a string.

Pmd will only print an error if the first argument type has been
determined (getType() != null) and isn't a String. Therefore
assertEquals(getInt(), getInt(), getInt()) won't be detected as an
error. However, double d = 1.0; assertEquals(d, 1.0, 1.0); will be
detected.

The JUnitAssertionsShouldIncludeMessageRule.check method has been moved
to the inner class AssertionCall and has been expanded by an
isException hook. The assertEquals with three arguments check overrides
the isException method, returns true if the first argument can't be
determined or is a String and if so, no violation will be added. Also
the constructor arguments have been swapped for readability.

https://sourceforge.net/p/pmd/bugs/1313/
2015-02-20 00:36:11 +01:00
Andreas Dangel ed6a876549 Merge branch 'missingAsserts' of https://github.com/robertwhitebit/pmd into robertwhitebit-missingAsserts 2015-02-19 20:56:29 +01:00
Andreas Dangel 6b7846a329 Merge branch 'unused-private-field-inner' of https://github.com/rsalvador/pmd into rsalvador-unused-private-field-inner 2015-02-19 20:51:40 +01:00
Robert Whitebit 41e921531a Add missing assertions in JUnitAssertionsShouldIncludeMessage test
Missing assertions were assertArrayEquals, assertNotSame, assertThat and
fail.
2015-02-18 23:02:43 +01:00
Roman 070a7c992f Fix some false positives in UnusedPrivateField 2015-02-15 11:43:49 -08:00