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.
- checksums.yaml +7 -0
- checksums.yaml.gz.asc +17 -0
- data.tar.gz.asc +14 -14
- data/.ruby-version +1 -0
- data/.travis.yml +0 -1
- data/.yardopts +1 -0
- data/CONTRIBUTING.md +41 -0
- data/MANIFEST +99 -66
- data/README.md +36 -10
- data/Rakefile +6 -0
- data/checksum/ruby-lint-0.0.4.gem.sha512 +1 -0
- data/doc/changelog.md +94 -0
- data/lib/ruby-lint.rb +18 -1
- data/lib/ruby-lint/analysis/argument_amount.rb +43 -10
- data/lib/ruby-lint/analysis/base.rb +23 -17
- data/lib/ruby-lint/analysis/pedantics.rb +3 -1
- data/lib/ruby-lint/analysis/undefined_methods.rb +48 -10
- data/lib/ruby-lint/analysis/unused_variables.rb +27 -5
- data/lib/ruby-lint/ast/node.rb +10 -0
- data/lib/ruby-lint/cli/analyze.rb +22 -4
- data/lib/ruby-lint/cli/base.rb +8 -2
- data/lib/ruby-lint/configuration.rb +43 -4
- data/lib/ruby-lint/definition/constant_proxy.rb +10 -1
- data/lib/ruby-lint/definition/ruby_method.rb +45 -31
- data/lib/ruby-lint/definition/ruby_object.rb +56 -15
- data/lib/ruby-lint/definition_builder/base.rb +4 -0
- data/lib/ruby-lint/definition_builder/primitive.rb +1 -1
- data/lib/ruby-lint/definition_builder/ruby_array.rb +1 -1
- data/lib/ruby-lint/definition_builder/ruby_block.rb +1 -0
- data/lib/ruby-lint/definition_builder/ruby_class.rb +1 -1
- data/lib/ruby-lint/definition_builder/ruby_hash.rb +1 -1
- data/lib/ruby-lint/definition_builder/ruby_module.rb +3 -1
- data/lib/ruby-lint/definition_generator.rb +15 -7
- data/lib/ruby-lint/definitions/core/arg0.rb +1 -1
- data/lib/ruby-lint/definitions/core/argf.rb +1 -1
- data/lib/ruby-lint/definitions/core/argument_error.rb +2 -2
- data/lib/ruby-lint/definitions/core/argv.rb +1 -1
- data/lib/ruby-lint/definitions/core/array.rb +6 -6
- data/lib/ruby-lint/definitions/core/autoload.rb +2 -2
- data/lib/ruby-lint/definitions/core/basic_object.rb +8 -12
- data/lib/ruby-lint/definitions/core/bignum.rb +2 -2
- data/lib/ruby-lint/definitions/core/binding.rb +2 -2
- data/lib/ruby-lint/definitions/core/class.rb +2 -2
- data/lib/ruby-lint/definitions/core/comparable.rb +1 -1
- data/lib/ruby-lint/definitions/core/complex.rb +4 -4
- data/lib/ruby-lint/definitions/core/condition_variable.rb +2 -2
- data/lib/ruby-lint/definitions/core/continuation.rb +2 -2
- data/lib/ruby-lint/definitions/core/data.rb +2 -2
- data/lib/ruby-lint/definitions/core/date.rb +34 -34
- data/lib/ruby-lint/definitions/core/date_time.rb +26 -26
- data/lib/ruby-lint/definitions/core/default_record_separator.rb +1 -1
- data/lib/ruby-lint/definitions/core/digest.rb +14 -14
- data/lib/ruby-lint/definitions/core/dir.rb +34 -34
- data/lib/ruby-lint/definitions/core/encoding.rb +237 -237
- data/lib/ruby-lint/definitions/core/encoding_error.rb +2 -2
- data/lib/ruby-lint/definitions/core/enumerable.rb +15 -15
- data/lib/ruby-lint/definitions/core/enumerator.rb +2 -2
- data/lib/ruby-lint/definitions/core/env.rb +1 -1
- data/lib/ruby-lint/definitions/core/eoferror.rb +2 -2
- data/lib/ruby-lint/definitions/core/erb.rb +30 -23
- data/lib/ruby-lint/definitions/core/errno.rb +525 -525
- data/lib/ruby-lint/definitions/core/etc.rb +6 -6
- data/lib/ruby-lint/definitions/core/exception.rb +2 -2
- data/lib/ruby-lint/definitions/core/false.rb +1 -1
- data/lib/ruby-lint/definitions/core/false_class.rb +2 -2
- data/lib/ruby-lint/definitions/core/fatal_error.rb +2 -2
- data/lib/ruby-lint/definitions/core/fiber.rb +2 -2
- data/lib/ruby-lint/definitions/core/fiber_error.rb +2 -2
- data/lib/ruby-lint/definitions/core/file.rb +68 -68
- data/lib/ruby-lint/definitions/core/file_list.rb +2 -2
- data/lib/ruby-lint/definitions/core/file_test.rb +1 -1
- data/lib/ruby-lint/definitions/core/file_utils.rb +16 -16
- data/lib/ruby-lint/definitions/core/fixnum.rb +4 -4
- data/lib/ruby-lint/definitions/core/float.rb +16 -16
- data/lib/ruby-lint/definitions/core/float_domain_error.rb +2 -2
- data/lib/ruby-lint/definitions/core/gc.rb +2 -2
- data/lib/ruby-lint/definitions/core/gem.rb +119 -119
- data/lib/ruby-lint/definitions/core/hash.rb +14 -14
- data/lib/ruby-lint/definitions/core/immediate_value.rb +1 -1
- data/lib/ruby-lint/definitions/core/index_error.rb +2 -2
- data/lib/ruby-lint/definitions/core/integer.rb +2 -2
- data/lib/ruby-lint/definitions/core/interrupt.rb +2 -2
- data/lib/ruby-lint/definitions/core/io.rb +38 -38
- data/lib/ruby-lint/definitions/core/ioerror.rb +2 -2
- data/lib/ruby-lint/definitions/core/kernel.rb +113 -60
- data/lib/ruby-lint/definitions/core/key_error.rb +2 -2
- data/lib/ruby-lint/definitions/core/load_error.rb +6 -6
- data/lib/ruby-lint/definitions/core/local_jump_error.rb +2 -2
- data/lib/ruby-lint/definitions/core/marshal.rb +35 -35
- data/lib/ruby-lint/definitions/core/match_data.rb +2 -2
- data/lib/ruby-lint/definitions/core/math.rb +7 -7
- data/lib/ruby-lint/definitions/core/memory_segmention_error.rb +2 -2
- data/lib/ruby-lint/definitions/core/method.rb +2 -2
- data/lib/ruby-lint/definitions/core/module.rb +39 -3
- data/lib/ruby-lint/definitions/core/monitor.rb +4 -4
- data/lib/ruby-lint/definitions/core/monitor_mixin.rb +5 -5
- data/lib/ruby-lint/definitions/core/mutex.rb +2 -2
- data/lib/ruby-lint/definitions/core/name_error.rb +2 -2
- data/lib/ruby-lint/definitions/core/nil.rb +1 -1
- data/lib/ruby-lint/definitions/core/nil_class.rb +2 -2
- data/lib/ruby-lint/definitions/core/no_memory_error.rb +2 -2
- data/lib/ruby-lint/definitions/core/no_method_error.rb +2 -2
- data/lib/ruby-lint/definitions/core/not_implemented_error.rb +2 -2
- data/lib/ruby-lint/definitions/core/numeric.rb +2 -2
- data/lib/ruby-lint/definitions/core/object.rb +2 -2
- data/lib/ruby-lint/definitions/core/object_space.rb +1 -1
- data/lib/ruby-lint/definitions/core/open_struct.rb +3 -3
- data/lib/ruby-lint/definitions/core/option_parser.rb +83 -83
- data/lib/ruby-lint/definitions/core/precision.rb +1 -1
- data/lib/ruby-lint/definitions/core/primitive_failure.rb +2 -2
- data/lib/ruby-lint/definitions/core/proc.rb +2 -2
- data/lib/ruby-lint/definitions/core/process.rb +29 -29
- data/lib/ruby-lint/definitions/core/queue.rb +2 -2
- data/lib/ruby-lint/definitions/core/rake.rb +117 -117
- data/lib/ruby-lint/definitions/core/rake_file_utils.rb +1 -1
- data/lib/ruby-lint/definitions/core/rakeversion.rb +1 -1
- data/lib/ruby-lint/definitions/core/random.rb +2 -2
- data/lib/ruby-lint/definitions/core/range.rb +4 -4
- data/lib/ruby-lint/definitions/core/range_error.rb +2 -2
- data/lib/ruby-lint/definitions/core/rational.rb +2 -2
- data/lib/ruby-lint/definitions/core/rb_config.rb +3 -3
- data/lib/ruby-lint/definitions/core/regexp.rb +28 -28
- data/lib/ruby-lint/definitions/core/regexp_error.rb +2 -2
- data/lib/ruby-lint/definitions/core/ruby_copyright.rb +1 -1
- data/lib/ruby-lint/definitions/core/ruby_description.rb +1 -1
- data/lib/ruby-lint/definitions/core/ruby_engine.rb +1 -1
- data/lib/ruby-lint/definitions/core/ruby_patchlevel.rb +1 -1
- data/lib/ruby-lint/definitions/core/ruby_platform.rb +1 -1
- data/lib/ruby-lint/definitions/core/ruby_release_date.rb +1 -1
- data/lib/ruby-lint/definitions/core/ruby_version.rb +1 -1
- data/lib/ruby-lint/definitions/core/runtime_error.rb +2 -2
- data/lib/ruby-lint/definitions/core/scan_error.rb +2 -2
- data/lib/ruby-lint/definitions/core/script_error.rb +2 -2
- data/lib/ruby-lint/definitions/core/security_error.rb +2 -2
- data/lib/ruby-lint/definitions/core/shellwords.rb +1 -1
- data/lib/ruby-lint/definitions/core/signal.rb +3 -3
- data/lib/ruby-lint/definitions/core/signal_exception.rb +2 -2
- data/lib/ruby-lint/definitions/core/singleton.rb +2 -2
- data/lib/ruby-lint/definitions/core/sized_queue.rb +2 -2
- data/lib/ruby-lint/definitions/core/standard_error.rb +2 -2
- data/lib/ruby-lint/definitions/core/stderr.rb +3 -2
- data/lib/ruby-lint/definitions/core/stdin.rb +3 -2
- data/lib/ruby-lint/definitions/core/stdout.rb +3 -2
- data/lib/ruby-lint/definitions/core/stop_iteration.rb +2 -2
- data/lib/ruby-lint/definitions/core/string.rb +21 -21
- data/lib/ruby-lint/definitions/core/string_io.rb +7 -7
- data/lib/ruby-lint/definitions/core/string_scanner.rb +4 -4
- data/lib/ruby-lint/definitions/core/struct.rb +20 -20
- data/lib/ruby-lint/definitions/core/syck.rb +4 -4
- data/lib/ruby-lint/definitions/core/symbol.rb +2 -2
- data/lib/ruby-lint/definitions/core/syntax_error.rb +2 -2
- data/lib/ruby-lint/definitions/core/system_call_error.rb +2 -2
- data/lib/ruby-lint/definitions/core/system_exit.rb +2 -2
- data/lib/ruby-lint/definitions/core/system_stack_error.rb +2 -2
- data/lib/ruby-lint/definitions/core/thread.rb +6 -6
- data/lib/ruby-lint/definitions/core/thread_error.rb +2 -2
- data/lib/ruby-lint/definitions/core/thread_group.rb +2 -2
- data/lib/ruby-lint/definitions/core/time.rb +3 -3
- data/lib/ruby-lint/definitions/core/toplevel_binding.rb +1 -1
- data/lib/ruby-lint/definitions/core/true.rb +1 -1
- data/lib/ruby-lint/definitions/core/true_class.rb +2 -2
- data/lib/ruby-lint/definitions/core/type_error.rb +2 -2
- data/lib/ruby-lint/definitions/core/unbound_method.rb +2 -2
- data/lib/ruby-lint/definitions/core/unmarshalable.rb +1 -1
- data/lib/ruby-lint/definitions/core/unsupported_library_error.rb +2 -2
- data/lib/ruby-lint/definitions/core/weak_ref.rb +4 -4
- data/lib/ruby-lint/definitions/core/yaml.rb +2361 -0
- data/lib/ruby-lint/definitions/core/zero_division_error.rb +2 -2
- data/lib/ruby-lint/definitions/global_variables.rb +9 -0
- data/lib/ruby-lint/definitions/rails/abstract_controller.rb +174 -28
- data/lib/ruby-lint/definitions/rails/action_controller.rb +4959 -550
- data/lib/ruby-lint/definitions/rails/action_dispatch.rb +2489 -292
- data/lib/ruby-lint/definitions/rails/action_mailer.rb +1285 -42
- data/lib/ruby-lint/definitions/rails/action_pack.rb +14 -6
- data/lib/ruby-lint/definitions/rails/action_view.rb +6941 -445
- data/lib/ruby-lint/definitions/rails/active_model.rb +1212 -69
- data/lib/ruby-lint/definitions/rails/active_record.rb +10344 -1450
- data/lib/ruby-lint/definitions/rails/active_support.rb +4631 -573
- data/lib/ruby-lint/definitions/rails/arel.rb +3211 -319
- data/lib/ruby-lint/definitions/rails/rails.rb +2922 -84
- data/lib/ruby-lint/definitions/rails/sprockets.rb +3048 -277
- data/lib/ruby-lint/docstring/mapping.rb +55 -0
- data/lib/ruby-lint/docstring/param_tag.rb +29 -0
- data/lib/ruby-lint/docstring/parser.rb +133 -0
- data/lib/ruby-lint/docstring/return_tag.rb +24 -0
- data/lib/ruby-lint/file_loader.rb +96 -0
- data/lib/ruby-lint/file_scanner.rb +91 -0
- data/lib/ruby-lint/global_scope.rb +56 -0
- data/lib/ruby-lint/helper/constant_paths.rb +1 -1
- data/lib/ruby-lint/inspector.rb +11 -33
- data/lib/ruby-lint/iterator.rb +31 -4
- data/lib/ruby-lint/method_call/alias.rb +46 -0
- data/lib/ruby-lint/method_call/assign_member.rb +55 -0
- data/lib/ruby-lint/method_call/attribute.rb +102 -0
- data/lib/ruby-lint/method_call/base.rb +37 -0
- data/lib/ruby-lint/method_call/define_method.rb +17 -0
- data/lib/ruby-lint/method_call/include.rb +39 -0
- data/lib/ruby-lint/parser.rb +9 -4
- data/lib/ruby-lint/presenter/text.rb +2 -1
- data/lib/ruby-lint/report.rb +19 -42
- data/lib/ruby-lint/report/entry.rb +20 -17
- data/lib/ruby-lint/runner.rb +92 -11
- data/lib/ruby-lint/template/definition.erb +2 -2
- data/lib/ruby-lint/variable_predicates.rb +7 -10
- data/lib/ruby-lint/version.rb +1 -1
- data/lib/ruby-lint/virtual_machine.rb +265 -188
- data/ruby-lint.gemspec +4 -4
- data/ruby-lint.yml +7 -0
- data/spec/fixtures/associating.rb +7 -0
- data/spec/fixtures/file_scanner/lib/example/recursive/source.rb +6 -0
- data/spec/fixtures/file_scanner/lib/example/recursive/target.rb +8 -0
- data/spec/fixtures/file_scanner/lib/example/user.rb +6 -0
- data/spec/fixtures/file_scanner/lib/test-dashes/foo.rb +4 -0
- data/spec/fixtures/file_scanner/rails/app/models/example/user.rb +6 -0
- data/spec/fixtures/file_scanner/rails/app/models/user.rb +4 -0
- data/spec/fixtures/uses_external.rb +1 -0
- data/spec/fixtures/uses_external_invalid.rb +3 -0
- data/spec/fixtures/uses_external_namespace.rb +1 -0
- data/spec/ruby-lint/analysis/{argument_amount.rb → argument_amount_spec.rb} +33 -7
- data/spec/ruby-lint/analysis/base_spec.rb +12 -0
- data/spec/ruby-lint/analysis/{pedantics.rb → pedantics_spec.rb} +24 -4
- data/spec/ruby-lint/analysis/{shadowing_variables.rb → shadowing_variables_spec.rb} +6 -6
- data/spec/ruby-lint/analysis/undefined_methods_spec.rb +320 -0
- data/spec/ruby-lint/analysis/{undefined_variables.rb → undefined_variables_spec.rb} +33 -10
- data/spec/ruby-lint/analysis/{unused_variables.rb → unused_variables_spec.rb} +36 -9
- data/spec/ruby-lint/ast/{node.rb → node_spec.rb} +12 -6
- data/spec/ruby-lint/cli/{analyze.rb → analyze_spec.rb} +16 -5
- data/spec/ruby-lint/cli/{ast.rb → ast_spec.rb} +3 -3
- data/spec/ruby-lint/configuration_spec.rb +106 -0
- data/spec/ruby-lint/definition/constant_proxy_spec.rb +54 -0
- data/spec/ruby-lint/definition/{dsl.rb → dsl_spec.rb} +15 -15
- data/spec/ruby-lint/definition/{ruby_method.rb → ruby_method_spec.rb} +31 -17
- data/spec/ruby-lint/definition/{ruby_object.rb → ruby_object_spec.rb} +28 -23
- data/spec/ruby-lint/definition_builder/{primitive.rb → primitive_spec.rb} +9 -9
- data/spec/ruby-lint/definition_builder/{ruby_class.rb → ruby_class_spec.rb} +13 -13
- data/spec/ruby-lint/definition_builder/{ruby_method.rb → ruby_method_spec.rb} +9 -9
- data/spec/ruby-lint/definition_builder/{ruby_module.rb → ruby_module_spec.rb} +12 -10
- data/spec/ruby-lint/docstring/mapping.rb +27 -0
- data/spec/ruby-lint/docstring/parser_spec.rb +88 -0
- data/spec/ruby-lint/extensions/{string.rb → string_spec.rb} +3 -3
- data/spec/ruby-lint/file_loader_spec.rb +69 -0
- data/spec/ruby-lint/file_scanner_spec.rb +51 -0
- data/spec/ruby-lint/inspector_spec.rb +44 -0
- data/spec/ruby-lint/{iterator.rb → iterator_spec.rb} +39 -4
- data/spec/ruby-lint/{nested_stack.rb → nested_stack_spec.rb} +4 -4
- data/spec/ruby-lint/parser_spec.rb +31 -0
- data/spec/ruby-lint/presenter/json_spec.rb +58 -0
- data/spec/ruby-lint/presenter/text_spec.rb +49 -0
- data/spec/ruby-lint/report/entry_spec.rb +58 -0
- data/spec/ruby-lint/report_spec.rb +39 -0
- data/spec/ruby-lint/runner_spec.rb +52 -0
- data/spec/ruby-lint/virtual_machine/alias_spec.rb +55 -0
- data/spec/ruby-lint/virtual_machine/assignments/{arrays.rb → arrays_spec.rb} +7 -7
- data/spec/ruby-lint/virtual_machine/assignments/{hashes.rb → hashes_spec.rb} +6 -6
- data/spec/ruby-lint/virtual_machine/assignments/{optional.rb → optional_spec.rb} +6 -6
- data/spec/ruby-lint/virtual_machine/assignments/{return_values.rb → return_values_spec.rb} +11 -11
- data/spec/ruby-lint/virtual_machine/assignments/{variables.rb → variables_spec.rb} +38 -7
- data/spec/ruby-lint/virtual_machine/associate_nodes_spec.rb +59 -0
- data/spec/ruby-lint/virtual_machine/{autoloading.rb → autoloading_spec.rb} +6 -6
- data/spec/ruby-lint/virtual_machine/{blocks.rb → blocks_spec.rb} +30 -4
- data/spec/ruby-lint/virtual_machine/classes/{class_methods.rb → class_methods_spec.rb} +3 -3
- data/spec/ruby-lint/virtual_machine/classes/{extending.rb → extending_spec.rb} +20 -15
- data/spec/ruby-lint/virtual_machine/classes/{redefining.rb → redefining_spec.rb} +3 -3
- data/spec/ruby-lint/virtual_machine/classes/{sclass.rb → sclass_spec.rb} +7 -7
- data/spec/ruby-lint/virtual_machine/classes/{scoping.rb → scoping_spec.rb} +5 -5
- data/spec/ruby-lint/virtual_machine/complex/{rails.rb → rails_spec.rb} +3 -3
- data/spec/ruby-lint/virtual_machine/complex/{rcap.rb → rcap_spec.rb} +3 -3
- data/spec/ruby-lint/virtual_machine/complex/{slop.rb → slop_spec.rb} +3 -3
- data/spec/ruby-lint/virtual_machine/constants_spec.rb +31 -0
- data/spec/ruby-lint/virtual_machine/{for.rb → for_spec.rb} +3 -3
- data/spec/ruby-lint/virtual_machine/{freeze.rb → freeze_spec.rb} +3 -3
- data/spec/ruby-lint/virtual_machine/global_variables_spec.rb +12 -0
- data/spec/ruby-lint/virtual_machine/inherit_kernel_spec.rb +15 -0
- data/spec/ruby-lint/virtual_machine/{interpolation.rb → interpolation_spec.rb} +3 -3
- data/spec/ruby-lint/virtual_machine/methods/attr_spec.rb +116 -0
- data/spec/ruby-lint/virtual_machine/methods/define_method_spec.rb +41 -0
- data/spec/ruby-lint/virtual_machine/methods/{defining.rb → defining_spec.rb} +4 -4
- data/spec/ruby-lint/virtual_machine/methods/docstrings_spec.rb +69 -0
- data/spec/ruby-lint/virtual_machine/methods/{exporting.rb → exporting_spec.rb} +3 -3
- data/spec/ruby-lint/virtual_machine/methods/{parameters.rb → parameters_spec.rb} +17 -5
- data/spec/ruby-lint/virtual_machine/methods/{patching.rb → patching_spec.rb} +4 -4
- data/spec/ruby-lint/virtual_machine/methods/{scoping.rb → scoping_spec.rb} +5 -5
- data/spec/ruby-lint/virtual_machine/methods/{visibility.rb → visibility_spec.rb} +6 -6
- data/spec/ruby-lint/virtual_machine/{modules.rb → modules_spec.rb} +39 -9
- data/spec/ruby-lint/virtual_machine/reference_amount_spec.rb +61 -0
- data/spec/ruby-lint/virtual_machine/{unused.rb → unused_spec.rb} +4 -4
- data/spec/{helper.rb → spec_helper.rb} +6 -4
- data/spec/support/building.rb +10 -6
- data/spec/support/coveralls.rb +1 -1
- data/spec/support/parsing.rb +10 -1
- data/spec/support/simplecov.rb +1 -1
- data/spec/support/versions.rb +9 -0
- data/task/test.rake +2 -4
- data/task/travis.rake +1 -0
- metadata +144 -143
- metadata.gz.asc +14 -14
- data/.rubocop.yml +0 -59
- data/doc/contributing.md +0 -16
- data/lib/ruby-lint/analysis/confusing_variables.rb +0 -26
- data/lib/ruby-lint/definitions/core/main.rb +0 -25
- data/lib/ruby-lint/definitions/core/psych.rb +0 -2231
- data/lib/ruby-lint/definitions/core/rubinius.rb +0 -16637
- data/lib/ruby-lint/definitions/core/ruby_lint.rb +0 -93
- data/spec/ruby-lint/analysis/confusing_variables.rb +0 -46
- data/spec/ruby-lint/analysis/undefined_methods.rb +0 -174
- data/spec/ruby-lint/configuration.rb +0 -54
- data/spec/ruby-lint/definition/constant_proxy.rb +0 -31
- data/spec/ruby-lint/parser.rb +0 -14
- data/spec/ruby-lint/presenter/json.rb +0 -31
- data/spec/ruby-lint/presenter/text.rb +0 -22
- data/spec/ruby-lint/report.rb +0 -50
- data/spec/ruby-lint/report/entry.rb +0 -28
- data/spec/ruby-lint/runner.rb +0 -32
- data/spec/ruby-lint/virtual_machine/associate_nodes.rb +0 -17
- data/spec/ruby-lint/virtual_machine/reference_amount.rb +0 -33
- data/spec/support/bacon.rb +0 -33
- 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.
|
2
|
+
Version: GnuPG v2.0.21 (GNU/Linux)
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
=
|
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
data/.yardopts
CHANGED
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
|
-
.
|
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/
|
236
|
-
spec/ruby-lint/analysis/
|
237
|
-
spec/ruby-lint/analysis/
|
238
|
-
spec/ruby-lint/analysis/
|
239
|
-
spec/ruby-lint/analysis/
|
240
|
-
spec/ruby-lint/analysis/
|
241
|
-
spec/ruby-lint/analysis/
|
242
|
-
spec/ruby-lint/
|
243
|
-
spec/ruby-lint/
|
244
|
-
spec/ruby-lint/cli/
|
245
|
-
spec/ruby-lint/
|
246
|
-
spec/ruby-lint/
|
247
|
-
spec/ruby-lint/definition/
|
248
|
-
spec/ruby-lint/definition/
|
249
|
-
spec/ruby-lint/definition/
|
250
|
-
spec/ruby-lint/
|
251
|
-
spec/ruby-lint/definition_builder/
|
252
|
-
spec/ruby-lint/definition_builder/
|
253
|
-
spec/ruby-lint/definition_builder/
|
254
|
-
spec/ruby-lint/
|
255
|
-
spec/ruby-lint/
|
256
|
-
spec/ruby-lint/
|
257
|
-
spec/ruby-lint/
|
258
|
-
spec/ruby-lint/
|
259
|
-
spec/ruby-lint/
|
260
|
-
spec/ruby-lint/
|
261
|
-
spec/ruby-lint/
|
262
|
-
spec/ruby-lint/
|
263
|
-
spec/ruby-lint/
|
264
|
-
spec/ruby-lint/
|
265
|
-
spec/ruby-lint/
|
266
|
-
spec/ruby-lint/
|
267
|
-
spec/ruby-lint/
|
268
|
-
spec/ruby-lint/virtual_machine/
|
269
|
-
spec/ruby-lint/virtual_machine/
|
270
|
-
spec/ruby-lint/virtual_machine/
|
271
|
-
spec/ruby-lint/virtual_machine/
|
272
|
-
spec/ruby-lint/virtual_machine/
|
273
|
-
spec/ruby-lint/virtual_machine/
|
274
|
-
spec/ruby-lint/virtual_machine/
|
275
|
-
spec/ruby-lint/virtual_machine/
|
276
|
-
spec/ruby-lint/virtual_machine/
|
277
|
-
spec/ruby-lint/virtual_machine/
|
278
|
-
spec/ruby-lint/virtual_machine/
|
279
|
-
spec/ruby-lint/virtual_machine/
|
280
|
-
spec/ruby-lint/virtual_machine/
|
281
|
-
spec/ruby-lint/virtual_machine/
|
282
|
-
spec/ruby-lint/virtual_machine/
|
283
|
-
spec/ruby-lint/virtual_machine/
|
284
|
-
spec/ruby-lint/virtual_machine/
|
285
|
-
spec/ruby-lint/virtual_machine/
|
286
|
-
spec/ruby-lint/virtual_machine/
|
287
|
-
spec/ruby-lint/virtual_machine/
|
288
|
-
spec/ruby-lint/virtual_machine/
|
289
|
-
spec/ruby-lint/virtual_machine/
|
290
|
-
spec/ruby-lint/virtual_machine/
|
291
|
-
spec/ruby-lint/virtual_machine/
|
292
|
-
spec/
|
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=
|
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.
|
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
|
-
|
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
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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}
|