KhaninArtur commented on a change in pull request #16683:
URL: https://github.com/apache/beam/pull/16683#discussion_r801576485
##########
File path: playground/backend/internal/preparers/java_preparers.go
##########
@@ -103,10 +138,38 @@ func GetJavaPreparers(builder *PreparersBuilder,
isUnitTest bool, isKata bool) {
if isKata {
builder.JavaPreparers().
WithPublicClassRemover().
- WithPackageRemover()
+ WithPackageRemover().
+ WithGraphHandler()
}
}
+// findPipelineObjectName finds name of pipeline in JAVA code when pipeline
creates
+func findPipelineObjectName(filepath string) (string, error) {
+ reg := regexp.MustCompile(pipelineNamePattern)
+ b, err := ioutil.ReadFile(filepath)
+ if err != nil {
+ return "", err
+ }
+ matches := reg.FindStringSubmatch(string(b))
+ if len(matches) > 0 {
+ return matches[1], nil
+ } else {
+ return "", nil
+ }
+
+}
+
+func findImports(filepath string) ([]string, error) {
+ reg := regexp.MustCompile(findImportsPattern)
+ b, err := ioutil.ReadFile(filepath)
+ if err != nil {
+ return nil, err
+ }
+ imports := reg.FindAllString(string(b), -1)
+
+ return imports, nil
+}
Review comment:
Please, delete this function and tests for it as we discussed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]