-
Notifications
You must be signed in to change notification settings - Fork 735
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check org, name for null before package resolving
- Loading branch information
1 parent
71a014e
commit 8d3e8b1
Showing
6 changed files
with
63 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
...s/test-resources/command-outputs/unix/build-bal-project-with-invalid-dependency-array.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Compiling source | ||
foo/winery:0.1.0 | ||
ERROR [Ballerina.toml:(7:7,7:19)] invalid 'org' under [[dependency]]: 'org' can only contain alphanumerics and underscores | ||
ERROR [Ballerina.toml:(8:8,8:15)] invalid 'name' under [[dependency]]: 'name' can only contain alphanumerics, underscores and periods | ||
ERROR [Ballerina.toml:(9:11,9:19)] invalid 'version' under [[dependency]]: 'version' should be compatible with semver | ||
ERROR [Ballerina.toml:(12:1,16:21)] 'name' under [[dependency]] is missing | ||
ERROR [Ballerina.toml:(12:1,16:21)] 'org' under [[dependency]] is missing | ||
ERROR [Ballerina.toml:(12:1,16:21)] 'version' under [[dependency]] is missing | ||
ERROR [Ballerina.toml:(13:1,13:19)] key 'org1' not supported in schema 'dependency' | ||
ERROR [Ballerina.toml:(14:1,14:15)] key 'name2' not supported in schema 'dependency' | ||
ERROR [Ballerina.toml:(15:1,15:19)] key 'version3' not supported in schema 'dependency' | ||
ERROR [main.bal:(2:13,2:20)] incompatible types: expected 'int', found 'string' |
12 changes: 12 additions & 0 deletions
12
...est-resources/command-outputs/windows/build-bal-project-with-invalid-dependency-array.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Compiling source | ||
foo/winery:0.1.0 | ||
ERROR [Ballerina.toml:(7:7,7:19)] invalid 'org' under [[dependency]]: 'org' can only contain alphanumerics and underscores | ||
ERROR [Ballerina.toml:(8:8,8:15)] invalid 'name' under [[dependency]]: 'name' can only contain alphanumerics, underscores and periods | ||
ERROR [Ballerina.toml:(9:11,9:19)] invalid 'version' under [[dependency]]: 'version' should be compatible with semver | ||
ERROR [Ballerina.toml:(12:1,16:21)] 'name' under [[dependency]] is missing | ||
ERROR [Ballerina.toml:(12:1,16:21)] 'org' under [[dependency]] is missing | ||
ERROR [Ballerina.toml:(12:1,16:21)] 'version' under [[dependency]] is missing | ||
ERROR [Ballerina.toml:(13:1,13:19)] key 'org1' not supported in schema 'dependency' | ||
ERROR [Ballerina.toml:(14:1,14:15)] key 'name2' not supported in schema 'dependency' | ||
ERROR [Ballerina.toml:(15:1,15:19)] key 'version3' not supported in schema 'dependency' | ||
ERROR [main.bal:(2:13,2:20)] incompatible types: expected 'int', found 'string' |
16 changes: 16 additions & 0 deletions
16
...ina-cli/src/test/resources/test-resources/invalid-dependency-array-project/Ballerina.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[package] | ||
org = "foo" | ||
name = "winery" | ||
version = "0.1.0" | ||
|
||
[[dependency]] | ||
org = "ballerina#" | ||
name = "dat$a" | ||
version = "0.1.0r" | ||
repository = "local" | ||
|
||
[[dependency]] | ||
org1 = "ballerina" | ||
name2 = "data" | ||
version3 = "0.1.0" | ||
repository = "maven" |
3 changes: 3 additions & 0 deletions
3
...ballerina-cli/src/test/resources/test-resources/invalid-dependency-array-project/main.bal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
public function main() { | ||
int x = "hello"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters