Add comments to macros

This commit is contained in:
Sijawusz Pur Rahnama 2023-06-08 14:03:35 +02:00
parent 94e31d4685
commit b156a6a6a1
2 changed files with 2 additions and 0 deletions

View file

@ -240,6 +240,7 @@ class Ameba::Config
# :nodoc: # :nodoc:
module RuleConfig module RuleConfig
# Define rule properties
macro properties(&block) macro properties(&block)
{% definitions = [] of NamedTuple %} {% definitions = [] of NamedTuple %}
{% if block.body.is_a? Assign %} {% if block.body.is_a? Assign %}

View file

@ -112,6 +112,7 @@ module Ameba::Rule
name.hash name.hash
end end
# Adds an issue to the *source*
macro issue_for(*args, **kwargs, &block) macro issue_for(*args, **kwargs, &block)
source.add_issue(self, {{ *args }}, {{ **kwargs }}) {{ block }} source.add_issue(self, {{ *args }}, {{ **kwargs }}) {{ block }}
end end