Skip to content

Commit

Permalink
Flag full print statement for print-in-prod
Browse files Browse the repository at this point in the history
  • Loading branch information
bbannier committed Feb 7, 2024
1 parent a1fdd76 commit 4326f83
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions rule-tests/__snapshots__/print-in-prod-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,30 @@ id: print-in-prod
snapshots:
on A::%done { if (True) print 1; }:
labels:
- source: print
- source: print 1;
style: primary
start: 24
end: 29
end: 32
- source: on A::%done { if (True) print 1; }
style: secondary
start: 0
end: 34
on A::%done { print 1; }:
labels:
- source: print
- source: print 1;
style: primary
start: 14
end: 19
end: 22
- source: on A::%done { print 1; }
style: secondary
start: 0
end: 24
'type X = unit { x: uint8 { print $$; }};':
labels:
- source: print
- source: print $$;
style: primary
start: 27
end: 32
end: 36
- source: 'x: uint8 { print $$; }'
style: secondary
start: 16
Expand Down
2 changes: 1 addition & 1 deletion rules/print-in-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ severity: warning
language: spicy

rule:
pattern: "print"
kind: "print"
inside:
any:
- kind: "hook_decl"
Expand Down

0 comments on commit 4326f83

Please sign in to comment.