Class: Yamlint::Rules::Commas
- Defined in:
- lib/yamlint/rules/commas.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from LineRule
Methods inherited from Base
#check, defaults, desc, inherited, #initialize, rule_id
Constructor Details
This class inherits a constructor from Yamlint::Rules::Base
Instance Method Details
#check_line(line, line_number, _context) ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'lib/yamlint/rules/commas.rb', line 15 def check_line(line, line_number, _context) return if line.strip.empty? return if line.strip.start_with?('#') problems = [] problems.concat(check_spaces_before_comma(line, line_number)) problems.concat(check_spaces_after_comma(line, line_number)) problems end |
#fixable? ⇒ Boolean
25 26 27 |
# File 'lib/yamlint/rules/commas.rb', line 25 def fixable? true end |