Class: Cane::StyleCheck
- Inherits:
-
Struct
- Object
- Struct
- Cane::StyleCheck
- Defined in:
- lib/cane/style_check.rb
Overview
Creates violations for files that do not meet style conventions. Only highly obvious, probable, and non-controversial checks are performed here. It is not the goal of the tool to provide an extensive style report, but only to prevent studid mistakes.
Instance Attribute Summary collapse
-
#opts ⇒ Object
Returns the value of attribute opts.
Instance Method Summary collapse
Instance Attribute Details
#opts ⇒ Object
Returns the value of attribute opts
9 10 11 |
# File 'lib/cane/style_check.rb', line 9 def opts @opts end |
Instance Method Details
#violations ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/cane/style_check.rb', line 10 def violations file_list.map do |file_path| map_lines(file_path) do |line, line_number| violations_for_line(line.chomp).map do || StyleViolation.new(file_path, line_number + 1, ) end end end.flatten end |