Sha256: d1add3e1c66d6b288fadb192e70bab726b851c831e76cff9d5a82e155ff83ff8

Contents?: true

Size: 416 Bytes

Versions: 1

Compression:

Stored size: 416 Bytes

Contents

module Jekyll
  module PreCommit
    module Checks
      class NoTodos < Check
        def check(staged, not_staged, site, args)
          staged.each do |post|
            if post.to_s.downcase.include? 'todo'
              @result[:ok] = false
              @result[:message] += "A todo was found in #{post.data["title"]}. "
            end
          end

          @result
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
jekyll-pre-commit-0.3.0 lib/jekyll-pre-commit/checks/no_todos.rb