mirror of
https://gitea.invidious.io/iv-org/shard-ameba.git
synced 2024-08-15 00:53:29 +00:00
Refactor AST::Util#literal?
helper
This commit is contained in:
parent
cc687d0281
commit
2fb37da80f
4 changed files with 48 additions and 39 deletions
|
@ -13,10 +13,10 @@ module Ameba::Rule::Lint
|
|||
CRYSTAL
|
||||
end
|
||||
|
||||
it "reports if there is a regex comparison possibly evaluating to the same" do
|
||||
it "reports if there is a dynamic comparison possibly evaluating to the same" do
|
||||
expect_issue subject, <<-CRYSTAL
|
||||
/foo/ === "foo"
|
||||
# ^^^^^^^^^^^^^ error: Comparison most likely evaluates to the same
|
||||
[foo] === ["foo"]
|
||||
# ^^^^^^^^^^^^^^^ error: Comparison most likely evaluates to the same
|
||||
CRYSTAL
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue