forked from apache/dolphinscheduler
-
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.
[Feature][style] Add spotless maven plugin for automatic style fix. (a…
…pache#11272) * [Feature][style] Add spotless maven plugin for automatic style fix (apache#10963) * Fix spotless ratchet configuration * Remove license-check and decrease line length threshold value * Update related docs * Remove checkstyle and add pre-commit hook * Test updated pre-commit hook * Replace checkstyle with spotless in CI * Remove reviewdog
- Loading branch information
1 parent
bf5f7a8
commit 6a02870
Showing
12 changed files
with
543 additions
and
776 deletions.
There are no files selected for viewing
Submodule reviewdog-setup
deleted from
c2fa3e
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,14 +19,28 @@ cd dolphinscheduler | |
git clone [email protected]:apache/dolphinscheduler.git | ||
``` | ||
|
||
### compile source code | ||
### Compile Source Code | ||
|
||
Supporting system: | ||
* MacOS | ||
* Liunx | ||
|
||
Run `mvn clean install -Prelease -Dmaven.test.skip=true` | ||
|
||
### Code Style | ||
|
||
DolphinScheduler uses `Spotless` for code style and formatting checks. | ||
You could run the following command and `Spotless` will automatically fix | ||
the code style and formatting errors for you: | ||
|
||
```shell | ||
./mvnw spotless:apply | ||
``` | ||
|
||
You could copy the `pre-commit hook` file `/style/pre-commit` to your `.git/hooks/` | ||
directory so that every time you commit your code with `git commit`, `Spotless` will automatically | ||
fix things for you. | ||
|
||
## Docker image build | ||
|
||
DolphinScheduler will release new Docker images after it released, you could find them in [Docker Hub](https://hub.docker.com/search?q=DolphinScheduler). | ||
|
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 |
---|---|---|
|
@@ -27,6 +27,19 @@ git clone [email protected]:apache/dolphinscheduler.git | |
|
||
运行 `mvn clean install -Prelease -Dmaven.test.skip=true` | ||
|
||
|
||
### 代码风格 | ||
|
||
DolphinScheduler使用`Spotless`检查并修复代码风格和格式问题。 | ||
您可以执行如下的命令,`Spotless`将会为您自动检查并修复代码风格和格式问题。 | ||
|
||
```shell | ||
./mvnw spotless:apply | ||
``` | ||
|
||
您可将`/style/pre-commit`目录下的`pre-commit hook`文件拷贝到您的`.git/hooks/` | ||
目录下,这样您每次使用`git commit`命令时,`Spotless`将会自动为您修复代码风格和格式问题。 | ||
|
||
## Docker镜像构建 | ||
|
||
DolphinScheduler 每次发版都会同时发布 Docker 镜像,你可以在 [Docker Hub](https://hub.docker.com/search?q=DolphinScheduler) 中找到这些镜像 | ||
|
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.