Commit Graph

2892 Commits

Author SHA1 Message Date
4b494899bf [java] UseStringBufferForStringAppends: fix false positives
Fix false positives with field assignment and shadowing parameters
2020-06-20 10:50:31 +02:00
5579ddc21a [java] UseStringBufferForStringAppends: add good example 2020-06-18 14:48:34 +02:00
dda76be8ae [java] UseStringBufferForStringAppends: fix false negative with fields
And also fix false positive when concatenation is local to each
for-loop iteration.

Test cases originally from #1932

Author: jborgers <jborgers@jpinpoint.com>
2020-06-18 14:37:47 +02:00
ca0f6535a4 Merge branch 'pr-2573'
[java] DefaultPackage: Allow package default JUnit 5 Test methods #2573
2020-06-15 20:26:04 +02:00
62c5ebe482 Merge branch 'issue-2545' 2020-06-15 17:46:11 +02:00
527b75ceb4 Merge branch 'master' into issue-2545 2020-06-15 17:42:27 +02:00
2b19527649 Change property name to be camelCase 2020-06-15 17:41:30 +02:00
18191a1814 [java] Allow package default JUnit 5 Test methods
JUnit 5 allows test methods to be default / package scoped.
2020-06-13 23:19:51 -04:00
bff3bcb487 Merge branch 'pr-2349'
[java] Optimize UnusedPrivateMethodRule #2349
2020-06-13 18:14:53 +02:00
ae5fec78cd [java] UnusedPrivateMethod - improve javadoc 2020-06-13 18:12:20 +02:00
6c51cec444 Merge branch 'master' into uselessoverridingmethod-false-negative 2020-06-12 17:36:38 +02:00
5653400257 Merge branch 'pr-2519'
[java] Enable rule UnnecessaryCast (codestyle) #2519
2020-06-12 13:55:44 +02:00
a171ab8512 [doc] Update release notes and releases ruleset 2020-06-12 13:54:40 +02:00
7820c17435 [java] UnnecessaryCastRule: fix false positive with maps (nested generics) 2020-06-12 13:11:24 +02:00
8defb2fde2 Add missing relativePath configuration in all pom modules 2020-06-07 12:36:58 +02:00
e4368c9f7c [java] UselessOverridingMethod false negative with already public methods 2020-06-03 19:23:22 +02:00
cae1316472 [java] UseDiamondOperator - add property java7compatibility
This property is disabled by default, so that the rule
suggests changes that work on java8+ only by default.

Enable the version dependent tests.
2020-05-30 10:38:09 +02:00
c2cea9d15b [java] UseDiamondOperator - support nested type arguments
Fixes #2545 partially
2020-05-30 10:23:52 +02:00
ab04bdacdd [maven-release-plugin] prepare for next development iteration 2020-05-24 17:34:34 +02:00
229cb2bdca [maven-release-plugin] prepare release pmd_releases/6.24.0 2020-05-24 17:34:25 +02:00
7feb805f96 [java] UnnecessaryCastRule: verify clone is not flagged 2020-05-23 18:41:37 +02:00
473a806cb7 [java] UnnecessaryCastRule: Avoid cast false-positives 2020-05-23 18:38:14 +02:00
a3a292d591 Remove unnecessary source-type tags in rule tests
source-type is actually only needed if
* the language supports more than one version
* the parser behaves differently with different versions
  (this has to do with compatibility, e.g. assert/enum keywords
  in java)
* the test needs a newer version than the default version
  (e.g. to test new language features)
* the test needs an older version than the default version
  (e.g. the rule has a maximumLanguageVersion specified)
* the rule behaves differently for different versions
  (e.g. BigIntegerInstantiation)
