Unverified Commit 9312abd4 authored by aiwenmo's avatar aiwenmo Committed by GitHub

[Optimization-1554][pom] Remove check style and add test (#1555)

parent 62cfbd30
## Purpose of the pull request
<!--(For example: This pull request adds checkstyle plugin).-->
<!--(For example: This pull request adds spotless plugin).-->
## Brief change log
<!--*(for example:)*
- *Add maven-checkstyle-plugin to root pom.xml*
- *Add spotless-maven-plugin to root pom.xml*
-->
## Verify this pull request
......
......@@ -41,7 +41,7 @@ jobs:
fetch-depth: 0
- name: Check Style
run: |
./mvnw -T 4C -B --no-snapshot-updates clean spotless:check -P all
./mvnw -T 4C -B --no-snapshot-updates clean spotless:check -P flink-all
build_npm:
name: Build_NPM
runs-on: ubuntu-latest
......@@ -126,7 +126,6 @@ jobs:
run: |
./mvnw -B clean install \
-Dmaven.test.skip=true \
-Dcheckstyle.skip=true \
-Dspotless.check.skip=true \
-P prod,scala-2.12,flink-${{ matrix.flink }},maven-central \
--no-snapshot-updates
......
......@@ -53,9 +53,8 @@ jobs:
run: |
./mvnw -B clean install \
-Dmaven.test.skip=true \
-Dcheckstyle.skip=true \
-Dspotless.check.skip=true \
-P prod,scala-2.12,all,web,maven-central,fast \
-P prod,scala-2.12,flink-all,web,maven-central,fast \
--no-snapshot-updates
- name: Upload release file
uses: actions/upload-artifact@v3
......
......@@ -19,6 +19,7 @@
package org.dinky.admin;
import org.junit.Assert;
import org.junit.Test;
import cn.dev33.satoken.secure.SaSecureUtil;
......@@ -34,5 +35,6 @@ public class AdminTest {
@Test
public void adminTest() {
String admin = SaSecureUtil.md5("admin");
Assert.assertEquals("21232f297a57a5a743894a0e4a801fc3", admin);
}
}
......@@ -17,14 +17,18 @@
*
*/
package org.dinky.admin;
import org.dinky.security.SecurityAspect;
package org.dinky.security;
import org.junit.Assert;
import org.junit.Test;
public class SecurityTest {
/**
* SecurityAspectTest
*
* @author wenmo
* @since 2023/1/14 15:59
*/
public class SecurityAspectTest {
@Test
public void testMask() {
......
......@@ -25,6 +25,7 @@ import org.dinky.model.FileNode;
import java.util.List;
import org.assertj.core.api.Assertions;
import org.junit.Ignore;
import org.junit.Test;
/**
......@@ -35,18 +36,21 @@ import org.junit.Test;
*/
public class DirUtilTest {
@Ignore
@Test
public void testListDirByPath() {
List<FileNode> dirList = DirUtil.listDirByPath(DirConstant.LOG_DIR_PATH);
Assertions.assertThat(dirList).isNotNull();
}
@Ignore
@Test
public void testReadFile() {
String result = DirUtil.readFile(DirConstant.LOG_DIR_PATH + "/dinky.log");
Assertions.assertThat(result).isNotNull();
}
@Ignore
@Test
public void testReadRootLog() {
String result = DirUtil.readFile(DirConstant.ROOT_LOG_PATH);
......
......@@ -31,6 +31,7 @@ import java.util.UUID;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
/**
......@@ -73,6 +74,7 @@ public class DingTalkTest {
config.put(DingTalkConstants.USER, "user1,user2");
}
@Ignore
@Test
public void sendMarkDownMsgTest() {
AlertConfig config = AlertConfig.build("MarkDownTest", "DingTalk", DingTalkTest.config);
......@@ -81,6 +83,7 @@ public class DingTalkTest {
Assert.assertEquals(true, result.getSuccess());
}
@Ignore
@Test
public void sendTextMsgTest() {
config.put(DingTalkConstants.MSG_TYPE, ShowType.TEXT.getValue());
......
......@@ -36,6 +36,7 @@ import java.util.UUID;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
......@@ -87,12 +88,14 @@ public class EmailSenderTest {
mailSender = new MailSender(emailConfig);
}
@Ignore
@Test
public void testTextSendMails() {
AlertResult alertResult = mailSender.send(title, alertMsg.toString());
Assert.assertEquals(true, alertResult.getSuccess()); // 格式需要调整
}
@Ignore
@Test
public void testSendTableMail() {
emailConfig.put(EmailConstants.NAME_SHOW_TYPE, ShowType.TABLE.getValue());
......@@ -101,6 +104,7 @@ public class EmailSenderTest {
Assert.assertEquals(true, alertResult.getSuccess());
}
@Ignore
@Test
public void testAttachmentFile() {
emailConfig.put(EmailConstants.NAME_SHOW_TYPE, ShowType.ATTACHMENT.getValue());
......@@ -109,6 +113,7 @@ public class EmailSenderTest {
Assert.assertEquals(true, alertResult.getSuccess());
}
@Ignore
@Test
public void testTableAttachmentFile() {
emailConfig.put(EmailConstants.NAME_SHOW_TYPE, ShowType.TABLE_ATTACHMENT.getValue());
......@@ -117,6 +122,7 @@ public class EmailSenderTest {
Assert.assertEquals(true, alertResult.getSuccess());
}
@Ignore
@Test
public void testGenTextEmail() {
List<LinkedHashMap> linkedHashMaps =
......
......@@ -28,6 +28,7 @@ import java.util.UUID;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
/**
......@@ -67,6 +68,7 @@ public class FeiShuSenderTest {
feiShuConfig.put(FeiShuConstants.AT_USERS, "zhumingye");
}
@Ignore
@Test
public void testTextTypeSend() {
FeiShuSender feiShuSender = new FeiShuSender(feiShuConfig);
......@@ -74,6 +76,7 @@ public class FeiShuSenderTest {
Assert.assertEquals(true, alertResult.getSuccess());
}
@Ignore
@Test
public void testPostTypeSend() {
feiShuConfig.put(FeiShuConstants.MSG_TYPE, "post");
......
......@@ -28,6 +28,7 @@ import java.util.Map;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
/** WeChatSenderTest */
......@@ -66,6 +67,7 @@ public class WeChatSenderTest {
weChatConfig.put(WeChatConstants.SEND_TYPE, WeChatType.APP.getValue());
}
@Ignore
@Test
public void testSendAPPMarkDownMsg() {
WeChatSender weChatSender = new WeChatSender(weChatConfig);
......@@ -73,6 +75,7 @@ public class WeChatSenderTest {
Assert.assertEquals(true, alertResult.getSuccess());
}
@Ignore
@Test
public void testSendAPPTextMsg() {
weChatConfig.put(WeChatConstants.SHOW_TYPE, ShowType.TEXT.getValue());
......@@ -81,6 +84,7 @@ public class WeChatSenderTest {
Assert.assertEquals(true, alertResult.getSuccess());
}
@Ignore
@Test
public void testChatMarkDownMsg() throws IOException {
weChatConfig.put(
......@@ -95,6 +99,7 @@ public class WeChatSenderTest {
Assert.assertEquals(true, alertResult.getSuccess());
}
@Ignore
@Test
public void testChatTextMsg() throws IOException {
weChatConfig.put(
......
......@@ -135,7 +135,7 @@
</profile>
<profile>
<id>all</id>
<id>flink-all</id>
<dependencies>
<dependency>
<groupId>org.dinky</groupId>
......
......@@ -54,7 +54,7 @@
</profile>
<profile>
<id>all</id>
<id>flink-all</id>
<modules>
<module>dinky-app-1.12</module>
<module>dinky-app-1.13</module>
......
......@@ -60,7 +60,7 @@
</profile>
<profile>
<id>all</id>
<id>flink-all</id>
<modules>
<module>dinky-catalog-mysql-1.13</module>
<module>dinky-catalog-mysql-1.14</module>
......
......@@ -124,7 +124,7 @@
</profile>
<profile>
<id>all</id>
<id>flink-all</id>
<dependencies>
<dependency>
<groupId>org.dinky</groupId>
......
......@@ -72,7 +72,7 @@
</profile>
<profile>
<id>all</id>
<id>flink-all</id>
<modules>
<module>dinky-client-1.12</module>
<module>dinky-client-1.13</module>
......
......@@ -327,7 +327,7 @@
</profile>
<profile>
<id>all</id>
<id>flink-all</id>
<dependencies>
<dependency>
<groupId>org.dinky</groupId>
......
......@@ -232,7 +232,7 @@
</profile>
<profile>
<id>all</id>
<id>flink-all</id>
<dependencies>
<dependency>
<groupId>org.dinky</groupId>
......
/*
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.dinky.executor;
import org.junit.jupiter.api.Test;
/** */
class SqlManagerTest {
@Test
void getSqlFragment() {
SqlManager sqlManager = new SqlManager();
}
}
......@@ -23,6 +23,7 @@ import org.dinky.executor.Executor;
import org.dinky.executor.ExecutorSetting;
import org.dinky.executor.LocalStreamExecutor;
import org.junit.Ignore;
import org.junit.Test;
/**
......@@ -31,6 +32,7 @@ import org.junit.Test;
*/
public class CdcSourceTests {
@Ignore
@Test
public void printTest() throws Exception {
String statement =
......
......@@ -35,8 +35,8 @@ public class FlinkInterceptorTest {
@Test
public void replaceFragmentTest() {
String statement =
"nullif1:=NULLIF(1, 0) as val;"
+ "nullif2:=NULLIF(0, 0) as val$null;"
"nullif1:=NULLIF(1, 0) as val;\n"
+ "nullif2:=NULLIF(0, 0) as val$null;\n"
+ "select ${nullif1},${nullif2}";
String pretreatStatement = FlinkInterceptor.pretreatStatement(Executor.build(), statement);
Assert.assertEquals(
......
......@@ -66,7 +66,7 @@
</profile>
<profile>
<id>all</id>
<id>flink-all</id>
<modules>
<module>dinky-flink-1.12</module>
<module>dinky-flink-1.13</module>
......
......@@ -204,7 +204,7 @@
</profile>
<profile>
<id>all</id>
<id>flink-all</id>
<dependencies>
<dependency>
<groupId>org.dinky</groupId>
......
......@@ -209,7 +209,7 @@ for k8s commit tasks-->
</profile>
<profile>
<id>all</id>
<id>flink-all</id>
<dependencies>
<dependency>
<groupId>org.dinky</groupId>
......
......@@ -28,6 +28,7 @@ import org.dinky.model.Schema;
import java.util.List;
import org.junit.Ignore;
import org.junit.Test;
/**
......@@ -52,6 +53,7 @@ public class ClickHouseTest {
return Driver.build(config);
}
@Ignore
@Test
public void connectTest() {
String test = getDriver().test();
......@@ -59,6 +61,7 @@ public class ClickHouseTest {
// System.out.println("end...");
}
@Ignore
@Test
public void schemaTest() {
List<Schema> schemasAndTables = getDriver().getSchemasAndTables();
......@@ -66,6 +69,7 @@ public class ClickHouseTest {
// System.out.println("end...");
}
@Ignore
@Test
public void columnTest() {
Driver driver = getDriver();
......@@ -74,6 +78,7 @@ public class ClickHouseTest {
// System.out.println("end...");
}
@Ignore
@Test
public void queryTest() {
Driver driver = getDriver();
......
......@@ -32,6 +32,7 @@ import java.util.List;
import java.util.UUID;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
public class DorisTest {
......@@ -56,6 +57,7 @@ public class DorisTest {
}
}
@Ignore
@Test
public void test() throws SQLException {
// test
......@@ -69,6 +71,7 @@ public class DorisTest {
query();
}
@Ignore
@Test
public void testSchema() {
// schema && table
......@@ -81,6 +84,7 @@ public class DorisTest {
}
}
@Ignore
@Test
public void testColumns() {
// columns
......@@ -90,6 +94,7 @@ public class DorisTest {
}
}
@Ignore
@Test
public void query() {
JdbcSelectResult selectResult = driver.query("select * from scoreinfo ", 10);
......
......@@ -31,6 +31,7 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import org.junit.Ignore;
import org.junit.Test;
/**
......@@ -62,6 +63,7 @@ public class HiveTest {
return Driver.build(config);
}
@Ignore
@Test
public void connectTest() {
DriverConfig config = new DriverConfig();
......@@ -77,6 +79,7 @@ public class HiveTest {
System.err.println("end...");
}
@Ignore
@Test
public void getDBSTest() {
Driver driver = getDriver();
......@@ -88,6 +91,7 @@ public class HiveTest {
System.err.println("end...");
}
@Ignore
@Test
public void getTablesByDBTest() throws Exception {
Driver driver = getDriver();
......@@ -100,6 +104,7 @@ public class HiveTest {
System.err.println("end...");
}
@Ignore
@Test
public void getColumnsByTableTest() {
Driver driver = getDriver();
......@@ -112,6 +117,7 @@ public class HiveTest {
System.err.println("end...");
}
@Ignore
@Test
public void getCreateTableTest() throws Exception {
Driver driver = getDriver();
......@@ -122,6 +128,7 @@ public class HiveTest {
System.err.println("end...");
}
@Ignore
@Test
public void getTableExtenedInfoTest() throws Exception {
Driver driver = getDriver();
......@@ -138,6 +145,7 @@ public class HiveTest {
* @date: 202/3/23 @Description: 测试hive多条SQL执行 @Param:
* @return:
*/
@Ignore
@Test
public void multipleSQLTest() throws Exception {
Driver driver = getDriver();
......
......@@ -28,6 +28,7 @@ import org.dinky.model.Schema;
import java.util.List;
import java.util.UUID;
import org.junit.Ignore;
import org.junit.Test;
/**
......@@ -55,6 +56,7 @@ public class MysqlTest {
return Driver.build(config);
}
@Ignore
@Test
public void connectTest() {
DriverConfig config = new DriverConfig();
......@@ -72,6 +74,7 @@ public class MysqlTest {
System.out.println("end...");
}
@Ignore
@Test
public void schemaTest() {
Driver driver = getDriver();
......@@ -79,6 +82,7 @@ public class MysqlTest {
System.out.println("end...");
}
@Ignore
@Test
public void columnTest() {
Driver driver = getDriver();
......@@ -86,6 +90,7 @@ public class MysqlTest {
System.out.println("end...");
}
@Ignore
@Test
public void queryTest() {
Driver driver = getDriver();
......
......@@ -28,6 +28,7 @@ import org.dinky.model.Schema;
import java.util.List;
import java.util.UUID;
import org.junit.Ignore;
import org.junit.Test;
/**
......@@ -52,6 +53,7 @@ public class OracleTest {
return Driver.build(config);
}
@Ignore
@Test
public void connectTest() {
DriverConfig config = new DriverConfig();
......@@ -66,6 +68,7 @@ public class OracleTest {
System.out.println("end...");
}
@Ignore
@Test
public void schemaTest() {
Driver driver = getDriver();
......@@ -73,6 +76,7 @@ public class OracleTest {
System.out.println("end...");
}
@Ignore
@Test
public void columnTest() {
Driver driver = getDriver();
......@@ -80,6 +84,7 @@ public class OracleTest {
System.out.println("end...");
}
@Ignore
@Test
public void queryTest() {
Driver driver = getDriver();
......
......@@ -30,6 +30,7 @@ import java.util.LinkedHashMap;
import java.util.List;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
public class PhoenixTest {
......@@ -49,6 +50,7 @@ public class PhoenixTest {
}
}
@Ignore
@Test
public void testSchema() {
// schema && table
......@@ -61,6 +63,7 @@ public class PhoenixTest {
}
}
@Ignore
@Test
public void testListTables() {
List<Table> tables = driver.listTables("");
......@@ -69,6 +72,7 @@ public class PhoenixTest {
}
}
@Ignore
@Test
public void testColumns() {
// columns
......@@ -79,6 +83,7 @@ public class PhoenixTest {
}
}
@Ignore
@Test
public void query() {
JdbcSelectResult selectResult = driver.query("select * from ODS_OUTP_PRESC ", 10);
......
......@@ -32,6 +32,7 @@ import java.util.List;
import java.util.UUID;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
public class PrestoTest {
......@@ -53,6 +54,7 @@ public class PrestoTest {
}
}
@Ignore
@Test
public void test() throws SQLException {
// test
......@@ -66,6 +68,7 @@ public class PrestoTest {
query();
}
@Ignore
@Test
public void testSchema() {
// schema && table
......@@ -78,6 +81,7 @@ public class PrestoTest {
}
}
@Ignore
@Test
public void testColumns() {
// columns
......@@ -88,6 +92,7 @@ public class PrestoTest {
}
}
@Ignore
@Test
public void query() {
JdbcSelectResult selectResult = driver.query("select * from hive.lake.test", 10);
......
......@@ -32,6 +32,7 @@ import java.util.List;
import java.util.UUID;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
public class SqlServerTest {
......@@ -55,6 +56,7 @@ public class SqlServerTest {
}
}
@Ignore
@Test
public void test() throws SQLException {
// test
......@@ -68,6 +70,7 @@ public class SqlServerTest {
query();
}
@Ignore
@Test
public void testSchema() {
// schema && table
......@@ -80,6 +83,7 @@ public class SqlServerTest {
}
}
@Ignore
@Test
public void testColumns() {
// columns
......@@ -90,6 +94,7 @@ public class SqlServerTest {
}
}
@Ignore
@Test
public void query() {
JdbcSelectResult selectResult = driver.query("select * from t_user", 10);
......
......@@ -11,6 +11,8 @@
<artifactId>dlink-web</artifactId>
<packaging>pom</packaging>
<name>Dinky : Dlink-Web</name>
<build>
<finalName>${project.artifactId}-${project.version}</finalName>
<plugins>
......
......@@ -11,17 +11,19 @@ Pull Request 本质上是一种软件的合作方式,是将涉及不同功能
标题格式:[`Pull Request 类型`-`Issue 号`][`模块名`] `Pull Request 描述`
例如:`[Fix-3333][admin] Fix global variables are not valid`
其中`Pull Request 类型`和`Issue 类型`的对应关系如下:
| Issue 类型 | 描述 | 样例 |
| ------------- | ----------------------- | ---------------------------------------------------------- |
| Issue 类型 | Pull Request 类型 | 样例(假设 Issue 号为 3333) |
| Feature | Feature | [Feature-3333][admin] Implement xxx |
| Bug | Fix | [Fix-3333][admin] Fix xxx |
| Improvement | Improvement | [Improvement-3333][alert] Improve the performance of xxx |
| Test | Test | [Test-3333][metadata-mysql] Add the e2e test of xxx |
| Sub-Task | Sub-Task 对应的父类型 | [Feature-3333][admin] Implement xxx |
| Issue 类型 | Pull Request 类型 | 样例(假设 Issue 号为 3333) |
| ------------- | ----------------------- |-----------------------------------------------------|
| Feature | Feature | [Feature-3333][admin] Implement xxx |
| Bug | Fix | [Fix-3333][web] Fix xxx |
| Optimization | Optimization | [Optimization-3333][alert] Optimize xxx |
| Improve | Improve | [Improve-3333][core] Improve xxx |
| Test | Test | [Test-3333][metadata-mysql] Add the e2e test of xxx |
| Document | Document | [Document-3333][cdc] Add the document of xxx |
其中 `Issue 号`是指当前 Pull Request 对应要解决的 Issue 号,`模块名`同 Issue 的模块名。
......@@ -35,32 +37,18 @@ Pull Request 本质上是一种软件的合作方式,是将涉及不同功能
### Pull Request Code Style
当你向 Dinky 提交 pull request 的时候 code-style 是你不得不考虑的问题。我们在 CI 中使用 Checkstyle [参考](https://checkstyle.sourceforge.io/)来保持代码风格的统一,它是一种帮助开发者编写遵循编码规范的 Java 代码开发工具。如果你的 pull request 没有通过 Checkstyle 的检测,那它将不会被合并到主库中。你可以在提交 pull request 前使用 Checkstyle 来检测或者格式化你的代码。如下的步骤将引领你配置并激活 Checkstyle
1. 准备 Checkstyle 配置文件:你可以点击[这里](https://github.com/apache/dolphinscheduler/blob/dev/style/checkstyle.xml)手动下载,但是我们更加推荐在 Dinky 代码库中找到它。当你将代码库克隆下来后,你可以在路径 `style/checkstyle.xml` 下找到配置文件
2. 下载 Intellij IDEA Checkstyle 插件:通过关键字**CheckStyle-IDEA**或者通过[这个页面](https://plugins.jetbrains.com/plugin/1065-checkstyle-idea)安装均可。如果你不清楚如何安装Intellij IDEA插件,可以参考[这个连接](https://www.jetbrains.com/help/idea/managing-plugins.html#install_plugin_from_repo)
3. 配置并激活 Checkstyles 以及 Intellij IDEA 代码风格:当完成上面几步后,你就可以配置并激活他们了。你可以在路径`Preferences -> Tool -> Checkstyle`中找到 Checkstyle,请参照下图完成其配置
<p align="center">
<img src="/img/checkstyle-idea.png" alt="checkstyle idea configuration" />
</p>
截止目前,Checkstyle 插件已经配置完成了,当有代码或者文件不符合风格时就会显示在 Checkstyle 中。但强烈建议同时配置 Intellij IDEA 的代码风格,完成配置后可以使用 Intellij IDEA 自动格式化功能。你可以在路径`Preferences -> Editor -> Code Style -> Java`找到配置,请参照下图完成其配置
当你向 Dinky 提交 pull request 的时候 code-style 是你不得不考虑的问题。我们在 CI 中使用 Spotless 来保持代码风格的统一,它是一种帮助开发者编写遵循编码规范的 Java 代码格式化工具。如果你的 pull request 没有通过 Spotless 的检测,那它将不会被合并到主库中。你可以在提交 pull request 前使用 Spotless 来检测或者格式化你的代码。
<p align="center">
<img src="/img/code-style-idea.png" alt="code style idea configuration" />
</p>
1. 在提交 pull request 前格式化你的代码:执行 `mvn spotless:apply -P flink-all` 自动格式化。格式化代码的最佳时间是将你的修改提交到本地 git 版本库之前
1. 在提交 pull request 前格式化你的代码:完成上面全部后,你可以使用快捷键`Command + L`(Mac用户) or `Ctrl+L`(Windows用户)在 Intellij IDEA 完成自动格式化。格式化代码的最佳时间是将你的修改提交到本地 git 版本库之前
2. 在提交 pull request 前编译整个项目:在 IDEA 中的 Profiles 中选择 aliyun,flink-all,nexus,prod,scala-2.12,web,重载项目后执行 `mvn clean install -P aliyun,prod,scala-2.12,web,flink-all`,编译成功后即可提交代码
### 相关问题
- 怎样处理一个 Pull Request 对应多个 Issue 的场景。
首先 Pull Request 和 Issue 一对多的场景是比较少的。Pull Request 和 Issue 一对多的根本原因就是出现了多个
Issue 需要做大体相同的一件事情的场景,通常针对这种场景有两种解决方法:第一种就是把多个功能相同的 Issue 合并到同一个 Issue 上,然后把其他的
Issue 进行关闭;第二种就是多个 Issue 大体上是在做一个功能,但是存在一些细微的差别,这类场景下可以把每个 Issue 的职责划分清楚,每一个
Issue 的类型都标记为 Sub-Task,然后将这些 Sub-Task 类型的 Issue 关联到一个总 Issue 上,在提交
Pull Request 时,每个 Pull Request 都只关联一个 Sub-Task 的 Issue。
Issue 需要做大体相同的一件事情的场景,通常针对这种场景就是把多个功能相同的 Issue 合并到同一个 Issue 上,然后把其他的
Issue 进行关闭。
尽量把一个 Pull Request 作为最小粒度。如果一个 Pull Request 只做一件事,Contributor 容易完成,Pull Request 影响的范围也会更加清晰,对 reviewer 的压力也会小。
......@@ -73,7 +73,6 @@
<log4j.version>2.19.0</log4j.version>
<lombok.version>1.18.24</lombok.version>
<maven-assembly-plugin.version>3.4.2</maven-assembly-plugin.version>
<maven-checkstyle-plugin.version>3.1.2</maven-checkstyle-plugin.version>
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
<maven-jar-plugin.version>3.3.0</maven-jar-plugin.version>
<maven-surefire-plugin.version>3.0.0-M5</maven-surefire-plugin.version>
......@@ -604,38 +603,6 @@
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>${maven-checkstyle-plugin.version}</version>
<configuration>
<consoleOutput>true</consoleOutput>
<encoding>UTF-8</encoding>
<configLocation>style/checkstyle.xml</configLocation>
<failOnViolation>true</failOnViolation>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
<sourceDirectories>
<sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
</sourceDirectories>
<excludes>**\/generated-sources\/</excludes>
</configuration>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>8.45</version>
</dependency>
</dependencies>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
<phase>compile</phase>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
......@@ -670,10 +637,6 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
</plugin>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
......@@ -918,7 +881,7 @@
</profile>
<profile>
<id>all</id>
<id>flink-all</id>
</profile>
<profile>
......@@ -1015,13 +978,6 @@
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment