We recently added the sonar cloud to our organization. We can see it works fine for the public repo, It adds the PR comment.
However, It doesn’t work that way for the private repo. It always succeeds. I can see that github check is triggered and processed by sonarcloud. However It doesn’t mark check as failed even it doesn’t pass the quality gate (have * for matching branches). It also doesn’t add a comment on PRs.
What could be the problem? I can see the failed scan result on the sonarcloud.com.
Here is a sample task that should fail the check (but it was succeeded);
There is also this error which I think is irrelevant;
WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by net.sf.cglib.core.ReflectUtils$1 (file:/root/.sonar/cache/a89f1943fc75b65becd9fb4ecab8d913/sonar-tsql-plugin.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte,int,int,java.security.ProtectionDomain) WARNING: Please consider reporting this to the maintainers of net.sf.cglib.core.ReflectUtils$1 WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release