mirror of
https://github.com/mapstruct/mapstruct.git
synced 2025-07-12 00:00:08 +08:00
Update checkstyle to latest version and replace deprecated methods (#1764)
This commit is contained in:
parent
63c5fc8eff
commit
39481f98c5
@ -28,7 +28,7 @@
|
|||||||
<org.apache.maven.plugins.javadoc.version>3.1.0</org.apache.maven.plugins.javadoc.version>
|
<org.apache.maven.plugins.javadoc.version>3.1.0</org.apache.maven.plugins.javadoc.version>
|
||||||
<org.springframework.version>4.0.3.RELEASE</org.springframework.version>
|
<org.springframework.version>4.0.3.RELEASE</org.springframework.version>
|
||||||
<org.eclipse.tycho.compiler-jdt.version>0.26.0</org.eclipse.tycho.compiler-jdt.version>
|
<org.eclipse.tycho.compiler-jdt.version>0.26.0</org.eclipse.tycho.compiler-jdt.version>
|
||||||
<com.puppycrawl.tools.checkstyle.version>8.14</com.puppycrawl.tools.checkstyle.version>
|
<com.puppycrawl.tools.checkstyle.version>8.18</com.puppycrawl.tools.checkstyle.version>
|
||||||
<add.release.arguments />
|
<add.release.arguments />
|
||||||
<forkCount>1</forkCount>
|
<forkCount>1</forkCount>
|
||||||
<assertj.version>3.11.1</assertj.version>
|
<assertj.version>3.11.1</assertj.version>
|
||||||
|
@ -25,6 +25,7 @@ import java.util.Properties;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import com.puppycrawl.tools.checkstyle.api.AutomaticBean;
|
||||||
import org.junit.runners.model.FrameworkMethod;
|
import org.junit.runners.model.FrameworkMethod;
|
||||||
import org.junit.runners.model.Statement;
|
import org.junit.runners.model.Statement;
|
||||||
import org.mapstruct.ap.testutil.WithClasses;
|
import org.mapstruct.ap.testutil.WithClasses;
|
||||||
@ -214,10 +215,18 @@ abstract class CompilingStatement extends Statement {
|
|||||||
new InputSource( getClass().getClassLoader().getResourceAsStream(
|
new InputSource( getClass().getClassLoader().getResourceAsStream(
|
||||||
"checkstyle-for-generated-sources.xml" ) ),
|
"checkstyle-for-generated-sources.xml" ) ),
|
||||||
new PropertiesExpander( properties ),
|
new PropertiesExpander( properties ),
|
||||||
true ) );
|
ConfigurationLoader.IgnoredModulesOptions.OMIT
|
||||||
|
) );
|
||||||
|
|
||||||
ByteArrayOutputStream errorStream = new ByteArrayOutputStream();
|
ByteArrayOutputStream errorStream = new ByteArrayOutputStream();
|
||||||
checker.addListener( new DefaultLogger( ByteStreams.nullOutputStream(), true, errorStream, true ) );
|
checker.addListener(
|
||||||
|
new DefaultLogger(
|
||||||
|
ByteStreams.nullOutputStream(),
|
||||||
|
AutomaticBean.OutputStreamOptions.CLOSE,
|
||||||
|
errorStream,
|
||||||
|
AutomaticBean.OutputStreamOptions.CLOSE
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
int errors = checker.process( findGeneratedFiles( new File( sourceOutputDir ) ) );
|
int errors = checker.process( findGeneratedFiles( new File( sourceOutputDir ) ) );
|
||||||
if ( errors > 0 ) {
|
if ( errors > 0 ) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user