Server IP : 104.21.38.3 / Your IP : 162.158.106.172 Web Server : Apache System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/lib/ruby/gems/3.0.0/gems/rbs-1.0.4/ |
Upload File : |
rules: - id: rbs.no_mark pattern: 💪👽🚨 message: Do you forget to delete `arglists` section? glob: - "{core,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: - "{core,stdlib}/**/*.rbs" fail: - "def `send`: (String | Symbol arg0, *untyped arg1) -> untyped" pass: - "def `send`: (String | Symbol, *untyped) -> untyped" - id: rbs.prefer_boolish pattern: - regexp: '\([^(]*\bbool\b[^\n]*\)' - token: "-> bool }" message: | Prefer `boolish` over `bool` for method arguments and block return values See the doc below: https://github.com/ruby/rbs/blob/78d04a2db0f1c4925d2b13c2939868edf9465d6c/docs/syntax.md#bool-or-boolish glob: - "**/*.rbs" justification: - When you strictly want `true | false`. pass: - "(arg: boolish)" - "{ () -> boolish }" fail: - "(arg: bool)" - "{ () -> bool }" - 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 < Test::Unit::TestCase include TypeAssertions testing "Integer" def test_plus assert_send_type "(::Integer) -> ::Integer", 1, :+, 2 end end - id: no_trailing_whitespace pattern: regexp: '[ \t]+$' message: | Trim trailing whitespaces glob: - '**/*.rb' - '**/*.rbs' - '**/*.md' justification: - Let the maintainers know if it is an autogenerated files. pass: - "Hello world" - "Hello\nworld" - "Hello\n\nworld" fail: - "Hello world " - "Hello \nworld"