我正在尝试使用sonar-ws-client将声纳问题导出到Excel中。它的出口成功。但是它导出的是不同的项目,而不是我的项目。我想导出特定的项目。
String login = "admin";
String password = "admin";
SonarClient client = SonarClient.create("http://localhost:9000");
client.builder().login(login);
client.builder().password(password);
IssueQuery query = IssueQuery.create();
query.severities("CRITICAL", "MAJOR", "MINOR");
IssueClient issueClient = client.issueClient();
Issues issues = issueClient.find(query);
List<Issue> issueList = issues.list();
createExcel(issueList);
private static void createExcel(List<Issue> issueList) {
...
}
答案 0 :(得分:0)
通过添加项目名称解决,如下所示
enum e_type {e_foo,e_bar};
#define do_foobar(e,...) (e)?bar(__VA_ARGS__):foo(__VA_ARGS__)