Skip to content

Commit

Permalink
Add baseline for removal of inline hooks which are not field hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
bbannier committed Oct 1, 2024
1 parent 618e01b commit 1fbca32
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
15 changes: 15 additions & 0 deletions rule-tests/__snapshots__/empty-hook-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,18 @@ snapshots:
style: secondary
start: 8
end: 10
type X = unit { on %done {} };:
fixed: type X = unit { };
labels:
- source: on %done {}
style: primary
start: 16
end: 27
- source: '{}'
style: secondary
start: 25
end: 27
- source: '{}'
style: secondary
start: 25
end: 27
2 changes: 2 additions & 0 deletions rule-tests/empty-hook-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@ id: empty-hook
valid:
- "on X::x {1;}"
- "on X::x {1;2;}"
- "type X = unit { on %done {1;} };"
invalid:
- "on X::x {}"
- "type X = unit { on %done {} };"

0 comments on commit 1fbca32

Please sign in to comment.