metric_fu-roodi 2.2.2 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. checksums.yaml +7 -0
  2. data/bin/metric_fu-roodi +2 -19
  3. data/bin/metric_fu-roodi-describe +2 -5
  4. data/lib/roodi.rb +6 -2
  5. data/lib/roodi/version.rb +1 -1
  6. metadata +13 -119
  7. data/.gitignore +0 -3
  8. data/.rspec +0 -2
  9. data/Gemfile +0 -6
  10. data/History.txt +0 -111
  11. data/Manifest.txt +0 -56
  12. data/README.txt +0 -98
  13. data/Rakefile +0 -31
  14. data/TODO.md +0 -3
  15. data/lib/roodi/checks.rb +0 -18
  16. data/lib/roodi/checks/abc_metric_method_check.rb +0 -79
  17. data/lib/roodi/checks/assignment_in_conditional_check.rb +0 -32
  18. data/lib/roodi/checks/case_missing_else_check.rb +0 -20
  19. data/lib/roodi/checks/check.rb +0 -76
  20. data/lib/roodi/checks/class_line_count_check.rb +0 -28
  21. data/lib/roodi/checks/class_name_check.rb +0 -31
  22. data/lib/roodi/checks/class_variable_check.rb +0 -24
  23. data/lib/roodi/checks/control_coupling_check.rb +0 -20
  24. data/lib/roodi/checks/cyclomatic_complexity_block_check.rb +0 -41
  25. data/lib/roodi/checks/cyclomatic_complexity_check.rb +0 -50
  26. data/lib/roodi/checks/cyclomatic_complexity_method_check.rb +0 -42
  27. data/lib/roodi/checks/empty_rescue_body_check.rb +0 -32
  28. data/lib/roodi/checks/for_loop_check.rb +0 -20
  29. data/lib/roodi/checks/line_count_check.rb +0 -28
  30. data/lib/roodi/checks/method_line_count_check.rb +0 -29
  31. data/lib/roodi/checks/method_name_check.rb +0 -31
  32. data/lib/roodi/checks/missing_foreign_key_index_check.rb +0 -99
  33. data/lib/roodi/checks/module_line_count_check.rb +0 -28
  34. data/lib/roodi/checks/module_name_check.rb +0 -31
  35. data/lib/roodi/checks/name_check.rb +0 -16
  36. data/lib/roodi/checks/npath_complexity_check.rb +0 -75
  37. data/lib/roodi/checks/npath_complexity_method_check.rb +0 -29
  38. data/lib/roodi/checks/parameter_number_check.rb +0 -34
  39. data/lib/roodi/core.rb +0 -1
  40. data/lib/roodi/core/checking_visitor.rb +0 -26
  41. data/lib/roodi/core/error.rb +0 -17
  42. data/lib/roodi/core/parser.rb +0 -48
  43. data/lib/roodi/core/runner.rb +0 -81
  44. data/lib/roodi/core/visitable_sexp.rb +0 -25
  45. data/lib/roodi_task.rb +0 -35
  46. data/roodi.gemspec +0 -26
  47. data/roodi.yml +0 -25
  48. data/spec/roodi/checks/abc_metric_method_check_spec.rb +0 -89
  49. data/spec/roodi/checks/assignment_in_conditional_check_spec.rb +0 -105
  50. data/spec/roodi/checks/case_missing_else_check_spec.rb +0 -32
  51. data/spec/roodi/checks/class_line_count_check_spec.rb +0 -39
  52. data/spec/roodi/checks/class_name_check_spec.rb +0 -39
  53. data/spec/roodi/checks/class_variable_check_spec.rb +0 -17
  54. data/spec/roodi/checks/control_coupling_check_spec.rb +0 -23
  55. data/spec/roodi/checks/cyclomatic_complexity_block_check_spec.rb +0 -67
  56. data/spec/roodi/checks/cyclomatic_complexity_method_check_spec.rb +0 -200
  57. data/spec/roodi/checks/empty_rescue_body_check_spec.rb +0 -154
  58. data/spec/roodi/checks/for_loop_check_spec.rb +0 -18
  59. data/spec/roodi/checks/method_line_count_check_spec.rb +0 -56
  60. data/spec/roodi/checks/method_name_check_spec.rb +0 -76
  61. data/spec/roodi/checks/missing_foreign_key_index_check_spec.rb +0 -33
  62. data/spec/roodi/checks/module_line_count_check_spec.rb +0 -39
  63. data/spec/roodi/checks/module_name_check_spec.rb +0 -27
  64. data/spec/roodi/checks/npath_complexity_method_check_spec.rb +0 -53
  65. data/spec/roodi/checks/parameter_number_check_spec.rb +0 -47
  66. data/spec/roodi/core/runner_spec.rb +0 -25
  67. data/spec/roodi/roodi.yml +0 -2
  68. data/spec/spec_helper.rb +0 -3
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: b5344f19f7786db31e93ab7ea24b9798c44dfffa
4
+ data.tar.gz: 26191fa997ffa434f8c1dd3670d65fe2dc90b2b8
5
+ SHA512:
6
+ metadata.gz: c8145e3169ea4ca0dddfe7544761b3bf2ed65f66dbace0eb0acc5685420a9bac88ede2f083dcc49bf48dd5fb3070714dc2a0db642d46067a092e48bef5529471
7
+ data.tar.gz: ef8a7b18e6fc7938b02cd91ed07334ab3a12dee58fa7f50fa854fffd798ba443327775cc14223063bce4d17e1dc6bb912bc0bf408e8fb539304294c9c61a9fe5
@@ -1,21 +1,4 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- $LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + "/../lib"))
4
-
5
- require 'roodi'
6
-
7
- runner = Roodi::Core::Runner.new
8
-
9
- config_param = ARGV.detect {|arg| arg =~ /-config=.*/}
10
- runner.config = config_param.split("=")[1] if config_param
11
- ARGV.delete config_param
12
-
13
- ARGV.each do |arg|
14
- Dir.glob(arg).each { |file| runner.check_file(file) }
15
- end
16
-
17
- runner.errors.each {|error| puts error}
18
-
19
- puts "\nFound #{runner.errors.size} errors."
20
-
21
- exit runner.errors.size
3
+ require "roodi"
4
+ STDERR.puts Roodi.message
@@ -1,7 +1,4 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- $LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + "/../lib"))
4
- require 'roodi'
5
-
6
- roodi = Roodi::Core::Runner.new
7
- roodi.print_file(ARGV[0])
3
+ require "roodi"
4
+ STDERR.puts Roodi.message
@@ -1,3 +1,7 @@
1
- require 'roodi/checks'
2
- require 'roodi/core'
3
1
  require 'roodi/version'
