Sha256: 0491ab62505d4ebc09e41d5cda14d2ed4a6fff74bb07959156c96d7c81b6aa6a

Contents?: true

Size: 613 Bytes

Versions: 19

Compression:

Stored size: 613 Bytes

Contents

#!/usr/bin/env ruby

require 'tins/go'
include Tins::GO
require 'utils'
require 'term/ansicolor'

$opts = go 'm:h'

if $opts[?h]
  puts <<~USAGE
    #{File.basename($0)} [OPTIONS] [FILES]
  USAGE
  exit
end
max = ($opts[?m] || 80).to_i

files = ARGV

for file in files
  File.open(file) do |f|
    for line  in f
      size = line.size
      if size > max
        lineno = f.lineno + 1
        blamer = Utils::LineBlamer.new(file, lineno) or next
        blame = blamer.perform or next
        author = blame[/\((.*?)\d{4}/, 1]
        puts [ author, size, "#{file}:#{lineno}" ] * ?\t
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
utils-0.59.1 bin/long_lines
utils-0.59.0 bin/long_lines
utils-0.58.0 bin/long_lines
utils-0.57.1 bin/long_lines
utils-0.57.0 bin/long_lines
utils-0.56.1 bin/long_lines
utils-0.56.0 bin/long_lines
utils-0.55.0 bin/long_lines
utils-0.54.1 bin/long_lines
utils-0.54.0 bin/long_lines
utils-0.53.1 bin/long_lines
utils-0.53.0 bin/long_lines
utils-0.52.1 bin/long_lines
utils-0.52.0 bin/long_lines
utils-0.51.1 bin/long_lines
utils-0.51.0 bin/long_lines
utils-0.50.0 bin/long_lines
utils-0.49.1 bin/long_lines
utils-0.49.0 bin/long_lines