419 Commits

Author SHA1 Message Date
Clément Fournier
e3a94a1b04
Port some stuff from pmd 7, add test 2021-08-07 14:34:03 +02:00
Clément Fournier
3734d293e8
Add an attribute to apex nodes to get filename from XPath
Fix #3446
2021-08-07 13:58:55 +02:00
Andreas Dangel
821f7a849b
[maven-release-plugin] prepare for next development iteration 2021-07-31 19:02:07 +02:00
Andreas Dangel
18df47ce6e
[maven-release-plugin] prepare release pmd_releases/6.37.0 2021-07-31 19:01:59 +02:00
Clément Fournier
85fd4fa9f4
Merge branch 'text-utils-simple' into text-utils-javacc 2021-07-08 18:45:55 +02:00
Clément Fournier
4d320fdbb9
Merge branch 'analysis-listener' into text-utils-simple 2021-07-08 16:54:40 +02:00
Clément Fournier
62ca0edb2a
Merge branch '7.0.x' into analysis-listener 2021-07-08 15:23:00 +02:00
Andreas Dangel
f68bf5ce05
[maven-release-plugin] prepare for next development iteration 2021-06-26 10:24:15 +02:00
Andreas Dangel
45d1605a03
[maven-release-plugin] prepare release pmd_releases/6.36.0 2021-06-26 10:24:07 +02:00
Andreas Dangel
9fdfecf731
[maven-release-plugin] prepare for next development iteration 2021-05-29 07:24:47 +02:00
Andreas Dangel
b49fb2014d
[maven-release-plugin] prepare release pmd_releases/6.35.0 2021-05-29 07:24:39 +02:00
Andreas Dangel
319900cd43 [maven-release-plugin] prepare for next development iteration 2021-04-24 16:41:17 +02:00
Andreas Dangel
bfeaa1b377 [maven-release-plugin] prepare release pmd_releases/6.34.0 2021-04-24 16:41:10 +02:00
Clément Fournier
173806b687 Fix some compiler warnings 2021-04-03 23:01:54 +02:00
Clément Fournier
7b87d69b85 Fix pmd-lang-test project import 2021-04-03 22:55:39 +02:00
Clément Fournier
5529b4fcac Merge branch 'analysis-listener' into text-utils-simple 2021-03-30 20:44:59 +02:00
Clément Fournier
25425b1c80 Merge branch '7.0.x' into analysis-listener 2021-03-30 20:44:02 +02:00
Clément Fournier
d9a3ef9691 Merge branch 'text-utils-simple' into text-utils-javacc 2021-03-30 03:04:07 +02:00
Clément Fournier
50c00f4f9a Merge branch 'analysis-listener' into text-utils-simple 2021-03-30 02:38:13 +02:00
Clément Fournier
0011b64c35 Merge branch '7.0.x' into analysis-listener 2021-03-29 23:14:29 +02:00
Clément Fournier
d4a2f4b417 Move file to java source root 2021-03-27 18:43:23 +01:00
Clément Fournier
0cb6e537f0 Change parameters of Metric#compute to match order in MetricsUtil 2021-03-27 18:12:10 +01:00
Andreas Dangel
37e5525fd5 [maven-release-plugin] prepare for next development iteration 2021-03-27 16:25:18 +01:00
Andreas Dangel
dc1c9d0aed [maven-release-plugin] prepare release pmd_releases/6.33.0 2021-03-27 16:25:13 +01:00
Andreas Dangel
e0de01ebe9 [maven-release-plugin] prepare for next development iteration 2021-02-27 09:44:05 +01:00
Andreas Dangel
0848e230d0 [maven-release-plugin] prepare release pmd_releases/6.32.0 2021-02-27 09:43:58 +01:00
Clément Fournier
e3db5b76af Merge branch '7.0.x' into pmd7-update-metrics 2021-02-14 15:25:37 +01:00
Andreas Dangel
2ea0328678 [maven-release-plugin] prepare for next development iteration 2021-01-30 18:04:17 +01:00
Andreas Dangel
7d6e6239c5 [maven-release-plugin] prepare release pmd_releases/6.31.0 2021-01-30 18:04:08 +01:00
Clément Fournier
429a8e2e80 Merge branch '7.0.x' into pmd7-update-metrics 2020-12-14 14:35:57 +01:00
Clément Fournier
dba9ffa49b Merge branch 'remove-xml-dom-rule' into core-parser-tasks 2020-12-14 13:49:43 +01:00
Clément Fournier
f6b1acbdd5 Remove xml parser options 2020-12-14 13:18:46 +01:00
Clément Fournier
053c439a43 Escape special chars correctly in test output 2020-12-14 13:12:17 +01:00
Clément Fournier
56fc980e22 Cleanup tests
Replace a duplicated function
2020-12-14 12:58:48 +01:00
Clément Fournier
c6c81b7eca Fix tests about comments 2020-12-13 07:22:38 +01:00
Clément Fournier
a80c1c55b8 Use getReportLocation in tests 2020-12-13 05:44:44 +01:00
Clément Fournier
00bee39767 Merge branch 'analysis-listener' into text-utils-simple 2020-12-13 05:38:09 +01:00
Clément Fournier
fe5d1e49f1 Fix tests 2020-12-13 04:17:40 +01:00
Clément Fournier
d60b780e73 Merge branch 'core-parser-tasks' into analysis-listener 2020-12-13 03:35:20 +01:00
Clément Fournier
52d8904a9e Fix last tests 2020-12-13 01:54:02 +01:00
Clément Fournier
08227f8b18 Fix vf module 2020-12-13 01:13:53 +01:00
Clément Fournier
2623efbc8a Delete ParserOptions 2020-12-13 00:39:05 +01:00
Clément Fournier
220d7a0d12 Merge branch 'remove-xml-dom-rule' into core-parser-tasks 2020-12-13 00:10:24 +01:00
Clément Fournier
084a81265c Cleanup tests 2020-12-12 23:34:16 +01:00
Clément Fournier
163d7af6c2 Remove xml parser options 2020-12-12 23:26:41 +01:00
Clément Fournier
79def1b51d Reduce importance of parser options 2020-12-12 21:19:50 +01:00
Clément Fournier
83edce05c1 Merge branch 'pmd7-ruleset-loader' into core-parser-tasks 2020-12-12 20:53:50 +01:00
Clément Fournier
94028a1ce6 Remove deprecated ctors of RuleSetFactory 2020-12-12 17:38:40 +01:00
Andreas Dangel
d284ea9634 [maven-release-plugin] prepare for next development iteration 2020-12-12 09:42:10 +01:00
Andreas Dangel
d2e4fb4ca3 [maven-release-plugin] prepare release pmd_releases/6.30.0 2020-12-12 09:42:02 +01:00
Clément Fournier
c7b4ec962c Checkstyle 2020-12-11 08:37:23 +01:00
Clément Fournier
90c123621a Make NPath return BigInteger 2020-12-11 08:37:23 +01:00
Clément Fournier
83389f7d47 Update tests 2020-12-11 08:37:23 +01:00
Clément Fournier
aee9c1792c Changes to js 2020-11-15 17:07:08 +01:00
Clément Fournier
95587416cf Merge branch 'java-new-xpath-functions' into core-parser-tasks 2020-11-15 16:54:08 +01:00
Clément Fournier
2fad9bf507 Changes to DataSource and test modules 2020-11-15 16:42:30 +01:00
Clément Fournier
67d3b8a4f4 Extract changes to lang-test 2020-11-13 14:43:02 +01:00
Clément Fournier
014ba90c88 Merge branch 'analysis-listener' into text-utils-simple 2020-10-30 20:45:57 +01:00
Clément Fournier
9c0ea3a992 Merge branch '7.0.x' into analysis-listener 2020-10-30 20:39:52 +01:00
Andreas Dangel
bc0d26eeb5 Fix tests compilation 2020-10-29 11:38:54 +01:00
Andreas Dangel
1862f4fe05 Merge branch 'master' into pmd/7.0.x 2020-10-29 10:52:38 +01:00
Andreas Dangel
01f1e8dede Add back pom.parent.relativePath for pmd-lang-test 2020-10-28 16:53:45 +01:00
Clément Fournier
a95c67c31e Upgrade to kotlin 1.4.1 and kotest 4.3.0 2020-10-26 17:08:08 +01:00
Andreas Dangel
4837c8dbc8 [maven-release-plugin] prepare for next development iteration 2020-10-24 10:17:24 +02:00
Andreas Dangel
81f12d3e5d [maven-release-plugin] prepare release pmd_releases/6.29.0 2020-10-24 10:17:15 +02:00
Clément Fournier
fb137b6484 Merge branch 'pmd7-test-cleanups' into analysis-listener 2020-10-17 17:56:46 +02:00
Clément Fournier
1089da7da2 Hide most methods of RuleTst
The supported API is now just the junit integration
2020-09-30 13:21:02 +02:00
Clément Fournier
5c59de5d52 Checkout changes to test utils 2020-09-28 19:46:34 +02:00
Andreas Dangel
aa245c6e1b [maven-release-plugin] prepare for next development iteration 2020-09-26 10:25:16 +02:00
Andreas Dangel
722f3ca997 [maven-release-plugin] prepare release pmd_releases/6.28.0 2020-09-26 10:25:05 +02:00
Clément Fournier
d690b50c07 Move text file stuff into the main document package 2020-09-17 22:37:23 +02:00
Clément Fournier
5d436fb7e1 Move factory methods to the interface 2020-09-17 22:37:12 +02:00
Clément Fournier
1254015334 Doc 2020-09-17 22:37:12 +02:00
Clément Fournier
dd4eac1ddb Doc for FileSystemCloseable 2020-09-17 22:35:06 +02:00
Clément Fournier
266ad0ddb2 Adapt to analysis listeners after rebase 2020-09-17 22:34:48 +02:00
Clément Fournier
9b735e75df Cleanup kotlin utils 2020-09-17 22:32:37 +02:00
Clément Fournier
81b8fd5e06 Fix text tests 2020-09-17 22:31:11 +02:00
Clément Fournier
1312fb739b Add line range region 2020-09-17 22:30:00 +02:00
Clément Fournier
dfe5710aee Fix tests of SCPositioner 2020-09-17 22:30:00 +02:00
Clément Fournier
69a067e9ad Merge branch 'java-grammar' into analysis-listener 2020-09-14 18:03:50 +02:00
Andreas Dangel
c59af0aee6 [maven-release-plugin] prepare for next development iteration 2020-08-31 18:30:18 +02:00
Andreas Dangel
856950f0d2 [maven-release-plugin] prepare release pmd_releases/6.27.0 2020-08-31 18:30:09 +02:00
Clément Fournier
d3d7495655 Fix tests 2020-08-31 09:21:58 +02:00
Clément Fournier
c331226022 Fix rebase 2020-08-31 08:37:41 +02:00
Clément Fournier
76d81e6979 Identify things to move to reporting package 2020-08-31 08:37:03 +02:00
Clément Fournier
f0f51ab720 Some tests 2020-08-31 08:37:02 +02:00
Clément Fournier
2979754fbd Cleanup 2020-08-31 08:35:21 +02:00
Clément Fournier
6e36a20dd1 Better error handling
Checkstyle + pmd
2020-08-31 08:35:07 +02:00
Clément Fournier
df9f53afa9 Cleanup 2020-08-31 08:34:25 +02:00
Clément Fournier
0a5c0bc015 Doc 2020-08-31 08:34:25 +02:00
Clément Fournier
c7d88ec506 Some sugar 2020-08-31 08:34:25 +02:00
Clément Fournier
e7e6793eb3 Make nodes have access to their language version 2020-08-31 08:34:14 +02:00
Clément Fournier
c66b3e8fa9 Remove report listeners 2020-08-31 08:34:14 +02:00
Clément Fournier
08b19dbcdd Simplify source code processor, change Parser
Remove some stuff with parser options

