Skip to content

Commit

Permalink
Revert "Added AbcMetricMethodCheck to default config"
Browse files Browse the repository at this point in the history
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
evjan committed Nov 26, 2013
1 parent d9c5484 commit 9cfa006
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 13 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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.
Expand Down
11 changes: 1 addition & 10 deletions lib/roodi/core/checking_visitor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion roodi.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
AbcMetricMethodCheck:
AssignmentInConditionalCheck:
CaseMissingElseCheck:
ClassLineCountCheck:
Expand Down

0 comments on commit 9cfa006

Please sign in to comment.