Class: CucumberLint::TableLinter
- Defined in:
- lib/cucumber_lint/linter/table_linter.rb
Overview
A linter for a series of table rows (as parsed by Gherkin)
Instance Method Summary collapse
-
#initialize(rows:, config:, linted_file:) ⇒ TableLinter
constructor
A new instance of TableLinter.
- #lint ⇒ Object
Methods inherited from Linter
Constructor Details
#initialize(rows:, config:, linted_file:) ⇒ TableLinter
Returns a new instance of TableLinter.
9 10 11 12 13 14 |
# File 'lib/cucumber_lint/linter/table_linter.rb', line 9 def initialize rows:, config:, linted_file: super config: config, linted_file: linted_file @rows = rows @header_style = @config.consistent_table_headers.enforced_style.to_sym end |
Instance Method Details
#lint ⇒ Object
17 18 19 20 |
# File 'lib/cucumber_lint/linter/table_linter.rb', line 17 def lint inconsistent_table_whitespace unless actual_table_lines == expected_table_lines inconsistent_table_headers if inconsistent_table_headers? end |