Class: FaceControl::Checkers::CoffeeLint
- Inherits:
-
Object
- Object
- FaceControl::Checkers::CoffeeLint
- Defined in:
- lib/face_control/checkers/coffeelint.rb
Instance Method Summary collapse
Instance Method Details
#command(filenames) ⇒ Object
11 12 13 |
# File 'lib/face_control/checkers/coffeelint.rb', line 11 def command(filenames) "coffeelint --reporter raw #{filenames}" end |
#parse(command_output) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/face_control/checkers/coffeelint.rb', line 15 def parse(command_output) JSON.parse(command_output).map do |file, problems| problems.map do |problem| Comment.new( file: file, line: problem['lineNumber'], text: "(#{problem['level']}) #{problem['message']}" ) end end end |
#relevant_globs ⇒ Object
7 8 9 |
# File 'lib/face_control/checkers/coffeelint.rb', line 7 def relevant_globs %w(*.coffee) end |