mirror of
https://github.com/mapstruct/mapstruct.git
synced 2025-07-12 00:00:08 +08:00
#1129 Add forbidden apis plugin to fail on illegal TypeMirror usages
This commit is contained in:
parent
9fc111f7df
commit
2acaffa3ec
4
etc/forbidden-apis.txt
Normal file
4
etc/forbidden-apis.txt
Normal file
@ -0,0 +1,4 @@
|
||||
|
||||
@defaultMessage TypeMirror equals and hashCode are not stable. Types.isSameType(TypeMirror, TypeMirror) should be used
|
||||
javax.lang.model.type.TypeMirror#hashCode()
|
||||
javax.lang.model.type.TypeMirror#equals(java.lang.Object)
|
@ -506,6 +506,16 @@
|
||||
<artifactId>properties-maven-plugin</artifactId>
|
||||
<version>1.0-alpha-2</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>de.thetaphi</groupId>
|
||||
<artifactId>forbiddenapis</artifactId>
|
||||
<version>2.3</version>
|
||||
<configuration>
|
||||
<signaturesFiles>
|
||||
<signaturesFile>${project.basedir}/../etc/forbidden-apis.txt</signaturesFile>
|
||||
</signaturesFiles>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
|
||||
@ -525,6 +535,7 @@
|
||||
<exclude>**/mapstruct.xml</exclude>
|
||||
<exclude>**/toolchains-*.xml</exclude>
|
||||
<exclude>**/eclipse-formatter-config.xml</exclude>
|
||||
<exclude>**/forbidden-apis.txt</exclude>
|
||||
<exclude>**/checkstyle-for-generated-sources.xml</exclude>
|
||||
<exclude>**/nb-configuration.xml</exclude>
|
||||
<exclude>maven-settings.xml</exclude>
|
||||
|
@ -319,6 +319,17 @@
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>de.thetaphi</groupId>
|
||||
<artifactId>forbiddenapis</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>check</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user