thulab / iotdb

This repository is ReadOnly now. please go to https://github.com/apache/incubator-iotdb
Apache License 2.0
19 stars 0 forks source link

add apache header check plugin and format code plugin #572

Closed MyXOF closed 5 years ago

MyXOF commented 5 years ago
# add apache header
$ mvn clean license:format

# remove apache header
$ mvn clean license:remove

# check all file contains apache header
$ mvn clean license:check

# format code
$  mvn clean formatter:format

# check code style
$ mvn clean  checkstyle:check

注意执行顺序,先让代码foramt,然后在加上header,最后检查,顺序不能改

MyXOF commented 5 years ago

close #569 solve #569

codecov[bot] commented 5 years ago

Codecov Report

Merging #572 into master will decrease coverage by 0.28%. The diff coverage is 37.15%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #572      +/-   ##
==========================================
- Coverage   38.68%   38.39%   -0.29%     
==========================================
  Files         373      373              
  Lines       22503    22592      +89     
  Branches     3290     3277      -13     
==========================================
- Hits         8705     8675      -30     
- Misses      13071    13200     +129     
+ Partials      727      717      -10
Impacted Files Coverage Δ
...main/java/org/apache/iotdb/db/metadata/MGraph.java 26.47% <ø> (ø) :arrow_up:
...exception/codebased/ConnectionFailedException.java 0% <ø> (ø) :arrow_up:
...pache/iotdb/db/qp/logical/crud/UpdateOperator.java 0% <ø> (ø) :arrow_up:
.../engine/querycontext/OverflowSeriesDataSource.java 0% <ø> (ø) :arrow_up:
.../apache/iotdb/db/qp/physical/sys/MetadataPlan.java 54.16% <ø> (ø) :arrow_up:
...apache/iotdb/db/qp/logical/crud/QueryOperator.java 100% <ø> (ø) :arrow_up:
.../main/java/org/apache/iotdb/db/metadata/MTree.java 40.94% <ø> (-0.78%) :arrow_down:
.../iotdb/db/postback/receiver/ServerServiceImpl.java 0% <ø> (ø) :arrow_up:
...in/java/org/apache/iotdb/db/metadata/Metadata.java 0% <ø> (ø) :arrow_up:
...g/apache/iotdb/db/qp/physical/crud/UpdatePlan.java 47.22% <ø> (+1.27%) :arrow_up:
... and 446 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 2dd4727...7565b0a. Read the comment docs.

Beyyes commented 5 years ago

这个添加header在什么情况下会被触发? 跑maven的时候吗

MyXOF commented 5 years ago

需要手动触发 @Beyyes

jixuan1989 commented 5 years ago

我们现在参考的的哪个format格式要求?

MyXOF commented 5 years ago

java-google-style

codecov-io commented 5 years ago

Codecov Report

Merging #572 into master will decrease coverage by 0.28%. The diff coverage is 37.15%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #572      +/-   ##
==========================================
- Coverage   38.68%   38.39%   -0.29%     
==========================================
  Files         373      373              
  Lines       22503    22592      +89     
  Branches     3290     3277      -13     
==========================================
- Hits         8705     8675      -30     
- Misses      13071    13200     +129     
+ Partials      727      717      -10
Impacted Files Coverage Δ
...main/java/org/apache/iotdb/db/metadata/MGraph.java 26.47% <ø> (ø) :arrow_up:
...exception/codebased/ConnectionFailedException.java 0% <ø> (ø) :arrow_up:
...pache/iotdb/db/qp/logical/crud/UpdateOperator.java 0% <ø> (ø) :arrow_up:
.../engine/querycontext/OverflowSeriesDataSource.java 0% <ø> (ø) :arrow_up:
.../apache/iotdb/db/qp/physical/sys/MetadataPlan.java 54.16% <ø> (ø) :arrow_up:
...apache/iotdb/db/qp/logical/crud/QueryOperator.java 100% <ø> (ø) :arrow_up:
.../main/java/org/apache/iotdb/db/metadata/MTree.java 40.94% <ø> (-0.78%) :arrow_down:
.../iotdb/db/postback/receiver/ServerServiceImpl.java 0% <ø> (ø) :arrow_up:
...in/java/org/apache/iotdb/db/metadata/Metadata.java 0% <ø> (ø) :arrow_up:
...g/apache/iotdb/db/qp/physical/crud/UpdatePlan.java 47.22% <ø> (+1.27%) :arrow_up:
... and 446 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 2dd4727...7565b0a. Read the comment docs.

codecov-io commented 5 years ago

Codecov Report

Merging #572 into master will decrease coverage by 0.28%. The diff coverage is 37.15%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #572      +/-   ##
==========================================
- Coverage   38.68%   38.39%   -0.29%     
==========================================
  Files         373      373              
  Lines       22503    22592      +89     
  Branches     3290     3277      -13     
