mirror of
https://gitea.invidious.io/iv-org/shard-ameba.git
synced 2024-08-15 00:53:29 +00:00
Readability-related refactors
This commit is contained in:
parent
a6ebb48f14
commit
e668ba5bf5
24 changed files with 89 additions and 61 deletions
|
@ -211,11 +211,13 @@ module Ameba::Rule::Lint
|
|||
end
|
||||
|
||||
def bar
|
||||
{{@type.instance_vars.map do |ivar|
|
||||
{{
|
||||
@type.instance_vars.map do |ivar|
|
||||
ivar.annotations(Name).each do |ann|
|
||||
puts ann.args
|
||||
end
|
||||
end}}
|
||||
end
|
||||
}}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -218,11 +218,11 @@ module Ameba::Rule::Lint
|
|||
s = Source.new %(
|
||||
record X do
|
||||
macro foo(a, b)
|
||||
{{a}} + {{b}}
|
||||
{{ a }} + {{ b }}
|
||||
end
|
||||
|
||||
macro bar(a, b, c)
|
||||
{{a}} + {{b}} + {{c}}
|
||||
{{ a }} + {{ b }} + {{ c }}
|
||||
end
|
||||
end
|
||||
)
|
||||
|
|
|
@ -949,7 +949,7 @@ module Ameba::Rule::Lint
|
|||
foo = 22
|
||||
|
||||
{% for x in %w(foo) %}
|
||||
add({{x.id}})
|
||||
add({{ x.id }})
|
||||
{% end %}
|
||||
)
|
||||
subject.catch(s).should be_valid
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue