-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
formats_err: add
style_bad_{len,num}_{inst_{pos,value}}
Demonstrates kaitai-io/kaitai_struct#920
- Loading branch information
1 parent
55ca397
commit c911e0a
Showing
6 changed files
with
54 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# style_bad_len_inst_pos.ksy: /instances/size_of_foo: | ||
# 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) | ||
# | ||
meta: | ||
id: style_bad_len_inst_pos | ||
seq: | ||
- id: foo | ||
size: size_of_foo | ||
instances: | ||
size_of_foo: | ||
pos: 4 | ||
type: u1 |
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,11 @@ | ||
# style_bad_len_inst_value.ksy: /instances/size_of_foo: | ||
# 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) | ||
# | ||
meta: | ||
id: style_bad_len_inst_value | ||
seq: | ||
- id: foo | ||
size: size_of_foo | ||
instances: | ||
size_of_foo: | ||
value: 4 |
4 changes: 2 additions & 2 deletions
4
formats_err/style_bad_len.ksy → formats_err/style_bad_len_seq.ksy
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# style_bad_num_inst_pos.ksy: /instances/size_of_foo: | ||
# 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) | ||
# | ||
meta: | ||
id: style_bad_num_inst_pos | ||
seq: | ||
- id: foos | ||
type: u1 | ||
repeat: expr | ||
repeat-expr: size_of_foo | ||
instances: | ||
size_of_foo: | ||
pos: 4 | ||
type: u1 |
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,13 @@ | ||
# style_bad_num_inst_value.ksy: /instances/size_of_foo: | ||
# 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) | ||
# | ||
meta: | ||
id: style_bad_num_inst_value | ||
seq: | ||
- id: foos | ||
type: u1 | ||
repeat: expr | ||
repeat-expr: size_of_foo | ||
instances: | ||
size_of_foo: | ||
value: 4 |
4 changes: 2 additions & 2 deletions
4
formats_err/style_bad_num.ksy → formats_err/style_bad_num_seq.ksy
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