Skip to content

Commit

Permalink
Update ballerina-cli tests for new diagnostics
Browse files Browse the repository at this point in the history
  • Loading branch information
RadCod3 committed Mar 5, 2024
1 parent 6c5edf1 commit 9cc9ef1
Show file tree
Hide file tree
Showing 19 changed files with 38 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ private static String diagnosticToString(Diagnostic diagnostic, boolean colorEna
String color = SEVERITY_COLORS.get(severity);
String message = diagnostic.toString().substring(severityString.length());
String code = diagnostic.diagnosticInfo().code();
String formatString = getColoredString("%s", color, colorEnabled) + "%s (%s)";
boolean isMultiline = diagnostic.message().contains("\n");
String formatString = getColoredString("%s", color, colorEnabled) + "%s" + (isMultiline ? "\n(%s)" : " (%s)");

return String.format(formatString, severityString, message, code);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Compiling source
hello_world.bal
WARNING [:(1:1,1:1)] Skipped adding the generated source file with prefix "dummyfunc". Source file generation is not supported with standalone bal files
WARNING [:(1:1,1:1)] Skipped adding the generated source file with prefix "dummyfunc". Source file generation is not supported with standalone bal files (BCE5401)

Generating executable
<ABSOLUTE_JAR_PATH>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Compiling source
hello_world.bal
WARNING [:(1:1,1:1)] Skipped adding the generated source file with prefix "dummyfunc". Source file generation is not supported with standalone bal files
WARNING [:(1:1,1:1)] Skipped adding the generated source file with prefix "dummyfunc". Source file generation is not supported with standalone bal files (BCE5401)

Generating executable
bar.jar
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Compiling source
hello_world.bal
WARNING [:(1:1,1:1)] Skipped adding the generated source file with prefix "dummyfunc". Source file generation is not supported with standalone bal files
WARNING [:(1:1,1:1)] Skipped adding the generated source file with prefix "dummyfunc". Source file generation is not supported with standalone bal files (BCE5401)

Generating executable
foo.jar
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Compiling source
hello_world.bal
WARNING [:(1:1,1:1)] Skipped adding the generated source file with prefix "dummyfunc". Source file generation is not supported with standalone bal files
WARNING [:(1:1,1:1)] Skipped adding the generated source file with prefix "dummyfunc". Source file generation is not supported with standalone bal files (BCE5401)

Generating executable
hello_world.jar
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Compiling source
hello_world.bal
WARNING [:(1:1,1:1)] Skipped adding the generated source file with prefix "dummyfunc". Source file generation is not supported with standalone bal files
WARNING [:(1:1,1:1)] Skipped adding the generated source file with prefix "dummyfunc". Source file generation is not supported with standalone bal files (BCE5401)

Generating executable
hello_world.jar
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ WARNING [Ballerina.toml:(1:1,1:1)] missing table '[package]' in 'Ballerina.toml'
org = "john"
name = "validProjectWithEmptyBallerinaToml"
version = "0.1.0"
(BCE5001)

Generating executable
target/bin/validProjectWithEmptyBallerinaToml.jar
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
Compiling source
hello_world.bal
WARNING [:(1:1,1:1)] Skipped adding the generated source file with prefix "dummyfunc". Source file generation is not supported with standalone bal files
ERROR [hello_world.bal:(2:3,2:4)] invalid token ';'
WARNING [:(1:1,1:1)] Skipped adding the generated source file with prefix "dummyfunc". Source file generation is not supported with standalone bal files (BCE5401)
ERROR [hello_world.bal:(2:3,2:4)] invalid token ';' (BCE0600)
|
2 | };;
| ^

Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Compiling source
foo/winery:0.1.0
ERROR [hello_world.bal:(2:3,2:4)] invalid token ';'
ERROR [hello_world.bal:(2:3,2:4)] invalid token ';' (BCE0600)
|
2 | };;
| ^

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Compiling source
hello_world.bal
WARNING [:(1:1,1:1)] Skipped adding the generated source file with prefix "dummyfunc". Source file generation is not supported with standalone bal files
WARNING [:(1:1,1:1)] Skipped adding the generated source file with prefix "dummyfunc". Source file generation is not supported with standalone bal files (BCE5401)

Generating executable
hello_world.jar
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Compiling source
hello_world.bal
WARNING [:(1:1,1:1)] Skipped adding the generated source file with prefix "dummyfunc". Source file generation is not supported with standalone bal files
WARNING [:(1:1,1:1)] Skipped adding the generated source file with prefix "dummyfunc". Source file generation is not supported with standalone bal files (BCE5401)

Generating executable
<ABSOLUTE_JAR_PATH>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Compiling source
hello_world.bal
WARNING [:(1:1,1:1)] Skipped adding the generated source file with prefix "dummyfunc". Source file generation is not supported with standalone bal files
WARNING [:(1:1,1:1)] Skipped adding the generated source file with prefix "dummyfunc". Source file generation is not supported with standalone bal files (BCE5401)

Generating executable
bar.jar
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Compiling source
hello_world.bal
WARNING [:(1:1,1:1)] Skipped adding the generated source file with prefix "dummyfunc". Source file generation is not supported with standalone bal files
WARNING [:(1:1,1:1)] Skipped adding the generated source file with prefix "dummyfunc". Source file generation is not supported with standalone bal files (BCE5401)

Generating executable
foo.jar
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Compiling source
hello_world.bal
WARNING [:(1:1,1:1)] Skipped adding the generated source file with prefix "dummyfunc". Source file generation is not supported with standalone bal files
WARNING [:(1:1,1:1)] Skipped adding the generated source file with prefix "dummyfunc". Source file generation is not supported with standalone bal files (BCE5401)

Generating executable
hello_world.jar
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Compiling source
hello_world.bal
WARNING [:(1:1,1:1)] Skipped adding the generated source file with prefix "dummyfunc". Source file generation is not supported with standalone bal files
WARNING [:(1:1,1:1)] Skipped adding the generated source file with prefix "dummyfunc". Source file generation is not supported with standalone bal files (BCE5401)

Generating executable
hello_world.jar
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ WARNING [Ballerina.toml:(1:1,1:1)] missing table '[package]' in 'Ballerina.toml'
org = "john"
name = "validProjectWithEmptyBallerinaToml"
version = "0.1.0"
(BCE5001)

Generating executable
target\bin\validProjectWithEmptyBallerinaToml.jar
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
Compiling source
hello_world.bal
WARNING [:(1:1,1:1)] Skipped adding the generated source file with prefix "dummyfunc". Source file generation is not supported with standalone bal files
ERROR [hello_world.bal:(2:3,2:4)] invalid token ';'
WARNING [:(1:1,1:1)] Skipped adding the generated source file with prefix "dummyfunc". Source file generation is not supported with standalone bal files (BCE5401)
ERROR [hello_world.bal:(2:3,2:4)] invalid token ';' (BCE0600)
|
2 | };;
| ^

Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Compiling source
foo/winery:0.1.0
ERROR [hello_world.bal:(2:3,2:4)] invalid token ';'
ERROR [hello_world.bal:(2:3,2:4)] invalid token ';' (BCE0600)
|
2 | };;
| ^

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Compiling source
hello_world.bal
WARNING [:(1:1,1:1)] Skipped adding the generated source file with prefix "dummyfunc". Source file generation is not supported with standalone bal files
WARNING [:(1:1,1:1)] Skipped adding the generated source file with prefix "dummyfunc". Source file generation is not supported with standalone bal files (BCE5401)

Generating executable
hello_world.jar
Expand Down

0 comments on commit 9cc9ef1

Please sign in to comment.