Skip to content

Commit

Permalink
Renamed SmellConfig to Sniffer
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinrutherford committed Jun 15, 2009
1 parent 57176ba commit 907c71c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions lib/reek/smells/smells.rb → lib/reek/sniffer.rb
Expand Up @@ -37,7 +37,7 @@ def deep_copy
end

module Reek
class SmellConfig
class Sniffer

SMELL_CLASSES = [
Smells::ControlCouple,
Expand All @@ -53,7 +53,7 @@ class SmellConfig
]

def initialize
defaults_file = File.join(File.dirname(__FILE__), '..', '..', '..', 'config', 'defaults.reek')
defaults_file = File.join(File.dirname(__FILE__), '..', '..', 'config', 'defaults.reek')
@config = YAML.load_file(defaults_file)
end

Expand Down
4 changes: 2 additions & 2 deletions lib/reek/source.rb
@@ -1,6 +1,6 @@
require 'reek/code_parser'
require 'reek/report'
require 'reek/smells/smells'
require 'reek/sniffer'
require 'ruby_parser'

module Reek
Expand Down Expand Up @@ -61,7 +61,7 @@ def self.from_pathlist(paths)
def initialize(code, desc, dir = nil) # :nodoc:
@source = code
@desc = desc
@cf = SmellConfig.new
@cf = Sniffer.new
@cf = @cf.load_local(dir) if dir
end

Expand Down
4 changes: 2 additions & 2 deletions tasks/develop.rake
@@ -1,5 +1,5 @@
require 'rake/clean'
require 'reek/smells/smells'
require 'reek/sniffer'
require 'yaml'

CONFIG_DIR = 'config'
Expand All @@ -11,7 +11,7 @@ directory CONFIG_DIR

file CONFIG_FILE => [CONFIG_DIR] do
config = {}
Reek::SmellConfig::SMELL_CLASSES.each do |klass|
Reek::Sniffer::SMELL_CLASSES.each do |klass|
config[klass.name.split(/::/)[-1]] = klass.default_config
end
$stderr.puts "Creating #{CONFIG_FILE}"
Expand Down

0 comments on commit 907c71c

Please sign in to comment.