2
+
3
+ module Roodi
4
+ def self.message
5
+ "Please install roodi. It is now being maintained. And gem uninstall metric_fu-roodi. Thanks :)"
6
+ end
7
+ end
@@ -1,3 +1,3 @@
1
1
  module Roodi
2
- VERSION = '2.2.2'
2
+ VERSION = '3.0.0'
3
3
  end
metadata CHANGED
@@ -1,32 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metric_fu-roodi
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.2
5
- prerelease:
4
+ version: 3.0.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Marty Andrews
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-08-02 00:00:00.000000000 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
15
- name: ruby_parser
16
- requirement: !ruby/object:Gem::Requirement
17
- none: false
18
- requirements:
19
- - - ! '>='
20
- - !ruby/object:Gem::Version
21
- version: '0'
22
- type: :runtime
23
- prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
27
- - - ! '>='
28
- - !ruby/object:Gem::Version
29
- version: '0'
11
+ date: 2013-09-17 00:00:00.000000000 Z
12
+ dependencies: []
30
13
  description: Roodi stands for Ruby Object Oriented Design Inferometer
31
14
  email: marty@cogent.co
32
15
  executables:
@@ -35,122 +18,33 @@ executables:
35
18
  extensions: []
36
19
  extra_rdoc_files: []
