Does our assumption that todo comments are inlined hold in practice?
Closed this issue · 1 comments
chrisseaton commented
# Check if the comment is associated with the Smart Todo
# @param comment [String] the actual Ruby comment
# @return [true, false]
#
# @example When a comment is associated to a SmartTodo
# TODO(on_date(...), to: '...')
# This is an associated comment
#
# @example When a comment is not associated to a SmartTodo
# TODO(on_date(...), to: '...')
# This is an associated comment (Note the indentation)
Codebases don't seem to always apply this rule, leading to empty todo comments being reported? Should we mention the rule in the message perhaps? Or relax the rule?
Edouard-chin commented
The 2 spaces indentation rule is quite common in other tooling such as yarddoc, so I don't think we should relax it especially since we won't be able to differentiate regular comment from the ones associated to a todo.
I think we should just add a if
statement to post the associated comment on slack if any.