Commit Graph

2602 Commits

Author SHA1 Message Date
002f3fd671 Merge branch 'pr-1779' 2019-04-19 18:15:11 +02:00
4ffc42a91b Merge branch 'pr-1778' 2019-04-19 18:14:20 +02:00
88c7aac7a1 Merge branch 'pr-1768' 2019-04-19 18:12:40 +02:00
b55676e4d0 Add test case for NoPackage and Annotation
Update release notes, fixes #1782, refs #1771
2019-04-18 19:55:56 +02:00
f2892ad004 Merge branch 'pr-1781' 2019-04-17 11:33:38 -03:00
fd13a4bf21 Improved test cases for AssignmentToNonFinalStatic by including the expected line numbers for violations in the test cases. 2019-04-17 16:00:38 +02:00
d4ca21bfd3 AssignmentToNonFinalStatic now reports multiple violations in case there are multiple unsafe assignments on the same variable. 2019-04-17 15:20:15 +02:00
4a8c23472c Added test case for multiple violations of AssignmentToNonFinalStatic on the same variable.
Rationale: whenever this rule produces a violation, all of the unsafe assignments need to be corrected. It's annoying to fix one of these, rerun PMD and then realize there's another unsafe assignment left. Therefore, all of these violations should be reported at once.
2019-04-17 15:19:56 +02:00
cd465918b5 Changed location for AssignmentToNonFinalStatic violations from field declaration at to assignment in constructor.
This makes it easier to identify the code that needs to be adjusted in order to resolve the violation.
2019-04-17 15:05:20 +02:00
54dc9ce3cf Merge branch 'pr-1776' 2019-04-16 17:01:03 -03:00
17b7837dcc Bring back the TODO 2019-04-16 16:59:40 -03:00
cb1b5c16bf [java] Have symbol table recognize concise resources
- Concise resources are valid usages.
 - Fixes #1190
2019-04-16 16:51:15 -03:00
7c6d8be1d2 Delay searching statements 2019-04-16 14:09:30 -03:00
28c3752088 [java] Fix FN in UnnecessaryLocalBeforeReturn
- Fixes #1775
2019-04-16 14:04:46 -03:00
c321de75af Merge pull request #1773 from oowekyala/xpath-declare-fn-on-saxon
[core] Declare fn namespace on Saxon
2019-04-15 17:30:54 -03:00
f121b102a4 [java] Show more detailed message when can't resolve field type 2019-04-15 16:17:45 +07:00
8931195156 Merge branch 'pr-1771' 2019-04-13 19:56:48 +02:00
3815066710 Add tests 2019-04-13 19:39:28 +02:00
eb7903d963 [java] Fix NoPackage rule
- Also make it's search much more precise, making it 10X faster
2019-04-12 17:27:45 -03:00
5ad7ca97bc [java] Add failing enum case for NoPackage 2019-04-12 17:27:27 -03:00
44573d8bbe [java] JUnitTestContainsTooManyAsserts uses XPath 2
- We are already using `pmd-java:typeIs`, so it's the correct thing to
do.
 - Plus, this way it's 6X faster
2019-04-12 16:57:03 -03:00
23185f9e6d [java] Fix NPE in type resolution
- Fixes #1532
2019-04-12 14:45:53 -03:00
bb1ede5598 Update changelog, refs #1691 2019-04-12 14:29:44 -03:00
12afff4f5b [java] Fix race conditions in JavaTypeDefinitionSimple
- The data is now a fixed-size array instead of a fixed-size arraylist,
this removes the need to manually add null elements all over.
 - This in turn avoids the resizing / runtime exceptions under
multithreaded accesses.
 - Take the change to fix the way `isGeneric` is resolved to be
consistent over time and correct.
 - Fixes #1691
2019-04-12 14:29:26 -03:00
96a14ede0a Simplify test xml
CDATA is not necessary for test case descriptions
2019-04-05 14:44:45 +02:00
f3c0d39f66 Fix UseObjectForClearerAPI rule that treated String and String[] the same 2019-04-03 12:00:40 +02:00
06625b23f9 Fix UseObjectForClearerAPI rule that checked non-public methods 2019-04-03 10:14:59 +02:00
58677de21d Merge branch 'pr-1746' 2019-04-02 16:58:48 +02:00
044473aa02 Update rule to prevent UnusedImport when using JavaDoc see with array type 2019-04-01 20:55:11 +03:00
ae535ce594 Update rule to prevent UnusedImport when using JavaDoc with array type 2019-04-01 11:06:47 +03:00
8468c4e2bc [java] Report class name for package-private only classes
- Fixes #1729
2019-03-31 15:02:10 -03:00
5818abc0c7 [maven-release-plugin] prepare for next development iteration 2019-03-31 12:07:07 +02:00
4ed549f0b2 [maven-release-plugin] prepare release pmd_releases/6.13.0 2019-03-31 12:06:56 +02:00
ec68c2979c [java] avoid most lookaheads for SwitchStatements 2019-03-31 10:33:02 +02:00
f8652fbf9a [java] Add SwitchLabeledRule interface, remove SwitchBlockGroup 2019-03-31 00:21:34 +01:00
087e0a62c8 Merge branch 'master' into pr-1725 2019-03-30 19:28:11 +01:00
8bbf5a3727 Merge branch 'pr-1743' 2019-03-30 18:02:45 +01:00
6f6160f355 Merge branch 'pr-1742' 2019-03-30 18:01:50 +01:00
d613b08ce1 Merge branch 'pr-1726' 2019-03-30 18:01:09 +01:00
ae4b56e70f [java] UseUnderscoresInNumericLiterals - check the length before
and after decimal point separately
2019-03-29 19:57:48 +01:00
878db5617f [java] AvoidDuplicateLiterals warning about deprecated separator property when not used
Fixes #1570
2019-03-29 19:35:57 +01:00
921ee050bd Add additional test case 2019-03-29 18:22:47 +01:00
a0876f71f5 [java] UseUnderscoresInNumericLiterals false positive on floating point numbers
Fixes #1527
2019-03-29 18:16:45 +01:00
e7f7422f50 Update the right file 2019-03-25 21:32:35 +02:00
1337dce1fb Add escaping to the test, add extended test in pmd-core for
AbstractRuleViolationFactory
2019-03-19 17:12:03 +01:00
e7a0198b4b AbstractRuleViolationFactory.cleanup() skip MessageFormat when args is empty 2019-03-19 17:09:39 +01:00
6c6cb3ecf3 Merge branch 'pr-1707' 2019-03-19 16:23:32 +01:00
65b2990ad1 Fix break statement 2019-03-17 10:22:11 +01:00
e103ef4869 [java] Rename SwitchLabeledRule -> SwitchBlockGroup
The plan is with PMD, that also the switch block statements
are grouped together with the switch label, like the switch rules
2019-03-17 10:22:06 +01:00
220467ca18 [java] Update quickstart ruleset - UnsynchronizedStaticDateFormatter is deprecated
Add unit tests
Add missing rules
2019-03-16 12:55:03 +01:00