Class: Danger::DangerHtmllint
- Inherits:
-
Plugin
- Object
- Plugin
- Danger::DangerHtmllint
- Defined in:
- lib/htmllint/plugin.rb
Overview
[Danger](danger.systems/ruby/) plugin depends on [htmllint-cli](github.com/htmllint/htmllint-cli/).
Instance Attribute Summary collapse
-
#fail_on_error ⇒ Bool
Set danger fail when errors are detected.
-
#rc_path ⇒ String
.htmllintrc path.
Instance Method Summary collapse
-
#lint ⇒ void
Execute htmllint and send comment.
Instance Attribute Details
#fail_on_error ⇒ Bool
Set danger fail when errors are detected
22 23 24 |
# File 'lib/htmllint/plugin.rb', line 22 def fail_on_error @fail_on_error end |
#rc_path ⇒ String
.htmllintrc path
18 19 20 |
# File 'lib/htmllint/plugin.rb', line 18 def rc_path @rc_path end |
Instance Method Details
#lint ⇒ void
This method returns an undefined value.
Execute htmllint and send comment
26 27 28 29 30 31 |
# File 'lib/htmllint/plugin.rb', line 26 def lint return if target_files.empty? result = run_htmllint(htmllint_bin_path, target_files) send_comment(parse(result)) end |