Skip to content

Commit

Permalink
Diagnose more possible const variables
Browse files Browse the repository at this point in the history
  • Loading branch information
bbannier committed Dec 11, 2023
1 parent fee8c19 commit 268294b
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 14 deletions.
8 changes: 0 additions & 8 deletions rule-tests/__snapshots__/use-const-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ snapshots:
style: secondary
start: 11
end: 14
- source: b""
style: secondary
start: 11
end: 14
- source: global a = b"";
style: secondary
start: 0
Expand All @@ -30,10 +26,6 @@ snapshots:
style: secondary
start: 11
end: 12
- source: '1'
style: secondary
start: 11
end: 12
- source: global x = 1;
style: secondary
start: 0
Expand Down
1 change: 0 additions & 1 deletion rule-tests/use-const.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
id: use-const
valid:
- "global x: m::X;"
- "global x: m::X = [];"
- "const x = 1;"
invalid:
- "global x = 1;"
Expand Down
5 changes: 0 additions & 5 deletions rules/use-const.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@ rule:
has:
field: "init"
kind: "expression"
any:
- has:
kind: "bytes"
- has:
kind: "integer"

fix: "const"

Expand Down

0 comments on commit 268294b

Please sign in to comment.