forked from apache/incubator-streampark
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Improve] scala code-style improvement (apache#3839)
* [Improve] scala code style improvement
- Loading branch information
Showing
91 changed files
with
757 additions
and
505 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,12 +30,10 @@ | |
<packaging>pom</packaging> | ||
<name>StreamPark Project Parent POM</name> | ||
|
||
<url>https://streampark.apache.org/</url> | ||
<description>StreamPark, Make stream processing easier! easy-to-use streaming application development framework and operation | ||
platform</description> | ||
|
||
<description> | ||
StreamPark, Make stream processing easier! easy-to-use streaming application development framework and operation | ||
platform | ||
</description> | ||
<url>https://streampark.apache.org/</url> | ||
|
||
<organization> | ||
<name>Apache Software Foundation</name> | ||
|
@@ -49,30 +47,18 @@ | |
</license> | ||
</licenses> | ||
|
||
<scm> | ||
<connection>scm:git:git://github.com/apache/incubator-streampark.git</connection> | ||
<developerConnection>scm:git:https://gitbox.apache.org/repos/asf/incubator-streampark.git</developerConnection> | ||
<url>scm:git:[email protected]:apache/incubator-streampark.git</url> | ||
<tag>HEAD</tag> | ||
</scm> | ||
|
||
<issueManagement> | ||
<system>GitHub</system> | ||
<url>https://github.com/apache/incubator-streampark/issues</url> | ||
</issueManagement> | ||
|
||
<mailingLists> | ||
<mailingList> | ||
<name>StreamPark Developer List</name> | ||
<post>[email protected]</post> | ||
<subscribe>[email protected]</subscribe> | ||
<unsubscribe>[email protected]</unsubscribe> | ||
<post>[email protected]</post> | ||
</mailingList> | ||
<mailingList> | ||
<name>StreamPark Commits List</name> | ||
<post>[email protected]</post> | ||
<subscribe>[email protected]</subscribe> | ||
<unsubscribe>[email protected]</unsubscribe> | ||
<post>[email protected]</post> | ||
</mailingList> | ||
</mailingLists> | ||
|
||
|
@@ -83,6 +69,18 @@ | |
<module>streampark-console</module> | ||
</modules> | ||
|
||
<scm> | ||
<connection>scm:git:git://github.com/apache/incubator-streampark.git</connection> | ||
<developerConnection>scm:git:https://gitbox.apache.org/repos/asf/incubator-streampark.git</developerConnection> | ||
<tag>HEAD</tag> | ||
<url>scm:git:[email protected]:apache/incubator-streampark.git</url> | ||
</scm> | ||
|
||
<issueManagement> | ||
<system>GitHub</system> | ||
<url>https://github.com/apache/incubator-streampark/issues</url> | ||
</issueManagement> | ||
|
||
<properties> | ||
<project.build.jdk>1.8</project.build.jdk> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
|
@@ -134,8 +132,10 @@ | |
<maven-source-plugin.version>2.2.1</maven-source-plugin.version> | ||
<maven-spotless-plugin.version>2.27.2</maven-spotless-plugin.version> | ||
<maven-apache-rat-plugin.version>0.13</maven-apache-rat-plugin.version> | ||
<maven-silencer-plugin.version>1.7.13</maven-silencer-plugin.version> | ||
<spotless.scalafmt.version>3.4.3</spotless.scalafmt.version> | ||
<maven-checkstyle-plugin.version>3.2.0</maven-checkstyle-plugin.version> | ||
<maven-scalastyle-plugin.version>1.0.0</maven-scalastyle-plugin.version> | ||
<owasp-dependency-check-maven.version>9.2.0</owasp-dependency-check-maven.version> | ||
<build-helper-maven-plugin.version>3.3.0</build-helper-maven-plugin.version> | ||
<streampark.shaded.package>org.apache.streampark.shaded</streampark.shaded.package> | ||
|
@@ -147,11 +147,12 @@ | |
<mockito-scala.version>1.17.14</mockito-scala.version> | ||
<assertj.version>3.23.1</assertj.version> | ||
|
||
<PermGen>64m</PermGen> | ||
<MaxPermGen>512m</MaxPermGen> | ||
<CodeCacheSize>512m</CodeCacheSize> | ||
<MaxMetaspace>512m</MaxMetaspace> | ||
<skipDependencyCheck>true</skipDependencyCheck> | ||
<maven.scaladoc.skip>false</maven.scaladoc.skip> | ||
<maven.scalastyle.skip>false</maven.scalastyle.skip> | ||
|
||
<spotless.skip>false</spotless.skip> | ||
<rat.skip>false</rat.skip> | ||
<owasp.skip>true</owasp.skip> | ||
</properties> | ||
|
||
<dependencyManagement> | ||
|
@@ -520,25 +521,19 @@ | |
<sourceDirectory>${project.build.sourceDirectory}</sourceDirectory> | ||
<sourceDirectory>${project.build.testSourceDirectory}</sourceDirectory> | ||
</sourceDirectories> | ||
<resourceIncludes> | ||
**/*.properties, | ||
<resourceIncludes>**/*.properties, | ||
**/*.sh, | ||
**/*.bat, | ||
**/*.yml, | ||
**/*.yaml, | ||
**/*.xml, | ||
**/*.dict | ||
</resourceIncludes> | ||
<resourceExcludes> | ||
**/.asf.yaml, | ||
**/*.dict</resourceIncludes> | ||
<resourceExcludes>**/.asf.yaml, | ||
**/.github/**, | ||
**/crd/**.yml, | ||
**/crd/**.yaml | ||
</resourceExcludes> | ||
<excludes> | ||
**/*.java, | ||
**/*.scala | ||
</excludes> | ||
**/crd/**.yaml</resourceExcludes> | ||
<excludes>**/*.java, | ||
**/*.scala</excludes> | ||
</configuration> | ||
<dependencies> | ||
<dependency> | ||
|
@@ -550,7 +545,32 @@ | |
<executions> | ||
<execution> | ||
<id>validate</id> | ||
<goals> | ||
<goal>check</goal> | ||
</goals> | ||
<phase>process-sources</phase> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.scalastyle</groupId> | ||
<artifactId>scalastyle-maven-plugin</artifactId> | ||
<version>${maven-scalastyle-plugin.version}</version> | ||
<configuration> | ||
<verbose>false</verbose> | ||
<failOnViolation>true</failOnViolation> | ||
<includeTestSourceDirectory>true</includeTestSourceDirectory> | ||
<failOnWarning>false</failOnWarning> | ||
<sourceDirectory>${project.basedir}/src/main/scala</sourceDirectory> | ||
<testSourceDirectory>${project.basedir}/src/test/scala</testSourceDirectory> | ||
<configLocation>/tools/checkstyle/scalastyle-config.xml</configLocation> | ||
<outputFile>${project.build.directory}/scalastyle-output.xml</outputFile> | ||
<outputEncoding>UTF-8</outputEncoding> | ||
<skip>${maven.scalastyle.skip}</skip> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>check</goal> | ||
</goals> | ||
|
@@ -563,6 +583,7 @@ | |
<artifactId>spotless-maven-plugin</artifactId> | ||
<version>${maven-spotless-plugin.version}</version> | ||
<configuration> | ||
<skip>${spotless.skip}</skip> | ||
<java> | ||
<includes> | ||
<include>src/main/java/**/*.java</include> | ||
|
@@ -571,12 +592,10 @@ | |
<include>streampark-e2e/streampark-e2e-core/src/main/java/**/*.java</include> | ||
</includes> | ||
<eclipse> | ||
<file>${maven.multiModuleProjectDirectory}/style/spotless_streampark_formatter.xml</file> | ||
<file>${maven.multiModuleProjectDirectory}/tools/checkstyle/spotless_streampark_formatter.xml</file> | ||
</eclipse> | ||
<importOrder> | ||
<order> | ||
org.apache.streampark,org.apache.streampark.shaded,org.apache,,javax,java,scala,\# | ||
</order> | ||
<order>org.apache.streampark,org.apache.streampark.shaded,org.apache,,javax,java,scala,\#</order> | ||
</importOrder> | ||
<replaceRegex> | ||
<name>Remove wildcard imports</name> | ||
|
@@ -593,23 +612,41 @@ | |
<searchRegex>import\s+org\.junit\.[^jupiter][^\*\s]*(|\*);(\r\n|\r|\n)</searchRegex> | ||
<replacement>$1</replacement> | ||
</replaceRegex> | ||
<removeUnusedImports/> | ||
<removeUnusedImports></removeUnusedImports> | ||
</java> | ||
|
||
<scala> | ||
<includes> | ||
<include>src/main/scala/**/*.scala</include> | ||
<include>src/main/scala-*/**/*.scala</include> | ||
<include>src/test/scala/**/*.scala</include> | ||
<include>src/test/scala-*/**/*.scala</include> | ||
</includes> | ||
<scalafmt> | ||
<version>${spotless.scalafmt.version}</version> | ||
<!--suppress UnresolvedMavenProperty --> | ||
<file>${maven.multiModuleProjectDirectory}/style/.scalafmt.conf</file> | ||
<file>${maven.multiModuleProjectDirectory}/tools/checkstyle/.scalafmt.conf</file> | ||
</scalafmt> | ||
</scala> | ||
<pom> | ||
<includes> | ||
<include>pom.xml</include> | ||
</includes> | ||
<sortPom> | ||
<encoding>${project.build.sourceEncoding}</encoding> | ||
<expandEmptyElements>true</expandEmptyElements> | ||
<indentSchemaLocation>true</indentSchemaLocation> | ||
<nrOfIndentSpace>4</nrOfIndentSpace> | ||
</sortPom> | ||
</pom> | ||
|
||
</configuration> | ||
<executions> | ||
<execution> | ||
<id>spotless-check</id> | ||
<phase>validate</phase> | ||
<goals> | ||
<goal>check</goal> | ||
</goals> | ||
<phase>validate</phase> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
|
@@ -641,6 +678,34 @@ | |
<addScalacArgs>-target:jvm-${project.build.jdk}</addScalacArgs> | ||
<target>${project.build.jdk}</target> | ||
<source>${project.build.jdk}</source> | ||
<args> | ||
<arg>-unchecked</arg> | ||
<arg>-deprecation</arg> | ||
<arg>-feature</arg> | ||
<arg>-explaintypes</arg> | ||
<arg>-P:silencer:globalFilters=.*deprecated.*</arg> | ||
<arg>-P:silencer:globalFilters=.*Could not find any member to link for.*</arg> | ||
<arg>-P:silencer:globalFilters=.*undefined in comment for class.*</arg> | ||
<arg>-Xfatal-warnings</arg> | ||
<arg>-Ywarn-unused:imports</arg> | ||
</args> | ||
<jvmArgs> | ||
<jvmArg>-Xms1024m</jvmArg> | ||
<jvmArg>-Xmx1024m</jvmArg> | ||
<jvmArg>-XX:ReservedCodeCacheSize=512M</jvmArg> | ||
</jvmArgs> | ||
<javacArgs> | ||
<javacArg>-Xlint:all,-serial,-path,-try,-processing</javacArg> | ||
</javacArgs> | ||
<compilerPlugins> | ||
<compilerPlugin> | ||
<groupId>com.github.ghik</groupId> | ||
<artifactId>silencer-plugin_${scala.version}</artifactId> | ||
<version>${maven-silencer-plugin.version}</version> | ||
</compilerPlugin> | ||
</compilerPlugins> | ||
<!-- only skipping `scala:doc-jar` --> | ||
<skip>${maven.scaladoc.skip}</skip> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
|
@@ -669,8 +734,7 @@ | |
<configuration> | ||
<shadedArtifactId>true</shadedArtifactId> | ||
<createDependencyReducedPom>true</createDependencyReducedPom> | ||
<dependencyReducedPomLocation>${project.basedir}/target/dependency-reduced-pom.xml | ||
</dependencyReducedPomLocation> | ||
<dependencyReducedPomLocation>${project.basedir}/target/dependency-reduced-pom.xml</dependencyReducedPomLocation> | ||
<artifactSet> | ||
<includes> | ||
<!-- | ||
|
@@ -756,7 +820,7 @@ | |
<artifactId>dependency-check-maven</artifactId> | ||
<version>${owasp-dependency-check-maven.version}</version> | ||
<configuration> | ||
<skip>${skipDependencyCheck}</skip> | ||
<skip>${owasp.skip}</skip> | ||
<skipProvidedScope>true</skipProvidedScope> | ||
<skipRuntimeScope>true</skipRuntimeScope> | ||
<skipSystemScope>true</skipSystemScope> | ||
|
@@ -777,6 +841,7 @@ | |
<artifactId>apache-rat-plugin</artifactId> | ||
<version>${maven-apache-rat-plugin.version}</version> | ||
<configuration> | ||
<skip>${rat.skip}</skip> | ||
<excludes> | ||
<exclude>.asf.yaml</exclude> | ||
<exclude>.git-blame-ignore-revs</exclude> | ||
|
@@ -907,6 +972,20 @@ | |
<module>streampark-spark</module> | ||
</modules> | ||
</profile> | ||
|
||
<profile> | ||
<id>fast</id> | ||
<properties> | ||
<enforcer.skip>true</enforcer.skip> | ||
<maven.javadoc.skip>true</maven.javadoc.skip> | ||
<maven.scaladoc.skip>true</maven.scaladoc.skip> | ||
<maven.scalastyle.skip>true</maven.scalastyle.skip> | ||
<skipTests>true</skipTests> | ||
<rat.skip>true</rat.skip> | ||
<owasp.skip>true</owasp.skip> | ||
<spotless.skip>true</spotless.skip> | ||
</properties> | ||
</profile> | ||
</profiles> | ||
|
||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.