I am trying to retreive SonarQube results using Java API's. While I am able to successfully retreive some results, I am facing few challenges as well. I have following 2 problems
Problem 1 : My code is as follows
IssueQuery issueQuery = IssueQuery.create();
issueQuery.severities("MAJOR", "MINOR");
IssueClient issueClient = sonarClient.issueClient();
Issues issues = issueClient.find(issueQuery);
List<Issue> issueList = issues.list();
issues.list() in above code always gives 100 results only. Don't know how to configure this parameter to fetch all results. Can you please let me know how to retrive all issues?
Problem 2 : While above code returns results for all projects. Is there any way I can retrive issues for single project? I tried the following code but it does not seem to be working.
IssueQuery issueQuery = IssueQuery.create();
issueQuery.issues(projKey1, projKey2);
IssueClient issueClient = sonarClient.issueClient();
Issues issues = issueClient.find(issueQuery);
List<Issue> issueList = issues.list();
System.out.println("No of issues = "+issueList.size());
issueList.size() is returning value 0 Can you please tell me how can I acheive this?
I searched a lot on internet but could not find any help? Could you please help me n this regard? Thanks in advance.