timw
(timw)
February 7, 2022, 11:32pm
1
Hi,
Usaged of io.reactivex.rxjava3.core.Observable
in our code base keeps getting picked up as being deprecated.
Eg.
fun getSelectableThings(): Observable<Things> {
return thingsStore.getAvailableThings().flatMapObservable {
Observable.fromIterable(it)
}
}
Sonar is raising a code smell with Observable<Things>
.
Deprecated code should not be used.
Is this a known issue? Is there a way to ignore this issue?
Thank you
1 Like
ganncamp
(G Ann Campbell)
February 8, 2022, 7:43pm
2
Hi,
Welcome to the community!
What version of SonarQube are you seeing this on?
HTH,
Ann
timw
(timw)
February 9, 2022, 7:30am
3
Hello
sonar-scanner-cli-4.6.2.2472
This is what our CI/CD is using. Is this what you mean?
Thanks
Tim
ganncamp
(G Ann Campbell)
February 9, 2022, 12:53pm
4
Hi Tim,
Please go to the SonarQube interface and look at the page footer. You’ll see the SonarQube version there.
Thx,
Ann
timw
(timw)
February 10, 2022, 1:03am
5
@ganncamp
Hi, Sorry I should have clarified that we are using SonarCloud. Is there a way to check the version of SonarQube that SonarCloud is using?
Thank you
Tim
ganncamp
(G Ann Campbell)
February 10, 2022, 1:05pm
6
Hi Tim,
In fact, it’s two separate things now. so just knowing it’s SonarCloud is enough.
Thanks for reporting this. The language experts should be along soon to look at it.
Ann
1 Like
timw
(timw)
February 22, 2022, 11:23pm
7
Hi,
Has there been any updates from the language experts?
Thank you,
Tim
Hey @timw ,
Can you help us narrow down a few details:
Is this a new FP? Is this an FP you only recently observed or has this been there since your first analysis?
Is the issue only raised on kotlin code?
What is the rule reporting the issue? S1874 ? S5738?
Hey @Dorian_Burihabwa Im working with Tim and I want to join the conversation:
Yea it’s something that occurred recently (couple months ago), previously sonar was not raising those code smells.
Yes on Kotlin code
rule code: kotlin:S1874
Hey @Patryk_Springer , thank you for answering these clarifications.
I am having a hard time reproducing the issue. Could you share a self-contained bit of code that reproduces the issue?
In addition, do you know what analysis method you are using on SonarCloud? SonarCloud Automated analysis mode? Gradle-based analysis? Maven-based analysis?
That would help us understand if it is a misconfiguration issue or an actual false-positve.
1 Like