ruby-lint 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (317) hide show
  1. checksums.yaml +7 -0
  2. checksums.yaml.gz.asc +17 -0
  3. data.tar.gz.asc +14 -14
  4. data/.ruby-version +1 -0
  5. data/.travis.yml +0 -1
  6. data/.yardopts +1 -0
  7. data/CONTRIBUTING.md +41 -0
  8. data/MANIFEST +99 -66
  9. data/README.md +36 -10
  10. data/Rakefile +6 -0
  11. data/checksum/ruby-lint-0.0.4.gem.sha512 +1 -0
  12. data/doc/changelog.md +94 -0
  13. data/lib/ruby-lint.rb +18 -1
  14. data/lib/ruby-lint/analysis/argument_amount.rb +43 -10
  15. data/lib/ruby-lint/analysis/base.rb +23 -17
  16. data/lib/ruby-lint/analysis/pedantics.rb +3 -1
  17. data/lib/ruby-lint/analysis/undefined_methods.rb +48 -10
  18. data/lib/ruby-lint/analysis/unused_variables.rb +27 -5
  19. data/lib/ruby-lint/ast/node.rb +10 -0
  20. data/lib/ruby-lint/cli/analyze.rb +22 -4
  21. data/lib/ruby-lint/cli/base.rb +8 -2
  22. data/lib/ruby-lint/configuration.rb +43 -4
  23. data/lib/ruby-lint/definition/constant_proxy.rb +10 -1
  24. data/lib/ruby-lint/definition/ruby_method.rb +45 -31
  25. data/lib/ruby-lint/definition/ruby_object.rb +56 -15
  26. data/lib/ruby-lint/definition_builder/base.rb +4 -0
  27. data/lib/ruby-lint/definition_builder/primitive.rb +1 -1
  28. data/lib/ruby-lint/definition_builder/ruby_array.rb +1 -1
  29. data/lib/ruby-lint/definition_builder/ruby_block.rb +1 -0
  30. data/lib/ruby-lint/definition_builder/ruby_class.rb +1 -1
  31. data/lib/ruby-lint/definition_builder/ruby_hash.rb +1 -1
  32. data/lib/ruby-lint/definition_builder/ruby_module.rb +3 -1
  33. data/lib/ruby-lint/definition_generator.rb +15 -7
  34. data/lib/ruby-lint/definitions/core/arg0.rb +1 -1
  35. data/lib/ruby-lint/definitions/core/argf.rb +1 -1
  36. data/lib/ruby-lint/definitions/core/argument_error.rb +2 -2
  37. data/lib/ruby-lint/definitions/core/argv.rb +1 -1
  38. data/lib/ruby-lint/definitions/core/array.rb +6 -6
  39. data/lib/ruby-lint/definitions/core/autoload.rb +2 -2
  40. data/lib/ruby-lint/definitions/core/basic_object.rb +8 -12
  41. data/lib/ruby-lint/definitions/core/bignum.rb +2 -2
  42. data/lib/ruby-lint/definitions/core/binding.rb +2 -2
  43. data/lib/ruby-lint/definitions/core/class.rb +2 -2
  44. data/lib/ruby-lint/definitions/core/comparable.rb +1 -1
  45. data/lib/ruby-lint/definitions/core/complex.rb +4 -4
  46. data/lib/ruby-lint/definitions/core/condition_variable.rb +2 -2
  47. data/lib/ruby-lint/definitions/core/continuation.rb +2 -2
  48. data/lib/ruby-lint/definitions/core/data.rb +2 -2
  49. data/lib/ruby-lint/definitions/core/date.rb +34 -34
  50. data/lib/ruby-lint/definitions/core/date_time.rb +26 -26
  51. data/lib/ruby-lint/definitions/core/default_record_separator.rb +1 -1
  52. data/lib/ruby-lint/definitions/core/digest.rb +14 -14
  53. data/lib/ruby-lint/definitions/core/dir.rb +34 -34
  54. data/lib/ruby-lint/definitions/core/encoding.rb +237 -237
  55. data/lib/ruby-lint/definitions/core/encoding_error.rb +2 -2
  56. data/lib/ruby-lint/definitions/core/enumerable.rb +15 -15
  57. data/lib/ruby-lint/definitions/core/enumerator.rb +2 -2
  58. data/lib/ruby-lint/definitions/core/env.rb +1 -1
  59. data/lib/ruby-lint/definitions/core/eoferror.rb +2 -2
  60. data/lib/ruby-lint/definitions/core/erb.rb +30 -23
  61. data/lib/ruby-lint/definitions/core/errno.rb +525 -525
  62. data/lib/ruby-lint/definitions/core/etc.rb +6 -6
  63. data/lib/ruby-lint/definitions/core/exception.rb +2 -2
  64. data/lib/ruby-lint/definitions/core/false.rb +1 -1
  65. data/lib/ruby-lint/definitions/core/false_class.rb +2 -2
  66. data/lib/ruby-lint/definitions/core/fatal_error.rb +2 -2
  67. data/lib/ruby-lint/definitions/core/fiber.rb +2 -2
  68. data/lib/ruby-lint/definitions/core/fiber_error.rb +2 -2
  69. data/lib/ruby-lint/definitions/core/file.rb +68 -68
  70. data/lib/ruby-lint/definitions/core/file_list.rb +2 -2
  71. data/lib/ruby-lint/definitions/core/file_test.rb +1 -1
  72. data/lib/ruby-lint/definitions/core/file_utils.rb +16 -16
  73. data/lib/ruby-lint/definitions/core/fixnum.rb +4 -4
  74. data/lib/ruby-lint/definitions/core/float.rb +16 -16
  75. data/lib/ruby-lint/definitions/core/float_domain_error.rb +2 -2
  76. data/lib/ruby-lint/definitions/core/gc.rb +2 -2
  77. data/lib/ruby-lint/definitions/core/gem.rb +119 -119
  78. data/lib/ruby-lint/definitions/core/hash.rb +14 -14
  79. data/lib/ruby-lint/definitions/core/immediate_value.rb +1 -1
  80. data/lib/ruby-lint/definitions/core/index_error.rb +2 -2
  81. data/lib/ruby-lint/definitions/core/integer.rb +2 -2
  82. data/lib/ruby-lint/definitions/core/interrupt.rb +2 -2
  83. data/lib/ruby-lint/definitions/core/io.rb +38 -38
  84. data/lib/ruby-lint/definitions/core/ioerror.rb +2 -2
  85. data/lib/ruby-lint/definitions/core/kernel.rb +113 -60
  86. data/lib/ruby-lint/definitions/core/key_error.rb +2 -2
  87. data/lib/ruby-lint/definitions/core/load_error.rb +6 -6
  88. data/lib/ruby-lint/definitions/core/local_jump_error.rb +2 -2
  89. data/lib/ruby-lint/definitions/core/marshal.rb +35 -35
  90. data/lib/ruby-lint/definitions/core/match_data.rb +2 -2
  91. data/lib/ruby-lint/definitions/core/math.rb +7 -7
  92. data/lib/ruby-lint/definitions/core/memory_segmention_error.rb +2 -2
  93. data/lib/ruby-lint/definitions/core/method.rb +2 -2
  94. data/lib/ruby-lint/definitions/core/module.rb +39 -3
  95. data/lib/ruby-lint/definitions/core/monitor.rb +4 -4
  96. data/lib/ruby-lint/definitions/core/monitor_mixin.rb +5 -5
  97. data/lib/ruby-lint/definitions/core/mutex.rb +2 -2
  98. data/lib/ruby-lint/definitions/core/name_error.rb +2 -2
  99. data/lib/ruby-lint/definitions/core/nil.rb +1 -1
  100. data/lib/ruby-lint/definitions/core/nil_class.rb +2 -2
  101. data/lib/ruby-lint/definitions/core/no_memory_error.rb +2 -2
  102. data/lib/ruby-lint/definitions/core/no_method_error.rb +2 -2
  103. data/lib/ruby-lint/definitions/core/not_implemented_error.rb +2 -2
  104. data/lib/ruby-lint/definitions/core/numeric.rb +2 -2
  105. data/lib/ruby-lint/definitions/core/object.rb +2 -2
  106. data/lib/ruby-lint/definitions/core/object_space.rb +1 -1
  107. data/lib/ruby-lint/definitions/core/open_struct.rb +3 -3
  108. data/lib/ruby-lint/definitions/core/option_parser.rb +83 -83
  109. data/lib/ruby-lint/definitions/core/precision.rb +1 -1
  110. data/lib/ruby-lint/definitions/core/primitive_failure.rb +2 -2
  111. data/lib/ruby-lint/definitions/core/proc.rb +2 -2
  112. data/lib/ruby-lint/definitions/core/process.rb +29 -29
  113. data/lib/ruby-lint/definitions/core/queue.rb +2 -2
  114. data/lib/ruby-lint/definitions/core/rake.rb +117 -117
  115. data/lib/ruby-lint/definitions/core/rake_file_utils.rb +1 -1
  116. data/lib/ruby-lint/definitions/core/rakeversion.rb +1 -1
  117. data/lib/ruby-lint/definitions/core/random.rb +2 -2
  118. data/lib/ruby-lint/definitions/core/range.rb +4 -4
  119. data/lib/ruby-lint/definitions/core/range_error.rb +2 -2
  120. data/lib/ruby-lint/definitions/core/rational.rb +2 -2
  121. data/lib/ruby-lint/definitions/core/rb_config.rb +3 -3
  122. data/lib/ruby-lint/definitions/core/regexp.rb +28 -28
  123. data/lib/ruby-lint/definitions/core/regexp_error.rb +2 -2
  124. data/lib/ruby-lint/definitions/core/ruby_copyright.rb +1 -1
  125. data/lib/ruby-lint/definitions/core/ruby_description.rb +1 -1
  126. data/lib/ruby-lint/definitions/core/ruby_engine.rb +1 -1
  127. data/lib/ruby-lint/definitions/core/ruby_patchlevel.rb +1 -1
  128. data/lib/ruby-lint/definitions/core/ruby_platform.rb +1 -1
  129. data/lib/ruby-lint/definitions/core/ruby_release_date.rb +1 -1
  130. data/lib/ruby-lint/definitions/core/ruby_version.rb +1 -1
  131. data/lib/ruby-lint/definitions/core/runtime_error.rb +2 -2
  132. data/lib/ruby-lint/definitions/core/scan_error.rb +2 -2
  133. data/lib/ruby-lint/definitions/core/script_error.rb +2 -2
  134. data/lib/ruby-lint/definitions/core/security_error.rb +2 -2
  135. data/lib/ruby-lint/definitions/core/shellwords.rb +1 -1
  136. data/lib/ruby-lint/definitions/core/signal.rb +3 -3
  137. data/lib/ruby-lint/definitions/core/signal_exception.rb +2 -2
  138. data/lib/ruby-lint/definitions/core/singleton.rb +2 -2
  139. data/lib/ruby-lint/definitions/core/sized_queue.rb +2 -2
  140. data/lib/ruby-lint/definitions/core/standard_error.rb +2 -2
  141. data/lib/ruby-lint/definitions/core/stderr.rb +3 -2
  142. data/lib/ruby-lint/definitions/core/stdin.rb +3 -2
  143. data/lib/ruby-lint/definitions/core/stdout.rb +3 -2
  144. data/lib/ruby-lint/definitions/core/stop_iteration.rb +2 -2
  145. data/lib/ruby-lint/definitions/core/string.rb +21 -21
  146. data/lib/ruby-lint/definitions/core/string_io.rb +7 -7
  147. data/lib/ruby-lint/definitions/core/string_scanner.rb +4 -4
  148. data/lib/ruby-lint/definitions/core/struct.rb +20 -20
  149. data/lib/ruby-lint/definitions/core/syck.rb +4 -4
  150. data/lib/ruby-lint/definitions/core/symbol.rb +2 -2
  151. data/lib/ruby-lint/definitions/core/syntax_error.rb +2 -2
  152. data/lib/ruby-lint/definitions/core/system_call_error.rb +2 -2
  153. data/lib/ruby-lint/definitions/core/system_exit.rb +2 -2
  154. data/lib/ruby-lint/definitions/core/system_stack_error.rb +2 -2
  155. data/lib/ruby-lint/definitions/core/thread.rb +6 -6
  156. data/lib/ruby-lint/definitions/core/thread_error.rb +2 -2
  157. data/lib/ruby-lint/definitions/core/thread_group.rb +2 -2
  158. data/lib/ruby-lint/definitions/core/time.rb +3 -3
  159. data/lib/ruby-lint/definitions/core/toplevel_binding.rb +1 -1
  160. data/lib/ruby-lint/definitions/core/true.rb +1 -1
  161. data/lib/ruby-lint/definitions/core/true_class.rb +2 -2
  162. data/lib/ruby-lint/definitions/core/type_error.rb +2 -2
  163. data/lib/ruby-lint/definitions/core/unbound_method.rb +2 -2
  164. data/lib/ruby-lint/definitions/core/unmarshalable.rb +1 -1
  165. data/lib/ruby-lint/definitions/core/unsupported_library_error.rb +2 -2
  166. data/lib/ruby-lint/definitions/core/weak_ref.rb +4 -4
  167. data/lib/ruby-lint/definitions/core/yaml.rb +2361 -0
  168. data/lib/ruby-lint/definitions/core/zero_division_error.rb +2 -2
  169. data/lib/ruby-lint/definitions/global_variables.rb +9 -0
  170. data/lib/ruby-lint/definitions/rails/abstract_controller.rb +174 -28
  171. data/lib/ruby-lint/definitions/rails/action_controller.rb +4959 -550
  172. data/lib/ruby-lint/definitions/rails/action_dispatch.rb +2489 -292
  173. data/lib/ruby-lint/definitions/rails/action_mailer.rb +1285 -42
  174. data/lib/ruby-lint/definitions/rails/action_pack.rb +14 -6
  175. data/lib/ruby-lint/definitions/rails/action_view.rb +6941 -445
  176. data/lib/ruby-lint/definitions/rails/active_model.rb +1212 -69
  177. data/lib/ruby-lint/definitions/rails/active_record.rb +10344 -1450
  178. data/lib/ruby-lint/definitions/rails/active_support.rb +4631 -573
  179. data/lib/ruby-lint/definitions/rails/arel.rb +3211 -319
  180. data/lib/ruby-lint/definitions/rails/rails.rb +2922 -84
  181. data/lib/ruby-lint/definitions/rails/sprockets.rb +3048 -277
  182. data/lib/ruby-lint/docstring/mapping.rb +55 -0
  183. data/lib/ruby-lint/docstring/param_tag.rb +29 -0
  184. data/lib/ruby-lint/docstring/parser.rb +133 -0
  185. data/lib/ruby-lint/docstring/return_tag.rb +24 -0
  186. data/lib/ruby-lint/file_loader.rb +96 -0
  187. data/lib/ruby-lint/file_scanner.rb +91 -0
  188. data/lib/ruby-lint/global_scope.rb +56 -0
  189. data/lib/ruby-lint/helper/constant_paths.rb +1 -1
  190. data/lib/ruby-lint/inspector.rb +11 -33
  191. data/lib/ruby-lint/iterator.rb +31 -4
  192. data/lib/ruby-lint/method_call/alias.rb +46 -0
  193. data/lib/ruby-lint/method_call/assign_member.rb +55 -0
  194. data/lib/ruby-lint/method_call/attribute.rb +102 -0
  195. data/lib/ruby-lint/method_call/base.rb +37 -0
  196. data/lib/ruby-lint/method_call/define_method.rb +17 -0
  197. data/lib/ruby-lint/method_call/include.rb +39 -0
  198. data/lib/ruby-lint/parser.rb +9 -4
  199. data/lib/ruby-lint/presenter/text.rb +2 -1
  200. data/lib/ruby-lint/report.rb +19 -42
  201. data/lib/ruby-lint/report/entry.rb +20 -17
  202. data/lib/ruby-lint/runner.rb +92 -11
  203. data/lib/ruby-lint/template/definition.erb +2 -2
  204. data/lib/ruby-lint/variable_predicates.rb +7 -10
  205. data/lib/ruby-lint/version.rb +1 -1
  206. data/lib/ruby-lint/virtual_machine.rb +265 -188
  207. data/ruby-lint.gemspec +4 -4
  208. data/ruby-lint.yml +7 -0
  209. data/spec/fixtures/associating.rb +7 -0
  210. data/spec/fixtures/file_scanner/lib/example/recursive/source.rb +6 -0
  211. data/spec/fixtures/file_scanner/lib/example/recursive/target.rb +8 -0
  212. data/spec/fixtures/file_scanner/lib/example/user.rb +6 -0
  213. data/spec/fixtures/file_scanner/lib/test-dashes/foo.rb +4 -0
  214. data/spec/fixtures/file_scanner/rails/app/models/example/user.rb +6 -0
  215. data/spec/fixtures/file_scanner/rails/app/models/user.rb +4 -0
  216. data/spec/fixtures/uses_external.rb +1 -0
  217. data/spec/fixtures/uses_external_invalid.rb +3 -0
  218. data/spec/fixtures/uses_external_namespace.rb +1 -0
  219. data/spec/ruby-lint/analysis/{argument_amount.rb → argument_amount_spec.rb} +33 -7
  220. data/spec/ruby-lint/analysis/base_spec.rb +12 -0
  221. data/spec/ruby-lint/analysis/{pedantics.rb → pedantics_spec.rb} +24 -4
  222. data/spec/ruby-lint/analysis/{shadowing_variables.rb → shadowing_variables_spec.rb} +6 -6
  223. data/spec/ruby-lint/analysis/undefined_methods_spec.rb +320 -0
  224. data/spec/ruby-lint/analysis/{undefined_variables.rb → undefined_variables_spec.rb} +33 -10
  225. data/spec/ruby-lint/analysis/{unused_variables.rb → unused_variables_spec.rb} +36 -9
  226. data/spec/ruby-lint/ast/{node.rb → node_spec.rb} +12 -6
  227. data/spec/ruby-lint/cli/{analyze.rb → analyze_spec.rb} +16 -5
  228. data/spec/ruby-lint/cli/{ast.rb → ast_spec.rb} +3 -3
  229. data/spec/ruby-lint/configuration_spec.rb +106 -0
  230. data/spec/ruby-lint/definition/constant_proxy_spec.rb +54 -0
  231. data/spec/ruby-lint/definition/{dsl.rb → dsl_spec.rb} +15 -15
  232. data/spec/ruby-lint/definition/{ruby_method.rb → ruby_method_spec.rb} +31 -17
  233. data/spec/ruby-lint/definition/{ruby_object.rb → ruby_object_spec.rb} +28 -23
  234. data/spec/ruby-lint/definition_builder/{primitive.rb → primitive_spec.rb} +9 -9
  235. data/spec/ruby-lint/definition_builder/{ruby_class.rb → ruby_class_spec.rb} +13 -13
  236. data/spec/ruby-lint/definition_builder/{ruby_method.rb → ruby_method_spec.rb} +9 -9
  237. data/spec/ruby-lint/definition_builder/{ruby_module.rb → ruby_module_spec.rb} +12 -10
  238. data/spec/ruby-lint/docstring/mapping.rb +27 -0
  239. data/spec/ruby-lint/docstring/parser_spec.rb +88 -0
  240. data/spec/ruby-lint/extensions/{string.rb → string_spec.rb} +3 -3
  241. data/spec/ruby-lint/file_loader_spec.rb +69 -0
  242. data/spec/ruby-lint/file_scanner_spec.rb +51 -0
  243. data/spec/ruby-lint/inspector_spec.rb +44 -0
  244. data/spec/ruby-lint/{iterator.rb → iterator_spec.rb} +39 -4
  245. data/spec/ruby-lint/{nested_stack.rb → nested_stack_spec.rb} +4 -4
  246. data/spec/ruby-lint/parser_spec.rb +31 -0
  247. data/spec/ruby-lint/presenter/json_spec.rb +58 -0
  248. data/spec/ruby-lint/presenter/text_spec.rb +49 -0
  249. data/spec/ruby-lint/report/entry_spec.rb +58 -0
  250. data/spec/ruby-lint/report_spec.rb +39 -0
  251. data/spec/ruby-lint/runner_spec.rb +52 -0
  252. data/spec/ruby-lint/virtual_machine/alias_spec.rb +55 -0
  253. data/spec/ruby-lint/virtual_machine/assignments/{arrays.rb → arrays_spec.rb} +7 -7
  254. data/spec/ruby-lint/virtual_machine/assignments/{hashes.rb → hashes_spec.rb} +6 -6
  255. data/spec/ruby-lint/virtual_machine/assignments/{optional.rb → optional_spec.rb} +6 -6
  256. data/spec/ruby-lint/virtual_machine/assignments/{return_values.rb → return_values_spec.rb} +11 -11
  257. data/spec/ruby-lint/virtual_machine/assignments/{variables.rb → variables_spec.rb} +38 -7
  258. data/spec/ruby-lint/virtual_machine/associate_nodes_spec.rb +59 -0
  259. data/spec/ruby-lint/virtual_machine/{autoloading.rb → autoloading_spec.rb} +6 -6
  260. data/spec/ruby-lint/virtual_machine/{blocks.rb → blocks_spec.rb} +30 -4
  261. data/spec/ruby-lint/virtual_machine/classes/{class_methods.rb → class_methods_spec.rb} +3 -3
  262. data/spec/ruby-lint/virtual_machine/classes/{extending.rb → extending_spec.rb} +20 -15
  263. data/spec/ruby-lint/virtual_machine/classes/{redefining.rb → redefining_spec.rb} +3 -3
  264. data/spec/ruby-lint/virtual_machine/classes/{sclass.rb → sclass_spec.rb} +7 -7
  265. data/spec/ruby-lint/virtual_machine/classes/{scoping.rb → scoping_spec.rb} +5 -5
  266. data/spec/ruby-lint/virtual_machine/complex/{rails.rb → rails_spec.rb} +3 -3
  267. data/spec/ruby-lint/virtual_machine/complex/{rcap.rb → rcap_spec.rb} +3 -3
  268. data/spec/ruby-lint/virtual_machine/complex/{slop.rb → slop_spec.rb} +3 -3
  269. data/spec/ruby-lint/virtual_machine/constants_spec.rb +31 -0
  270. data/spec/ruby-lint/virtual_machine/{for.rb → for_spec.rb} +3 -3
  271. data/spec/ruby-lint/virtual_machine/{freeze.rb → freeze_spec.rb} +3 -3
  272. data/spec/ruby-lint/virtual_machine/global_variables_spec.rb +12 -0
  273. data/spec/ruby-lint/virtual_machine/inherit_kernel_spec.rb +15 -0
  274. data/spec/ruby-lint/virtual_machine/{interpolation.rb → interpolation_spec.rb} +3 -3
  275. data/spec/ruby-lint/virtual_machine/methods/attr_spec.rb +116 -0
  276. data/spec/ruby-lint/virtual_machine/methods/define_method_spec.rb +41 -0
  277. data/spec/ruby-lint/virtual_machine/methods/{defining.rb → defining_spec.rb} +4 -4
  278. data/spec/ruby-lint/virtual_machine/methods/docstrings_spec.rb +69 -0
  279. data/spec/ruby-lint/virtual_machine/methods/{exporting.rb → exporting_spec.rb} +3 -3
  280. data/spec/ruby-lint/virtual_machine/methods/{parameters.rb → parameters_spec.rb} +17 -5
  281. data/spec/ruby-lint/virtual_machine/methods/{patching.rb → patching_spec.rb} +4 -4
  282. data/spec/ruby-lint/virtual_machine/methods/{scoping.rb → scoping_spec.rb} +5 -5
  283. data/spec/ruby-lint/virtual_machine/methods/{visibility.rb → visibility_spec.rb} +6 -6
  284. data/spec/ruby-lint/virtual_machine/{modules.rb → modules_spec.rb} +39 -9
  285. data/spec/ruby-lint/virtual_machine/reference_amount_spec.rb +61 -0
  286. data/spec/ruby-lint/virtual_machine/{unused.rb → unused_spec.rb} +4 -4
  287. data/spec/{helper.rb → spec_helper.rb} +6 -4
  288. data/spec/support/building.rb +10 -6
  289. data/spec/support/coveralls.rb +1 -1
  290. data/spec/support/parsing.rb +10 -1
  291. data/spec/support/simplecov.rb +1 -1
  292. data/spec/support/versions.rb +9 -0
  293. data/task/test.rake +2 -4
  294. data/task/travis.rake +1 -0
  295. metadata +144 -143
  296. metadata.gz.asc +14 -14
  297. data/.rubocop.yml +0 -59
  298. data/doc/contributing.md +0 -16
  299. data/lib/ruby-lint/analysis/confusing_variables.rb +0 -26
  300. data/lib/ruby-lint/definitions/core/main.rb +0 -25
  301. data/lib/ruby-lint/definitions/core/psych.rb +0 -2231
  302. data/lib/ruby-lint/definitions/core/rubinius.rb +0 -16637
  303. data/lib/ruby-lint/definitions/core/ruby_lint.rb +0 -93
  304. data/spec/ruby-lint/analysis/confusing_variables.rb +0 -46
  305. data/spec/ruby-lint/analysis/undefined_methods.rb +0 -174
  306. data/spec/ruby-lint/configuration.rb +0 -54
  307. data/spec/ruby-lint/definition/constant_proxy.rb +0 -31
  308. data/spec/ruby-lint/parser.rb +0 -14
  309. data/spec/ruby-lint/presenter/json.rb +0 -31
  310. data/spec/ruby-lint/presenter/text.rb +0 -22
  311. data/spec/ruby-lint/report.rb +0 -50
  312. data/spec/ruby-lint/report/entry.rb +0 -28
  313. data/spec/ruby-lint/runner.rb +0 -32
  314. data/spec/ruby-lint/virtual_machine/associate_nodes.rb +0 -17
  315. data/spec/ruby-lint/virtual_machine/reference_amount.rb +0 -33
  316. data/spec/support/bacon.rb +0 -33
  317. data/task/cop.rake +0 -11
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: bf30514aa5a1f824fa2dd56dfb776da2f19b02f1
4
+ data.tar.gz: 333fe29270d161bba23bbeeb077647eb482758e6
5
+ SHA512:
6
+ metadata.gz: 68e08f78c67e18632afd43aadd45dd0eb7e95c3abbe505ff1f5fd64bd5c8cc019a3c4f7e22456cee7359acc05188551e60484e4e8ceae5417d5c623ee69f26eb
7
+ data.tar.gz: af1bdbb7036b5e2c728a2f31f2dc074baf268f083337f04b4cbc5389db6d6c82e3ed87db8bd7113ea695a947b66b02c28e07726c461453615f98b6326eb2f359
checksums.yaml.gz.asc ADDED
@@ -0,0 +1,17 @@
1
+ -----BEGIN PGP SIGNATURE-----
2
+ Version: GnuPG v2.0.21 (GNU/Linux)
3
+
4
+ iQIcBAABAgAGBQJSI1ZdAAoJEPMbESk2SfREreIQAK4KVRJ8W9NfaMaoIAt9PqrK
5
+ 9F82AF819tV9Yp8pzv+QhzXeQf/HStRtqGgUu/TeH3OLQ9+i866xTUZPPUtL0WRC
6
+ D3YuTRtRcaL6DKei4PwnUkzxr4Vyc+ESZHy0MtR7brYyXntjWAwpgE7scZiP/6h5
7
+ lP8LKmGFmdt/cviz03byGFM7AIQ2H7Bn7y6E8Z+SLzSVhgQtuVfvrxrM3CLiTLCB
8
+ l3efJyuhWfWnDRWcL6mxDAD3yJmx68v9RnpPF/uDFAf/UxzSCKzxxIgPVqc3GdCL
9
+ fyuZhnmYVxkgVdVKx0emEp1uVOP5Ab7CpTQcnQ7SptrgQ726Hllr2hbg5o/Yyc4c
10
+ KGcsOsqVbp4ADfuPcBGPBGSNEXsUBWuhCJbLX3L/WpCa+efyDVJ9Q1ibSwo8T1Db
11
+ NGcKWE95MEbgwrL2kQVZLWP0+EFK15B5Ejpj4l6wUiKaPphScVwbHbrfVtWT4Ol4
12
+ D9G5FFEX5VSYVjJD9md2/IiBsZEtOxn10p+6bYrFZKP1ebcGI+7lIbjuSBv/bsla
13
+ HSH1aiF5DyuJo5Sl7gcHkLUJSncyIoRJkYGDeDzXq5X77WK38P7QRgNYUFKeAvn8
14
+ IFW4u8nv3RMIuQoPeXDd29OzCz6dwfwpCU0Ru84IBpuxj3FD5Pki4UrjkjE13W30
15
+ /kVP2nSbwCKsmcT/G5mp
16
+ =ovVB
17
+ -----END PGP SIGNATURE-----
data.tar.gz.asc CHANGED
@@ -1,17 +1,17 @@
1
1
  -----BEGIN PGP SIGNATURE-----
