diff --git a/lib/format-staged/entry.rb b/lib/format-staged/entry.rb index 3684b7d..4a5962d 100644 --- a/lib/format-staged/entry.rb +++ b/lib/format-staged/entry.rb @@ -1,6 +1,10 @@ # frozen_string_literal: true class FormatStaged + ## + # Entry in the git index. + # + # Data as produced by `git diff-index` class Entry PATTERN = /^ :(?\d+)\s diff --git a/lib/format_staged.rb b/lib/format_staged.rb index 2201c21..bac0ab4 100644 --- a/lib/format_staged.rb +++ b/lib/format_staged.rb @@ -6,6 +6,8 @@ require 'format-staged/entry' require 'format-staged/io' require 'shellwords' +## +# Runs staged changes through a formatting tool class FormatStaged attr_reader :formatter, :patterns, :update, :write, :verbose