-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove id
from paths to instances in style warnings
#306
base: master
Are you sure you want to change the base?
Conversation
It is. I recently extended the The tests you're fixing here were added in kaitai-io/kaitai_struct_tests@c911e0a to demonstrate kaitai-io/kaitai_struct#920. So ideally you should add |
Fixes kaitai-io/kaitai_struct#920 Error count: 62 -> 58 (-4). Fixed: [info] - style_bad_len_inst_pos *** FAILED *** [info] [style_bad_len_inst_pos.ksy: /instances/size_of_foo/id: [info] warning: use `len_foo` instead of `size_of_foo`, given that it's only used as a byte size of `foo` (see https://doc.kaitai.io/ksy_style_guide.html#attr-id) [info] ] [info] did not equal [info] [style_bad_len_inst_pos.ksy: /instances/size_of_foo: [info] warning: use `len_foo` instead of `size_of_foo`, given that it's only used as a byte size of `foo` (see https://doc.kaitai.io/ksy_style_guide.html#attr-id) [info] ] (SimpleMatchers.scala:34) [info] - style_bad_len_inst_value *** FAILED *** [info] [style_bad_len_inst_value.ksy: /instances/size_of_foo/id: [info] warning: use `len_foo` instead of `size_of_foo`, given that it's only used as a byte size of `foo` (see https://doc.kaitai.io/ksy_style_guide.html#attr-id) [info] ] [info] did not equal [info] [style_bad_len_inst_value.ksy: /instances/size_of_foo: [info] warning: use `len_foo` instead of `size_of_foo`, given that it's only used as a byte size of `foo` (see https://doc.kaitai.io/ksy_style_guide.html#attr-id) [info] ] (SimpleMatchers.scala:34) [info] - style_bad_num_inst_pos *** FAILED *** [info] [style_bad_num_inst_pos.ksy: /instances/size_of_foo/id: [info] warning: use `num_foos` instead of `size_of_foo`, given that it's only used as repeat count of `foos` (see https://doc.kaitai.io/ksy_style_guide.html#attr-id) [info] ] [info] did not equal [info] [style_bad_num_inst_pos.ksy: /instances/size_of_foo: [info] warning: use `num_foos` instead of `size_of_foo`, given that it's only used as repeat count of `foos` (see https://doc.kaitai.io/ksy_style_guide.html#attr-id) [info] ] (SimpleMatchers.scala:34) [info] - style_bad_num_inst_value *** FAILED *** [info] [style_bad_num_inst_value.ksy: /instances/size_of_foo/id: [info] warning: use `num_foos` instead of `size_of_foo`, given that it's only used as repeat count of `foos` (see https://doc.kaitai.io/ksy_style_guide.html#attr-id) [info] ] [info] did not equal [info] [style_bad_num_inst_value.ksy: /instances/size_of_foo: [info] warning: use `num_foos` instead of `size_of_foo`, given that it's only used as repeat count of `foos` (see https://doc.kaitai.io/ksy_style_guide.html#attr-id) [info] ] (SimpleMatchers.scala:34)
…TH" errors Error count: 58 -> 51 (-7). Fixed: [info] - id_clash_params_vs_inst_pos *** FAILED *** [info] [id_clash_params_vs_inst_pos.ksy: /instances/foo: [info] error: duplicate attribute ID 'foo', previously defined at /params/0 [info] ] [info] did not equal [info] [id_clash_params_vs_inst_pos.ksy: /instances/foo: [info] error: duplicate attribute ID 'foo', previously defined at /params/0/id [info] ] (SimpleMatchers.scala:34) [info] - id_clash_params_vs_inst_value *** FAILED *** [info] [id_clash_params_vs_inst_value.ksy: /instances/bar: [info] error: duplicate attribute ID 'bar', previously defined at /params/1 [info] ] [info] did not equal [info] [id_clash_params_vs_inst_value.ksy: /instances/bar: [info] error: duplicate attribute ID 'bar', previously defined at /params/1/id [info] ] (SimpleMatchers.scala:34) [info] - id_clash_params_vs_seq *** FAILED *** [info] [id_clash_params_vs_seq.ksy: /seq/0: [info] error: duplicate attribute ID 'foo', previously defined at /params/1 [info] ] [info] did not equal [info] [id_clash_params_vs_seq.ksy: /seq/0/id: [info] error: duplicate attribute ID 'foo', previously defined at /params/1/id [info] ] (SimpleMatchers.scala:34) [info] - id_clash_seq_vs_inst_pos *** FAILED *** [info] [id_clash_seq_vs_inst_pos.ksy: /instances/foo: [info] error: duplicate attribute ID 'foo', previously defined at /seq/0 [info] ] [info] did not equal [info] [id_clash_seq_vs_inst_pos.ksy: /instances/foo: [info] error: duplicate attribute ID 'foo', previously defined at /seq/0/id [info] ] (SimpleMatchers.scala:34) [info] - id_clash_seq_vs_inst_value *** FAILED *** [info] [id_clash_seq_vs_inst_value.ksy: /instances/bar: [info] error: duplicate attribute ID 'bar', previously defined at /seq/1 [info] ] [info] did not equal [info] [id_clash_seq_vs_inst_value.ksy: /instances/bar: [info] error: duplicate attribute ID 'bar', previously defined at /seq/1/id [info] ] (SimpleMatchers.scala:34) [info] - id_dup_params *** FAILED *** [info] [id_dup_params.ksy: /params/2: [info] error: duplicate attribute ID 'foo', previously defined at /params/0 [info] ] [info] did not equal [info] [id_dup_params.ksy: /params/2/id: [info] error: duplicate attribute ID 'foo', previously defined at /params/0/id [info] ] (SimpleMatchers.scala:34) [info] - id_dup_seq *** FAILED *** [info] [id_dup_seq.ksy: /seq/2: [info] error: duplicate attribute ID 'foo', previously defined at /seq/0 [info] ] [info] did not equal [info] [id_dup_seq.ksy: /seq/2/id: [info] error: duplicate attribute ID 'foo', previously defined at /seq/0/id [info] ] (SimpleMatchers.scala:34)
…t you have $KS_VERSION" error Errors count: 51 -> 50 (-1). Fixed: [info] - meta_high_version *** FAILED *** [info] [meta_high_version.ksy: /meta: [info] error: this ksy requires compiler version at least 99.99.99, but you have $KS_VERSION [info] ] [info] did not equal [info] [meta_high_version.ksy: /meta/ks-version: [info] error: this ksy requires compiler version at least 99.99.99, but you have $KS_VERSION [info] ] (SimpleMatchers.scala:34)
533c134
to
4ed5981
Compare
Error count: 50 -> 49 (-1). Fixed: [info] - type_unknown_switch *** FAILED *** [info] [type_unknown_switch.ksy: /seq/0/type/cases/IntNum(42)/type: [info] error: unable to find type 'some_unknown_name', searching from type_unknown_switch [info] ] [info] did not equal [info] [type_unknown_switch.ksy: /seq/0/type/cases/IntNum(42): [info] error: unable to find type 'some_unknown_name', searching from type_unknown_switch [info] ] (SimpleMatchers.scala:34)
@generalmimon, could you look again? This PR fixes 13 errors |
It seems relatively new error, but the code was not changed since 2021...
Fixes errors like:
/instances/size_of_foo/id
is not-existing path. Instances does not haveid
, the name of instance is itsid
.Fixes kaitai-io/kaitai_struct#920.
Also fixes a couple of other errors