2
- Version: GnuPG v2.0.20 (GNU/Linux)
2
+ Version: GnuPG v2.0.21 (GNU/Linux)
3
3
 
4
- iQIcBAABAgAGBQJR4u6hAAoJEPMbESk2SfRE/0QP/jiSRO1AUCukksezr8vE3Z6u
5
- EvMyuP2IuhCtTwpJkfRvDONw+uJCWEigcpjce7vxLKmGLVCZRGYc3/Y3i49XBi2K
6
- qfhjIwVdFUolvzRum7C4EMo+ap1ogn9ah8wFSxqYu/t0VC0QzETlpTa5w7PnmfDg
7
- oNYtJ/aVBO/5CV+balf9w3pnvdBhBgytioWiWDJ7i9Q+5Ww6jTxi0SbKEnBAlJ65
8
- aUKdtVSVK+KUO5qlVjSDxyI6x0egnFy8GQt3wiQk52gTxcipc+XZio+K8E9je27C
9
- IlFk/70Th9VrBSnjpRYntKuvpZ72vF5c8U0kHhAlwsjm5l6vFT01BpFjTv22PTA1
10
- teRL6gHjlffevdqNloceVdTPREHBGKyCApK1DMbAuWhVr9oQjM3UgtkG1ETZ1SdJ
11
- xe/DpDIDOIuPn+hWqGslfTVM4bAtf/6sIIhSW2vaQBdPt4xBwrPjP9emKdCJYWjL
12
- KD/fZJewKzx+QGFiMrRsbWAppd81GRVq84kulSvEX9tuOeh0JxHF78ukh+9RzoC6
13
- kDUS2CKP2BQLltvSUMjPAk4fTuZ9+/GL0KmDCh3VtccYj4pwgM3x1xCjd+BdUa0R
14
- 5Bk/JZtdyGlsEChOzIHlouRD5jyr64nit84H+De89a1SQMlQqS2eUKyZHPsYLcK0
15
- ASoNtVw0Ap0sXRefY46L
16
- =TBZF
4
+ iQIcBAABAgAGBQJSI1ZdAAoJEPMbESk2SfREfKkP/izxfJRPVk8TzuiXs3lc6lmR
5
+ siLgOCzBwLJK9Pm5iAENQ6D8jyOcWBjOK/NMLgccMyg6KbW54TGFWfZ2n2X3k0QI
6
+ 38+HjeDGym92tE1LPOtIHslFKpojRJqUZxFNXhwMtmh1i8Ieqpwq/yA+hyeyFF5Y
7
+ S8i2utYzuWs32bcCSs25wG9ke9rwtO2HiGoDLeIWysYcoAWdSWe0HyAcL9ip3KF+
8
+ 1tnKkfRaiFflSWh2o8fmuhc73/yL7vNSTpZtaxDuE7Dsg3Dm/OrIyw/h3ud8LHsa
9
+ uV0SJHMDBg2xJo7JqYJDnazzAqAja/N2IfvywGT1CJfE5qsDdrHyFBPXSuBYRAZy
10
+ dphjD6whpUkuJLGS6vMm7WAFo2xFOaHM7r6ulO5LWZkaiJLEEIJ/34NijKbS7xsm
11
+ L5XH6Zhwoli3rMVJBPjnhT+blOXYSP1+Lw84xbI8OpbQMoGtWtErIOJuHNPrP5YP
12
+ B5x/OnE8KaT4gvyakSjRl/lTeAfTtvI+TFI5Atmye2+Q0eSOhnpxHQaqtNp/HFUl
13
+ ECDmkkVH2lc8L/7H9EqjgNTJiNLtPfPWxDBAzBIVyT2i4WzKKQC4eJjEhZuzAvcX
14
+ SZNcPoUIXf4P2mE4APGILziitM3k+azdiIvHZ2FzU2ruVA5g5nvD86VEPczw5zDL
15
+ LQCMOKMtg15IP5HWWrWB
16
+ =x7n/
17
17
  -----END PGP SIGNATURE-----
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.0
data/.travis.yml CHANGED
@@ -18,4 +18,3 @@ notifications:
18
18
  branches:
19
19
  only:
20
20
  - master
21
- - develop
data/.yardopts CHANGED
@@ -12,3 +12,4 @@
12
12
  -
13
13
  ./doc/*.md
14
14
  LICENSE
15
+ CONTRIBUTING.md
data/CONTRIBUTING.md ADDED
@@ -0,0 +1,41 @@
1
+ # Contributing
2
+
3
+ Those that wish to contribute to ruby-lint are more than welcome. However, to
4
+ make the lifes of both me and others easier there are a few things one should
5
+ keep in mind.
6
+
7
+ The basic set of guidelines is described at
8
+ <http://yorickpeterse.com/articles/contributing-to-my-code/>. The article looks
9
+ a bit daunting but most of what this article describes is already common
10
+ practise in Ruby land. In short:
11
+
12
+ * write tests
13
+ * write documentation using YARD (at the very least arguments and return values
14
+ should be documented)
15
+ * wrap lines at 79 characters per line
16
+ * Git commits should have a <= 50 character summary, optionally followed by a
17
+ blank line and a more in depth description of 79 characters per line.
18
+
19
+ These are the most important bits, the rest is all described in the above
20
+ article. If you have any questions or whatsoever don't hesitate to ask and
21
+ don't worry about making mistakes (e.g. missing some documentation), I'll help
22
+ wherever I can and won't slap you with a large trout.
23
+
24
+ ## Legal
25
+
26
+ Legal wise there are two files to take into account:
27
+
28
+ * LICENSE
29
+ * doc/DCO.md
30
+
31
+ The LICENSE file contains a copy of the MIT license. All ruby-lint source code
32
+ and related files (basically whatever this repository and the resulting Gem
33
+ contains) are licensed under the MIT license unless specified otherwise.
34
+
35
+ The DCO contains a agreement for developers that basically specifies that they
36
+ agree with the license and that whatever they contribute is something they are
37
+ allowed to contribute. By contributing to ruby-lint you automatically agree
38
+ with this DCO so it's worth giving a read. The DCO is put in to place to ensure
39
+ that whenever somebody gets mad at me for using proprietary code contributed by
40
+ somebody else I have at least something to defend myself with. Lets just hope I
41
+ never have to.
data/MANIFEST CHANGED
@@ -1,7 +1,8 @@
1
1
  .gitignore
2
- .rubocop.yml
2
+ .ruby-version
3
3
  .travis.yml
4
4
  .yardopts
5
+ CONTRIBUTING.md
5
6
  Gemfile
6
7
  LICENSE
7
8
  MANIFEST
@@ -10,6 +11,7 @@ Rakefile
10
11
  bin/ruby-lint
11
12
  checksum/.gitkeep
12
13
  checksum/ruby-lint-0.0.3.gem.sha512
14
+ checksum/ruby-lint-0.0.4.gem.sha512
13
15
  debug/memory_usage.rb
14
16
  debug/profile.rb
15
17
  doc/.gitkeep
@@ -18,7 +20,6 @@ doc/architecture.md
18
20
  doc/changelog.md
19
21
  doc/code_analysis.md
20
22
  doc/configuration.md
21
- doc/contributing.md
22
23
  doc/css/.gitkeep
23
24
  doc/css/common.css
24
25
  doc/graphviz/flow.dot
@@ -27,7 +28,6 @@ doc/images/flow.png
27
28
  lib/ruby-lint.rb
28
29
  lib/ruby-lint/analysis/argument_amount.rb
29
30
  lib/ruby-lint/analysis/base.rb
30
- lib/ruby-lint/analysis/confusing_variables.rb
31
31
  lib/ruby-lint/analysis/pedantics.rb
32
32
  lib/ruby-lint/analysis/shadowing_variables.rb
33
33
  lib/ruby-lint/analysis/undefined_methods.rb
@@ -110,7 +110,6 @@ lib/ruby-lint/definitions/core/kernel.rb
110
110
  lib/ruby-lint/definitions/core/key_error.rb
111
111
  lib/ruby-lint/definitions/core/load_error.rb
112
112
  lib/ruby-lint/definitions/core/local_jump_error.rb
113
- lib/ruby-lint/definitions/core/main.rb
114
113
  lib/ruby-lint/definitions/core/marshal.rb
115
114
  lib/ruby-lint/definitions/core/match_data.rb
116
115
  lib/ruby-lint/definitions/core/math.rb
@@ -135,7 +134,6 @@ lib/ruby-lint/definitions/core/precision.rb
135
134
  lib/ruby-lint/definitions/core/primitive_failure.rb
136
135
  lib/ruby-lint/definitions/core/proc.rb
137
136
  lib/ruby-lint/definitions/core/process.rb
138
- lib/ruby-lint/definitions/core/psych.rb
139
137
  lib/ruby-lint/definitions/core/queue.rb
140
138
  lib/ruby-lint/definitions/core/rake.rb
141
139
  lib/ruby-lint/definitions/core/rake_file_utils.rb
@@ -147,11 +145,9 @@ lib/ruby-lint/definitions/core/rational.rb
147
145
  lib/ruby-lint/definitions/core/rb_config.rb
148
146
  lib/ruby-lint/definitions/core/regexp.rb
149
147
  lib/ruby-lint/definitions/core/regexp_error.rb
150
- lib/ruby-lint/definitions/core/rubinius.rb
151
148
  lib/ruby-lint/definitions/core/ruby_copyright.rb
152
149
  lib/ruby-lint/definitions/core/ruby_description.rb
153
150
  lib/ruby-lint/definitions/core/ruby_engine.rb
154
- lib/ruby-lint/definitions/core/ruby_lint.rb
155
151
  lib/ruby-lint/definitions/core/ruby_patchlevel.rb
156
152
  lib/ruby-lint/definitions/core/ruby_platform.rb
157
153
  lib/ruby-lint/definitions/core/ruby_release_date.rb
@@ -192,7 +188,9 @@ lib/ruby-lint/definitions/core/unbound_method.rb
192
188
  lib/ruby-lint/definitions/core/unmarshalable.rb
193
189
  lib/ruby-lint/definitions/core/unsupported_library_error.rb
194
190
  lib/ruby-lint/definitions/core/weak_ref.rb
191
+ lib/ruby-lint/definitions/core/yaml.rb
195
192
  lib/ruby-lint/definitions/core/zero_division_error.rb
193
+ lib/ruby-lint/definitions/global_variables.rb
196
194
  lib/ruby-lint/definitions/rails.rb
197
195
  lib/ruby-lint/definitions/rails/abstract_controller.rb
198
196
  lib/ruby-lint/definitions/rails/action_controller.rb
@@ -206,11 +204,24 @@ lib/ruby-lint/definitions/rails/active_support.rb
206
204
  lib/ruby-lint/definitions/rails/arel.rb
207
205
  lib/ruby-lint/definitions/rails/rails.rb
208
206
  lib/ruby-lint/definitions/rails/sprockets.rb
207
+ lib/ruby-lint/docstring/mapping.rb
208
+ lib/ruby-lint/docstring/param_tag.rb
209
+ lib/ruby-lint/docstring/parser.rb
210
+ lib/ruby-lint/docstring/return_tag.rb
209
211
  lib/ruby-lint/extensions/string.rb
212
+ lib/ruby-lint/file_loader.rb
213
+ lib/ruby-lint/file_scanner.rb
210
214
  lib/ruby-lint/generated_constant.rb
215
+ lib/ruby-lint/global_scope.rb
211
216
  lib/ruby-lint/helper/constant_paths.rb
212
217
  lib/ruby-lint/inspector.rb
213
218
  lib/ruby-lint/iterator.rb
219
+ lib/ruby-lint/method_call/alias.rb
220
+ lib/ruby-lint/method_call/assign_member.rb
221
+ lib/ruby-lint/method_call/attribute.rb
222
+ lib/ruby-lint/method_call/base.rb
223
+ lib/ruby-lint/method_call/define_method.rb
224
+ lib/ruby-lint/method_call/include.rb
214
225
  lib/ruby-lint/nested_stack.rb
215
226
  lib/ruby-lint/parser.rb
216
227
  lib/ruby-lint/presenter/json.rb
@@ -224,81 +235,103 @@ lib/ruby-lint/variable_predicates.rb
224
235
  lib/ruby-lint/version.rb
225
236
  lib/ruby-lint/virtual_machine.rb
226
237
  ruby-lint.gemspec
238
+ ruby-lint.yml
239
+ spec/fixtures/associating.rb
227
240
  spec/fixtures/complex/rails/basic_controller.rb
228
241
  spec/fixtures/complex/rcap.rb
229
242
  spec/fixtures/complex/slop.rb
230
243
  spec/fixtures/config.yml
244
+ spec/fixtures/file_scanner/lib/example/recursive/source.rb
245
+ spec/fixtures/file_scanner/lib/example/recursive/target.rb
246
+ spec/fixtures/file_scanner/lib/example/user.rb
247
+ spec/fixtures/file_scanner/lib/test-dashes/foo.rb
248
+ spec/fixtures/file_scanner/rails/app/models/example/user.rb
249
+ spec/fixtures/file_scanner/rails/app/models/user.rb
231
250
  spec/fixtures/invalid.rb
232
251
  spec/fixtures/invalid_2.rb
233
252
  spec/fixtures/syntax_error.rb
253
+ spec/fixtures/uses_external.rb
254
+ spec/fixtures/uses_external_invalid.rb
255
+ spec/fixtures/uses_external_namespace.rb
234
256
  spec/fixtures/valid.rb
235
- spec/helper.rb
236
- spec/ruby-lint/analysis/argument_amount.rb
237
- spec/ruby-lint/analysis/confusing_variables.rb
238
- spec/ruby-lint/analysis/pedantics.rb
239
- spec/ruby-lint/analysis/shadowing_variables.rb
240
- spec/ruby-lint/analysis/undefined_methods.rb
241
- spec/ruby-lint/analysis/undefined_variables.rb
242
- spec/ruby-lint/analysis/unused_variables.rb
243
- spec/ruby-lint/ast/node.rb
244
- spec/ruby-lint/cli/analyze.rb
245
- spec/ruby-lint/cli/ast.rb
246
- spec/ruby-lint/configuration.rb
247
- spec/ruby-lint/definition/constant_proxy.rb
248
- spec/ruby-lint/definition/dsl.rb
249
- spec/ruby-lint/definition/ruby_method.rb
250
- spec/ruby-lint/definition/ruby_object.rb
251
- spec/ruby-lint/definition_builder/primitive.rb
252
- spec/ruby-lint/definition_builder/ruby_class.rb
253
- spec/ruby-lint/definition_builder/ruby_method.rb
254
- spec/ruby-lint/definition_builder/ruby_module.rb
255
- spec/ruby-lint/extensions/string.rb
256
- spec/ruby-lint/iterator.rb
257
- spec/ruby-lint/nested_stack.rb
258
- spec/ruby-lint/parser.rb
259
- spec/ruby-lint/presenter/json.rb
260
- spec/ruby-lint/presenter/text.rb
261
- spec/ruby-lint/report.rb
262
- spec/ruby-lint/report/entry.rb
263
- spec/ruby-lint/runner.rb
264
- spec/ruby-lint/virtual_machine/assignments/arrays.rb
265
- spec/ruby-lint/virtual_machine/assignments/hashes.rb
266
- spec/ruby-lint/virtual_machine/assignments/optional.rb
267
- spec/ruby-lint/virtual_machine/assignments/return_values.rb
268
- spec/ruby-lint/virtual_machine/assignments/variables.rb
269
- spec/ruby-lint/virtual_machine/associate_nodes.rb
270
- spec/ruby-lint/virtual_machine/autoloading.rb
271
- spec/ruby-lint/virtual_machine/blocks.rb
272
- spec/ruby-lint/virtual_machine/classes/class_methods.rb
273
- spec/ruby-lint/virtual_machine/classes/extending.rb
274
- spec/ruby-lint/virtual_machine/classes/redefining.rb
275
- spec/ruby-lint/virtual_machine/classes/sclass.rb
276
- spec/ruby-lint/virtual_machine/classes/scoping.rb
277
- spec/ruby-lint/virtual_machine/complex/rails.rb
278
- spec/ruby-lint/virtual_machine/complex/rcap.rb
279
- spec/ruby-lint/virtual_machine/complex/slop.rb
280
- spec/ruby-lint/virtual_machine/for.rb
281
- spec/ruby-lint/virtual_machine/freeze.rb
282
- spec/ruby-lint/virtual_machine/interpolation.rb
283
- spec/ruby-lint/virtual_machine/methods/defining.rb
284
- spec/ruby-lint/virtual_machine/methods/exporting.rb
285
- spec/ruby-lint/virtual_machine/methods/parameters.rb
286
- spec/ruby-lint/virtual_machine/methods/patching.rb
287
- spec/ruby-lint/virtual_machine/methods/scoping.rb
288
- spec/ruby-lint/virtual_machine/methods/visibility.rb
289
- spec/ruby-lint/virtual_machine/modules.rb
290
- spec/ruby-lint/virtual_machine/reference_amount.rb
291
- spec/ruby-lint/virtual_machine/unused.rb
292
- spec/support/bacon.rb
257
+ spec/ruby-lint/analysis/argument_amount_spec.rb
258
+ spec/ruby-lint/analysis/base_spec.rb
259
+ spec/ruby-lint/analysis/pedantics_spec.rb
260
+ spec/ruby-lint/analysis/shadowing_variables_spec.rb
261
+ spec/ruby-lint/analysis/undefined_methods_spec.rb
262
+ spec/ruby-lint/analysis/undefined_variables_spec.rb
263
+ spec/ruby-lint/analysis/unused_variables_spec.rb
264
+ spec/ruby-lint/ast/node_spec.rb
265
+ spec/ruby-lint/cli/analyze_spec.rb
266
+ spec/ruby-lint/cli/ast_spec.rb
267
+ spec/ruby-lint/configuration_spec.rb
268
+ spec/ruby-lint/definition/constant_proxy_spec.rb
269
+ spec/ruby-lint/definition/dsl_spec.rb
270
+ spec/ruby-lint/definition/ruby_method_spec.rb
271
+ spec/ruby-lint/definition/ruby_object_spec.rb
272
+ spec/ruby-lint/definition_builder/primitive_spec.rb
273
+ spec/ruby-lint/definition_builder/ruby_class_spec.rb
274
+ spec/ruby-lint/definition_builder/ruby_method_spec.rb
275
+ spec/ruby-lint/definition_builder/ruby_module_spec.rb
276
+ spec/ruby-lint/docstring/mapping.rb
277
+ spec/ruby-lint/docstring/parser_spec.rb
278
+ spec/ruby-lint/extensions/string_spec.rb
279
+ spec/ruby-lint/file_loader_spec.rb
280
+ spec/ruby-lint/file_scanner_spec.rb
281
+ spec/ruby-lint/inspector_spec.rb
282
+ spec/ruby-lint/iterator_spec.rb
283
+ spec/ruby-lint/nested_stack_spec.rb
284
+ spec/ruby-lint/parser_spec.rb
285
+ spec/ruby-lint/presenter/json_spec.rb
286
+ spec/ruby-lint/presenter/text_spec.rb
287
+ spec/ruby-lint/report/entry_spec.rb
288
+ spec/ruby-lint/report_spec.rb
289
+ spec/ruby-lint/runner_spec.rb
290
+ spec/ruby-lint/virtual_machine/alias_spec.rb
291
+ spec/ruby-lint/virtual_machine/assignments/arrays_spec.rb
292
+ spec/ruby-lint/virtual_machine/assignments/hashes_spec.rb
293
+ spec/ruby-lint/virtual_machine/assignments/optional_spec.rb
294
+ spec/ruby-lint/virtual_machine/assignments/return_values_spec.rb
295
+ spec/ruby-lint/virtual_machine/assignments/variables_spec.rb
296
+ spec/ruby-lint/virtual_machine/associate_nodes_spec.rb
297
+ spec/ruby-lint/virtual_machine/autoloading_spec.rb
298
+ spec/ruby-lint/virtual_machine/blocks_spec.rb
299
+ spec/ruby-lint/virtual_machine/classes/class_methods_spec.rb
300
+ spec/ruby-lint/virtual_machine/classes/extending_spec.rb
301
+ spec/ruby-lint/virtual_machine/classes/redefining_spec.rb
302
+ spec/ruby-lint/virtual_machine/classes/sclass_spec.rb
303
+ spec/ruby-lint/virtual_machine/classes/scoping_spec.rb
304
+ spec/ruby-lint/virtual_machine/complex/rails_spec.rb
305
+ spec/ruby-lint/virtual_machine/complex/rcap_spec.rb
306
+ spec/ruby-lint/virtual_machine/complex/slop_spec.rb
307
+ spec/ruby-lint/virtual_machine/constants_spec.rb
308
+ spec/ruby-lint/virtual_machine/for_spec.rb
309
+ spec/ruby-lint/virtual_machine/freeze_spec.rb
310
+ spec/ruby-lint/virtual_machine/global_variables_spec.rb
311
+ spec/ruby-lint/virtual_machine/inherit_kernel_spec.rb
312
+ spec/ruby-lint/virtual_machine/interpolation_spec.rb
313
+ spec/ruby-lint/virtual_machine/methods/attr_spec.rb
314
+ spec/ruby-lint/virtual_machine/methods/define_method_spec.rb
315
+ spec/ruby-lint/virtual_machine/methods/defining_spec.rb
316
+ spec/ruby-lint/virtual_machine/methods/docstrings_spec.rb
317
+ spec/ruby-lint/virtual_machine/methods/exporting_spec.rb
318
+ spec/ruby-lint/virtual_machine/methods/parameters_spec.rb
319
+ spec/ruby-lint/virtual_machine/methods/patching_spec.rb
320
+ spec/ruby-lint/virtual_machine/methods/scoping_spec.rb
321
+ spec/ruby-lint/virtual_machine/methods/visibility_spec.rb
322
+ spec/ruby-lint/virtual_machine/modules_spec.rb
323
+ spec/ruby-lint/virtual_machine/reference_amount_spec.rb
324
+ spec/ruby-lint/virtual_machine/unused_spec.rb
325
+ spec/spec_helper.rb
293
326
  spec/support/building.rb
294
327
  spec/support/coveralls.rb
295
328
  spec/support/definitions.rb
296
329
  spec/support/fixtures.rb
297
330
  spec/support/parsing.rb
298
331
  spec/support/simplecov.rb
332
+ spec/support/versions.rb
299
333
  task/build.rake
300
334
  task/checksum.rake
301
- task/cop.rake
302
335
  task/coverage.rake
303
336
  task/doc.rake
304
337
  task/generate.rake
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # ruby-lint
2
2
 
3
3
  [![Build Status](https://travis-ci.org/YorickPeterse/ruby-lint.png?branch=master)](https://travis-ci.org/YorickPeterse/ruby-lint)
4
- [![Coverage Status](https://coveralls.io/repos/YorickPeterse/ruby-lint/badge.png?branch=develop)](https://coveralls.io/r/YorickPeterse/ruby-lint)
4
+ [![Coverage Status](https://coveralls.io/repos/YorickPeterse/ruby-lint/badge.png?branch=master)](https://coveralls.io/r/YorickPeterse/ruby-lint)
5
5
  [![Code Climate](https://codeclimate.com/github/YorickPeterse/ruby-lint.png)](https://codeclimate.com/github/YorickPeterse/ruby-lint)
6
6
 
7
7
  ruby-lint is a linter and static code analysis tool for Ruby. It is inspired by
@@ -18,7 +18,7 @@ The following Ruby implementations/versions are officially supported:
18
18
 
19
19
  * Ruby 1.9.3 or 2.0 and newer
20
20
  * Rubinius head running in 1.9 mode
21
- * Jruby head running in 1.8 mode
21
+ * Jruby head running in 1.9 mode
22
22
 
23
23
  Ruby implementations running a 1.8 based version of Ruby are not supported.
24
24
 
@@ -26,15 +26,15 @@ Ruby implementations running a 1.8 based version of Ruby are not supported.
26
26
 
27
27
  The easiest way to install ruby-lint is to install it from RubyGems:
28
28
 
29
- $ gem install ruby-lint
29
+ gem install ruby-lint
30
30
 
31
31
  If you prefer to install (and build) ruby-lint from the source code you can do
32
32
  so as following:
33
33
 
34
- $ git clone git://github.com/YorickPeterse/ruby-lint.git
35
- $ cd ruby-lint
36
- $ bundle install # you can also install the dependencies manually
37
- $ rake gem
34
+ git clone git://github.com/YorickPeterse/ruby-lint.git
35
+ cd ruby-lint
36
+ bundle install # you can also install the dependencies manually
37
+ rake build
38
38
 
39
39
  This builds a new version of the Gem and saves it in the pkg/ directory.
40
40
 
@@ -45,7 +45,7 @@ distributed as a `.gem` file the Gem is signed using GNUPG (using the
45
45
  [rubygems-openpgp][rubygems-openpgp] Gem). If you have this Gem installed it's
46
46
  recommended that you install ruby-lint as following:
47
47
 
48
- $ gem install ruby-lint --verify --trust
48
+ gem install ruby-lint --verify --trust
49
49
 
50
50
  Unless you have my GPG public key and have marked it as trusted this process
51
51
  will fail. For signing Gems I use the public key **3649F444** registered to
@@ -53,7 +53,7 @@ will fail. For signing Gems I use the public key **3649F444** registered to
53
53
 
54
54
  You can add this key by running the following command:
55
55
 
56
- $ gpg --recv-keys 3649F444
56
+ gpg --recv-keys 3649F444
57
57
 
58
58
  In case you don't use GPG but still want some form of verification you can use
59
59
  the checksums that are located in the "checksum" directory. These checksums are
@@ -65,10 +65,36 @@ command.
65
65
  Using ruby-lint from the CLI is very easy. To analyze a set of files
66
66
  you run the following:
67
67
 
68
- $ ruby-lint file1.rb file2.rb
68
+ ruby-lint file1.rb file2.rb
69
69
 
70
70
  For more information specify either the `-h` or `--help` option.
71
71
 
72
+ ## Example
73
+
74
+ Given the following code:
75
+
76
+ class Person
77
+ def initialize(name)
78
+ # oops, not setting @name
79
+ end
80
+
81
+ def greet
82
+ return "Hello, #{@name}"
83
+ end
84
+ end
85
+
86
+ user = Person.new('Alice')
87
+ greeting = user.greet
88
+
89
+ user.greet(:foo)
90
+
91
+ Analysing this file using ruby-lint (with the default settings) would result in
92
+ the following output:
93
+
94
+ test.rb: error: line 7, column 21: undefined instance variable @name
95
+ test.rb: warning: line 12, column 0: unused local variable greeting
96
+ test.rb: error: line 14, column 0: wrong number of arguments (expected 0 but got 1)
97
+
72
98
  ## Documentation
73
99
 
74
100
  * {file:contributing Contributing}