Tencent / TubeMQ

TubeMQ has been donated to the Apache Software Foundation and renamed to InLong, please visit the new Apache repository: https://github.com/apache/incubator-inlong
https://inlong.apache.org/
2.02k stars 391 forks source link

Checkstyle #55

Closed tisonkun closed 4 years ago

tisonkun commented 4 years ago

Thanks for your reviews @yiheng @guangxuCheng . I narrow the pending issues to three below.

  1. ConstantNameCheck.

Generally disabled on private static final so that we narrow the impact to logger. All Logger are now logger and we can always do a reformat if further concern occurs. The problem is that I modify several logger from static final to private static final but I think it is OK because all of them is not and should not be used outside the class.

  1. MethodNameCheck

I have no idea whether changes to method name would impact existing dependencies to TubeMQ. If we all agree that we can rename Subscribe as subscribe and TestXXX/test_xxx as testXxx I will turn on the checker and do a general reformatting.

  1. RedundantModifier

Mostly it is about final in methods of interfaces. An ideal way in my mind is reformatted our method signature as the format below

<return type> methodName(
    T1 arg1,
    T2 arg2,
     ....
    TN arsN
) throws E1, E2 {
  ...
}

But it possibly impacts too much. An alternative is that we exclude METHOD_DEF property. It also makes sense to me.

CC @JunpingDu @gosonzhang

yiheng commented 4 years ago

+1

tisonkun commented 4 years ago

Thanks for your review @yiheng . Formally we send an approved review feedback for an approval.

Waiting for another reviewer @guangxuCheng since this pull request touch a lot of files.

guangxuCheng commented 4 years ago

@TisonKun I think we should add a checker for the licence to ensure that the header of the file contains the licence.

tisonkun commented 4 years ago

@guangxuCheng good point! Implemented by apache-rat-plugin https://github.com/Tencent/TubeMQ/pull/55/commits/2ea61bf768b1df80cc59cd2f73194d65b0ae19c0

guangxuCheng commented 4 years ago

LGTM +1