diff options
author | Daniel Schwarz <daniel.schwarz@sonarsource.com> | 2017-11-24 09:25:26 +0100 |
---|---|---|
committer | Daniel Schwarz <bartfastiel@users.noreply.github.com> | 2017-11-29 20:24:11 +0100 |
commit | 082ace5471dcc5b5b5f4d1c3cfaf82ddfae0df36 (patch) | |
tree | f4b53691a76f3f6600264333b03acc025891c351 /sonar-ws-generator/src | |
parent | 636c9ebb8b0ef6da08e376a0cdafbc27aa722421 (diff) | |
download | sonarqube-082ace5471dcc5b5b5f4d1c3cfaf82ddfae0df36.tar.gz sonarqube-082ace5471dcc5b5b5f4d1c3cfaf82ddfae0df36.zip |
Copy generated sonar-ws sources to sonar-ws-generated, automatically
Diffstat (limited to 'sonar-ws-generator/src')
-rw-r--r-- | sonar-ws-generator/src/main/java/org/sonarqube/wsgenerator/CodeFormatter.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sonar-ws-generator/src/main/java/org/sonarqube/wsgenerator/CodeFormatter.java b/sonar-ws-generator/src/main/java/org/sonarqube/wsgenerator/CodeFormatter.java index 1d062a2f9aa..aebeabf2323 100644 --- a/sonar-ws-generator/src/main/java/org/sonarqube/wsgenerator/CodeFormatter.java +++ b/sonar-ws-generator/src/main/java/org/sonarqube/wsgenerator/CodeFormatter.java @@ -30,7 +30,6 @@ import java.io.InputStream; import java.io.InputStreamReader; import java.io.StringWriter; import java.io.Writer; -import java.util.Arrays; import java.util.HashSet; import java.util.Properties; import java.util.Set; @@ -39,12 +38,11 @@ import org.apache.velocity.VelocityContext; import org.apache.velocity.app.VelocityEngine; import static java.nio.charset.StandardCharsets.UTF_8; +import static java.util.Arrays.asList; public class CodeFormatter { - private static final Set<String> PATH_EXCLUSIONS = new HashSet<>(Arrays.asList( - "api/components", "api/issues", "api/measures", "api/organizations", "api/permissions", "api/projects", - "api/project_analyses", "api/qualityprofiles", "api/rules", "api/settings", "api/users", "api/user_groups")); + private static final Set<String> PATH_EXCLUSIONS = new HashSet<>(asList("api/orchestrator")); public static void format(String json) { JsonObject jsonElement = new Gson().fromJson(json, JsonObject.class); @@ -57,6 +55,7 @@ public class CodeFormatter { String webServicePath = webService.get("path").getAsString(); if (PATH_EXCLUSIONS.contains(webServicePath)) { + System.out.println("Excluding WS " + webServicePath + " from code generation"); continue; } |