Commit 2a81bafe authored by Coraline Ehmke's avatar Coraline Ehmke

Totally lost

parent 46f8e691
...@@ -6,6 +6,7 @@ may be extracted from a given class. ...@@ -6,6 +6,7 @@ may be extracted from a given class.
## TODO ## TODO
* Report cohorts with line numbers
* Ignore data clumps called in "loose" class methods (e.g. attr_accessor) * Ignore data clumps called in "loose" class methods (e.g. attr_accessor)
* Consider weighting based on match type * Consider weighting based on match type
......
...@@ -5,7 +5,7 @@ module Snuffle ...@@ -5,7 +5,7 @@ module Snuffle
include PoroPlus include PoroPlus
include Ephemeral::Base include Ephemeral::Base
attr_accessor :index, :range, :source attr_accessor :line_number, :range, :content
def self.containing(locs, start_index, end_index) def self.containing(locs, start_index, end_index)
locs.inject([]) do |a, loc| locs.inject([]) do |a, loc|
......
require 'snuffle' require 'snuffle'
def hash_clump
@hash_clump ||= Snuffle::CohortDetector.new(file_parser.hashes)
end
def string_clump
@string_clump ||= Snuffle::CohortDetector.new(file_parser.strings)
end
def source_file def source_file
@source_file ||= Snuffle::SourceFile.new(path_to_file: "spec/fixtures/program_2.rb") @source_file ||= Snuffle::SourceFile.new(path_to_file: "spec/fixtures/program_2.rb")
end end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment