Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

removed dependency on facets.

preparing for release of 2.0.0
  • Loading branch information...
commit 7bbe18ffe374c57a3ecdd3c51ff55180bae15410 1 parent 48dcebf
@martinjandrews martinjandrews authored
View
8 History.txt
@@ -1,3 +1,11 @@
+= 2.0.0
+
+* Changed internal structure to use a more pure visitor like pattern.
+* Got *much* faster as a result of the change.
+* Design change fixed 'feature' where nested blocks would all get listed if the inner one exceeded complexity.
+* Outline for NPath complexity check is now possible. Not working yet though.
+* Removed dependency on facets library.
+
= 1.4.0
* Upgraded from ParseTree to ruby_parser.
View
4 Manifest.txt
@@ -25,11 +25,12 @@ lib/roodi/checks/method_name_check.rb
lib/roodi/checks/module_line_count_check.rb
lib/roodi/checks/module_name_check.rb
lib/roodi/checks/name_check.rb
+lib/roodi/checks/npath_complexity_check.rb
+lib/roodi/checks/npath_complexity_method_check.rb
lib/roodi/checks/parameter_number_check.rb
lib/roodi/core.rb
lib/roodi/core/checking_visitor.rb
lib/roodi/core/error.rb
-lib/roodi/core/iterator_visitor.rb
lib/roodi/core/parser.rb
lib/roodi/core/runner.rb
lib/roodi/core/visitable_sexp.rb
@@ -50,5 +51,6 @@ spec/roodi/checks/method_line_count_check_spec.rb
spec/roodi/checks/method_name_check_spec.rb
spec/roodi/checks/module_line_count_check_spec.rb
spec/roodi/checks/module_name_check_spec.rb
+spec/roodi/checks/npath_complexity_method_check_spec.rb
spec/roodi/checks/parameter_number_check_spec.rb
spec/spec_helper.rb
View
4 Rakefile
@@ -8,12 +8,12 @@ require 'roodi'
Hoe.new('roodi', Roodi::VERSION) do |p|
p.developer('Marty Andrews', 'marty@cogentconsulting.com.au')
- p.extra_deps = ['ruby_parser', 'facets']
+ p.extra_deps = ['ruby_parser']
p.remote_rdoc_dir = ''
end
def roodi(ruby_files)
- roodi = Roodi::Core::ParseTreeRunner.new
+ roodi = Roodi::Core::Runner.new
ruby_files.each { |file| roodi.check_file(file) }
roodi.errors.each {|error| puts error}
puts "\nFound #{roodi.errors.size} errors."
View
2  lib/roodi.rb
@@ -2,5 +2,5 @@
require 'roodi/core'
module Roodi
- VERSION = '1.4.0'
+ VERSION = '2.0.0'
end
View
11 lib/roodi/core/parser.rb
@@ -1,7 +1,5 @@
require 'rubygems'
require 'ruby_parser'
-require 'facets'
-
module Roodi
module Core
@@ -14,6 +12,15 @@ def parse(content, filename)
private
+ def silence_stream(stream)
+ old_stream = stream.dup
+ stream.reopen(RUBY_PLATFORM =~ /mswin/ ? 'NUL:' : '/dev/null')
+ stream.sync = true
+ yield
+ ensure
+ stream.reopen(old_stream)
+ end
+
def silent_parse(content, filename)
@parser ||= RubyParser.new
@parser.parse(content, filename)
Please sign in to comment.
Something went wrong with that request. Please try again.