Class: Yard::Lint::Validators::Documentation::EmptyCommentLine::MessagesBuilder
- Inherits:
-
Object
- Object
- Yard::Lint::Validators::Documentation::EmptyCommentLine::MessagesBuilder
- Defined in:
- lib/yard/lint/validators/documentation/empty_comment_line/messages_builder.rb
Overview
Builds human-readable messages for empty comment line violations
Constant Summary collapse
- ERROR_DESCRIPTIONS =
Maps violation types to human-readable descriptions
{ 'leading' => 'Empty leading comment line in documentation', 'trailing' => 'Empty trailing comment line in documentation' }.freeze
Class Method Summary collapse
-
.call(offense) ⇒ String
Formats a violation message.
Class Method Details
.call(offense) ⇒ String
Formats a violation message
20 21 22 23 24 25 26 27 |
# File 'lib/yard/lint/validators/documentation/empty_comment_line/messages_builder.rb', line 20 def call(offense) type = offense[:violation_type] object_name = offense[:object_name] description = ERROR_DESCRIPTIONS[type] || 'Empty comment line in documentation' "#{description} for '#{object_name}'" end |