Can you check if there is a path where the wait is called on the main thread?

Can SonarQube check if there is a path where a wait operation (a process that stops a thread) is called from the main thread?

I would like to know if it can be checked in Kotlin and Swift.

Hi,

Welcome to the community!

These are the wait-related rules in Kotlin, and in Swift.

 
HTH,
Ann

Dear Ann.
Can you use the wait-related rules in Kotlin and Swift to find a wait operation on the main thread that is hidden in a complex sequence of operations? Is it possible to miss it?

Hi,

It sounds like you have specific situations in mind. It would be best to test this directly, perhaps using the SonarQube Cloud Free plan and let us know if we miss anything.

 
Thx,
Ann

Hi there, @yamamoto

If I understand correctly, you would like to know if there is a code path (of any depth) starting from the program’s entry-point where we encounter a wait operation, is that right?

If that is the case, I don’t think we have that kind of rule at this time. If I may ask, what is the specific problem you are chasing with such a rule?

Denis