Get rid of SourceCodeProcessor

Seal processor hierarchy
2020-08-31 08:34:13 +02:00
Clément Fournier
0efba4ce18 Make test file not depend on internal api of core 2020-08-24 03:37:33 +02:00
Clément Fournier
d5445d7ea5 Normalize captures in tree dump 2020-08-23 20:37:53 +02:00
Clément Fournier
77f8c554ad Merge branch 'java-grammar' into typeres-jtypes 2020-08-23 20:05:43 +02:00
Clément Fournier
30466cd793 Use fillAttributes instead
More easily extensible
2020-08-23 20:05:16 +02:00
Clément Fournier
1f7c3373d6 Merge branch 'java-grammar' into typeres-jtypes 2020-08-23 18:48:00 +02:00
Clément Fournier
e5bf0b3f82 Turn ParserCornerTest into a tree dump test 2020-08-23 18:33:17 +02:00
Clément Fournier
ae1332ac29 Merge branch '7.0.x' into java-grammar 2020-08-23 17:51:19 +02:00
Clément Fournier
d5f48c4741 Merge branch '7.0.x' into update-saxon-version 2020-08-23 17:45:21 +02:00
Clément Fournier
58794b08af Update tree dump references
I tweaked the printer so that the
modifiers are printed not as separate
attributes. Eventually I think this
is how it should be done: no separate
attributes, but instead a function
 in XPath
2020-08-23 16:35:46 +02:00
Clément Fournier
8fd4cf274e Merge branch '7.0.x' into java-grammar 2020-08-22 21:22:41 +02:00
Clément Fournier
05727ace87 Merge branch 'master' into 7.0.x 2020-08-22 19:48:49 +02:00
Clément Fournier
7eed422f43 Refactor tests 2020-08-19 19:45:28 +02:00
Andreas Dangel
04850c69bc [java] Rework tests for Java 15 and Java 15 Preview 2020-08-19 18:54:00 +02:00
Clément Fournier
f740bb115b Try to fix bug with capture
Spot a bug with nested expressions. Skipping
instantiation is disabled until later
2020-08-11 19:30:56 +02:00
Clément Fournier
1e85519045 Merge branch '7.0.x' into update-saxon-version 2020-08-08 02:54:04 +02:00
Clément Fournier
2aa16b7c8a Merge branch 'java-grammar' into typeres-jtypes 2020-08-03 23:08:02 +02:00
Clément Fournier
766ab453b8 Merge branch '7.0.x' into java-grammar 2020-08-03 23:07:16 +02:00
Clément Fournier
c554aceba6 Merge branch 'master' into 7.0.x 2020-08-03 23:06:21 +02:00
Andreas Dangel
acf58f1887 Check for license headers in kotlin source files 2020-07-31 20:26:27 +02:00
Clément Fournier
78b6d6d684 Refactor not to use anon classes
Kotlin reflect doesn't like it
2020-07-31 13:25:56 +02:00
Clément Fournier
7620d46b89 Port tests to kotest 2020-07-31 01:10:00 +02:00
Clément Fournier
7188f50f49 Merge branch 'java-grammar' into typeres-jtypes 2020-07-31 00:22:41 +02:00
Andreas Dangel
5a58139d79 Fix compilation 2020-07-30 14:07:40 +02:00
Andreas Dangel
d26cc240fe Merge branch 'pmd/7.0.x' into java-grammar 2020-07-30 13:14:17 +02:00
Andreas Dangel
c8bc39a96c Fix compilation 2020-07-30 12:48:29 +02:00
Andreas Dangel
384dd20319 Merge branch 'master' into pmd/7.0.x 2020-07-30 11:51:53 +02:00
Andreas Dangel
5bff6ac52e Merge branch 'pr-2657'
[lang-test] Upgrade kotlintest to Kotest #2657
2020-07-30 10:31:43 +02:00
Clément Fournier
2449f6404e New typeres framework
Ceci est la combinaison de 338+ commits.

    Make set of classes to mirror types

    Implement capture conversion

    Document

    Doc

    Implement contains for targs

    Implement toString

    Fully implement subtyping

    Check for reifiability

    Implement unchecked, fix array subtyping

    Test rec typevar building

    Test primitive subtyping

    Test array subtyping

    Test wildcards subtyping

    Doc

    Rename primitiveType

    Reify conversions

    Test boxing

    Make constants for common types

    Test type param mutual recursion

    More defensive validation

    Implement numeric promotion

    Checkstyle

    Implement supertype set

    Implement lub

    Fix infinite recursion

    Fix lub bugs

    Use linkedhashset for stable ordering

    Add primitives to common types

    Move common types into type factory

    Try a lazy class resolver, needs a symbol table

    Improve lazy resolver

    Implement conditional expr typing

    remove poly impl

    Represent primitive wrappers differently

    Better compromise for primitive wrappers

    Extract wildcard interface

    Extract array type interface

    Refactor to extract interfaces

    Don't depend on initialization of jprimitiveType

    Finish pretty printer

    Remove dependency on reflection

    Fix class initialization trouble

    Move to type constants

    Use regular impl for OBJECT

    Encapsulate ops into TypeOps

    Add inference var to model

    Impl some ops

    Add some type inference algos

    Invocation context compatibility

    Add incorporation

    Generify bound set with ExprOps

    Add applicability tests

    Fix compil

    Add incorporation actions

    Implement incorporation

    Add inference steps

    Implement brute force walk strategy

    Remove some type params

    Wire in everything

    Implement methodtype

    Access methods from JClassType

    Represent enclosing types

    Work on overriding

    Implement expr ops

    Catch easy cases

    Diamond inference

    Fix pretty printer

    Fix concurrent mod

    Test

    Add reflect info to JModifier

    Add symbolic type declaration

    Most specific check

    Test with nested invocation

    Test lub

    Add constraints for lambdas and all subexpressions

    Resolve full call chain with lambdas

    Set partial results on nodes

    Test chain

    Doc

    Generalise expr mirrors

    Fix context

    Add invocation mirror

    Add support for method references

    make infer static

    Cleanup interface

    Fix constructor access

    Test method reference

    Cleanup method ref types

    Test constructor reference

    Test overload resolution, fix TODO

    Fix ctdecl of mref on non-ground target type

    Add graph walk strategy

    Document

    Use toposort

    Make enum constant implement ctor invoc mirror

    Work on context

    Test conditional expr type

    Handle switch exprs uniformly

    Fix bugs

    Add type inference performance test case

    Add overload resolution tests

    Cache result of overload selection, only recompute invocation

    Optimise common case in graph building

    Optimise propagation by merging variables

    Fix some tests, cleanup

    Preserve applicability phase

    Improve jsinglechildnode

    Add way to get a field's type

    Make more complex stress test

    Cache bound check results

    Type projection for inference

    Simplify lazy type inference of var ids

    Improve memory usage

    - reuse constant enum sets (by far the biggest leak, given the number of PropagateBounds created)
    - implement substitution without a visitor

    Optimise imports

    Cache hash of classes

    Cleanup

    Add overloads test

    Fix context fetching

    Fix lub bug

    Test switch expr

    Fix rebase

    Remove useless type

    Factorise poly check

    Remove base poly expr

    Fix array initializer

    Remove duplicated numeric literal typing

    Fix inferred iterable type

    Move method resolution phase to upper level

    Delete useless var

    Commit pr plan

    Remove useless method

    Fix enclosing type comb rule

    REVERT ME Remove partial enclosing type support

    Add package info

    Put task list in branch description

    Fix old rebases

    Fix rebase

    Simplify for left recursive ops

    Fix comments

    Fix rebase

    Revert "REVERT ME Remove partial enclosing type support"

    This reverts commit 8080ff1585b3a760fafc957282771baf716f3c7f.

    WIP base type mirrors on symbols

    Make JMethodType not a JTypeMirror

    Figure out getSymbol & type vars

    make type factory non-static

    Add a parameter to visitors

    Fix compilation

    Use symbol table in lazy type resolver

    Move package

    Fix most tests

    Move internal api around

    Specify some stuff

    Split reflect impl from API

    Make AST impl

    Equality routines

    Fix tests

    Move internal symtable doc

    Improve symtableResolver ergonomics

    Poly res tests

    Make AST type factory

    Update

    Make lambda expressions not a MethodlikeNode

    Build local var sym

    Update for switches

    Make Infer not static, fix logging

    Don't expose visitor nature of SymbolResolver

    Cleanup

    Improve type error handling

    Don't throw away CTdecls for an arg mismatch

    Fix more tests

    Local symbol tables

    Symbol table looks in interfaces

    Incompatible changes that should stay on this branch and not be squashed

    ResolveResult

    Explicitly typed lambdas

    Fix some static bugs

    Fix a lot of bugs

    Use FQCN symtable

    Move parsing contexts to upper level

    Cleanup

    DSL to test types

    test subst

    Dont create an exception for each failure

    Stack trace creation takes a significant amount of time

    Remove laziness for fetching method streams

    Streams obfuscate performance analysis by
    delaying the computation until the last
    moment.

    Fix some bugs with unresolved classes

    Also measure performance: full typeres
    is around same time as parsing. This is
    great. At this point 80% of all types
    are resolved (though some type inference
    results are probably incorrect). Mostly
    this comes from the fact that there are
    still AmbiguousNames in the tree.

    Fix problem with varargs

    Handle enclosing types

    Enclosing types

    Fix compil

    Add another stress test

    Refactor primitive subtyping

    Fix rebase

    Fix rebase: tests

    Figure out type factories WIP

    Move type ops into TypeOps

    Move AsSuper

    Figure out type factories WIP

    Make TypeSystem object

    wip

    WIP

    WIP

    Make typeops static

