Method: Inspector#inspect_end_touten_conditions

Defined in:
lib/inspector.rb

#inspect_end_touten_conditions(data) ⇒ Object

行末読点の状況を調べる



148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
# File 'lib/inspector.rb', line 148

def inspect_end_touten_conditions(data)
  return if @setting.enable_auto_join_line
  num = 0
  data.scan(/、\n /) do
    num += 1
  end
  if num > 0
    msg = "#{num}個の行末読点を発見しました。"
    if num >= END_TOUTEN_COUNT_THRESHOLD
      msg << "作者による手動改行により改行が多くなっています。" + \
             "setting.ini の enable_auto_join_line を true にすることをお薦めします。"
    end
    info(msg)
  end
end