mirror of
https://gitea.invidious.io/iv-org/shard-ameba.git
synced 2024-08-15 00:53:29 +00:00
Use square brackets for %w
and %i
array literals
This commit is contained in:
parent
06dc201344
commit
10b577d23a
27 changed files with 101 additions and 99 deletions
|
@ -44,7 +44,7 @@ module Ameba::Rule::Style
|
|||
context "properties" do
|
||||
it "#filter_names" do
|
||||
rule = IsAFilter.new
|
||||
rule.filter_names = %w(select)
|
||||
rule.filter_names = %w[select]
|
||||
|
||||
expect_no_issues rule, <<-CRYSTAL
|
||||
[1, 2, nil].reject(&.nil?)
|
||||
|
|
|
@ -4,7 +4,7 @@ module Ameba::Rule::Style
|
|||
subject = ParenthesesAroundCondition.new
|
||||
|
||||
describe ParenthesesAroundCondition do
|
||||
{% for keyword in %w(if unless while until) %}
|
||||
{% for keyword in %w[if unless while until] %}
|
||||
context "{{ keyword.id }}" do
|
||||
it "reports if redundant parentheses are found" do
|
||||
source = expect_issue subject, <<-CRYSTAL, keyword: {{ keyword }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue