pmd/pmd-java/pom.xml

279 lines
10 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>pmd-java</artifactId>
<name>PMD Java</name>
<parent>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd</artifactId>
<version>7.0.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
2021-12-13 19:02:07 +01:00
<properties>
2024-03-07 10:09:00 +01:00
<log4j.version>2.23.0</log4j.version>
2021-12-13 19:02:07 +01:00
</properties>
<build>
<testResources>
<testResource>
<directory>${project.basedir}/src/test/resources</directory>
</testResource>
<testResource>
<directory>${project.basedir}/src/test/java</directory>
<includes>
<include>**/testdata/**/*.java</include>
</includes>
</testResource>
<!-- Adding kotlin files to test resources, so that checkstyle verifies the license header -->
<testResource>
<directory>${project.basedir}/src/test/kotlin</directory>
</testResource>
2018-11-10 17:40:36 +01:00
<testResource>
<directory>${basedir}/src/test/kotlin</directory>
<includes>
<include>**/testdata/**/*.java</include>
</includes>
</testResource>
</testResources>
<resources>
<resource>
<directory>${project.basedir}/src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<configuration>
<useDefaultDelimiters>false</useDefaultDelimiters>
<delimiters>
<delimiter>${*}</delimiter>
</delimiters>
</configuration>
</plugin>
2024-02-23 10:50:58 +01:00
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-javacc-generated-sources</id>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>${project.build.directory}/generated-sources/javacc</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
2018-08-21 18:47:21 +02:00
<plugin>
<artifactId>kotlin-maven-plugin</artifactId>
<groupId>org.jetbrains.kotlin</groupId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
2022-11-29 02:25:45 -03:00
<executions>
<execution>
<id>java-test-compile</id>
2022-11-29 02:25:45 -03:00
<!-- Have test-compile produce parameter metadata for reflection tests -->
<configuration>
<parameters>true</parameters>
</configuration>
</execution>
2022-11-29 02:25:45 -03:00
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<inherited>true</inherited>
<executions>
<execution>
<id>generate-sources</id>
<phase>generate-sources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
2020-08-25 02:04:10 +02:00
<ant antfile="${javacc.ant.wrapper}" target="alljavacc">
2020-01-02 17:41:27 +01:00
<property name="javacc.jar" value="${javacc.jar}" />
<property name="lang-name" value="Java" />
2024-02-23 17:45:23 +01:00
<property name="lang-id" value="java" />
</ant>
</target>
</configuration>
</execution>
</executions>
</plugin>
2016-12-02 12:42:06 +01:00
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
<suppressionsLocation>pmd-java-checkstyle-suppressions.xml</suppressionsLocation>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
2014-10-12 09:39:43 +02:00
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-core</artifactId>
</dependency>
2014-10-12 09:39:43 +02:00
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>org.checkerframework</groupId>
<artifactId>checker-qual</artifactId>
</dependency>
<dependency>
<groupId>net.sf.saxon</groupId>
<artifactId>Saxon-HE</artifactId>
</dependency>
<dependency>
<groupId>org.pcollections</groupId>
<artifactId>pcollections</artifactId>
</dependency>
2014-10-12 09:39:43 +02:00
<!-- TEST DEPENDENCIES -->
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-lang-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
2014-10-11 13:26:10 +02:00
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest</artifactId>
<scope>test</scope>
</dependency>
2024-03-07 09:49:23 +01:00
2022-04-29 16:48:09 +02:00
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
2022-10-03 12:52:06 +02:00
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-suite</artifactId>
<scope>test</scope>
</dependency>
2022-10-03 12:52:06 +02:00
<dependency>
<groupId>com.github.stefanbirkner</groupId>
<artifactId>system-lambda</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.oowekyala.treeutils</groupId>
<artifactId>tree-matchers</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.oowekyala.treeutils</groupId>
<artifactId>tree-printers</artifactId>
<scope>test</scope>
</dependency>
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-02-11 04:43:54 +01:00
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
2020-07-20 00:12:40 +02:00
<groupId>io.kotest</groupId>
<artifactId>kotest-assertions-core-jvm</artifactId>
<scope>test</scope>
</dependency>
2020-07-31 14:55:54 +02:00
<dependency>
<groupId>io.kotest</groupId>
<artifactId>kotest-property-jvm</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<!-- Contains stuff like FunSpec, etc -->
<groupId>io.kotest</groupId>
<artifactId>kotest-runner-junit5-jvm</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<scope>test</scope>
</dependency>
2020-07-31 14:55:54 +02:00
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-test-junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<scope>test</scope>
</dependency>
<!-- the following dependencies are there to support typeresolution in test cases -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
2021-12-13 19:02:07 +01:00
<version>${log4j.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
2021-12-13 19:02:07 +01:00
<version>${log4j.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>3.25.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
2024-03-07 10:09:26 +01:00
<version>1.3.0</version>
<scope>test</scope>
</dependency>
2024-03-07 09:49:23 +01:00
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</project>