lib/rubocop/cop/lint/format_parameter_mismatch.rb in rubocop-1.65.0 vs lib/rubocop/cop/lint/format_parameter_mismatch.rb in rubocop-1.65.1
- old
+ new
@@ -12,28 +12,18 @@
# the same format string.
#
# @example
#
# # bad
- #
# format('A value: %s and another: %i', a_value)
#
- # @example
- #
# # good
- #
# format('A value: %s and another: %i', a_value, another)
#
- # @example
- #
# # bad
- #
# format('Unnumbered format: %s and numbered: %2$s', a_value, another)
#
- # @example
- #
# # good
- #
# format('Numbered format: %1$s and numbered %2$s', a_value, another)
class FormatParameterMismatch < Base
# http://rubular.com/r/CvpbxkcTzy
MSG = "Number of arguments (%<arg_num>i) to `%<method>s` doesn't " \
'match the number of fields (%<field_num>i).'