Permalink
Browse files

Revert "Added AbcMetricMethodCheck to default config"

Had a chat to Marty, and the calculation metrics were all
experimental, so leave them out for now.

This reverts commit bb0644d.
  • Loading branch information...
1 parent d9c5484 commit 9cfa006c78efacad0cf4a2bc2cf46632e20f8c22 @evjan evjan committed Nov 26, 2013
Showing with 1 addition and 13 deletions.
  1. +0 −2 README.md
  2. +1 −10 lib/roodi/core/checking_visitor.rb
  3. +0 −1 roodi.yml
View
2 README.md
@@ -61,7 +61,6 @@ Add the following to your Rakefile:
To change the set of checks included, or to change the default values of the checks, you can provide your own config file. The config file is a YAML file that lists the checks to be included. Each check can optionally include a hash of options that are passed to the check to configure it. For example, the default config file looks like this:
- AbcMetricMethodCheck:
AssignmentInConditionalCheck:
CaseMissingElseCheck:
ClassLineCountCheck:
@@ -88,7 +87,6 @@ To change the set of checks included, or to change the default values of the che
## Supported Checks
-* AbcMetricMethodCheck - Check that the number of Assignments, Branches and Conditionals in your code is below the threshold
* AssignmentInConditionalCheck - Check for an assignment inside a conditional. It's probably a mistaken equality comparison.
* CaseMissingElseCheck - Check that case statements have an else statement so that all cases are covered.
* ClassLineCountCheck - Check that the number of lines in a class is below the threshold.
View
11 lib/roodi/core/checking_visitor.rb
@@ -15,19 +15,10 @@ def initialize(*checks)
def visit(node)
checks = @checks[node.node_type]
-
- evaluate_node_start(checks, node)
+ checks.each {|check| check.evaluate_node_start(node)} unless checks.nil?
node.visitable_children.each {|sexp| sexp.accept(self)}
- evaluate_node_end(checks, node)
- end
-
- def evaluate_node_start(checks, node)
- checks.each {|check| check.evaluate_node_start(node)} unless checks.nil?
- end
-
- def evaluate_node_end(checks, node)
checks.each {|check| check.evaluate_node_end(node)} unless checks.nil?
end
end
View
1 roodi.yml
@@ -1,4 +1,3 @@
-AbcMetricMethodCheck:
AssignmentInConditionalCheck:
CaseMissingElseCheck:
ClassLineCountCheck:

0 comments on commit 9cfa006

Please sign in to comment.