37
20
  files:
38
- - .gitignore
39
- - .rspec
40
- - Gemfile
41
- - History.txt
42
- - Manifest.txt
43
- - README.txt
44
- - Rakefile
45
- - TODO.md
46
- - bin/metric_fu-roodi
47
- - bin/metric_fu-roodi-describe
48
21
  - lib/roodi.rb
49
- - lib/roodi/checks.rb
50
- - lib/roodi/checks/abc_metric_method_check.rb
51
- - lib/roodi/checks/assignment_in_conditional_check.rb
52
- - lib/roodi/checks/case_missing_else_check.rb
53
- - lib/roodi/checks/check.rb
54
- - lib/roodi/checks/class_line_count_check.rb
55
- - lib/roodi/checks/class_name_check.rb
56
- - lib/roodi/checks/class_variable_check.rb
57
- - lib/roodi/checks/control_coupling_check.rb
58
- - lib/roodi/checks/cyclomatic_complexity_block_check.rb
59
- - lib/roodi/checks/cyclomatic_complexity_check.rb
60
- - lib/roodi/checks/cyclomatic_complexity_method_check.rb
61
- - lib/roodi/checks/empty_rescue_body_check.rb
62
- - lib/roodi/checks/for_loop_check.rb
63
- - lib/roodi/checks/line_count_check.rb
64
- - lib/roodi/checks/method_line_count_check.rb
65
- - lib/roodi/checks/method_name_check.rb
66
- - lib/roodi/checks/missing_foreign_key_index_check.rb
67
- - lib/roodi/checks/module_line_count_check.rb
68
- - lib/roodi/checks/module_name_check.rb
69
- - lib/roodi/checks/name_check.rb
70
- - lib/roodi/checks/npath_complexity_check.rb
71
- - lib/roodi/checks/npath_complexity_method_check.rb
72
- - lib/roodi/checks/parameter_number_check.rb
73
- - lib/roodi/core.rb
74
- - lib/roodi/core/checking_visitor.rb
75
- - lib/roodi/core/error.rb
76
- - lib/roodi/core/parser.rb
77
- - lib/roodi/core/runner.rb
78
- - lib/roodi/core/visitable_sexp.rb
79
22
  - lib/roodi/version.rb
80
- - lib/roodi_task.rb
81
- - roodi.gemspec
82
- - roodi.yml
83
- - spec/roodi/checks/abc_metric_method_check_spec.rb
84
- - spec/roodi/checks/assignment_in_conditional_check_spec.rb
85
- - spec/roodi/checks/case_missing_else_check_spec.rb
86
- - spec/roodi/checks/class_line_count_check_spec.rb
87
- - spec/roodi/checks/class_name_check_spec.rb
88
- - spec/roodi/checks/class_variable_check_spec.rb
89
- - spec/roodi/checks/control_coupling_check_spec.rb
90
- - spec/roodi/checks/cyclomatic_complexity_block_check_spec.rb
91
- - spec/roodi/checks/cyclomatic_complexity_method_check_spec.rb
92
- - spec/roodi/checks/empty_rescue_body_check_spec.rb
93
- - spec/roodi/checks/for_loop_check_spec.rb
94
- - spec/roodi/checks/method_line_count_check_spec.rb
95
- - spec/roodi/checks/method_name_check_spec.rb
96
- - spec/roodi/checks/missing_foreign_key_index_check_spec.rb
97
- - spec/roodi/checks/module_line_count_check_spec.rb
98
- - spec/roodi/checks/module_name_check_spec.rb
99
- - spec/roodi/checks/npath_complexity_method_check_spec.rb
100
- - spec/roodi/checks/parameter_number_check_spec.rb
101
- - spec/roodi/core/runner_spec.rb
102
- - spec/roodi/roodi.yml
103
- - spec/spec_helper.rb
23
+ - bin/metric_fu-roodi
24
+ - bin/metric_fu-roodi-describe
104
25
  homepage: http://github.com/metricfu/roodi
105
26
  licenses:
106
27
  - MIT
107
- post_install_message:
28
+ metadata: {}
29
+ post_install_message: Please install roodi. It is now being maintained. And gem uninstall
30
+ metric_fu-roodi. Thanks :)
108
31
  rdoc_options: []
109
32
  require_paths:
110
33
  - lib
111
34
  required_ruby_version: !ruby/object:Gem::Requirement
112
- none: false
113
35
  requirements:
114
- - - ! '>='
36
+ - - '>='
115
37
  - !ruby/object:Gem::Version
116
38
  version: '0'
117
- segments:
118
- - 0
119
- hash: -3420305304026942047
120
39
  required_rubygems_version: !ruby/object:Gem::Requirement
121
- none: false
122
40
  requirements:
123
- - - ! '>='
41
+ - - '>='
124
42
  - !ruby/object:Gem::Version
125
43
  version: '0'
126
- segments:
127
- - 0
128
- hash: -3420305304026942047
129
44
  requirements: []
130
45
  rubyforge_project:
131
- rubygems_version: 1.8.25
46
+ rubygems_version: 2.0.3
132
47
  signing_key:
133
- specification_version: 3
48
+ specification_version: 4
134
49
  summary: Roodi stands for Ruby Object Oriented Design Inferometer
135
- test_files:
136
- - spec/roodi/checks/abc_metric_method_check_spec.rb
137
- - spec/roodi/checks/assignment_in_conditional_check_spec.rb
138
- - spec/roodi/checks/case_missing_else_check_spec.rb
139
- - spec/roodi/checks/class_line_count_check_spec.rb
140
- - spec/roodi/checks/class_name_check_spec.rb
141
- - spec/roodi/checks/class_variable_check_spec.rb
142
- - spec/roodi/checks/control_coupling_check_spec.rb
143
- - spec/roodi/checks/cyclomatic_complexity_block_check_spec.rb
144
- - spec/roodi/checks/cyclomatic_complexity_method_check_spec.rb
145
- - spec/roodi/checks/empty_rescue_body_check_spec.rb
146
- - spec/roodi/checks/for_loop_check_spec.rb
147
- - spec/roodi/checks/method_line_count_check_spec.rb
148
- - spec/roodi/checks/method_name_check_spec.rb
149
- - spec/roodi/checks/missing_foreign_key_index_check_spec.rb
150
- - spec/roodi/checks/module_line_count_check_spec.rb
151
- - spec/roodi/checks/module_name_check_spec.rb
152
- - spec/roodi/checks/npath_complexity_method_check_spec.rb
153
- - spec/roodi/checks/parameter_number_check_spec.rb
154
- - spec/roodi/core/runner_spec.rb
155
- - spec/roodi/roodi.yml
156
- - spec/spec_helper.rb
50
+ test_files: []
data/.gitignore DELETED
@@ -1,3 +0,0 @@
1
- doc
2
- pkg
3
- Gemfile.lock
data/.rspec DELETED
@@ -1,2 +0,0 @@
1
- --color
2
- --format progress
data/Gemfile DELETED
@@ -1,6 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gemspec
4
-
5
- gem "rake"
6
- gem "rspec", "~> 2.11.0"
@@ -1,111 +0,0 @@
1
- = Master
2
-
3
- Features
4
- Fixes
5
- Misc
6
-
7
- = 2.2.2
8
-
9
- Fixes
10
- * Better check if OS is windows (#2 Martin Gotink)
11
- * Accept 'next' in a rescue block (#1 Virgil Mihailovici)
12
-
13
- = 2.2.1
14
-
15
- Fixes
16
- * Rescue line count when there are no lines
17
-
18
- = 2.2.0
19
-
20
- * Pull down updates from https://github.com/zdennis/roodi that includes updates from https://github.com/hooroo/roodi and https://github.com/aselder/roodi re: pull request https://github.com/martinjandrews/roodi/pull/12 https://github.com/martinjandrews/roodi/pull/11
21
- * Did not pull in updates from https://github.com/ssassi/roodi/commits/master re: https://github.com/martinjandrews/roodi/pull/10
22
- * Release under gem name metric_fu-roodi
23
-
24
- = 2.0.1
25
-
26
- * Fixed a bug where roodi.yml was not being loaded. Patch supplied by Rob Mitchell.
27
-
28
- = 2.0.0
29
-
30
- * Changed internal structure to use a more pure visitor like pattern.
31
- * Got *much* faster as a result of the change.
32
- * Design change fixed 'feature' where nested blocks would all get listed if the inner one exceeded complexity.
33
- * Outline for NPath complexity check is now possible. Not working yet though.
34
- * Removed dependency on facets library.
35
-
36
- = 1.4.0
37
-
38
- * Upgraded from ParseTree to ruby_parser.
39
-
40
- = 1.3.7
41
-
42
- * Fixed a bug in the rake task where it always failed even if no errors existed.
43
-
44
- = 1.3.6
45
-
46
- * Added nil as a valid response for an empty rescue block
47
-
48
- = 1.3.5
49
-
50
- * Fixed bug in rake task
51
-
52
- = 1.3.4
53
-
54
- * Minor cleanup
55
-
56
- = 1.3.3
57
-
58
- * Added a rake task
59
-
60
- = 1.3.1
61
-
62
- * wrapped errors in an object to become more usable as an API.
63
-
64
- = 1.3.0
65
-
66
- * added case missing else check.
67
- * updated checks to take a hash of options with built-in defaults.
68
- * added support for complete configuration via external file.
69
- * added support for passing in a custom config file via 'roodi -config=<filename> [pattern]'
70
- * added assignment in conditional check.
71
- * refactored checks to remove duplicate code.
72
-
73
- = 1.2.0
74
-
75
- * added module name check.
76
- * added parameter number check.
77
- * added module line count check.
78
- * added class line count check.
79
-
80
- = 1.1.1
81
-
82
- * I'd initially published to Rubyforge under a 1.0.0 gem, and I've since tried to retrospectively fix up the version number system. It turns out that Rubyforge caches old gems permanently, so I have to re-start at a larger number again.
83
- * class name check no longer gets confused about scoped class names like Module::Classname.
84
-
85
- = 0.5
86
-
87
- * expanded regex matching for method name check.
88
- * suppressed noisy output from ParseTree using facets API.
89
- * updated dependencies and version as a result of facets change.
90
- * made Roodi tolerant of being asked to parse files which aren't really Ruby files.
91
- * updated the documentation with usage examples.
92
-
93
- = 0.4
94
-
95
- * Added support back in for line numbers in error messages.
96
- * Re-enabled MethodLineCountCheck as part of the default check set.
97
-
98
- = 0.3
99
-
100
- * First version of Roodi to be published to Rubyforge.
101
-
102
- = 0.2
103
-
104
- * Now use ParseTree instead of JRuby, which makes the tool much more accessible.
105
- * Removed MagicNumberCheck
106
- * Line numbers no longer supported as a result of the move.
107
-
108
- = 0.1
109
-
110
- * A first version of a design checking tool for Ruby, with a few checks built in to get started.
111
-
@@ -1,56 +0,0 @@
1
- History.txt
2
- Manifest.txt
3
- README.txt
4
- Rakefile
5
- bin/roodi
6
- bin/roodi-describe
7
- lib/roodi.rb
8
- lib/roodi/checks.rb
9
- lib/roodi/checks/abc_metric_method_check.rb
10
- lib/roodi/checks/assignment_in_conditional_check.rb
11
- lib/roodi/checks/case_missing_else_check.rb
12
- lib/roodi/checks/check.rb
13
- lib/roodi/checks/class_line_count_check.rb
14
- lib/roodi/checks/class_name_check.rb
15
- lib/roodi/checks/class_variable_check.rb
16
- lib/roodi/checks/control_coupling_check.rb
17
- lib/roodi/checks/cyclomatic_complexity_block_check.rb
18
- lib/roodi/checks/cyclomatic_complexity_check.rb
19
- lib/roodi/checks/cyclomatic_complexity_method_check.rb
20
- lib/roodi/checks/empty_rescue_body_check.rb
21
- lib/roodi/checks/for_loop_check.rb
22
- lib/roodi/checks/line_count_check.rb
23
- lib/roodi/checks/method_line_count_check.rb
24
- lib/roodi/checks/method_name_check.rb
25
- lib/roodi/checks/module_line_count_check.rb
26
- lib/roodi/checks/module_name_check.rb
27
- lib/roodi/checks/name_check.rb
28
- lib/roodi/checks/npath_complexity_check.rb
29
- lib/roodi/checks/npath_complexity_method_check.rb
30
- lib/roodi/checks/parameter_number_check.rb
31
- lib/roodi/core.rb
32
- lib/roodi/core/checking_visitor.rb
33
- lib/roodi/core/error.rb
34
- lib/roodi/core/parser.rb
35
- lib/roodi/core/runner.rb
36
- lib/roodi/core/visitable_sexp.rb
37
- lib/roodi_task.rb
38
- roodi.yml
39
- spec/roodi/checks/abc_metric_method_check_spec.rb
40
- spec/roodi/checks/assignment_in_conditional_check_spec.rb
41
- spec/roodi/checks/case_missing_else_check_spec.rb
42
- spec/roodi/checks/class_line_count_check_spec.rb
43
- spec/roodi/checks/class_name_check_spec.rb
44
- spec/roodi/checks/class_variable_check_spec.rb
45
- spec/roodi/checks/control_coupling_check_spec.rb
46
- spec/roodi/checks/cyclomatic_complexity_block_check_spec.rb
47
- spec/roodi/checks/cyclomatic_complexity_method_check_spec.rb
48
- spec/roodi/checks/empty_rescue_body_check_spec.rb
49
- spec/roodi/checks/for_loop_check_spec.rb
50
- spec/roodi/checks/method_line_count_check_spec.rb
51
- spec/roodi/checks/method_name_check_spec.rb
52
- spec/roodi/checks/module_line_count_check_spec.rb
53
- spec/roodi/checks/module_name_check_spec.rb
54
- spec/roodi/checks/npath_complexity_method_check_spec.rb
55
- spec/roodi/checks/parameter_number_check_spec.rb
56
- spec/spec_helper.rb
data/README.txt DELETED
@@ -1,98 +0,0 @@
1
- = roodi
2
-
3
- * http://roodi.rubyforge.org
4
-
5
- == DESCRIPTION:
6
-
7
- Roodi stands for Ruby Object Oriented Design Inferometer. It parses your Ruby code and warns you about design issues you have based on the checks that is has configured.
8
-
9
- This is a fork for use with metric_fu that includes 1.9 compatibility and continued development
10
-
11
- == INSTALL:
12
-
13
- * gem install roodi
14
-
15
- == SYNOPSIS:
16
-
17
- To check one or more files using the default configuration that comes with Roodi, use:
18
- metric_fu-roodi [-config=file] [pattern ...]
19
-
20
- === EXAMPLE USAGE
21
-
22
- Check all ruby files in a rails app:
23
- metric_fu-roodi "rails_app/**/*.rb"
24
-
25
- Check one controller and one model file in a rails app:
26
- metric_fu-roodi app/controller/sample_controller.rb app/models/sample.rb
27
-
28
- Check one controller and all model files in a rails app:
29
- metric_fu-roodi app/controller/sample_controller.rb "app/models/*.rb"
30
-
31
- Check all ruby files in a rails app with a custom configuration file:
32
- metric_fu-roodi -config=my_roodi_config.yml "rails_app/**/*.rb"
33
-
34
- If you're writing a check, it is useful to see the structure of a file the way that Roodi tokenizes it (via ruby_parser). Use:
35
- metric_fu-roodi-describe [filename]
36
-
37
- == CUSTOM CONFIGURATION
38
-
39
- 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:
40
-
41
- AssignmentInConditionalCheck: { }
42
- CaseMissingElseCheck: { }
43
- ClassLineCountCheck: { line_count: 300 }
44
- ClassNameCheck: { pattern: !ruby/regexp /^[A-Z][a-zA-Z0-9]*$/ }
45
- CyclomaticComplexityBlockCheck: { complexity: 4 }
46
- CyclomaticComplexityMethodCheck: { complexity: 8 }
47
- EmptyRescueBodyCheck: { }
48
- ForLoopCheck: { }
49
- MethodLineCountCheck: { line_count: 20 }
50
- MethodNameCheck: { pattern: !ruby/regexp /^[_a-z<>=\[\]|+-\/\*`]+[_a-z0-9_<>=~@\[\]]*[=!\?]?$/ }
51
- ModuleLineCountCheck: { line_count: 300 }
52
- ModuleNameCheck: { pattern: !ruby/regexp /^[A-Z][a-zA-Z0-9]*$/ }
53
- ParameterNumberCheck: { parameter_count: 5 }
54
-
55
- == SUPPORTED CHECKS:
56
-
57
- * AssignmentInConditionalCheck - Check for an assignment inside a conditional. It's probably a mistaken equality comparison.
58
- * CaseMissingElseCheck - Check that case statements have an else statement so that all cases are covered.
59
- * ClassLineCountCheck - Check that the number of lines in a class is below the threshold.
60
- * ClassNameCheck - Check that class names match convention.
61
- * CyclomaticComplexityBlockCheck - Check that the cyclomatic complexity of all blocks is below the threshold.
62
- * CyclomaticComplexityMethodCheck - Check that the cyclomatic complexity of all methods is below the threshold.
63
- * EmptyRescueBodyCheck - Check that there are no empty rescue blocks.
64
- * ForLoopCheck - Check that for loops aren't used (Use Enumerable.each instead)
65
- * MethodLineCountCheck - Check that the number of lines in a method is below the threshold.
66
- * MethodNameCheck - Check that method names match convention.
67
- * ModuleLineCountCheck - Check that the number of lines in a module is below the threshold.
68
- * ModuleNameCheck - Check that module names match convention.
69
- * ParameterNumberCheck - Check that the number of parameters on a method is below the threshold.
70
-
71
- == SUGGESTED CHECKS:
72
-
73
- * BlockVariableShadowCheck - Check that a block variable does not have the same name as a method parameter or local variable. It may be mistakenly referenced within the block.
74
-
75
- == LICENSE:
76
-
77
- (The MIT License)
78
-
79
- Copyright (c) 2008 Marty Andrews
80
-
81
- Permission is hereby granted, free of charge, to any person obtaining
82
- a copy of this software and associated documentation files (the
83
- 'Software'), to deal in the Software without restriction, including
84
- without limitation the rights to use, copy, modify, merge, publish,
85
- distribute, sublicense, and/or sell copies of the Software, and to
86
- permit persons to whom the Software is furnished to do so, subject to
87
- the following conditions:
88
-
89
- The above copyright notice and this permission notice shall be
90
- included in all copies or substantial portions of the Software.
91
-
92
- THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
93
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
94
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
95
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
96
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
97
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
98
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.