==========================================
- Hits         8705     8675      -30     
- Misses      13071    13200     +129     
+ Partials      727      717      -10
Impacted Files Coverage Δ
...main/java/org/apache/iotdb/db/metadata/MGraph.java 26.47% <ø> (ø) :arrow_up:
...exception/codebased/ConnectionFailedException.java 0% <ø> (ø) :arrow_up:
...pache/iotdb/db/qp/logical/crud/UpdateOperator.java 0% <ø> (ø) :arrow_up:
.../engine/querycontext/OverflowSeriesDataSource.java 0% <ø> (ø) :arrow_up:
.../apache/iotdb/db/qp/physical/sys/MetadataPlan.java 54.16% <ø> (ø) :arrow_up:
...apache/iotdb/db/qp/logical/crud/QueryOperator.java 100% <ø> (ø) :arrow_up:
.../main/java/org/apache/iotdb/db/metadata/MTree.java 40.94% <ø> (-0.78%) :arrow_down:
.../iotdb/db/postback/receiver/ServerServiceImpl.java 0% <ø> (ø) :arrow_up:
...in/java/org/apache/iotdb/db/metadata/Metadata.java 0% <ø> (ø) :arrow_up:
...g/apache/iotdb/db/qp/physical/crud/UpdatePlan.java 47.22% <ø> (+1.27%) :arrow_up:
... and 446 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 2dd4727...7565b0a. Read the comment docs.

codecov-io commented 5 years ago

Codecov Report

Merging #572 into master will decrease coverage by 0.28%. The diff coverage is 37.15%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #572      +/-   ##
==========================================
- Coverage   38.68%   38.39%   -0.29%     
==========================================
  Files         373      373              
  Lines       22503    22592      +89     
  Branches     3290     3277      -13     
==========================================
- Hits         8705     8675      -30     
- Misses      13071    13200     +129     
+ Partials      727      717      -10
Impacted Files Coverage Δ
...main/java/org/apache/iotdb/db/metadata/MGraph.java 26.47% <ø> (ø) :arrow_up:
...exception/codebased/ConnectionFailedException.java 0% <ø> (ø) :arrow_up:
...pache/iotdb/db/qp/logical/crud/UpdateOperator.java 0% <ø> (ø) :arrow_up:
.../engine/querycontext/OverflowSeriesDataSource.java 0% <ø> (ø) :arrow_up:
.../apache/iotdb/db/qp/physical/sys/MetadataPlan.java 54.16% <ø> (ø) :arrow_up:
...apache/iotdb/db/qp/logical/crud/QueryOperator.java 100% <ø> (ø) :arrow_up:
.../main/java/org/apache/iotdb/db/metadata/MTree.java 40.94% <ø> (-0.78%) :arrow_down:
.../iotdb/db/postback/receiver/ServerServiceImpl.java 0% <ø> (ø) :arrow_up:
...in/java/org/apache/iotdb/db/metadata/Metadata.java 0% <ø> (ø) :arrow_up:
...g/apache/iotdb/db/qp/physical/crud/UpdatePlan.java 47.22% <ø> (+1.27%) :arrow_up:
... and 446 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 2dd4727...7565b0a. Read the comment docs.

codecov-io commented 5 years ago

Codecov Report

Merging #572 into master will decrease coverage by 0.28%. The diff coverage is 37.15%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #572      +/-   ##
==========================================
- Coverage   38.68%   38.39%   -0.29%     
==========================================
  Files         373      373              
  Lines       22503    22592      +89     
  Branches     3290     3277      -13     
==========================================
- Hits         8705     8675      -30     
- Misses      13071    13200     +129     
+ Partials      727      717      -10
Impacted Files Coverage Δ
...main/java/org/apache/iotdb/db/metadata/MGraph.java 26.47% <ø> (ø) :arrow_up:
...exception/codebased/ConnectionFailedException.java 0% <ø> (ø) :arrow_up:
...pache/iotdb/db/qp/logical/crud/UpdateOperator.java 0% <ø> (ø) :arrow_up:
.../engine/querycontext/OverflowSeriesDataSource.java 0% <ø> (ø) :arrow_up:
.../apache/iotdb/db/qp/physical/sys/MetadataPlan.java 54.16% <ø> (ø) :arrow_up:
...apache/iotdb/db/qp/logical/crud/QueryOperator.java 100% <ø> (ø) :arrow_up:
.../main/java/org/apache/iotdb/db/metadata/MTree.java 40.94% <ø> (-0.78%) :arrow_down:
.../iotdb/db/postback/receiver/ServerServiceImpl.java 0% <ø> (ø) :arrow_up:
...in/java/org/apache/iotdb/db/metadata/Metadata.java 0% <ø> (ø) :arrow_up:
...g/apache/iotdb/db/qp/physical/crud/UpdatePlan.java 47.22% <ø> (+1.27%) :arrow_up:
... and 446 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 2dd4727...7565b0a. Read the comment docs.