Class: GherkinLint::InvalidFileName
- Defined in:
- lib/gherkin_lint/linter/invalid_file_name.rb
Overview
service class to lint for invalid file names
Instance Attribute Summary
Attributes inherited from Linter
Instance Method Summary collapse
Methods inherited from Linter
#add_error, #add_warning, #backgrounds, #elements, #features, #files, #filled_scenarios, #filter_tag, #gather_tags, #initialize, #line, #lint_files, #name, #reference, #render_step, #render_step_argument, #scenarios, #steps, #suppress, #suppress_tags, #tag?
Constructor Details
This class inherits a constructor from GherkinLint::Linter
Instance Method Details
#lint ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/gherkin_lint/linter/invalid_file_name.rb', line 6 def lint files do |file| base = File.basename file next unless base != base.downcase || base =~ /[ -]/ references = [reference(file)] add_error(references, 'Feature files should be snake_cased') end end |