Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
nobodywasishere committed Dec 29, 2024
1 parent f7c8969 commit 27f6d46
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/ameba/rule/typing/macro_call_var_type_restriction.cr
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
module Ameba::Rule::Typing
# A rule that enforces variable arguments to certain macros have a type restriction.
#
# For example, these are considered valid:
# For example, these are considered invalid:
#
# ```
# class Greeter
# getter name : String?
# class_getter age : Int32 = 0
# setter tasks : Array(String) = [] of String
# class_setter queue : Array(Int32)?
# property task_mutex : Mutex = Mutex.new
# class_property asdf : String

# getter name
#
# record Task,
# var1 : String,
# var2 : String = "asdf"
# var2 = "asdf"
# end
# ```
#
# And these are considered invalid:
# And these are considered valid:
#
# ```
# class Greeter
# getter name
#
# getter name : String?
# class_getter age : Int32 = 0
# setter tasks : Array(String) = [] of String
# class_setter queue : Array(Int32)?
# property task_mutex : Mutex = Mutex.new
# class_property asdf : String

# record Task,
# var1 : String,
# var2 = "asdf"
# var2 : String = "asdf"
# end
# ```
#
Expand Down

0 comments on commit 27f6d46

Please sign in to comment.