Commit Graph

17883 Commits

Author SHA1 Message Date
6f9aedfaeb Merge branch 'master' into issue-2598 2020-07-23 15:51:13 +02:00
d5a3ffe387 Merge branch 'issue-2181' 2020-07-23 15:50:26 +02:00
fce20e0b7c Merge branch 'master' into issue-2181 2020-07-23 15:49:54 +02:00
6a9a834c67 Same for NPath 2020-07-23 14:51:26 +02:00
9a47d658e6 Handle switch exprs properly 2020-07-23 14:42:29 +02:00
fbeaa5bc74 Merge branch 'master' into issue-2625 2020-07-23 14:26:33 +02:00
6fdfac23c8 Merge branch 'issue-2615' 2020-07-23 14:16:04 +02:00
d239987d26 Merge branch 'master' into issue-2615 2020-07-23 14:15:47 +02:00
55a6b5bef5 [doc] Fix unit tests on Windows 2020-07-23 13:53:52 +02:00
8c06dbcd4c [doc] Improve performance of rule doc generator
Now we walk PMD source tree only once to resolve the
file names to rulesets and rules instead walking the
whole tree again for each ruleset/rule.
2020-07-23 13:03:19 +02:00
6ee17d44f7 [doc] Fix javadoc in release notes for constructor 2020-07-23 11:44:39 +02:00
62666213ba Deprecate pmd-core::lang.rule.ImportWrapper 2020-07-23 11:15:03 +02:00
5c1a11c0b4 Merge branch 'pr-2652'
[java] UseCollectionIsEmpty can not detect the case this.foo.size() #2652
2020-07-23 10:47:02 +02:00
f1fa375341 [doc] Update release nots, fixes #2543, refs #2652 2020-07-23 10:45:56 +02:00
6b44e326ce [java] UseCollectionIsEmpty: improve test cases 2020-07-23 10:44:22 +02:00
ed77b3dc46 Merge branch 'pr-2651'
[java] False negative: LiteralsFirstInComparisons for methods... (2569) #2651
2020-07-23 10:15:09 +02:00
7b1ccf4837 [doc] Update release notes, fixes #2569, refs #2651 2020-07-23 10:13:40 +02:00
66d243efa1 [java] LiteralsFirstInComparison: additional test case 2020-07-23 10:10:26 +02:00
7941d8d610 Merge branch 'master' into issue-2625 2020-07-23 09:57:57 +02:00
677bfd4ae4 [java] Added additional test case for CycloMetric
And fixed comments in test cases

Refs #2631
2020-07-23 09:46:50 +02:00
c351314f30 LiteralsFirstInComparisonsRule: ignore two string literals comparison 2020-07-22 13:46:08 +03:00
d03640b25e Merge branch 'pr-2641'
[java] AvoidThrowingNullPointerException marks all NullPointerException… #2641
2020-07-21 19:57:29 +02:00
69888847b6 [doc] Update release notes, fixes #2580, refs #2641 2020-07-21 19:56:33 +02:00
892b16c805 AvoidThrowingNullPointerException: isNullPointerException usage fix 2020-07-21 15:56:44 +03:00
68f90687af AvoidThrowingNullPointerException: NPE instances tracking fix 2020-07-21 14:54:23 +03:00
2e9f5ad897 Merge branch 'master' into issue-2615 2020-07-20 16:36:16 +02:00
6d73eaf3c7 Fix custom parser spec
Add kotest-runner-junit5-jvm as a dependency,
in pmd-java. This makes kotest discoverable
as Junit tests, which IDEs can pick up on (at
least IntelliJ does).

