You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "wangnimaa (GitHub)" <gi...@apache.org> on 2019/03/14 07:23:11 UTC

[GitHub] [incubator-dubbo] wangnimaa opened pull request #3651: code rule

## What is the purpose of the change

XXXXX

## Brief changelog

XXXXX

## Verifying this change

XXXXX

Follow this checklist to help us incorporate your contribution quickly and easily:

- [x] Make sure there is a [GITHUB_issue](https://github.com/apache/incubator-dubbo/issues) field for the change (usually before you start working on it). Trivial changes like typos do not require a GITHUB issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
- [ ] Format the pull request title like `[Dubbo-XXX] Fix UnknownException when host config not exist #XXX`. Each commit in the pull request should have a meaningful subject line and body.
- [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add integration-test in [test module](https://github.com/apache/incubator-dubbo/tree/master/dubbo-test).
- [ ] Run `mvn clean install -DskipTests=false` & `mvn clean test-compile failsafe:integration-test` to make sure unit-test and integration-test pass.
- [ ] If this contribution is large, please follow the [Software Donation Guide](https://github.com/apache/incubator-dubbo/wiki/Software-donation-guide).


[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3651 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] wangnimaa commented on issue #3651: code rule

Posted by "wangnimaa (GitHub)" <gi...@apache.org>.
> please resolve conflicts.

Ok, I get it now, thanks!

[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3651 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [incubator-dubbo] wangnimaa commented on issue #3651: code rule

Posted by "wangnimaa (GitHub)" <gi...@apache.org>.
> ## What is the purpose of the change
> code rule
> 
> ## Brief changelog
> XXXXX
> 
> ## Verifying this change
> XXXXX
> 
> Follow this checklist to help us incorporate your contribution quickly and easily:
> 
> * [x]  Make sure there is a [GITHUB_issue](https://github.com/apache/incubator-dubbo/issues) field for the change (usually before you start working on it). Trivial changes like typos do not require a GITHUB issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
> * [ ]  Format the pull request title like `[Dubbo-XXX] Fix UnknownException when host config not exist #XXX`. Each commit in the pull request should have a meaningful subject line and body.
> * [ ]  Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
> * [ ]  Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add integration-test in [test module](https://github.com/apache/incubator-dubbo/tree/master/dubbo-test).
> * [ ]  Run `mvn clean install -DskipTests=false` & `mvn clean test-compile failsafe:integration-test` to make sure unit-test and integration-test pass.
> * [ ]  If this contribution is large, please follow the [Software Donation Guide](https://github.com/apache/incubator-dubbo/wiki/Software-donation-guide).



> ## What is the purpose of the change
> XXXXX
> 
> ## Brief changelog
> XXXXX
> 
> ## Verifying this change
> XXXXX
> 
> Follow this checklist to help us incorporate your contribution quickly and easily:
> 
> * [x]  Make sure there is a [GITHUB_issue](https://github.com/apache/incubator-dubbo/issues) field for the change (usually before you start working on it). Trivial changes like typos do not require a GITHUB issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
> * [ ]  Format the pull request title like `[Dubbo-XXX] Fix UnknownException when host config not exist #XXX`. Each commit in the pull request should have a meaningful subject line and body.
> * [ ]  Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
> * [ ]  Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add integration-test in [test module](https://github.com/apache/incubator-dubbo/tree/master/dubbo-test).
> * [ ]  Run `mvn clean install -DskipTests=false` & `mvn clean test-compile failsafe:integration-test` to make sure unit-test and integration-test pass.
> * [ ]  If this contribution is large, please follow the [Software Donation Guide](https://github.com/apache/incubator-dubbo/wiki/Software-donation-guide).



[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3651 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] codecov-io commented on issue #3651: code rule

Posted by "codecov-io (GitHub)" <gi...@apache.org>.
# [Codecov](https://codecov.io/gh/apache/incubator-dubbo/pull/3651?src=pr&el=h1) Report
> Merging [#3651](https://codecov.io/gh/apache/incubator-dubbo/pull/3651?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-dubbo/commit/b2bfbc76d13106a3211f5af1713ba50848560060?src=pr&el=desc) will **decrease** coverage by `0.01%`.
> The diff coverage is `81.33%`.

[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-dubbo/pull/3651/graphs/tree.svg?width=650&token=VnEIkiFQT0&height=150&src=pr)](https://codecov.io/gh/apache/incubator-dubbo/pull/3651?src=pr&el=tree)

```diff
@@             Coverage Diff              @@
##             master    #3651      +/-   ##
============================================
- Coverage     63.44%   63.43%   -0.02%     
  Complexity       71       71              
============================================
  Files           703      703              
  Lines         31000    31075      +75     
  Branches       5024     5024              
============================================
+ Hits          19669    19711      +42     
- Misses         9066     9094      +28     
- Partials       2265     2270       +5
```


| [Impacted Files](https://codecov.io/gh/apache/incubator-dubbo/pull/3651?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
|---|---|---|---|
| [...e/src/main/java/com/alibaba/dubbo/rpc/Invoker.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3651/diff?src=pr&el=tree#diff-ZHViYm8tY29tcGF0aWJsZS9zcmMvbWFpbi9qYXZhL2NvbS9hbGliYWJhL2R1YmJvL3JwYy9JbnZva2VyLmphdmE=) | `0% <ø> (ø)` | `0 <0> (ø)` | :arrow_down: |
| [...pache/dubbo/remoting/etcd/AbstractRetryPolicy.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3651/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctZXRjZDMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL3JlbW90aW5nL2V0Y2QvQWJzdHJhY3RSZXRyeVBvbGljeS5qYXZh) | `0% <ø> (ø)` | `0 <0> (ø)` | :arrow_down: |
| [...rpc/cluster/configurator/AbstractConfigurator.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3651/diff?src=pr&el=tree#diff-ZHViYm8tY2x1c3Rlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vcnBjL2NsdXN0ZXIvY29uZmlndXJhdG9yL0Fic3RyYWN0Q29uZmlndXJhdG9yLmphdmE=) | `62.5% <ø> (ø)` | `0 <0> (ø)` | :arrow_down: |
| [...ubbo/remoting/etcd/support/AbstractEtcdClient.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3651/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctZXRjZDMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL3JlbW90aW5nL2V0Y2Qvc3VwcG9ydC9BYnN0cmFjdEV0Y2RDbGllbnQuamF2YQ==) | `0% <ø> (ø)` | `0 <0> (ø)` | :arrow_down: |
| [...a/org/apache/dubbo/registry/etcd/EtcdRegistry.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3651/diff?src=pr&el=tree#diff-ZHViYm8tcmVnaXN0cnkvZHViYm8tcmVnaXN0cnktZXRjZDMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL3JlZ2lzdHJ5L2V0Y2QvRXRjZFJlZ2lzdHJ5LmphdmE=) | `0% <ø> (ø)` | `0 <0> (ø)` | :arrow_down: |
| [.../apache/dubbo/remoting/etcd/jetcd/JEtcdClient.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3651/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctZXRjZDMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL3JlbW90aW5nL2V0Y2QvamV0Y2QvSkV0Y2RDbGllbnQuamF2YQ==) | `0% <0%> (ø)` | `0 <0> (ø)` | :arrow_down: |
| [.../apache/dubbo/remoting/etcd/option/OptionUtil.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3651/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctZXRjZDMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL3JlbW90aW5nL2V0Y2Qvb3B0aW9uL09wdGlvblV0aWwuamF2YQ==) | `0% <0%> (ø)` | `0 <0> (ø)` | :arrow_down: |
| [...g/apache/dubbo/remoting/etcd/jetcd/RetryLoops.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3651/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctZXRjZDMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL3JlbW90aW5nL2V0Y2QvamV0Y2QvUmV0cnlMb29wcy5qYXZh) | `0% <0%> (ø)` | `0 <0> (ø)` | :arrow_down: |
| [.../dubbo/remoting/etcd/jetcd/JEtcdClientWrapper.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3651/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctZXRjZDMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL3JlbW90aW5nL2V0Y2QvamV0Y2QvSkV0Y2RDbGllbnRXcmFwcGVyLmphdmE=) | `0% <0%> (ø)` | `0 <0> (ø)` | :arrow_down: |
| [.../dubbo/config/builders/AbstractServiceBuilder.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3651/diff?src=pr&el=tree#diff-ZHViYm8tY29uZmlnL2R1YmJvLWNvbmZpZy1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZy9idWlsZGVycy9BYnN0cmFjdFNlcnZpY2VCdWlsZGVyLmphdmE=) | `97.64% <100%> (+0.58%)` | `0 <0> (ø)` | :arrow_down: |
| ... and [16 more](https://codecov.io/gh/apache/incubator-dubbo/pull/3651/diff?src=pr&el=tree-more) | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-dubbo/pull/3651?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-dubbo/pull/3651?src=pr&el=footer). Last update [b2bfbc7...c32b5b4](https://codecov.io/gh/apache/incubator-dubbo/pull/3651?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3651 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [incubator-dubbo] wangnimaa commented on issue #3651: code rule

Posted by "wangnimaa (GitHub)" <gi...@apache.org>.
> I agree with uniform coding rules. But I personally more prefer use tool to make sure necessary code rule is applied to project.
> 
> I think we need discuss what rule we need apply, for example, I see some Override was added. If we agree to must have Override annotation, we should add a checkstyle rule (if rule existed)
> Another example is allow single-line statements without braces or not, it also something need discuss

last year ,I propose this issue ,https://github.com/apache/incubator-dubbo/issues/2553.we discuss about the issues .I've been solving these problems.

[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3651 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] codecov-io commented on issue #3651: code rule

Posted by "codecov-io (GitHub)" <gi...@apache.org>.
# [Codecov](https://codecov.io/gh/apache/incubator-dubbo/pull/3651?src=pr&el=h1) Report
> Merging [#3651](https://codecov.io/gh/apache/incubator-dubbo/pull/3651?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-dubbo/commit/fca31c45f47da0dbc1cf0a85ad5d87b2384a5c36?src=pr&el=desc) will **increase** coverage by `0.32%`.
> The diff coverage is `81.33%`.

[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-dubbo/pull/3651/graphs/tree.svg?width=650&token=VnEIkiFQT0&height=150&src=pr)](https://codecov.io/gh/apache/incubator-dubbo/pull/3651?src=pr&el=tree)

```diff
@@             Coverage Diff              @@
##             master    #3651      +/-   ##
============================================
+ Coverage     63.61%   63.94%   +0.32%     
  Complexity       71       71              
============================================
  Files           704      708       +4     
  Lines         31063    31692     +629     
  Branches       5037     5135      +98     
============================================
+ Hits          19762    20264     +502     
- Misses         9032     9140     +108     
- Partials       2269     2288      +19
```


| [Impacted Files](https://codecov.io/gh/apache/incubator-dubbo/pull/3651?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
|---|---|---|---|
| [...e/src/main/java/com/alibaba/dubbo/rpc/Invoker.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3651/diff?src=pr&el=tree#diff-ZHViYm8tY29tcGF0aWJsZS9zcmMvbWFpbi9qYXZhL2NvbS9hbGliYWJhL2R1YmJvL3JwYy9JbnZva2VyLmphdmE=) | `0% <ø> (ø)` | `0 <0> (ø)` | :arrow_down: |
| [...pache/dubbo/remoting/etcd/AbstractRetryPolicy.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3651/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctZXRjZDMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL3JlbW90aW5nL2V0Y2QvQWJzdHJhY3RSZXRyeVBvbGljeS5qYXZh) | `0% <ø> (ø)` | `0 <0> (ø)` | :arrow_down: |
| [...rpc/cluster/configurator/AbstractConfigurator.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3651/diff?src=pr&el=tree#diff-ZHViYm8tY2x1c3Rlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vcnBjL2NsdXN0ZXIvY29uZmlndXJhdG9yL0Fic3RyYWN0Q29uZmlndXJhdG9yLmphdmE=) | `62.5% <ø> (ø)` | `0 <0> (ø)` | :arrow_down: |
| [...ubbo/remoting/etcd/support/AbstractEtcdClient.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3651/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctZXRjZDMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL3JlbW90aW5nL2V0Y2Qvc3VwcG9ydC9BYnN0cmFjdEV0Y2RDbGllbnQuamF2YQ==) | `0% <ø> (ø)` | `0 <0> (ø)` | :arrow_down: |
| [...a/org/apache/dubbo/registry/etcd/EtcdRegistry.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3651/diff?src=pr&el=tree#diff-ZHViYm8tcmVnaXN0cnkvZHViYm8tcmVnaXN0cnktZXRjZDMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL3JlZ2lzdHJ5L2V0Y2QvRXRjZFJlZ2lzdHJ5LmphdmE=) | `0% <ø> (ø)` | `0 <0> (ø)` | :arrow_down: |
| [.../apache/dubbo/remoting/etcd/jetcd/JEtcdClient.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3651/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctZXRjZDMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL3JlbW90aW5nL2V0Y2QvamV0Y2QvSkV0Y2RDbGllbnQuamF2YQ==) | `0% <0%> (ø)` | `0 <0> (ø)` | :arrow_down: |
| [.../apache/dubbo/remoting/etcd/option/OptionUtil.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3651/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctZXRjZDMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL3JlbW90aW5nL2V0Y2Qvb3B0aW9uL09wdGlvblV0aWwuamF2YQ==) | `0% <0%> (ø)` | `0 <0> (ø)` | :arrow_down: |
| [...g/apache/dubbo/remoting/etcd/jetcd/RetryLoops.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3651/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctZXRjZDMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL3JlbW90aW5nL2V0Y2QvamV0Y2QvUmV0cnlMb29wcy5qYXZh) | `0% <0%> (ø)` | `0 <0> (ø)` | :arrow_down: |
| [.../dubbo/remoting/etcd/jetcd/JEtcdClientWrapper.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3651/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctZXRjZDMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL3JlbW90aW5nL2V0Y2QvamV0Y2QvSkV0Y2RDbGllbnRXcmFwcGVyLmphdmE=) | `0% <0%> (ø)` | `0 <0> (ø)` | :arrow_down: |
| [.../dubbo/config/builders/AbstractServiceBuilder.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3651/diff?src=pr&el=tree#diff-ZHViYm8tY29uZmlnL2R1YmJvLWNvbmZpZy1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZy9idWlsZGVycy9BYnN0cmFjdFNlcnZpY2VCdWlsZGVyLmphdmE=) | `97.64% <100%> (+0.58%)` | `0 <0> (ø)` | :arrow_down: |
| ... and [23 more](https://codecov.io/gh/apache/incubator-dubbo/pull/3651/diff?src=pr&el=tree-more) | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-dubbo/pull/3651?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-dubbo/pull/3651?src=pr&el=footer). Last update [fca31c4...475b114](https://codecov.io/gh/apache/incubator-dubbo/pull/3651?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3651 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [incubator-dubbo] CrazyHZM commented on issue #3651: code rule

Posted by "CrazyHZM (GitHub)" <gi...@apache.org>.
please resolve conflicts.

[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3651 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] ralf0131 commented on issue #3651: code rule

Posted by "ralf0131 (GitHub)" <gi...@apache.org>.
@htynkn I agree with adding more code rules. Shall we enhance https://github.com/apache/incubator-dubbo/tree/master/codestyle ? 

[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3651 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] htynkn commented on issue #3651: code rule

Posted by "htynkn (GitHub)" <gi...@apache.org>.
I agree with uniform coding rules. But I personally more prefer use tool to make sure  necessary code rule is applied to project.

I think we need discuss what rule we need apply, for example, I see some Override was added. If we agree to must have Override annotation, we should add a checkstyle rule (if rule existed)
Another example is allow single-line statements without braces or not, it also something need discuss

[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3651 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] htynkn commented on issue #3651: code rule

Posted by "htynkn (GitHub)" <gi...@apache.org>.
> > I agree with uniform coding rules. But I personally more prefer use tool to make sure necessary code rule is applied to project.
> > I think we need discuss what rule we need apply, for example, I see some Override was added. If we agree to must have Override annotation, we should add a checkstyle rule (if rule existed)
> > Another example is allow single-line statements without braces or not, it also something need discuss
> 
> last year ,I propose this issue ,https://github.com/apache/incubator-dubbo/issues/2553.we discuss about the issues .I've been solving these problems.


Sure. I see 
@ralf0131 would you mind have a look? This is related to https://github.com/apache/incubator-dubbo/issues/2553 

[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3651 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org