2020-05-23 14:16:13 +02:00
561825703f [doc] Fix rule tags in the rule docs
If using quotes, there was a html escape done, which made
the rule tag renderer to spit out "quot".
2020-05-23 13:07:25 +02:00
d21e309043 [java] AvoidPrintStackTrace - fix tests and deprecation warning 2020-05-22 20:19:45 +02:00
4899d04cb3 Merge branch 'pr-2522'
[java] AvoidPrintStackTrace - consider method calls #2522
2020-05-22 20:15:41 +02:00
aafd39b1fd Merge branch 'pr-2493'
[java] Deprecate redundant String Comparison rules #2493
2020-05-22 19:50:20 +02:00
90903f076b [java] Document deprecations in code for PositionLiterals*Rule 2020-05-22 19:48:46 +02:00
e1cd3b4c8d Merge branch 'pr-2487'
[all] Cleanup rule test xml #2487
2020-05-22 19:41:01 +02:00
bf16b508f7 Merge branch 'pr-2476'
[java] MethodNamingConventions - Add support for JUnit 5 method naming #2476
2020-05-22 19:30:41 +02:00
aa1722e9e3 [java] Fix TypeHelper if the searched type is not fully qualified 2020-05-22 18:58:59 +02:00
5a6cb7be8b [java] Fix typehelper fallback for simple class name
If there is no auxclasspath, then we still can use imports to
check the full name before we fallback to simple name only.

Also improve RuleTst to actually test without auxclasspath
2020-05-22 17:06:55 +02:00
6049126228 Merge branch 'pr-2465'
[dependencies] Upgrade hamcrest, mockito and JUnit #2465
2020-05-22 11:46:04 +02:00
33bfedc3d9 [java] Enable rule UnnecessaryCast (codestyle)
Added tests, added iterator support
Fixed problem when accessing fields via "this.".
2020-05-22 10:36:24 +02:00
261f2d747a removed unintentional keypress 2020-05-18 16:58:13 -04:00
01c283ce00 Added deprecated tags to code and bestpractices ruleset, updated quickstart ruleset 2020-05-18 16:56:12 -04:00
0cc00277d3 Merge branch 'pr-2474'
[core] Stop JavaCharStream from throwing Error #2474
2020-05-18 20:28:37 +02:00
3449c9a372 Merge branch 'pr-2478'
[java] New rule: LiteralsFirstInComparisons #2478
2020-05-18 20:17:23 +02:00
526526be47 [java] Reformat (whitespaces) LiteralsFirstInComparisons.xml 2020-05-18 20:16:41 +02:00
7138d2e4d4 [doc] Update release notes, refs #2478 2020-05-18 20:11:45 +02:00
0fa0c4a70c [java] add new rule in quickstart.xml 2020-05-18 20:11:04 +02:00
979d81c02e Merge branch 'pr-2481'
[java] Fix JUnitSpellingRule false positive #2481
2020-05-18 19:57:45 +02:00
dfd5e608d6 [java] Remove unnecessary CDATA in JUnitSpelling.xml 2020-05-18 19:55:39 +02:00
ad68cdda24 Fix review remarks 2020-05-16 23:26:24 +03:00
382a1a15f6 Merge branch 'improve-alias-api' 2020-05-16 19:22:10 +02:00
b53edfd350 [java] Cleanup rule test xml files for metrics
Avoid unnecessary CDATA for description
Use 4 space indentation instead of tabs
Remove trailing whitespace
End file with a newline
2020-05-16 18:56:05 +02:00
5ed25a9277 [java] Cleanup rule test xml files (security)
Avoid unnecessary CDATA for description
Use 4 space indentation instead of tabs
Remove trailing whitespace
End file with a newline
2020-05-16 18:56:05 +02:00
3fd74794c8 [java] Cleanup rule test xml files (performance)
Avoid unnecessary CDATA for description
Use 4 space indentation instead of tabs
Remove trailing whitespace
End file with a newline
2020-05-16 18:56:05 +02:00
11d886ec41 [java] Cleanup rule test xml files (multithreading)
Avoid unnecessary CDATA for description
Use 4 space indentation instead of tabs
Remove trailing whitespace
End file with a newline
2020-05-16 18:56:05 +02:00
a80bc88276 [java] Cleanup rule test xml files (errorprone)
Avoid unnecessary CDATA for description
Use 4 space indentation instead of tabs
Remove trailing whitespace
End file with a newline
2020-05-16 18:56:05 +02:00