Class: Danger::DangerCheckstyleFormat
- Inherits:
-
Plugin
- Object
- Plugin
- Danger::DangerCheckstyleFormat
- Defined in:
- lib/checkstyle_format/plugin.rb
Overview
Danger plugin for checkstyle formatted xml file.
Defined Under Namespace
Classes: CheckstyleError
Instance Attribute Summary collapse
-
#base_path ⇒ String
Base path of ‘name` attributes in `file` tag.
Instance Method Summary collapse
-
#report(file, inline_mode = true) ⇒ void
Report checkstyle warnings.
Instance Attribute Details
#base_path ⇒ String
Base path of ‘name` attributes in `file` tag. Defaults to nil.
15 16 17 |
# File 'lib/checkstyle_format/plugin.rb', line 15 def base_path @base_path end |
Instance Method Details
#report(file, inline_mode = true) ⇒ void
This method returns an undefined value.
Report checkstyle warnings
20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/checkstyle_format/plugin.rb', line 20 def report(file, inline_mode = true) raise "Please specify file name." if file.empty? raise "No checkstyle file was found at #{file}" unless File.exist? file errors = parse(file) puts errors.size if inline_mode send_inline_comment(errors) else raise "not implemented." # TODO: not implemented. end end |