-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: supports import local file in kcl-vet (#1290)
* feat: supports import local file in kcl-vet Signed-off-by: zongz <[email protected]> * fix: fix bug Signed-off-by: zongz <[email protected]> * fix: make fmt Signed-off-by: zongz <[email protected]> * fix: fix test case Signed-off-by: zongz <[email protected]> --------- Signed-off-by: zongz <[email protected]>
- Loading branch information
Showing
16 changed files
with
118 additions
and
27 deletions.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
kclvm/tools/src/vet/test_datas/invalid_vet_cases_json/dep/kcl.mod
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,5 @@ | ||
[package] | ||
name = "dep" | ||
edition = "v0.8.0" | ||
version = "0.0.1" | ||
|
2 changes: 2 additions & 0 deletions
2
kclvm/tools/src/vet/test_datas/invalid_vet_cases_json/dep/main.k
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,2 @@ | ||
schema A : | ||
name: str |
4 changes: 4 additions & 0 deletions
4
kclvm/tools/src/vet/test_datas/invalid_vet_cases_json/with_import.k
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,4 @@ | ||
import .dep as dep | ||
|
||
schema B: | ||
a: dep.A |
3 changes: 3 additions & 0 deletions
3
kclvm/tools/src/vet/test_datas/invalid_vet_cases_json/with_import.k.json
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 @@ | ||
{ | ||
"a": 1 | ||
} |
5 changes: 5 additions & 0 deletions
5
kclvm/tools/src/vet/test_datas/invalid_vet_cases_yaml/dep/kcl.mod
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,5 @@ | ||
[package] | ||
name = "dep" | ||
edition = "v0.8.0" | ||
version = "0.0.1" | ||
|
2 changes: 2 additions & 0 deletions
2
kclvm/tools/src/vet/test_datas/invalid_vet_cases_yaml/dep/main.k
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,2 @@ | ||
schema A : | ||
name: str |
4 changes: 4 additions & 0 deletions
4
kclvm/tools/src/vet/test_datas/invalid_vet_cases_yaml/with_import.k
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,4 @@ | ||
import .dep as dep | ||
|
||
schema B: | ||
a: dep.A |
1 change: 1 addition & 0 deletions
1
kclvm/tools/src/vet/test_datas/invalid_vet_cases_yaml/with_import.k.stderr.json
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 @@ | ||
a: 1 |
1 change: 1 addition & 0 deletions
1
kclvm/tools/src/vet/test_datas/invalid_vet_cases_yaml/with_import.k.yaml
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 @@ | ||
a: 1 |
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,5 @@ | ||
[package] | ||
name = "dep" | ||
edition = "v0.8.0" | ||
version = "0.0.1" | ||
|
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,2 @@ | ||
schema A : | ||
name: str |
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,4 @@ | ||
import .dep as dep | ||
|
||
schema B: | ||
a: dep.A |
5 changes: 5 additions & 0 deletions
5
kclvm/tools/src/vet/test_datas/validate_cases/with_import.k.json
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,5 @@ | ||
{ | ||
"a": { | ||
"name": "name" | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
kclvm/tools/src/vet/test_datas/validate_cases/with_import.k.yaml
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,2 @@ | ||
a: | ||
name: name |
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
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