Sha256: ce35257c00edd4a14b5e1a23803c76d1d9facb179fe3342d810b808b2f72ad93

Contents?: true

Size: 516 Bytes

Versions: 7

Compression:

Stored size: 516 Bytes

Contents

require 'face_control/comment'

module FaceControl
  module Checkers
    class Comments

      def command(filenames)
        "grep -inEH '(todo|fixme)' #{filenames}"
      end

      def parse(command_output)
        command_output.lines.map do |line|
          file, line_num = line.split(":", 3)
          Comment.new(
            file: file,
            line: line_num.to_i,
            text: "Do not bury this task in code. Do it now or create a JIRA issue."
          )
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
face_control-1.0.0 lib/face_control/checkers/comments.rb
face_control-0.9.1 lib/face_control/checkers/comments.rb
face_control-0.8.6 lib/face_control/checkers/comments.rb
face_control-0.9.0 lib/face_control/checkers/comments.rb
face_control-0.8.5 lib/face_control/checkers/comments.rb
face_control-0.8.4 lib/face_control/checkers/comments.rb
face_control-0.8.3 lib/face_control/checkers/comments.rb