Fix errors when scanning METADATA.bzl#4207
Fix errors when scanning METADATA.bzl#4207vasily-pozdnyakov wants to merge 2 commits intoaboutcode-org:developfrom
Conversation
There was a problem hiding this comment.
Thanks a lot for detecting this and providing the fix @vasily-pozdnyakov we seem to have missed this when we moved to a different package assembly process and model here.
We were only testing the package data parsing here, but not the package assembly here (which is where assign_package_to_resources is called) hence the miss.
Do you mind also adding a test similarly like
def test_end2end_scan_can_detect_bazel(self):
test_file = self.get_test_loc('metadatabzl/new-format/METADATA.bzl')
expected_file = self.get_test_loc('metadatabzl/new-format/metadatabzl-expected.json')
result_file = self.get_temp_file('results.json')
run_scan_click(['--package', test_file, '--json-pp', result_file])
check_json_scan(expected_file, result_file, regen=REGEN_TEST_FIXTURES)
You also have to create the test file at tests/packagedcode/data/build/metadatabzl/new-format/metadatabzl-expected.json and regen this newly added test to populate this.
Signed-off-by: Vasily Pozdnyakov <vasily.pozdnyakov@tngtech.com>
30b3167 to
bddc5a1
Compare
|
@AyanSinhaMahapatra |
|
@AyanSinhaMahapatra how can we move this forward? |
|
another one to please take a look at again @AyanSinhaMahapatra |
Fixes #4206
Tasks
Run tests locally to check for errors.