Class: RuboCop::Formatter::TapFormatter Private
- Inherits:
-
ClangStyleFormatter
- Object
- BaseFormatter
- SimpleTextFormatter
- ClangStyleFormatter
- RuboCop::Formatter::TapFormatter
- Defined in:
- lib/rubocop/formatter/tap_formatter.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
This formatter formats report data using the Test Anything Protocol. TAP allows for to communicate tests results in a language agnostics way.
Constant Summary
Constants inherited from ClangStyleFormatter
Constants inherited from SimpleTextFormatter
SimpleTextFormatter::COLOR_FOR_SEVERITY
Constants included from PathUtil
Instance Attribute Summary
Attributes inherited from BaseFormatter
Instance Method Summary collapse
Methods inherited from ClangStyleFormatter
Methods inherited from SimpleTextFormatter
#finished, #report_file, #report_summary
Methods included from PathUtil
absolute?, glob?, hidden_dir?, hidden_file?, hidden_file_in_not_hidden_dir?, match_path?, maybe_hidden_file?, relative_path, smart_path
Methods included from Colorizable
Methods inherited from BaseFormatter
#file_started, #finished, #initialize
Constructor Details
This class inherits a constructor from RuboCop::Formatter::BaseFormatter
Instance Method Details
#file_finished(file, offenses) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/rubocop/formatter/tap_formatter.rb', line 14 def file_finished(file, offenses) if offenses.empty? output.puts "ok #{@progress_count} - #{smart_path(file)}" else output.puts "not ok #{@progress_count} - #{smart_path(file)}" count_stats(offenses) report_file(file, offenses) end @progress_count += 1 end |
#started(target_files) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
8 9 10 11 12 |
# File 'lib/rubocop/formatter/tap_formatter.rb', line 8 def started(target_files) super @progress_count = 1 output.puts "1..#{target_files.size}" end |