Fix grounding routine

Fix bug with return type

Start fixing tests

Cleanup primitive types

Fix some tests

Add todo

Remove JDK test dependency

Test cases lubbing String and
StringBuilder produce different
outputs on JDK [8, 11[ and 11+, because
StringBuilder was made a Comparable<StringBuilder>
in JDK 11

Implement most specific method selection

Drop JVariableSig from symbol table

Use asOuterSuper instead

Fix local var type inference with foreach.

Fix a lot of stuff based on jdk 12 run

Make type system own symbol factories

Fix intersection with bound

Fix standalone ternary types

Capture field access type

Eg class Foo<T> { T[] field; }
Foo<? extends T>.field : capture(T)[]

Add tests

Delete lexical substs

Fix reflected owner type

Add graph viz

Fix bug with graph reduction

Optimise ivar dependency reduction
by a lot. The previous 60s stress
test now takes 600ms.

Btw at this point type res for the
whole JDK 12 codebase takes 25 secs,
down from 175 on 6.20.0 (7x speedup).

Implement inherited field/class lookup

Fix scoping inside switch statements

Fix a few bugs

Handle inherited methods

Interfaces should inherit Object methods

Move lub into TypeSystem

Handle class types induced by intersections

Fix lambda congruence

Test lambda with intersection type

Fix inference

Fix same type check using equals

Simplify intersection type induction

Remove type sys extension

Simplify sym factories

Finish symbol factory streamlining

Document

Cache non-erased symbols separately

Doc

Revert, erased types are only raw

Get rid of generic constants in TypeSystem

Remove some dead code

Fix exact method reference

Improve unchecked conversion handling

Fix dependency of delegated ivars

Improve logging, fix a few bugs

Test enclosing types

Improve loggin

Print file location

Fix subtyping for wildcards

Fix standalone method types

Fix boxing conversion

Fix promotion on unary exprs

Implement special treatment of getClass()

Add tests for anon classes

Make symbol tables use lists for methods

Fix method reference with void target type

Move graphUtils

Make unresolved types bottom

(instead of top)

It's more likely to be useful. Eg.

Unresolved var = ...;

knownMethod(var);

Here, var must conform to the parameter,
if it is unresolved, we assume that's the
case. Otherwise we would fail resolution
of knownMethod for this call site.

The reverse situation is rarer.

Fix conversions in loose phase

Make JInferenceVar a class

Hide TypePair

Remove special string type

Fix toString of anon classes

Implement overload specificity for generic methdos

Fix anon class ctors

Fix Object methods not in scope in interfaces

Fixing anon class ctors WIP

Fix rebase

Cleanup

Print type var bounds

Fix tests, improve pretty printing

Hide ast sym factory

Fix array method erasure

Fix superclass, uncover bug with substitution

Substitute  type param bounds

Make Array have Object methods

Fix duplicated logging categories

Make root symbolFactory thread safe

Fix overload ambiguity with hiding

Fix exact method when they shadow each other

Make PMultimap type

Make shadowGroup

Make a few utilities to replace import tables

Replace other tables

Cleanup

Compat with old impl

Fix rebase

Port to using sigs

Make base class for shadow groups

Fix method group

Test shadowing of inherited members

Fix bugs with tparams

Specialize to StringMultimap

Big optimizations

Simplify a lot of things, remove caching
of getAllMethods

Factorize group implementations

Add resolveFirst

Fix bug with ctor invocation

Fix type parsing for union types

Generify multimap

Implement nextShadowGroup

Remove unused API of pmultimap

Use interface where possible

Fix tests

Use singleton resolvers more frequently

Remove commons collections dependency

Tries don't make a significant difference
in execution time. Mostly because tries
used in symbol tables are very small.

Remove some api of jtypemirror

Fix shadow barriers

Fix accessibility check for protected member

Qualified ctor invocations have access to inner class name

Make strict stream for profiling

LOOK AT ME strict streams

Strict streams are actually *much* more
efficient for our use case

Extract some stuff into CollectionUtil

Make methods shadow each other

doc

Simplify OptionalBool

Improve strict stream

Eventually I'll remove it

Doc newer symtable

Make PMultimap type

Make shadowGroup

Make a few utilities to replace import tables

Cleanup

Checkout newer sym table from typeres branch

Port

Checkout tests

Port tests, remove old impl

Extract augment function

Move classes back into internal package

Abstract stuff away for pmd-core

Optimise singular map case even more

Fix nextShadowGroup WIP

Make ShadowIterator to replace getNextGroup

Use chain iterator

Add tests

Finish impl

Add tests for supertype enumerator

Add tests for method shadowing in imports

Port to using types etc

Fix tests

Fix outdated tests

Fix anon class ctors

Fix more outdated tests

Object methods should be in scope in interfaces

Fix compil

Make simple signature parser

Make stubs

Figure out loading logic

Progress on type param parsing

Do away with nested classes

Class signatures

It works!

Parse tvar bounds lazily

Fix a lot of stuff

No errors on pmd-core

JDK 13 under 80s

Implement toString everywhere

Try to make the whole thing thread safe

Still a spurious NPE, access flags are weird.
For j.l.invoke.DelegatingMethodHandle
(declared as `final class Holder {}`) the
access flags from the class file are 0x32, and
the enclosing type is null, while when accessed
through reflection, the access flags are correctly
0x10. The class is engineered through VM magic
so idk what happens

Remove shared caching of TypeSystem

The sub caches are not useful anymore
and creating them all the time is wasteful

Add some tests

Fix improper locking

Reorganise typeSystem initialization

Change the name

Doc

Opts

Optimise away some expensive lookaheads in the parser

Doc

Fix modifiers

Optimise big switches in parser

Placing token decls that are frequently used together closer
increases the chance that the compiler generate a TABLESWITCH
instruction instead of a LOOKUPSWITCH. Table switches take
constant lookup time, while lookupswitch is linear. Selection
of table switch is now done for the biggest switches of the
parser: the one in types, in modifiers, in statements, and
at the start of expressions. Other lookup switches are unimportant
because they have very few labels (typically 2).

Optimise variable initializer lookahead

make test rule noop

PARSER Optimise common branches in expressions

PARSER opt blocks & statements

doc

Don't accept void by default

Split signature parsers

Simplify type param parsing

Simplify type params parsing

Some optimisations

Tests

Simplify synchronization

Factorize synchronization logic

Move ConsList into pmd-core

Prune more empty nodes

Use single map for asm resolver

Remove changes to parser

Add option to suppress type inference log entry creation

Use soft references to allow class stubs to be GCed

Fix rebase
2020-07-26 16:35:10 +02:00
Andreas Dangel
49ab75aeb7 [maven-release-plugin] prepare for next development iteration 2020-07-25 13:45:36 +02:00
Andreas Dangel
a9632e2a06 [maven-release-plugin] prepare release pmd_releases/6.26.0 2020-07-25 13:45:27 +02:00
Clément Fournier
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
Clément Fournier
68ae318f02 Update to kotest 2020-07-20 00:12:40 +02:00
Andreas Dangel
c7d884c629 Merge branch 'pmd/7.0.x' into java-grammar 2020-07-17 16:38:12 +02:00
Andreas Dangel
dcaa8a1167 Merge branch 'master' into pmd/7.0.x 2020-07-17 16:13:02 +02:00
Andreas Dangel
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
Andreas Dangel
370c0b0b6d Remove unused dependency, explicitly declare used dependencies 2020-07-02 15:12:31 +02:00
Andreas Dangel
80d9e18011 pmd-lang-test: clarify dependencies 2020-07-02 14:16:39 +02:00
Andreas Dangel
95d8e80c1b [maven-release-plugin] prepare for next development iteration 2020-06-27 11:31:27 +02:00
Andreas Dangel
a219b2e1be [maven-release-plugin] prepare release pmd_releases/6.25.0 2020-06-27 11:31:16 +02:00
Clément Fournier
399fdd7b47 Move classes around 2020-06-22 21:17:16 +02:00
Andreas Dangel
93edd66ddd Merge branch 'pmd/7.0.x' into java-grammar 2020-06-21 13:12:51 +02:00
Andreas Dangel
a329621403 Merge branch 'pr-2463' into pmd/7.0.x
[swift] Refactor antlr implementation #2463
2020-06-21 12:25:41 +02:00
Andreas Dangel
891010468a Merge branch 'master' into pmd/7.0.x 2020-06-21 12:00:32 +02:00
Clément Fournier
bc604ab747 Merge branch '7.0.x' into java-grammar 2020-06-19 02:22:24 +02:00
Clément Fournier
c49d9e315f Merge branch 'master' into 7.0.x 2020-06-19 01:32:32 +02:00
Clément Fournier
d624ee99f0 Add tests 2020-06-18 21:32:19 +02:00
Clément Fournier
185c172b3c c++ ident unicode support 2020-06-18 20:54:41 +02:00
Andreas Dangel
b607fa95d0 Don't use \\R yet... 2020-06-18 19:58:12 +02:00
Clément Fournier
ce8166c324 Merge branch '7.0.x' into antlr-touchups 2020-06-15 17:20:27 +02:00
Clément Fournier
4b3d58d4c9 Normalize path to avoid surprises 2020-06-13 21:52:45 +02:00
Clément Fournier
6ff4a1c4d4 Rename test file 2020-06-13 21:37:47 +02:00
Clément Fournier
709996fddc Finish cpp module 2020-06-13 20:34:30 +02:00
Clément Fournier
551ab453fd Convert CPP tests 2020-06-13 20:14:08 +02:00
Clément Fournier
0a1e82efad Rename dir 2020-06-13 19:21:27 +02:00
Clément Fournier
1ee33c7c20 Normalize CPD newlines
Otherwise tests are not platform-independent.
Denormalizing to a platform-specific delimiter
should be done in the renderers
2020-06-13 16:57:57 +02:00
Clément Fournier
ceda6bb965 Fix newline-only tokens
This happens eg in XML. Previously the end column would have been zero. We can't blindly make it 1 because the end column is inclusive. So we instead use the last column of the previous line.
2020-06-13 14:46:55 +03:00
Clément Fournier
826bc36331 Normalize text before tokenizing
Otherwise column numbers are messed up on windows
2020-06-12 17:27:11 +02:00
Clément Fournier
1540ec6d91 Port remaining dart tests 2020-06-12 16:56:43 +02:00
Clément Fournier
ecc8699269 Add doc 2020-06-12 16:27:40 +02:00
Clément Fournier
b47001c90d Add text comparison tests for CPD 2020-06-12 16:01:00 +02:00
Andreas Dangel
cdeff1ab5c Merge branch 'pmd/7.0.x' into java-grammar 2020-06-12 14:35:09 +02:00
Andreas Dangel
c3219b91c5 Merge branch 'master' into pmd/7.0.x 2020-06-12 14:21:10 +02:00
Andreas Dangel
8defb2fde2 Add missing relativePath configuration in all pom modules 2020-06-07 12:36:58 +02:00
Andreas Dangel
abc230c637 [scala] Refactor project structure
* Avoid using symlinks, this is very difficult to get working
  under Windows
* Provide names for the different scala modules
* Rename pmd-scala to pmd-scala-common
* Restore main module pmd-scala for backwards compatibility
2020-06-07 11:52:10 +02:00
Andreas Dangel
ab04bdacdd [maven-release-plugin] prepare for next development iteration 2020-05-24 17:34:34 +02:00
Andreas Dangel
229cb2bdca [maven-release-plugin] prepare release pmd_releases/6.24.0 2020-05-24 17:34:25 +02:00
Andreas Dangel
18749b01ec Merge branch 'pmd/7.0.x' into java-grammar 2020-05-23 12:05:24 +02:00
Andreas Dangel
2dae9c085f Merge branch 'master' into pmd/7.0.x 2020-05-23 11:42:20 +02:00
Andreas Dangel
5f3ff0aed8 Remove hamcrest dependency, where it is not needed directly.
Use scope compile for hamcrest in pmd-lang-test
2020-05-22 11:36:49 +02:00
Artem Krosheninnikov
3fba3f6217 Update hamcrest to 2.2, Junit to 4.13, mockito to 2.28.2 2020-05-04 23:00:28 +03:00
Clément Fournier
97fef3fbd9 Fix tree builder, add tests 2020-05-02 22:56:42 +02:00
Andreas Dangel
5ce33352ad Merge branch 'pmd/7.0.x' into java-grammar 2020-05-02 18:08:17 +02:00
Andreas Dangel
4308c545e5 [maven-release-plugin] prepare for next development iteration 2020-04-24 10:53:12 +02:00
Andreas Dangel
921c65f5ab [maven-release-plugin] prepare release pmd_releases/6.23.0 2020-04-24 10:53:00 +02:00
Clément Fournier
036b2d5eca Cleanup more things 2020-04-23 20:00:17 +02:00
Clément Fournier
434881edac Fix tests 2020-04-23 19:59:52 +02:00
Clément Fournier
0735011c7c Move AbstractNode in .impl package 2020-04-23 19:59:52 +02:00
Andreas Dangel
ecb73cf7ac Merge branch 'pmd/7.0.x' into java-grammar 2020-04-23 12:26:14 +02:00
Andreas Dangel
46e966105d Merge branch 'master' into pmd/7.0.x 2020-04-23 11:47:21 +02:00
Andreas Dangel
61321c88f1 javadoc: add pmd-lang-test 2020-04-14 16:02:49 +02:00
Andreas Dangel
f32f5247bf Merge branch 'pmd/7.0.x' into java-grammar 2020-04-13 12:45:34 +02:00
Andreas Dangel
3621eed40d Merge remote-tracking branch 'origin/master' into pmd/7.0.x 2020-04-13 12:34:03 +02:00
Clément Fournier
e84de6c323 Merge branch '7.0.x' into java-grammar 2020-04-11 14:51:28 +02:00
Clément Fournier
53a43f61af Cleanup test utils 2020-04-02 13:47:50 +02:00
Clément Fournier
6ba8497f05 Fix static method import 2020-03-31 10:34:33 +02:00
Clément Fournier
5cbfdfdd99 Use ascii printer for tree dumps
Some environments may not display
the structure correctly otherwise. See
eg https://travis-ci.org/github/pmd/pmd/jobs/668122788#L9312-L9322
2020-03-29 09:21:38 +02:00
Clément Fournier
e84349531b Normalize line endings 2020-03-29 09:17:49 +02:00
Clément Fournier
89cddd8aa8 Use parsing helper 2020-03-28 17:46:33 +01:00
Clément Fournier
09ddc628cd Fix reference files 2020-03-28 17:46:33 +01:00
Clément Fournier
c83790fab5 Recycle tree printer from the designer 2020-03-28 17:46:33 +01:00
Clément Fournier
bb92044a15 Add ability to test an AST dump as cheap regression test 2020-03-28 17:46:32 +01:00
Clément Fournier
7f6e53eccb Test 2020-03-27 10:16:10 +01:00
Clément Fournier
62a9d5b655 Fix build 2020-03-20 18:07:56 +01:00
Clément Fournier
39d1c9be28 Merge branch '7.0.x' into java-grammar 2020-03-20 03:09:40 +01:00
Clément Fournier
ea3085e560 Normalize line endings
Tries to fix build failure on windows...
2020-03-19 19:34:16 +01:00
Clément Fournier
fd0d53b590 Merge branch '7.0.x' into port-jsp-vf-modules 2020-03-17 15:46:41 +01:00
Andreas Dangel
4c020bfbf7 [maven-release-plugin] prepare for next development iteration 2020-03-12 15:15:18 +01:00
Andreas Dangel
eb93aaeca7 [maven-release-plugin] prepare release pmd_releases/6.22.0 2020-03-12 15:15:09 +01:00
Clément Fournier
2910303dd8 Merge branch '7.0.x' into java-grammar 2020-03-02 22:06:32 +01:00
Clément Fournier
9788a3af5d Merge branch 'master' into 7.0.x 2020-03-02 19:12:28 +01:00
Clément Fournier
a9b6e78cfc Normalise line endings in test 2020-02-17 16:59:14 +01:00
Clément Fournier
4c81633a88 Add a bunch of additional tests 2020-02-12 21:46:30 +01:00
Clément Fournier
87afc7360c Add tests for ast symbols 2020-02-12 18:01:56 +01:00
Clément Fournier
65329d60bd Fix scope of for statements 2020-02-12 18:01:24 +01:00
Clément Fournier
e9ccaa6821 Add tests 2020-02-12 18:01:24 +01:00
Clément Fournier
ad023e8fa6 Support type test patterns 2020-02-09 00:10:50 +01:00