Sha256: e227e6c8a6c806f69e5e19679e1a292ae8be55971793aaa89ea858b507e50bc7
Contents?: true
Size: 1.7 KB
Versions: 12
Compression:
Stored size: 1.7 KB
Contents
rules: - id: rbs.no_mark pattern: 💪👽🚨 message: Do you forget to delete `arglists` section? glob: - "stdlib/**/*.rbs" fail: - | # arglists 💪👽🚨 << Delete this section # File.absolute_path?(file_name) -> true or false # - id: rbs.no_arg pattern: regexp: arg\d+ message: | Stop using parameter names like `arg0` or `arg1` The parameter names like `arg0` or `arg1` is not informative enough. Try finding good parameter names from documents or arglists. If you cannot find a good name, just delete the name of the parameters. justification: - Documents (comments) may contain that pattern. glob: - "stdlib/**/*.rbs" fail: - "def `send`: (String | Symbol arg0, *untyped arg1) -> untyped" pass: - "def `send`: (String | Symbol, *untyped) -> untyped" - id: deprecate_stdlib_test pattern: token: < StdlibTest message: | StdlibTest is deprecated We recommend writing tests based on `TypeAssertions` and `#assert_send_type`. justification: - When you are updating existing tests. - When you are writing tests for callback, which cannot be done with `#assert_send_type`. glob: - "test/stdlib/**/*_test.rb" fail: - | class IntegerTest < StdlibTest target Integer def test_plus 1 + 2 end end pass: - | class IntegerTest < Minitest::Test include TypeAssertions testing "Integer" def test_plus assert_send_type "(::Integer) -> ::Integer", 1, :+, 2 end end
Version data entries
12 entries across 12 versions & 1 rubygems