lib/pdd/rule/duplicates.rb in pdd-0.20.7 vs lib/pdd/rule/duplicates.rb in pdd-0.20.8
- old
+ new
@@ -33,9 +33,10 @@
@xml
.xpath('//puzzle')
.group_by { |p| p.xpath('body/text()').to_s }
.map do |_, puzzles|
next nil if puzzles.count <= @max
+
"there are #{puzzles.count} duplicate(s) of the same puzzle: " +
puzzles.map do |p|
"#{p.xpath('file/text()')}:#{p.xpath('lines/text()')}"
end.join(', ') +
", while maximum #{@max} duplicate is allowed"