Skip to content

Commit

Permalink
formats_err: add style_bad_{len,num}_{inst_{pos,value}}
Browse files Browse the repository at this point in the history
  • Loading branch information
generalmimon committed Aug 29, 2024
1 parent 55ca397 commit c911e0a
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 4 deletions.
12 changes: 12 additions & 0 deletions formats_err/style_bad_len_inst_pos.ksy
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
11 changes: 11 additions & 0 deletions formats_err/style_bad_len_inst_value.ksy
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
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# style_bad_len.ksy: /seq/0/id:
# style_bad_len_seq.ksy: /seq/0/id:
# 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
id: style_bad_len_seq
seq:
- id: size_of_foo
type: u1
Expand Down
14 changes: 14 additions & 0 deletions formats_err/style_bad_num_inst_pos.ksy
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
13 changes: 13 additions & 0 deletions formats_err/style_bad_num_inst_value.ksy
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
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# style_bad_num.ksy: /seq/0/id:
# style_bad_num_seq.ksy: /seq/0/id:
# 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
id: style_bad_num_seq
seq:
- id: size_of_foo
type: u1
Expand Down

0 comments on commit c911e0a

Please sign in to comment.