Re: Detect unused variables in CI

2021-12-11 Thread Yufei Zhang
Hi, Issue has been created at : https://github.com/apache/pulsar/issues/13244 Cheers, Yufei On Sun, 12 Dec 2021 at 00:45, Yunze Xu wrote: > Looks good. Could you open an issue for it so we can add it later? > > Thanks, > Yunze > > 2021年12月10日 下午8:27,Yufei Zhang 写道: > > > > From what I read it

Re: Detect unused variables in CI

2021-12-11 Thread Yunze Xu
Looks good. Could you open an issue for it so we can add it later? Thanks, Yunze > 2021年12月10日 下午8:27,Yufei Zhang 写道: > > From what I read it can be used in Maven projects. Basically it needs a > SonarScanner (different versions for multiple languages and build tools) > for Maven as in [1]. Then

Re: Detect unused variables in CI

2021-12-10 Thread Yufei Zhang
Hi, >From what I read it can be used in Maven projects. Basically it needs a SonarScanner (different versions for multiple languages and build tools) for Maven as in [1]. Then the scanner forwards the result to SonarQube website for reports. It can be used with code test coverage tools as well.

Re: Detect unused variables in CI

2021-12-10 Thread Yunze Xu
Thanks for the suggestion. I just took a look at https://github.com/SonarSource/sonarqube . It looks like SonarQube can only be applied for Gradle projects? Thanks, Yunze > 2021年12月10日 下午6:11,Yufei Zhang 写道: > > Hi, > > My previous team used SonarQube

Re: Detect unused variables in CI

2021-12-10 Thread Yufei Zhang
Hi, My previous team used SonarQube for detecting such issues. I saw a free version can be used. Also there is sonarlint for local checks which i found useful. Cheers Yufei On Fri, Dec 10, 2021 at 6:08 PM Yunze Xu wrote: > Hi, all > > Recently I found a bug that could be avoided if we have a C

Detect unused variables in CI

2021-12-10 Thread Yunze Xu
Hi, all Recently I found a bug that could be avoided if we have a CI to detect unused variables. See https://github.com/apache/pulsar/pull/13233 . We can see the private field `recycleHandle` was not used before this PR. Generally, we should avoid all