Update kotlin version to latest stable (1.3.72)
2020-07-20 16:33:29 +02:00
68ae318f02 Update to kotest 2020-07-20 00:12:40 +02:00
a9996ab45c Merge branch 'pr-2589' into pmd/7.0.x
[core] Add generic visitor interface in pmd-core #2589
2020-07-19 18:07:55 +02:00
a3d0ebc766 Checkstyle 2020-07-18 16:39:40 +02:00
5857ff2b5f Fix eclipse compile errors (refs #2611)
- Bug with captured tvar inference in IteratorBasedNStream
  -> replaced by lambda

- Bug with improperly resolved nested type, around the antlr classes
  -> fixed by qualifying the types. This is a scoping bug of the eclipse
  compiler.

- Bug with `Node::children` not being resolved to the overridden variant
for `GenericNode<DummyNode>`, in tests using DummyRoot
  -> a bug in the eclipse compiler. Problem looks like, this declaration
of DummyRoot is not handled correctly:

```java
class DummyRoot extends DummyNode implements RootNode {}
```

  -> DummyNode implements GenericNode<DummyNode> transitively,
so inherits the refined version `NodeStream<? extends DummyNode> GenericNode<DummyNode>::children()`.
  -> But RootNode extends Node directly, and eclipse sees that
its type for the inherited `children` method is `NodeStream<? extends Node> Node::children();`
  -> A java compiler should prove that the method inherited from Node
through DummyRoot is overridden by the one inherited from GenericNode
through DummyNode
  -> A workaround is to respecify that DummyRoot implements
`GenericNode<DummyNode>` explicitly:

```java
class DummyRoot extends DummyNode implements GenericNode<DummyNode>, RootNode {}
```

- Same thing with JavaNode, still because of RootNode (and AccessNode,
which incorrectly extended Node instead of JavaNode)
2020-07-18 16:33:31 +02:00
25405eb870 Merge branch 'pr-2643'
[java] AvoidCallingFinalize detects some false positives (2578) #2643
2020-07-17 20:30:01 +02:00
6b69964733 [doc] Update release notes, refs #2643, fixes #2578 2020-07-17 20:29:11 +02:00
db21d589d4 [java] AvoidCallingFinalizeRule - use rulechain
And improve tests
2020-07-17 20:28:55 +02:00
585b9099ca Merge branch 'pr-2640'
[java] NullPointerException in rule ProperCloneImplementation #2640
2020-07-17 19:47:30 +02:00
74bb4f6434 [doc] Update release notes, refs #2640, fixes #2634 2020-07-17 19:46:41 +02:00
884c0f4e9e Fix compilation 2020-07-17 16:32:24 +02:00
dcaa8a1167 Merge branch 'master' into pmd/7.0.x 2020-07-17 16:13:02 +02:00
74fb7ba1fb [java] UseCollectionIsEmpty can not detect the case this.foo.size() (2543) 2020-07-17 16:30:37 +03:00
044d7aea2d Merge branch 'pr-2638'
[visualforce] add new safe resource for VfUnescapeEl #2638
2020-07-17 15:29:25 +02:00
eca87a0de4 Merge branch 'pr-2624'
[core] Compatibility measures for rulechain simplification #2624
2020-07-17 15:27:58 +02:00
666621e958 Fix checkstyle 2020-07-17 15:16:29 +02:00
7b3d31246e Merge branch 'master' into pr-2624 2020-07-17 15:16:24 +02:00
e4690cb56a Fix compile errors for CPD only languages 2020-07-17 15:04:43 +02:00
7ae424a35b Add deprecation javadocs 2020-07-17 14:43:43 +02:00
e24a26e211 Merge branch 'pr-2629'
[all] Dependencies cleanup #2629
2020-07-17 12:07:03 +02:00
fc3ee5375b [doc] Update release notes, fixes #710 2020-07-17 12:05:06 +02:00
94afdb117d Add test engines as surefire plugin dependencies
This removes junit-vintage-engine as a test dependency
as well as kotlintest-runner-junit5.
The engines are only needed during test execution, but should
not be available for test compilation.

For this to work, the latest surefire plugin is required.
2020-07-17 12:03:45 +02:00
01e48c882b AvoidCallingFinalize: expected lines added to test 2020-07-17 11:05:55 +03:00
05933c646e [apex] AvoidSoqlInLoops false positive for SOQL with in For-Loop
Fixes #2598
2020-07-16 20:13:53 +02:00