0s autopkgtest [18:31:56]: starting date and time: 2026-02-09 18:31:56+0000 0s autopkgtest [18:31:56]: git checkout: 4b346b80 nova: make wait_reboot return success even when a no-op 0s autopkgtest [18:31:56]: host juju-7f2275-prod-proposed-migration-environment-2; command line: /home/ubuntu/autopkgtest/runner/autopkgtest --output-dir /tmp/autopkgtest-work.uhgntnyn/out --timeout-copy=6000 --needs-internet=try --setup-commands /home/ubuntu/autopkgtest-cloud/worker-config-production/setup-canonical.sh --apt-pocket=proposed=src:ruby-regexp-parser --apt-upgrade rubocop --timeout-short=300 --timeout-copy=20000 --timeout-build=20000 --env=ADT_TEST_TRIGGERS=ruby-regexp-parser/2.11.3-1 -- ssh -s /home/ubuntu/autopkgtest/ssh-setup/nova -- --flavor autopkgtest-cpu2-ram4-disk20-ppc64el --security-groups autopkgtest-juju-7f2275-prod-proposed-migration-environment-2@sto01-ppc64el-19.secgroup --name adt-resolute-ppc64el-rubocop-20260209-183155-juju-7f2275-prod-proposed-migration-environment-2-6ce88fb7-1c44-4058-be68-779fbd08ac55 --image adt/ubuntu-resolute-ppc64el-server --keyname testbed-juju-7f2275-prod-proposed-migration-environment-2 --net-id=net_prod-autopkgtest-workers-ppc64el -e TERM=linux --mirror=http://ftpmaster.internal/ubuntu/ 3s Creating nova instance adt-resolute-ppc64el-rubocop-20260209-183155-juju-7f2275-prod-proposed-migration-environment-2-6ce88fb7-1c44-4058-be68-779fbd08ac55 from image adt/ubuntu-resolute-ppc64el-server-20260209.img (UUID f7f31435-4cd1-4090-aa55-59cfefa097ca)... 112s autopkgtest [18:33:48]: testbed dpkg architecture: ppc64el 112s autopkgtest [18:33:48]: testbed apt version: 3.1.15 113s autopkgtest [18:33:49]: @@@@@@@@@@@@@@@@@@@@ test bed setup 113s autopkgtest [18:33:49]: testbed release detected to be: None 114s autopkgtest [18:33:50]: updating testbed package index (apt update) 114s Get:1 http://ftpmaster.internal/ubuntu resolute-proposed InRelease [124 kB] 114s Hit:2 http://ftpmaster.internal/ubuntu resolute InRelease 114s Hit:3 http://ftpmaster.internal/ubuntu resolute-updates InRelease 114s Hit:4 http://ftpmaster.internal/ubuntu resolute-security InRelease 114s Get:5 http://ftpmaster.internal/ubuntu resolute-proposed/main Sources [174 kB] 114s Get:6 http://ftpmaster.internal/ubuntu resolute-proposed/universe Sources [1630 kB] 116s Get:7 http://ftpmaster.internal/ubuntu resolute-proposed/multiverse Sources [29.4 kB] 116s Get:8 http://ftpmaster.internal/ubuntu resolute-proposed/restricted Sources [1764 B] 116s Get:9 http://ftpmaster.internal/ubuntu resolute-proposed/main ppc64el Packages [241 kB] 116s Get:10 http://ftpmaster.internal/ubuntu resolute-proposed/universe ppc64el Packages [1528 kB] 118s Get:11 http://ftpmaster.internal/ubuntu resolute-proposed/multiverse ppc64el Packages [19.4 kB] 118s Fetched 3747 kB in 4s (854 kB/s) 119s Reading package lists... 120s Hit:1 http://ftpmaster.internal/ubuntu resolute-proposed InRelease 120s Hit:2 http://ftpmaster.internal/ubuntu resolute InRelease 120s Hit:3 http://ftpmaster.internal/ubuntu resolute-updates InRelease 120s Hit:4 http://ftpmaster.internal/ubuntu resolute-security InRelease 121s Reading package lists... 121s Reading package lists... 121s Building dependency tree... 121s Reading state information... 121s Calculating upgrade... 121s The following packages will be upgraded: 121s cryptsetup-bin dracut-install iproute2 iptables libcryptsetup12 libip4tc2 121s libip6tc2 libxtables12 wget 121s 9 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 121s Need to get 3125 kB of archives. 121s After this operation, 78.8 kB of additional disk space will be used. 121s Get:1 http://ftpmaster.internal/ubuntu resolute/main ppc64el iptables ppc64el 1.8.11-2ubuntu3 [464 kB] 121s Get:2 http://ftpmaster.internal/ubuntu resolute/main ppc64el libip4tc2 ppc64el 1.8.11-2ubuntu3 [27.8 kB] 121s Get:3 http://ftpmaster.internal/ubuntu resolute/main ppc64el libip6tc2 ppc64el 1.8.11-2ubuntu3 [28.2 kB] 121s Get:4 http://ftpmaster.internal/ubuntu resolute/main ppc64el libxtables12 ppc64el 1.8.11-2ubuntu3 [41.2 kB] 121s Get:5 http://ftpmaster.internal/ubuntu resolute/main ppc64el iproute2 ppc64el 6.18.0-1ubuntu1 [1458 kB] 122s Get:6 http://ftpmaster.internal/ubuntu resolute/main ppc64el libcryptsetup12 ppc64el 2:2.8.0-1ubuntu3 [404 kB] 122s Get:7 http://ftpmaster.internal/ubuntu resolute/main ppc64el wget ppc64el 1.25.0-2ubuntu4 [401 kB] 123s Get:8 http://ftpmaster.internal/ubuntu resolute/main ppc64el cryptsetup-bin ppc64el 2:2.8.0-1ubuntu3 [250 kB] 123s Get:9 http://ftpmaster.internal/ubuntu resolute/main ppc64el dracut-install ppc64el 109-11ubuntu1 [51.3 kB] 123s dpkg-preconfigure: unable to re-open stdin: No such file or directory 123s Fetched 3125 kB in 2s (1862 kB/s) 123s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 122003 files and directories currently installed.) 123s Preparing to unpack .../0-iptables_1.8.11-2ubuntu3_ppc64el.deb ... 123s Unpacking iptables (1.8.11-2ubuntu3) over (1.8.11-2ubuntu2) ... 124s Preparing to unpack .../1-libip4tc2_1.8.11-2ubuntu3_ppc64el.deb ... 124s Unpacking libip4tc2:ppc64el (1.8.11-2ubuntu3) over (1.8.11-2ubuntu2) ... 124s Preparing to unpack .../2-libip6tc2_1.8.11-2ubuntu3_ppc64el.deb ... 124s Unpacking libip6tc2:ppc64el (1.8.11-2ubuntu3) over (1.8.11-2ubuntu2) ... 124s Preparing to unpack .../3-libxtables12_1.8.11-2ubuntu3_ppc64el.deb ... 124s Unpacking libxtables12:ppc64el (1.8.11-2ubuntu3) over (1.8.11-2ubuntu2) ... 124s Preparing to unpack .../4-iproute2_6.18.0-1ubuntu1_ppc64el.deb ... 124s Unpacking iproute2 (6.18.0-1ubuntu1) over (6.16.0-1ubuntu3) ... 124s Preparing to unpack .../5-libcryptsetup12_2%3a2.8.0-1ubuntu3_ppc64el.deb ... 124s Unpacking libcryptsetup12:ppc64el (2:2.8.0-1ubuntu3) over (2:2.8.0-1ubuntu2) ... 124s Preparing to unpack .../6-wget_1.25.0-2ubuntu4_ppc64el.deb ... 124s Unpacking wget (1.25.0-2ubuntu4) over (1.25.0-2ubuntu3) ... 125s Preparing to unpack .../7-cryptsetup-bin_2%3a2.8.0-1ubuntu3_ppc64el.deb ... 125s Unpacking cryptsetup-bin (2:2.8.0-1ubuntu3) over (2:2.8.0-1ubuntu2) ... 125s Preparing to unpack .../8-dracut-install_109-11ubuntu1_ppc64el.deb ... 125s Unpacking dracut-install (109-11ubuntu1) over (109-9ubuntu1) ... 125s Setting up libip4tc2:ppc64el (1.8.11-2ubuntu3) ... 125s Setting up wget (1.25.0-2ubuntu4) ... 125s Setting up libip6tc2:ppc64el (1.8.11-2ubuntu3) ... 125s Setting up libxtables12:ppc64el (1.8.11-2ubuntu3) ... 125s Setting up dracut-install (109-11ubuntu1) ... 125s Setting up libcryptsetup12:ppc64el (2:2.8.0-1ubuntu3) ... 125s Setting up cryptsetup-bin (2:2.8.0-1ubuntu3) ... 125s Setting up iptables (1.8.11-2ubuntu3) ... 125s Setting up iproute2 (6.18.0-1ubuntu1) ... 125s Processing triggers for man-db (2.13.1-1build1) ... 127s Processing triggers for install-info (7.2-5) ... 127s Processing triggers for libc-bin (2.42-2ubuntu4) ... 127s autopkgtest [18:34:03]: upgrading testbed (apt dist-upgrade and autopurge) 127s Reading package lists... 127s Building dependency tree... 127s Reading state information... 127s Calculating upgrade... 127s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 127s Reading package lists... 128s Building dependency tree... 128s Reading state information... 128s Solving dependencies... 128s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 130s autopkgtest [18:34:06]: testbed running kernel: Linux 6.19.0-3-generic #3-Ubuntu SMP PREEMPT_DYNAMIC Fri Jan 23 20:13:51 UTC 2026 131s autopkgtest [18:34:07]: @@@@@@@@@@@@@@@@@@@@ apt-source rubocop 133s Get:1 http://ftpmaster.internal/ubuntu resolute/universe rubocop 1.39.0+dfsg-1build1 (dsc) [2425 B] 133s Get:2 http://ftpmaster.internal/ubuntu resolute/universe rubocop 1.39.0+dfsg-1build1 (tar) [1029 kB] 133s Get:3 http://ftpmaster.internal/ubuntu resolute/universe rubocop 1.39.0+dfsg-1build1 (diff) [11.1 kB] 134s gpgv: Signature made Fri Jan 9 19:37:41 2026 UTC 134s gpgv: using RSA key 25E3FF2D7F469DBE7D0D4E50AFCFEC8E669CE1C2 134s gpgv: Can't check signature: No public key 134s dpkg-source: warning: cannot verify inline signature for ./rubocop_1.39.0+dfsg-1build1.dsc: no acceptable signature found 134s autopkgtest [18:34:10]: testing package rubocop version 1.39.0+dfsg-1build1 134s autopkgtest [18:34:10]: build not needed 136s autopkgtest [18:34:12]: test gem2deb-test-runner: preparing testbed 136s Reading package lists... 137s Building dependency tree... 137s Reading state information... 137s Solving dependencies... 137s The following NEW packages will be installed: 137s gem2deb-test-runner libjs-jquery libjs-jquery-easing libjs-jquery-fancybox 137s libjs-jquery-mousewheel libjs-jquery-ui libruby libruby3.3 pry racc rake 137s rubocop ruby ruby-addressable ruby-ast ruby-coderay ruby-crack ruby-csv 137s ruby-did-you-mean ruby-diff-lcs ruby-docile ruby-hashdiff ruby-json 137s ruby-method-source ruby-minitest ruby-net-telnet ruby-parallel 137s ruby-power-assert ruby-progressbar ruby-public-suffix ruby-rainbow 137s ruby-regexp-parser ruby-rspec ruby-rspec-core ruby-rspec-expectations 137s ruby-rspec-mocks ruby-rspec-support ruby-rubocop-ast ruby-ruby2-keywords 137s ruby-rubygems ruby-simplecov ruby-simplecov-html ruby-test-unit 137s ruby-unicode-display-width ruby-webmock ruby-webrick ruby-whitequark-parser 137s ruby-xmlrpc ruby3.3 rubygems-integration 137s 0 upgraded, 50 newly installed, 0 to remove and 0 not upgraded. 137s Need to get 10.3 MB of archives. 137s After this operation, 64.6 MB of additional disk space will be used. 137s Get:1 http://ftpmaster.internal/ubuntu resolute/main ppc64el rubygems-integration all 1.19build1 [5666 B] 137s Get:2 http://ftpmaster.internal/ubuntu resolute/main ppc64el ruby-csv all 3.3.4-1 [43.0 kB] 137s Get:3 http://ftpmaster.internal/ubuntu resolute/main ppc64el ruby-did-you-mean all 1.6.3-2build1 [14.9 kB] 137s Get:4 http://ftpmaster.internal/ubuntu resolute/main ppc64el ruby-net-telnet all 0.2.0-1build1 [13.5 kB] 137s Get:5 http://ftpmaster.internal/ubuntu resolute/main ppc64el ruby-ruby2-keywords all 0.0.5-1build1 [4398 B] 137s Get:6 http://ftpmaster.internal/ubuntu resolute/main ppc64el ruby-webrick all 1.9.1-1build1 [60.9 kB] 137s Get:7 http://ftpmaster.internal/ubuntu resolute/main ppc64el ruby-xmlrpc all 0.3.3-2build1 [24.9 kB] 137s Get:8 http://ftpmaster.internal/ubuntu resolute/main ppc64el libruby3.3 ppc64el 3.3.8-2ubuntu2 [6368 kB] 143s Get:9 http://ftpmaster.internal/ubuntu resolute/main ppc64el ruby3.3 ppc64el 3.3.8-2ubuntu2 [58.9 kB] 143s Get:10 http://ftpmaster.internal/ubuntu resolute/main ppc64el libruby ppc64el 1:3.3 [5172 B] 143s Get:11 http://ftpmaster.internal/ubuntu resolute/main ppc64el ruby-rubygems all 3.6.7-2ubuntu2 [332 kB] 143s Get:12 http://ftpmaster.internal/ubuntu resolute/main ppc64el ruby ppc64el 1:3.3 [3666 B] 143s Get:13 http://ftpmaster.internal/ubuntu resolute/main ppc64el rake all 13.2.1-1build1 [45.9 kB] 143s Get:14 http://ftpmaster.internal/ubuntu resolute/universe ppc64el ruby-minitest all 5.26.1-1 [49.3 kB] 143s Get:15 http://ftpmaster.internal/ubuntu resolute/universe ppc64el ruby-power-assert all 3.0.1-1 [11.4 kB] 143s Get:16 http://ftpmaster.internal/ubuntu resolute/universe ppc64el ruby-test-unit all 3.6.2-1 [67.0 kB] 143s Get:17 http://ftpmaster.internal/ubuntu resolute/universe ppc64el gem2deb-test-runner ppc64el 2.2.5 [18.3 kB] 143s Get:18 http://ftpmaster.internal/ubuntu resolute/main ppc64el libjs-jquery all 3.7.1+dfsg+~3.5.33-1build1 [321 kB] 143s Get:19 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libjs-jquery-easing all 12-4build1 [7078 B] 143s Get:20 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libjs-jquery-mousewheel all 1:3.1.13-5 [6324 B] 143s Get:21 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libjs-jquery-fancybox all 12-4build1 [45.8 kB] 143s Get:22 http://ftpmaster.internal/ubuntu resolute/universe ppc64el libjs-jquery-ui all 1.13.2+dfsg-1build1 [251 kB] 143s Get:23 http://ftpmaster.internal/ubuntu resolute/universe ppc64el ruby-coderay all 1.1.3-8build1 [78.4 kB] 143s Get:24 http://ftpmaster.internal/ubuntu resolute/universe ppc64el ruby-method-source all 1.1.0-1 [8502 B] 143s Get:25 http://ftpmaster.internal/ubuntu resolute/universe ppc64el pry all 0.15.2-1 [122 kB] 143s Get:26 http://ftpmaster.internal/ubuntu resolute/universe ppc64el racc all 1.8.1-2 [71.5 kB] 143s Get:27 http://ftpmaster.internal/ubuntu resolute/main ppc64el ruby-json ppc64el 2.15.2+dfsg-1 [76.8 kB] 143s Get:28 http://ftpmaster.internal/ubuntu resolute/universe ppc64el ruby-progressbar all 1.11.0-1 [16.3 kB] 143s Get:29 http://ftpmaster.internal/ubuntu resolute/universe ppc64el ruby-parallel all 1.27.0-1 [13.5 kB] 143s Get:30 http://ftpmaster.internal/ubuntu resolute/universe ppc64el ruby-ast all 2.4.3-1 [10.8 kB] 143s Get:31 http://ftpmaster.internal/ubuntu resolute/universe ppc64el ruby-whitequark-parser all 3.3.4.2-2 [511 kB] 143s Get:32 http://ftpmaster.internal/ubuntu resolute/universe ppc64el ruby-rainbow all 3.1.1-1 [12.4 kB] 143s Get:33 http://ftpmaster.internal/ubuntu resolute-proposed/universe ppc64el ruby-regexp-parser all 2.11.3-1 [58.1 kB] 143s Get:34 http://ftpmaster.internal/ubuntu resolute/universe ppc64el ruby-rubocop-ast all 1.24.0-2 [50.3 kB] 143s Get:35 http://ftpmaster.internal/ubuntu resolute/universe ppc64el ruby-unicode-display-width all 1.6.1-1 [8904 B] 143s Get:36 http://ftpmaster.internal/ubuntu resolute/universe ppc64el rubocop all 1.39.0+dfsg-1build1 [455 kB] 143s Get:37 http://ftpmaster.internal/ubuntu resolute/universe ppc64el ruby-public-suffix all 6.0.2-1.1 [14.6 kB] 143s Get:38 http://ftpmaster.internal/ubuntu resolute/universe ppc64el ruby-addressable all 2.8.7-2 [55.4 kB] 143s Get:39 http://ftpmaster.internal/ubuntu resolute/universe ppc64el ruby-crack all 0.4.4-4 [8764 B] 143s Get:40 http://ftpmaster.internal/ubuntu resolute/universe ppc64el ruby-diff-lcs all 1.5.1-1 [22.8 kB] 143s Get:41 http://ftpmaster.internal/ubuntu resolute/universe ppc64el ruby-docile all 1.4.1-1 [7038 B] 143s Get:42 http://ftpmaster.internal/ubuntu resolute/universe ppc64el ruby-hashdiff all 1.2.1-1 [13.8 kB] 143s Get:43 http://ftpmaster.internal/ubuntu resolute/universe ppc64el ruby-rspec-support all 3.13.0c0e0m0s1-2 [29.2 kB] 143s Get:44 http://ftpmaster.internal/ubuntu resolute/universe ppc64el ruby-rspec-core all 3.13.0c0e0m0s1-2 [164 kB] 143s Get:45 http://ftpmaster.internal/ubuntu resolute/universe ppc64el ruby-rspec-expectations all 3.13.0c0e0m0s1-2 [89.8 kB] 143s Get:46 http://ftpmaster.internal/ubuntu resolute/universe ppc64el ruby-rspec-mocks all 3.13.0c0e0m0s1-2 [81.0 kB] 143s Get:47 http://ftpmaster.internal/ubuntu resolute/universe ppc64el ruby-rspec all 3.13.0c0e0m0s1-2 [3500 B] 143s Get:48 http://ftpmaster.internal/ubuntu resolute/universe ppc64el ruby-simplecov-html all 0.12.3-2 [477 kB] 143s Get:49 http://ftpmaster.internal/ubuntu resolute/universe ppc64el ruby-simplecov all 0.22.0-2 [40.9 kB] 143s Get:50 http://ftpmaster.internal/ubuntu resolute/universe ppc64el ruby-webmock all 3.25.1-1 [48.0 kB] 143s Fetched 10.3 MB in 6s (1664 kB/s) 143s Selecting previously unselected package rubygems-integration. 143s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 122006 files and directories currently installed.) 143s Preparing to unpack .../00-rubygems-integration_1.19build1_all.deb ... 143s Unpacking rubygems-integration (1.19build1) ... 143s Selecting previously unselected package ruby-csv. 143s Preparing to unpack .../01-ruby-csv_3.3.4-1_all.deb ... 143s Unpacking ruby-csv (3.3.4-1) ... 143s Selecting previously unselected package ruby-did-you-mean. 143s Preparing to unpack .../02-ruby-did-you-mean_1.6.3-2build1_all.deb ... 143s Unpacking ruby-did-you-mean (1.6.3-2build1) ... 143s Selecting previously unselected package ruby-net-telnet. 143s Preparing to unpack .../03-ruby-net-telnet_0.2.0-1build1_all.deb ... 143s Unpacking ruby-net-telnet (0.2.0-1build1) ... 143s Selecting previously unselected package ruby-ruby2-keywords. 143s Preparing to unpack .../04-ruby-ruby2-keywords_0.0.5-1build1_all.deb ... 143s Unpacking ruby-ruby2-keywords (0.0.5-1build1) ... 143s Selecting previously unselected package ruby-webrick. 143s Preparing to unpack .../05-ruby-webrick_1.9.1-1build1_all.deb ... 143s Unpacking ruby-webrick (1.9.1-1build1) ... 143s Selecting previously unselected package ruby-xmlrpc. 143s Preparing to unpack .../06-ruby-xmlrpc_0.3.3-2build1_all.deb ... 143s Unpacking ruby-xmlrpc (0.3.3-2build1) ... 143s Selecting previously unselected package libruby3.3:ppc64el. 143s Preparing to unpack .../07-libruby3.3_3.3.8-2ubuntu2_ppc64el.deb ... 143s Unpacking libruby3.3:ppc64el (3.3.8-2ubuntu2) ... 144s Selecting previously unselected package ruby3.3. 144s Preparing to unpack .../08-ruby3.3_3.3.8-2ubuntu2_ppc64el.deb ... 144s Unpacking ruby3.3 (3.3.8-2ubuntu2) ... 144s Selecting previously unselected package libruby:ppc64el. 144s Preparing to unpack .../09-libruby_1%3a3.3_ppc64el.deb ... 144s Unpacking libruby:ppc64el (1:3.3) ... 144s Selecting previously unselected package ruby-rubygems. 144s Preparing to unpack .../10-ruby-rubygems_3.6.7-2ubuntu2_all.deb ... 144s Unpacking ruby-rubygems (3.6.7-2ubuntu2) ... 144s Selecting previously unselected package ruby. 144s Preparing to unpack .../11-ruby_1%3a3.3_ppc64el.deb ... 144s Unpacking ruby (1:3.3) ... 144s Selecting previously unselected package rake. 144s Preparing to unpack .../12-rake_13.2.1-1build1_all.deb ... 144s Unpacking rake (13.2.1-1build1) ... 144s Selecting previously unselected package ruby-minitest. 144s Preparing to unpack .../13-ruby-minitest_5.26.1-1_all.deb ... 144s Unpacking ruby-minitest (5.26.1-1) ... 144s Selecting previously unselected package ruby-power-assert. 144s Preparing to unpack .../14-ruby-power-assert_3.0.1-1_all.deb ... 144s Unpacking ruby-power-assert (3.0.1-1) ... 144s Selecting previously unselected package ruby-test-unit. 144s Preparing to unpack .../15-ruby-test-unit_3.6.2-1_all.deb ... 144s Unpacking ruby-test-unit (3.6.2-1) ... 144s Selecting previously unselected package gem2deb-test-runner. 144s Preparing to unpack .../16-gem2deb-test-runner_2.2.5_ppc64el.deb ... 144s Unpacking gem2deb-test-runner (2.2.5) ... 144s Selecting previously unselected package libjs-jquery. 144s Preparing to unpack .../17-libjs-jquery_3.7.1+dfsg+~3.5.33-1build1_all.deb ... 144s Unpacking libjs-jquery (3.7.1+dfsg+~3.5.33-1build1) ... 144s Selecting previously unselected package libjs-jquery-easing. 144s Preparing to unpack .../18-libjs-jquery-easing_12-4build1_all.deb ... 144s Unpacking libjs-jquery-easing (12-4build1) ... 144s Selecting previously unselected package libjs-jquery-mousewheel. 144s Preparing to unpack .../19-libjs-jquery-mousewheel_1%3a3.1.13-5_all.deb ... 144s Unpacking libjs-jquery-mousewheel (1:3.1.13-5) ... 144s Selecting previously unselected package libjs-jquery-fancybox. 144s Preparing to unpack .../20-libjs-jquery-fancybox_12-4build1_all.deb ... 144s Unpacking libjs-jquery-fancybox (12-4build1) ... 144s Selecting previously unselected package libjs-jquery-ui. 144s Preparing to unpack .../21-libjs-jquery-ui_1.13.2+dfsg-1build1_all.deb ... 144s Unpacking libjs-jquery-ui (1.13.2+dfsg-1build1) ... 144s Selecting previously unselected package ruby-coderay. 144s Preparing to unpack .../22-ruby-coderay_1.1.3-8build1_all.deb ... 144s Unpacking ruby-coderay (1.1.3-8build1) ... 144s Selecting previously unselected package ruby-method-source. 144s Preparing to unpack .../23-ruby-method-source_1.1.0-1_all.deb ... 144s Unpacking ruby-method-source (1.1.0-1) ... 144s Selecting previously unselected package pry. 144s Preparing to unpack .../24-pry_0.15.2-1_all.deb ... 144s Unpacking pry (0.15.2-1) ... 144s Selecting previously unselected package racc. 144s Preparing to unpack .../25-racc_1.8.1-2_all.deb ... 144s Unpacking racc (1.8.1-2) ... 144s Selecting previously unselected package ruby-json:ppc64el. 144s Preparing to unpack .../26-ruby-json_2.15.2+dfsg-1_ppc64el.deb ... 144s Unpacking ruby-json:ppc64el (2.15.2+dfsg-1) ... 144s Selecting previously unselected package ruby-progressbar. 144s Preparing to unpack .../27-ruby-progressbar_1.11.0-1_all.deb ... 144s Unpacking ruby-progressbar (1.11.0-1) ... 144s Selecting previously unselected package ruby-parallel. 144s Preparing to unpack .../28-ruby-parallel_1.27.0-1_all.deb ... 144s Unpacking ruby-parallel (1.27.0-1) ... 144s Selecting previously unselected package ruby-ast. 144s Preparing to unpack .../29-ruby-ast_2.4.3-1_all.deb ... 144s Unpacking ruby-ast (2.4.3-1) ... 144s Selecting previously unselected package ruby-whitequark-parser. 144s Preparing to unpack .../30-ruby-whitequark-parser_3.3.4.2-2_all.deb ... 144s Unpacking ruby-whitequark-parser (3.3.4.2-2) ... 144s Selecting previously unselected package ruby-rainbow. 144s Preparing to unpack .../31-ruby-rainbow_3.1.1-1_all.deb ... 144s Unpacking ruby-rainbow (3.1.1-1) ... 144s Selecting previously unselected package ruby-regexp-parser. 144s Preparing to unpack .../32-ruby-regexp-parser_2.11.3-1_all.deb ... 144s Unpacking ruby-regexp-parser (2.11.3-1) ... 144s Selecting previously unselected package ruby-rubocop-ast. 144s Preparing to unpack .../33-ruby-rubocop-ast_1.24.0-2_all.deb ... 144s Unpacking ruby-rubocop-ast (1.24.0-2) ... 144s Selecting previously unselected package ruby-unicode-display-width. 144s Preparing to unpack .../34-ruby-unicode-display-width_1.6.1-1_all.deb ... 144s Unpacking ruby-unicode-display-width (1.6.1-1) ... 144s Selecting previously unselected package rubocop. 144s Preparing to unpack .../35-rubocop_1.39.0+dfsg-1build1_all.deb ... 144s Unpacking rubocop (1.39.0+dfsg-1build1) ... 144s Selecting previously unselected package ruby-public-suffix. 144s Preparing to unpack .../36-ruby-public-suffix_6.0.2-1.1_all.deb ... 144s Unpacking ruby-public-suffix (6.0.2-1.1) ... 144s Selecting previously unselected package ruby-addressable. 144s Preparing to unpack .../37-ruby-addressable_2.8.7-2_all.deb ... 144s Unpacking ruby-addressable (2.8.7-2) ... 144s Selecting previously unselected package ruby-crack. 144s Preparing to unpack .../38-ruby-crack_0.4.4-4_all.deb ... 144s Unpacking ruby-crack (0.4.4-4) ... 144s Selecting previously unselected package ruby-diff-lcs. 144s Preparing to unpack .../39-ruby-diff-lcs_1.5.1-1_all.deb ... 144s Unpacking ruby-diff-lcs (1.5.1-1) ... 144s Selecting previously unselected package ruby-docile. 144s Preparing to unpack .../40-ruby-docile_1.4.1-1_all.deb ... 145s Unpacking ruby-docile (1.4.1-1) ... 145s Selecting previously unselected package ruby-hashdiff. 145s Preparing to unpack .../41-ruby-hashdiff_1.2.1-1_all.deb ... 145s Unpacking ruby-hashdiff (1.2.1-1) ... 145s Selecting previously unselected package ruby-rspec-support. 145s Preparing to unpack .../42-ruby-rspec-support_3.13.0c0e0m0s1-2_all.deb ... 145s Unpacking ruby-rspec-support (3.13.0c0e0m0s1-2) ... 145s Selecting previously unselected package ruby-rspec-core. 145s Preparing to unpack .../43-ruby-rspec-core_3.13.0c0e0m0s1-2_all.deb ... 145s Unpacking ruby-rspec-core (3.13.0c0e0m0s1-2) ... 145s Selecting previously unselected package ruby-rspec-expectations. 145s Preparing to unpack .../44-ruby-rspec-expectations_3.13.0c0e0m0s1-2_all.deb ... 145s Unpacking ruby-rspec-expectations (3.13.0c0e0m0s1-2) ... 145s Selecting previously unselected package ruby-rspec-mocks. 145s Preparing to unpack .../45-ruby-rspec-mocks_3.13.0c0e0m0s1-2_all.deb ... 145s Unpacking ruby-rspec-mocks (3.13.0c0e0m0s1-2) ... 145s Selecting previously unselected package ruby-rspec. 145s Preparing to unpack .../46-ruby-rspec_3.13.0c0e0m0s1-2_all.deb ... 145s Unpacking ruby-rspec (3.13.0c0e0m0s1-2) ... 145s Selecting previously unselected package ruby-simplecov-html. 145s Preparing to unpack .../47-ruby-simplecov-html_0.12.3-2_all.deb ... 145s Unpacking ruby-simplecov-html (0.12.3-2) ... 145s Selecting previously unselected package ruby-simplecov. 145s Preparing to unpack .../48-ruby-simplecov_0.22.0-2_all.deb ... 145s Unpacking ruby-simplecov (0.22.0-2) ... 145s Selecting previously unselected package ruby-webmock. 145s Preparing to unpack .../49-ruby-webmock_3.25.1-1_all.deb ... 145s Unpacking ruby-webmock (3.25.1-1) ... 145s Setting up ruby-rainbow (3.1.1-1) ... 145s Setting up ruby-ruby2-keywords (0.0.5-1build1) ... 145s Setting up ruby-regexp-parser (2.11.3-1) ... 145s Setting up ruby-power-assert (3.0.1-1) ... 145s Setting up ruby-hashdiff (1.2.1-1) ... 145s Setting up ruby-public-suffix (6.0.2-1.1) ... 145s Setting up libjs-jquery-mousewheel (1:3.1.13-5) ... 145s Setting up rubygems-integration (1.19build1) ... 145s Setting up ruby-minitest (5.26.1-1) ... 145s Setting up ruby-method-source (1.1.0-1) ... 145s Setting up ruby-test-unit (3.6.2-1) ... 145s Setting up ruby-ast (2.4.3-1) ... 145s Setting up ruby-net-telnet (0.2.0-1build1) ... 145s Setting up ruby-csv (3.3.4-1) ... 145s Setting up ruby-rspec-support (3.13.0c0e0m0s1-2) ... 145s Setting up ruby-webrick (1.9.1-1build1) ... 145s Setting up ruby-progressbar (1.11.0-1) ... 145s Setting up ruby-docile (1.4.1-1) ... 145s Setting up libjs-jquery (3.7.1+dfsg+~3.5.33-1build1) ... 145s Setting up ruby-did-you-mean (1.6.3-2build1) ... 145s Setting up ruby-xmlrpc (0.3.3-2build1) ... 145s Setting up libjs-jquery-easing (12-4build1) ... 145s Setting up ruby-addressable (2.8.7-2) ... 145s Setting up libjs-jquery-fancybox (12-4build1) ... 145s Setting up ruby-parallel (1.27.0-1) ... 145s Setting up libjs-jquery-ui (1.13.2+dfsg-1build1) ... 145s Setting up rake (13.2.1-1build1) ... 145s Setting up libruby3.3:ppc64el (3.3.8-2ubuntu2) ... 145s Setting up ruby-rubygems (3.6.7-2ubuntu2) ... 145s Setting up ruby3.3 (3.3.8-2ubuntu2) ... 145s Setting up libruby:ppc64el (1:3.3) ... 145s Setting up ruby (1:3.3) ... 145s Setting up racc (1.8.1-2) ... 145s Setting up ruby-json:ppc64el (2.15.2+dfsg-1) ... 145s Setting up ruby-coderay (1.1.3-8build1) ... 145s Setting up ruby-rspec-core (3.13.0c0e0m0s1-2) ... 145s Setting up ruby-unicode-display-width (1.6.1-1) ... 145s Setting up pry (0.15.2-1) ... 145s Setting up ruby-diff-lcs (1.5.1-1) ... 145s Setting up ruby-whitequark-parser (3.3.4.2-2) ... 145s Setting up ruby-simplecov-html (0.12.3-2) ... 145s Setting up ruby-crack (0.4.4-4) ... 145s Setting up gem2deb-test-runner (2.2.5) ... 145s Setting up ruby-rubocop-ast (1.24.0-2) ... 145s Setting up ruby-simplecov (0.22.0-2) ... 145s Setting up ruby-rspec-expectations (3.13.0c0e0m0s1-2) ... 145s Setting up rubocop (1.39.0+dfsg-1build1) ... 145s Setting up ruby-rspec-mocks (3.13.0c0e0m0s1-2) ... 145s Setting up ruby-webmock (3.25.1-1) ... 145s Setting up ruby-rspec (3.13.0c0e0m0s1-2) ... 145s Processing triggers for libc-bin (2.42-2ubuntu4) ... 145s Processing triggers for man-db (2.13.1-1build1) ... 146s autopkgtest [18:34:22]: test gem2deb-test-runner: gem2deb-test-runner --autopkgtest --check-dependencies 2>&1 146s autopkgtest [18:34:22]: test gem2deb-test-runner: [----------------------- 146s 146s ┌──────────────────────────────────────────────────────────────────────────────┐ 146s │ Checking Rubygems dependency resolution on ruby3.3 │ 146s └──────────────────────────────────────────────────────────────────────────────┘ 146s 146s RUBYLIB=. GEM_PATH= ruby3.3 -e gem\ \"rubocop\" 146s mv lib ./.gem2deb.lib 146s mv ./.gem2deb.lib lib 146s 146s ┌──────────────────────────────────────────────────────────────────────────────┐ 146s │ Run tests for ruby3.3 from debian/ruby-tests.rake │ 146s └──────────────────────────────────────────────────────────────────────────────┘ 146s 146s RUBYLIB=. GEM_PATH= ruby3.3 -S rake --rakelibdir /gem2deb-nonexistent -f debian/ruby-tests.rake 146s mv lib ./.gem2deb.lib 147s /usr/bin/ruby3.3 -I/usr/share/rubygems-integration/all/gems/rspec-support-3.13.1/lib:/usr/share/rubygems-integration/all/gems/rspec-core-3.13.0/lib /usr/share/rubygems-integration/all/gems/rspec-core-3.13.0/exe/rspec --pattern ./spec/\*\*/\*_spec.rb --exclude-pattern spec/rubocop/config_loader_spec.rb,spec/project_spec.rb,spec/rubocop/cli/options_spec.rb,spec/rubocop/cli/suggest_extensions_spec.rb,spec/rubocop/config_obsoletion_spec.rb,spec/rubocop/lockfile_spec.rb,spec/rubocop/server/rubocop_server_spec.rb,spec/rubocop/version_spec.rb,./spec/rubocop/cop/generator_spec.rb --format documentation 151s 151s Randomized with seed 53014 151s 151s RuboCop::Cop::Layout::IndentationStyle 151s when EnforcedStyle is tabs 151s accepts a line which begins with tab in a string 151s registers and corrects an offense for a line indented with multiple spaces 151s registers offenses before __END__ but not after 151s accepts a line which begins with tab in a multiline heredoc 151s accepts a line which begins with tab in a heredoc 151s registers and corrects an offense for a line indented with fractional number ofindentation groups by rounding down 151s accepts a line a tab other than indentation 151s registers and corrects an offense for a line indented with space 151s accepts a line with tabs between string literals 151s registers an offense for a line indented with mixed whitespace 151s accepts a line with tab in a string 151s registers and corrects an offense for a line with tab in a string indented with space 151s custom indentation width 151s uses the configured number of spaces to replace with a tab 151s when EnforcedStyle is spaces 151s accepts a line with tab in a string 151s accepts a line which begins with tab in a heredoc 151s accepts a line which begins with tab in a multiline heredoc 151s registers and corrects an offense for a line with tab in a string indented with tab 151s registers and corrects an offense for a line indented with multiple tabs 151s registers and corrects an offense for a line indented with mixed whitespaces 151s accepts a line with a tab between string literals 151s registers offenses before __END__ but not after 151s registers and corrects an offense for a line indented with tab 151s accepts a line which begins with tab in a string 151s accepts a line with a tab other than indentation 151s custom indentation width 151s uses the configured number of spaces to replace a tab 151s 151s RuboCop::Cop::Style::BeginBlock 151s reports an offense for a BEGIN block 151s 151s RuboCop::Cop::Layout::EmptyLineBetweenDefs 151s accepts a def that follows an empty line and then a comment 152s autocorrects when there are too many new lines 152s registers an offense for adjacent one-liners by default 152s registers an offense for multiple one-liners on the same line 152s accepts a def that follows code and a comment 152s treats lines with whitespaces as blank 152s doesn't allow more than the required number of newlines 152s accepts a nested def 152s accepts a def that is the first of a module 152s accepts a def that follows a line with code 152s finds offenses in inner classes 152s accepts the first def without leading empty line in a class 152s when a maximum of empty lines is specified 152s finds no offense for one empty line 152s finds no offense for no empty line 152s finds an offense for two empty lines 152s class methods 152s adjacent class methods 152s registers an offense for missing blank line between methods 152s mixed instance and class methods 152s registers an offense for missing blank line between methods 152s when multiple lines between defs are allowed 152s treats lines with whitespaces as blank 152s registers an offense and corrects when there are too many new lines 152s conditional method definitions 152s accepts defs inside a conditional without blank lines in between 152s registers an offense for consecutive defs inside a conditional 152s EmptyLineBetweenClassDefs 152s registers offense when no empty lines between class and method definitions 152s with AllowAdjacentOneLineDefs enabled 152s does not register offense 152s when disabled 152s does not register offense 152s when AllowAdjacentOneLineDefs is enabled 152s accepts adjacent one-liners 152s registers an offense for adjacent defs if some are multi-line 152s endless methods 152s between endless class method and regular methods 152s registers an offense and corrects 152s between regular and endless methods 152s registers an offense and corrects 152s between endless and regular methods 152s registers an offense and corrects 152s between endless class method and regular class methods 152s registers an offense and corrects 152s with AllowAdjacentOneLineDefs: false 152s registers an offense and corrects 152s with AllowAdjacentOneLineDefs: true 152s does not register an offense 152s when there are only comments between defs 152s registers an offense 152s EmptyLineBetweenModuleDefs 152s registers offense when no empty lines between module and method definitions 152s when disabled 152s does not register offense 152s when empty lines between classes and modules together 152s registers offense when no empty lines between module and method definitions 152s 152s RuboCop::Formatter::PacmanFormatter 152s #step 152s character is Pacman 152s removes the first • and puts a ᗧ 152s character is a Pacdot 152s leaves the progress_line as it is 152s character is normal dot 152s removes the first • and puts a . 152s character is ghost 152s removes the first • and puts a ghosts 152s #update_progress_line 152s when total_files is greater than columns in the terminal 152s updates the progress_line properly 152s when need to change the line 152s updates the progress_line properly 152s when total_files less than columns in the terminal 152s updates the progress_line properly 152s #next_step 152s when no offenses are detected 152s calls the step function with a dot 152s when a offense is detected in a file 152s calls the step function with a dot 152s 152s RuboCop::Cop::Style::RaiseArgs 152s when enforced style is compact 152s accepts a raise with msg argument 152s accepts a raise with an exception argument 152s accepts exception constructor with keyword arguments and message argument 152s with a raise with exception instantiation and message arguments 152s reports an offense 152s with correct + opposite 152s reports multiple offenses 152s reports an offense 152s when used in a ternary expression 152s registers an offense and autocorrects 152s with a raise with 2 args 152s reports an offense 152s when used in a logical and expression 152s registers an offense and autocorrects 152s when used in a logical or expression 152s registers an offense and autocorrects 152s with a raise with 2 args and exception object is assigned to a local variable 152s reports an offense 152s with a raise with 3 args 152s reports an offense 152s when enforced style is exploded 152s accepts a raise with splatted arguments 152s accepts exception constructor with more than 1 argument 152s accepts a raise with 2 args 152s ignores a raise with an exception argument 152s accepts a raise with msg argument 152s accepts a raise when exception object is assigned to a local variable 152s accepts exception constructor with keyword arguments 152s accepts a raise with `new` method without receiver 152s accepts a raise with 3 args 152s when exception type is in AllowedCompactTypes 152s accepts exception constructor with no arguments 152s with more than one argument 152s accepts exception constructor 152s with one argument 152s accepts exception constructor 152s with opposite + correct 152s reports an offense for opposite + correct 152s reports multiple offenses 152s when an exception object is assigned to a local variable 152s autocorrects to exploded style 152s with a raise with exception object 152s with one argument 152s reports an offense 152s when used in a logical or expression 152s registers an offense and autocorrects 152s when used in a logical and expression 152s registers an offense and autocorrects 152s when used in a ternary expression 152s registers an offense and autocorrects 152s with no arguments 152s reports an offense 152s 152s RuboCop::Cop::Style::CollectionCompact 152s registers an offense and corrects when using `reject` with block pass arg and no parentheses 152s registers an offense and corrects when using `reject` and receiver is a variable 152s does not register an offense when using `compact/compact!` 152s does not register an offense when using `reject` to not to rejecting nils 152s registers an offense and corrects when using `reject` on hash to reject nils 152s registers an offense and corrects when using `select/select!` to reject nils 152s registers an offense and corrects when using `reject` on array to reject nils 152s registers an offense and corrects when using `reject` with block pass arg on array to reject nils 152s Ruby <= 3.0 152s does not register an offense and corrects when using `lazy.reject` on array to reject nils 152s does not register an offense and corrects when using `to_enum.reject` on array to reject nils 152s Ruby >= 3.1 152s registers an offense and corrects when using `to_enum.reject` on array to reject nils 152s registers an offense and corrects when using `lazy.reject` on array to reject nils 152s when without receiver 152s does not register an offense and corrects when using `select/select!` to reject nils 152s does not register an offense and corrects when using `reject` on array to reject nils 152s 152s RuboCop::Cop::Style::Lambda 152s with enforced `literal` style 152s with a single line lambda method call 152s without arguments 152s registers an offense 152s with arguments 152s registers an offense 152s with a multiline lambda method call 152s without arguments 152s registers an offense 152s with arguments 152s registers an offense 152s with default `line_count_dependent` style 152s with a single line lambda literal 152s does not register an offense 152s with a multiline lambda literal as an argument 152s registers an offense 152s with a multiline do-end lambda literal as a keyword argument 152s registers an offense 152s unusual lack of spacing 152s without spacing after arguments 152s registers an offense 152s without any spacing 152s registers an offense 152s without spacing before arguments 152s registers an offense 152s with a multiline lambda literal 152s with no parentheses and bad spacing 152s registers an offense 152s with empty arguments 152s registers an offense 152s with no arguments and no spacing 152s registers an offense 152s without parentheses 152s registers an offense 152s with no arguments and bad spacing 152s registers an offense 152s with no parentheses and many args 152s registers an offense 152s when calling a lambda method without a block 152s does not register an offense 152s with a multiline do-end lambda as a parenthesized kwarg 152s registers an offense 152s with a multiline lambda method call 152s does not register an offense 152s with a multiline braces lambda literal as a keyword argument 152s registers an offense 152s >= Ruby 2.7 152s when using numbered parameter 152s with a single line lambda literal 152s does not register an offense 152s with a multiline lambda method call 152s does not register an offense 152s with a single line lambda method call 152s registers an offense 152s with a multiline lambda literal 152s without arguments 152s registers an offense 152s with arguments 152s registers an offense 152s with a single line lambda method call 152s without arguments 152s registers an offense 152s with arguments 152s registers an offense 152s with enforced `lambda` style 152s with a multiline lambda literal 152s with arguments 152s registers an offense 152s without arguments 152s registers an offense 152s with a single line lambda literal 152s without argument parens and spaces 152s registers an offense 152s with arguments 152s registers an offense 152s without arguments 152s registers an offense 152s when using safe navigation operator 153s does not break 153s 153s RuboCop::Cop::Lint::ImplicitStringConcatenation 153s when the string literals contain newlines 153s does not register an offense for a single string 153s registers an offense 153s on adjacent string literals on different lines 153s does not register an offense 153s on a string with interpolations 153s does register an offense 153s on adjacent string literals on the same line 153s registers an offense 153s when in a method call's argument list 153s notes that the strings could be separated by a comma instead 153s on a single string literal 153s does not register an offense 153s when inside an array 153s notes that the strings could be separated by a comma instead 153s 153s RuboCop::Cop::Lint::HashCompareByIdentity 153s registers an offense when using hash methods with `object_id` on receiver as a key 153s registers an offense when using hash method with `object_id` as a key 153s does not register an offense for hash methods without `object_id` as key 153s 153s RuboCop::Cop::Style::FetchEnvVar 153s registers an offense when using an `ENV` at `if` condition in the body 153s registers an offense when using `ENV || x` that is different from `if` condition in the body 153s registers an offense with using an `ENV` at multiple `if` condition in the body 153s registers an offense when using `ENV && x` that is different from `if` condition in the body 153s when the env val is excluded from the inspection by the config 153s registers no offenses 153s when the node is a assigned by `&&=` 153s registers an offense 153s when the node is a receiver of `&&=` 153s does not register an offense 153s when it is an argument of a method 153s registers an offense 153s when it is assigned to a variable 153s registers an offense when using multiple assignment 153s registers an offense when using single assignment 153s when it is compared `==` with other object 153s does not register an offense 153s when it is an array element 153s registers an offense 153s when using `fetch` instead of `[]` 153s registers no offenses 153s when `ENV[]` is the right end of `||` chains 153s registers an offense 153s when it is used in an interpolation 153s registers an offense 153s with negation 153s registers no offenses 153s when it is used in a conditional expression 153s registers an offense with using an `ENV` var as `if` condition in the body with assignment method 153s registers no offenses when using the same `ENV` var as `if` condition in the body with assignment method 153s registers an offense when using an `ENV` var that is different from `if` condition in the body 153s registers no offenses when using the same `ENV` var as `if` condition in the body with predicate method 153s registers no offenses when using the same `ENV` var as `if` condition in the body with other conditions 153s registers no offenses when using the same `ENV` var as `if` condition in the body with operator 153s registers no offenses with `unless` 153s registers no offenses when using the same `ENV` var as `if` condition in the body 153s registers an offense with `case` 153s registers no offenses with ternary operator 153s registers no offenses with `if` 153s when it receives a message 153s registers no offenses 153s when it is a hash value 153s registers an offense 153s when it receives a message with safe navigation 153s registers no offenses 153s when `ENV[]` is the LHS of `||` 153s registers no offenses 153s when the node is a assigned by `||=` 153s registers an offense 153s when it is compared `!=` with other object 153s does not register an offense 153s when it is evaluated with no default values 153s registers an offense 153s when it is a hash key 153s registers an offense 153s when the node is a receiver of `||=` 153s does not register an offense 153s 153s RuboCop::Cop::Bundler::InsecureProtocolSource 153s registers an offense when using `source :rubyforge` 153s registers an offense when using `source :gemcutter` 153s registers an offense when using `source :rubygems` 153s does not register an offense when using `source 'https://rubygems.org'` 153s when `AllowHttpProtocol: true` 153s does not register an offense when using `source 'http://rubygems.org'` 153s when `AllowHttpProtocol: false` 153s registers an offense when using `source 'http://rubygems.org'` 153s 153s RuboCop::Cop::Lint::UselessAccessModifier 153s behaves like nested modules 153s doesn't register an offense for nested modules 153s unused modifiers 153s registers an offense with a nested module 153s registers an offense when outside a nested module 153s registers an offense when inside a nested module 153s behaves like def in new block 153s doesn't register an offense if a method is defined in Module.new 153s registers an offense if no method is defined in Module.new 153s behaves like method named by access modifier name 153s does not register an offense for `public` 153s behaves like methods defined in an iteration 153s doesn't register an offense for each 153s doesn't register an offense for map 153s when an access modifier is followed by a class method defined on constant 153s registers an offense and corrects 153s behaves like nested in a begin..end block 153s still flags repeated `public` 153s behaves like methods defined in an iteration 153s doesn't register an offense for map 153s doesn't register an offense for each 153s behaves like def in new block 153s doesn't register an offense if a method is defined in ::Class.new 153s registers an offense if no method is defined in ::Class.new 153s behaves like method defined on a singleton class 153s inside a class 153s doesn't register an offense if the modifier is the same as outside the meta-class 153s registers an offense even if a non-singleton-class method is defined 153s doesn't register an offense if a method is defined 153s registers an offense if no method is defined 153s registers an offense if no method is defined after the modifier 153s outside a class 153s registers an offense if no method is defined 153s doesn't register an offense if a method is defined 153s registers an offense if no method is defined after the modifier 153s when using a known method-creating method 153s is aware that this creates a new method 153s still points out redundant uses within the module 153s behaves like nested modules 153s doesn't register an offense for nested modules 153s unused modifiers 153s registers an offense with a nested module 153s registers an offense when inside a nested module 153s registers an offense when outside a nested module 153s behaves like methods defined in an iteration 153s doesn't register an offense for map 153s doesn't register an offense for each 153s behaves like non-repeated visibility modifiers 153s doesn't register an offense when `private` is not repeated 153s doesn't register an offense when `protected` is not repeated 153s registers an offense and corrects even when `public` is not repeated 153s behaves like nested modules 153s doesn't register an offense for nested classs 153s unused modifiers 153s registers an offense when outside a nested class 153s registers an offense when inside a nested class 153s registers an offense with a nested class 153s behaves like repeated visibility modifiers 153s registers an offense when `private` is repeated 153s behaves like method named by access modifier name 153s does not register an offense for `public` 153s when private_class_method is used without arguments 153s registers an offense and corrects 153s behaves like nested in a begin..end block 153s doesn't flag an access modifier from surrounding scope 153s still flags repeated `private` 153s when using inline modifiers 153s does not register an offense 153s behaves like nested modules 153s doesn't register an offense for nested classs 153s unused modifiers 153s registers an offense when inside a nested class 153s registers an offense with a nested class 153s registers an offense when outside a nested class 153s when private_class_method is used with arguments 153s does not register an offense 153s when there are consecutive access modifiers 153s registers an offense and corrects 153s behaves like at the end of the body 153s registers an offense for trailing `protected` 153s behaves like method defined on a singleton class 153s inside a class 153s doesn't register an offense if the modifier is the same as outside the meta-class 153s registers an offense if no method is defined after the modifier 153s registers an offense if no method is defined 153s doesn't register an offense if a method is defined 153s registers an offense even if a non-singleton-class method is defined 153s outside a class 153s registers an offense if no method is defined after the modifier 153s doesn't register an offense if a method is defined 153s registers an offense if no method is defined 153s behaves like method defined using instance_eval 153s doesn't register an offense if a method is defined 153s registers an offense if no method is defined 153s inside a class 153s registers an offense when a modifier is outside the block and a method is defined only inside the block 153s registers two offenses when a modifier is inside and outside the and no method is defined 153s when an access modifier has no effect 153s registers an offense and corrects 153s behaves like at the end of the body 153s registers an offense for trailing `public` 153s behaves like at the end of the body 153s registers an offense for trailing `private` 153s behaves like unused visibility modifiers 153s registers an offense and corrects when visibility is immediately changed without any intervening defs 153s behaves like repeated visibility modifiers 153s registers an offense when `public` is repeated 153s when an access modifier has no methods 153s registers an offense and corrects 153s behaves like def in new block 153s doesn't register an offense if a method is defined in Class.new 153s registers an offense if no method is defined in Class.new 153s behaves like conditionally defined method 153s doesn't register an offense for unless 153s doesn't register an offense for if 153s behaves like nested in a begin..end block 153s still flags repeated `protected` 153s doesn't flag an access modifier from surrounding scope 153s behaves like repeated visibility modifiers 153s registers an offense when `protected` is repeated 153s behaves like method defined with define_method 153s doesn't register an offense if a block is passed 153s doesn't register an offense if a -> is passed 153s doesn't register an offense if a proc is passed 153s doesn't register an offense if a lambda is passed 153s behaves like def in new block 153s registers an offense if no method is defined in ::Class.new 153s doesn't register an offense if a method is defined in ::Class.new 153s behaves like method defined with define_method 153s doesn't register an offense if a proc is passed 153s doesn't register an offense if a block is passed 153s doesn't register an offense if a -> is passed 153s doesn't register an offense if a lambda is passed 153s behaves like nested in a begin..end block 153s still flags repeated `protected` 153s doesn't flag an access modifier from surrounding scope 153s behaves like method defined using instance_eval 153s doesn't register an offense if a method is defined 153s registers an offense if no method is defined 153s inside a class 153s registers two offenses when a modifier is inside and outside the and no method is defined 153s registers an offense when a modifier is outside the block and a method is defined only inside the block 153s behaves like conditionally defined method 153s doesn't register an offense for unless 153s doesn't register an offense for if 153s behaves like conditionally defined method 153s doesn't register an offense for if 153s doesn't register an offense for unless 153s behaves like def in new block 153s doesn't register an offense if a method is defined in ::Struct.new 153s registers an offense if no method is defined in ::Struct.new 153s behaves like def in new block 153s doesn't register an offense if a method is defined in Struct.new 153s registers an offense if no method is defined in Struct.new 153s behaves like def in new block 153s doesn't register an offense if a method is defined in Struct.new 153s registers an offense if no method is defined in Struct.new 153s when an access modifier is followed by attr_* 153s does not register an offense 153s when using ActiveSupport behavior when Rails is not eabled 153s reports offenses and corrects 153s behaves like at the end of the body 153s registers an offense for trailing `protected` 153s behaves like at the end of the body 153s registers an offense for trailing `public` 153s behaves like method named by access modifier name 153s does not register an offense for `protected` 153s behaves like method named by access modifier name 153s does not register an offense for `private` 153s behaves like def in new block 153s registers an offense if no method is defined in ::Module.new 153s doesn't register an offense if a method is defined in ::Module.new 153s when only a constant or local variable is defined after the modifier 153s registers an offense and corrects 153s registers an offense and corrects 153s when class is empty save modifier 153s registers an offense and corrects 153s behaves like repeated visibility modifiers 153s registers an offense when `public` is repeated 153s behaves like method defined with define_method 153s doesn't register an offense if a block is passed 153s doesn't register an offense if a proc is passed 153s doesn't register an offense if a lambda is passed 153s doesn't register an offense if a -> is passed 153s behaves like method defined using class_eval 153s doesn't register an offense if a method is defined 153s registers an offense if no method is defined 153s inside a class 153s registers an offense when a modifier is outside the block and a method is defined only inside the block 153s registers two offenses when a modifier is inside and outside the block and no method is defined 153s behaves like def in new block 153s doesn't register an offense if a method is defined in Class.new 153s registers an offense if no method is defined in Class.new 153s behaves like method defined with define_method 153s doesn't register an offense if a block is passed 153s doesn't register an offense if a lambda is passed 153s doesn't register an offense if a -> is passed 153s doesn't register an offense if a proc is passed 153s when using the class_methods method from ActiveSupport::Concern 153s is aware that this creates a new scope 153s behaves like non-repeated visibility modifiers 153s doesn't register an offense when `protected` is not repeated 153s doesn't register an offense when `private` is not repeated 153s registers an offense and corrects even when `public` is not repeated 153s behaves like def in new block 153s doesn't register an offense if a method is defined in Module.new 153s registers an offense if no method is defined in Module.new 153s behaves like methods defined in an iteration 153s doesn't register an offense for map 153s doesn't register an offense for each 153s behaves like method defined on a singleton class 153s outside a class 153s doesn't register an offense if a method is defined 153s registers an offense if no method is defined after the modifier 153s registers an offense if no method is defined 153s inside a class 153s registers an offense if no method is defined 153s doesn't register an offense if the modifier is the same as outside the meta-class 153s registers an offense even if a non-singleton-class method is defined 153s registers an offense if no method is defined after the modifier 153s doesn't register an offense if a method is defined 153s behaves like unused visibility modifiers 153s registers an offense and corrects when visibility is immediately changed without any intervening defs 153s behaves like method named by access modifier name 153s does not register an offense for `private` 153s when using ActiveSupport's `concerning` method 153s is aware that this creates a new scope 153s still points out redundant uses within the block 153s Ruby 2.7 153s still points out redundant uses within the block 153s when multiple class definitions in file but only one has offense 153s registers an offense and corrects 153s behaves like method named by access modifier name 153s does not register an offense for `protected` 153s behaves like at the top of the body 153s registers an offense and corrects for `public` 153s doesn't register an offense for `private` 153s doesn't register an offense for `protected` 153s behaves like conditionally defined method 153s doesn't register an offense for if 153s doesn't register an offense for unless 153s behaves like at the end of the body 153s registers an offense for trailing `private` 153s behaves like repeated visibility modifiers 153s registers an offense when `protected` is repeated 153s behaves like method defined on a singleton class 153s inside a class 153s registers an offense if no method is defined after the modifier 153s registers an offense if no method is defined 153s doesn't register an offense if the modifier is the same as outside the meta-class 153s doesn't register an offense if a method is defined 153s registers an offense even if a non-singleton-class method is defined 153s outside a class 153s registers an offense if no method is defined 153s doesn't register an offense if a method is defined 153s registers an offense if no method is defined after the modifier 153s behaves like def in new block 153s registers an offense if no method is defined in ::Struct.new 153s doesn't register an offense if a method is defined in ::Struct.new 153s behaves like nested in a begin..end block 153s doesn't flag an access modifier from surrounding scope 153s still flags repeated `private` 153s when a def is an argument to a method call 153s does not register an offense 153s behaves like at the top of the body 153s registers an offense and corrects for `public` 153s doesn't register an offense for `private` 153s doesn't register an offense for `protected` 153s behaves like method defined using class_eval 153s registers an offense if no method is defined 153s doesn't register an offense if a method is defined 153s inside a class 153s registers an offense when a modifier is outside the block and a method is defined only inside the block 153s registers two offenses when a modifier is inside and outside the block and no method is defined 153s behaves like repeated visibility modifiers 153s registers an offense when `private` is repeated 153s behaves like def in new block 153s doesn't register an offense if a method is defined in ::Module.new 153s registers an offense if no method is defined in ::Module.new 153s behaves like nested in a begin..end block 153s still flags repeated `public` 153s when passing method as symbol 153s does not register an offense 153s 153s RuboCop::Cop::Style::RedundantFetchBlock 153s with SafeForConstants: true 153s registers an offense and corrects when using `#fetch` with Rational in the block 153s registers an offense and corrects when using `#fetch` with Float in the block 153s does not register an offense when using `#fetch` with `Rails.cache` 153s registers an offense and corrects when using `#fetch` with constant in the block 153s registers an offense and corrects when using `#fetch` with Integer in the block 153s registers an offense and corrects when using `#fetch` with Symbol in the block 153s registers an offense and corrects when using `#fetch` with empty block 153s does not register an offense when using `#fetch` with argument fallback 153s does not register an offense when using `#fetch` with an argument in the block 153s registers an offense and corrects when using `#fetch` with String in the block and strings are frozen 153s registers an offense and corrects when using `#fetch` with Complex in the block 153s does not register an offense when using `#fetch` with String in the block and strings are not frozen 153s does not register an offense when using `#fetch` with interpolated Symbol in the block 153s with SafeForConstants: false 153s does not register an offense when using `#fetch` with constant in the block 153s 153s RuboCop::Cop::Style::StringHashKeys 153s does not register an offense when string key is used in Open3.pipeline 153s registers an offense when using strings as keys mixed with other keys 153s autocorrects strings as keys into symbols with the correct syntax 153s does not register an offense when string key is used in IO.popen 154s does not register an offense when not using strings as keys 154s does not register an offense when string key is used in gsub 154s does not register an offense when string key is used in gsub! 154s registers an offense when using strings as keys 154s does not register an offense when string key is used in Open3.capture3 154s 154s RuboCop::Cop::Style::HashConversion 154s reports different offense for hash argument Hash[] as a method argument without parentheses 154s wraps complex statements in parens if needed 154s reports an offense for single-argument Hash[] 154s reports different offense for Hash[(a || b)] 154s does not try to correct multi-argument Hash with odd number of arguments 154s reports different offense for Hash[a && b] 154s registers and corrects an offense when using argumentless `zip` without parentheses in `Hash[]` 154s reports different offense for Hash[a || b] 154s reports different offense for hash argument Hash[] 154s reports different offense for multi-argument Hash[] 154s reports different offense for Hash[(a && b)] 154s reports different offense for hash argument Hash[] as a method argument with parentheses 154s registers and corrects an offense when using argumentless `zip` with parentheses in `Hash[]` 154s registers and corrects an offense when using `zip` with argument in `Hash[]` 154s registers and corrects an offense when using multi-argument `Hash[]` as a method argument 154s reports different offense for empty Hash[] 154s AllowSplatArgument: false 154s reports uncorrectable offense for unpacked array 154s AllowSplatArgument: true 154s does not register an offense for unpacked array 154s 154s RuboCop::Cop::Style::MixinGrouping 154s when configured with grouped style 154s when using a mix of diffent methods 154s registers an offense with some duplicated mixin methods 154s allows all different mixin methods 154s when using include 154s registers an offense for single mixins in separate calls 154s allows include with an explicit receiver 154s registers an offense for several mixins in separate calls 154s when using `extend` 154s registers an offense for single mixins in separate calls 154s when using `prepend` 154s registers an offense for single mixins in separate calls 154s registers an offense for single mixins in separate calls, interspersed 154s registers an offense when other mixins have receivers 154s when configured with separated style 154s when using `extend` 154s registers an offense for several mixins in one call 154s when using a mix of diffent methods 154s registers an offense for some calls having several mixins 154s when using `prepend` 154s registers an offense for several mixins in one call 154s when using `include` 154s registers an offense for several mixins in separate calls 154s allows include call as an argument to another method 154s registers an offense for several mixins in one call 154s 154s RuboCop::Cop::Style::SingleArgumentDig 154s dig over a variable as caller 154s when using dig with splat operator 154s does not register an offense 154s when using multiple `dig` in a method chain 154s registers and corrects an offense 154s with single argument 154s registers an offense and corrects unsuitable use of dig 154s with multiple arguments 154s does not register an offense 154s when without a receiver 154s does not register an offense 154s >= Ruby 2.7 154s when using dig with arguments forwarding 154s does not register an offense 154s dig over literal 154s when using dig with splat operator 154s does not register an offense 154s with multiple arguments 154s does not register an offense 154s with single argument 154s registers an offense and corrects unsuitable use of dig 154s 154s RuboCop::Cop::Style::NumberedParameters 154s >= Ruby 2.7 154s EnforcedStyle: disallow 154s does an offense when using numbered parameters even with single-line blocks 154s EnforcedStyle: allow_single_line 154s does not register an offense when using numbered parameters with single-line blocks 154s registers an offense when using numbered parameters with multi-line blocks 154s 154s RuboCop::Cop::Style::AccessorGrouping 154s when EnforcedStyle is separated 154s does not register an offense if the same accessor is listed twice 154s registers an offense and corrects when using grouped accessors 154s does not register an offense when using separated accessors 154s does not register an offense for grouped accessors with comments 154s registers an offense and corrects when the same accessor is given more than once in the same statement 154s registers an offense and corrects when using grouped accessors with different access modifiers 154s registers an offense and corrects when using grouped accessors within eigenclass 154s when there are comments for attributes 154s registers and corrects an offense 154s when EnforcedStyle is grouped 154s registers offense and corrects if at least two separate accessors without comments 154s registers an offense and corrects when using separated accessors with different access modifiers 154s does not register an offense when using grouped accessors 154s registers an offense and correct if the same accessor is listed twice 154s registers an offense and corrects when using separated accessors 154s does not register offense for accessors with comments 154s registers an offense and corrects when using separated accessors within eigenclass 154s does not register an offense when the same accessor is given more than once in the same statement 154s 154s RuboCop::Cop::InternalAffairs::EmptyLineBetweenExpectOffenseAndCorrection 154s registers and corrects an offense when using no empty line between `expect_offense` and `expect_no_corrections` 154s does not register an offense when using empty line between `expect_offense` and `expect_no_corrections` 154s does not register an offense when using only `expect_offense` 154s does not register an offense when using empty line between `expect_offense` and `expect_correction` with heredoc argument 154s registers and corrects an offense when using no empty line between `expect_offense` and `expect_correction`with variable argument 154s registers and corrects an offense when using no empty line between `expect_offense` and `expect_correction` with heredoc argument 154s does not register an offense when using empty line between `expect_offense` and `expect_correction`with variable argument 154s 154s RuboCop::Cop::Naming::BlockForwarding 154s when `EnforcedStyle: anonymous 154s Ruby >= 3.1 154s registers and corrects an offense when using explicit block forwarding without method definition parentheses 154s registers and corrects an offense when using explicit block forwarding in singleton method 154s does not register an offense when using anonymous block forwarding without method body 154s does not register an offense when defining without block argument method 154s registers and corrects an only explicit block forwarding when using multiple proc arguments 154s does not register an offense when defining kwarg with block args method 154s does not register an offense when using anonymous block forwarding 154s registers and corrects an offense when using explicit block forwarding without method body 154s does not register an offense when using block argument as a variable 154s registers and corrects an offense when using `yield` in method body 154s registers and corrects an offense when using explicit block forwarding 154s registers and corrects an offense when using symbol proc argument in method body 154s does not register an offense when defining no arguments method 154s does not register an offense when defining kwoptarg with block args method 154s does not register an offense when assigning the block arg 154s Ruby < 3.0 154s does not register an offense when not using anonymous block forwarding 154s when `EnforcedStyle: explicit 154s Ruby >= 3.1 154s does not register an offense when using explicit block forwarding without method body 154s registers and corrects and corrects an offense when using anonymous block forwarding without method body 154s registers and corrects an offense when using `yield` in method body 154s registers and corrects an offense when using symbol proc argument in method body 154s does not register an offense when using explicit block forwarding 154s registers and corrects an offense when using anonymous block forwarding 154s does not register an offense when assigning the block arg 154s registers and corrects an offense when using anonymous block forwarding in singleton method 154s does not register an offense when defining without block argument method 154s when `BlockForwardingName: block` is already in use 154s registers and no corrects an offense when using anonymous block forwarding 154s when `BlockForwardingName: proc 154s registers and corrects an offense when using anonymous block forwarding 154s 154s RuboCop::Cop::Layout::ExtraSpacing 154s when AllowForAlignment is false 154s registers an offense and corrects alignment with token not preceded by space 154s ignores trailing whitespace 154s registers an offense and corrects extra spacing before a unary plus in an argument list 154s accepts aligned values of an implicit hash literal 154s registers an offense and corrects extra space before a float 154s registers an offense and corrects double extra spacing in variable assignment 154s ignores whitespace inside a string 154s registers an offense and corrects extra spacing in class inheritance 154s accepts space between key and value in a hash with hash rockets 154s ignores whitespace at the beginning of the line 154s when spaces are present in a single-line hash literal 154s registers an offense and corrects hashes with symbol keys 154s registers an offense and corrects hashes with hash rockets 154s with extra spacing for alignment purposes 154s such as lining up assignments 154s registers offense(s) 154s such as aligning comments on non-adjacent lines 154s registers offense(s) 154s such as aligning tokens with empty line between 154s registers offense(s) 154s such as aligning long assignment expressions that include line breaks 154s registers offense(s) 154s such as lining up different kinds of assignments 154s registers offense(s) 154s such as aligning trailing comments 154s registers offense(s) 154s such as lining up assignments with empty lines and comments in between 154s registers offense(s) 154s such as aligning with the same character 154s registers offense(s) 154s such as aligning = on lines where there are trailing comments 154s registers offense(s) 154s when ForceEqualSignAlignment is true 154s aligns the first assignment with the following assignment 154s register offenses and correct consecutive attribute assignments which are not aligned 154s does not register offenses for multiple complex nested assignments 154s registers an offense and corrects consecutive assignments that are not aligned 154s does not register alignment errors on outdented lines 154s register offenses and correct complex nested assignments 154s register offenses and correct consecutive operator assignments which are not aligned 154s does not register an offense when optarg equals is not aligned with assignment equals sign 154s does not register an offense if assignments are aligned 154s registers an offense and corrects consecutive aref assignments which are not aligned 154s does not register an offense if assignments are separated by blanks 154s when AllowBeforeTrailingComments is 154s true 154s allows it 154s doesn't interfere with AllowForAlignment 154s being true 154s such as aligning comments on non-adjacent lines 154s allows it 154s such as aligning long assignment expressions that include line breaks 154s allows it 154s such as lining up assignments with empty lines and comments in between 154s allows it 154s such as aligning = on lines where there are trailing comments 154s allows it 154s such as aligning with the same character 154s allows it 154s such as lining up assignments 154s allows it 154s such as lining up different kinds of assignments 154s allows it 154s such as aligning tokens with empty line between 154s allows it 154s such as aligning trailing comments 154s allows it 154s being false 154s such as aligning long assignment expressions that include line breaks 154s registers offense(s) 154s such as aligning = on lines where there are trailing comments 154s registers offense(s) 154s such as aligning with the same character 154s registers offense(s) 154s such as aligning tokens with empty line between 154s does not register an offense 154s such as lining up assignments with empty lines and comments in between 154s registers offense(s) 154s such as aligning comments on non-adjacent lines 154s registers offense(s) 154s such as aligning trailing comments 154s does not register an offense 154s such as lining up assignments 154s registers offense(s) 154s such as lining up different kinds of assignments 154s registers offense(s) 154s false 154s regsiters offense 154s does not trigger on only one space before comment 154s when AllowForAlignment is true 154s registers an offense and corrects double extra spacing in variable assignment 154s registers an offense and corrects extra spacing before a unary plus in an argument list 154s registers an offense and corrects extra space before a float 154s accepts space between key and value in a hash with hash rockets 154s ignores trailing whitespace 154s ignores whitespace at the beginning of the line 154s registers an offense and corrects extra spacing in class inheritance 154s ignores whitespace inside a string 154s accepts aligned values of an implicit hash literal 154s registers an offense and corrects alignment with token not preceded by space 154s with extra spacing for alignment purposes 154s such as aligning trailing comments 154s allows it 154s such as aligning with the same character 154s allows it 154s such as aligning comments on non-adjacent lines 154s allows it 154s such as lining up assignments 154s allows it 154s such as aligning tokens with empty line between 154s allows it 154s such as aligning long assignment expressions that include line breaks 154s allows it 154s such as lining up different kinds of assignments 154s allows it 154s such as aligning = on lines where there are trailing comments 154s allows it 154s such as lining up assignments with empty lines and comments in between 154s allows it 154s when spaces are present in a single-line hash literal 154s registers an offense and corrects hashes with hash rockets 154s registers an offense and corrects hashes with symbol keys 154s 154s RuboCop::Cop::Style::MultilineIfModifier 154s unless guard clause 154s allows a one liner 154s registers an offense when indented 154s allows a multiline condition 154s registers an offense 154s if guard clause 154s registers an offense when indented 154s allows a multiline condition 154s registers an offense 154s allows a one liner 154s 154s RuboCop::Cop::VariableForce::VariableTable 154s #pop_scope 154s returns popped scope object 154s #declare_variable 154s returns the added variable 154s adds variable to current scope with its name as key 154s #current_scope_level 154s increases by pushing scope 154s decreases by popping scope 154s #accessible_variables 154s when the direct outer scope has some variables 154s and the current scope is block 154s returns the current and direct outer scope variables 154s and the current scope is not block 154s returns only the current scope variables 154s when the current scope has some variables 154s returns all the variables 154s when there are no variables 154s returns empty array 154s #find_variable 154s when current scope is block 154s when a variable with the target name does not exist in current scope 154s but exists in a indirect outer scope 154s when the direct outer scope is block 154s returns the indirect outer scope variable 154s when the direct outer scope is not block 154s returns nil 154s but exists in the direct outer scope 154s returns the direct outer scope variable 154s and does not exist in all outer scopes 154s returns nil 154s when a variable with the target name exists in current scope 154s and also exists in outer scope 154s returns the current scope variable 154s and does not exist in outer scope 154s returns the current scope variable 154s when current scope is not block 154s when a variable with the target name exists in current scope 154s and also exists in outer scope 154s returns the current scope variable 154s and does not exist in outer scope 154s returns the current scope variable 154s when a variable with the target name does not exist in current scope 154s and does not exist in all outer scopes 154s returns nil 154s but exists in the direct outer scope 154s returns nil 154s #push_scope 154s returns pushed scope object 154s #find_variable with an empty scope stack 154s returns nil 154s 154s RuboCop::Cop::Style::LineEndConcatenation 154s autocorrects only the lines that should be autocorrected 154s accepts string concat with a return value of method on an interpolated string 154s autocorrects a + with trailing whitespace to \ 154s registers an offense for string concat at line end 154s accepts string concat at line end when followed by a comment line 154s registers multiple offenses when there are chained concatenationscombined with << calls 154s accepts string concat at line end for special strings like __FILE__ 154s registers offenses only for the appropriate lines in chained concats 154s accepts string concat on the same line 154s autocorrects a + with \ to just \ 154s accepts string concat with a return value of method on a string 154s accepts string concat at line end when followed by comment 154s registers multiple offenses when there are chained << methods 154s registers an offense for dynamic string concat at line end 154s registers an offense for string concat with << at line end 154s registers an offense for dynamic string concat with << at line end 154s registers multiple offenses when there are chained concatenations 154s accepts string concat at line end when % literals are involved 154s registers an offense for string concat with << and \ at line ends 154s 154s RuboCop::Cop::Lint::FloatComparison 154s registers an offense when comparing with float method that can return numeric and returns float 154s registers an offense when comparing with method on float receiver 154s does not register an offense when comparing with float method that can return numeric and returns integer 154s registers an offense when comparing with float returning method 154s registers an offense when comparing with arightmetic operator on floats 154s registers an offense when comparing with float 154s does not register an offense when comparing with float using epsilon 154s 154s RuboCop::Cop::Lint::UnmodifiedReduceAccumulator 154s behaves like reduce/inject 154s does not affect inject called without a block 154s does not affect inject called with no block args 154s given a inject block 154s does not register an offense when returning a method called on the accumulator 154s does not register an offense when or-assigning the accumulator 154s registers an offense for every violating return value 154s registers an offense when returning an expression with the element 154s registers an offense with the element in heredoc 154s does not register an offense when mutating the element with the another value 154s does not register an offense with the accumulator in heredoc 154s does not register an offense when shovelling the accumulator 154s registers an offense when mutating the accumulator with the element but not returning it 154s does not register an offense when returning accumulator[element] 154s does not register an offense when mutating the element with the accumulator 154s registers an offense when returning an index of the accumulator 154s allows break with no value 154s does not register an offense with the accumulator in interpolation 154s does not register an offense when calling a method on the accumulator with the element 154s registers an offense when returning an index setter on the accumulator 154s does not register an offense if the return value cannot be determined 154s does not register an offense when returning the accumulator 154s registers an offense when called with no argument 154s does not register an offense when and-assigning the accumulator 154s registers an offense for values returned with `break` 154s registers an offense for values returned with `next` 154s registers an offense with the element in interpolation 154s does not register an offense when returning the accumulator in a boolean statement 154s does not register an offense when op-assigning the accumulator 154s registers an offense when returning the element 154s does not register an offense when assigning the accumulator 154s does not register an offense when returning the accumulator in an expression 154s allows the element to be the return value if the accumulator is returned in any branch 154s registers an offense when returning accumulator[element]= 154s does not look inside inner blocks 154s does not register an offense when returning a method called with the accumulator 154s does not register an offense when returning a literal 154s does not register an offense when comparing 154s argument count 154s registers an offense when there are more than two arguments but the element is returned 154s ignores when there are not enough block arguments 154s ignores when there is a splat argument 154s numblocks 154s registers an offense when returning the element 154s does not register an offense when when returning the accumulator 154s behaves like reduce/inject 154s does not affect reduce called without a block 154s does not affect reduce called with no block args 154s given a reduce block 154s does not register an offense when mutating the element with the another value 154s does not register an offense when assigning the accumulator 154s registers an offense when returning the element 154s registers an offense when returning accumulator[element]= 154s does not register an offense when returning accumulator[element] 154s registers an offense with the element in interpolation 154s does not register an offense when mutating the element with the accumulator 154s allows break with no value 154s does not register an offense when returning the accumulator 154s registers an offense with the element in heredoc 154s does not register an offense when calling a method on the accumulator with the element 154s does not register an offense when shovelling the accumulator 154s does not register an offense when returning the accumulator in an expression 154s registers an offense when returning an expression with the element 154s does not register an offense when op-assigning the accumulator 154s does not register an offense if the return value cannot be determined 154s registers an offense when called with no argument 154s does not register an offense when returning the accumulator in a boolean statement 154s does not register an offense when comparing 154s registers an offense when mutating the accumulator with the element but not returning it 155s does not register an offense with the accumulator in interpolation 155s does not register an offense when and-assigning the accumulator 155s does not register an offense when or-assigning the accumulator 155s does not register an offense when returning a literal 155s registers an offense when returning an index setter on the accumulator 155s does not register an offense when returning a method called on the accumulator 155s does not register an offense when returning a method called with the accumulator 155s allows the element to be the return value if the accumulator is returned in any branch 155s does not look inside inner blocks 155s registers an offense when returning an index of the accumulator 155s does not register an offense with the accumulator in heredoc 155s registers an offense for values returned with `next` 155s registers an offense for every violating return value 155s registers an offense for values returned with `break` 155s argument count 155s registers an offense when there are more than two arguments but the element is returned 155s ignores when there are not enough block arguments 155s ignores when there is a splat argument 155s numblocks 155s registers an offense when returning the element 155s does not register an offense when when returning the accumulator 155s 155s RuboCop::Cop::Layout::EmptyLinesAroundBeginBody 155s accepts begin block without empty line in a method 155s registers an offense for begin body ending with a blank 155s registers an offense for begin body starting with rescue 155s registers an offense for rescue body ending 155s registers an offense for else body ending 155s registers an offense for ensure body ending 155s registers many offenses with complex begin-end 155s registers an offense for begin body ending in method 155s accepts begin block without empty line 155s registers an offense for begin body starting with a blank 155s registers an offense for begin body starting in method 155s 155s RuboCop::Cop::Style::HashLikeCase 155s MinBranchesCount: 2 155s does not register an offense when `case` has an `else` branch 155s does not register an offense when using `case-when` with non-literal bodies 155s registers an offense when using `case-when` with symbol conditions and literal bodies of the same type 155s registers an offense when using `case-when` with string conditions and literal bodies of the same type 155s does not register an offense when using `case-when` with literal bodies of different types 155s does not register an offense when using `case-when` with literals of different types as conditions 155s does not register an offense when using `case-when` with non-literals in conditions 155s MinBranchesCount: 3 155s does not register an offense when branches count is less than required 155s 155s RuboCop::Runner 155s how formatter is invoked 155s #started 155s sends all file paths 155s the passed files paths 155s is frozen 155s invocation order 155s is called in the proper sequence 155s #file_started 155s sends a file path 156s sends file specific information hash 156s the passed path 156s is frozen 156s #file_finished 156s sends an array of detected offenses for the file 156s sends a file path 156s the passed path 156s is frozen 156s #finished 156s when RuboCop is interrupted by user 156s sends only processed file paths 156s when RuboCop finished inspecting all files normally 157s sends all file paths 157s the passed files paths 157s is frozen 157s 157s RuboCop::Cop::Lint::ToEnumArguments 157s registers an offense when other values are passed for keyword arguments 157s registers an offense when required arg is missing 157s registers an offense when splat keyword arg is missing 157s registers an offense when method is called on `self` 157s ignores the block argument 157s does not register an offense when enumerator is created with `__method__` and the correct arguments 157s registers an offense when enumerator is created for another method 157s does not register an offense when enumerator is created with `:m` and the correct arguments 157s registers an offense when optional arg is missing 157s does not register an offense when method call has a receiver other than `self` 157s registers an offense when required keyword arg is missing 157s registers an offense when arguments are swapped 157s does not register an offense when not inside method definition 157s registers an offense when optional keyword arg is missing 157s registers an offense when splat arg is missing 157s registers an offense when enumerator is created for `__method__` with missing arguments 157s does not register an offense when enumerator is created with `__callee__` and the correct arguments 157s arguments forwarding 157s does not register an offense when enumerator is created with the correct arguments 157s registers an offense when enumerator is created with non matching arguments 157s 157s RuboCop::Cop::Style::NestedParenthesizedCalls 157s on a permitted method 157s doesn't register an offense 157s on a method call with no arguments 157s doesn't register an offense 157s on a non-parenthesized method call 157s doesn't register an offense 157s on a non-parenthesized call nested in a parenthesized one 157s with multiple arguments to the nested call 157s registers an offense 157s with a single argument to the nested call 157s registers an offense 157s when using safe navigation operator 157s registers an offense 157s backslash newline in method call 157s registers an offense 157s on a deeply nested argument 157s doesn't register an offense 157s on a call with no arguments, nested in a parenthesized one 157s doesn't register an offense 157s on an aref, nested in a parenthesized method call 157s doesn't register an offense 157s on a nested, parenthesized method call 157s doesn't register an offense 157s on a call to a setter method 157s doesn't register an offense 157s 157s RuboCop::Cop::Style::InlineComment 157s does not register an offense for a standalone comment 157s does not register an offense for special rubocop inline comments 157s registers an offense for a trailing inline comment 157s 157s RuboCop::Cop::Lint::OutOfRangeRegexpRef 157s does not register an offense regexp containing non literal 157s does not register an offense when in range references are used inside a when clause 157s only registers an offense for when clauses when the regexp is matched as a literal 157s registers an offense when the regexp is matched with `===` 157s only registers an offense when the regexp is matched as a literal 157s ignores regexp when clause conditions that contain interpolations 157s ignores `match` with no receiver 157s does not register offense to a regexp with valid references for numbered captures 157s ignores calls to `match?` 157s registers an offense when out of range references are used for mix of numbered and named captures 157s registers an offense when references are used before any regexp 157s registers an offense when out of range references are used for named captures 157s does not register offense to a regexp with encoding option and valid references for numbered captures 157s registers an offense when the regexp is matched with `match` 157s ignores `match` with no arguments 157s registers an offense when the regexp appears on the right hand side of `=~` 157s does not register offense to a regexp with valid references for named captures 157s registers an offense when out of range references are used for numbered captures 157s registers an offense when out of range references are used for non captures 157s does not register offense to a regexp with valid references for a mix named and numbered captures 157s registers an offense when out of range references are used inside a when clause 157s uses the maximum number of captures for when clauses with multiple conditions 157s matching with gsub 157s only registers an offense when the regexp is matched as a literal 157s registers an offense when out of range references are used 157s does not register an offense when in range references are used 157s matching with sub 157s only registers an offense when the regexp is matched as a literal 157s does not register an offense when in range references are used 157s registers an offense when out of range references are used 157s matching with sub! 157s registers an offense when out of range references are used 157s does not register an offense when in range references are used 157s only registers an offense when the regexp is matched as a literal 157s matching with end_with? 157s registers an offense when out of range references are used 157s only registers an offense when the regexp is matched as a literal 157s does not register an offense when in range references are used 157s matching with match 157s only registers an offense when the regexp is matched as a literal 157s registers an offense when out of range references are used 157s does not register an offense when in range references are used 157s matching with rpartition 157s does not register an offense when in range references are used 157s registers an offense when out of range references are used 157s only registers an offense when the regexp is matched as a literal 157s matching with start_with? 157s registers an offense when out of range references are used 157s only registers an offense when the regexp is matched as a literal 157s does not register an offense when in range references are used 157s matching with partition 157s only registers an offense when the regexp is matched as a literal 157s does not register an offense when in range references are used 157s registers an offense when out of range references are used 157s matching with `grep` 157s only registers an offense when the regexp is matched as a literal 157s does not register an offense when in range references are used 157s registers an offense when out of range references are used 157s matching with slice! 157s does not register an offense when in range references are used 157s registers an offense when out of range references are used 157s only registers an offense when the regexp is matched as a literal 157s matching with slice 157s does not register an offense when in range references are used 157s registers an offense when out of range references are used 157s only registers an offense when the regexp is matched as a literal 157s matching with scan 157s registers an offense when out of range references are used 157s only registers an offense when the regexp is matched as a literal 157s does not register an offense when in range references are used 157s matching with rindex 157s only registers an offense when the regexp is matched as a literal 157s does not register an offense when in range references are used 157s registers an offense when out of range references are used 157s matching with gsub! 157s does not register an offense when in range references are used 157s only registers an offense when the regexp is matched as a literal 157s registers an offense when out of range references are used 157s matching with `[]` 157s only registers an offense when the regexp is matched as a literal 157s does not register an offense when in range references are used 157s registers an offense when out of range references are used 157s when both the LHS and RHS use regexp 157s only considers the RHS regexp 157s matching with index 157s registers an offense when out of range references are used 157s does not register an offense when in range references are used 157s only registers an offense when the regexp is matched as a literal 157s when calling a regexp method on a nth-ref node 157s registers an offense if the capturing groups have changed 157s registers an offense when calling gsub on an invalid nth-ref 157s does not register an offense when calling gsub on a valid nth-ref 157s 157s RuboCop::Cop::Lint::PercentSymbolArray 157s detecting colons or commas in a %i/%I string 157s registers an offense and corrects when there are no colons but one comma 157s registers an offense and corrects when one symbol has a colon but there are no commas 157s registers an offense and corrects when symbols contain colons and are comma separated 157s registers an offense and corrects when symbols contain colons and are comma separated 157s accepts likely false positive $, 157s accepts likely false positive $, 157s accepts tokens without colons or commas 157s accepts tokens without colons or commas 157s registers an offense and corrects when there are no colons but one comma 157s registers an offense and corrects when one symbol has a colon but there are no commas 157s with binary encoded source 157s accepts if tokens contain no quotes 157s registers an offense and corrects when tokens contain quotes 157s 157s RuboCop::Cop::Style::MethodCalledOnDoEndBlock 157s Ruby 2.7 157s registers an offense for a chained call 157s with a single-line do..end block 157s accepts a single-line do..end block with a chained block 157s registers an offense for a chained call 157s with a multi-line do..end block 157s accepts it if there is no chained call 157s registers an offense for a chained call 157s accepts a chained block 157s when using safe navigation operator 157s registers an offense for a chained call 157s with a {} block 157s accepts a multi-line block with a chained call 157s accepts a single-line block with a chained call 157s 157s RuboCop::Cop::Style::EmptyHeredoc 157s registers an offense when using empty `<<-EOS` heredoc 157s registers an offense when using empty `<= ruby 2.5 158s accepts a stabby lambda with a begin-end 158s accepts super with block 158s registers an offense for a do-end block with redundant begin-end 158s accepts a block with a begin block after a statement 158s accepts a {} block with a begin-end 158s 158s RuboCop::Cop::Style::RedundantAssignment 158s accepts empty method body 158s does not register an offense when ensure block present 158s accepts empty if body 158s reports an offense for def ending with assignment and returning 158s accepts empty when nodes 158s when inside a when-branch 158s registers an offense and autocorrects 158s when inside an if-branch 158s registers an offense and autocorrects 158s when rescue blocks present 158s registers an offense and autocorrects when inside function or rescue block 158s when inside begin-end body 158s registers an offense and autocorrects 158s 158s RuboCop::Cop::Layout::MultilineMethodCallIndentation 158s when EnforcedStyle is aligned 158s accepts even indentation of consecutive lines in typical RSpec code 158s accepts indented methods inside and outside a block 158s accepts correctly aligned methods in assignment 158s registers an offense and corrects misaligned methods in while condition 158s accepts aligned method in return 158s registers an offense and corrects misaligned methods in if condition 158s accepts aligned method in assignment + block + assignment 158s registers an offense and corrects misaligned method in []= call 158s does not check binary operations when string wrapped with backslash 158s accepts any indentation of parameters to #[] 158s accepts indented and aligned methods in binary operation 158s accepts indented method when there is nothing to align with 158s registers an offense and corrects the emacs ruby-mode 1.1 indentation of an expression in an array 158s accepts alignment inside a grouped expression 158s accepts an expression where the first method spans multiple lines 158s registers an offense and corrects extra indentation of third line 158s doesn't fail on unary operators 158s accepts indented methods in LHS of []= assignment 158s accepts alignment of method with assignment and operator-like method 158s registers an offense and corrects misaligned methods in unless condition 158s accepts aligned methods in constant assignment 158s registers an offense and corrects one space indentation of 3rd line 158s does not check binary operations when string wrapped with + 158s accepts aligned methods in if + assignment 158s accepts aligned methods in if condition 158s accepts indented methods in ordinary statement 158s registers an offense and corrects proc call without a selector 158s registers an offense and corrects unaligned methods in assignment 158s registers an offense and corrects extra indentation of 3rd line in typical RSpec code 158s accepts indentation relative to first receiver 158s accepts correctly aligned methods in operands 158s registers an offense and corrects no indentation of second line 158s doesn't crash on unaligned multiline lambdas 158s accepts indented methods in for body 158s registers an offense and corrects one space indentation of 2nd line 158s registers an offense and corrects 3 spaces indentation of 2nd line 158s accepts aligned methods in a begin..end block 158s accepts aligned methods in operator assignment 158s registers an offense and corrects misaligned methods in until condition 158s accepts aligned methods in assignment 158s accepts no extra indentation of third line 158s registers an offense and corrects misaligned methods in local variable assignment 158s for semantic alignment 158s accepts nested method calls 158s accepts aligned method even when an aref is first in the chain 158s registers an offense and corrects unaligned methods 158s accepts key access to hash 158s registers an offense and corrects unaligned method in block body 158s accepts 3 aligned methods 158s doesn't fail on a chain of aref calls 158s accepts method being aligned with method in assignment 158s accepts aligned method even when an aref is in the chain 158s accepts methods being aligned with method that is an argument 158s accepts methods being aligned with method that is an argument in assignment 158s accepts method being aligned with method 158s accepts aligned method with blocks in operation assignment 158s >= Ruby 2.7 158s accepts methods being aligned with method that is an argumentwhen using numbered parameter 158s when EnforcedStyle is indented_relative_to_receiver 158s registers an offense and corrects extra indentation of 3rd line 158s registers an offense and corrects extra indentation of 3rd line in typical RSpec code 158s registers an offense and corrects 3 spaces indentation of second line 158s doesn't crash on unaligned multiline lambdas 158s does not register an offense when multiline method chain has expected indent width and the method is preceded by double splat 158s registers an offense and corrects the emacs ruby-mode 1.1 indentation of an expression in an array 158s accepts no extra indentation of third line 158s accepts indented methods in for body 158s doesn't fail on unary operators 158s accepts indentation of consecutive lines in typical RSpec code 158s accepts correctly indented methods in operation 158s accepts alignment inside a grouped expression 158s accepts indented methods in ordinary statement 158s accepts alignment of method with assignment and operator-like method 158s accepts indentation relative to first receiver 158s does not register an offense when multiline method chain has expected indent width and the method is preceded by splat 158s accepts indented methods in LHS of []= assignment 158s accepts an expression where the first method spans multiple lines 158s registers an offense and corrects no indentation of second line 158s accepts indented methods inside and outside a block 158s accepts any indentation of parameters to #[] 158s registers an offense and corrects one space indentation of 2nd line 158s registers an offense and corrects proc call without a selector 158s for possible semantic alignment 158s accepts indented methods 158s when EnforcedStyle is indented 158s registers an offense and corrects extra indentation of third line 158s accepts alignment of method with assignment and operator-like method 158s accepts an expression where the first method spans multiple lines 158s accepts no extra indentation of third line 158s accepts special indentation of for expression 158s accepts normal indentation inside grouped expression 158s accepts indented methods in for body 158s accepts any indentation of method parameters 158s accepts indented methods in while body 158s accepts special indentation of return unless condition 158s accepts double indentation of until condition 158s accepts indented methods in if condition 158s registers an offense and corrects wrong indentation of for expression 158s accepts indented methods inside and outside a block 158s accepts indentation relative to first receiver 158s accepts double indentation of unless condition 158s accepts indentation of assignment to a with newline after = 158s registers an offense and corrects no indentation of second line 158s registers an offense for a 2 space indentation of until condition 158s accepts indented methods in ordinary statement 158s accepts alignment inside a grouped expression 158s registers an offense and corrects 0 space indentation inside square brackets 158s accepts normal indentation of method parameters 158s registers an offense for a 2 space indentation of unless condition 158s registers an offense and corrects the emacs ruby-mode 1.1 indentation of an expression in an array 158s registers an offense and corrects aligned methods in if condition 158s accepts indented methods in LHS of []= assignment 158s accepts indented methods in unless body 158s accepts indentation of assignment to obj.a with newline after = 158s accepts special indentation of return if condition 158s accepts indentation of assignment to a with rhs on same line 158s registers an offense for a 2 space indentation of while condition 158s accepts double indentation of if condition 158s registers an offense and corrects proc call without a selector 158s registers an offense and corrects one space indentation of 2nd line 158s accepts double indentation of while condition 158s registers an offense for a 2 space indentation of if condition 158s registers an offense and corrects aligned operators in assignment 158s registers an offense and corrects extra indentation of 3rd line in typical RSpec code 158s registers an offense and corrects 3 spaces indentation of 2nd line 158s registers an offense and corrects 1 space indentation of 3rd line 158s accepts correctly indented methods in operation 158s accepts indentation of assignment to obj.a[:key] with newline after = 158s accepts even indentation of consecutive lines in typical RSpec code 158s accepts indented methods in until body 158s accepts indentation of assignment to a[:key] with newline after = 158s accepts indentation of assignment to a[:key] with rhs on same line 158s doesn't fail on unary operators 158s accepts any indentation of parameters to #[] 158s doesn't crash on unaligned multiline lambdas 158s accepts indented methods in if body 158s registers an offense and corrects correct + unrecognized style 158s when indentation width is overridden for this cop 158s registers an offense for a 4 space indentation of if condition 158s accepts indentation of until condition which is offset by a single normal indentation step 158s accepts indented methods 158s registers an offense for a 4 space indentation of until condition 158s accepts indentation of assignment 158s registers an offense for a 4 space indentation of while condition 158s accepts indented methods in until body 158s accepts indented methods in while body 158s accepts indented methods in unless body 158s registers an offense for a 4 space indentation of unless condition 158s accepts indentation of unless condition which is offset by a single normal indentation step 158s accepts correctly indented methods in operation 158s accepts indented methods in if body 158s accepts indentation of if condition which is offset by a single normal indentation step 158s accepts indentation of while condition which is offset by a single normal indentation step 158s accepts indented methods in if condition 158s for possible semantic alignment 158s accepts indented methods 158s 158s RuboCop::Cop::Layout::RescueEnsureAlignment 158s accepts aligned rescue in do-end block on operation assignment 158s accepts aligned rescue in do-end block on multi-assignment 158s accepts correctly aligned ensure 158s accepts aligned rescue with do-end block that line break with trailing dot for method calls 158s accepts aligned rescue in do-end block assigned to class 158s accepts aligned rescue in do-end block assigned to global variable 158s accepts aligned rescue do-end block assigned to local variable 158s accepts end being misaligned 158s accepts aligned rescue in do-end block assigned to class variable 158s accepts aligned rescue in do-end block in a method 158s accepts aligned rescue in do-end block with `.()` call 158s accepts the modifier form 158s accepts aligned rescue in do-end block assigned to instance variable 158s accepts correctly aligned rescue in assigned begin-end block 158s accepts aligned rescue in do-end block on or-assignment 158s accepts rescue and ensure on the same line 158s accepts aligned rescue in do-end block 158s accepts aligned rescue in assigned do-end block starting on newline 158s accepts aligned rescue with do-end block that line break with leading dot for method calls 158s accepts correctly aligned rescue/ensure with def with no body 158s accepts correctly aligned rescue/ensure with def 158s accepts correctly aligned rescue 158s accepts aligned rescue in do-end block on and-assignment 158s rescue in do-end block assigned to instance variable 158s registers an offense 158s rescue in do-end block assigned to global variable 158s registers an offense 158s ensure with module 158s registers an offense when ensure used with module 158s ensure with begin 158s registers an offense when ensure used with begin 158s ensure with def 158s registers an offense 158s rescue with defs 158s registers an offense 158s when using zsuper with block 158s registers and corrects an offense and corrects when incorrect alignment 158s does not register an offense when correct alignment 158s rescue with def 158s registers an offense 158s ensure with defs 158s registers an offense 158s rescue with class 158s registers an offense when rescue used with class 158s rescue with module 158s registers an offense when rescue used with module 158s excluded file 158s processes excluded files with issue 158s rescue in do-end block assigned to local variable 158s registers an offense 158s rescue with begin 158s registers an offense 158s as RHS of assignment 158s `Layout/BeginEndAlignment` cop is not enabled 158s registers an offense and corrects for incorrect alignment 158s accepts multi-line, indented 158s accepts multi-line, aligned 158s when `EnforcedStyleAlignWith: begin` of `Layout/BeginEndAlignment` cop 158s accepts multi-line, aligned 158s registers an offense and corrects for incorrect alignment 158s accepts multi-line, indented 158s when `EnforcedStyleAlignWith: start_of_line` of `Layout/BeginEndAlignment` cop 158s accepts multi-line, indented 158s accepts multi-line, aligned 158s registers an offense and corrects for incorrect alignment 158s rescue in do-end block assigned to class 158s registers an offense 158s rescue in do-end block on and-assignment 158s registers an offense 158s rescue in do-end block on multi-assignment 158s registers an offense 158s allows inline access modifier 158s with private_class_method modifier 158s ensure with defs 158s registers an offense 158s correct alignment 158s ensure with def 158s registers an offense 158s correct alignment 158s rescue with defs 158s registers an offense 158s correct alignment 158s rescue with def 158s registers an offense 158s correct alignment 158s with public_class_method modifier 158s ensure with def 158s correct alignment 158s registers an offense 158s rescue with def 158s registers an offense 158s correct alignment 158s ensure with defs 158s registers an offense 158s correct alignment 158s rescue with defs 158s registers an offense 158s correct alignment 158s with private modifier 158s rescue with def 158s correct alignment 159s registers an offense 159s ensure with def 159s registers an offense 159s correct alignment 159s rescue with defs 159s correct alignment 159s registers an offense 159s ensure with defs 159s registers an offense 159s correct alignment 159s rescue in do-end block on or-assignment 159s registers an offense 159s rescue in do-end block on operation assignment 159s registers an offense 159s rescue in do-end block assigned to class variable 159s registers an offense 159s allows inline expression before 159s rescue 159s registers an offense 159s ensure 159s registers an offense 159s rescue in assigned do-end block starting on newline 159s registers an offense 159s ensure with class 159s registers an offense 159s rescue with do-end block 159s registers an offense 159s 159s RuboCop::Cop::Style::StringLiteralsInInterpolation 159s configured with single quotes preferred 159s accepts double quotes on static strings within a method 159s registers an offense for double quotes within embedded expression in a heredoc string 159s registers an offense for double quotes within embedded expression 159s accepts double quotes on a static string 159s accepts double quotes on a broken static string 159s can handle a built-in constant parsed as string 159s can handle character literals 159s when configured with a bad value 159s fails 159s configured with double quotes preferred 159s registers an offense for single quotes within embedded expression 159s registers an offense for single quotes within embedded expression in a heredoc string 159s 159s RuboCop::Cop::Style::RedundantCondition 159s when regular condition (if) 159s accepts different when the condition does not match the branch 159s accepts elsif 159s when condition and if_branch are same 159s accepts when using ternary if in `else` branch 159s accepts complex else branches 159s registers an offense and corrects when the else branch contains an irange 159s registers an offense and corrects when the branches contains parenthesized method call 159s registers an offense and corrects when the branches contains assignment 159s does not register offenses when using `nil?` and the branches contains assignment 159s registers an offense and corrects when the branches contains method call 159s registers an offense and corrects when `if` condition and `then` branch are the same and it has no `else` branch 159s registers an offense and corrects when `raise` without argument parentheses in `else` 159s registers an offense and corrects when a method without argument parentheses in `else` 159s accepts an elsif branch 159s registers an offense and corrects when defined inside method and the branches contains assignment 159s registers an offense and corrects when the branches contains method call with braced hash 159s registers an offense and corrects when using modifier if 159s does not register an offense when using assignment by hash key access 159s autocorrects when using `<<` method higher precedence than `||` operator 159s registers an offense and corrects 159s registers an offense and corrects when the branches contains arithmetic operation 159s registers an offense and correct when the branches are the same with the same receivers 159s does not register an offense when the branches are the same with different receivers 159s does not register offenses when the branches contains hash key access 159s registers an offense and corrects when the branches contains assignment method 159s registers an offense and corrects when using operator method in `else` 159s registers an offense and corrects complex one liners 159s registers an offense and corrects modifier nodes offense 159s registers an offense and corrects multiline nodes 159s registers an offense and corrects when the branches contains method call with non-braced hash 159s does not register offenses when the branches contains assignment but target not matched 159s does not register offenses when using `nil?` and the branches contains method which has multiple arguments 159s when inverted condition (unless) 159s registers no offense 159s when condition and else branch are same 159s registers an offense 159s accepts complex unless branches 159s ternary expression (?:) 159s accepts expressions when the condition and if branch do not match 159s when condition and if_branch are same 159s registers an offense and corrects class vars 159s registers an offense and corrects brackets accesses 159s registers an offense and corrects when the else branch contains `and` 159s registers an offense and corrects when the else branch contains an erange 159s registers an offense and corrects functions 159s registers an offense and corrects nested vars 159s registers an offense and corrects with ternary expression and the branches contains chained parenthesized method call 159s registers an offense and corrects with ternary expression and the branches contains parenthesized method call 159s registers an offense and corrects when the else branch contains `rescue` 159s registers an offense and corrects when the else branch contains an irange 159s registers an offense and corrects 159s 159s RuboCop::Cop::Style::GlobalVars 159s does not register an offense for built-in variable $FILENAME 159s does not register an offense for built-in variable $ENV_JAVA 159s does not register an offense for built-in variable $ERROR_INFO 159s does not register an offense for built-in variable $SAFE 159s does not register an offense for built-in variable $ORS 159s does not register an offense for built-in variable $< 159s does not register an offense for built-in variable $LOAD_PATH 159s does not register an offense for built-in variable $-w 159s does not register an offense for built-in variable $OUTPUT_RECORD_SEPARATOR 159s does not register an offense for built-in variable $PID 159s does not register an offense for built-in variable $~ 159s does not register an offense for built-in variable $LAST_MATCH_INFO 159s does not register an offense for built-in variable $-0 159s does not register an offense for built-in variable $PREMATCH 159s does not register an offense for built-in variable $stderr 159s does not register an offense for built-in variable $@ 159s does not register an offense for built-in variable $OFS 159s does not register an offense for built-in variable $CHILD_STATUS 159s does not register an offense for built-in variable $/ 159s does not register an offense for built-in variable $-p 159s does not register an offense for built-in variable $FIELD_SEPARATOR 159s does not register an offense for built-in variable $VERBOSE 159s does not register an offense for built-in variable $_ 159s does not register an offense for built-in variable $JRUBY_REVISION 159s does not register an offense for built-in variable $INPUT_LINE_NUMBER 159s does not register an offense for built-in variable $-l 159s does not register an offense for built-in variable $ARGV 159s registers an offense for $custom 159s does not register an offense for built-in variable $INPUT_RECORD_SEPARATOR 159s does not register an offense for built-in variable $PROGRAM_NAME 159s does not register an offense for built-in variable $DEFAULT_INPUT 159s does not register an offense for built-in variable $LOADED_FEATURES 159s does not register an offense for built-in variable $LAST_READ_LINE 159s does not register an offense for built-in variable $+ 159s does not register an offense for built-in variable $, 159s does not register an offense for built-in variable $LAST_PAREN_MATCH 159s does not register an offense for built-in variable $0 159s does not register an offense for built-in variable $stdout 159s does not register an offense for built-in variable $stdin 159s does not register an offense for built-in variable $\ 159s does not register an offense for built-in variable $-v 159s does not register an offense for built-in variable $" 159s does not register an offense for built-in variable $-i 159s does not register an offense for built-in variable $MATCH 159s allows user permitted variables 159s does not register an offense for built-in variable $' 159s does not register an offense for built-in variable $RS 159s does not register an offense for built-in variable $ERROR_POSITION 159s does not register an offense for built-in variable $: 159s does not register an offense for built-in variable $` 159s does not register an offense for backrefs like $1 159s does not register an offense for built-in variable $PROCESS_ID 159s does not register an offense for built-in variable $-a 159s does not register an offense for built-in variable $> 159s does not register an offense for built-in variable $NR 159s does not register an offense for built-in variable $POSTMATCH 159s does not register an offense for built-in variable $FS 159s does not register an offense for built-in variable $* 159s does not register an offense for built-in variable $; 159s does not register an offense for built-in variable $JRUBY_VERSION 159s does not register an offense for built-in variable $CLASSPATH 159s does not register an offense for built-in variable $= 159s does not register an offense for built-in variable $DEFAULT_OUTPUT 159s does not register an offense for built-in variable $! 159s does not register an offense for built-in variable $-d 159s does not register an offense for built-in variable $IGNORECASE 159s does not register an offense for built-in variable $. 159s does not register an offense for built-in variable $-F 159s does not register an offense for built-in variable $-I 159s does not register an offense for built-in variable $$ 159s does not register an offense for built-in variable $DEBUG 159s does not register an offense for built-in variable $& 159s does not register an offense for built-in variable $? 159s does not register an offense for built-in variable $OUTPUT_FIELD_SEPARATOR 159s 159s RuboCop::Cop::Generator::RequireFileInjector 159s when using an unknown department 159s inserts a `require_relative` statement to the bottom of the file 159s when a cop of style department already exists 159s injects a `require_relative` statement on the end of style department 159s when a `require_relative` entry does not exist from before 159s injects a `require_relative` statement on the right line in the root file 159s when a `require` entry already exists 159s does not write to any file 159s 159s RuboCop::Cop::Layout::LeadingEmptyLines 159s registers an offense and corrects a new line before a comment 159s registers an offense and corrects multiple new lines before a class 159s allows blank lines without any comments or code 159s accepts not having a blank line before a comment 159s registers an offense and corrects a new line before a class 159s allows an empty input 159s accepts not having a blank line before code 159s accepts not having a blank line before a class 159s registers an offense and corrects a new line before code 159s autocorrect 159s in collaboration 159s does not invoke conflicts with other cops 159s 159s RuboCop::Cop::Style::SymbolProc 159s registers an offense when receiver is some value and using `select` with a block 159s registers an offense when receiver is an array literal and using `select` with a block 159s accepts Proc.new with 1 argument 159s does not register an offense when receiver is a array literal and using `min` with a block 159s does not register an offense when receiver is a array literal and using `max` with a block 159s accepts ::Proc.new with 1 argument 159s autocorrects correctly when args have a trailing comma 159s registers an offense for a block with parameterless method call on param 159s accepts block with more than 1 arguments 159s accepts block with adding a comma after the sole argument 159s autocorrects correctly when there are no arguments in parentheses 159s accepts block with a block argument 159s accepts lambda with 1 argument 159s does not crash with a bare method call 159s registers an offense when receiver is an array literal and using `reject` with a block 159s accepts proc with 1 argument 159s accepts block with splat params 159s accepts a block with an unused argument with an lvar 159s autocorrects multiple aliases with symbols as proc 159s registers an offense for safe navigation operator 159s does not register an offense when receiver is a hash literal and using `reject` with a block 159s accepts block when method in body is not called on block arg 159s accepts block with no arguments 159s does not register an offense when receiver is a hash literal and using `select` with a block 159s registers an offense when receiver is some value and using `reject` with a block 159s accepts empty block body 159s accepts a block with an unused argument with an method call 159s registers an offense for a block when method in body is unary -/+ 159s accepts block with more than 1 expression in body 159s registers an offense when receiver is a hash literal and using `max` with a block 159s registers an offense when receiver is a hash literal and using `min` with a block 159s when AllowedPatterns is enabled 159s accepts ignored method 159s when AllowedMethods is enabled 159s accepts ignored method 159s numblocks 159s registers an offense when receiver is an hash literal and using `min` with a numblock 159s does not register an offense when receiver is a hash literal and using `reject` with a numblock 159s registers an offense when receiver is an array literal and using `reject` with a numblock 159s registers an offense when receiver is an array literal and using `select` with a numblock 159s does not register an offense when receiver is a hash literal and using `select` with a numblock 159s registers an offense when receiver is some value and using `reject` with a numblock 159s does not register an offense when receiver is a array literal and using `min` with a numblock 159s registers an offense when receiver is some value and using `select` with a numblock 159s registers an offense for a block with a numbered parameter 159s accepts block with only second numbered parameter 159s accepts Proc.new with 1 numbered parameter 159s accepts block with multiple numbered parameters 159s registers an offense when receiver is an hash literal and using `max` with a numblock 159s accepts lambda with 1 numbered parameter 159s does not register an offense when receiver is a array literal and using `max` with a numblock 159s accepts proc with 1 numbered parameter 159s accepts ::Proc.new with 1 numbered parameter 159s when `AllowMethodsWithArguments: false` 159s when method has arguments 159s registers an offense 159s when `super` has arguments 159s registers an offense 159s when `super` has no arguments 159s registers an offense 159s AllowComments: true 159s registers an offense for a block with parameterless method call on paramand not contains a comment 159s accepts block with parameterless method call on param and contains a comment 159s when `AllowMethodsWithArguments: true` 159s when `super` has arguments 159s does not register an offense 159s when method has arguments 159s does not register an offense 159s when method has no arguments 159s registers an offense 159s when the method has arguments 159s registers an offense 159s 159s RuboCop::Cop::InternalAffairs::UselessRestrictOnSend 159s does not register an offense when using `RESTRICT_ON_SEND` and defines `after_send` with alias 159s does not register an offense when using `RESTRICT_ON_SEND` and defines `on_send` with alias_method 159s does not register an offense when using `RESTRICT_ON_SEND` and defines `on_send` 159s does not register an offense when using `RESTRICT_ON_SEND` and defines `on_send` with alias 159s does not register an offense when using `RESTRICT_ON_SEND` and defines `after_send` 159s does not register an offense when using `RESTRICT_ON_SEND` and defines `after_send` with alias_method 159s registers an offense when using `RESTRICT_ON_SEND` and not defines send callback method 159s 159s RuboCop::Cop::Style::QuotedSymbols 159s configured with `same_as_string_literals` 159s when Style/StringLiterals is configured with double_quotes 159s behaves like enforce double quotes 159s accepts double quotes when interpolating an instance variable 159s accepts double quotes with line breaks 159s accepts single quotes with double quotes 159s accepts double quotes 159s accepts double quotes with single quotes 159s registers an offense and corrects for an escaped quote within single quotes 159s registers an offense for single quotes 159s accepts double quotes with interpolation 159s accepts double quotes with escape sequences 159s accepts single quotes with line breaks 159s accepts unquoted symbols 159s registers an offense and corrects escape characters properly 159s accepts double quotes when interpolating a global variable 159s accepts double quoted symbol with an escaped quote 159s accepts double quotes when interpolating a class variable 159s hash with hashrocket style 159s accepts properly quoted symbols 159s corrects wrong quotes 159s when Style/StringLiterals is configured with single_quotes 159s behaves like enforce single quotes 159s accepts unquoted symbols 159s accepts double quotes with line breaks 159s accepts single quoted symbol with an escaped quote 159s accepts double quotes when interpolating a class variable 159s accepts double quotes with single quotes 159s accepts single quotes 159s accepts double quotes with escape sequences 159s accepts double quotes with interpolation 159s accepts double quotes when interpolating a global variable 159s registers an offense and corrects for an escaped quote within double quotes 159s accepts double quotes when interpolating an instance variable 159s accepts single quotes with double quotes 159s accepts double quotes with some other special symbols 159s registers an offense and corrects for double quotes in hash keys 159s registers an offense and corrects for double quotes without interpolation 159s accepts double quotes when control characters are used 159s accepts single quotes with line breaks 159s registers an offense and corrects escape characters properly 159s accepts double quotes when unicode control sequence is used 159s hash with hashrocket style 159s corrects wrong quotes 159s accepts properly quoted symbols 159s when Style/StringLiterals is disabled 159s behaves like enforce single quotes 159s registers an offense and corrects for an escaped quote within double quotes 159s registers an offense and corrects for double quotes in hash keys 159s accepts single quoted symbol with an escaped quote 159s registers an offense and corrects escape characters properly 159s accepts double quotes when interpolating an instance variable 159s accepts double quotes when unicode control sequence is used 159s accepts double quotes when interpolating a class variable 159s accepts double quotes when control characters are used 159s accepts double quotes with single quotes 159s accepts double quotes with escape sequences 159s accepts single quotes with double quotes 159s accepts single quotes with line breaks 159s accepts double quotes with line breaks 159s accepts unquoted symbols 159s registers an offense and corrects for double quotes without interpolation 159s accepts double quotes with some other special symbols 159s accepts double quotes with interpolation 159s accepts single quotes 159s accepts double quotes when interpolating a global variable 159s hash with hashrocket style 159s corrects wrong quotes 159s accepts properly quoted symbols 159s configured with `single_quotes` 159s behaves like enforce single quotes 159s accepts single quotes 159s registers an offense and corrects for an escaped quote within double quotes 159s accepts unquoted symbols 159s registers an offense and corrects escape characters properly 159s accepts double quotes when interpolating a global variable 159s accepts double quotes with interpolation 159s accepts single quotes with double quotes 159s accepts single quoted symbol with an escaped quote 159s accepts double quotes when unicode control sequence is used 159s accepts single quotes with line breaks 159s accepts double quotes with single quotes 159s registers an offense and corrects for double quotes in hash keys 159s accepts double quotes with line breaks 159s registers an offense and corrects for double quotes without interpolation 159s accepts double quotes with some other special symbols 159s accepts double quotes when interpolating an instance variable 159s accepts double quotes when interpolating a class variable 159s accepts double quotes when control characters are used 159s accepts double quotes with escape sequences 159s hash with hashrocket style 159s corrects wrong quotes 159s accepts properly quoted symbols 159s configured with `double_quotes` 159s behaves like enforce double quotes 159s accepts single quotes with double quotes 159s accepts double quotes when interpolating a global variable 159s accepts double quotes with interpolation 159s accepts double quotes with line breaks 159s accepts double quotes with escape sequences 159s accepts unquoted symbols 159s registers an offense for single quotes 159s accepts single quotes with line breaks 159s accepts double quotes 159s accepts double quotes when interpolating a class variable 159s accepts double quotes when interpolating an instance variable 159s accepts double quotes with single quotes 159s registers an offense and corrects escape characters properly 159s registers an offense and corrects for an escaped quote within single quotes 159s accepts double quoted symbol with an escaped quote 159s hash with hashrocket style 159s accepts properly quoted symbols 159s corrects wrong quotes 159s 159s RuboCop::Cop::Layout::SpaceBeforeSemicolon 159s does not register an offense for no space before semicolons 159s registers an offense and corrects space before semicolon 159s registers an offense and corrects more than one space before a semicolon 159s inside block braces 159s when EnforcedStyle for SpaceInsideBlockBraces is no_space 159s registers an offense and corrects a space between an opening brace and a semicolon 159s behaves like common behavior 159s accepts no space between an opening brace and a semicolon 159s when EnforcedStyle for SpaceInsideBlockBraces is space 159s accepts a space between an opening brace and a semicolon 159s behaves like common behavior 159s accepts no space between an opening brace and a semicolon 159s heredocs 159s registers an offense and corrects 159s 159s RuboCop::Cop::Naming::BinaryOperatorParameterName 159s works properly even if the argument not surrounded with braces 159s does not register an offense for arg named _other 159s registers an offense and corrects for `#equal?` when argument is not named other 159s registers an offense and corrects when argument is referenced in method body 159s does not register an offense for []= 159s does not register an offense for << 159s registers an offense and corrects for `#+` when argument is not named other 160s registers an offense and corrects for `#eql?` when argument is not named other 160s does not register an offense for === 160s does not register an offense for [] 160s does not register an offense for multibyte character method name 160s does not register an offense for arg named other 160s does not register an offense for non binary operators 160s registers an offense and corrects when assigned to argument in method body 160s does not register an offense for the match operator 160s 160s RuboCop::Cop::Style::HashExcept 160s does not register an offense when using `Hash#except` 160s does not register an offense when using `reject` and `include?` 160s does not register an offense when not using block` 160s does not register an offense when using `reject` and comparing with `lvar != :key` 160s does not register an offense when using `select` and comparing with `:key == lvar` 160s does not register an offense when using `reject` and comparing with `:key != lvar` 160s does not register an offense when not using key block argument` 160s does not register an offense when using `select` and comparing with `lvar == :key` 160s Ruby 3.0 or higher 160s does not register an offense when using `keep_if` and comparing with `lvar != :sym` 160s registers and corrects an offense when using `reject` and other than comparison by string and symbol using `eql?` 160s registers and corrects an offense when using `reject` and comparing with `:sym == lvar` 160s registers and corrects an offense when using `select` and comparing with `lvar != :sym` 160s registers and corrects an offense when using `reject` and comparing with `lvar == 'str'` 160s registers and corrects an offense when using `select` and comparing with `:sym != lvar` 160s does not register an offense when using `delete_if` and comparing with `lvar == :sym` 160s registers and corrects an offense when using `reject` and comparing with `lvar == :sym` 160s does not register an offense when using `reject` and other than comparison by string and symbol using `==` 160s registers and corrects an offense when using `filter` and comparing with `lvar != :sym` 160s does not register an offense when comparing with hash value 160s when `AllCops/ActiveSupportExtensionsEnabled: true` 160s registers and corrects an offense when using `reject` and comparing with `lvar == :sym` 160s does not register an offense when using `reject` and other than comparison by string and symbol using `==` 160s registers and corrects an offense when using `reject` and comparing with `lvar == 'str'` 160s registers and corrects an offense when using `filter` and comparing with `lvar != :sym` 160s registers and corrects an offense when using `select` and comparing with `lvar != :sym` 160s registers and corrects an offense when using `reject` and other than comparison by string and symbol using `eql?` 160s registers and corrects an offense when using `select` and comparing with `:sym != lvar` 160s does not register an offense when comparing with hash value 160s does not register an offense when using `keep_if` and comparing with `lvar != :sym` 160s does not register an offense when using `delete_if` and comparing with `lvar == :sym` 160s registers and corrects an offense when using `reject` and comparing with `:sym == lvar` 160s using `exclude?` 160s registers and corrects an offense when using `filter` and calling `exclude?` method with symbol array 160s registers and corrects an offense when using `reject` and calling `!exclude?` method with dynamic symbol array 160s registers and corrects an offense when using `reject` and calling `!exclude?` method with method call 160s registers and corrects an offense when using `reject` and calling `!exclude?` method with dynamic string array 160s does not register an offense when using `reject` and calling `exclude?` method with symbol array and second block value 160s registers and corrects an offense when using `reject` and calling `!exclude?` method with symbol array 160s registers and corrects an offense when using `reject` and calling `!exclude?` method with variable 160s registers and corrects an offense when using `select` and calling `exclude?` method with symbol array 160s using `include?` 160s registers and corrects an offense when using `reject` and calling `include?` method with dynamic symbol array 160s registers and corrects an offense when using `select` and calling `!include?` method with symbol array 160s registers and corrects an offense when using `reject` and calling `include?` method with dynamic string array 160s registers and corrects an offense when using `reject` and calling `include?` method with variable 160s registers and corrects an offense when using `reject` and calling `include?` method with symbol array 160s registers and corrects an offense when using `filter` and calling `!include?` method with symbol array 160s registers and corrects an offense when using `reject` and calling `include?` method with method call 160s using `in?` 160s registers and corrects an offense when using `select` and calling `!key.in?` method with symbol array 160s registers and corrects an offense when using `reject` and calling `key.in?` method with variable 160s registers and corrects an offense when using `filter` and calling `!key.in?` method with symbol array 160s registers and corrects an offense when using `reject` and calling `key.in?` method with dynamic string array 160s does not register an offense when using `reject` and calling `in?` method with symbol array and second block value 160s registers and corrects an offense when using `reject` and calling `key.in?` method with dynamic symbol array 160s registers and corrects an offense when using `reject` and calling `key.in?` method with symbol array 160s registers and corrects an offense when using `reject` and calling `key.in?` method with method call 160s using `exclude?` 160s does not register offenses when using `reject` and calling `!exclude?` method with symbol array 160s using `in?` 160s does not register offenses when using `reject` and calling `key.in?` method with symbol array 160s using `include?` 160s registers and corrects an offense when using `reject` and calling `include?` method with dynamic symbol array 160s registers and corrects an offense when using `reject` and calling `include?` method with symbol array 160s registers and corrects an offense when using `reject` and calling `include?` method with dynamic string array 160s does not register an offense when using `reject` and calling `include?` method with symbol array and second block value 160s registers and corrects an offense when using `select` and calling `!include?` method with symbol array 160s registers and corrects an offense when using `reject` and calling `include?` method with variable 160s registers and corrects an offense when using `reject` and calling `include?` method with method call 160s registers and corrects an offense when using `filter` and calling `!include?` method with symbol array 160s Ruby 2.7 or lower 160s does not register an offense when using `reject` and comparing with `:key == lvar` 160s does not register an offense when using `select` and comparing with `lvar != :key` 160s does not register an offense when using `reject` and comparing with `lvar == :key` 160s does not register an offense when using `select` and comparing with `:key != lvar` 160s 160s RuboCop::Cop::AlignmentCorrector 160s #correct 160s simple indentation 160s with a negative column delta 160s outdents 160s with a positive column delta 160s indents 160s with large column deltas 160s with heredoc in backticks (<<``) 160s behaves like heredoc indenter 160s does not change indentation of here doc bodies and end markers 160s with plain heredoc (<<) 160s behaves like heredoc indenter 160s does not change indentation of here doc bodies and end markers 160s within string literals 160s does not insert whitespace 160s with single-line here docs 160s does not indent body and end marker 160s 160s RuboCop::Config 160s #make_excludes_absolute 160s when config is in root directory 160s generates valid absolute directory 160s when config is in subdirectory 160s generates valid absolute directory 160s #deprecation_check 160s when there is AllCops configuration 160s if there are no Excludes or Includes keys 160s does not yield 160s if there are is an Includes key 160s yields 160s if there are is an Excludes key 160s yields 160s when there is no AllCops configuration 160s does not yield 160s whether the cop is enabled 160s when configuration has no mention of a cop 160s enables the cop that is not mentioned 160s when all cops are disabled by default 160s disables the cop that is not mentioned 160s when all cops are explicitly enabled by default 160s enables the cop that is not mentioned 160s when a cop has configuration but no explicit Enabled setting 160s enables the cop by default 160s when an nested cop department is disabled 160s but an individual cop is enabled 160s the cop setting overrides the department 160s and an individual cop is not specified 160s the cop setting overrides the department 160s when an entire cop department is enabled 160s but an individual cop is disabled 160s still disables the cop 160s when an entire cop department is disabled 160s but an individual cop is enabled 160s the cop setting overrides the department 160s #patterns_to_exclude 160s when config file has AllCops => Exclude key 160s returns the Exclude value 160s #patterns_to_include 160s when config file has AllCops => Include key 160s returns the Include value 160s #file_to_include? 160s when the passed path matches any of patterns to include 160s returns true 160s when the passed path does not match any of patterns to include 160s returns false 160s #allowed_camel_case_file? 160s when the passed path is a gemspec 160s is expected to equal true 160s when the passed path does not match allowed camel case patterns to include 160s is expected to equal false 160s when the passed path matches allowed camel case patterns to include 160s is expected to equal true 160s #validate 160s when the configuration includes any unrecognized cop name 160s raises an validation error 160s when the empty section is AllCops 160s raises validation error 160s when the configuration includes an obsolete parameter 160s raises validation error 160s when the configuration includes obsolete parameters and cops 160s raises validation error 160s conflicting Safe settings 160s when the configuration includes an unsafe cop without a declaration of its autocorrection 160s does not raise validation error 160s when the configuration includes an unsafe cop that is explicitly declared to have a safe autocorrection 160s raises validation error 160s when the configuration includes multiple valid enforced styles and one invalid style 160s raises validation error 160s when the configuration includes multiple invalid enforced styles 160s raises validation error 160s when the configuration includes any common parameter 160s does not raise validation error 160s when the configuration includes a valid EnforcedStyle 160s does not raise validation error 160s when the configuration includes any unrecognized cop name and given `--ignore-unrecognized-cops` option 160s there is unrecognized cop 160s prints a warning about the cop 160s there are no unrecognized cops 160s does not print any warnings 160s when the configuration includes an invalid enforced style 160s raises validation error 160s when the configuration includes multiple valid enforced styles 160s does not raise validation error 160s when the configuration includes an obsolete cop 160s raises validation error 160s when the configuration includes multiple but config does not allow 160s raises validation error 160s when the configuration includes the obsolete Style/WhileUntilModifier: MaxLineLength parameter 160s raises validation error 160s when the configuration includes a valid enforced style 160s does not raise validation error 160s when the configuration includes an obsolete EnforcedStyle parameter 160s raises validation error 160s when the configuration includes an invalid EnforcedStyle 160s raises validation error 160s when the configuration includes the obsolete Style/IfUnlessModifier: MaxLineLength parameter 160s raises validation error 160s when the configuration includes an empty section 160s raises validation error 160s when all cops are both Enabled and Disabled by default 160s raises validation error 160s when the configuration includes any unrecognized parameter 160s prints a warning message 160s when the configuration includes Lint/Syntax cop 160s when the configuration matches the default 160s does not raise validation error 160s when the configuration does not match the default 160s raises validation error 160s when the configuration is in the base RuboCop config folder 160s is not validated 160s #file_to_exclude? 160s when the passed path matches any of patterns to exclude 160s returns true 160s when the passed path does not match any of patterns to exclude 160s returns false 160s #possibly_include_hidden? 160s returns true when Include config includes a regex 160s returns true when Include config includes a dotfile in a path 160s returns true when Include config only includes regular paths 160s returns true when Include config includes a toplevel dotfile 160s #check 160s when a deprecated configuration is detected 160s prints a warning message for the loaded path 160s #for_badge 160s works if department has no config 160s takes into account the department 160s #for_department 160s always returns the department's config 160s accepts a Symbol 160s 160s RuboCop::YAMLDuplicationChecker 160s when yaml has duplicated keys in the second level 160s calls block 160s calls block with keys 160s when yaml has duplicated keys in the top level 160s calls block 160s calls block with keys 160s when yaml does not have any duplication 160s does not call block 160s 160s RuboCop::Cop::Style::RedundantInterpolation 160s registers an offense for "#{1 + 1; 2 + 2}" 160s registers an offense for "#{$var}" 160s registers an offense for ["#{@var}"] 160s accepts strings implicitly concatenated with a later string 160s registers an offense for "#$1" 160s registers an offense for "#{$+}" 160s registers an offense for "#{foo.do_something 42}" 160s registers an offense for "#{@@var}" 160s registers an offense for "#{var}" 160s accepts strings implicitly concatenated with an earlier string 160s registers an offense for "#$+" 160s registers an offense for "#{do_something(42)}" 160s registers an offense for "#{number}" 160s registers an offense for "#{do_something 42}" 160s registers an offense for "%|#{1 + 1}|" 160s registers an offense for "#{1 + 1}" 160s registers an offense for "#$var" 160s registers an offense for "#@@var" 160s registers an offense for "#@var" 160s registers an offense for "#{$1}" 160s accepts strings that are part of a %W() 160s accepts strings with characters after the interpolation 160s registers an offense for "#{@var}" 160s registers an offense for "%Q(#{1 + 1})" 160s accepts strings with characters before the interpolation 160s 160s RuboCop::Cop::Lint::ShadowedException 160s single rescue 160s accepts rescuing multiple custom exceptions 160s accepts rescuing a single exception that is assigned to a variable 160s accepts splat arguments passed to rescue 160s accepts rescuing a single exception that has an ensure 160s accepts rescue containing multiple same error code exceptions 160s accepts rescuing a single exception 160s registers an offense rescuing exceptions that are ancestors of each other 160s rescue a exception without causing constant name deprecation warning 160s registers an offense for the same exception multiple times 160s registers an offense rescuing Exception with any other error or exception 160s accepts rescuing a multiple exceptions that are not ancestors that have an else 160s accepts rescuing a single exception that has an else 160s accepts rescuing a single custom exception 160s accepts rescuing a custom exception and a standard exception 160s accepts an empty rescue 160s when there are multiple levels of exceptions in the same rescue 160s registers an offense for more than two exceptions 160s registers an offense for two exceptions 160s multiple rescues 160s registers an offense for two exceptions when there are multiple levels of exceptions in the same rescue 160s registers an offense rescuing Exception before an unknown exceptions 160s accepts rescuing a known exception between unknown exceptions 160s accepts rescuing a known exception after an unknown exceptions 160s accepts many (>= 7) rescue groups 160s accepts rescuing exceptions in order of level with multiple exceptions in a group 160s accepts rescuing exceptions in order of level with multiple exceptions in a group with custom exceptions 160s registers an offense when a higher level exception is rescued before a lower level exception when there are multiple exceptions rescued in a group 160s accepts rescuing a known exception before an unknown exceptions 160s registers an offense rescuing out of order exceptions when there is an ensure 160s accepts rescuing custom exceptions in multiple rescue groups 160s registers an offense when a higher level exception is rescued before a lower level exception 160s ignores expressions of non-const 160s accepts rescuing exceptions in order of level 160s last rescue does not specify exception class 160s highlights range ending at rescue keyword 160s exceptions from different ancestry chains 160s accepts rescuing exceptions in another order 160s accepts rescuing exceptions in one order 160s splat arguments 160s registers an offense for splat arguments rescued after rescuing Exception 160s does not register an offense for splat arguments rescued after rescuing a known exception 160s accepts splat arguments passed to multiple rescues 160s modifier rescue 160s accepts rescue in its modifier form 160s 160s RuboCop::Cop::Lint::UselessAssignment 160s when a setter is invoked with operator assignment in loop body 160s accepts 160s when a variable is assigned and assigned again in a modifier condition 160s accepts with parentheses 160s accepts without parentheses 160s when a variable is assigned while being passed to a method taking block 160s and the variable is not used 160s registers an offense 160s and the variable is used 160s accepts 160s when a variable is assigned and passed to a method followed by method taking block 160s accepts 160s when a named capture is referenced 160s accepts 160s when a variable is assigned and unreferenced in a class subclassing another class stored in local variable 160s registers an offense 160s when a variable that has same name as outer scope variable is not referenced in a method defined in loop 160s registers an offense 160s when a variable is assigned with ||= at the last expression of the scope 160s registers an offense 160s when a variable is assigned in each branch of if and referenced after the branching 160s accepts 160s when a variable is reassigned with binary operator assignment while assigning to itself in rhs then referenced 160s registers an offense for the assignment in rhs 160s when a variable is assigned and referenced when defining a module 160s does not register an offense 160s when a variable is reassigned multiple times in main body of begin then referenced in rescue 160s accepts 160s when a variable is reassigned with multiple assignment while referencing itself in rhs and referenced 160s accepts 160s when a variable is assigned with ||= before the last expression of the scope 160s registers an offense 160s when a variable is reassigned in loop body but won't be referenced either next iteration or loop condition 160s registers an offense (PENDING: Requires an advanced logic that checks whether the return value of an operator assignment is used or not.) 160s when a keyword splat method argument is not used 160s accepts 160s when a referenced variable is reassigned but not re-referenced in a method defined in loop 160s registers an offense 160s when a block local variable is declared but not assigned 161s accepts 161s when a variable is reassigned with binary operator assignment and referenced 161s accepts 161s when a variable is assigned and unreferenced in a method 161s registers an offense 161s when a variable is assigned on each side of && and referenced after the && 161s accepts 161s when a variable is assigned in single branch if and unreferenced 161s registers an offense 161s inside a `case-match` node 161s does not register an offense when the variable is used 161s when a rescued error variable is wrongly tried to be referenced in another rescue body 161s registers an offense 161s when a variable is assigned and unreferenced in a module 161s registers an offense 161s when a unreferenced variable is reassigned on the right side of && and referenced after the && 161s accepts 161s when a optional keyword method argument is not used 161s accepts 161s when a referenced variable is reassigned in a block 161s accepts 161s when a keyword splat method argument is used 161s accepts 161s when a variable is assigned in loop body and referenced in post until condition 161s accepts 161s when a method argument is reassigned but not passed to super 161s registers an offense 161s when a variable is reassigned with logical operator assignment and referenced 161s accepts 161s when a variable is reassigned multiple times in main body of begin then referenced after the begin 161s accepts 161s when a variable is assigned and unreferenced in a class 161s registers an offense 161s when a variable is reassigned multiple times in rescue and referenced after the begin 161s registers an offense 161s when a variable is assigned in branch of modifier if that references the variable in its conditional clauseand referenced after the branching 161s accepts 161s when an assignment in a if branch is referenced in another if branch 161s accepts 161s similar name suggestion 161s when there's a similar variable 161s suggests the variable name 161s when there's a similar variable-like method invocation 161s suggests the method name 161s when there's a similar method invocation with arguments 161s does not suggest any name 161s when there are only less similar names 161s does not suggest any name 161s when there's a similar name but it's in inner scope 161s does not suggest any name 161s when there's a similar method invocation with explicit receiver 161s does not suggest any name 161s when a variable is reassigned at the end of loop body and would be referenced in next iteration 161s accepts 161s when a variable is assigned and unreferenced in a singleton method defined with variable name 161s registers an offense 161s when there's an unreferenced reassignment in a if branch while the variable is referenced in the paired elsif branch 161s registers an offense for the reassignment in the if branch 161s when a variable is assigned multiple times but unreferenced 161s registers offenses for each assignment 161s when a variable is reassigned while referencing itself in rhs and referenced 161s accepts 161s when a variable is assigned with operator assignment in top level 161s registers an offense 161s when a variable is assigned with multiple assignment and unreferenced 161s registers an offense 161s when a variable is reassigned at the end of loop body and would be referenced in loop condition 161s accepts 161s when a variable is assigned in each branch of if and referenced in the else branch 161s registers an offense for the assignment in the if branch 161s when a variable is referenced in rhs of named capture expression 161s accepts 161s when there's an unreferenced reassignment in a if branch while the variable is referenced in a case branch in the paired else branch 161s registers an offense for the reassignment in the if branch 161s when a variable is reassigned multiple times in ensure with rescue then referenced after the begin 161s registers an offense 161s when a variable is assigned first with ||= and referenced 161s accepts 161s when a variable is assigned in branch of modifier if that references the variable in its conditional clauseand unreferenced 161s registers an offense 161s when a block argument is not used 161s accepts 161s when a variable is reassigned and unreferenced in a if branch while the variable is referenced in the paired else branch 161s registers an offense for the reassignment in the if branch 161s when a variable is reassigned in single branch if and referenced after the branching 161s accepts 161s when a variable is assigned in main body of begin, rescue and else then referenced after the begin 161s accepts 161s when a variable is reassigned in a loop 161s post while loop 161s accepts 161s while loop 161s accepts 161s post until loop 161s accepts 161s for loop 161s accepts 161s until loop 161s accepts 161s when a unreferenced variable is reassigned in same branch and referenced after the branching 161s registers an offense for the unreferenced assignment 161s when a variable is assigned in 2 identical if branches 161s doesn't think 1 of the 2 assignments is useless 161s when an optional method argument is not used 161s accepts 161s when a variable is not used and the name starts with _ 161s accepts 161s when a method argument is reassigned and zero arity super is called 161s accepts 161s when a variable is assigned in loop body and unreferenced 161s registers an offense 161s when a named capture is unreferenced in top level 161s registers an offense 161s when a variable is reassigned multiple times in main body of begin then referenced in ensure 161s accepts 161s when a named capture is unreferenced in other than top level 161s registers an offense 161s when a referenced variable is reassigned but not re-referenced 161s registers an offense for the non-re-referenced assignment 161s when a variable is assigned in begin and referenced outside 161s accepts 161s when a block method argument is not used 161s accepts 161s when an anonymous keyword splat method argument is defined 161s accepts 161s when a variable is assigned and unreferenced in top level 161s registers an offense 161s when a method argument is not used 161s accepts 161s when a block local variable is assigned and unreferenced 161s registers offenses for the assignment 161s when a unreferenced variable is reassigned on the left side of && and referenced after the && 161s registers an offense for the unreferenced assignment 161s when a variable is shadowed by a block argument and unreferenced 161s registers an offense 161s when a variable is reassigned multiple times in rescue with ensure then referenced after the begin 161s registers an offense 161s when a splat method argument is not used 161s accepts 161s when a variable is assigned with operator assignment in rescue and would be referenced with retry 161s accepts 161s when an unreferenced variable is reassigned and re-referenced 161s registers an offense for the unreferenced assignment 161s when a variable is assigned in loop body and referenced in post while condition 161s accepts 161s when an unreferenced variable is reassigned in a block 161s accepts 161s when a variable is assigned and unreferenced in a singleton method defined with self keyword 161s registers an offense 161s when a variable is reassigned in single branch if and referenced in the branch 161s registers an offense for the unreferenced assignment 161s when a variable is assigned at the end of rescue and would be referenced with retry 161s accepts 161s when a variable is assigned and unreferenced in a singleton class 161s registers an offense 161s when a local variable is unreferenced and zero arity super is called 161s registers an offense 161s when there's an unreferenced assignment in top level if branch while the variable is referenced in the paired else branch 161s registers an offense for the assignment in the if branch 161s when there is only one AST node and it is unused variable 161s registers an offense 161s when a variable is assigned in main body of begin with rescue but unreferenced 161s registers an offense 161s when a variable is assigned in main body of begin, rescue and else and reassigned in ensure then referenced after the begin 161s registers offenses for each assignment before ensure 161s 161s RuboCop::Cop::Layout::SpaceInsidePercentLiteralDelimiters 161s accepts other percent literals 161s accepts execute-string literals 161s for W type and ["{", "}"] delimiters 161s registers an offense for literals with escaped and other spaces 161s registers an offense for unnecessary spaces 161s accepts literals without additional spaces 161s accepts multi-line literals within a method 161s registers an offense for spaces before final delimiter 161s accepts multi-line literals 161s registers an offense for spaces after first delimiter 161s accepts literals with escaped spaces 161s accepts spaces between entries 161s accepts newlines and additional following alignment spaces 161s with spaces in blank percent literals 161s registers and corrects an offense 161s with newline in blank percent literals 161s registers and corrects an offense 161s with space in blank percent literals 161s registers and corrects an offense 161s for W type and ["[", "]"] delimiters 161s accepts newlines and additional following alignment spaces 161s registers an offense for literals with escaped and other spaces 161s registers an offense for spaces before final delimiter 161s accepts spaces between entries 161s accepts multi-line literals within a method 161s registers an offense for unnecessary spaces 161s registers an offense for spaces after first delimiter 161s accepts multi-line literals 161s accepts literals without additional spaces 161s accepts literals with escaped spaces 161s with newline in blank percent literals 161s registers and corrects an offense 161s with space in blank percent literals 161s registers and corrects an offense 161s with spaces in blank percent literals 161s registers and corrects an offense 161s for i type and ["(", ")"] delimiters 161s registers an offense for spaces before final delimiter 161s accepts spaces between entries 161s accepts newlines and additional following alignment spaces 161s registers an offense for unnecessary spaces 161s accepts multi-line literals within a method 161s accepts literals with escaped spaces 161s accepts literals without additional spaces 161s registers an offense for spaces after first delimiter 161s registers an offense for literals with escaped and other spaces 161s accepts multi-line literals 161s with spaces in blank percent literals 161s registers and corrects an offense 161s with space in blank percent literals 161s registers and corrects an offense 161s with newline in blank percent literals 161s registers and corrects an offense 161s for x type and ["(", ")"] delimiters 161s accepts newlines and additional following alignment spaces 161s registers an offense for spaces before final delimiter 161s accepts multi-line literals 161s registers an offense for spaces after first delimiter 161s registers an offense for literals with escaped and other spaces 161s accepts multi-line literals within a method 161s accepts spaces between entries 161s registers an offense for unnecessary spaces 161s accepts literals with escaped spaces 161s accepts literals without additional spaces 161s with newline in blank percent literals 161s registers and corrects an offense 161s with space in blank percent literals 161s registers and corrects an offense 161s with spaces in blank percent literals 161s registers and corrects an offense 161s for w type and ["!", "!"] delimiters 161s accepts multi-line literals 161s registers an offense for spaces before final delimiter 161s registers an offense for literals with escaped and other spaces 161s accepts literals without additional spaces 161s registers an offense for unnecessary spaces 161s registers an offense for spaces after first delimiter 161s accepts literals with escaped spaces 161s accepts multi-line literals within a method 161s accepts newlines and additional following alignment spaces 161s accepts spaces between entries 161s with space in blank percent literals 161s registers and corrects an offense 161s with newline in blank percent literals 161s registers and corrects an offense 161s with spaces in blank percent literals 161s registers and corrects an offense 161s for i type and ["[", "]"] delimiters 161s registers an offense for unnecessary spaces 161s accepts multi-line literals within a method 161s accepts newlines and additional following alignment spaces 161s registers an offense for literals with escaped and other spaces 161s accepts literals without additional spaces 161s registers an offense for spaces before final delimiter 161s accepts spaces between entries 161s registers an offense for spaces after first delimiter 161s accepts literals with escaped spaces 161s accepts multi-line literals 161s with space in blank percent literals 161s registers and corrects an offense 161s with spaces in blank percent literals 161s registers and corrects an offense 161s with newline in blank percent literals 161s registers and corrects an offense 161s for x type and ["[", "]"] delimiters 161s accepts spaces between entries 161s accepts literals without additional spaces 161s registers an offense for spaces before final delimiter 161s registers an offense for literals with escaped and other spaces 161s accepts newlines and additional following alignment spaces 161s accepts multi-line literals 161s registers an offense for unnecessary spaces 161s registers an offense for spaces after first delimiter 161s accepts multi-line literals within a method 161s accepts literals with escaped spaces 161s with spaces in blank percent literals 161s registers and corrects an offense 161s with space in blank percent literals 161s registers and corrects an offense 161s with newline in blank percent literals 161s registers and corrects an offense 161s for I type and ["[", "]"] delimiters 161s accepts newlines and additional following alignment spaces 161s accepts multi-line literals within a method 161s registers an offense for literals with escaped and other spaces 161s accepts literals without additional spaces 161s registers an offense for spaces after first delimiter 161s registers an offense for spaces before final delimiter 161s accepts literals with escaped spaces 161s accepts spaces between entries 161s accepts multi-line literals 161s registers an offense for unnecessary spaces 161s with space in blank percent literals 161s registers and corrects an offense 161s with spaces in blank percent literals 161s registers and corrects an offense 161s with newline in blank percent literals 161s registers and corrects an offense 161s for W type and ["(", ")"] delimiters 161s accepts multi-line literals 161s accepts literals without additional spaces 161s accepts multi-line literals within a method 161s accepts literals with escaped spaces 161s registers an offense for spaces after first delimiter 161s registers an offense for spaces before final delimiter 161s accepts newlines and additional following alignment spaces 161s registers an offense for literals with escaped and other spaces 161s registers an offense for unnecessary spaces 161s accepts spaces between entries 161s with newline in blank percent literals 161s registers and corrects an offense 161s with spaces in blank percent literals 161s registers and corrects an offense 161s with space in blank percent literals 161s registers and corrects an offense 161s for x type and ["!", "!"] delimiters 161s accepts newlines and additional following alignment spaces 161s accepts multi-line literals 161s accepts spaces between entries 161s registers an offense for unnecessary spaces 161s accepts multi-line literals within a method 161s registers an offense for spaces before final delimiter 161s registers an offense for spaces after first delimiter 161s accepts literals without additional spaces 161s registers an offense for literals with escaped and other spaces 161s accepts literals with escaped spaces 161s with spaces in blank percent literals 161s registers and corrects an offense 161s with space in blank percent literals 161s registers and corrects an offense 161s with newline in blank percent literals 161s registers and corrects an offense 161s for w type and ["(", ")"] delimiters 161s registers an offense for unnecessary spaces 161s registers an offense for literals with escaped and other spaces 161s accepts multi-line literals 161s accepts literals with escaped spaces 161s registers an offense for spaces before final delimiter 161s accepts spaces between entries 161s registers an offense for spaces after first delimiter 161s accepts multi-line literals within a method 161s accepts newlines and additional following alignment spaces 161s accepts literals without additional spaces 161s with spaces in blank percent literals 161s registers and corrects an offense 161s with newline in blank percent literals 161s registers and corrects an offense 161s with space in blank percent literals 161s registers and corrects an offense 161s for I type and ["!", "!"] delimiters 161s registers an offense for unnecessary spaces 161s registers an offense for spaces after first delimiter 161s registers an offense for spaces before final delimiter 161s accepts literals without additional spaces 161s accepts spaces between entries 161s registers an offense for literals with escaped and other spaces 161s accepts multi-line literals within a method 161s accepts newlines and additional following alignment spaces 161s accepts multi-line literals 161s accepts literals with escaped spaces 161s with spaces in blank percent literals 161s registers and corrects an offense 161s with newline in blank percent literals 161s registers and corrects an offense 161s with space in blank percent literals 161s registers and corrects an offense 161s for i type and ["{", "}"] delimiters 161s registers an offense for spaces after first delimiter 161s accepts spaces between entries 161s registers an offense for literals with escaped and other spaces 161s accepts multi-line literals within a method 161s accepts literals without additional spaces 161s registers an offense for unnecessary spaces 161s registers an offense for spaces before final delimiter 161s accepts multi-line literals 161s accepts literals with escaped spaces 161s accepts newlines and additional following alignment spaces 161s with spaces in blank percent literals 161s registers and corrects an offense 161s with newline in blank percent literals 161s registers and corrects an offense 161s with space in blank percent literals 161s registers and corrects an offense 161s for I type and ["{", "}"] delimiters 161s registers an offense for unnecessary spaces 161s accepts multi-line literals within a method 161s accepts newlines and additional following alignment spaces 161s accepts multi-line literals 161s accepts literals without additional spaces 161s registers an offense for spaces before final delimiter 161s registers an offense for literals with escaped and other spaces 161s accepts literals with escaped spaces 161s registers an offense for spaces after first delimiter 161s accepts spaces between entries 161s with space in blank percent literals 161s registers and corrects an offense 161s with spaces in blank percent literals 161s registers and corrects an offense 161s with newline in blank percent literals 161s registers and corrects an offense 161s for w type and ["{", "}"] delimiters 161s registers an offense for spaces before final delimiter 161s registers an offense for unnecessary spaces 161s accepts multi-line literals 161s accepts literals with escaped spaces 161s accepts literals without additional spaces 161s accepts spaces between entries 161s registers an offense for spaces after first delimiter 161s accepts newlines and additional following alignment spaces 161s accepts multi-line literals within a method 161s registers an offense for literals with escaped and other spaces 161s with space in blank percent literals 161s registers and corrects an offense 161s with spaces in blank percent literals 161s registers and corrects an offense 161s with newline in blank percent literals 161s registers and corrects an offense 161s for x type and ["{", "}"] delimiters 161s accepts literals without additional spaces 161s accepts multi-line literals 161s registers an offense for unnecessary spaces 161s accepts literals with escaped spaces 161s registers an offense for literals with escaped and other spaces 161s registers an offense for spaces before final delimiter 161s accepts newlines and additional following alignment spaces 161s accepts multi-line literals within a method 161s accepts spaces between entries 161s registers an offense for spaces after first delimiter 161s with newline in blank percent literals 161s registers and corrects an offense 161s with space in blank percent literals 161s registers and corrects an offense 161s with spaces in blank percent literals 161s registers and corrects an offense 161s for i type and ["!", "!"] delimiters 161s accepts literals without additional spaces 161s accepts multi-line literals within a method 161s registers an offense for spaces after first delimiter 161s accepts multi-line literals 161s registers an offense for literals with escaped and other spaces 161s registers an offense for spaces before final delimiter 161s accepts newlines and additional following alignment spaces 161s registers an offense for unnecessary spaces 161s accepts literals with escaped spaces 161s accepts spaces between entries 161s with spaces in blank percent literals 161s registers and corrects an offense 161s with newline in blank percent literals 161s registers and corrects an offense 161s with space in blank percent literals 161s registers and corrects an offense 161s for I type and ["(", ")"] delimiters 161s accepts literals with escaped spaces 161s registers an offense for literals with escaped and other spaces 161s accepts spaces between entries 161s registers an offense for spaces before final delimiter 161s accepts multi-line literals 161s registers an offense for unnecessary spaces 161s accepts newlines and additional following alignment spaces 161s registers an offense for spaces after first delimiter 161s accepts multi-line literals within a method 162s accepts literals without additional spaces 162s with newline in blank percent literals 162s registers and corrects an offense 162s with space in blank percent literals 162s registers and corrects an offense 162s with spaces in blank percent literals 162s registers and corrects an offense 162s for W type and ["!", "!"] delimiters 162s registers an offense for literals with escaped and other spaces 162s accepts spaces between entries 162s accepts multi-line literals within a method 162s registers an offense for spaces before final delimiter 162s accepts newlines and additional following alignment spaces 162s registers an offense for unnecessary spaces 162s accepts multi-line literals 162s accepts literals with escaped spaces 162s registers an offense for spaces after first delimiter 162s accepts literals without additional spaces 162s with newline in blank percent literals 162s registers and corrects an offense 162s with space in blank percent literals 162s registers and corrects an offense 162s with spaces in blank percent literals 162s registers and corrects an offense 162s for w type and ["[", "]"] delimiters 162s registers an offense for unnecessary spaces 162s accepts multi-line literals 162s registers an offense for spaces after first delimiter 162s accepts literals without additional spaces 162s accepts multi-line literals within a method 162s registers an offense for literals with escaped and other spaces 162s registers an offense for spaces before final delimiter 162s accepts spaces between entries 162s accepts newlines and additional following alignment spaces 162s accepts literals with escaped spaces 162s with newline in blank percent literals 162s registers and corrects an offense 162s with space in blank percent literals 162s registers and corrects an offense 162s with spaces in blank percent literals 162s registers and corrects an offense 162s 162s RuboCop::Cop::Layout::SpaceInsideBlockBraces 162s register offenses and correct both braces without inner space 162s accepts left brace without outer space 162s registers an offense and corrects left brace without inner space 162s accepts braces surrounded by spaces 162s registers an offense and corrects right brace without inner space 162s registers an offense and corrects both left and right brace without inner space after success 162s configured with no_space 162s registers an offense and corrects both left and right brace with inner space after success 162s registers an offense and corrects left brace with inner space 162s accepts left brace without outer space 162s registers an offense and corrects right brace with inner space 162s accepts braces without spaces inside 162s with passed in parameters 162s and space before block parameters not allowed 162s registers an offense and corrects left brace with inner space 162s registers an offense when braces are not aligned in multiline block 162s accepts when braces are aligned in multiline block 162s accepts new lambda syntax 162s accepts when braces are aligned in multiline block with bracket 162s registers an offense when braces are not aligned in multiline block with bracket 162s and space before block parameters allowed 162s accepts new lambda syntax 162s registers an offense and corrects left brace without inner space 162s accepts left brace with inner space 162s with passed in parameters 162s accepts new lambda syntax 162s and BlockDelimiters cop enabled 162s registers an offense and corrects multi-line blocks 162s registers an offense and corrects for single-line blocks 162s and space before block parameters not allowed 162s registers an offense and corrects left brace with inner space 162s accepts new lambda syntax 162s accepts left brace without inner space 162s for multi-line blocks 162s accepts left brace with inner space 162s registers an offense and corrects left brace without inner space 162s for single-line blocks 162s accepts left brace with inner space 162s registers an offense and corrects left brace without inner space 162s with space inside empty braces not allowed 162s accepts empty braces with line break inside 162s accepts multiline braces with content 162s accepts braces that are not empty 162s accepts braces with something inside 162s registers an offense and corrects empty braces with space inside 162s accepts empty braces with no space inside 162s accepts empty braces with comment and line break inside 162s with space inside empty braces allowed 162s registers an offense and corrects empty braces with no space inside 162s accepts empty braces with space inside 162s Ruby >= 2.7 162s registers an offense for numblocks without inner space 162s with invalid value for EnforcedStyleForEmptyBraces 162s fails with an error 162s 162s RuboCop::Cop::Style::RedundantFreeze 162s allows .freeze on method call 162s behaves like immutable objects 162s registers an offense for frozen 'foo'.count 162s behaves like immutable objects 162s registers an offense for frozen 1.5 162s behaves like immutable objects 162s registers an offense for frozen ('a' > 'b') 162s behaves like mutable objects 162s allows "top#{1 + 2}" with freeze 162s behaves like immutable objects 162s registers an offense for frozen :"" 162s behaves like immutable objects 162s registers an offense for frozen [1, 2, 3].size 162s behaves like immutable objects 162s registers an offense for frozen 1 162s behaves like immutable objects 162s registers an offense for frozen :sym 162s behaves like mutable objects 162s allows { a: 1, b: 2 } with freeze 162s behaves like mutable objects 162s allows ENV['foo'] with freeze 162s behaves like immutable objects 162s registers an offense for frozen (a > b) 162s behaves like immutable objects 162s registers an offense for frozen (2 > 1) 162s behaves like mutable objects 162s allows 'str' with freeze 162s behaves like mutable objects 162s allows ([42] * 42) with freeze 162s behaves like mutable objects 162s allows ('a' * 20) with freeze 162s behaves like mutable objects 162s allows ::ENV['foo'] with freeze 162s behaves like immutable objects 162s registers an offense for frozen (1 + 2) 162s when the receiver is a string literal 162s Ruby 2.7 or lower 162s when the frozen string literal comment is false 162s behaves like mutable objects 162s allows "#{a}" with freeze 162s when the frozen string literal comment is true 162s behaves like immutable objects 162s registers an offense for frozen "#{a}" 162s when the frozen string literal comment is missing 162s behaves like mutable objects 162s allows "#{a}" with freeze 162s Regexp and Range literals 162s Ruby 2.7 or lower 162s behaves like mutable objects 162s allows /./ with freeze 162s behaves like mutable objects 162s allows (1...5) with freeze 162s behaves like mutable objects 162s allows (1..5) with freeze 162s Ruby 3.0 or higher 162s behaves like immutable objects 162s registers an offense for frozen (1..5) 162s behaves like immutable objects 162s registers an offense for frozen (1...5) 162s behaves like immutable objects 162s registers an offense for frozen /./ 162s Ruby 3.0 or higher 162s when the frozen string literal comment is true 162s behaves like mutable objects 162s allows "#{a}" with freeze 162s when the frozen string literal comment is missing 162s behaves like mutable objects 162s allows "#{a}" with freeze 162s when the frozen string literal comment is false 162s behaves like mutable objects 162s allows "#{a}" with freeze 162s behaves like mutable objects 162s allows ('a' + 'b') with freeze 162s behaves like mutable objects 162s allows [1, 2, 3] with freeze 162s behaves like mutable objects 162s allows (a + b) with freeze 162s 162s RuboCop::Cop::Style::TrivialAccessors 162s registers an offense on reader with `private` 162s accepts expressions within reader 162s accepts reader nested within an instance_eval call 162s registers an offense on class reader 162s registers an offense on reader with braces 162s registers an offense on writer without braces 162s accepts writer in a module 162s accepts reader with different ivar name 162s registers an offense on class writer 162s accepts non-trivial writer 162s accepts writer nested within a module 162s registers an offense on one-liner writer 162s accepts blocks 162s accepts reader nested within a module 162s accepts splats 162s accepts writer using top level 162s accepts reader using top level 162s accepts expressions within writer 162s registers an offense on instance reader 162s accepts non-trivial reader 162s accepts an initialize method looking like a writer 162s does not register an offense on DSL-style writer 162s accepts writer with different ivar name 162s registers an offense on one-liner reader 162s registers an offense on instance writer 162s flags a reader inside a class, inside an instance_eval call 162s accepts writer nested within an instance_eval call 162s with allowed methods 162s accepts allowed reader 162s accepts allowed writer 162s with AllowPredicates: false 162s accepts allowed predicate 162s exact name match disabled 162s registers an offense when names mismatch in reader 162s registers an offense when names mismatch in writer 162s ignore class methods 162s accepts class writer 162s accepts class reader 162s allow predicates 162s accepts predicate-like reader 162s disallow predicates 162s does not accept predicate-like reader 162s with DSL denied 162s registers an offense on DSL-style writer 162s 162s RuboCop::Cop::Layout::EmptyLinesAroundArguments 162s when extra lines 162s registers and autocorrects offense for empty line before arg 162s registers and autocorrects offense on correct lines for multi-offense example 162s registers and autocorrects offense when args start on definition line 162s registers and autocorrects offense on correct line for single offense example 162s registers autocorrects empty line whetn args start on definition line 162s registers and autocorrects offenses when multiple empty lines are detected 162s registers and autocorrects offense for empty line after arg 162s registers and autocorrects offense for empty line between args 162s registers and autocorrects offense when empty line between normal arg & block arg 162s when using safe navigation operator 162s registers and autocorrects offense for empty line before arg 162s when no extra lines 162s accepts method with argument that trails off heredoc 162s accepts listed args starting on definition line 162s accepts block argument with empty line 162s accepts multiple listed mixed args 162s accepts one line methods 162s accepts method with argument that trails off block 162s accepts method with no arguments that trails off block 162s accepts when blank line is inserted between method with arguments and receiver 162s accepts multiline style argument for method call without selector 162s with multiple arguments 162s ignores empty lines inside of method arguments 162s with one argument 162s ignores empty lines inside of method arguments 162s 162s RuboCop::Cop::Layout::SpaceAfterComma 162s inside hash braces 162s when EnforcedStyle for SpaceInsideBlockBraces is no_space 162s accepts no space between a comma and a closing brace 162s behaves like common behavior 162s accepts a space between a comma and a closing brace 162s when EnforcedStyle for SpaceInsideBlockBraces is space 162s registers an offense for no space between a comma and a closing brace 162s behaves like common behavior 162s accepts a space between a comma and a closing brace 162s method call arg commas without space 162s behaves like ends with an item 162s registers an offense and does autocorrection 162s array index commas without space 162s behaves like trailing comma 162s accepts the last comma 162s behaves like ends with an item 162s registers an offense and does autocorrection 162s block argument commas without space 162s behaves like ends with an item 162s registers an offense and does autocorrection 162s behaves like trailing comma 162s accepts the last comma 162s 162s RuboCop::Cop::Layout::SpaceAroundBlockParameters 162s when EnforcedStyleInsidePipes is space 162s registers an offense and corrects space with parens at middle 162s accepts a block with spaces in the right places 162s registers an offense and corrects extra space before first parameter 162s skips lambda without parens 162s registers an offense for no space before first parameter 162s skips lambda without args 162s registers an offense and corrects a lambda for extra spacebefore first parameter 162s registers an offense and corrects spacing in lambda args 162s accepts a block parameter without preceding space 162s accepts an empty block 162s registers an offense and corrects multiple spaces after last parameter 162s registers an offense and corrects missing space before first argument and after last argument 162s accepts a lambda with spaces in the right places 162s registers an offense and corrects a lambda for multiple spacesafter last parameter 162s accepts a block with parameters but no body 162s registers an offense and corrects no space after closing pipe 162s registers an offense and corrects a lambda for no space after last parameter 162s registers an offense and corrects multiple spaces before parameter 162s registers an offense and corrects no space after last parameter 162s registers an offense and corrects a lambda for no space before first parameter 162s accepts line break after closing pipe 162s registers an offense and corrects block arguments inside Hash#each 162s trailing comma 162s registers an offense and corrects no space after the last comma 162s accepts space after the last comma 162s accepts space both before and after the last comma 162s when EnforcedStyleInsidePipes is no_space 162s registers an offense and corrects a lambda for space after the last parameter 162s accepts an empty block 162s accepts line break after closing pipe 162s accepts a block with parameters but no body 162s registers an offense and corrects no space after closing pipe 162s accepts a lambda with spaces in the right places 162s skips lambda without parens 162s accepts a block with spaces in the right places 162s registers an offense and corrects all types of spacing issues for a lambda 162s skips lambda without args 162s registers an offense and corrects multiple spaces before parameter 162s registers an offense and corrects space after last parameter 162s accepts block parameters with surrounding space that includes line breaks 162s accepts a block parameter without preceding space 162s registers an offense and corrects all types of spacing issues 162s registers an offense and corrects space before first parameter 162s registers an offense and corrects a lambda for space before first parameter 162s registers an offense and corrects for space with parens 162s trailing comma 162s registers an offense for space after the last comma 162s registers an offense for space before and after the last comma 162s 162s RuboCop::CLI --disable-uncorrectable 162s --disable-uncorrectable 162s does not disable anything for cops that support autocorrect 162s if one one-line disable statement fits 163s adds it when the cop supports autocorrect but does not correct the offense 163s adds it 163s but there are more offenses on the line and they don't all fit 163s adds both one-line and before-and-after disable statements 163s and there are two offenses of the same kind on one line 163s adds a single one-line disable statement 163s when exist offense for Layout/SpaceInsideArrayLiteralBrackets 163s when `EnforcedStyle: space` 163s does not disable anything for cops that support autocorrect 163s when `EnforcedStyle: no_space` 164s does not disable anything for cops that support autocorrect 164s if a one-line disable statement doesn't fit 164s adds before-and-after disable statement 164s and the offense is inside a heredoc 164s adds before-and-after disable statement around the heredoc 164s 164s RuboCop::Cop::Style::AndOr 164s when style is always 164s autocorrects "or" with || in method calls (3) 164s autocorrects "or" with || and doesn't add extra parentheses 164s also warns on non short-circuit (or) 164s autocorrects "or" with || in method calls 164s also warns on non short-circuit (and) (unless) 164s registers an offense for "and" 164s autocorrects "or" with an assignment on the left 164s autocorrects "or" inside def 164s autocorrects "and" with && in method calls 164s autocorrects "and" with an Enumerable accessor on either side 164s autocorrects "or" with an assignment on the right 164s warns on short-circuit (or) 164s also warns on while (or) 164s autocorrects "and" with && in method calls (2) 164s autocorrects "and" with && in method calls (4) 164s also warns on non short-circuit (and) 164s autocorrects "and" inside def 164s autocorrects "and" with && in method calls (3) 164s warns on short-circuit (and) 164s also warns on while (and) 164s also warns on non short-circuit (or) (unless) 164s autocorrects "or" with || and adds parentheses to expr 164s also warns on until (or) 164s registers an offense for "or" 164s also warns on until (and) 164s autocorrects "or" with || in method calls (2) 164s autocorrects "and" with && and doesn't add extra parentheses 164s autocorrects "and" with && and adds parentheses to expr 164s autocorrects "or" with || in method calls (4) 164s with predicate method with arg without space on right 164s autocorrects "or" with || and adds parens 164s autocorrects "and" with && and adds parens 164s within a nested begin node with one child only 164s autocorrects "and" with && and adds parens 164s when `or` precedes `and` 164s registers an offense and corrects 164s with one predicate method without space on right and another method 164s autocorrects "and" with && and adds parens 164s autocorrects "or" with || and adds parens 164s when left hand side is a comparison method 164s autocorrects "and" with && and adds parens 164s with obj.method= arg on left 164s autocorrects "and" with && and adds parens 164s when `or` precedes `&&` 164s registers an offense and corrects 164s when `and` precedes `||` 164s registers an offense and corrects 164s with !variable on left 164s doesn't crash and burn 164s with `not` expression on right 164s autocorrects "and" with && and adds parens 164s with !obj.method arg on left 164s autocorrects "and" with && and adds parens 164s with two predicate methods with args without spaces on right 164s autocorrects "and" with && and adds parens 164s autocorrects "or" with || and adds parens 164s when `and` precedes `or` 164s registers an offense and corrects 164s with obj.method = arg on left 164s autocorrects "and" with && and adds parens 164s within a nested begin node 164s autocorrects "and" with && and adds parens 164s with a file which contains __FILE__ 164s autocorrects "or" with || 164s with !obj.method arg on right 164s autocorrects "and" with && and adds parens 164s with `not` expression on left 164s autocorrects "and" with && and adds parens 164s when style is conditionals 164s accepts "and" in post-while body 164s accepts "or" in if body 164s accepts "or" in post-while body 164s registers an offense for "or" in while condition 164s registers an offense for "or" in post-until condition 164s accepts "and" in while body 164s accepts "and" in if body 164s accepts "and" in post-until body 164s registers an offense for "or" in if condition 164s registers an offense for "and" in until condition 164s registers an offense for "and" in post-until condition 164s registers an offense for "and" in while condition 164s registers an offense for "or" in post-while condition 164s accepts "or" outside of conditional 164s registers an offense for "and" in post-while condition 164s accepts && outside of conditional 164s accepts "and" outside of conditional 164s registers an offense for "and" in if condition 164s accepts "and" in until body 164s accepts "or" in while body 164s accepts "or" in until body 164s accepts || outside of conditional 164s accepts || inside of conditional 164s accepts "or" in post-until body 164s registers an offense for "or" in until condition 164s accepts && inside of conditional 164s 164s RuboCop::Cop::Style::TrailingCommaInArrayLiteral 164s with single line list of values 164s when EnforcedStyleForMultiline is consistent_comma 164s accepts literal without trailing comma 164s accepts empty literal 164s registers an offense for trailing comma 164s accepts single element literal without trailing comma 164s accepts rescue clause 164s when EnforcedStyleForMultiline is comma 164s accepts literal without trailing comma 164s accepts single element literal without trailing comma 164s accepts rescue clause 164s registers an offense for trailing comma 164s accepts empty literal 164s when EnforcedStyleForMultiline is no_comma 164s accepts literal without trailing comma 164s accepts rescue clause 164s registers an offense for trailing comma 164s accepts single element literal without trailing comma 164s accepts empty literal 164s with multi-line list of values 164s when EnforcedStyleForMultiline is comma 164s accepts literal with two of the values on the same line 164s accepts an empty array being passed as a method argument 164s accepts a multiline array with a single item and trailing comma 164s accepts trailing comma 164s accepts a multiline word array 164s registers an offense for a literal with two of the values on the same line and a trailing comma 164s when closing bracket is on same line as last value 164s accepts literal with no trailing comma 164s when EnforcedStyleForMultiline is consistent_comma 164s registers an offense for literal with two of the values on the same line and no trailing comma 164s accepts a multiline array with a single item and trailing comma 164s accepts trailing comma 164s accepts a multiline array with items on a single line andtrailing comma 164s accepts a multiline word array 164s accepts two values on the same line 164s when closing bracket is on same line as last value 164s registers an offense for no trailing comma 164s when EnforcedStyleForMultiline is no_comma 164s accepts a literal with no trailing comma 164s registers an offense for trailing comma 164s autocorrects unwanted comma where HEREDOC has commas 164s accepts HEREDOC with commas 164s 164s RuboCop::Cop::Style::UnlessLogicalOperators 164s EnforcedStyle is `forbid_logical_operators` 164s does not register an offense when using if 164s registers an offense when using only `or` 164s does not register an offense when not used in unless 164s registers an offense when using only `and` 164s registers an offense when using only `&&` 164s registers an offense when using `&&` followed by || 164s does not register an offense when not using logical operator 164s registers an offense when using only `||` 164s EnforcedStyle is `forbid_mixed_logical_operators` 164s does not register an offense when using if 164s does not register an offense when using only `&&`s 164s does not register an offense when using `&&` operator and invoked method name includes "and" in the conditional branch 164s does not register an offense when using only `and`s 164s does not register an offense when not using logical operator 164s does not register an offense when using only `||`s 164s does not register an offense when using `||` operator and invoked method name includes "or" in the conditional branch 164s registers an offense when using `&&` and `||` 164s does not register an offense when not used in unless 164s does not register an offense when using only `or`s 164s registers an offense when using `&&` and `and` 164s registers an offense when using parentheses 164s registers an offense when using `&&` and `or` 164s registers an offense when using `||` and `and` 164s registers an offense when using `||` and `or` 164s 164s RuboCop::Cop::Gemspec::RequireMFA 164s when there are other metadata keys 164s and `rubygems_mfa_required` is included 164s does not register an offense 164s and `rubygems_mfa_required` is not included 164s registers an offense and corrects 164s with rubygems_mfa_required: false by key access 164s registers an offense and corrects 164s with rubygems_mfa_required: true 164s does not register an offense 164s when the specification has an non-hash metadata 164s registers an offense but does not correct 164s with rubygems_mfa_required: false 164s registers an offense and corrects 164s when metadata is set by key assignment 164s and `rubygems_mfa_required` is not included 164s registers an offense 164s and `rubygems_mfa_required` is included 164s does not register an offense 164s when the specification is blank 164s registers an offense and corrects 164s when the gemspec is blank 164s does not register an offense 164s when the specification has a metadata hash but no rubygems_mfa_required key 164s registers an offense and corrects 164s 164s RuboCop::Cop::Style::SwapValues 164s does not register an offense when almost swapping variables 164s handles comments when correcting 164s does not register an offense when idiomatically swapping variables 164s does not register an offense when assigning receiver object at `def` 164s behaves like verbosely swapping 164s registers an offense and corrects when verbosely swapping constant variables 164s behaves like verbosely swapping 164s registers an offense and corrects when verbosely swapping local variables 164s behaves like verbosely swapping 164s registers an offense and corrects when verbosely swapping class variables 164s behaves like verbosely swapping 164s registers an offense and corrects when verbosely swapping instance variables 164s behaves like verbosely swapping 164s registers an offense and corrects when verbosely swapping constant with namespaces variables 164s behaves like verbosely swapping 164s registers an offense and corrects when verbosely swapping global variables 164s behaves like verbosely swapping 165s registers an offense and corrects when verbosely swapping mixed variables 165s 165s RuboCop::Cop::Style::Documentation 165s registers an offense if the comment line contains code 165s accepts empty class without documentation 165s registers an offense for compact-style nested module 165s does not consider comment followed by empty line to be class documentation 165s accepts non-empty class with documentation 165s registers an offense for non-empty class with annotation comment 165s accepts namespace module which defines constants 165s registers an offense for non-empty class 165s registers an offense for non-empty class with directive comment 165s registers an offense for non-namespace 165s registers an offense for a deeply nested class 165s registers an offense for compact-style nested class 165s registers an offense for non-empty class with encoding comment 165s registers an offense for empty module without documentation 165s accepts namespace module without documentation 165s does not raise an error for an implicit match conditional 165s accepts namespace class which defines constants 165s registers an offense for non-empty cbase class 165s accepts non-empty module with documentation 165s accepts non-empty class with comment that ends with an annotation 165s registers offense for non-empty class with frozen string comment 165s accepts namespace class without documentation 165s accepts non-empty class with annotation comment followed by other comment 165s with # :nodoc: 165s registers an offense for nested class without documentation 165s accepts non-namespace class without documentation 165s accepts compact-style nested module without documentation 165s accepts compact-style nested class without documentation 165s registers an offense for nested module without documentation 165s accepts non-namespace module without documentation 165s with `all` modifier 165s accepts nested module without documentation 165s on a subclass 165s accepts non-namespace subclass without documentation 165s registers an offense for nested subclass without documentation 165s when AllowedConstants is configured 165s ignores the constants in the config 165s with `all` modifier 165s accepts nested subclass without documentation 165s with `all` modifier 165s accepts nested class without documentation 165s without documentation 165s macro-only class 165s registers offense for macro with other methods 165s does not register offense with single macro 165s does not register offense with multiple macros 165s with non-empty module 165s with constants visibility declaration content 165s does not register an offense 165s with non-empty class 165s with constants visibility declaration content 165s does not register an offense 165s sparse and trailing comments 165s ignores sparse comments inside class node 165s ignores sparse comments inside module node 165s ignores comments after class node end 165s ignores comments after module node end 165s 165s RuboCop::Cop::Layout::SpaceInsideArrayPercentLiteral 165s accepts non array percent literals 165s for i type and ["(", ")"] delimiters 165s accepts newlines and additional following alignment spaces 165s accepts multi-line literals 165s accepts literals without additional spaces 165s registers an offense for unnecessary spaces 165s registers an offense for multiple spaces between items 165s accepts literals with escaped and additional spaces 165s accepts literals with escaped spaces 165s accepts multi-line literals within a method 165s for W type and ["[", "]"] delimiters 165s accepts literals with escaped and additional spaces 165s registers an offense for multiple spaces between items 165s accepts literals with escaped spaces 165s accepts multi-line literals 165s accepts newlines and additional following alignment spaces 165s accepts multi-line literals within a method 165s registers an offense for unnecessary spaces 165s accepts literals without additional spaces 165s for I type and ["(", ")"] delimiters 165s accepts literals with escaped spaces 165s registers an offense for multiple spaces between items 165s accepts literals without additional spaces 165s registers an offense for unnecessary spaces 165s accepts multi-line literals 165s accepts multi-line literals within a method 165s accepts literals with escaped and additional spaces 165s accepts newlines and additional following alignment spaces 165s for I type and ["{", "}"] delimiters 165s registers an offense for unnecessary spaces 165s accepts newlines and additional following alignment spaces 165s accepts literals with escaped and additional spaces 165s accepts multi-line literals within a method 165s accepts literals with escaped spaces 165s accepts literals without additional spaces 165s registers an offense for multiple spaces between items 165s accepts multi-line literals 165s for w type and ["[", "]"] delimiters 165s registers an offense for multiple spaces between items 165s accepts literals with escaped and additional spaces 165s registers an offense for unnecessary spaces 165s accepts multi-line literals within a method 165s accepts literals with escaped spaces 165s accepts newlines and additional following alignment spaces 165s accepts multi-line literals 165s accepts literals without additional spaces 165s for I type and ["!", "!"] delimiters 165s registers an offense for multiple spaces between items 165s accepts newlines and additional following alignment spaces 165s accepts literals with escaped spaces 165s accepts literals without additional spaces 165s accepts multi-line literals within a method 165s accepts multi-line literals 165s accepts literals with escaped and additional spaces 165s registers an offense for unnecessary spaces 165s for i type and ["{", "}"] delimiters 165s accepts literals with escaped spaces 165s registers an offense for unnecessary spaces 165s accepts literals without additional spaces 165s accepts multi-line literals within a method 165s registers an offense for multiple spaces between items 165s accepts multi-line literals 165s accepts newlines and additional following alignment spaces 165s accepts literals with escaped and additional spaces 165s for w type and ["(", ")"] delimiters 165s accepts literals with escaped spaces 165s registers an offense for multiple spaces between items 165s registers an offense for unnecessary spaces 165s accepts newlines and additional following alignment spaces 165s accepts literals with escaped and additional spaces 165s accepts multi-line literals 165s accepts multi-line literals within a method 165s accepts literals without additional spaces 165s for W type and ["{", "}"] delimiters 165s accepts multi-line literals within a method 165s registers an offense for unnecessary spaces 165s accepts newlines and additional following alignment spaces 165s registers an offense for multiple spaces between items 165s accepts literals without additional spaces 165s accepts literals with escaped and additional spaces 165s accepts literals with escaped spaces 165s accepts multi-line literals 165s for w type and ["!", "!"] delimiters 165s accepts literals without additional spaces 165s accepts literals with escaped spaces 165s registers an offense for multiple spaces between items 165s accepts literals with escaped and additional spaces 165s accepts newlines and additional following alignment spaces 165s accepts multi-line literals 165s accepts multi-line literals within a method 165s registers an offense for unnecessary spaces 165s for i type and ["!", "!"] delimiters 165s accepts literals with escaped spaces 165s accepts multi-line literals within a method 165s accepts literals without additional spaces 165s accepts newlines and additional following alignment spaces 165s registers an offense for multiple spaces between items 165s accepts literals with escaped and additional spaces 165s accepts multi-line literals 165s registers an offense for unnecessary spaces 165s for w type and ["{", "}"] delimiters 165s accepts literals without additional spaces 165s accepts multi-line literals 165s accepts multi-line literals within a method 165s accepts literals with escaped spaces 165s registers an offense for unnecessary spaces 165s accepts newlines and additional following alignment spaces 165s accepts literals with escaped and additional spaces 165s registers an offense for multiple spaces between items 165s for i type and ["[", "]"] delimiters 165s accepts multi-line literals 165s accepts literals with escaped and additional spaces 165s accepts literals without additional spaces 165s registers an offense for multiple spaces between items 165s accepts multi-line literals within a method 165s accepts literals with escaped spaces 165s accepts newlines and additional following alignment spaces 165s registers an offense for unnecessary spaces 165s for W type and ["!", "!"] delimiters 165s accepts literals with escaped and additional spaces 165s accepts multi-line literals within a method 165s accepts literals without additional spaces 165s registers an offense for unnecessary spaces 165s accepts newlines and additional following alignment spaces 165s accepts multi-line literals 165s registers an offense for multiple spaces between items 165s accepts literals with escaped spaces 165s for W type and ["(", ")"] delimiters 165s accepts literals with escaped and additional spaces 165s registers an offense for multiple spaces between items 165s accepts literals with escaped spaces 165s accepts newlines and additional following alignment spaces 165s accepts literals without additional spaces 165s accepts multi-line literals 165s accepts multi-line literals within a method 165s registers an offense for unnecessary spaces 165s for I type and ["[", "]"] delimiters 165s accepts literals with escaped spaces 165s accepts literals without additional spaces 165s registers an offense for multiple spaces between items 165s accepts multi-line literals 165s accepts literals with escaped and additional spaces 165s registers an offense for unnecessary spaces 165s accepts newlines and additional following alignment spaces 165s accepts multi-line literals within a method 165s 165s RuboCop::Cop::Style::NilLambda 165s stabby lambda 165s registers an offense when returning nil with `return` 165s registers an offense when returning nil implicitly 165s registers an offense when returning nil with `break` 165s registers an offense when returning nil with `next` 165s properly corrects multiline 165s does not register an offense when not returning nil 165s does not register an offense when doing more than returning nil 165s block lambda 165s does not remove block params or change spacing 165s registers an offense when returning nil with `return` 165s registers an offense when returning nil with `break` 165s properly corrects single line 165s does not register an offense when doing more than returning nil 165s registers an offense when returning nil with `next` 165s registers an offense when returning nil implicitly 165s does not register an offense when not returning nil 165s proc 165s registers an offense when returning nil implicitly 165s registers an offense when returning nil with `return` 165s does not remove block params or change spacing 165s does not register an offense when doing more than returning nil 165s registers an offense when returning nil with `break` 165s does not register an offense when not returning nil 165s properly corrects single line 165s registers an offense when returning nil with `next` 165s Proc.new 165s does not remove block params or change spacing 165s does not register an offense when not returning nil 165s does not register an offense when doing more than returning nil 165s registers an offense when returning nil with `next` 165s registers an offense when returning nil implicitly 165s registers an offense when returning nil with `return` 165s properly corrects single line 165s registers an offense when returning nil with `break` 165s 165s RuboCop::Cop::Style::OptionalBooleanParameter 165s does not register an offense when defining method without args 165s registers an offense when defining method with optional boolean arg that has no space 165s does not register an offense when defining method with optional non-boolean arg 165s does not register an offense when defining method with keyword boolean arg 165s registers an offense when defining class method with optional boolean arg 165s registers an offense when defining method with multiple optional boolean args 165s registers an offense when defining method with optional boolean arg 165s when AllowedMethods is not empty 165s does not register an offense 165s 165s RuboCop::Cop::Lint::LiteralAsCondition 165s registers an offense for `not 2.0` 165s registers an offense for literal 1 in while 165s registers an offense for literal {} in post-loop while 165s registers an offense for `not 1` 165s registers an offense for literal [1] in case 165s registers an offense for literal :sym in case 165s accepts `true` literal in post-loop `while` 165s accepts literal 1 in a when of a case with something after case keyword 165s registers an offense for literal 2.0 in && 165s registers an offense for literal [1] in while 165s registers an offense for literal 2.0 in post-loop until 165s registers an offense for literal 2.0 in ! 165s accepts `true` literal in `while` 165s registers an offense for literal 2.0 in while 165s registers an offense for literal 2.0 in if 165s accepts literal {} in non-toplevel and/or 165s registers an offense for literal :"#{a}" in until 165s registers an offense for literal 2.0 in case 165s registers an offense for literal {} in ! 165s accepts literal :"#{a}" if it's not an and/or operand 165s registers an offense for literal {} in complex cond 165s registers an offense for literal {} in if 165s registers an offense for `not {}` 165s registers an offense for literal 1 in ! 165s registers an offense for literal [1] in if 165s registers an offense for literal :sym in complex cond 165s registers an offense for literal :sym in && 165s registers an offense for literal 2.0 in complex cond 165s registers an offense for literal :"#{a}" in post-loop until 165s registers an offense for literal 2.0 in complex ! 165s accepts literal :sym in a when of a case with something after case keyword 165s registers an offense for `not :"#{a}"` 165s registers an offense for literal [1] in ! 165s registers an offense for literal 2.0 in a when of a case without anything after case keyword 165s registers an offense for literal [1] in post-loop while 165s registers an offense for literal 2.0 in post-loop while 165s accepts literal :"#{a}" in a when of a case with something after case keyword 165s registers an offense for literal :"#{a}" in ! 165s registers an offense for literal {} in case 165s accepts literal 1 if it's not an and/or operand 165s registers an offense for literal [1] in post-loop until 165s registers an offense for `!:"#{a}"` 165s registers an offense for literal :sym in until 165s registers an offense for `!:sym` 165s accepts literal [1] in non-toplevel and/or 165s registers an offense for literal 1 in complex cond 165s registers an offense for literal :"#{a}" in if 165s registers an offense for literal {} in post-loop until 165s accepts literal :sym in non-toplevel and/or 165s registers an offense for literal [1] in complex cond 165s registers an offense for literal :"#{a}" in while 165s registers an offense for literal 1 in complex ! 165s accepts literal {} if it's not an and/or operand 165s registers an offense for literal [1] in && 165s registers an offense for `!{}` 165s registers an offense for literal 1 in post-loop until 165s accepts literal [1] in a when of a case with something after case keyword 165s registers an offense for literal :"#{a}" in complex ! 165s registers an offense for literal :sym in post-loop while 165s accepts literal {} in a when of a case with something after case keyword 165s registers an offense for literal {} in && 165s accepts array literal in case, if it has nested non-literal element 165s registers an offense for literal :sym in if 165s registers an offense for literal {} in a when of a case without anything after case keyword 165s accepts literal :"#{a}" in non-toplevel and/or 165s registers an offense for literal :"#{a}" in a when of a case without anything after case keyword 165s registers an offense for literal :sym in ! 165s registers an offense for literal :"#{a}" in case 165s registers an offense for literal [1] in until 165s registers an offense for literal :sym in while 165s registers an offense for literal :"#{a}" in && 165s registers an offense for literal [1] in complex ! 165s registers an offense for literal 1 in && 165s registers an offense for literal 1 in until 165s registers an offense for `!2.0` 165s accepts array literal in case, if it has non-literal elements 165s registers an offense for literal :sym in complex ! 165s registers an offense for `![1]` 165s registers an offense for literal :"#{a}" in complex cond 165s registers an offense for literal [1] in a when of a case without anything after case keyword 165s accepts literal [1] if it's not an and/or operand 165s registers an offense for `not :sym` 165s registers an offense for literal :sym in a when of a case without anything after case keyword 165s accepts literal :sym if it's not an and/or operand 165s accepts `false` literal in `until` 165s accepts `false` literal in post-loop `until` 165s registers an offense for literal 1 in a when of a case without anything after case keyword 165s registers an offense for `not [1]` 165s accepts dstr literal in case 165s registers an offense for literal 1 in post-loop while 165s registers an offense for literal {} in while 165s registers an offense for literal {} in complex ! 165s accepts literal 2.0 in a when of a case with something after case keyword 165s registers an offense for literal {} in until 165s registers an offense for literal 2.0 in until 165s registers an offense for case with a primitive array condition 165s registers an offense for literal :"#{a}" in post-loop while 165s accepts literal 2.0 if it's not an and/or operand 165s registers an offense for literal 1 in case 165s accepts literal 2.0 in non-toplevel and/or 165s registers an offense for literal 1 in if 165s registers an offense for `!1` 165s accepts literal 1 in non-toplevel and/or 165s registers an offense for literal :sym in post-loop until 165s >= Ruby 2.7 165s accepts an offense for literal 2.0 in case match with a match var 165s registers an offense for literal 2.0 in case match without a match var 165s accepts literal 2.0 in a when of a case match 165s >= Ruby 2.7 165s accepts an offense for literal {} in case match with a match var 165s registers an offense for literal {} in case match without a match var 165s accepts literal {} in a when of a case match 165s >= Ruby 2.7 165s registers an offense for literal 1 in case match without a match var 165s accepts literal 1 in a when of a case match 165s accepts an offense for literal 1 in case match with a match var 165s >= Ruby 2.7 165s registers an offense for case match with a primitive array condition 165s accepts an offense for case match with a match var 165s accepts array literal in case match, if it has nested non-literal element 165s accepts dstr literal in case match 165s accepts array literal in case match, if it has non-literal elements 165s >= Ruby 2.7 165s accepts an offense for literal [1] in case match with a match var 165s registers an offense for literal [1] in case match without a match var 166s accepts literal [1] in a when of a case match 166s >= Ruby 2.7 166s registers an offense for literal :"#{a}" in case match without a match var 166s accepts an offense for literal :"#{a}" in case match with a match var 166s accepts literal :"#{a}" in a when of a case match 166s >= Ruby 2.7 166s accepts literal :sym in a when of a case match 166s registers an offense for literal :sym in case match without a match var 166s accepts an offense for literal :sym in case match with a match var 166s 166s RuboCop::Cop::Style::RedundantConditional 166s does not register an offense for if/elsif/else with non-boolean results 166s registers an offense for if/else with boolean results 166s registers an offense for ternary with boolean results 166s registers an offense for ternary with negated boolean results 166s does not register an offense for if/else with non-boolean results 166s registers an offense for if/elsif/else with boolean results 166s registers an offense for if/elsif/else with negated boolean results 166s allows ternary with non-boolean results 166s registers an offense for if/else with negated boolean results 166s 166s RuboCop::Cop::Style::FrozenStringLiteralComment 166s target_ruby_version < 2.3 166s accepts freezing a string 166s accepts calling << on a string with interpolation 166s accepts calling << on a string 166s accepts freezing a string with interpolation 166s never 166s registers an offense for a frozen string literal comment on the top line 166s registers an offense for a frozen string literal comment below shebang above an encoding comments 166s allows not having a frozen string literal comment under an encoding comment 166s allows not having a frozen string literal comment under a shebang and an encoding comment 166s registers an offense for a frozen string literal comment below shebang and encoding comments 166s registers an offense for a disabled frozen string literal comment below shebang and encoding comments 166s accepts a source with no tokens 166s registers an offense for a disabled frozen string literal comment below shebang above an encoding comments 166s accepts an empty source 166s registers an offense for a disabled frozen string literal comment on the top line 166s registers an offense for a disabled frozen string literal below a shebang comment 166s registers an offense for having a frozen string literal comment after other comments 166s registers an offense for a frozen string literal comment below an encoding comment 166s accepts a frozen string literal comment under ruby code 166s registers an offense for a frozen string literal comment below a shebang comment 166s registers an offense for a disabled frozen string literal below an encoding comment 166s accepts not having not having a frozen string literal comment under a shebang 166s accepts not having a frozen string literal comment on the top line 166s always 166s accepts a frozen string literal comment below shebang and encoding comments 166s accepts a frozen string literal below an encoding comment 166s registers an offense for not having a frozen string literal comment under an encoding comment separated by a newline 166s accepts a frozen string literal on the top line 166s registers an offense for not having a frozen string literal comment under a shebang 166s registers an offense for not having a frozen string literal comment when there is only a shebang 166s accepts an empty source 166s accepts a disabled frozen string literal comment below shebang and encoding comments 166s accepts a frozen string literal below a shebang comment 166s accepts a disabled frozen string literal on the top line 166s registers an offense for not having a frozen string literal comment on the top line 166s registers an offense for having a frozen string literal comment under ruby code 166s accepts a frozen string literal comment after other comments 166s accepts a frozen string literal comment below newline-separated magic comments 166s accepts a source with no tokens 166s registers an offense for not having a frozen string literal comment under a shebang and an encoding comment 166s accepts a disabled frozen string literal comment below shebang above an encoding comments 166s accepts an emacs style combined magic comment 166s registers an offense for an extra first empty line 166s accepts a frozen string literal comment below shebang above an encoding comments 166s registers an offense with an empty line between magic comments and the code 166s accepts a disabled frozen string literal below a shebang comment 166s registers an offense for arbitrary tokens 166s accepts a disabled frozen string literal below an encoding comment 166s registers an offense for not having a frozen string literal comment under an encoding comment 166s always_true 166s registers an offense for arbitrary tokens below an encoding comment and extra space 166s registers an offense for arbitrary tokens under shebang with no other code 166s registers an offense for a disabled frozen string literal comment after other comments 166s accepts a frozen string literal comment after other comments 166s registers an offense for not having a frozen string literal comment under an encoding comment and extra space 166s registers an offense for not having a frozen string literal comment under shebang with no other code 166s registers an offense for not having a frozen string literal comment under a shebang, an encoding comment, and extra space 166s registers an offense for arbitrary tokens below shebang above an encoding comments 166s registers an offense for a disabled frozen string literal below an encoding comment 166s accepts a frozen string literal comment under shebang with no other code 166s registers an offense for arbitrary tokens below an encoding comment 166s registers an offense for a disabled frozen string literal comment below shebang, an encoding comment, and extra space 166s accepts a source with no tokens 166s registers an offense for a disabled frozen string literal below a shebang comment 166s accepts an empty source 166s accepts a frozen string literal comment below shebang and encoding comments 166s registers an offense for a disabled frozen string literal comment below shebang above an encoding comments 166s registers an offense for arbitrary tokens below shebang, an encoding comment, and extra space 166s registers an offense for not having a frozen string literal comment on the top line 166s accepts a frozen string literal on the top line 166s accepts an emacs style combined magic comment 166s registers an offense for arbitrary tokens 166s registers an offense for an extra first empty line 166s registers an offense for a disabled frozen string literal on the top line 166s registers an offense for not having a frozen string literal comment under an encoding comment 166s registers an offense for a disabled frozen string literal comment below an encoding comment and extra space 166s registers an offense for a disabled frozen string literal comment under shebang with no other code 166s registers an offense for arbitrary tokens below a shebang comment 166s accepts a frozen string literal below an encoding comment 166s accepts a frozen string literal comment below shebang above an encoding comments 166s registers an offense for arbitrary tokens above an empty line 166s accepts a frozen string literal comment below shebang, an encoding comment, and extra space 166s accepts a frozen string literal below a shebang comment 166s registers an offense for a disabled frozen string literal 166s accepts a frozen string literal comment below an encoding comment and extra space 166s registers an offense for a disabled frozen string literal above an empty line 166s registers an offense for not having a frozen string literal comment under a shebang and an encoding comment 166s registers an offense for arbitrary tokens below shebang and encoding comments 166s registers an offense for a disabled frozen string literal comment below shebang and encoding comments 166s registers an offense for having a frozen string literal comment under ruby code 166s 166s RuboCop::Cop::Style::RedundantSelfAssignmentBranch 166s does not register an offense when self-assigning redundant else ternary branch for ivar 166s does not register an offense when not self-assigning redundant branches 166s registers and corrects an offense when self-assigning redundant else ternary branch 166s registers and corrects an offense when self-assigning redundant if branch 166s does not register an offense when using only if branch 166s does not register an offense when using `elsif` and self-assigning the value of `then` branch 166s does not register an offense when self-assigning redundant else ternary branch for gvar 166s does not register an offense when using `elsif` and self-assigning the value of `elsif` branch 166s does not register an offense when using `elsif` and self-assigning the value of `else` branch 166s registers and corrects an offense when self-assigning redundant else branch 166s does not register an offense when self-assigning redundant else branch and multiline if branch 166s registers and corrects an offense when self-assigning redundant if ternary branch 166s does not register an offense when self-assigning redundant else branch and multiline else branch 166s does not register an offense when self-assigning redundant else ternary branch for cvar 166s does not register an offense when multi assignment 166s does not register an offense when lhs is not variable 166s registers and corrects an offense when self-assigning redundant else branch and empty else branch 166s registers and corrects an offense when self-assigning redundant else branch and empty if branch 166s 166s RuboCop::Cop::Lint::EmptyInPattern 166s when a `in` body is missing 166s registers an offense for missing `in` body with a comment 166s registers an offense for missing `in` ... then `body` followed by `else` 166s registers an offense for a missing `in` body 166s registers an offense for missing `in` body with a comment followed by `else` 166s registers an offense for missing `in` ... `then` body 166s registers an offense for missing `in` body followed by `else` 166s when a `in` body is present 166s accepts `case` with `in` ... `then` statements 166s accepts `case` with `in` bodies 166s accepts `case` with `in` bodies and `else` clause 166s accepts `case` with `in` ... `then` statements and else clause 166s when `AllowComments: true` 166s registers an offense for empty `in` when comment is in another branch 166s accepts an empty `in` body with a comment 166s when `AllowComments: false` 166s registers an offense for empty `in` body with a comment 166s 166s RuboCop::Cop::Style::Proc 166s accepts the Proc.new call without block 166s accepts the ::Proc.new call without block 166s registers an offense for ::Proc.new 166s registers an offense for a Proc.new call 166s Ruby 2.7 166s registers an offense for a Proc.new call 166s 166s RuboCop::Options 166s option 166s --cache-root 166s accepts a path as argument 166s fails if also `--cache false` is given 166s fails if no argument is given 166s --disable-uncorrectable 166s fails if given without an autocorrect argument 166s accepts together with an unsafe autocorrect argument 166s accepts together with a safe autocorrect argument 166s --cache 166s accepts false as argument 166s fails if unrecognized argument is given 166s fails if no argument is given 166s accepts true as argument 166s --exclude-limit 166s fails if given first without argument 166s fails if given without --auto-gen-config 166s fails if given last without argument 166s fails if given alone without argument 166s incompatible cli options 166s rejects using -V with --show-cops 166s rejects using -v with --show-cops 166s mentions all incompatible options when more than two are used 166s rejects using -v with -V 166s --autocorrect-all 166s sets some autocorrect options 166s --regenerate-todo 166s when disabled options are overridden to be enabled 166s is expected to eq {:auto_gen_config=>true, :exclude_limit=>"100", :offense_counts=>true, :regenerate_todo=>true} 166s when no other options are given 166s is expected to eq {:auto_gen_config=>true, :exclude_limit=>"100", :offense_counts=>false, :regenerate_todo=>true} 166s when todo options are overridden before --regenerate-todo 166s is expected to eq {:auto_gen_config=>true, :exclude_limit=>"50", :offense_counts=>false, :regenerate_todo=>true} 166s when todo options are overridden after --regenerate-todo 166s is expected to eq {:auto_gen_config=>true, :exclude_limit=>"50", :offense_counts=>false, :regenerate_todo=>true} 166s --display-only-correctable 166s fails if given with --display-only-failed 166s fails if given with an autocorrect argument 166s --fail-level 166s accepts severity initial letters 166s accepts the "fake" severities A/autocorrect 166s accepts full severity names 166s --auto-gen-config 166s accepts other options 166s --display-only-failed 166s fails if given without --format junit 166s works if given with --format junit 166s --display-only-fail-level-offenses 166s fails if given with an autocorrect argument 166s --auto-gen-only-exclude 166s fails if given without --auto-gen-config 166s --autocorrect 166s Specify --autocorrect and --autocorrect-all 166s emits a warning and sets some autocorrect options 166s Specify only --autocorrect 166s sets some autocorrect options 166s -h/--help 166s shows help text 166s lists all builtin formatters 166s exits cleanly 166s --parallel 166s combined with an autocorrect argument 166s combined with --fix-layout 166s allows --parallel 166s combined with --autocorrect 166s allows --parallel 166s combined with --autocorrect-all 166s allows --parallel 166s combined with --cache false 166s ignores --parallel 166s combined with --fail-fast 166s ignores --parallel 166s combined with two incompatible arguments 166s ignores --parallel and lists both incompatible arguments 166s combined with --auto-gen-config 166s ignores --parallel 166s -s/--stdin 166s fails if no paths are given 166s fails if more than one path is given 166s succeeds with exactly one path 166s --fix-layout 166s sets some autocorrect options 166s --no-parallel 166s disables parallel from file 166s deprecated options 166s --auto-correct 166s emits a warning and sets the correct options instead 166s --auto-correct-all 166s emits a warning and sets the correct options instead 166s --safe-auto-correct 166s emits a warning and sets the correct options instead 166s --raise-cop-error 166s raises cop errors 166s --require 166s requires the passed path 166s options precedence 166s RUBOCOP_OPTS environment variable 166s has higher precedence then options from .rubocop file 166s has lower precedence then command line options 166s .rubocop directory 166s is ignored and command line options are used 166s .rubocop file 166s has lower precedence then command line options 167s has lower precedence then options from RUBOCOP_OPTS env variable 167s 167s RuboCop::Cop::Util 167s #line_range 167s returns line range of the expression 167s #same_line? 167s returns false if an argument is not a node or range 167s can use ranges 167s returns false when two nodes are not on the same line 167s returns true when two nodes are on the same line 167s #to_supported_styles 167s when EnforcedStyle 167s is expected to eq "SupportedStyles" 167s when EnforcedStyleInsidePipes 167s is expected to eq "SupportedStylesInsidePipes" 167s 167s RuboCop::Cop::Layout::SpaceAroundOperators 167s registers an offense and corrects exclamation point negation 167s accepts unary operators without space 167s accepts an assignment with a blank line 167s registers an offenses for exponent operator with spaces 167s accepts ::Kernel::raise 167s accepts an assignment followed by newline 167s accepts exclamation point definition 167s accepts def of operator 167s accepts an operator at the beginning of a line 167s accepts some operators that are exceptions & don't need spaces 167s accepts [arg] without space 167s accepts a unary 167s accepts an operator at the end of a line 167s accepts argument default values without space 167s accepts exponent operator without spaces 167s accepts an assignment with the same alignment margins 167s accepts rational 167s accepts operator symbols 167s accepts scope operator 167s accepts an operator called with method syntax 167s accepts []= without space 167s accepts the result of the ExtraSpacing Cop 167s registers an offense and corrects singleton class operator` 167s accepts operators with spaces 167s accepts an assignment by `for` statement 167s accepts splat operator 167s accepts an assignment with spaces 167s accepts [] without space 167s accepts operator surrounded by tabs 167s accepts ranges 167s when EnforcedStyleForExponentOperator is space 167s registers an offenses for exponent operator without spaces 167s when Layout/ExtraSpacing has `ForceEqualSignAlignment` configured to true 167s allows constants to be aligned 167s allows variables to be aligned 167s >= Ruby 2.7 167s does not register an offenses for one-line pattern matching syntax (`in`) 167s extra space around operators 167s registers an offense and corrects inheritance < with too many spaces 167s registers an offense and corrects various assignments with too many spaces 167s accepts for a hash rocket with an extra space for alignment on multiple line 167s registers an offense and corrects a setter call with too many spaces 167s does not register an offenses match operators between `+=` and `<<` 167s registers an offense and corrects a hash rocket with too many spaces 167s registers an offense and corrects arguments to a method 167s registers an offense and corrects operators with too many spaces 167s registers an offense and corrects assignment with too many spaces on either side 167s registers an offense and corrects a hash rocket with an extra spaceon multiple line 167s registers an offense and corrects binary operators that could be unary 167s registers an offense and corrects operators with too many spaces on the same line 167s registers an offense and corrects `-` with too many spaces with negative lhs operand 167s registers an offense and corrects ternary operator with too many spaces 167s registers an offense and corrects equality operators with too many spaces 167s does not register an offenses match operators between `<<` and `+=` 167s registers an offense and corrects hash rocket with too many spaces at rescue 167s registers an offense and corrects match operators with too many spaces 167s behaves like modifier with extra space 167s registers an offense in presence of modifier while statement 167s when does not allowed for alignment 167s registers an offense and corrects an extra space 167s behaves like modifier with extra space 167s registers an offense in presence of modifier until statement 167s behaves like modifier with extra space 167s registers an offense in presence of modifier unless statement 167s behaves like modifier with extra space 167s registers an offense in presence of modifier if statement 167s missing space around operators 167s registers an offense for operators without spaces 167s registers an offense and corrects string concatenation without messing up new lines 167s registers an offense and corrects equality operators without space 167s registers an offense and corrects a setter call without spaces 167s registers an offense for binary operators that could be unary 167s registers an offense and corrects arguments to a method 167s registers an offense and corrects match operators without space 167s registers an offense and corrects various assignments without space 167s doesn't register an offense for operators with newline on right 167s registers an offense for assignment without space on both sides 167s registers an offense and corrects `-` without space with a negative lhs operand 167s registers an offense and corrects inheritance < without space 167s registers an offense and corrects hash rocket without space at rescue 167s when a hash literal is on a single line 167s and Layout/HashAlignment:EnforcedHashRocketStyle is key 167s registers an offense and corrects a hash rocket without spaces 167s and Layout/HashAlignment:EnforcedHashRocketStyle is table 167s registers an offense and corrects a hash rocket without spaces 167s behaves like modifier with missing space 167s registers an offense in presence of modifier unless statement 167s behaves like modifier with missing space 167s registers an offense in presence of modifier if statement 167s behaves like modifier with missing space 167s registers an offense in presence of modifier while statement 167s ternary operators 167s registers an offense and corrects operators with just a leading space 167s registers an offense and corrects operators with just a trailing space 167s registers an offense and corrects operators with no spaces 167s behaves like modifier with missing space 167s registers an offense in presence of modifier until statement 167s when a hash literal is on multiple lines 167s and Layout/HashAlignment:EnforcedHashRocketStyle is table 167s doesn't register an offense for a hash rocket without spaces 167s and Layout/HashAlignment:EnforcedHashRocketStyle is key 167s registers an offense and corrects a hash rocket without spaces 167s >= Ruby 3.0 167s registers an offenses for one-line pattern matching syntax (`=>`) 167s 167s RuboCop::Cop::Lint::RedundantDirGlobSort 167s does not register an offense when not using `sort` for `Dir` 167s does not register an offense when using `sort` without a receiver 167s when Ruby 3.0 or higher 167s does not register an offense when using `collection.sort` 167s registers an offense and correction when using `Dir.glob.sort` 167s does not register an offense when using `Dir.glob('./b/*.txt', './a/*.txt').sort` 167s registers an offense and correction when using `::Dir.glob.sort` 167s registers an offense and correction when using `Dir[].sort.each(&do_something)` 167s does not register an offense when not using `sort` with `sort: false` option for `Dir` 167s does not register an offense when using `Dir.glob(*path).sort` 167s does not register an offense when using `Dir[*path].sort` 167s registers an offense and correction when using `Dir[].sort.each do` 167s does not register an offense when using `Dir['./b/*.txt', './a/*.txt'].sort` 167s when Ruby 2.7 or lower 167s does not register an offense and correction when using `Dir[].sort.each(&do_something)` 167s does not register an offense and correction when using `::Dir.glob.sort` 167s does not register an offense and correction when using `Dir.glob.sort` 167s does not register an offense and correction when using `Dir[].sort.each do` 167s 167s RuboCop::Cop::Layout::MultilineArrayBraceLayout 167s ignores implicit arrays 167s ignores empty arrays 167s ignores single-line arrays 167s when comment present before closing brace 167s corrects closing brace without crashing 167s behaves like multiline literal brace layout method argument 167s when arguments to a method 167s but no comment after the last element 167s autocorrects the closing brace 167s and a comment after the last element 167s detects closing brace on separate line from last element 167s behaves like multiline literal brace layout trailing comma 167s same_line style 167s opening brace on same line as first element 167s last element has a trailing comma 167s autocorrects closing brace on different line as last element 167s symmetrical style 167s opening brace on same line as first element 167s last element has a trailing comma 167s autocorrects closing brace on different line from last element 167s behaves like multiline literal brace layout 167s new_line style 167s opening brace on same line as first element 167s allows closing brace on different line from last element 167s detects closing brace on same line as last multiline element 167s allows closing brace on different line from multi-line element 167s autocorrects closing brace on same line as last element 167s opening brace on separate line from first element 167s allows closing brace on separate line from last element 167s allows closing brace on separate line from last multiline element 167s detects closing brace on same line as last element 167s symmetrical style 167s opening brace on same line as first element 167s allows closing brace on same line as last multiline element 167s allows closing brace on same line as last element 167s detects closing brace on different line from last element 167s autocorrects closing brace on different line from last element 167s with a chained call on the closing brace 167s but no comment after the last element 167s autocorrects the closing brace 167s and a comment after the last element 167s detects closing brace on separate line from last elementbut does not autocorrect the closing brace 167s opening brace on separate line from first element 167s allows closing brace on separate line from last element 167s allows closing brace on separate line from last multiline element 167s detects closing brace on same line as last element 167s same_line style 167s opening brace on separate line from first element 167s allows closing brace on same line as last element 167s detects closing brace on different line from last element 167s allows closing brace on same line as last multiline element 167s opening brace on same line as first element 167s autocorrects closing brace on different line as last element 167s allows closing brace on same line from last element 167s detects closing brace on different line from multiline element 167s allows closing brace on same line as multi-line element 167s with a chained call on the closing brace 167s and a comment after the last element 167s detects closing brace on separate line from last elementbut does not autocorrect the closing brace 167s but no comment after the last element 167s autocorrects the closing brace 167s heredoc 167s ignores heredocs that could share a last line 167s detects heredoc structures that are safe to add to 167s 167s RuboCop::Formatter::FormatterSet 167s responds to all formatter API methods 167s formatter API method 167s invokes the same method of all containing formatters 167s #builtin_formatter_class 167s returns class which matches passed alias name exactly 167s returns class which matches single character alias name 167s returns class which matches double character alias name 167s add_formatter 167s can add multiple formatters by being invoked multiple times 167s adds a formatter to itself 167s adds a formatter with specified formatter type 167s when output path is specified 167s adds a formatter outputs to the specified file 167s when parent directories don't exist 167s creates them 167s when output path is omitted 167s adds a formatter outputs to $stdout 167s #close_output_files 167s does not close non file output 167s closes all output files 167s #custom_formatter_class 167s can handle namespaced constant name 167s returns constant represented by the passed string 167s can handle top level namespaced constant name 167s when non-existent constant name is passed 167s raises error 167s 167s RuboCop::Cop::InternalAffairs::CopDescription 167s The description starts with a word such as verb 167s does not register if the description like `Checks` 167s does not register if the description starts with non-verb word 167s There is no description comment 167s does not register offense 167s The description starts with `This cop ...` 167s registers an offense if using an auxiliary verb 167s registers an offense if the description like `This cop is ...` 167s registers an offense and corrects if using just a verb 167s 167s RuboCop::Cop::Style::SingleLineBlockParams 167s ignores :reduce symbols 167s does not report when destructuring is used 167s does not report if the right names are used but not all arguments are given 167s reports an offense if the arguments names are wrong and not all arguments are given 167s reports an offense if the names are partially correct 167s does not report if no block arguments are present 167s reports an offense if the names are in reverse order 167s finds incorrectly named parameters with leading underscores 167s allows calls with proper argument names 167s ignores do..end blocks 167s finds wrong argument names in calls with different syntax 167s allows an unused parameter to have a leading underscore 167s 167s RuboCop::Cop::Lint::RedundantCopEnableDirective 167s registers offense and corrects redundant enabling of same cop 167s registers correct offense when combined with necessary enable 167s registers multiple offenses and corrects the same comment 167s registers an offense and corrects when the first cop is unnecessarily enabled 167s registers correct offense when combined with necessary enable, no white-space after comma 167s registers offense and corrects unnecessary enable 167s when middle cop is unnecessarily enabled 167s registers an offense and corrects when there is extra white space 167s registers an offense and corrects 167s when all department enabled 167s registers multiple offenses and corrects the same comment 167s registers offense and corrects redundant enabling of same department 167s registers offense and corrects redundant enabling of department of same cop 167s registers offense and corrects unnecessary enable 167s registers an offense and corrects when the first department is unnecessarily enabled 167s registers correct offense when combined with necessary enable 167s registers offense and corrects redundant enabling of cop of same department 167s when all cops are unnecessarily enabled 167s on the same line 167s registers an offense and corrects 167s on separate lines 167s registers an offense and corrects when there is extra white space 167s when last cop is unnecessarily enabled 167s registers an offense and corrects 167s registers an offense and corrects when there is no space between the cops and the comma 167s when cop is disabled in the configuration 167s registers no offense when enabling the cop 167s registers an offense if enabling it twice 167s all switch 167s registers offense and corrects unnecessary enable all 167s when at least one cop was disabled 167s does not register offense 167s 167s RuboCop::Cop::Gemspec::RequiredRubyVersion 167s registers an offense when `required_ruby_version` is blank 167s registers an offense when `required_ruby_version` is not specified 167s registers an offense when `required_ruby_version` is an empty array 167s target ruby version > 2.6 167s registers an offense when `required_ruby_version` is specified with ~> and is higher than `TargetRubyVersion` 167s registers an offense when `required_ruby_version` is specified with >= and is higher than `TargetRubyVersion` 167s target ruby version > 2.7 167s does not register an offense when `required_ruby_version` is specified with >= and equals `TargetRubyVersion` 167s does not register an offense when `required_ruby_version` is specified with >= without a patch version and equals `TargetRubyVersion` 167s does not register an offense when `required_ruby_version` is specified with ~> without a patch version and equals `TargetRubyVersion` 167s registers an offense when `required_ruby_version` is specified with >= without a minor version and is lower than `TargetRubyVersion` 167s registers an offense when `required_ruby_version` is specified with ~> without a minor version and is lower than `TargetRubyVersion` 167s does not register an offense when lowest version of `required_ruby_version` equals `TargetRubyVersion` 167s does not register an offense when `required_ruby_version` is specified with ~> and equals `TargetRubyVersion` 167s target ruby version > 2.7 167s recognizes Gem::Requirement and registers offense 167s registers an offense when `required_ruby_version` is specified with ~> and is lower than `TargetRubyVersion` 167s registers an offense when `required_ruby_version` is specified with >= and is lower than `TargetRubyVersion` 167s registers an offense when `required_ruby_version` is specified in array and is lower than `TargetRubyVersion` 167s recognizes a Gem::Requirement with multiple requirements and does not register an offense 167s false negatives 167s does not register an offense when `required_ruby_version` is assigned as a variable (string literal) 167s does not register an offense when `required_ruby_version` is assigned as a variable (an array of string literal) 167s 167s RuboCop::Cop::Lint::RedundantWithObject 167s registers an offense and corrects when using `ary.each.with_object([]) { |v| v }` 167s registers an offense and corrects when using `ary.each_with_object { |v| v }` 167s an object is used as a block argument 167s registers an offense and corrects when using ary.each_with_object do-end block without parentheses 167s registers an offense and corrects when using ary.each_with_object([]) do-end block 167s Ruby 2.7 167s registers an offense and corrects when using `ary.each_with_object { _1 }` 167s registers an offense and corrects when using `ary.each.with_object([]) { _1 }` 167s when missing argument to `each_with_object` 167s does not register an offense when block has 1 argument 167s does not register an offense when block has 2 arguments 167s 167s RuboCop::Cop::Style::NegatedWhile 167s accepts a while where only part of the condition is negated 167s accepts a while where the condition is doubly negated 167s registers an offense for while with "not" condition 167s autocorrects by replacing until not with while 167s does not blow up for empty while condition 167s registers an offense for until with exclamation point condition 167s does not blow up for empty until condition 167s autocorrects by replacing while not with until 167s registers an offense for while with exclamation point condition 167s 167s RuboCop::Cop::Style::NegatedIf 167s does not blow up for ternary ops 167s does not blow up on a negated ternary operator 167s does not blow up for empty unless condition 167s does not blow up for empty if condition 167s with “postfix” style 167s registers an offense for postfix 167s does not register an offense for prefix 167s with “both” style 167s autocorrects by replacing parenthesized if not with unless 167s registers an offense for if with "not" condition 167s is not confused by negated elsif 167s registers an offense for if with exclamation point condition 167s accepts an if where the condition is doubly negated 167s accepts an if where only part of the condition is negated 167s accepts an if/else with negative condition 167s with “prefix” style 167s registers an offense for prefix 167s does not register an offense for postfix 167s 167s RuboCop::Cop::Style::RedundantFileExtensionInRequire 167s does not register an offense when requiring filename ending with `.so` 167s registers an offense and corrects when requiring filename ending with `.rb` 167s does not register an offense when requiring variable as a filename 167s does not register an offense when requiring filename without an extension 167s 167s RuboCop::Cop::Style::ArrayCoercion 167s registers an offense and corrects when converting variable into array with check 167s does not register an offense when splat is not in array 167s does not register an offense when splatting multiple variables into array 167s does not register an offense when converting variable into other named array variable with check 167s registers an offense and corrects when splatting variable into array 167s 167s RuboCop::Cop::Metrics::BlockNesting 167s accepts if/elsif 167s accepts `Max` levels of nesting 167s when CountBlocks is true 167s nested inline block 167s registers an offense 167s nested multiline block 167s registers an offense 167s nested modifier `while` 167s registers an offense 167s nested `while` 167s registers an offense 167s nested modifier `until` 167s registers an offense 167s nested `until` 167s registers an offense 167s `Max + 1` levels of `if` nesting 167s registers an offense 167s nested `rescue` 167s registers an offense 167s when CountBlocks is false 167s accepts nested multiline blocks 167s accepts nested inline blocks 167s Multiple nested `ifs` at same level 167s registers 2 offenses 167s nested `for` 167s registers an offense 167s nested `case` 167s registers an offense 167s `Max + 2` levels of `if` nesting 167s registers an offense 167s 167s RuboCop::Cop::Lint::ParenthesesAsGroupedExpression 167s does not register an offense for expression followed by chained expression 167s accepts an operator call with argument in parentheses 167s accepts method with parens as arg to method without 167s accepts a chain of method calls 167s does not register an offense for expression followed by an operator 167s does not register an offense for expression followed by chained expression with safe navigation operator 167s accepts a method call with arguments but no parentheses 167s accepts a method call without arguments 167s registers an offense and corrects for predicate method call with space before the parenthesis 167s does not register an offense when method argument parentheses are omitted and hash argument key is enclosed in parentheses 167s accepts a space inside opening paren followed by left paren 167s does not register an offense for ternary operator 167s does not register an offesne when heredoc has a space between the same string as the method name and `(` 167s does not register an offense for a call with multiple arguments 167s does not register an offense for math expression 167s does not register an offense for math expression with `to_i` 167s registers an offense and corrects for method call with space before the parenthesis 167s when using safe navigation operator 167s registers an offense and corrects for method call with space before the parenthesis 167s 167s RuboCop::Cop::Lint::RedundantCopDisableDirective 167s .check 167s autocorrecting whitespace 167s when the comment is not the first line of the file 167s preserves whitespace before the comment 167s nested inside a namespace 167s preserves indentation 167s inline comment 168s removes the comment and preceding whitespace 168s when there is a blank line before inline comment 168s removes the comment and preceding whitespace 168s when there is only whitespace before the comment 168s leaves the whitespace 168s when the comment is the first line of the file 168s followed by code 168s removes the comment 168s followed by a newline 168s removes the comment and newline 168s followed by another comment 168s removes the comment and newline 168s when there are no disabled lines 168s returns no offense 168s with a disabled department 168s does not remove correct department 168s removes redundant department 168s removes cop duplicated by department on previous line 168s removes entire comment 168s removes cop duplicated by department 168s removes cop duplicated by department and leaves free text as a comment 168s when there are disabled lines 168s and there are two offenses 168s and a comment disables 168s one cop and then all cops 168s returns an offense 168s one cop twice 168s returns an offense 168s and there is an offense 168s and a comment disables 168s that cop but on other lines 168s returns an offense 168s all cops 168s returns no offense 168s that cop 168s returns no offense 168s and there are no offenses 168s and a comment disables 168s itself and all cops 168s disabled on different ranges 168s returns no offense 168s multiple cops, and the leftmost one has no offenses 168s returns an offense 168s multiple cops 168s returns an offense 168s comment is not at the beginning of the file 168s and not all cops have offenses 168s returns an offense 168s an unknown cop 168s returns an offense 168s multiple cops, and one of them has offenses 168s returns an offense 168s multiple cops, with abbreviated names 168s one of them has offenses 168s returns an offense 168s misspelled cops 168s returns an offense 168s a cop that is disabled in the config 168s returns an offense 168s when that cop was previously enabled 168s returns no offense 168s if that cop has offenses 168s returns an offense 168s one cop 168s returns an offense 168s all cops 168s returns an offense 168s when using a directive comment after a non-directive comment 168s returns an offense 168s itself and another cop 168s disabled on the same range 168s returns no offense 168s and the other cop is disabled a second time 168s returns no offense 168s disabled on different ranges 168s returns no offense 168s 168s RuboCop::Cop::Layout::EmptyLinesAroundClassBody 168s when EnforcedStyle is no_empty_lines 168s registers an offense for class body ending with a blank 168s autocorrects singleton class body containing only a blank 168s registers an offense for class body starting with a blank 168s registers an offense for singleton class body ending with a blank 168s when EnforcedStyle is empty_lines_special 168s when namespace has multiple children 168s requires empty lines for namespace 168s class with only constants 168s registers and autocorrects the offenses 168s class with constant and child class 168s registers and autocorrects the offenses 168s when first child is NOT a method 168s does not require blank line at the beginning of class body but requires blank line before first def definition and requires blank line at the end of class body 168s source without blank lines 168s registers an offense for class not ending with a blank line 168s when class has a namespace 168s requires no empty lines for namespace and does not require blank line at the beginning of class body but requires blank line at the end of class body 168s source with constants 168s registers and autocorrects the offenses 168s source with blank lines 168s registers and autocorrects the offenses 168s source without blank lines 168s registers and autocorrects the offenses 168s source with blank lines 168s registers an offense for class beginning with a blank line 168s source with comment before method definition 168s registers an offense for class beginning with a blank line 168s when first child is an access modifier 168s with no blank lines at the beginning and ending of class body 168s registers and corrects an offense 168s with blank lines at the beginning and ending of class body 168s registers no offense 168s class with empty body 168s without empty line 168s does NOT register offenses 168s with empty line 168s does NOT register offenses 168s when first child is a method 168s requires blank line at the beginning and ending of class body 168s source without blank lines 168s registers an offense for class not beginning and ending with a blank line 168s when class has a namespace 168s requires no empty lines for namespace but requires blank line at the beginning and ending of class body 168s source with blank lines 168s autocorrects the offenses 168s source without blank lines 168s registers and autocorrects the offenses 168s when EnforcedStyle is empty_lines 168s registers an offense for class body not starting or ending with a blank 168s accepts singleton classes with an empty body 168s does not register offenses when specifying a superclass that breaks the line 168s registers an offense for singleton class body not starting or ending with a blank 168s does not register offenses 168s accepts classes with an empty body 168s when EnforcedStyle is empty_lines_except_namespace 168s when only child is class 168s registers offense for namespace body ending with a blank 168s registers offense for namespace body starting with a blank 168s registers offenses for namespaced class body not ending with a blank 168s requires no empty lines for namespace 168s autocorrects beginning and end 168s registers offenses for namespaced class body not starting with a blank 168s when only child is module 168s requires no empty lines for namespace 168s registers offense for namespace body starting with a blank 168s registers offense for namespace body ending with a blank 168s when has multiple child classes 168s requires empty lines for namespace 168s registers offenses for namespace body starting and ending without a blank 168s when EnforcedStyle is ending_only 168s registers an offense for an empty line at the end of a class 168s ignores empty lines at the beginning of a class 168s when EnforcedStyle is beginning_only 168s registers an offense for an empty line at the end of a class 168s ignores empty lines at the beginning of a class 168s 168s RuboCop::Cop::Lint::DuplicateBranch 168s registers an offense when `case` has duplicate `when` branch 168s does not register an offense for empty `unless` 168s does not register an offense when `if` has no duplicate branches 168s registers an offense when `unless` has duplicate `else` branch 168s registers an offense when `if` has duplicate `elsif` branch 168s registers an offense when `rescue` has multiple duplicate `resbody` branches 168s does not register an offense for modifier `if` 168s does not register an offense for simple `if` without other branches 168s does not register an offense for empty `if` 168s does not register an offense when `rescue` has no duplicate branches 168s registers an offense when ternary has duplicate branches 168s registers an offense when `case` has duplicate `else` branch 168s registers an offense when `rescue` has duplicate `resbody` branch 168s does not register an offense for simple `unless` without other branches 168s registers an offense when `if` has multiple duplicate branches 168s registers an offense when `case` has multiple duplicate branches 168s registers an offense when `if` has duplicate `else` branch 168s does not register an offense when `unless` has no duplicate branches 168s does not register an offense when `case` has no duplicate branches 168s does not register an offense for modifier `unless` 168s does not register an offense when ternary has no duplicate branches 168s registers an offense when `rescue` has duplicate `else` branch 168s with IgnoreConstantBranches: true 168s with `rescue` 168s behaves like literal rescue allowed 168s when returning a constant in multiple branches 168s allows branches to be duplicated 168s behaves like literal rescue disallowed 168s when returning a object in multiple branches 168s registers an offense 168s with `case-match` 168s behaves like literal case-match disallowed 168s when returning a object in multiple branches 168s registers an offense 168s behaves like literal case-match allowed 168s when returning a constant in multiple branches 168s allows branches to be duplicated 168s with `if` 168s behaves like literal if disallowed 168s when returning a object in multiple branches 168s registers an offense 168s behaves like literal if allowed 168s when returning a constant in multiple branches 168s allows branches to be duplicated 168s with `case` 168s behaves like literal case allowed 168s when returning a constant in multiple branches 168s allows branches to be duplicated 168s behaves like literal case disallowed 168s when returning a object in multiple branches 168s registers an offense 168s with IgnoreLiteralBranches: true 168s with `if` 168s behaves like literal if allowed 168s when returning a simple erange in multiple branches 168s allows branches to be duplicated 168s behaves like literal if allowed 168s when returning a nil in multiple branches 168s allows branches to be duplicated 168s and IgnoreConstBranches: false 168s behaves like literal if disallowed 168s when returning a hash of constants in multiple branches 168s registers an offense 168s behaves like literal if disallowed 168s when returning a array of constants in multiple branches 168s registers an offense 168s behaves like literal if allowed 168s when returning a simple irange in multiple branches 168s allows branches to be duplicated 168s behaves like literal if allowed 168s when returning a empty hash in multiple branches 168s allows branches to be duplicated 168s behaves like literal if disallowed 168s when returning a complex irange in multiple branches 168s registers an offense 168s behaves like literal if disallowed 168s when returning a complex erange in multiple branches 168s registers an offense 168s and IgnoreConstBranches: true 168s behaves like literal if allowed 168s when returning a hash of constants in multiple branches 168s allows branches to be duplicated 168s behaves like literal if allowed 168s when returning a array of constants in multiple branches 168s allows branches to be duplicated 168s behaves like literal if allowed 168s when returning a false in multiple branches 168s allows branches to be duplicated 168s behaves like literal if allowed 168s when returning a regexp with modifier in multiple branches 168s allows branches to be duplicated 168s behaves like literal if allowed 168s when returning a hash of literals in multiple branches 168s allows branches to be duplicated 168s behaves like literal if disallowed 168s when returning a complex array in multiple branches 168s registers an offense 168s behaves like literal if disallowed 168s when returning a complex hash in multiple branches 168s registers an offense 168s behaves like literal if allowed 168s when returning a string in multiple branches 168s allows branches to be duplicated 168s behaves like literal if allowed 168s when returning a true in multiple branches 168s allows branches to be duplicated 168s behaves like literal if allowed 168s when returning a integer in multiple branches 168s allows branches to be duplicated 168s behaves like literal if disallowed 168s when returning a method call in multiple branches 168s registers an offense 168s behaves like literal if disallowed 168s when returning a complex regexp in multiple branches 168s registers an offense 168s behaves like literal if allowed 168s when returning a complex in multiple branches 168s allows branches to be duplicated 168s behaves like literal if allowed 168s when returning a rational in multiple branches 168s allows branches to be duplicated 168s behaves like literal if allowed 168s when returning a empty array in multiple branches 168s allows branches to be duplicated 168s behaves like literal if allowed 168s when returning a array of literals in multiple branches 168s allows branches to be duplicated 168s behaves like literal if disallowed 168s when returning a variable in multiple branches 168s registers an offense 168s behaves like literal if allowed 168s when returning a float in multiple branches 168s allows branches to be duplicated 168s behaves like literal if disallowed 168s when returning a dsym in multiple branches 168s registers an offense 168s behaves like literal if disallowed 168s when returning a dstr in multiple branches 168s registers an offense 168s behaves like literal if allowed 168s when returning a symbol in multiple branches 168s allows branches to be duplicated 168s behaves like literal if disallowed 168s when returning a xstr in multiple branches 168s registers an offense 168s behaves like literal if allowed 168s when returning a regexp in multiple branches 168s allows branches to be duplicated 168s with `rescue` 168s behaves like literal rescue allowed 168s when returning a complex in multiple branches 168s allows branches to be duplicated 168s and IgnoreConstBranches: true 168s behaves like literal rescue allowed 168s when returning a hash of constants in multiple branches 168s allows branches to be duplicated 168s behaves like literal rescue allowed 168s when returning a array of constants in multiple branches 168s allows branches to be duplicated 168s behaves like literal rescue disallowed 168s when returning a complex array in multiple branches 168s registers an offense 168s behaves like literal rescue allowed 168s when returning a simple erange in multiple branches 168s allows branches to be duplicated 168s behaves like literal rescue allowed 168s when returning a regexp in multiple branches 168s allows branches to be duplicated 168s behaves like literal rescue disallowed 168s when returning a variable in multiple branches 168s registers an offense 168s behaves like literal rescue disallowed 168s when returning a complex regexp in multiple branches 168s registers an offense 168s behaves like literal rescue allowed 168s when returning a string in multiple branches 168s allows branches to be duplicated 168s behaves like literal rescue allowed 168s when returning a hash of literals in multiple branches 168s allows branches to be duplicated 168s behaves like literal rescue disallowed 168s when returning a dstr in multiple branches 168s registers an offense 168s behaves like literal rescue disallowed 168s when returning a complex irange in multiple branches 168s registers an offense 168s behaves like literal rescue disallowed 168s when returning a dsym in multiple branches 168s registers an offense 168s behaves like literal rescue disallowed 168s when returning a xstr in multiple branches 168s registers an offense 168s behaves like literal rescue allowed 168s when returning a integer in multiple branches 168s allows branches to be duplicated 168s behaves like literal rescue allowed 168s when returning a regexp with modifier in multiple branches 168s allows branches to be duplicated 168s behaves like literal rescue disallowed 168s when returning a complex hash in multiple branches 168s registers an offense 168s behaves like literal rescue allowed 168s when returning a array of literals in multiple branches 168s allows branches to be duplicated 168s behaves like literal rescue allowed 168s when returning a simple irange in multiple branches 168s allows branches to be duplicated 168s behaves like literal rescue disallowed 168s when returning a method call in multiple branches 168s registers an offense 168s behaves like literal rescue allowed 168s when returning a float in multiple branches 168s allows branches to be duplicated 168s behaves like literal rescue allowed 168s when returning a nil in multiple branches 168s allows branches to be duplicated 168s behaves like literal rescue disallowed 168s when returning a complex erange in multiple branches 168s registers an offense 168s behaves like literal rescue allowed 168s when returning a empty array in multiple branches 168s allows branches to be duplicated 168s behaves like literal rescue allowed 168s when returning a rational in multiple branches 168s allows branches to be duplicated 168s behaves like literal rescue allowed 168s when returning a false in multiple branches 168s allows branches to be duplicated 168s behaves like literal rescue allowed 168s when returning a true in multiple branches 168s allows branches to be duplicated 168s behaves like literal rescue allowed 168s when returning a empty hash in multiple branches 168s allows branches to be duplicated 168s behaves like literal rescue allowed 168s when returning a symbol in multiple branches 168s allows branches to be duplicated 168s and IgnoreConstBranches: false 168s behaves like literal rescue disallowed 168s when returning a hash of constants in multiple branches 168s registers an offense 168s behaves like literal rescue disallowed 168s when returning a array of constants in multiple branches 168s registers an offense 168s with `case` 168s behaves like literal case disallowed 168s when returning a dsym in multiple branches 168s registers an offense 168s behaves like literal case allowed 168s when returning a symbol in multiple branches 168s allows branches to be duplicated 168s behaves like literal case allowed 168s when returning a empty array in multiple branches 168s allows branches to be duplicated 168s behaves like literal case allowed 168s when returning a string in multiple branches 168s allows branches to be duplicated 168s behaves like literal case disallowed 168s when returning a complex array in multiple branches 168s registers an offense 168s behaves like literal case allowed 168s when returning a array of literals in multiple branches 168s allows branches to be duplicated 168s behaves like literal case allowed 168s when returning a false in multiple branches 168s allows branches to be duplicated 168s behaves like literal case disallowed 168s when returning a xstr in multiple branches 168s registers an offense 168s behaves like literal case disallowed 168s when returning a complex erange in multiple branches 168s registers an offense 168s behaves like literal case allowed 168s when returning a empty hash in multiple branches 168s allows branches to be duplicated 168s behaves like literal case allowed 168s when returning a complex in multiple branches 168s allows branches to be duplicated 168s behaves like literal case allowed 168s when returning a regexp in multiple branches 168s allows branches to be duplicated 168s behaves like literal case allowed 168s when returning a simple irange in multiple branches 168s allows branches to be duplicated 168s behaves like literal case allowed 168s when returning a nil in multiple branches 168s allows branches to be duplicated 168s behaves like literal case allowed 168s when returning a float in multiple branches 168s allows branches to be duplicated 168s behaves like literal case disallowed 168s when returning a complex irange in multiple branches 168s registers an offense 168s behaves like literal case allowed 168s when returning a simple erange in multiple branches 168s allows branches to be duplicated 168s behaves like literal case allowed 168s when returning a integer in multiple branches 168s allows branches to be duplicated 168s behaves like literal case allowed 168s when returning a hash of literals in multiple branches 168s allows branches to be duplicated 168s behaves like literal case disallowed 168s when returning a dstr in multiple branches 168s registers an offense 168s and IgnoreConstBranches: true 168s behaves like literal case allowed 168s when returning a hash of constants in multiple branches 168s allows branches to be duplicated 168s behaves like literal case allowed 168s when returning a array of constants in multiple branches 168s allows branches to be duplicated 168s and IgnoreConstBranches: false 168s behaves like literal case disallowed 168s when returning a array of constants in multiple branches 168s registers an offense 168s behaves like literal case disallowed 168s when returning a hash of constants in multiple branches 168s registers an offense 168s behaves like literal case allowed 168s when returning a rational in multiple branches 168s allows branches to be duplicated 168s behaves like literal case disallowed 168s when returning a variable in multiple branches 168s registers an offense 168s behaves like literal case allowed 168s when returning a true in multiple branches 168s allows branches to be duplicated 168s behaves like literal case allowed 168s when returning a regexp with modifier in multiple branches 168s allows branches to be duplicated 168s behaves like literal case disallowed 168s when returning a complex hash in multiple branches 168s registers an offense 168s behaves like literal case disallowed 168s when returning a complex regexp in multiple branches 168s registers an offense 168s behaves like literal case disallowed 168s when returning a method call in multiple branches 168s registers an offense 168s 168s RuboCop::Cop::VisibilityHelp 168s #node_visibility 168s with inline private with symbol 168s is expected to eq :private 168s with visibility block public 168s is expected to eq :public 168s with visibility block private after public 168s is expected to eq :private 168s with visibility block private 168s is expected to eq :private 168s with inline public 168s is expected to eq :public 168s without visibility block 168s is expected to eq :public 168s with inline private 168s is expected to eq :private 168s 168s RuboCop::Cop::Style::PercentQLiterals 168s when EnforcedStyle is lower_case_q 168s without interpolation 168s accepts double quotes 168s accepts %q 168s registers offense for %Q 168s accepts single quotes 168s with special characters 168s accepts %Q 168s accepts %q 168s with interpolation 168s accepts %q 168s accepts %Q 168s accepts single quotes 168s accepts double quotes 168s when EnforcedStyle is upper_case_q 168s without interpolation 168s accepts double quotes 168s accepts single quotes 168s registers offense for %q 168s accepts %Q 168s with special characters 168s accepts %q 168s accepts %Q 168s with interpolation 168s accepts double quotes 168s accepts %Q 168s accepts %q 168s accepts single quotes 168s 168s RuboCop::Cop::Style::ExpandPathArguments 168s does not register an offense when using `File.expand_path(__FILE__)` 168s registers an offense when using `File.expand_path('..', __FILE__)` 168s does not register an offense when using `File.expand_path("#{path_to_file}.png", __FILE__)` 168s registers an offense when using `File.expand_path('../..', __FILE__)` 168s registers an offense when using `File.expand_path('.', __FILE__)` 168s registers an offense when using `File.expand_path('./../..', __FILE__)` 168s registers an offense when using `File.expand_path('../../..', __FILE__)` 168s registers an offense when using `Pathname(__FILE__).parent.expand_path` 168s registers an offense when using `::Pathname.new(__FILE__).parent.expand_path` 168s does not register an offense when using `File.expand_path('..', __dir__)` 168s does not register an offense when using `Pathname(__dir__).expand_path` 168s registers an offense when using `::File.expand_path('./../..', __FILE__)` 168s registers an offense when using `Pathname.new(__FILE__).parent.expand_path` 168s does not register an offense when using `File.expand_path(path, __FILE__)` 168s does not register an offense when using `File.expand_path(__dir__)` 168s registers an offense when using `File.expand_path('../../lib', __FILE__)` 168s 168s RuboCop::Cop::Layout::EmptyLineAfterMultilineCondition 168s does not register an offense when new line after modifier `if` with multiline condition 168s does not register an offense when new line after `elsif` with multiline condition 168s does not register an offense for `while` with single line condition 168s does not register an offense when new line after modifier `while` with multiline condition 168s registers an offense when no new line after `while` with multiline condition 168s registers an offense when no new line after `rescue` with multiline exceptions 169s registers an offense when no new line after `when` with multiline condition 169s does not register an offense when new line after `rescue` with multiline exceptions 169s does not register an offense when modifier `while` with multiline conditionis the last child of its parent 169s does not register an offense for `rescue` with singleline exceptions 169s does not register an offense when new line after `if` with multiline condition 169s does not register an offense when new line after `when` with multiline condition 169s registers an offense when no new line after modifier `if` with multiline condition 169s does not register an offense when new line after `while` with multiline condition 169s registers an offense when no new line after `if` with multiline condition 169s registers an offense when no new line after `until` with multiline condition 169s registers an offense when no new line after `elsif` with multiline condition 169s does not register an offense for `when` with singleline condition 169s does not register an offense for `if` with single line condition 169s does not register an offense when `if` at the top level 169s does not register an offense when modifier `if` with multiline conditionis the last child of its parent 169s registers an offense when no new line after modifier `while` with multiline condition 169s 169s RuboCop::Cop::Registry 169s can filter down to one type 169s exposes a mapping of cop names to cop classes 169s exposes the number of stored cops 169s can be cloned 169s exposes cop departments 169s can filter down to all but one type 169s exposes a list of cop names 169s #cops 169s exposes a list of cops 169s with cops having the same inner-most module 169s exposes both cops 169s #contains_cop_matching? 169s can find cops matching a given name 169s returns false for cops not included in the store 169s names_for_department 169s returns array of cops for specified department 169s #qualified_cop_name 169s emits a warning when namespace is incorrect 169s qualifies names with the correct namespace 169s returns the provided name if no namespace is found 169s raises an error when a cop name is ambiguous 169s gives back already properly qualified names 169s qualifies names without a namespace 169s #enabled 169s selects cops which are enabled in the config 169s overrides config if :only includes the cop 169s selects only safe cops if :safe passed 169s when new cops are introduced 169s overrides config if :only includes the cop 169s does not include them 169s when specifying `NewCops: pending` option in .rubocop.yml 169s does not include them 169s when specifying `--enable-pending-cops` command-line option 169s includes them 169s when specifying `NewCops: disable` option in .rubocop.yml 169s includes them because command-line option takes precedence over .rubocop.yml 169s when specifying `--disable-pending-cops` command-line option 169s does not include them 169s when specifying `NewCops: enable` option in .rubocop.yml 169s does not include them because command-line option takes precedence over .rubocop.yml 169s when specifying `NewCops: disable` option in .rubocop.yml 169s does not include them 169s when specifying `NewCops: enable` option in .rubocop.yml 169s includes them 169s when dismissing a cop class 169s allows re-listing 169s allows it if done rapidly 169s disallows it if done too late 169s #department? 169s returns false for other names 169s returns true for department name 169s 169s RuboCop::Cop::Layout::SpaceInLambdaLiteral 169s when configured to enforce spaces 169s registers an offense and corrects no space between -> and ( 169s registers an offense and corrects no space in the inner nested lambda 169s does not register an offense for multi-line lambdas 169s registers an offense and corrects no space in both lambdas when nested 169s registers an offense and corrects no space in the outer nested lambda 169s does not register an offense for no space between -> and { 169s does not register an offense for a space between -> and ( 169s when configured to enforce no space 169s registers an offense and corrects a space in the outer nested lambda 169s does not register an offense for multi-line lambdas 169s registers an offense and corrects spaces between -> and ( 169s does not register an offense for a space between -> and { 169s registers an offense and corrects a space between -> and ( 169s registers an offense and corrects a space in the inner nested lambda 169s register offenses and correct spaces in both lambdas when nested 169s does not register an offense for no space between -> and ( 169s 169s RuboCop::Cop::Layout::SpaceAroundKeyword 169s behaves like accept after 169s accepts `{` after keyword in `loop{}` 169s behaves like accept after 169s accepts `(` after keyword in `next(1)` 169s behaves like missing after 169s registers an offense for missing space after keyword in `BEGIN{}` and autocorrects 169s behaves like accept before 169s accepts `!` before keyword in `!super.method` 169s behaves like missing after 169s registers an offense for missing space after keyword in `1 until""` and autocorrects 169s behaves like accept before 169s accepts `*` before keyword in `a*begin end` 169s behaves like missing before 169s registers an offense for missing space before keyword in `a do "a"end` 169s behaves like accept before 169s accepts `**` before keyword in `a**begin end` 169s behaves like accept before 169s accepts `!` before keyword in `!yield.method` 169s behaves like missing after 169s registers an offense for missing space after keyword in `unless""; end` and autocorrects 169s behaves like accept before 169s accepts `>` before keyword in `a>begin end` 169s >= Ruby 3.0 169s behaves like accept before 169s accepts `=>` before keyword in `""=> a` 169s behaves like accept after 169s accepts `=>` after keyword in `a =>""` 169s behaves like missing before 169s registers an offense for missing space before keyword in `if a; ""elsif b; end` 169s behaves like accept after 169s accepts `+` after keyword in `+begin end` 169s behaves like missing after 169s registers an offense for missing space after keyword in `break""` and autocorrects 169s behaves like missing after 169s registers an offense for missing space after keyword in `case a when""; end` and autocorrects 169s behaves like missing after 169s registers an offense for missing space after keyword in `case"" when 1; end` and autocorrects 169s behaves like accept after 169s accepts `(` after keyword in `yield(1)` 169s behaves like missing after 169s registers an offense for missing space after keyword in `return""` and autocorrects 169s >= Ruby 2.7 169s behaves like missing after 169s registers an offense for missing space after keyword in `case""; in 1; end` and autocorrects 169s behaves like missing before 169s registers an offense for missing space before keyword in `1and 2` 169s behaves like missing after 169s registers an offense for missing space after keyword in `begin+1 end` and autocorrects 169s behaves like accept after 169s accepts `\` after keyword in `test do\ 169s end` 169s behaves like missing before 169s registers an offense for missing space before keyword in `for x in [] do "x"end` 169s behaves like missing before 169s registers an offense for missing space before keyword in `1until ""` 169s behaves like missing after 169s registers an offense for missing space after keyword in `END{}` and autocorrects 169s >= Ruby 2.7 169s behaves like missing before 169s registers an offense for missing space before keyword in `case a; in b; ""else end` 169s behaves like missing before 169s registers an offense for missing space before keyword in `case a; in "pattern"unless "condition"; else "" end` 169s behaves like missing after 169s registers an offense for missing space after keyword in `case a; in "pattern" if"condition"; else "" end` and autocorrects 169s behaves like missing after 169s registers an offense for missing space after keyword in `case a; in "pattern" unless"condition"; else "" end` and autocorrects 169s behaves like missing after 169s registers an offense for missing space after keyword in `case a; in b; else"" end` and autocorrects 169s behaves like missing before 169s registers an offense for missing space before keyword in `case a; in "pattern"if "condition"; else "" end` 169s behaves like missing after 169s registers an offense for missing space after keyword in `if a; else"" end` and autocorrects 169s behaves like accept after 169s accepts `(` after keyword in `return(1)` 169s behaves like accept after 169s accepts `.` after keyword in `begin end.inspect` 169s behaves like accept before 169s accepts `=` before keyword in `a=begin end` 169s behaves like missing before 169s registers an offense for missing space before keyword in `if a; ""else end` 169s behaves like missing after 169s registers an offense for missing space after keyword in `begin"" end` and autocorrects 169s behaves like missing after 169s registers an offense for missing space after keyword in `1 while""` and autocorrects 169s behaves like missing before 169s registers an offense for missing space before keyword in `""rescue a` 169s behaves like missing before 169s registers an offense for missing space before keyword in `if ""then a end` 169s behaves like accept before 169s accepts `=*` before keyword in `a=*begin end` 169s behaves like missing after 169s registers an offense for missing space after keyword in `next""` and autocorrects 169s behaves like accept around 169s accepts `,` around keyword in `a 1,next,1` 169s behaves like accept around 169s accepts `;` around keyword in `test do;end` 169s behaves like missing after 169s registers an offense for missing space after keyword in `if a then"" end` and autocorrects 169s behaves like accept after 169s accepts `(` after keyword in `break(1)` 169s behaves like missing before 169s registers an offense for missing space before keyword in `case ""when a; end` 169s behaves like accept around 169s accepts `{}` around keyword in `loop {next}` 169s behaves like accept before 169s accepts `&&` before keyword in `a&&begin end` 169s behaves like accept after 169s accepts `(` after keyword in `super(1)` 169s behaves like missing before 169s registers an offense for missing space before keyword in `begin "a"end` 169s behaves like accept around 169s accepts `()` around keyword in `(next)` 169s behaves like missing before 169s registers an offense for missing space before keyword in `if a; "b"end` 169s behaves like accept after 169s accepts `(` after keyword in `not(1)` 169s behaves like accept around 169s accepts `[]` around keyword in `a[begin end]` 169s behaves like accept after 169s accepts `.` after keyword in `yield.method` 169s behaves like accept before 169s accepts `+` before keyword in `a+begin end` 169s behaves like missing after 169s registers an offense for missing space after keyword in `defined?1` and autocorrects 169s behaves like missing after 169s registers an offense for missing space after keyword in `case a; when b; else"" end` and autocorrects 169s behaves like missing after 169s registers an offense for missing space after keyword in `for x in [] do"x" end` and autocorrects 169s &. 169s behaves like accept after 169s accepts `&.` after keyword in `yield&.foo` 169s behaves like accept after 169s accepts `&.` after keyword in `super&.foo` 169s behaves like missing before 169s registers an offense for missing space before keyword in `begin ""ensure end` 169s behaves like missing before 169s registers an offense for missing space before keyword in `while 1do end` 169s behaves like accept after 169s accepts `[` after keyword in `super[1]` 169s behaves like missing before 169s registers an offense for missing space before keyword in `a "b"do end` 169s behaves like missing after 169s registers an offense for missing space after keyword in `yield""` and autocorrects 169s behaves like missing before 169s registers an offense for missing space before keyword in `while 1 do "x"end` 169s >= Ruby 2.7 169s behaves like missing before 169s registers an offense for missing space before keyword in `""in a` 169s behaves like missing after 169s registers an offense for missing space after keyword in `case a; in""; end` and autocorrects 169s behaves like missing after 169s registers an offense for missing space after keyword in `a in""` and autocorrects 169s behaves like missing after 169s registers an offense for missing space after keyword in `1 or(2)` and autocorrects 169s behaves like missing after 169s registers an offense for missing space after keyword in `until 1 do"x" end` and autocorrects 169s behaves like missing before 169s registers an offense for missing space before keyword in `case a; when b; ""else end` 169s behaves like accept before 169s accepts `||` before keyword in `a||begin end` 169s behaves like missing after 169s registers an offense for missing space after keyword in `super{}` and autocorrects 169s behaves like accept before 169s accepts `|` before keyword in `loop { |x|break }` 169s behaves like accept before 169s accepts `/` before keyword in `a/begin end` 169s behaves like accept before 169s accepts `!` before keyword in `!yield` 169s behaves like accept around 169s accepts `[]` around keyword in `[begin end]` 169s behaves like missing before 169s registers an offense for missing space before keyword in `until 1do end` 169s behaves like missing after 169s registers an offense for missing space after keyword in `1 and(2)` and autocorrects 169s behaves like accept after 169s accepts `#` after keyword in `next#comment` 169s behaves like accept around 169s accepts `{}` around keyword in `{a: begin end}` 169s behaves like accept after 169s accepts `::` after keyword in `super::ModuleName` 169s behaves like missing before 169s registers an offense for missing space before keyword in `for x in []do end` 169s behaves like missing after 169s registers an offense for missing space after keyword in `if a; elsif""; end` and autocorrects 169s behaves like missing before 169s registers an offense for missing space before keyword in `until 1 do "x"end` 169s behaves like missing after 169s registers an offense for missing space after keyword in `super""` and autocorrects 169s behaves like missing after 169s registers an offense for missing space after keyword in `while 1 do"x" end` and autocorrects 169s behaves like accept before 169s accepts `-` before keyword in `a-begin end` 169s behaves like missing before 169s registers an offense for missing space before keyword in `1or 2` 169s behaves like accept before 169s accepts `==` before keyword in `a==begin end` 169s behaves like accept before 169s accepts `+` before keyword in `a+begin; end.method` 169s behaves like missing after 169s registers an offense for missing space after keyword in `begin ensure"" end` and autocorrects 169s behaves like missing after 169s registers an offense for missing space after keyword in `if""; end` and autocorrects 169s behaves like accept before 169s accepts `<` before keyword in `a= 3.0 169s without parentheses 169s registers an offense and corrects when using regexp without method call in a nested structure 169s registers an offense and corrects when sending method inside parens without receiver takes a regexp argument 169s registers an offense and corrects when multiple arguments 169s registers an offense and corrects when single argument 169s registers an offense and corrects when sending method to regexp without argument 169s registers an offense and corrects when sending method to regexp with argument 169s registers an offense and corrects when using nested method arguments without parentheses 169s registers an offense and corrects when nesting 169s registers an offense and corrects when sending method without receiver takes a regexp argument 169s registers an offense and corrects when using block argument 169s registers an offense and corrects when sending method chain to regexp 169s with `match_with_lvasgn` node 169s with different parentheses 169s does not register an offense 169s without parentheses 169s registers an offense and corrects 169s with parentheses 169s does not register an offense 169s with parentheses 169s accepts 169s 169s RuboCop::Cop::Style::IdenticalConditionalBranches 169s with empty brace 169s does not raise any error 169s on if..elsif with no else 169s doesn't register an offense 169s on case with identical bodies 169s registers an offense and corrects 169s when using pattern matching 169s on case-match with identical bodies 169s registers an offense and corrects 169s on case..in with identical bodies and assigning to a variable used in `case` condition 169s doesn't register an offense 169s on case-match without else 169s doesn't register an offense 169s on case-match with identical leading lines 169s registers and corrects an offense 169s on case-match with identical trailing lines 169s registers and corrects an offense 169s when one of the case-match branches is empty 169s does not register an offense 169s on case-match with empty when 169s doesn't register an offense 169s on if..else with identical bodies and assigning to a variable used in `if` condition 169s doesn't register an offense 169s on case with identical leading lines 169s registers and corrects an offense 169s on if..else with slightly different trailing lines 169s doesn't register an offense 169s on if..else with identical leading lines 169s registers and corrects an offense 169s on case with identical trailing lines 169s registers and corrects an offense 169s on case..when with identical bodies and assigning to a variable used in `case` condition 169s doesn't register an offense 169s with a ternary 169s registers an offense 169s on case with empty when 169s doesn't register an offense 169s on if..else with identical bodies 169s registers and corrects an offense 169s when one of the case branches is empty 169s does not register an offense 169s on case without else 169s doesn't register an offense 169s on if..else with identical trailing lines 169s registers and corrects an offense 169s 169s RuboCop::Cop::Style::TopLevelMethodDefinition 169s does not register an offense when using Struct 169s registers an offense top-level methods 169s does not register an offense when defined within arbitrary block 169s does not register an offense when just called method on top-level 169s does not register an offense when using class 169s does not register an offense when define_method is not top-level 169s does not register an offense when using module 169s registers an offense top-level class methods 169s registers an offense when defining a top-level method after a class definition 169s top-level define_method 169s registers offense for proc argument 169s registers offense with inline block 169s registers offense for multi-line block 169s Ruby >= 2.7 169s registers offense with inline numblock 169s 169s RuboCop::Cop::Style::WhileUntilModifier 169s behaves like condition modifier cop 169s for a multiline 'while' 169s doesn't break when used as RHS of constant assignment 169s handles inline comments during autocorrection 169s doesn't break when used as RHS of instance var assignment 169s doesn't break when used as RHS of binary arithmetic 169s accepts an empty body 169s accepts it if single line would not fit on one line 169s accepts it when condition has local variable assignment 169s doesn't break when used as RHS of local var assignment 169s doesn't break when used as RHS of class var assignment 169s corrects it when assignment is in body 169s handles one-line usage 169s accepts it if body spans more than one line 169s corrects it if result fits in one line 169s accepts multiline condition in modifier form 169s registers an offense 169s when there is a comment on the first line and some code after the end keyword 169s does not register an offense 169s when Layout/LineLength is disabled 169s registers an offense even for a long modifier statement 169s behaves like condition modifier cop 169s for a multiline 'until' 169s accepts it if single line would not fit on one line 169s corrects it if result fits in one line 169s corrects it when assignment is in body 169s doesn't break when used as RHS of local var assignment 169s handles inline comments during autocorrection 169s doesn't break when used as RHS of constant assignment 169s doesn't break when used as RHS of binary arithmetic 169s accepts an empty body 169s handles one-line usage 169s accepts it if body spans more than one line 169s accepts it when condition has local variable assignment 169s doesn't break when used as RHS of class var assignment 169s doesn't break when used as RHS of instance var assignment 169s when there is a comment on the first line and some code after the end keyword 169s does not register an offense 169s when Layout/LineLength is disabled 169s registers an offense even for a long modifier statement 169s accepts multiline condition in modifier form 169s registers an offense 169s 169s RuboCop::Formatter::JSONFormatter 169s #started 169s sets target file count in summary 169s #hash_for_offense 169s sets Offense#cop_name value for :cop_name key 169s sets Offense#correctable? value for :correctable key 169s sets Offense#corrected? value for :corrected key 169s sets Offense#message value for :message key 169s sets Offense#severity value for :severity key 169s sets value of #hash_for_location for :location key 169s #file_finished 169s adds value of #hash_for_file to #output_hash[:files] 169s adds detected offense count in summary 169s #finished 169s outputs #output_hash as JSON 169s sets inspected file count in summary 169s #hash_for_location 169s sets column value for :column key 169s sets length value for :length key 169s sets line value for :line key 169s when the location is pseudo 169s returns a valid hash 169s #hash_for_file 169s sets relative file path for :path key 169s sets an array of #hash_for_offense values for :offenses key 169s 169s RuboCop::Cop::Lint::DuplicateRequire 169s registers and corrects an offense for multiple duplicate requires 169s does not register an offense when using single `require` 169s registers and corrects an offense when duplicate `require` is detected 169s does not register an offense when same feature argument but different require method 169s registers and corrects an offense when duplicate `require_relative` is detected 169s registers and corrects an offense when duplicate requires are interleaved with some other code 169s does not register an offense when calling user-defined `require` method 169s registers and corrects an offense for duplicate non top-level requires 169s registers and corrects an offense when duplicate `require` through `Kernel` is detected 169s does not register an offense when there are no duplicate `require`s 169s 169s RuboCop::Cop::Lint::SafeNavigationChain 169s >= Ruby 2.7 169s registers an offense for ordinary method chain exists after safe navigation method call with a block using numbered parameter 169s TargetRubyVersion >= 2.3 169s registers an offense for safe navigation with >= operator 169s registers an offense for ordinary method call exists after safe navigation method call with an argument 169s accepts usages of safe navigation with || operator 169s accepts usages of safe navigation with && operator 170s accepts usages of safe navigation with `in?` method 170s accepts usages of safe navigation at last only 170s registers an offense for safe navigation with < operator 170s accepts usages of safe navigation with self assignment method 170s registers an offense for safe navigation with [] operator 170s accepts usages of safe navigation with `present?` method 170s accepts usages of safe navigation with `blank?` method 170s accepts usages of safe navigation with | operator 170s registers an offense for ordinary method call exists after safe navigation method call 170s accepts usages of safe navigation with `nil?` method 170s registers an offense for safe navigation on the right-hand side of the `+` 170s accepts usages of method chain with safe navigation only with argument 170s accepts usages of safe navigation with `to_d` method 170s accepts usages of safe navigation with assignment method 170s accepts usages of ordinary method chain 170s registers an offense for ordinary method chain exists after safe navigation method call 170s registers an offense for safe navigation with []= operator 170s accepts usages of safe navigation with == operator 170s accepts usages of safe navigation with === operator 170s registers an offense for safe navigation with <= operator 170s accepts usages of safe navigation with `+@` method 170s accepts usages of safe navigation with `-@` method 170s registers an offense for safe navigation on the right-hand side of the `*` 170s registers an offense for safe navigation on the right-hand side of the `-` 170s accepts usages of safe navigation at last only with argument 170s registers an offense for safe navigation on the right-hand side of the `/` 170s accepts usages of ordinary method chain with argument 170s registers an offense for ordinary method chain exists after safe navigation method call with a block 170s registers an offense for ordinary method chain exists after safe navigation method call with an argument 170s accepts usages of safe navigation with & operator 170s accepts usages of safe navigation with `try` method 170s registers an offense for safe navigation with > operator 170s registers an offense for safe navigation with + operator 170s registers an offense for ordinary method chain exists after safe navigation method call with a block-pass 170s accepts usages of method chain with safe navigation only 170s proper highlighting 170s when used with a modifier if 170s when there are methods after 170s when there are methods before 170s when in a method 170s when in a begin 170s 170s RuboCop::Cop::Lint::UnusedBlockArgument 170s when IgnoreEmptyBlocks config parameter is set 170s accepts an empty block with a single unused parameter 170s registers an offense for a non-empty block with an unused parameter 170s accepts an empty block with multiple unused parameters 170s registers an offense for a non-empty block with multiple unused args 170s inspection 170s with an empty block 170s when configured to ignore empty blocks 170s does not register an offense 170s when not configured to ignore empty blocks 170s registers an offense 170s when a block takes single argument 170s and the method call is `define_method` 170s registers an offense 170s and the argument is unused 170s registers an offense and suggests omitting that 170s when a block have a block local variable 170s and the variable is unused 170s registers an offense 170s and the variable is used 170s does not register offense 170s in a method calling `binding` with arguments 170s when a method argument is unused 170s registers an offense 170s in a method calling `binding` without arguments 170s accepts all arguments 170s inside a method definition 170s registers offenses 170s when a lambda block takes arguments 170s and all the arguments are unused 170s registers offenses and suggests using a proc 170s and an argument is unused 170s registers an offense 170s when a variable is not used 170s does not care 170s when a block takes multiple arguments 170s and all arguments are used 170s accepts 170s and a splat argument is unused 170s registers an offense and preserves splat 170s and one argument is assigned to another, whilst other's value is not used 170s registers an offense 170s and an argument with default value is unused 170s registers an offense and preserves default value 170s and an argument is unused 170s registers an offense 170s and arguments are swap-assigned 170s accepts 170s and all the arguments are unused 170s registers offenses and suggests omitting them 170s and unused arguments span multiple lines 170s registers offenses and suggests omitting them 170s when an optional keyword argument is unused 170s when the method call is `define_method` 170s registers an offense 170s when AllowUnusedKeywordArguments set 170s does not care 170s when the method call is not `define_method` 170s registers an offense 170s when AllowUnusedKeywordArguments set 170s does not care 170s when an underscore-prefixed block argument is not used 170s accepts 170s when a method argument is not used 170s does not care 170s 170s RuboCop::Cop::Lint::OrderedMagicComments 170s registers an offense and corrects when an `encoding` magic comment does not precede all other magic comments 170s does not register an offense when using `encoding` magic comment only 170s does not register an offense when using `encoding: Encoding::SJIS` Hash notation after`frozen_string_literal` magic comment 170s does not register an offense when using `encoding` magic comment is next of shebang 170s registers an offense and corrects when `-*- encoding : ascii-8bit -*-` magic comment does not precede all other magic comments 170s does not register an offense when using `frozen_string_literal` magic comment only 170s does not register an offense when using `encoding` magic comment is first line 170s registers an offense and corrects when `coding` magic comment does not precede all other magic comments 170s registers an offense and corrects when using `frozen_string_literal` magic comment is next of shebang 170s 170s RuboCop::Cop::Style::MissingElse 170s EmptyElse enabled and set to warn on nil 170s given an if-statement 170s with a completely empty else-clause 170s doesn't register an offense 170s with an else-clause with side-effects 170s doesn't register an offense 170s with an else-clause containing only the literal nil 170s doesn't register an offense 170s with no else-clause 170s registers an offense 170s >= Ruby 2.7 170s does not register an offense 170s given an unless-statement 170s with an else-clause with side-effects 170s doesn't register an offense 170s with no else-clause 170s registers an offense 170s with a completely empty else-clause 170s doesn't register an offense 170s with an else-clause containing only the literal nil 170s doesn't register an offense 170s given a case statement 170s with a completely empty else-clause 170s doesn't register an offense 170s with an else-clause containing only the literal nil 170s doesn't register an offense 170s with no else-clause 170s registers an offense 170s with an else-clause with side-effects 170s doesn't register an offense 170s EmptyElse enabled and set to warn on empty 170s >= Ruby 2.7 170s does not register an offense 170s given an unless-statement 170s with an else-clause containing only the literal nil 170s doesn't register an offense 170s with a completely empty else-clause 170s doesn't register an offense 170s with an else-clause with side-effects 170s doesn't register an offense 170s with no else-clause 170s registers an offense 170s given a case statement 170s with an else-clause containing only the literal nil 170s doesn't register an offense 170s with a completely empty else-clause 170s doesn't register an offense 170s with an else-clause with side-effects 170s doesn't register an offense 170s with no else-clause 170s registers an offense 170s given an if-statement 170s with an else-clause with side-effects 170s doesn't register an offense 170s with an else-clause containing only the literal nil 170s doesn't register an offense 170s with a completely empty else-clause 170s doesn't register an offense 170s with no else-clause 170s registers an offense 170s configured to warn only on empty case 170s given a case statement 170s with no else-clause 170s registers an offense 170s with a completely empty else-clause 170s doesn't register an offense 170s with an else-clause with side-effects 170s doesn't register an offense 170s with an else-clause containing only the literal nil 170s doesn't register an offense 170s given an unless-statement 170s with a completely empty else-clause 170s doesn't register an offense 170s with no else-clause 170s doesn't register an offense 170s with an else-clause with side-effects 170s doesn't register an offense 170s with an else-clause containing only the literal nil 170s doesn't register an offense 170s given an if-statement 170s with no else-clause 170s doesn't register an offense 170s with an else-clause containing only the literal nil 170s doesn't register an offense 170s with a completely empty else-clause 170s doesn't register an offense 170s with an else-clause with side-effects 170s doesn't register an offense 170s >= Ruby 2.7 170s does not register an offense 170s configured to warn only on empty if 170s >= Ruby 2.7 170s does not register an offense 170s given an if-statement 170s with an else-clause containing only the literal nil 170s doesn't register an offense 170s with an else-clause with side-effects 170s doesn't register an offense 170s with a completely empty else-clause 170s doesn't register an offense 170s with no else-clause 170s registers an offense 170s given an unless-statement 170s with an else-clause with side-effects 170s doesn't register an offense 170s with no else-clause 170s registers an offense 170s with an else-clause containing only the literal nil 170s doesn't register an offense 170s with a completely empty else-clause 170s doesn't register an offense 170s given a case statement 170s with an else-clause with side-effects 170s doesn't register an offense 170s with no else-clause 170s doesn't register an offense 170s with a completely empty else-clause 170s doesn't register an offense 170s with an else-clause containing only the literal nil 170s doesn't register an offense 170s UnlessElse enabled 170s >= Ruby 2.7 170s does not register an offense 170s given an unless-statement 170s with an else-clause containing only the literal nil 170s doesn't register an offense 170s with a completely empty else-clause 170s doesn't register an offense 170s with no else-clause 170s doesn't register an offense 170s with an else-clause with side-effects 170s doesn't register an offense 170s given a case statement 170s with an else-clause with side-effects 170s doesn't register an offense 170s with no else-clause 170s registers an offense 170s with a completely empty else-clause 170s doesn't register an offense 170s with an else-clause containing only the literal nil 170s doesn't register an offense 170s given an if-statement 170s with no else-clause 170s registers an offense 170s with an else-clause with side-effects 170s doesn't register an offense 170s with a completely empty else-clause 170s doesn't register an offense 170s with an else-clause containing only the literal nil 170s doesn't register an offense 170s UnlessElse disabled 170s >= Ruby 2.7 170s does not register an offense 170s given an if-statement 170s with an else-clause with side-effects 170s doesn't register an offense 170s with a completely empty else-clause 170s doesn't register an offense 170s with no else-clause 170s registers an offense 170s with an else-clause containing only the literal nil 170s doesn't register an offense 170s given an unless-statement 170s with an else-clause with side-effects 170s doesn't register an offense 170s with an else-clause containing only the literal nil 170s doesn't register an offense 170s with a completely empty else-clause 170s doesn't register an offense 170s with no else-clause 170s registers an offense 170s given a case statement 170s with a completely empty else-clause 170s doesn't register an offense 170s with an else-clause containing only the literal nil 170s doesn't register an offense 170s with no else-clause 170s registers an offense 170s with an else-clause with side-effects 170s doesn't register an offense 170s 170s RuboCop::Cop::Lint::RescueException 170s does not register an offense for rescue with other classes 170s does not register an offense for rescue with other class 170s does not register an offense for rescue with no class 170s does not register an offense for rescue with no class and => e 170s does not register an offense for rescue with a module prefix 170s does not crash when the namespace of a rescued class is in a local variable 170s registers an offense for rescue with Exception => e 170s registers an offense for rescue with StandardError, Exception 170s registers an offense for rescue with ::Exception 170s does not crash when the splat operator is used in a rescue 170s registers an offense for rescue from Exception 170s 170s RuboCop::Cop::Style::StringLiterals 170s configured with single quotes preferred 170s accepts double quotes when control characters are used 170s accepts % quotes 170s registers offense for double quotes when single quotes suffice 170s accepts heredocs 170s accepts %q and %Q quotes 170s detects unneeded double quotes within concatenated string 170s registers an offense for words with non-ascii chars 170s accepts double quotes when unicode control sequence is used 170s accepts double quotes when interpolating an instance variable 170s accepts double quotes in interpolation 170s accepts double quotes when interpolating a global variable 170s accepts " in a %w 170s registers an offense for "\" 170s accepts \\\n in a string 170s accepts double quotes with some other special symbols 170s registers offense for correct + opposite 170s accepts double quotes when new line is used 170s accepts single quotes in interpolation 170s registers an offense for "\"" 170s can handle a built-in constant parsed as string 170s can handle character literals 170s accepts double quotes at the start of regexp literals 170s accepts single quotes 170s does not register an offense for words with non-ascii chars and other control sequences 170s accepts double quotes when interpolating & quotes in multiple lines 170s accepts double quotes when interpolating a class variable 170s accepts double quotes when single quotes are used 170s when configured with a bad value 170s fails 170s when ConsistentQuotesInMultiline is true 170s and EnforcedStyle is single_quotes 170s registers an offense for strings with line breaks in them 170s doesn't register offense for double quotes with embedded single 170s accepts continued strings using all single quotes 170s doesn't choke on heredocs with inconsistent indentation 170s accepts for double quotes with an escaped normal character 170s accepts for double quotes with an escaped special character 170s registers an offense for unneeded double quotes in continuation 170s registers an offense for mixed quote styles in a continued string 170s doesn't register offense for double quotes with interpolation 170s and EnforcedStyle is double_quotes 170s accepts continued strings using all double quotes 170s registers an offense for unneeded single quotes in continuation 170s doesn't register offense for single quotes with embedded double 170s registers an offense for mixed quote styles in a continued string 170s configured with double quotes preferred 170s accepts heredocs 170s accepts single quotes when they are needed 170s registers offense for opposite + correct 170s accepts %q and %Q quotes 170s accepts escaped single quote in string with escaped non-' character 170s accepts single quotes in string with escaped non-' character 170s accepts single quotes at the start of regexp literals 170s registers offense for single quotes when double quotes would be equivalent 170s accepts double quotes 170s accepts single quotes in interpolation 170s registers offense for escaped single quote in single quotes 170s accepts ' in a %w 170s accepts % quotes 170s does not accept multiple escaped single quotes in single quotes 170s accepts single quoted string with backslash 170s can handle a built-in constant parsed as string 170s flags single quotes with plain # (not #@var or #{interpolation} or #$global 170s 170s RuboCop::Cop::Style::OperatorMethodCall 170s registers an offense when using `foo.>= bar` 170s registers an offense when chaining `foo.bar.&(baz).round(2)` 170s does not register an offense when using `foo ! bar` 170s does not register an offense when using `foo <=> bar` 170s registers an offense when using `foo.-(bar)` 170s registers an offense when chaining `foo.bar.<=(baz).round(2)` 170s registers an offense when using `foo.=== bar` 170s registers an offense when using `foo.<=>(bar)` 170s registers an offense when using `foo.!~(bar)` 170s registers an offense when using `foo.>>(bar)` 170s does not register an offense when using `foo.-@bar` 170s registers an offense when chaining `foo.bar.!~(baz).round(2)` 170s registers an offense when using `foo.> bar` 170s registers an offense when using `foo.^ bar` 170s does not register an offense when using `foo >= bar` 170s does not register an offense when using `foo.+@bar.to_s` 170s registers an offense when using `foo.|(bar)` 170s registers an offense when chaining `foo.bar.*(baz).round(2)` 170s does not register an offense when using `foo >> bar` 170s does not register an offense when using `foo ^ bar` 170s registers an offense when chaining `foo.bar.|(baz).round(2)` 170s registers an offense when using `foo.<(bar)` 170s does not register an offense when using `foo ** bar` 170s registers an offense when chaining `foo.bar.!=(baz).round(2)` 170s does not register an offense when using `foo * bar` 170s registers an offense when chaining `foo.bar.===(baz).round(2)` 170s does not register an offense when using `foo.+@bar` 170s registers an offense when using `foo.>=(bar)` 170s registers an offense when using `foo.<=> bar` 170s does not register an offense when using `foo | bar` 170s registers an offense when using `foo.=~ bar` 170s registers an offense when using `foo.* bar` 170s does not register an offense when using `foo !~ bar` 170s registers an offense when using `foo.! bar` 170s registers an offense when chaining `foo.bar.^(baz).round(2)` 170s registers an offense when using `foo.^(bar)` 170s does not register an offense when using `foo % bar` 170s registers an offense when using `foo.+(bar)` 170s registers an offense when chaining `foo.bar.**(baz).round(2)` 170s registers an offense when using `foo.% bar` 170s registers an offense when using `foo.=~(bar)` 170s registers an offense when using `foo.~(bar)` 170s registers an offense when using `foo.== bar` 170s registers an offense when using `foo.< bar` 170s does not register an offense when using `foo < bar` 170s registers an offense when using `foo.!(bar)` 170s registers an offense when using `foo.** bar` 170s registers an offense when chaining `foo.bar./(baz).round(2)` 170s registers an offense when chaining `foo.bar.=~(baz).round(2)` 170s registers an offense when using `foo./ bar` 170s registers an offense when chaining `foo.bar.+(baz).round(2)` 170s does not register an offense when using `foo === bar` 170s registers an offense when chaining `foo.bar.-(baz).round(2)` 170s registers an offense when using `foo.| bar` 170s registers an offense when chaining `foo.bar.>>(baz).round(2)` 170s does not register an offense when using `foo << bar` 170s registers an offense when using `foo.<<(bar)` 170s does not register an offense when using `foo & bar` 170s registers an offense when using `foo.>> bar` 170s does not register an offense when using `foo / bar` 170s registers an offense when using `foo.<< bar` 170s registers an offense when chaining `foo.bar.<<(baz).round(2)` 170s registers an offense when using `foo.& bar` 170s registers an offense when using `foo.+ bar` 170s registers an offense when using `foo.**(bar)` 170s registers an offense when chaining `foo.bar.~(baz).round(2)` 170s registers an offense when using `foo.~ bar` 170s registers an offense when using `foo.<=(bar)` 170s does not register an offense when using `Foo.+(bar)` 170s registers an offense when using `foo.===(bar)` 170s does not register an offense when using `foo <= bar` 170s does not register an offense when using `obj.!` 170s registers an offense when using `foo.&(bar)` 170s registers an offense when chaining `foo.bar.==(baz).round(2)` 170s registers an offense when chaining `foo.bar.%(baz).round(2)` 170s registers an offense when using `foo./(bar)` 170s registers an offense when using `foo.==(bar)` 170s registers an offense when using `foo.- bar` 170s does not register an offense when using `foo == bar` 170s registers an offense when using `foo.!= bar` 170s does not register an offense when using `foo + bar` 170s registers an offense when chaining `foo.bar.>=(baz).round(2)` 170s does not register an offense when using `foo != bar` 170s does not register an offense when using `foo.`bar` 170s does not register an offense when using `foo - bar` 170s does not register an offense when using `foo.~@bar` 170s registers an offense when using `foo.<= bar` 170s does not register an offense when using `foo.!@bar` 170s does not register an offense when using `foo =~ bar` 170s registers an offense when using `foo.*(bar)` 170s registers an offense when using `foo.!~ bar` 170s registers an offense when using `foo.>(bar)` 170s registers an offense when chaining `foo.bar.!(baz).round(2)` 170s registers an offense when chaining `foo.bar.<(baz).round(2)` 170s does not register an offense when using `foo > bar` 170s registers an offense when using `foo.!=(bar)` 170s does not register an offense when using `foo ~ bar` 170s registers an offense when using `foo.%(bar)` 170s registers an offense when chaining `foo.bar.<=>(baz).round(2)` 170s registers an offense when chaining `foo.bar.>(baz).round(2)` 170s 170s RuboCop::Formatter::WorstOffendersFormatter 170s #finished 170s when there are many offenses 170s sorts by offense count first and then by cop name 170s 170s RuboCop::Cop::Layout::LineContinuationSpacing 170s EnforcedStyle: no_space 170s marks the offense correctly when offense is not in first line 170s ignores when too much space in front of backslash after `__END__` 170s ignores heredocs and comments 170s ignores empty code 170s registers an offense when many spaces in front of backslash 171s registers no offense with zero spaces in front of backslash 171s registers an offense when one space in front of backslash 171s EnforcedStyle: space 171s ignores when too much space in front of backslash after `__END__` 171s registers an offense when no space in front of backslash 171s ignores heredocs and comments 171s marks the offense correctly when offense is not in first line 171s ignores empty code 171s registers no offense with one space in front of backslash 171s registers an offense when too much space in front of backslash 171s 171s RuboCop::Cop::Lint::UnifiedInteger 171s target ruby version < 2.4 171s when Fixnum 171s without any decorations 171s registers an offense and autocorrects 171s with MyNamespace 171s does not register an offense 171s when explicitly specified as toplevel constant 171s registers an offense 171s target ruby version >= 2.4 171s when Fixnum 171s with MyNamespace 171s does not register an offense 171s without any decorations 171s registers an offense 171s when explicitly specified as toplevel constant 171s registers an offense 171s target ruby version >= 2.4 171s when Bignum 171s with MyNamespace 171s does not register an offense 171s when explicitly specified as toplevel constant 171s registers an offense 171s without any decorations 171s registers an offense 171s target ruby version < 2.4 171s when Bignum 171s without any decorations 171s registers an offense and autocorrects 171s when explicitly specified as toplevel constant 171s registers an offense 171s with MyNamespace 171s does not register an offense 171s when Integer 171s when explicitly specified as toplevel constant 171s does not register an offense 171s without any decorations 171s does not register an offense 171s with MyNamespace 171s does not register an offense 171s 171s RuboCop::Cop::Layout::FirstArgumentIndentation 171s when EnforcedStyle is consistent_relative_to_receiver 171s when IndentationWidth:Width is 4 171s registers an offense and corrects an over-indented first argument 171s when IndentationWidth:Width is 2 171s accepts operator calls 171s does not register an offense when argument has expected indent width and the method is preceded by double splat 171s does not view chained call as an outer method call 171s registers an offense and corrects an under-indented first argument 171s does not register an offense when argument has expected indent width and the method is preceded by splat 171s accepts a first argument that is not preceded by a line break 171s accepts method calls with no arguments 171s registers an offense and corrects an over-indented first argument 171s does not view []= as an outer method call 171s registers an offense and corrects lines affected by other offenses 171s for assignment 171s register an offense and corrects a correctly indented first argument and does not care about the second argument 171s with line break 171s accepts a correctly indented first argument 171s registers an offense and corrects an under-indented first argument 171s when the receiver contains a line break 171s accepts a correctly indented first argument 171s accepts a correctly indented first argument preceded by an empty line 171s registers an offense and corrects an over-indented 1st argument 171s when preceded by a comment line 171s accepts a correctly indented first argument 171s registers an offense and corrects an under-indented first argument 171s for method calls within method calls 171s without outer parentheses 171s accepts a first argument with special indentation 171s indents all relative to the receiver 171s with outer parentheses 171s registers an offense and corrects an over-indented 1st argument 171s indents all relative to the receiver 171s when indentation width is overridden for this cop only 171s registers an offense and corrects an over-indented first argument 171s accepts a correctly indented first argument 171s when EnforcedStyle is consistent 171s when IndentationWidth:Width is 4 171s registers an offense and corrects an over-indented first argument 171s when indentation width is overridden for this cop only 171s registers an offense and corrects an over-indented first argument 171s accepts a correctly indented first argument 171s for method calls within method calls 171s accepts first argument indented relative to previous line 171s registers an offense and corrects an over-indented first argument 171s when IndentationWidth:Width is 2 171s does not view []= as an outer method call 171s registers an offense and corrects lines affected by another offense 171s registers an offense and corrects an under-indented first argument 171s does not view chained call as an outer method call 171s accepts a first argument that is not preceded by a line break 171s accepts method calls with no arguments 171s accepts operator calls 171s registers an offense and corrects an over-indented first argument of `super` 171s registers an offense and corrects an over-indented first argument on a plus sign method name 171s registers an offense and corrects an over-indented first argument 171s registers an offense and corrects an over-indented first argument on a pipe method name 171s registers an offense and corrects an over-indented first argument on an alphanumeric method name 171s for a setter call 171s accepts an unindented value 171s for assignment 171s accepts a correctly indented first argument and does not care about the second argument 171s with line break 171s registers an offense and corrects an under-indented first argument 171s accepts a correctly indented first argument 171s when using safe navigation operator 171s registers an offense and corrects an under-indented 1st argument 171s when the receiver contains a line break 171s accepts a correctly indented first argument preceded by an empty line 171s registers an offense and corrects an over-indented first argument 171s accepts a correctly indented first argument 171s when preceded by a comment line 171s accepts a correctly indented first argument 171s registers an offense and corrects an under-indented first argument 171s when EnforcedStyle is special_for_inner_method_call_in_parentheses 171s when indentation width is overridden for this cop only 171s accepts a correctly indented first argument 171s registers an offense and corrects an over-indented first argument 171s for method calls within method calls 171s without outer parentheses 171s accepts a first argument with consistent style indentation 171s with outer parentheses 171s accepts a correctly indented first argument with fullwidth characters 171s registers an offense and corrects an under-indented first argument 171s accepts a correctly indented first argument in interpolation 171s registers an offense and corrects an over-indented first argument 171s when IndentationWidth:Width is 4 171s registers an offense and corrects an over-indented first argument 171s when IndentationWidth:Width is 2 171s accepts operator calls 171s registers an offense and corrects an over-indented first argument on a pipe method name 171s registers an offense and corrects lines affected by another offense 171s registers an offense and corrects an over-indented first argument on a plus sign method name 171s registers an offense and corrects an under-indented first argument 171s accepts a first argument that is not preceded by a line break 171s registers an offense and corrects an over-indented first argument 171s registers an offense and corrects an over-indented first argument on an alphanumeric method name 171s does not view []= as an outer method call 171s does not view chained call as an outer method call 171s accepts method calls with no arguments 171s registers an offense and corrects an over-indented first argument of `super` 171s when the receiver contains a line break 171s accepts a correctly indented first argument preceded by an empty line 171s registers an offense and corrects an over-indented first argument 171s accepts a correctly indented first argument 171s when preceded by a comment line 171s accepts a correctly indented first argument 171s registers an offense and corrects an under-indented first argument 171s when using safe navigation operator 171s registers an offense and corrects an under-indented 1st argument 171s for a setter call 171s accepts an unindented value 171s for assignment 171s accepts a correctly indented first argument and does not care about the second argument 171s with line break 171s registers an offense and corrects an under-indented first argument 171s accepts a correctly indented first argument 171s when EnforcedStyle is special_for_inner_method_call 171s when IndentationWidth:Width is 2 171s registers an offense and corrects an over-indented first argument of `super` 171s registers an offense and corrects an over-indented first argument on a pipe method name 171s registers an offense and corrects lines affected by another offense 171s does not view chained call as an outer method call 171s does not view []= as an outer method call 171s accepts operator calls 171s accepts a first argument that is not preceded by a line break 171s registers an offense and corrects an over-indented first argument 171s registers an offense and corrects an over-indented first argument on a plus sign method name 171s registers an offense and corrects an over-indented first argument on an alphanumeric method name 171s registers an offense and corrects an under-indented first argument 171s accepts method calls with no arguments 171s for assignment 171s accepts a correctly indented first argument and does not care about the second argument 171s with line break 171s accepts a correctly indented first argument 171s registers an offense and corrects an under-indented first argument 171s when the receiver contains a line break 171s accepts a correctly indented first argument 171s registers an offense and corrects an over-indented first argument 171s accepts a correctly indented first argument preceded by an empty line 171s when preceded by a comment line 171s registers an offense and corrects an under-indented first argument 171s accepts a correctly indented first argument 171s for a setter call 171s accepts an unindented value 171s when using safe navigation operator 171s registers an offense and corrects an under-indented 1st argument 171s for method calls within method calls 171s without outer parentheses 171s accepts a first argument with special indentation 171s with outer parentheses 171s registers an offense and corrects an over-indented first argument 171s when IndentationWidth:Width is 4 171s registers an offense and corrects an over-indented first argument 171s when indentation width is overridden for this cop only 171s accepts a correctly indented first argument 171s registers an offense and corrects an over-indented first argument 171s 171s RuboCop::Cop::Style::EmptyLambdaParameter 171s registers an offense for an empty block parameter with a lambda 171s accepts a keyword lambda 171s does not crash on a super 171s 171s RuboCop::Formatter::ProgressFormatter 171s #report_file_as_mark 171s when a refactor convention offense is detected 171s prints "C" 171s when a refactor severity offense is detected 171s prints "R" 171s when no offenses are detected 171s prints "." 171s when different severity offenses are detected 171s prints highest level mark 171s #finished 171s calls #report_summary 171s when no offenses are detected 171s does not report offenses 171s when any offenses are detected 171s reports all detected offenses for all failed files 171s #file_finished 171s when any offenses are detected 171s calls #report_as_with_mark 171s when no offenses are detected 171s calls #report_as_with_mark 171s 171s RuboCop::Cop::Style::KeywordParametersOrder 171s registers an offense and corrects when multiple `kwoptarg` are before `kwarg` and argument parentheses omitted 171s registers an offense and corrects when `kwoptarg` is before `kwarg` 171s does not register an offense when there are no `kwoptarg`s before `kwarg`s 171s registers an offense and corrects when multiple `kwoptarg`s are interleaved with `kwarg`sand last argument is `kwrestarg` and argument parentheses omitted 171s registers an offense and corrects when multiple `kwoptarg`s are interleaved with `kwarg`sand last argument is `blockarg` and argument parentheses omitted 171s registers an offense and corrects when multiple `kwoptarg`s are interleaved with `kwarg`s 171s registers an offense and corrects when `kwoptarg` is before `kwarg` and argument parentheses omitted 171s when using block keyword parameters 171s does not register an offense when there are no `kwoptarg`s before `kwarg`s 171s registers an offense and corrects when `kwoptarg` is before `kwarg` 171s 171s RuboCop::Cop::Style::MapCompactWithConditionalBlock 171s With multiline block 171s does not register offenses if there are multiple guard clauses 171s registers an offense and corrects to `reject` with guard clause of `unless` and `next` has a value and return nil 171s registers an offense and corrects to `reject` if `next value` in else_branch and `nil` in if_branch 171s registers an offense and corrects to `select` with ternary expression 171s does not register offenses if condition has elsif branch 171s does not register offenses if `compact` is not chained to `map` 171s registers an offense and corrects to `select` if condition has not else branch 171s registers an offense and corrects to `reject` with guard clause of `unless` and `next` explicitly nil 171s registers an offense and corrects to `reject` with `if` condition 171s registers an offense and corrects to `select` with guard clause of `if` 171s registers an offense and corrects to `select` with `if` condition 171s registers an offense and corrects to `reject` with guard clause of `unless` and `next` has a value 171s registers an offense and corrects to `reject` with modifier form of `unless` condition 171s registers an offense and corrects to `select` with multi-line `if` condition 171s registers an offense and corrects to `select` with guard clause of `if` and `next` has a value and return nil 171s does not register offenses if return value is not same as block argument 171s registers an offense and corrects to `reject` with `unless` condition 171s registers an offense and corrects to `select` with guard clause of `if` and `next` has a value 171s registers an offense and corrects to `select` if `next value` in if_branch and `nil` in else_branch 171s registers an offense and corrects to `select` with modifier form of `if` condition 171s registers an offense and corrects to `reject` with ternary expression 171s registers an offense and corrects to `select` with guard clause of `if` and next explicitly nil 171s registers an offense and corrects to `reject` with guard clause of `unless` 171s With single line block 171s registers an offense and corrects to `reject` with modifier form of `unless` condition 171s registers an offense and corrects to `select` with ternary expression 171s registers an offense and corrects to `select` with modifier form of `if` condition 171s does not register offenses if `compact` is not chained to `map` 171s registers an offense and corrects to `reject` with ternary expression 171s 171s RuboCop::Cop::Style::Alias 171s when EnforcedStyle is prefer_alias 171s registers an offense for alias with symbol args 171s registers an offense for alias_method at the top level 171s does not register an offense for alias_method in a block 171s does not register an offense for alias_method with non-literal constant argument 171s registers an offense for alias_method in a module block 171s does not register an offense for alias in an instance_eval block 171s does not register an offense for alias_method with non-literal method call argument 171s does not register an offense for alias_method with explicit receiver 171s registers an offense for alias_method in a class block 171s does not register an offense for alias_method in a method def 171s does not register an offense for alias with bareword args 171s does not register an offense for alias_method in self.method def 171s when EnforcedStyle is prefer_alias_method 171s does not register an offense for alias in an instance_eval block 171s registers an offense for alias with symbol args 171s does not register an offense for alias with gvars 171s does not register an offense for alias_method 171s registers an offense for alias with bareword args 171s 171s RuboCop::Cop::Style::EvenOdd 171s accepts x % 2 == 2 171s converts (x % 2) != 0 to #odd? 171s converts x._(y) % 2 != 1 to even? 171s converts x % 2 != 0 to #odd? 171s accepts x % 3 == 0 171s converts (x(y) % 2) != 1 to #even? 171s converts 1 % 2 != 1 to even? 171s converts (x._(y)) % 2 != 1 to even? 171s accepts x % 3 != 0 171s converts (x.y % 2) != 1 to #even? 171s converts (x % 2) == 0 to #even? 171s converts x % 2 == 0 to #even? 171s converts x % 2 != 1 to #even? 171s converts x % 2 == 1 to #odd? 171s converts (x._(y) % 2) != 1 to even? 171s converts (y % 2) != 1 to #even? 171s converts complex examples 171s converts (x % 2) == 1 to #odd? 171s 171s RuboCop::Cop::Lint::MixedRegexpCaptureTypes 171s does not register offense to a regexp with numbered capture only 171s does not register offense when using a Regexp cannot be processed by regexp_parser gem 171s does not register offense to a regexp with named capture and non-capturing group 171s does not register offense to a regexp with named capture only 171s registers an offense when both of named and numbered captures are used 171s when containing a non-regexp literal 171s does not register an offense when containing a constant 171s does not register an offense when containing a lvar 171s does not register an offense when containing a gvar 171s does not register an offense when containing a method 171s does not register an offense when containing a ivar 171s does not register an offense when containing a cvar 171s 171s RuboCop::Cop::Style::RedundantSortBy 171s autocorrects array.sort_by do |x| x end 171s autocorrects array.sort_by { |x| x } 171s autocorrects array.sort_by { |y| y } 171s Ruby 2.7 171s autocorrects array.sort_by { |x| x } 171s 171s RuboCop::Cop::Naming::AccessorMethodName 171s accepts method set_something with kwrestarg 171s accepts singleton method set_something with two args 171s registers an offense for singleton method set_something with one args 171s accepts method set_something with two args 171s accepts method set_something with optarg 171s accepts method get_something with args 171s accepts singleton method set_something with no args 171s registers an offense for singleton method get_something with no args 171s registers an offense for method set_something with one arg 171s accepts method set_something with no args 171s accepts method set_something with blockarg 171s accepts method set_something with kwoptarg 171s accepts method set_something with restarg 171s accepts singleton method get_something with args 171s accepts method set_something with kwarg 171s registers an offense for method get_something with no args 171s >= Ruby 2.7 171s accepts method set_something with arguments forwarding 171s 171s RuboCop::Cop::Style::RedundantStringEscape 171s does not register an offense for a x-str literal 171s does not register an offense for a __FILE__ literal 171s does not register an offense for a __dir__ literal 171s does not register an offense for a regexp literal 171s with an interpolation-enabled HEREDOC 171s does not register an offense for a newline 171s registers an offense and corrects an escaped # at end-of-string 171s does not register an offense for multiple unicode escapes 171s does not register an offense for a hex escape 171s does not register an offense for a nested heredoc without interpolation 171s does not register a bracket-escaped lvar interpolation 171s does not register an offense for an escaped newline 171s does not register an offense for meta control characters 171s does not register an offense for a @-escaped cvar interpolation 171s registers an offense and corrects an escaped single quote 171s does not register an offense for a @-escaped ivar interpolation 171s does not register an offense for control characters 171s does not register an offense for an escaped gvar interpolation 171s does not register an offense for a $-escaped gvar interpolation 171s does not register an offense for an escaped ivar interpolation 171s does not register an offense for an escaped backslash 171s does not register an offense for an ascii DEL 171s does not register an offense for a heredoc interpolating a string with an allowed escape 171s does not register an offense for an escaped interpolation 171s does not register an offense for a technically-unnecessary escape 171s does not register an offense for a meta character 171s does not register an offense without escapes 171s registers an offense and corrects an escaped # before interpolation 171s registers an offense and corrects an escaped # without following { 171s does not register an offense for an escaped # followed { 171s does not register an offense for an octal escape 171s does not register an offense for a unicode escape 171s does not register an offense for a bracket-escaped interpolation 171s does not register an offense for an escaped cvar interpolation 171s with an interpolation-disabled HEREDOC 171s behaves like a literal without interpolation 171s does not register an offense for a @-escaped ivar interpolation 171s does not register an offense for an ascii DEL 171s does not register an offense with escaped double quote 171s does not register an offense with escaped single quote 171s does not register an offense with escaped # at end-of-string 171s does not register an offense for a hex escape 171s does not register a bracket-escaped lvar interpolation 171s does not register an offense for a meta character 171s does not register an offense for an escaped backslash 171s does not register an offense for an octal escape 171s does not register an offense for an escaped ivar interpolation 171s does not register an offense for control characters 171s does not register an offense for an escaped gvar interpolation 171s does not register an offense for an escaped interpolation 171s does not register an offense for a $-escaped gvar interpolation 171s does not register an offense for a @-escaped cvar interpolation 171s does not register an offense for an escaped # followed { 171s does not register an offense for a bracket-escaped interpolation 171s does not register an offense for multiple unicode escapes 171s does not register an offense for a technically-unnecessary escape 171s does not register an offense for an escaped newline 171s does not register an offense for a unicode escape 171s does not register an offense for an escaped cvar interpolation 171s does not register an offense for an escaped # with following { 171s does not register an offense for a newline 171s does not register an offense without escapes 171s does not register an offense for meta control characters 171s does not register an offense with escaped # without following { 171s does not register an offense for an allowed escape inside multi-line literal 171s with a %Q!...! literal 171s behaves like a literal with interpolation 171s does not register an offense for an escaped delimiter 171s does not register an offense for an escaped delimiter before interpolation 171s does not register an offense for an escaped backslash 172s registers an offense and corrects an escaped single quote 172s does not register an offense for a $-escaped gvar interpolation 172s does not register an offense for an ascii DEL 172s registers an offense and corrects an escaped # without following { 172s does not register an offense for a hex escape 172s does not register an offense for a newline 172s does not register an offense for an escaped ivar interpolation 172s does not register an offense for a unicode escape 172s does not register an offense for multiple unicode escapes 172s does not register an offense for an escaped newline 172s does not register an offense for meta control characters 172s does not register an offense for an escaped gvar interpolation 172s does not register an offense for a @-escaped cvar interpolation 172s registers an offense and corrects an escaped # at end-of-string 172s does not register an offense for an escaped # followed { 172s does not register an offense for control characters 172s does not register an offense without escapes 172s does not register an offense for a @-escaped ivar interpolation 172s registers an offense and corrects an escaped double quote 172s does not register a bracket-escaped lvar interpolation 172s does not register an offense for an escaped interpolation 172s does not register an offense for a meta character 172s registers an offense and corrects an escaped } when escaping both brackets to avoid interpolation 172s registers an offense and corrects a escaped nested delimiter in a double quoted string 172s does not register an offense for a bracket-escaped interpolation 172s does not register an offense for an escaped cvar interpolation 172s registers an offense and corrects an escaped # before interpolation 172s does not register an offense for a technically-unnecessary escape 172s does not register an offense for an octal escape 172s with a %q(...) literal 172s behaves like a literal without interpolation 172s does not register an offense for an escaped delimiter 172s does not register an offense for an escaped newline 172s does not register an offense for an escaped interpolation 172s does not register an offense for an escaped # followed { 172s does not register an offense for an escaped cvar interpolation 172s does not register an offense for an ascii DEL 172s does not register an offense with escaped # without following { 172s does not register a bracket-escaped lvar interpolation 172s does not register an offense for a $-escaped gvar interpolation 172s does not register an offense for a @-escaped ivar interpolation 172s does not register an offense with escaped # at end-of-string 172s does not register an offense with escaped single quote 172s does not register an offense for an escaped # with following { 172s does not register an offense without escapes 172s does not register an offense for meta control characters 172s does not register an offense for a meta character 172s does not register an offense for a newline 172s does not register an offense for a technically-unnecessary escape 172s does not register an offense for a unicode escape 172s does not register an offense for an octal escape 172s does not register an offense for multiple unicode escapes 172s does not register an offense for an escaped ivar interpolation 172s does not register an offense for an escaped backslash 172s does not register an offense for an escaped delimiter before interpolation 172s does not register an offense for an allowed escape inside multi-line literal 172s does not register an offense for control characters 172s does not register an offense for a bracket-escaped interpolation 172s does not register an offense with escaped double quote 172s does not register an offense for a @-escaped cvar interpolation 172s does not register an offense for an escaped gvar interpolation 172s does not register an offense for a hex escape 172s with a %w(...) literal 172s does not register an offense for escaped spaces 172s behaves like a literal without interpolation 172s does not register an offense with escaped # without following { 172s does not register an offense for a bracket-escaped interpolation 172s does not register an offense for an allowed escape inside multi-line literal 172s does not register an offense for an escaped # with following { 172s does not register an offense for multiple unicode escapes 172s does not register an offense with escaped # at end-of-string 172s does not register an offense for a newline 172s does not register an offense for control characters 172s does not register an offense for an octal escape 172s does not register an offense for a @-escaped cvar interpolation 172s does not register a bracket-escaped lvar interpolation 172s does not register an offense for an ascii DEL 172s does not register an offense for an escaped gvar interpolation 172s does not register an offense for an escaped newline 172s does not register an offense for an escaped # followed { 172s does not register an offense without escapes 172s does not register an offense for an escaped interpolation 172s does not register an offense with escaped double quote 172s does not register an offense for an escaped ivar interpolation 172s does not register an offense for a technically-unnecessary escape 172s does not register an offense for an escaped delimiter before interpolation 172s does not register an offense for a hex escape 172s does not register an offense for meta control characters 172s does not register an offense with escaped single quote 172s does not register an offense for an escaped cvar interpolation 172s does not register an offense for an escaped backslash 172s does not register an offense for a meta character 172s does not register an offense for an escaped delimiter 172s does not register an offense for a $-escaped gvar interpolation 172s does not register an offense for a @-escaped ivar interpolation 172s does not register an offense for a unicode escape 172s with a %W(...) literal 172s does not register an offense for escaped spaces 172s behaves like a literal with interpolation 172s does not register a bracket-escaped lvar interpolation 172s does not register an offense for an escaped # followed { 172s does not register an offense for a $-escaped gvar interpolation 172s does not register an offense for a technically-unnecessary escape 172s does not register an offense for an escaped ivar interpolation 172s does not register an offense for an ascii DEL 172s does not register an offense for a @-escaped cvar interpolation 172s does not register an offense for an escaped delimiter 172s does not register an offense for an octal escape 172s does not register an offense for a @-escaped ivar interpolation 172s does not register an offense for a meta character 172s does not register an offense for a unicode escape 172s registers an offense and corrects an escaped # at end-of-string 172s does not register an offense for an escaped delimiter before interpolation 172s does not register an offense for meta control characters 172s does not register an offense for a newline 172s registers an offense and corrects an escaped double quote 172s does not register an offense for multiple unicode escapes 172s does not register an offense for an escaped newline 172s does not register an offense for a bracket-escaped interpolation 172s does not register an offense for an escaped cvar interpolation 172s registers an offense and corrects a escaped nested delimiter in a double quoted string 172s registers an offense and corrects an escaped } when escaping both brackets to avoid interpolation 172s does not register an offense for a hex escape 172s does not register an offense for control characters 172s registers an offense and corrects an escaped single quote 172s does not register an offense without escapes 172s does not register an offense for an escaped interpolation 172s does not register an offense for an escaped backslash 172s registers an offense and corrects an escaped # before interpolation 172s does not register an offense for an escaped gvar interpolation 172s registers an offense and corrects an escaped # without following { 172s when using character literals 172s does not register an offense for `?a` 172s does not register an offense for `?\n` 172s with a %Q(...) literal 172s behaves like a literal with interpolation 172s registers an offense and corrects an escaped } when escaping both brackets to avoid interpolation 172s does not register an offense for a $-escaped gvar interpolation 172s does not register an offense for a technically-unnecessary escape 172s does not register a bracket-escaped lvar interpolation 172s does not register an offense for an escaped # followed { 172s registers an offense and corrects an escaped # at end-of-string 172s does not register an offense for a meta character 172s does not register an offense for a bracket-escaped interpolation 172s does not register an offense for an octal escape 172s does not register an offense for a newline 172s does not register an offense for a @-escaped ivar interpolation 172s does not register an offense for multiple unicode escapes 172s does not register an offense for an escaped delimiter before interpolation 172s does not register an offense for a hex escape 172s does not register an offense for meta control characters 172s does not register an offense for control characters 172s does not register an offense for an escaped gvar interpolation 172s does not register an offense for an escaped interpolation 172s does not register an offense for an escaped ivar interpolation 172s registers an offense and corrects a escaped nested delimiter in a double quoted string 172s registers an offense and corrects an escaped single quote 172s registers an offense and corrects an escaped # before interpolation 172s does not register an offense for an escaped delimiter 172s does not register an offense without escapes 172s does not register an offense for an escaped backslash 172s registers an offense and corrects an escaped # without following { 172s does not register an offense for a unicode escape 172s does not register an offense for a @-escaped cvar interpolation 172s does not register an offense for an escaped cvar interpolation 172s does not register an offense for an escaped newline 172s does not register an offense for an ascii DEL 172s registers an offense and corrects an escaped double quote 172s with a %(...) literal 172s behaves like a literal with interpolation 172s does not register an offense for an escaped delimiter before interpolation 172s registers an offense and corrects an escaped # before interpolation 172s does not register an offense for an octal escape 172s registers an offense and corrects an escaped single quote 172s does not register an offense for a newline 172s registers an offense and corrects an escaped double quote 172s does not register an offense for a technically-unnecessary escape 172s does not register an offense for a meta character 172s does not register an offense for an escaped newline 172s registers an offense and corrects an escaped } when escaping both brackets to avoid interpolation 172s registers an offense and corrects an escaped # without following { 172s does not register an offense for an ascii DEL 172s does not register an offense for multiple unicode escapes 172s does not register an offense for an escaped # followed { 172s does not register an offense for an escaped delimiter 172s does not register a bracket-escaped lvar interpolation 172s does not register an offense for meta control characters 172s does not register an offense for an escaped gvar interpolation 172s does not register an offense for an escaped backslash 172s registers an offense and corrects an escaped # at end-of-string 172s does not register an offense for a @-escaped ivar interpolation 172s registers an offense and corrects a escaped nested delimiter in a double quoted string 172s does not register an offense for a $-escaped gvar interpolation 172s does not register an offense without escapes 172s does not register an offense for a unicode escape 172s does not register an offense for an escaped interpolation 172s does not register an offense for a @-escaped cvar interpolation 172s does not register an offense for a hex escape 172s does not register an offense for an escaped ivar interpolation 172s does not register an offense for a bracket-escaped interpolation 172s does not register an offense for an escaped cvar interpolation 172s does not register an offense for control characters 172s with a double quoted string 172s does not register an offense when escaping a quote in multi-line broken string 172s registers an offense and corrects an unnecessary escape in multi-line broken string 172s does not register an offense with escaped double quote 172s does not register an offense with multiple escaped backslashes 172s behaves like a literal with interpolation 172s does not register an offense for an escaped newline 172s does not register an offense for an escaped interpolation 172s does not register an offense for multiple unicode escapes 172s does not register an offense for a @-escaped ivar interpolation 172s does not register an offense for an escaped # followed { 172s does not register an offense without escapes 172s registers an offense and corrects an escaped single quote 172s does not register an offense for a $-escaped gvar interpolation 172s does not register an offense for a unicode escape 172s does not register an offense for an octal escape 172s does not register an offense for a @-escaped cvar interpolation 172s registers an offense and corrects an escaped # without following { 172s does not register an offense for an escaped gvar interpolation 172s does not register an offense for meta control characters 172s does not register an offense for an escaped ivar interpolation 172s does not register an offense for a technically-unnecessary escape 172s does not register an offense for an escaped cvar interpolation 172s does not register an offense for an ascii DEL 172s does not register an offense for a meta character 172s does not register an offense for an escaped backslash 172s registers an offense and corrects an escaped # before interpolation 172s does not register an offense for a bracket-escaped interpolation 172s does not register an offense for control characters 172s does not register an offense for a newline 172s registers an offense and corrects an escaped } when escaping both brackets to avoid interpolation 172s does not register an offense for a hex escape 172s does not register an offense for an escaped delimiter 172s registers an offense and corrects an escaped # at end-of-string 172s does not register an offense for an escaped delimiter before interpolation 172s does not register a bracket-escaped lvar interpolation 172s with a single quoted string 172s behaves like a literal without interpolation 172s does not register an offense without escapes 172s does not register an offense for multiple unicode escapes 172s does not register an offense for an escaped newline 172s does not register a bracket-escaped lvar interpolation 172s does not register an offense for an ascii DEL 172s does not register an offense for a unicode escape 172s does not register an offense for an escaped backslash 172s does not register an offense for control characters 172s does not register an offense for an escaped delimiter before interpolation 172s does not register an offense for an escaped ivar interpolation 172s does not register an offense for meta control characters 172s does not register an offense for a @-escaped cvar interpolation 172s does not register an offense for an escaped # with following { 172s does not register an offense with escaped # at end-of-string 172s does not register an offense for an escaped delimiter 172s does not register an offense for a newline 172s does not register an offense for a bracket-escaped interpolation 172s does not register an offense for a technically-unnecessary escape 172s does not register an offense with escaped double quote 172s does not register an offense for an octal escape 172s does not register an offense for a hex escape 172s does not register an offense for an escaped # followed { 172s does not register an offense with escaped # without following { 172s does not register an offense for an escaped interpolation 172s does not register an offense for a $-escaped gvar interpolation 172s does not register an offense for a @-escaped ivar interpolation 172s does not register an offense with escaped single quote 172s does not register an offense for an escaped gvar interpolation 172s does not register an offense for an escaped cvar interpolation 172s does not register an offense for an allowed escape inside multi-line literal 172s does not register an offense for a meta character 172s 172s RuboCop::Cop::Layout::TrailingEmptyLines 172s when EnforcedStyle is final_blank_line 172s autocorrects missing newline 172s accepts final blank line 172s registers an offense for final newline 172s registers an offense for multiple blank lines in an empty file 172s registers an offense for multiple trailing blank lines 172s autocorrects missing blank line 172s registers an offense for no final newline 172s when EnforcedStyle is final_newline 172s registers an offense for no final newline after block comment 172s accepts an empty file 172s autocorrects even if some lines have space 172s registers an offense for no final newline after assignment 172s accepts final blank lines if they come after __END__ in empty file 172s registers an offense for multiple trailing blank lines 172s accepts final blank lines if they come after __END__ 172s accepts final newline 172s registers an offense for multiple blank lines in an empty file 172s 172s RuboCop::Cop::Layout::SpaceInsideArrayLiteralBrackets 172s does not register offense for any kind of reference brackets 172s when EnforcedStyle is space 172s does not register offense for valid 2-dimensional array 172s behaves like space inside arrays 172s does not register offense for valid multiline array 172s does not register offense when bottom bracket gets its own line & has trailing method 172s does not register offense for arrays using ref brackets 172s register an offense and corrects when 2 arrays are on one line 172s accepts space inside array brackets with comment 172s does not register offense for indented array when bottom bracket gets its own line & is misaligned 172s accepts square brackets as method name 172s registers an offense and corrects an array missing whitespace when there is more than one array on a line 172s does not register offense when 2 arrays on one line 172s registers an offense and corrects multiline array on end bracket 172s registers an offense and corrects array brackets with no trailing whitespace 172s does not register offense for arrays with spaces 172s does not register offense for array when brackets get their own line 172s registers an offense and corrects array brackets with no leading whitespace 172s registers an offense and corrects multiline array on end bracket with trailing method 172s accepts square brackets called with method call syntax 172s when EnforcedStyle is no_space 172s does not register offense for valid multiline array 172s does not register offense when bottom bracket gets its own line & has trailing method 172s does not register offense for arrays using ref brackets 172s registers an offense and corrects multiline array on end bracket with trailing method 172s accepts space inside array brackets if with comment 172s accepts square brackets called with method call syntax 172s registers an offense and corrects an array literal as an argument with trailing whitespace after a heredoc is started 172s does not register offense when bottom bracket gets its own line indented with tabs 172s registers an offense and corrects array brackets with trailing whitespace 172s does not register offense when 2 arrays on one line 172s accepts square brackets as method name 172s does not register offense for indented array when bottom bracket gets its own line & is misaligned 172s accepts a multiline array with whitespace before end bracket 172s registers an offense and corrects array brackets with leading whitespace 172s registers an offense and corrects multiline array on end bracket 172s registers an offense and corrects an array when two on one line 172s does not register offense for arrays with no spaces 172s does not register offense for valid 2-dimensional array 172s does not register offense when contains an array literal as an argument after a heredoc is started 172s does not register offense for array when brackets get own line 172s registers an offense and corrects 2 arrays on one line 172s with space inside empty braces allowed 172s accepts empty brackets with space inside 172s registers an offense and corrects empty brackets with no space inside 172s registers an offense and corrects empty brackets with more than one space inside 172s with space inside empty brackets not allowed 172s registers an offense and corrects multiline spaces 172s registers an offense and corrects empty brackets with multiple spaces inside 172s accepts empty brackets with no space inside 172s registers an offense and corrects empty brackets with 1 space inside 172s when EnforcedStyle is compact 172s registers an offense and corrects space between 2 opening brackets 172s registers an offense and corrects space between 2 closing brackets 172s accepts multiline array 172s does not register offense for valid 3-dimensional array 172s registers an offense and corrects 3-dimensional array with extra spaces 172s registers an offense and corrects 2-dimensional array with extra spaces 172s does not register offense for valid 2-dimensional array 172s does not register offense for valid 4-dimensional array 172s multiline, 2-dimensional array with spaces 172s registers an offense and corrects at the beginning of array 172s registers an offense and corrects at the end of array 172s behaves like space inside arrays 172s does not register offense for arrays with spaces 172s accepts square brackets called with method call syntax 172s registers an offense and corrects an array missing whitespace when there is more than one array on a line 172s does not register offense for arrays using ref brackets 172s does not register offense when bottom bracket gets its own line & has trailing method 172s register an offense and corrects when 2 arrays are on one line 172s registers an offense and corrects multiline array on end bracket with trailing method 172s registers an offense and corrects array brackets with no leading whitespace 172s registers an offense and corrects multiline array on end bracket 172s accepts square brackets as method name 172s registers an offense and corrects array brackets with no trailing whitespace 172s does not register offense for array when brackets get their own line 172s does not register offense for indented array when bottom bracket gets its own line & is misaligned 172s does not register offense when 2 arrays on one line 172s does not register offense for valid multiline array 172s accepts space inside array brackets with comment 172s multiline, 2-dimensional array with newlines 173s registers an offense and corrects at the end of array 173s registers an offense and corrects at the beginning of array 173s 173s RuboCop::Cop::Severity 173s overrides #to_s 173s redefines == to compare severities 173s has a few required attributes 173s is frozen 173s constructs from code 173s W 173s is expected to eq # 173s C 173s is expected to eq # 173s F 173s is expected to eq # 173s R 173s is expected to eq # 173s E 173s is expected to eq # 173s I 173s is expected to eq # 173s #level 173s convention 173s is expected to eq 3 173s warning 173s is expected to eq 4 173s info 173s is expected to eq 1 173s fatal 173s is expected to eq 6 173s refactor 173s is expected to eq 2 173s error 173s is expected to eq 5 173s #code 173s info 173s is expected to eq "I" 173s convention 173s is expected to eq "C" 173s refactor 173s is expected to eq "R" 173s warning 173s is expected to eq "W" 173s error 173s is expected to eq "E" 173s fatal 173s is expected to eq "F" 173s Comparable 173s refactor 173s is expected to be < convention 173s info 173s is expected to be < refactor 173s convention 173s is expected to be < warning 173s warning 173s is expected to be < error 173s error 173s is expected to be < fatal 173s 173s RuboCop::Cop::Layout::ArrayAlignment 173s when aligned with first parameter 173s does not register an offense or try to correct parallel assignment 173s does not indent heredoc strings when autocorrecting 173s accepts aligned array keys 173s accepts single line array 173s registers an offense and corrects misaligned array elements 173s accepts several elements per line 173s autocorrects array within array with too little indentation 173s autocorrects array within array with too much indentation 173s accepts aligned array with fullwidth characters 173s autocorrects misaligned array with the first element on a new row 173s accepts the first element being on a new row 173s when aligned with fixed indentation 173s accepts several elements per line 173s does not indent heredoc strings when autocorrecting 173s registers an offense and corrects misaligned array elements 173s accepts aligned array keys 173s autocorrects misaligned array with the first element on a new row 173s autocorrects array within array with too much indentation 173s accepts aligned array with fullwidth characters 173s accepts the first element being on a new row 173s accepts single line array 173s does not register an offense or try to correct parallel assignment 173s autocorrects array within array with too little indentation 173s 173s RuboCop::Cop::InternalAffairs::RedundantMethodDispatchNode 173s does not register an offense when using `send_node.method_name` 173s registers an offense when using `node.send_node.method_name` 173s does not register an offense when using `node.method_name` 173s does not register an offense when using `node.receiver` 173s does not register an offense when using `node.send_node.arguments?` 173s registers an offense when using `node.send_node.receiver` 173s 173s RuboCop::Cop::Lint::AmbiguousBlockAssociation 173s behaves like accepts 173s does not register an offense 173s when AllowedMethods is enabled 173s does not register an offense for an allowed method 173s registers an offense for other methods 173s when AllowedPatterns is enabled 173s registers an offense for other methods 173s does not register an offense for an allowed method 173s behaves like accepts 173s does not register an offense 173s behaves like accepts 173s does not register an offense 173s behaves like accepts 173s does not register an offense 173s behaves like accepts 173s does not register an offense 173s behaves like accepts 173s does not register an offense 173s behaves like accepts 173s does not register an offense 173s behaves like accepts 173s does not register an offense 173s without parentheses 173s rspec expect {}.to change {} 173s registers an offense 173s without receiver 173s registers an offense 173s with receiver 173s registers an offense 173s when using safe navigation operator 173s registers an offense 173s as a hash key 173s registers an offense 173s with assignment 173s registers an offense 173s behaves like accepts 173s does not register an offense 173s behaves like accepts 173s does not register an offense 173s behaves like accepts 173s does not register an offense 173s behaves like accepts 173s does not register an offense 173s behaves like accepts 173s does not register an offense 173s behaves like accepts 173s does not register an offense 173s behaves like accepts 173s does not register an offense 173s behaves like accepts 173s does not register an offense 173s behaves like accepts 173s does not register an offense 173s behaves like accepts 173s does not register an offense 173s behaves like accepts 173s does not register an offense 173s behaves like accepts 173s does not register an offense 173s behaves like accepts 173s does not register an offense 173s behaves like accepts 173s does not register an offense 173s 173s RuboCop::Cop::Lint::EmptyFile 173s does not register an offense when the file contains code 173s registers an offense when the file is empty 173s does not register an offense when the file contains comments 173s when AllowComments is false 173s registers an offense when the file contains comments 173s 173s RuboCop::Cop::Style::EvalWithLocation 173s registers an offense when using `instance_eval` with improper arguments 173s registers an offense when using `#instance_eval` with a string argument in parentheses 173s registers an offense when using `#module_eval` without any arguments 173s registers an offense when using `class_eval` with improper arguments 173s accepts `eval` with a code that is a variable 173s registers an offense when using `::Kernel.eval` without any arguments 173s registers an offense when using `#instance_eval` without any arguments 173s registers an offense when using `#eval` with a heredoc and an incorrect line number 173s registers an offense when using `#eval` with a string on a new line 173s registers an offense when using `Kernel.eval` without any arguments 173s registers an offense when using `#eval` without any arguments 173s does not register an offense if `eval` is called on another object 173s registers an offense when using `#eval` without lineno 173s registers an offense when using `#eval` with `binding` only 173s registers an offense when using `#eval` with an incorrect line number 173s registers an offense when using `#class_eval` with an incorrect lineno 173s accepts `eval` with a heredoc, a filename and `__LINE__ + 1` 173s accepts `eval` with a string, a filename and `__LINE__` 173s registers an offense when using `#class_eval` without any arguments 173s registers an offense when using `eval` with improper arguments 173s registers an offense when using `module_eval` with improper arguments 173s does not register an offense when using eval with block argument 173s registers an offense when using correct file argument but incorrect line 173s accepts `eval` with a string, a filename and `__LINE__` on a new line 173s 173s RuboCop::Cop::Style::SafeNavigation 173s allows calls to methods not safeguarded by respond_to 173s allows an object check before a nil check on a short chain 173s allows a method call as a parameter when the parameter is safe guarded with an object check 173s allows method call that is used in a regex comparison safe guarded by an object check 173s allows method calls that do not get called using . safe guarded by an object check 173s allows an object check before a method call that is used with `empty?` 173s allows a method call safeguarded with a negative check for the object when using `unless` 173s allows an object check before a negated predicate 173s allows an object check before a blank check 173s does not move comments that are inside an inner block 173s allows chained method calls during assignment safe guardedby an object check 173s allows an object check before a method call that is used in a comparison 173s allows an object check before a nil check on a long chain 173s allows an object check before hash access 173s allows an object check before a negated predicate method chain 173s allows a method chain that is used in a comparison safe guarded by an object check 173s allows an object check before a method chain that is used in a comparison 173s allows a method call safeguarded with a negative check for the object when using `if` 173s allows object checks in the condition of an elsif statement and a method call on that object in the body 173s allows method call that is used in a spaceship comparison safe guarded by an object check 173s allows an object check before a negated method call with a safe navigation 173s allows an object check before a method chain longer than 2 methods 173s allows an object check before a long chain with a block 173s allows an object check before a method call that is used in a negated regex comparison 173s allows method call that is used in a comparison safe guarded by an object check 173s allows a method call safeguarded when using `unless nil?` 173s allows method call that is used in a negated regex comparison safe guarded by an object check 173s allows an object check before a method call that is used in a regex comparison 173s allows chained method calls during arithmetic operations safe guarded by an object check 173s allows for empty if blocks with comments 173s allows calls using safe navigation 173s allows calls on nil 173s allows an object check before a method call that is used in a spaceship comparison 173s respond_to? 173s allows method calls safeguarded by a respond_to check to a different method 173s allows method calls safeguarded by a respond_to check on adifferent variable and method 173s allows method calls safeguarded by a respond_to check on adifferent variable but the same method 173s allows enumerable accessor method calls safeguarded by a respond_to check 173s allows method calls safeguarded by a respond_to check 173s behaves like all variable types 173s modifier if 173s registers an offense for a method call with params and a block safeguarded with a check for the object 173s registers an offense for a method call with params and a block safeguarded with a negative check for the object 173s registers an offense for a chained method call safeguarded with a negative nil check for the object 173s registers an offense for a chained method call safeguarded with an unless nil check for the object 173s registers an offense for a chained method call safeguarded with a check for the object 173s registers an offense for a method call safeguarded with a negative nil check for the object 173s registers an offense when safe guard check and safe navigation method call are connected with `&&` condition 173s registers an offense for a method call with a block safeguarded with a negative check for the object 173s registers an offense for a method call with params safeguarded with a negative check for the object 173s registers an offense for a method call with a block safeguarded with a negative nil check for the object 173s registers an offense for a method call safeguarded with a nil check for the object 173s registers an offense for a method call with a block safeguarded with a nil check for the object 173s registers an offense for a method call with params safeguarded with a check for the object 173s registers an offense for an object check followed by a method call with a comment at EOL 173s registers an offense for a method call that nil responds to safe guarded by an object check 173s registers an offense for a method call with params and a block safeguarded with a nil check for the object 173s registers an offense for a method call safeguarded with a check for the object 173s registers an offense for a method call with params and a block safeguarded with a negative nil check for the object 173s registers an offense for a method call with a block safeguarded with a check for the object 173s registers an offense for a method call safeguarded with a negative check for the object 173s registers an offense for a method call with params safeguarded with a nil check for the object 173s registers an offense for a method call with params safeguarded with a negative nil check for the object 173s registers an offense for a method call on an accessor safeguarded by a check for the accessed variable 173s behaves like safe guarding logical break keywords 173s allows a method call being passed to raise safe guarded by an object check 173s behaves like safe guarding logical break keywords 173s allows a method call being passed to fail safe guarded by an object check 173s behaves like safe guarding logical break keywords 173s allows a method call being passed to yield safe guarded by an object check 173s behaves like safe guarding logical break keywords 173s allows a method call being passed to throw safe guarded by an object check 173s behaves like safe guarding logical break keywords 173s allows a method call being passed to break safe guarded by an object check 173s behaves like safe guarding logical break keywords 173s allows a method call being passed to next safe guarded by an object check 173s behaves like safe guarding logical break keywords 173s allows a method call being passed to return safe guarded by an object check 173s if expression 173s registers an offense for a single method call inside of an unless negative check for the object 173s registers an offense for a single method call with a block inside of an unless nil check for the object 173s registers an offense for a single method call with params and a block inside of a non-nil check for the object 173s registers an offense for a single method call with params and a block inside of an unless nil check for the object 173s allows a single method call inside of a check for the object with an else 173s registers an offense for a single method call inside of an unless nil check for the object 173s registers an offense for a single method call with params and a block inside of an unless negative check for the object 173s registers an offense for a single method call with params and a block inside of a check for the object 173s registers an offense for a single method call with a block inside of a check for the object 173s registers an offense for a single method call with params inside of a non-nil check for the object 173s does not lose comments within if expression 173s only moves comments that fall within the expression 173s registers an offense for a single method call with params inside of an unless negative check for the object 173s registers an offense for a single method call with params inside of a check for the object 173s registers an offense for a single method call inside of a non-nil check for the object 173s registers an offense for a single method call with a block inside of an unless negative check for the object 173s registers an offense for a single method call with params inside of an unless nil check for the object 173s registers an offense for a single method call inside of a check for the object 173s registers an offense for a single method call with a block inside of a non-nil check for the object 173s ternary expression 173s allows ternary expression 173s object check before method call 173s allows a non object check followed by a method call with a block 173s allows a non object check followed by a method call with params and a block 173s allows a non object check followed by a method call 173s allows a nil object check followed by a method call with params and a block 173s allows a nil object check followed by a method call with a block 173s allows a nil object check followed by a method call with params 173s allows a non object check followed by a method call with params 173s allows a nil object check followed by a method call 173s ConvertCodeThatCanStartToReturnNil false 173s registers an offense for an object check followed by a method call with params 173s registers an offense for an object check followed by a method call with params and a block 173s registers an offense for an object check followed by a method calls that nil responds to 173s registers an offense for a check for the object followed by a method call in the condition for an if expression 173s allows a non-nil object check followed by a method call with params and a block 173s allows a non-nil object check followed by a method call 173s registers an offense for an object check followed by a method call 173s allows a non-nil object check followed by a method call with params 173s allows a non-nil object check followed by a method call with a block 173s registers an offense for an object check followed by a method call with a block 173s method chaining 173s corrects an object check followed by a chained method call with params 173s corrects an object check followed by a chained method call with a symbol proc 173s corrects an object check followed by a chained method call 173s corrects an object check followed by a chained method call with a block 173s ConvertCodeThatCanStartToReturnNil true 173s registers an offense for a non-nil object check followed by a method call 173s registers an offense for a non-nil object check followed by a method call with params 173s registers an offense for an object check followed by a method call with a block 173s registers an offense for an object check followed by a method call with params and a block 173s corrects an object check followed by a method call and another check 173s registers an offense for an object check followed by a method call 173s registers an offense for an object check followed by a method call with params 173s registers an offense for a check for the object followed by a method call in the condition for an if expression 173s registers an offense for a non-nil object check followed by a method call with params and a block 173s registers an offense for a non-nil object check followed by a method call with a block 173s method chaining 173s registers an offense for an object check followed by chained method calls with blocks 173s MaxChainLength: 3 173s allows an object check followed by 4 chained method calls 173s registers an offense for an object check followed by 3 chained method calls 173s with Lint/SafeNavigationChain disabled 173s allows an object check followed by chained method calls 173s allows an object check followed by chained method calls with blocks 173s MaxChainLength: 1 173s registers an offense for an object check followed by 1 chained method calls 173s allows an object check followed by 2 chained method calls 173s behaves like all variable types 173s if expression 173s registers an offense for a single method call with params and a block inside of a non-nil check for the object 173s registers an offense for a single method call inside of an unless nil check for the object 173s registers an offense for a single method call with params inside of a non-nil check for the object 173s registers an offense for a single method call with a block inside of a non-nil check for the object 173s registers an offense for a single method call inside of a check for the object 173s registers an offense for a single method call with a block inside of an unless nil check for the object 173s registers an offense for a single method call with params inside of a check for the object 173s registers an offense for a single method call with params inside of an unless nil check for the object 173s registers an offense for a single method call with params and a block inside of an unless negative check for the object 173s registers an offense for a single method call inside of a non-nil check for the object 173s allows a single method call inside of a check for the object with an else 173s does not lose comments within if expression 173s only moves comments that fall within the expression 173s registers an offense for a single method call with params inside of an unless negative check for the object 173s registers an offense for a single method call with a block inside of an unless negative check for the object 173s registers an offense for a single method call with params and a block inside of an unless nil check for the object 173s registers an offense for a single method call inside of an unless negative check for the object 173s registers an offense for a single method call with params and a block inside of a check for the object 173s registers an offense for a single method call with a block inside of a check for the object 173s ternary expression 173s allows ternary expression 173s modifier if 173s registers an offense for a method call on an accessor safeguarded by a check for the accessed variable 173s registers an offense for a method call with params safeguarded with a negative nil check for the object 173s registers an offense when safe guard check and safe navigation method call are connected with `&&` condition 173s registers an offense for a method call with a block safeguarded with a negative nil check for the object 173s registers an offense for a chained method call safeguarded with a check for the object 173s registers an offense for a method call with params safeguarded with a negative check for the object 173s registers an offense for a method call with params and a block safeguarded with a negative nil check for the object 173s registers an offense for a method call safeguarded with a nil check for the object 173s registers an offense for a chained method call safeguarded with a negative nil check for the object 173s registers an offense for a method call with a block safeguarded with a check for the object 173s registers an offense for a chained method call safeguarded with an unless nil check for the object 173s registers an offense for a method call safeguarded with a negative nil check for the object 173s registers an offense for a method call with params and a block safeguarded with a check for the object 173s registers an offense for a method call with a block safeguarded with a negative check for the object 173s registers an offense for a method call that nil responds to safe guarded by an object check 173s registers an offense for a method call with params and a block safeguarded with a negative check for the object 173s registers an offense for a method call safeguarded with a negative check for the object 173s registers an offense for a method call safeguarded with a check for the object 173s registers an offense for a method call with params safeguarded with a nil check for the object 173s registers an offense for an object check followed by a method call with a comment at EOL 173s registers an offense for a method call with a block safeguarded with a nil check for the object 173s registers an offense for a method call with params and a block safeguarded with a nil check for the object 173s registers an offense for a method call with params safeguarded with a check for the object 173s behaves like safe guarding logical break keywords 173s allows a method call being passed to next safe guarded by an object check 173s behaves like safe guarding logical break keywords 173s allows a method call being passed to raise safe guarded by an object check 173s behaves like safe guarding logical break keywords 173s allows a method call being passed to fail safe guarded by an object check 173s behaves like safe guarding logical break keywords 173s allows a method call being passed to throw safe guarded by an object check 173s behaves like safe guarding logical break keywords 173s allows a method call being passed to return safe guarded by an object check 173s behaves like safe guarding logical break keywords 173s allows a method call being passed to break safe guarded by an object check 173s behaves like safe guarding logical break keywords 173s allows a method call being passed to yield safe guarded by an object check 173s object check before method call 173s allows a non object check followed by a method call with a block 173s allows a nil object check followed by a method call 173s allows a non object check followed by a method call with params and a block 173s allows a nil object check followed by a method call with params and a block 173s allows a nil object check followed by a method call with a block 173s allows a nil object check followed by a method call with params 173s allows a non object check followed by a method call with params 173s allows a non object check followed by a method call 173s ConvertCodeThatCanStartToReturnNil false 173s allows a non-nil object check followed by a method call with a block 173s registers an offense for a check for the object followed by a method call in the condition for an if expression 173s allows a non-nil object check followed by a method call with params 173s registers an offense for an object check followed by a method call 173s registers an offense for an object check followed by a method call with a block 173s allows a non-nil object check followed by a method call 173s allows a non-nil object check followed by a method call with params and a block 173s registers an offense for an object check followed by a method call with params 173s registers an offense for an object check followed by a method calls that nil responds to 173s registers an offense for an object check followed by a method call with params and a block 173s method chaining 173s corrects an object check followed by a chained method call with params 173s corrects an object check followed by a chained method call with a symbol proc 173s corrects an object check followed by a chained method call with a block 173s corrects an object check followed by a chained method call 173s ConvertCodeThatCanStartToReturnNil true 173s registers an offense for a non-nil object check followed by a method call with a block 173s registers an offense for an object check followed by a method call with a block 173s registers an offense for a non-nil object check followed by a method call 173s registers an offense for an object check followed by a method call with params 173s registers an offense for an object check followed by a method call 173s registers an offense for a non-nil object check followed by a method call with params 173s registers an offense for an object check followed by a method call with params and a block 173s registers an offense for a non-nil object check followed by a method call with params and a block 173s registers an offense for a check for the object followed by a method call in the condition for an if expression 173s corrects an object check followed by a method call and another check 173s method chaining 173s registers an offense for an object check followed by chained method calls with blocks 173s MaxChainLength: 3 173s registers an offense for an object check followed by 3 chained method calls 173s allows an object check followed by 4 chained method calls 173s with Lint/SafeNavigationChain disabled 173s allows an object check followed by chained method calls with blocks 173s allows an object check followed by chained method calls 173s MaxChainLength: 1 173s registers an offense for an object check followed by 1 chained method calls 174s allows an object check followed by 2 chained method calls 174s behaves like all variable types 174s modifier if 174s registers an offense for a method call on an accessor safeguarded by a check for the accessed variable 174s registers an offense for an object check followed by a method call with a comment at EOL 174s registers an offense for a method call with a block safeguarded with a negative check for the object 174s registers an offense for a method call with a block safeguarded with a nil check for the object 174s registers an offense for a method call with params and a block safeguarded with a negative check for the object 174s registers an offense for a method call that nil responds to safe guarded by an object check 174s registers an offense for a method call with params and a block safeguarded with a negative nil check for the object 174s registers an offense for a method call safeguarded with a negative check for the object 174s registers an offense for a method call safeguarded with a check for the object 174s registers an offense for a method call with params and a block safeguarded with a nil check for the object 174s registers an offense for a method call with params safeguarded with a check for the object 174s registers an offense for a method call with params safeguarded with a nil check for the object 174s registers an offense for a method call with params safeguarded with a negative check for the object 174s registers an offense for a method call with a block safeguarded with a negative nil check for the object 174s registers an offense for a method call with params safeguarded with a negative nil check for the object 174s registers an offense for a method call with params and a block safeguarded with a check for the object 174s registers an offense for a method call safeguarded with a negative nil check for the object 174s registers an offense for a chained method call safeguarded with an unless nil check for the object 174s registers an offense for a chained method call safeguarded with a check for the object 174s registers an offense for a method call safeguarded with a nil check for the object 174s registers an offense for a method call with a block safeguarded with a check for the object 174s registers an offense when safe guard check and safe navigation method call are connected with `&&` condition 174s registers an offense for a chained method call safeguarded with a negative nil check for the object 174s behaves like safe guarding logical break keywords 174s allows a method call being passed to break safe guarded by an object check 174s behaves like safe guarding logical break keywords 174s allows a method call being passed to fail safe guarded by an object check 174s behaves like safe guarding logical break keywords 174s allows a method call being passed to throw safe guarded by an object check 174s behaves like safe guarding logical break keywords 174s allows a method call being passed to yield safe guarded by an object check 174s behaves like safe guarding logical break keywords 174s allows a method call being passed to next safe guarded by an object check 174s behaves like safe guarding logical break keywords 174s allows a method call being passed to return safe guarded by an object check 174s behaves like safe guarding logical break keywords 174s allows a method call being passed to raise safe guarded by an object check 174s if expression 174s only moves comments that fall within the expression 174s allows a single method call inside of a check for the object with an else 174s registers an offense for a single method call with params and a block inside of an unless nil check for the object 174s registers an offense for a single method call inside of an unless negative check for the object 174s registers an offense for a single method call with a block inside of a non-nil check for the object 174s registers an offense for a single method call with a block inside of a check for the object 174s registers an offense for a single method call with params inside of an unless negative check for the object 174s registers an offense for a single method call inside of a non-nil check for the object 174s registers an offense for a single method call with params and a block inside of an unless negative check for the object 174s does not lose comments within if expression 174s registers an offense for a single method call inside of an unless nil check for the object 174s registers an offense for a single method call with a block inside of an unless negative check for the object 174s registers an offense for a single method call with params inside of an unless nil check for the object 174s registers an offense for a single method call with params inside of a non-nil check for the object 174s registers an offense for a single method call with params inside of a check for the object 174s registers an offense for a single method call inside of a check for the object 174s registers an offense for a single method call with a block inside of an unless nil check for the object 174s registers an offense for a single method call with params and a block inside of a non-nil check for the object 174s registers an offense for a single method call with params and a block inside of a check for the object 174s ternary expression 174s allows ternary expression 174s object check before method call 174s allows a non object check followed by a method call with params 174s allows a non object check followed by a method call 174s allows a nil object check followed by a method call with params and a block 174s allows a nil object check followed by a method call with a block 174s allows a non object check followed by a method call with a block 174s allows a nil object check followed by a method call with params 174s allows a nil object check followed by a method call 174s allows a non object check followed by a method call with params and a block 174s ConvertCodeThatCanStartToReturnNil true 174s registers an offense for an object check followed by a method call with a block 174s registers an offense for an object check followed by a method call 174s registers an offense for a non-nil object check followed by a method call with a block 174s registers an offense for a check for the object followed by a method call in the condition for an if expression 174s registers an offense for an object check followed by a method call with params and a block 174s registers an offense for a non-nil object check followed by a method call with params and a block 174s corrects an object check followed by a method call and another check 174s registers an offense for a non-nil object check followed by a method call 174s registers an offense for an object check followed by a method call with params 174s registers an offense for a non-nil object check followed by a method call with params 174s method chaining 174s registers an offense for an object check followed by chained method calls with blocks 174s MaxChainLength: 3 174s allows an object check followed by 4 chained method calls 174s registers an offense for an object check followed by 3 chained method calls 174s with Lint/SafeNavigationChain disabled 174s allows an object check followed by chained method calls 174s allows an object check followed by chained method calls with blocks 174s MaxChainLength: 1 174s allows an object check followed by 2 chained method calls 174s registers an offense for an object check followed by 1 chained method calls 174s ConvertCodeThatCanStartToReturnNil false 174s registers an offense for an object check followed by a method calls that nil responds to 174s registers an offense for an object check followed by a method call 174s registers an offense for an object check followed by a method call with params and a block 174s allows a non-nil object check followed by a method call with params and a block 174s allows a non-nil object check followed by a method call with params 174s registers an offense for a check for the object followed by a method call in the condition for an if expression 174s allows a non-nil object check followed by a method call 174s allows a non-nil object check followed by a method call with a block 174s registers an offense for an object check followed by a method call with a block 174s registers an offense for an object check followed by a method call with params 174s method chaining 174s corrects an object check followed by a chained method call with params 174s corrects an object check followed by a chained method call 174s corrects an object check followed by a chained method call with a symbol proc 174s corrects an object check followed by a chained method call with a block 174s behaves like all variable types 174s if expression 174s registers an offense for a single method call with params and a block inside of an unless nil check for the object 174s registers an offense for a single method call with params inside of an unless negative check for the object 174s registers an offense for a single method call inside of a check for the object 174s registers an offense for a single method call inside of an unless negative check for the object 174s registers an offense for a single method call with params inside of a check for the object 174s registers an offense for a single method call with a block inside of a check for the object 174s registers an offense for a single method call with params inside of an unless nil check for the object 174s registers an offense for a single method call inside of a non-nil check for the object 174s registers an offense for a single method call with params and a block inside of an unless negative check for the object 174s does not lose comments within if expression 174s registers an offense for a single method call with a block inside of an unless nil check for the object 174s registers an offense for a single method call inside of an unless nil check for the object 174s registers an offense for a single method call with params and a block inside of a check for the object 174s registers an offense for a single method call with params and a block inside of a non-nil check for the object 174s allows a single method call inside of a check for the object with an else 174s only moves comments that fall within the expression 174s registers an offense for a single method call with a block inside of an unless negative check for the object 174s registers an offense for a single method call with params inside of a non-nil check for the object 174s registers an offense for a single method call with a block inside of a non-nil check for the object 174s ternary expression 174s allows ternary expression 174s object check before method call 174s allows a nil object check followed by a method call with params 174s allows a non object check followed by a method call with params and a block 174s allows a non object check followed by a method call 174s allows a non object check followed by a method call with params 174s allows a nil object check followed by a method call 174s allows a nil object check followed by a method call with a block 174s allows a non object check followed by a method call with a block 174s allows a nil object check followed by a method call with params and a block 174s ConvertCodeThatCanStartToReturnNil true 174s registers an offense for an object check followed by a method call with a block 174s registers an offense for an object check followed by a method call with params 174s registers an offense for a non-nil object check followed by a method call with params 174s registers an offense for a non-nil object check followed by a method call with params and a block 174s registers an offense for a check for the object followed by a method call in the condition for an if expression 174s registers an offense for an object check followed by a method call with params and a block 174s registers an offense for an object check followed by a method call 174s corrects an object check followed by a method call and another check 174s registers an offense for a non-nil object check followed by a method call 174s registers an offense for a non-nil object check followed by a method call with a block 174s method chaining 174s registers an offense for an object check followed by chained method calls with blocks 174s MaxChainLength: 3 174s allows an object check followed by 4 chained method calls 174s registers an offense for an object check followed by 3 chained method calls 174s with Lint/SafeNavigationChain disabled 174s allows an object check followed by chained method calls with blocks 174s allows an object check followed by chained method calls 174s MaxChainLength: 1 174s registers an offense for an object check followed by 1 chained method calls 174s allows an object check followed by 2 chained method calls 174s ConvertCodeThatCanStartToReturnNil false 174s registers an offense for a check for the object followed by a method call in the condition for an if expression 174s registers an offense for an object check followed by a method calls that nil responds to 174s registers an offense for an object check followed by a method call with params and a block 174s allows a non-nil object check followed by a method call with a block 174s registers an offense for an object check followed by a method call 174s registers an offense for an object check followed by a method call with params 174s allows a non-nil object check followed by a method call with params and a block 174s allows a non-nil object check followed by a method call with params 174s registers an offense for an object check followed by a method call with a block 174s allows a non-nil object check followed by a method call 174s method chaining 174s corrects an object check followed by a chained method call with a symbol proc 174s corrects an object check followed by a chained method call 174s corrects an object check followed by a chained method call with a block 174s corrects an object check followed by a chained method call with params 174s modifier if 174s registers an offense for a method call with params safeguarded with a negative check for the object 174s registers an offense for a method call with params safeguarded with a negative nil check for the object 174s registers an offense for a method call on an accessor safeguarded by a check for the accessed variable 174s registers an offense for a method call with params and a block safeguarded with a negative check for the object 174s registers an offense for a method call with params and a block safeguarded with a check for the object 174s registers an offense for a method call safeguarded with a negative nil check for the object 174s registers an offense for a chained method call safeguarded with an unless nil check for the object 174s registers an offense for a method call with params and a block safeguarded with a negative nil check for the object 174s registers an offense when safe guard check and safe navigation method call are connected with `&&` condition 174s registers an offense for a method call that nil responds to safe guarded by an object check 174s registers an offense for a method call with params and a block safeguarded with a nil check for the object 174s registers an offense for a method call with a block safeguarded with a check for the object 174s registers an offense for a method call safeguarded with a negative check for the object 174s registers an offense for a method call with a block safeguarded with a negative nil check for the object 174s registers an offense for a chained method call safeguarded with a check for the object 174s registers an offense for a method call with a block safeguarded with a nil check for the object 174s registers an offense for a chained method call safeguarded with a negative nil check for the object 174s registers an offense for a method call with params safeguarded with a check for the object 174s registers an offense for an object check followed by a method call with a comment at EOL 174s registers an offense for a method call with a block safeguarded with a negative check for the object 174s registers an offense for a method call with params safeguarded with a nil check for the object 174s registers an offense for a method call safeguarded with a nil check for the object 174s registers an offense for a method call safeguarded with a check for the object 174s behaves like safe guarding logical break keywords 174s allows a method call being passed to next safe guarded by an object check 174s behaves like safe guarding logical break keywords 174s allows a method call being passed to throw safe guarded by an object check 174s behaves like safe guarding logical break keywords 174s allows a method call being passed to break safe guarded by an object check 174s behaves like safe guarding logical break keywords 174s allows a method call being passed to fail safe guarded by an object check 174s behaves like safe guarding logical break keywords 174s allows a method call being passed to yield safe guarded by an object check 174s behaves like safe guarding logical break keywords 174s allows a method call being passed to return safe guarded by an object check 174s behaves like safe guarding logical break keywords 174s allows a method call being passed to raise safe guarded by an object check 174s when Ruby <= 2.2 174s does not register an offense when a method call that nil responds to safe guarded by an object check 174s behaves like all variable types 174s if expression 174s registers an offense for a single method call with params and a block inside of an unless negative check for the object 174s registers an offense for a single method call inside of a check for the object 174s registers an offense for a single method call with params inside of an unless nil check for the object 174s allows a single method call inside of a check for the object with an else 174s registers an offense for a single method call with params and a block inside of a non-nil check for the object 174s registers an offense for a single method call inside of an unless negative check for the object 174s registers an offense for a single method call with params and a block inside of a check for the object 174s registers an offense for a single method call with a block inside of an unless nil check for the object 174s registers an offense for a single method call with params inside of an unless negative check for the object 174s registers an offense for a single method call inside of an unless nil check for the object 174s registers an offense for a single method call with params inside of a non-nil check for the object 174s registers an offense for a single method call inside of a non-nil check for the object 174s does not lose comments within if expression 174s registers an offense for a single method call with a block inside of a non-nil check for the object 174s only moves comments that fall within the expression 174s registers an offense for a single method call with params and a block inside of an unless nil check for the object 174s registers an offense for a single method call with params inside of a check for the object 174s registers an offense for a single method call with a block inside of an unless negative check for the object 174s registers an offense for a single method call with a block inside of a check for the object 174s ternary expression 174s allows ternary expression 174s object check before method call 174s allows a non object check followed by a method call with params 174s allows a non object check followed by a method call with params and a block 174s allows a nil object check followed by a method call 174s allows a non object check followed by a method call with a block 174s allows a nil object check followed by a method call with a block 174s allows a nil object check followed by a method call with params 174s allows a non object check followed by a method call 174s allows a nil object check followed by a method call with params and a block 174s ConvertCodeThatCanStartToReturnNil true 174s registers an offense for a non-nil object check followed by a method call with params 174s registers an offense for an object check followed by a method call 174s registers an offense for a check for the object followed by a method call in the condition for an if expression 174s registers an offense for an object check followed by a method call with params and a block 174s registers an offense for an object check followed by a method call with params 174s registers an offense for a non-nil object check followed by a method call 174s corrects an object check followed by a method call and another check 174s registers an offense for a non-nil object check followed by a method call with a block 174s registers an offense for a non-nil object check followed by a method call with params and a block 174s registers an offense for an object check followed by a method call with a block 174s method chaining 174s registers an offense for an object check followed by chained method calls with blocks 174s MaxChainLength: 1 174s allows an object check followed by 2 chained method calls 174s registers an offense for an object check followed by 1 chained method calls 174s MaxChainLength: 3 174s registers an offense for an object check followed by 3 chained method calls 174s allows an object check followed by 4 chained method calls 174s with Lint/SafeNavigationChain disabled 174s allows an object check followed by chained method calls with blocks 174s allows an object check followed by chained method calls 174s ConvertCodeThatCanStartToReturnNil false 174s registers an offense for a check for the object followed by a method call in the condition for an if expression 174s registers an offense for an object check followed by a method call 174s allows a non-nil object check followed by a method call with params 174s registers an offense for an object check followed by a method call with params 174s registers an offense for an object check followed by a method call with params and a block 174s registers an offense for an object check followed by a method calls that nil responds to 174s registers an offense for an object check followed by a method call with a block 174s allows a non-nil object check followed by a method call with params and a block 174s allows a non-nil object check followed by a method call 174s allows a non-nil object check followed by a method call with a block 174s method chaining 174s corrects an object check followed by a chained method call with a symbol proc 174s corrects an object check followed by a chained method call with a block 174s corrects an object check followed by a chained method call 174s corrects an object check followed by a chained method call with params 174s modifier if 174s registers an offense for a chained method call safeguarded with an unless nil check for the object 174s registers an offense for an object check followed by a method call with a comment at EOL 174s registers an offense for a method call safeguarded with a negative nil check for the object 174s registers an offense for a method call safeguarded with a check for the object 174s registers an offense for a method call with params and a block safeguarded with a check for the object 174s registers an offense for a method call with params and a block safeguarded with a nil check for the object 174s registers an offense for a method call safeguarded with a nil check for the object 174s registers an offense for a method call with a block safeguarded with a check for the object 174s registers an offense for a method call that nil responds to safe guarded by an object check 174s registers an offense when safe guard check and safe navigation method call are connected with `&&` condition 174s registers an offense for a method call with a block safeguarded with a nil check for the object 174s registers an offense for a method call with params safeguarded with a nil check for the object 174s registers an offense for a method call with params and a block safeguarded with a negative nil check for the object 174s registers an offense for a method call safeguarded with a negative check for the object 174s registers an offense for a method call with params safeguarded with a negative nil check for the object 174s registers an offense for a method call with a block safeguarded with a negative check for the object 174s registers an offense for a method call with a block safeguarded with a negative nil check for the object 174s registers an offense for a chained method call safeguarded with a negative nil check for the object 174s registers an offense for a method call on an accessor safeguarded by a check for the accessed variable 174s registers an offense for a method call with params safeguarded with a negative check for the object 174s registers an offense for a method call with params and a block safeguarded with a negative check for the object 174s registers an offense for a method call with params safeguarded with a check for the object 174s registers an offense for a chained method call safeguarded with a check for the object 174s behaves like safe guarding logical break keywords 174s allows a method call being passed to yield safe guarded by an object check 174s behaves like safe guarding logical break keywords 174s allows a method call being passed to throw safe guarded by an object check 174s behaves like safe guarding logical break keywords 174s allows a method call being passed to next safe guarded by an object check 174s behaves like safe guarding logical break keywords 174s allows a method call being passed to raise safe guarded by an object check 174s behaves like safe guarding logical break keywords 174s allows a method call being passed to break safe guarded by an object check 174s behaves like safe guarding logical break keywords 174s allows a method call being passed to return safe guarded by an object check 174s behaves like safe guarding logical break keywords 174s allows a method call being passed to fail safe guarded by an object check 174s behaves like all variable types 174s if expression 174s registers an offense for a single method call with params and a block inside of an unless nil check for the object 174s registers an offense for a single method call with params inside of a non-nil check for the object 174s allows a single method call inside of a check for the object with an else 174s registers an offense for a single method call inside of an unless negative check for the object 174s registers an offense for a single method call with a block inside of an unless nil check for the object 174s registers an offense for a single method call with a block inside of a non-nil check for the object 174s registers an offense for a single method call inside of a non-nil check for the object 174s registers an offense for a single method call with params inside of a check for the object 174s registers an offense for a single method call with params inside of an unless negative check for the object 174s only moves comments that fall within the expression 174s does not lose comments within if expression 174s registers an offense for a single method call with params inside of an unless nil check for the object 174s registers an offense for a single method call with params and a block inside of a non-nil check for the object 174s registers an offense for a single method call inside of a check for the object 174s registers an offense for a single method call with params and a block inside of an unless negative check for the object 174s registers an offense for a single method call with a block inside of an unless negative check for the object 174s registers an offense for a single method call with params and a block inside of a check for the object 174s registers an offense for a single method call inside of an unless nil check for the object 174s registers an offense for a single method call with a block inside of a check for the object 174s ternary expression 174s allows ternary expression 174s object check before method call 174s allows a non object check followed by a method call with params and a block 174s allows a non object check followed by a method call with params 174s allows a nil object check followed by a method call 174s allows a nil object check followed by a method call with params 174s allows a non object check followed by a method call 174s allows a non object check followed by a method call with a block 174s allows a nil object check followed by a method call with params and a block 174s allows a nil object check followed by a method call with a block 174s ConvertCodeThatCanStartToReturnNil false 175s registers an offense for an object check followed by a method call with a block 175s registers an offense for a check for the object followed by a method call in the condition for an if expression 175s registers an offense for an object check followed by a method call 175s registers an offense for an object check followed by a method calls that nil responds to 175s allows a non-nil object check followed by a method call with params and a block 175s allows a non-nil object check followed by a method call with a block 175s allows a non-nil object check followed by a method call 175s registers an offense for an object check followed by a method call with params and a block 175s registers an offense for an object check followed by a method call with params 175s allows a non-nil object check followed by a method call with params 175s method chaining 175s corrects an object check followed by a chained method call 175s corrects an object check followed by a chained method call with a block 175s corrects an object check followed by a chained method call with a symbol proc 175s corrects an object check followed by a chained method call with params 175s ConvertCodeThatCanStartToReturnNil true 175s registers an offense for a check for the object followed by a method call in the condition for an if expression 175s registers an offense for a non-nil object check followed by a method call with params 175s registers an offense for an object check followed by a method call with a block 175s registers an offense for an object check followed by a method call 175s registers an offense for a non-nil object check followed by a method call with params and a block 175s registers an offense for an object check followed by a method call with params 175s corrects an object check followed by a method call and another check 175s registers an offense for a non-nil object check followed by a method call with a block 175s registers an offense for a non-nil object check followed by a method call 175s registers an offense for an object check followed by a method call with params and a block 175s method chaining 175s registers an offense for an object check followed by chained method calls with blocks 175s MaxChainLength: 1 175s registers an offense for an object check followed by 1 chained method calls 175s allows an object check followed by 2 chained method calls 175s with Lint/SafeNavigationChain disabled 175s allows an object check followed by chained method calls 175s allows an object check followed by chained method calls with blocks 175s MaxChainLength: 3 175s allows an object check followed by 4 chained method calls 175s registers an offense for an object check followed by 3 chained method calls 175s modifier if 175s registers an offense for a chained method call safeguarded with a check for the object 175s registers an offense for a method call with params safeguarded with a nil check for the object 175s registers an offense for a method call with a block safeguarded with a nil check for the object 175s registers an offense for a method call on an accessor safeguarded by a check for the accessed variable 175s registers an offense for a method call with a block safeguarded with a negative nil check for the object 175s registers an offense for a method call safeguarded with a check for the object 175s registers an offense for a chained method call safeguarded with a negative nil check for the object 175s registers an offense for a method call with params safeguarded with a check for the object 175s registers an offense for an object check followed by a method call with a comment at EOL 175s registers an offense for a method call with params safeguarded with a negative nil check for the object 175s registers an offense for a method call with a block safeguarded with a negative check for the object 175s registers an offense for a method call with params safeguarded with a negative check for the object 175s registers an offense for a method call with params and a block safeguarded with a negative check for the object 175s registers an offense for a method call that nil responds to safe guarded by an object check 175s registers an offense for a method call safeguarded with a negative nil check for the object 175s registers an offense for a method call with params and a block safeguarded with a check for the object 175s registers an offense for a method call with params and a block safeguarded with a nil check for the object 175s registers an offense for a method call with params and a block safeguarded with a negative nil check for the object 175s registers an offense for a method call safeguarded with a nil check for the object 175s registers an offense for a method call safeguarded with a negative check for the object 175s registers an offense for a method call with a block safeguarded with a check for the object 175s registers an offense for a chained method call safeguarded with an unless nil check for the object 175s registers an offense when safe guard check and safe navigation method call are connected with `&&` condition 175s behaves like safe guarding logical break keywords 175s allows a method call being passed to fail safe guarded by an object check 175s behaves like safe guarding logical break keywords 175s allows a method call being passed to next safe guarded by an object check 175s behaves like safe guarding logical break keywords 175s allows a method call being passed to return safe guarded by an object check 175s behaves like safe guarding logical break keywords 175s allows a method call being passed to break safe guarded by an object check 175s behaves like safe guarding logical break keywords 175s allows a method call being passed to yield safe guarded by an object check 175s behaves like safe guarding logical break keywords 175s allows a method call being passed to throw safe guarded by an object check 175s behaves like safe guarding logical break keywords 175s allows a method call being passed to raise safe guarded by an object check 175s 175s RuboCop::Cop::Style::Sample 175s behaves like offense 175s registers an offense for shuffle[0..3] 175s behaves like accepts 175s accepts shuffle.slice(foo..3) 175s behaves like accepts 175s accepts shuffle.slice(foo, bar) 175s behaves like offense 175s registers an offense for shuffle(random: Random.new).first(2) 175s behaves like offense 175s registers an offense for shuffle[0, 3] 175s behaves like offense 175s registers an offense for shuffle.at(0) 175s behaves like offense 175s registers an offense for shuffle(random: Random.new).first 175s behaves like offense 175s registers an offense for shuffle(random: foo).last(bar) 175s behaves like accepts 175s accepts shuffle.slice(2..3) 175s behaves like offense 175s registers an offense for shuffle.slice(0..3) 175s behaves like offense 175s registers an offense for shuffle.first(foo) 175s behaves like accepts 175s accepts shuffle.slice(3, 3) 175s behaves like accepts 175s accepts shuffle.slice(2) 175s behaves like offense 175s registers an offense for shuffle.last(bar) 175s behaves like offense 175s registers an offense for shuffle.first(2) 175s behaves like accepts 175s accepts shuffle(random: Random.new)[2, 3] 175s behaves like accepts 175s accepts shuffle.at(foo) 175s behaves like accepts 175s accepts shuffle.slice(2..-3) 175s behaves like offense 175s registers an offense for shuffle[0] 175s behaves like offense 175s registers an offense for shuffle.last 175s behaves like offense 175s registers an offense for shuffle.slice(0, 3) 175s behaves like accepts 175s accepts shuffle.slice(foo, 3) 175s behaves like accepts 175s accepts shuffle[foo] 175s behaves like accepts 175s accepts sample 175s behaves like offense 175s registers an offense for shuffle.slice(-1) 175s behaves like accepts 175s accepts shuffle[3, 3] 175s behaves like accepts 175s accepts shuffle(random: Random.new) 175s behaves like offense 175s registers an offense for shuffle[0...3] 175s behaves like accepts 175s accepts shuffle[-4..-3] 175s behaves like accepts 175s accepts shuffle[foo, 3] 175s behaves like accepts 175s accepts shuffle.slice(foo..bar) 175s Ruby >= 2.7 175s behaves like offense 175s registers an offense for shuffle[...3] 175s behaves like offense 175s registers an offense for shuffle(random: Random.new)[0..3] 175s behaves like accepts 175s accepts shuffle[foo..bar] 175s behaves like accepts 175s accepts shuffle.at(2) 175s behaves like accepts 175s accepts shuffle[foo..3] 175s behaves like accepts 175s accepts shuffle[foo, bar] 175s behaves like offense 175s registers an offense for shuffle.first 175s behaves like accepts 175s accepts shuffle[2..3] 175s behaves like accepts 175s accepts shuffle.map { |e| e } 175s behaves like accepts 175s accepts shuffle 175s Ruby >= 2.6 175s behaves like accepts 175s accepts shuffle[3..] 175s behaves like accepts 175s accepts shuffle[3...] 175s behaves like accepts 175s accepts shuffle[2..-3] 175s behaves like offense 175s registers an offense for shuffle.slice(0...3) 175s behaves like accepts 175s accepts shuffle.slice(-4..-3) 175s behaves like accepts 175s accepts shuffle[2] 175s behaves like accepts 175s accepts shuffle.join([5, 6, 7]) 175s behaves like offense 175s registers an offense for shuffle[-1] 175s behaves like accepts 175s accepts shuffle(random: Random.new)[2] 175s behaves like offense 175s registers an offense for shuffle.last(3) 175s behaves like offense 175s registers an offense for shuffle.slice(0) 175s behaves like accepts 175s accepts shuffle.slice(foo) 175s behaves like accepts 175s accepts shuffle(random: Random.new).find(&:odd?) 175s behaves like offense 175s registers an offense for shuffle.at(-1) 175s 175s RuboCop::Cop::Lint::UnreachableLoop 175s does not register an offense when using `return do_something(value) || next` in a loop 175s does not register an offense when using `return do_something(value) || redo` in a loop 175s does not register an offense when branch includes continue statement preceding break statement 175s registers an offense when using `return do_something(value) || break` in a loop 175s handles inner loops 175s with AllowedPatterns 175s with a ignored method call 175s does not register an offense 175s with a non ignored method call 175s registers an offense 175s Ruby 2.7 175s registers an offense 175s without preceding continue statements 175s does not register an offense when using `if-elsif-else` and not all branches are breaking 175s registers an offense when using `break` 175s does not register an offense when using `if` without `else` 175s registers an offense when using `if-else` with all break branches 175s registers an offense when using `case-when-else` with all break branches 175s does not register an offense when using `case` without `else` 175s does not register an offense when using `case-when-else` and not all branches are breaking 175s with preceding continue statements 175s does not register an offense when using `break` 175s does not register an offense when using `if-else` with all break branches 175s does not register an offense when using `case-when-else` with all break branches 175s Ruby 2.7 175s registers an offense when using `return do_something(value) || break` in a loop 175s with an enumerator method 175s in the middle of a method chain 175s does not register an offense 175s not chained 175s registers an offense 175s as the last item in a method chain 175s registers an offense 175s 175s RuboCop::Cop::Style::ConditionalAssignment 175s IncludeTernaryExpressions false 175s allows assigning any variable type to ternary 175s SingleLineConditionsOnly false 175s corrects assignment to a multiline if elsif else condition 175s corrects assignment to an unless else condition 175s corrects assignment to a multiline if else condition 175s corrects assignment to an if elsif else with multiple elsifs 175s corrects assignment to a case when else condition 175s corrects assignment to a case when else with multiple whens 175s behaves like multiline all assignment types offense 175s any assignment to a multiline unless else 175s any assignment to a multiline if else 175s any assignment to a multiline case when 175s behaves like all variable types 175s does not crash for rescue assignment 175s registers an offense assigning any variable type to ternary 175s registers an offense assigning any variable type to if else 175s registers an offense assigning any variable type to unless else 175s registers an offense for assigning any variable type to case when 175s registers an offense assigning any variable type to if elsif else 175s registers an offense assigning any variable type to if elsewith multiple assignment 175s allows assignment to if without else 175s >= Ruby 2.7 175s registers an offense for assigning any variable type to case in 175s behaves like all assignment types 175s registers an offense for any assignment to ternary 175s registers an offense any assignment to if else 175s allows any assignment to if without else 175s does not crash when used inside rescue 175s registers an offense any assignment to case when 175s registers an offense for any assignment to unless else 175s behaves like all assignment types 175s does not crash when used inside rescue 175s registers an offense for any assignment to unless else 175s registers an offense any assignment to if else 175s allows any assignment to if without else 175s registers an offense any assignment to case when 175s registers an offense for any assignment to ternary 175s behaves like single line condition autocorrect 175s corrects assignment to a case when else with multiple whens 175s corrects assignment to a case when else condition 175s corrects assignment to a ternary operator 175s corrects assignment to an unless else condition 175s corrects assignment to an if elsif else condition 175s corrects assignment to an if else condition 175s corrects assignment to an if elsif else with multiple elsifs 175s behaves like multiline all variable types offense 175s assigning any variable type to a multiline case when 175s assigning any variable type to a multiline unless else 175s assigning any variable type to a multiline if elsif else 175s assigning any variable type to an if else with multiline in one branch 175s assigning any variable type to a multiline if else 175s behaves like multiline all assignment types offense 175s any assignment to a multiline if else 175s any assignment to a multiline unless else 175s any assignment to a multiline case when 175s behaves like multiline all assignment types offense 175s any assignment to a multiline if else 175s any assignment to a multiline case when 175s any assignment to a multiline unless else 175s behaves like all assignment types 175s registers an offense for any assignment to ternary 175s registers an offense for any assignment to unless else 175s registers an offense any assignment to case when 175s does not crash when used inside rescue 175s allows any assignment to if without else 175s registers an offense any assignment to if else 175s behaves like multiline all assignment types offense 175s any assignment to a multiline unless else 175s any assignment to a multiline if else 175s any assignment to a multiline case when 175s behaves like all assignment types 175s registers an offense any assignment to if else 175s registers an offense for any assignment to ternary 175s allows any assignment to if without else 175s registers an offense for any assignment to unless else 175s does not crash when used inside rescue 175s registers an offense any assignment to case when 175s behaves like all variable types 175s registers an offense assigning any variable type to if elsewith multiple assignment 175s registers an offense assigning any variable type to if else 175s allows assignment to if without else 175s registers an offense for assigning any variable type to case when 175s registers an offense assigning any variable type to ternary 175s registers an offense assigning any variable type to unless else 175s does not crash for rescue assignment 175s registers an offense assigning any variable type to if elsif else 175s >= Ruby 2.7 175s registers an offense for assigning any variable type to case in 175s behaves like all assignment types 175s registers an offense any assignment to if else 175s registers an offense for any assignment to ternary 175s registers an offense for any assignment to unless else 175s allows any assignment to if without else 175s does not crash when used inside rescue 175s registers an offense any assignment to case when 175s behaves like multiline all variable types offense 175s assigning any variable type to a multiline if elsif else 175s assigning any variable type to a multiline unless else 175s assigning any variable type to an if else with multiline in one branch 175s assigning any variable type to a multiline if else 175s assigning any variable type to a multiline case when 175s behaves like all variable types 175s registers an offense assigning any variable type to if else 175s registers an offense assigning any variable type to unless else 175s does not crash for rescue assignment 175s registers an offense assigning any variable type to if elsewith multiple assignment 175s allows assignment to if without else 175s registers an offense assigning any variable type to if elsif else 175s registers an offense for assigning any variable type to case when 175s registers an offense assigning any variable type to ternary 175s >= Ruby 2.7 175s registers an offense for assigning any variable type to case in 175s behaves like all assignment types 175s registers an offense any assignment to case when 175s registers an offense for any assignment to ternary 175s registers an offense any assignment to if else 175s registers an offense for any assignment to unless else 175s does not crash when used inside rescue 175s allows any assignment to if without else 175s behaves like all assignment types 175s registers an offense for any assignment to unless else 175s allows any assignment to if without else 175s registers an offense for any assignment to ternary 175s registers an offense any assignment to case when 175s registers an offense any assignment to if else 175s does not crash when used inside rescue 175s behaves like all assignment types 175s does not crash when used inside rescue 175s registers an offense any assignment to case when 175s registers an offense any assignment to if else 175s allows any assignment to if without else 175s registers an offense for any assignment to unless else 175s registers an offense for any assignment to ternary 175s behaves like all assignment types 175s registers an offense any assignment to case when 175s allows any assignment to if without else 175s registers an offense any assignment to if else 175s does not crash when used inside rescue 175s registers an offense for any assignment to unless else 175s registers an offense for any assignment to ternary 175s behaves like multiline all variable types offense 175s assigning any variable type to a multiline case when 175s assigning any variable type to an if else with multiline in one branch 175s assigning any variable type to a multiline if elsif else 175s assigning any variable type to a multiline unless else 175s assigning any variable type to a multiline if else 175s behaves like multiline all assignment types offense 175s any assignment to a multiline unless else 175s any assignment to a multiline if else 175s any assignment to a multiline case when 175s behaves like multiline all assignment types offense 175s any assignment to a multiline case when 175s any assignment to a multiline unless else 175s any assignment to a multiline if else 175s behaves like multiline all assignment types offense 175s any assignment to a multiline case when 175s any assignment to a multiline if else 175s any assignment to a multiline unless else 175s behaves like multiline all assignment types offense 175s any assignment to a multiline unless else 176s any assignment to a multiline if else 176s any assignment to a multiline case when 176s behaves like multiline all assignment types offense 176s any assignment to a multiline unless else 176s any assignment to a multiline case when 176s any assignment to a multiline if else 176s behaves like all variable types 176s registers an offense assigning any variable type to ternary 176s registers an offense assigning any variable type to if else 176s registers an offense assigning any variable type to unless else 176s does not crash for rescue assignment 176s registers an offense assigning any variable type to if elsif else 176s registers an offense for assigning any variable type to case when 176s allows assignment to if without else 176s registers an offense assigning any variable type to if elsewith multiple assignment 176s >= Ruby 2.7 176s registers an offense for assigning any variable type to case in 176s behaves like all assignment types 176s registers an offense for any assignment to unless else 176s registers an offense any assignment to if else 176s does not crash when used inside rescue 176s registers an offense for any assignment to ternary 176s registers an offense any assignment to case when 176s allows any assignment to if without else 176s behaves like all variable types 176s registers an offense assigning any variable type to ternary 176s does not crash for rescue assignment 176s registers an offense for assigning any variable type to case when 176s registers an offense assigning any variable type to if else 176s registers an offense assigning any variable type to if elsewith multiple assignment 176s registers an offense assigning any variable type to if elsif else 176s registers an offense assigning any variable type to unless else 176s allows assignment to if without else 176s >= Ruby 2.7 176s registers an offense for assigning any variable type to case in 176s behaves like all assignment types 176s registers an offense any assignment to case when 176s allows any assignment to if without else 176s registers an offense for any assignment to unless else 176s does not crash when used inside rescue 176s registers an offense any assignment to if else 176s registers an offense for any assignment to ternary 176s behaves like all assignment types 176s registers an offense for any assignment to unless else 176s registers an offense any assignment to if else 176s registers an offense any assignment to case when 176s does not crash when used inside rescue 176s allows any assignment to if without else 176s registers an offense for any assignment to ternary 176s behaves like multiline all assignment types offense 176s any assignment to a multiline case when 176s any assignment to a multiline unless else 176s any assignment to a multiline if else 176s behaves like multiline all assignment types offense 176s any assignment to a multiline if else 176s any assignment to a multiline unless else 176s any assignment to a multiline case when 176s behaves like multiline all assignment types offense 176s any assignment to a multiline unless else 176s any assignment to a multiline case when 176s any assignment to a multiline if else 176s behaves like all assignment types 176s registers an offense for any assignment to ternary 176s registers an offense any assignment to case when 176s allows any assignment to if without else 176s registers an offense for any assignment to unless else 176s does not crash when used inside rescue 176s registers an offense any assignment to if else 176s behaves like multiline all variable types offense 176s assigning any variable type to a multiline unless else 176s assigning any variable type to an if else with multiline in one branch 176s assigning any variable type to a multiline case when 176s assigning any variable type to a multiline if else 176s assigning any variable type to a multiline if elsif else 176s behaves like all assignment types 176s registers an offense any assignment to if else 176s does not crash when used inside rescue 176s registers an offense for any assignment to ternary 176s registers an offense for any assignment to unless else 176s registers an offense any assignment to case when 176s allows any assignment to if without else 176s behaves like multiline all variable types offense 176s assigning any variable type to a multiline if elsif else 176s assigning any variable type to an if else with multiline in one branch 176s assigning any variable type to a multiline unless else 176s assigning any variable type to a multiline if else 176s assigning any variable type to a multiline case when 176s behaves like multiline all assignment types offense 176s any assignment to a multiline case when 176s any assignment to a multiline if else 176s any assignment to a multiline unless else 176s behaves like all variable types 176s registers an offense assigning any variable type to if elsewith multiple assignment 176s registers an offense assigning any variable type to if elsif else 176s registers an offense assigning any variable type to unless else 176s registers an offense assigning any variable type to ternary 176s registers an offense for assigning any variable type to case when 176s allows assignment to if without else 176s registers an offense assigning any variable type to if else 176s does not crash for rescue assignment 176s >= Ruby 2.7 176s registers an offense for assigning any variable type to case in 176s behaves like multiline all assignment types offense 176s any assignment to a multiline unless else 176s any assignment to a multiline if else 176s any assignment to a multiline case when 176s behaves like multiline all assignment types offense 176s any assignment to a multiline case when 176s any assignment to a multiline unless else 176s any assignment to a multiline if else 176s behaves like multiline all assignment types offense 176s any assignment to a multiline if else 176s any assignment to a multiline unless else 176s any assignment to a multiline case when 176s behaves like all assignment types 176s registers an offense any assignment to case when 176s registers an offense for any assignment to ternary 176s registers an offense any assignment to if else 176s registers an offense for any assignment to unless else 176s does not crash when used inside rescue 176s allows any assignment to if without else 176s behaves like multiline all assignment types offense 176s any assignment to a multiline if else 176s any assignment to a multiline case when 176s any assignment to a multiline unless else 176s behaves like multiline all variable types offense 176s assigning any variable type to a multiline if else 176s assigning any variable type to a multiline if elsif else 176s assigning any variable type to an if else with multiline in one branch 176s assigning any variable type to a multiline unless else 176s assigning any variable type to a multiline case when 176s behaves like all variable types 176s does not crash for rescue assignment 176s registers an offense for assigning any variable type to case when 176s registers an offense assigning any variable type to ternary 176s registers an offense assigning any variable type to if elsif else 176s registers an offense assigning any variable type to if else 176s registers an offense assigning any variable type to unless else 176s registers an offense assigning any variable type to if elsewith multiple assignment 176s allows assignment to if without else 176s >= Ruby 2.7 176s registers an offense for assigning any variable type to case in 176s behaves like all assignment types 176s does not crash when used inside rescue 176s registers an offense for any assignment to unless else 176s allows any assignment to if without else 176s registers an offense for any assignment to ternary 176s registers an offense any assignment to case when 176s registers an offense any assignment to if else 176s behaves like all assignment types 176s registers an offense any assignment to if else 176s registers an offense any assignment to case when 176s allows any assignment to if without else 176s registers an offense for any assignment to ternary 176s does not crash when used inside rescue 176s registers an offense for any assignment to unless else 176s behaves like multiline all variable types offense 176s assigning any variable type to a multiline unless else 176s assigning any variable type to a multiline if else 176s assigning any variable type to an if else with multiline in one branch 176s assigning any variable type to a multiline case when 176s assigning any variable type to a multiline if elsif else 176s behaves like all assignment types 176s registers an offense any assignment to if else 176s registers an offense for any assignment to unless else 176s does not crash when used inside rescue 176s registers an offense for any assignment to ternary 176s allows any assignment to if without else 176s registers an offense any assignment to case when 176s behaves like multiline all assignment types offense 176s any assignment to a multiline if else 176s any assignment to a multiline case when 176s any assignment to a multiline unless else 176s behaves like multiline all assignment types offense 176s any assignment to a multiline unless else 176s any assignment to a multiline if else 176s any assignment to a multiline case when 176s behaves like all assignment types 176s allows any assignment to if without else 176s registers an offense for any assignment to ternary 176s registers an offense for any assignment to unless else 176s registers an offense any assignment to if else 176s registers an offense any assignment to case when 176s does not crash when used inside rescue 176s SingleLineConditionsOnly true 176s registers an offense for assignment to an if then else 176s allows a method call in the subject of a ternary operator 176s corrects assignment when without `else` branch 176s corrects assignment to a namespaced constant 176s registers an offense for assignment using a method that ends with an equal sign 176s registers an offense for assignment using []= 176s registers an offense for assignment to case when then else 176s behaves like multiline all variable types allow 176s assigning any variable type to a multiline if else 176s assigning any variable type to a multiline unless else 176s assigning any variable type to an if else with multiline in one branch 176s assigning any variable type to a multiline case when 176s assigning any variable type to a multiline if elsif else 176s behaves like all assignment types 176s registers an offense for any assignment to ternary 176s allows any assignment to if without else 176s registers an offense any assignment to if else 176s does not crash when used inside rescue 176s registers an offense for any assignment to unless else 176s registers an offense any assignment to case when 176s behaves like all assignment types 176s registers an offense for any assignment to ternary 176s allows any assignment to if without else 176s registers an offense for any assignment to unless else 176s registers an offense any assignment to if else 176s does not crash when used inside rescue 176s registers an offense any assignment to case when 176s behaves like multiline all assignment types allow 176s any assignment to a multiline if else 176s any assignment to a multiline unless else 176s any assignment to a multiline case when 176s behaves like all variable types 176s registers an offense assigning any variable type to ternary 176s allows assignment to if without else 176s registers an offense assigning any variable type to unless else 176s registers an offense assigning any variable type to if elsewith multiple assignment 176s registers an offense assigning any variable type to if else 176s registers an offense assigning any variable type to if elsif else 176s registers an offense for assigning any variable type to case when 176s does not crash for rescue assignment 176s >= Ruby 2.7 176s registers an offense for assigning any variable type to case in 176s behaves like all assignment types 176s registers an offense for any assignment to unless else 176s does not crash when used inside rescue 176s registers an offense for any assignment to ternary 176s registers an offense any assignment to if else 176s allows any assignment to if without else 176s registers an offense any assignment to case when 176s behaves like all assignment types 176s registers an offense for any assignment to ternary 176s registers an offense any assignment to if else 176s registers an offense any assignment to case when 176s allows any assignment to if without else 176s does not crash when used inside rescue 176s registers an offense for any assignment to unless else 176s behaves like all assignment types 176s registers an offense any assignment to case when 176s allows any assignment to if without else 176s registers an offense any assignment to if else 176s registers an offense for any assignment to ternary 176s registers an offense for any assignment to unless else 176s does not crash when used inside rescue 176s behaves like multiline all assignment types allow 176s any assignment to a multiline if else 176s any assignment to a multiline unless else 176s any assignment to a multiline case when 176s behaves like multiline all assignment types allow 176s any assignment to a multiline if else 176s any assignment to a multiline case when 176s any assignment to a multiline unless else 176s behaves like all variable types 176s does not crash for rescue assignment 176s allows assignment to if without else 176s registers an offense assigning any variable type to ternary 176s registers an offense for assigning any variable type to case when 176s registers an offense assigning any variable type to unless else 176s registers an offense assigning any variable type to if else 176s registers an offense assigning any variable type to if elsif else 176s registers an offense assigning any variable type to if elsewith multiple assignment 176s >= Ruby 2.7 176s registers an offense for assigning any variable type to case in 176s behaves like multiline all assignment types allow 176s any assignment to a multiline unless else 176s any assignment to a multiline case when 176s any assignment to a multiline if else 176s behaves like all assignment types 176s registers an offense for any assignment to ternary 176s registers an offense for any assignment to unless else 176s does not crash when used inside rescue 176s allows any assignment to if without else 176s registers an offense any assignment to case when 176s registers an offense any assignment to if else 176s behaves like multiline all assignment types allow 176s any assignment to a multiline if else 176s any assignment to a multiline case when 176s any assignment to a multiline unless else 176s behaves like all assignment types 176s registers an offense for any assignment to ternary 176s registers an offense for any assignment to unless else 176s registers an offense any assignment to case when 176s allows any assignment to if without else 176s registers an offense any assignment to if else 176s does not crash when used inside rescue 176s behaves like multiline all assignment types allow 176s any assignment to a multiline if else 176s any assignment to a multiline unless else 176s any assignment to a multiline case when 176s behaves like multiline all variable types allow 176s assigning any variable type to an if else with multiline in one branch 176s assigning any variable type to a multiline case when 176s assigning any variable type to a multiline if elsif else 176s assigning any variable type to a multiline if else 176s assigning any variable type to a multiline unless else 176s behaves like multiline all assignment types allow 176s any assignment to a multiline case when 176s any assignment to a multiline unless else 176s any assignment to a multiline if else 176s behaves like all assignment types 176s registers an offense any assignment to case when 176s allows any assignment to if without else 176s does not crash when used inside rescue 176s registers an offense for any assignment to ternary 176s registers an offense for any assignment to unless else 176s registers an offense any assignment to if else 176s behaves like all assignment types 176s does not crash when used inside rescue 176s registers an offense for any assignment to unless else 176s registers an offense any assignment to case when 176s allows any assignment to if without else 176s registers an offense any assignment to if else 176s registers an offense for any assignment to ternary 176s behaves like all assignment types 176s does not crash when used inside rescue 176s allows any assignment to if without else 177s registers an offense for any assignment to unless else 177s registers an offense any assignment to if else 177s registers an offense for any assignment to ternary 177s registers an offense any assignment to case when 177s behaves like multiline all assignment types allow 177s any assignment to a multiline unless else 177s any assignment to a multiline case when 177s any assignment to a multiline if else 177s behaves like all assignment types 177s registers an offense for any assignment to ternary 177s does not crash when used inside rescue 177s allows any assignment to if without else 177s registers an offense any assignment to if else 177s registers an offense any assignment to case when 177s registers an offense for any assignment to unless else 177s behaves like multiline all variable types allow 177s assigning any variable type to a multiline if elsif else 177s assigning any variable type to an if else with multiline in one branch 177s assigning any variable type to a multiline case when 177s assigning any variable type to a multiline unless else 177s assigning any variable type to a multiline if else 177s behaves like all assignment types 177s registers an offense any assignment to case when 177s registers an offense for any assignment to unless else 177s registers an offense any assignment to if else 177s does not crash when used inside rescue 177s registers an offense for any assignment to ternary 177s allows any assignment to if without else 177s behaves like all assignment types 177s registers an offense for any assignment to ternary 177s does not crash when used inside rescue 177s registers an offense any assignment to if else 177s registers an offense any assignment to case when 177s allows any assignment to if without else 177s registers an offense for any assignment to unless else 177s behaves like all variable types 177s allows assignment to if without else 177s does not crash for rescue assignment 177s registers an offense assigning any variable type to unless else 177s registers an offense assigning any variable type to if elsif else 177s registers an offense assigning any variable type to if elsewith multiple assignment 177s registers an offense assigning any variable type to ternary 177s registers an offense for assigning any variable type to case when 177s registers an offense assigning any variable type to if else 177s >= Ruby 2.7 177s registers an offense for assigning any variable type to case in 177s behaves like all assignment types 177s registers an offense any assignment to case when 177s allows any assignment to if without else 177s registers an offense any assignment to if else 177s registers an offense for any assignment to unless else 177s does not crash when used inside rescue 177s registers an offense for any assignment to ternary 177s behaves like multiline all assignment types allow 177s any assignment to a multiline case when 177s any assignment to a multiline if else 177s any assignment to a multiline unless else 177s behaves like all assignment types 177s allows any assignment to if without else 177s registers an offense any assignment to case when 177s registers an offense for any assignment to ternary 177s does not crash when used inside rescue 177s registers an offense any assignment to if else 177s registers an offense for any assignment to unless else 177s behaves like all assignment types 177s allows any assignment to if without else 177s registers an offense for any assignment to ternary 177s registers an offense for any assignment to unless else 177s registers an offense any assignment to case when 177s does not crash when used inside rescue 177s registers an offense any assignment to if else 177s behaves like multiline all assignment types allow 177s any assignment to a multiline case when 177s any assignment to a multiline unless else 177s any assignment to a multiline if else 177s behaves like multiline all assignment types allow 177s any assignment to a multiline if else 177s any assignment to a multiline case when 177s any assignment to a multiline unless else 177s behaves like all assignment types 177s does not crash when used inside rescue 177s registers an offense for any assignment to unless else 177s registers an offense any assignment to case when 177s registers an offense for any assignment to ternary 177s allows any assignment to if without else 177s registers an offense any assignment to if else 177s behaves like multiline all assignment types allow 177s any assignment to a multiline if else 177s any assignment to a multiline unless else 177s any assignment to a multiline case when 177s behaves like all variable types 177s allows assignment to if without else 177s registers an offense assigning any variable type to ternary 177s registers an offense assigning any variable type to if elsewith multiple assignment 177s registers an offense assigning any variable type to unless else 177s registers an offense assigning any variable type to if else 177s registers an offense for assigning any variable type to case when 177s does not crash for rescue assignment 177s registers an offense assigning any variable type to if elsif else 177s >= Ruby 2.7 177s registers an offense for assigning any variable type to case in 177s behaves like multiline all assignment types allow 177s any assignment to a multiline if else 177s any assignment to a multiline case when 177s any assignment to a multiline unless else 177s behaves like all variable types 177s allows assignment to if without else 177s registers an offense assigning any variable type to unless else 177s registers an offense assigning any variable type to if else 177s does not crash for rescue assignment 177s registers an offense assigning any variable type to if elsif else 177s registers an offense for assigning any variable type to case when 177s registers an offense assigning any variable type to if elsewith multiple assignment 177s registers an offense assigning any variable type to ternary 177s >= Ruby 2.7 177s registers an offense for assigning any variable type to case in 177s behaves like multiline all variable types allow 177s assigning any variable type to an if else with multiline in one branch 177s assigning any variable type to a multiline case when 177s assigning any variable type to a multiline if else 177s assigning any variable type to a multiline unless else 177s assigning any variable type to a multiline if elsif else 177s behaves like single line condition autocorrect 177s corrects assignment to a case when else condition 177s corrects assignment to an if elsif else with multiple elsifs 177s corrects assignment to a case when else with multiple whens 177s corrects assignment to an if elsif else condition 177s corrects assignment to an unless else condition 177s corrects assignment to an if else condition 177s corrects assignment to a ternary operator 177s behaves like multiline all assignment types allow 177s any assignment to a multiline case when 177s any assignment to a multiline unless else 177s any assignment to a multiline if else 177s behaves like all variable types 177s registers an offense assigning any variable type to if elsewith multiple assignment 177s registers an offense for assigning any variable type to case when 177s registers an offense assigning any variable type to unless else 177s registers an offense assigning any variable type to if else 177s does not crash for rescue assignment 177s allows assignment to if without else 177s registers an offense assigning any variable type to ternary 177s registers an offense assigning any variable type to if elsif else 177s >= Ruby 2.7 177s registers an offense for assigning any variable type to case in 177s behaves like multiline all variable types allow 177s assigning any variable type to a multiline unless else 177s assigning any variable type to a multiline if else 177s assigning any variable type to a multiline case when 177s assigning any variable type to a multiline if elsif else 177s assigning any variable type to an if else with multiline in one branch 177s behaves like multiline all assignment types allow 177s any assignment to a multiline unless else 177s any assignment to a multiline case when 177s any assignment to a multiline if else 177s for loop 177s ignores pseudo assignments in a for loop 177s behaves like multiline all variable types allow 177s assigning any variable type to a multiline if elsif else 177s assigning any variable type to a multiline unless else 177s assigning any variable type to a multiline if else 177s assigning any variable type to an if else with multiline in one branch 177s assigning any variable type to a multiline case when 177s behaves like multiline all assignment types allow 177s any assignment to a multiline case when 177s any assignment to a multiline if else 177s any assignment to a multiline unless else 177s behaves like all variable types 177s registers an offense assigning any variable type to if else 177s registers an offense for assigning any variable type to case when 177s allows assignment to if without else 177s registers an offense assigning any variable type to if elsewith multiple assignment 177s does not crash for rescue assignment 177s registers an offense assigning any variable type to unless else 177s registers an offense assigning any variable type to if elsif else 177s registers an offense assigning any variable type to ternary 177s >= Ruby 2.7 177s registers an offense for assigning any variable type to case in 177s behaves like multiline all assignment types allow 177s any assignment to a multiline case when 177s any assignment to a multiline if else 177s any assignment to a multiline unless else 177s behaves like multiline all variable types allow 177s assigning any variable type to a multiline if elsif else 177s assigning any variable type to a multiline unless else 177s assigning any variable type to an if else with multiline in one branch 177s assigning any variable type to a multiline if else 177s assigning any variable type to a multiline case when 177s behaves like multiline all assignment types allow 177s any assignment to a multiline case when 177s any assignment to a multiline if else 177s any assignment to a multiline unless else 177s behaves like all assignment types 177s allows any assignment to if without else 177s registers an offense any assignment to case when 177s registers an offense for any assignment to ternary 177s does not crash when used inside rescue 177s registers an offense any assignment to if else 177s registers an offense for any assignment to unless else 177s behaves like multiline all assignment types allow 177s any assignment to a multiline case when 177s any assignment to a multiline unless else 177s any assignment to a multiline if else 177s behaves like all assignment types 177s registers an offense for any assignment to ternary 177s registers an offense any assignment to case when 177s allows any assignment to if without else 177s does not crash when used inside rescue 177s registers an offense any assignment to if else 177s registers an offense for any assignment to unless else 177s 177s RuboCop::Cop::Style::NumericLiterals 177s accepts integers with less than three places at the end 177s handles numeric literal with exponent 177s registers an offense for a long undelimited integer 177s registers an offense for an integer with misplaced underscore 177s accepts long numbers with underscore 177s accepts a short integer without underscore 177s autocorrects numbers with spaces between leading minus and numbers 177s autocorrects numeric literal with exponent (large E) and dot 177s autocorrects negative numbers 177s autocorrects negative floating-point numbers 177s autocorrects numeric literal with exponent and dot 177s ignores non-decimal literals 177s does not count a leading minus sign as a digit 177s accepts short numbers without underscore 177s registers an offense for a float with a long undelimited integer part 177s AllowedPatterns 177s does not register an offense for numbers that exactly match the pattern 177s registers an offense for numbers that do not exactly match the pattern 177s corrects by inserting underscores every 3 digits 177s AllowedPatterns with repetition 177s does not register an offense for numbers that match the pattern 177s for --auto-gen-config 177s when the number is only digits 177s sets the right value if one is disabled inline 177s detects right value of MinDigits based on the longest number 177s with separators 177s disables the cop 177s does not disable the cop if the line is disabled 177s when `3000` is specified for `AllowedNumbers` 177s does not register an offense 177s registers an offense 177s strict 177s registers an offense for an integer with misplaced underscore 177s when `'3000'` is specified for `AllowedNumbers` 177s registers an offense 177s does not register an offense 177s 177s RuboCop::Cop::Lint::RedundantWithIndex 177s accepts an index is used as a block argument 177s registers an offense when using `ary.each_with_object([]).with_index { |v| v }` and corrects to `ary.each_with_object([]) { |v| v }` 177s registers an offense when using `ary.each.with_index { |v| v }` and corrects to `ary.each` 177s registers an offense when using `ary.each.with_index(1) { |v| v }` and correct to `ary.each { |v| v }` 177s registers an offense for `ary.each_with_index { |v| v }` and corrects to `ary.each` 177s Ruby 2.7 177s registers an offense when using `ary.each.with_index { _1 }` and corrects to `ary.each` 177s registers an offense for `ary.each_with_index { _1 }` and corrects to `ary.each` 177s accepts an index is used as a numblock argument 177s 177s RuboCop::Cop::Layout::SpaceInsideStringInterpolation 177s when EnforcedStyle is no_space 177s accepts empty interpolation 177s does not touch spaces inside the interpolated expression 177s for well-formatted string interpolations 177s accepts excess literal spacing 177s when interpolation starts or ends with a line break 177s does not register an offense 177s ignores comments and whitespace when looking for line breaks 177s for ill-formatted string interpolations 177s finds interpolations in string-like contexts 177s registers offenses and autocorrects 177s for "space" style formatted string interpolations 177s registers offenses and autocorrects 177s when EnforcedStyle is space 177s accepts empty interpolation 177s for well-formatted string interpolations 177s does not register an offense for excess literal spacing 177s for "no_space" style formatted string interpolations 177s registers offenses and autocorrects 177s for ill-formatted string interpolations 177s registers offenses and autocorrects 177s 177s RuboCop::Cop::Security::CompoundHash 177s registers an offense when using addition assignment operator in the implementation of the hash method 177s registers an offense when using XOR operator in the implementation of the hash method, even if intermediate variable is used 177s registers an offense when using XOR between an array hash and a class 177s registers an offense for complex usage 177s registers an offense when using addition in the implementation of the hash method 177s registers an offense when using XOR assignment operator in the implementation of the hash method 177s registers an offense when using XOR involving super 177s registers an offense when using bitshift and OR 177s does not register an offense when delegating to a single object 177s does not register an offense when delegating to Array#hash 177s registers an offense when using XOR operator in the implementation of a dynamic hash singleton method 177s registers an offense when using XOR operator in the implementation of a dynamic hash method 177s registers an offense when delegating to Array#hash for a single value 177s registers an offense when using multiplication assignment operator in the implementation of the hash method 177s registers an offense if .hash is called on any elements of a hashed array 177s registers an offense when using XOR operator in the implementation of the hash method 177s registers an offense when using XOR and bitshifts 177s registers an offense when using XOR operator in the implementation of the hash method, even without sub-calls to hash 177s registers an offense when using XOR operator in the implementation of the hash singleton method 177s registers an offense when using multiplication in the implementation of the hash method 177s 177s RuboCop::Cop::Style::StaticClass 177s registers an offense when class has assignments along with class methods 177s does not register an offense when class is empty 177s does not register an offense when class has a parent 177s registers an offense when class has only class method 177s does not register an offense when class has `class << self` with macro calls 177s does not register an offense for modules 177s does not register an offense when class has macro-like method 177s does not register an offense when class includes/prepends a module 177s registers an offense when class extends a module 177s registers an offense when class has `class << self` with class methods 177s does not register an offense when class has instance method 177s 177s RuboCop::Cop::Layout::AccessModifierIndentation 177s when EnforcedStyle is set to indent 177s registers an offense and corrects opposite + correct alignment 177s registers an offense and corrects access modifiers in arbitrary blocks 177s registers an offense and corrects misaligned private 177s registers an offense and corrects misaligned access modifiers in nested classes 177s registers an offense and corrects misaligned protected 177s accepts properly indented private in module defined with Module.new 177s accepts properly indented private 177s registers an offense and corrects correct + opposite alignment 177s registers an offense and corrects misaligned private in module defined with Module.new 177s accepts an empty class 177s registers an offense and corrects misaligned private in a singleton class 177s accepts methods with a body 177s registers an offense and corrects misaligned private in module 177s accepts properly indented protected 177s registers an offense and corrects misaligned module_function in module 177s registers an offense and corrects misaligned private in class defined with Class.new 177s accepts indented access modifiers with arguments in nested classes 177s when indentation width is overridden for this cop only 177s accepts properly indented private 177s when 4 spaces per indent level are used 177s accepts properly indented private 177s when EnforcedStyle is set to outdent 177s accepts private with argument indented to method depth in a class 177s accepts module fn with argument indented to method depth in a module 177s registers an offense and corrects private indented to method depth in singleton class 177s accepts private def indented to method depth in class defined with Class.new 177s accepts private with argument indented to method depth in singleton class 177s registers an offense and corrects private indented to method depth in module defined with Module.new 177s accepts private def indented to method depth in module defined with Module.new 177s accepts private def indented to method depth in a class 177s registers an offense and corrects misaligned access modifiers in nested classes 177s registers an offense and corrects module_function indented to method depth in a module 177s accepts protected indented to the containing class indent level 177s accepts private with argument indented to method depth in module defined with Module.new 177s accepts private indented to the containing class indent level 177s accepts private with argument indented to method depth in a module 177s accepts private def indented to method depth in singleton class 177s registers offense and corrects private indented to method depth in a class 177s registers an offense and corrects private indented to method depth in class defined with Class.new 177s accepts module fn def indented to method depth in a module 177s registers an offense and corrects private indented to method depth in a module 177s accepts private def indented to method depth in a module 177s accepts private with argument indented to method depth in class defined with Class.new 177s 177s RuboCop::Cop::Metrics::ModuleLength 177s accepts empty modules 177s accepts a module with less than 5 lines 177s accepts a module with 5 lines 177s reports the correct beginning and end lines 177s does not count blank lines 177s rejects a module with more than 5 lines 177s when inspecting a class defined with Module.new 177s registers an offense 177s when a module has inner modules 177s rejects a module with 6 lines that belong to the module directly 178s does not count lines of inner modules 178s when inspecting a class defined with ::Module.new 178s registers an offense 178s when CountComments is enabled 178s also counts commented lines 178s when using numbered parameter 178s when inspecting a class defined with Module.new 178s registers an offense 178s when inspecting a class defined with ::Module.new 178s registers an offense 178s when a module has inner classes 178s rejects a module with 6 lines that belong to the module directly 178s does not count lines of inner classes 178s when `CountAsOne` is not empty 178s folds array into one line 178s 178s RuboCop::Cop::Naming::HeredocDelimiterCase 178s when enforced style is uppercase 178s with an interpolated heredoc 178s registers an offense and corrects with a lowercase delimiter 178s does not register an offense with an uppercase delimiter 178s registers an offense with a camel case delimiter 178s with a non-interpolated heredoc 178s when using single quoted delimiters 178s registers an offense and corrects with a camel case delimiter 178s registers an offense and corrects with a lowercase delimiter 178s does not register an offense with an uppercase delimiter 178s when using back tick delimiters 178s registers an offense and corrects with a lowercase delimiter 178s does not register an offense with an uppercase delimiter 178s registers an offense and corrects with a camel case delimiter 178s when using double quoted delimiters 178s registers an offense and corrects with a lowercase delimiter 178s does not register an offense with an uppercase delimiter 178s registers an offense and corrects with a camel case delimiter 178s when using non-word delimiters 178s does not register an offense 178s with a squiggly heredoc 178s registers an offense and corrects with a lowercase delimiter 178s does not register an offense with an uppercase delimiter 178s registers an offense and corrects with a camel case delimiter 178s when enforced style is lowercase 178s with a squiggly heredoc 178s registers an offense and corrects with an uppercase delimiter 178s registers an offense and corrects with a camel case delimiter 178s does not register an offense with a lowercase delimiter 178s with a non-interpolated heredoc 178s registers an offense and corrects with an uppercase delimiter 178s does not register an offense with a lowercase delimiter 178s registers an offense and corrects with a camel case delimiter 178s with an interpolated heredoc 178s does not register an offense with a lowercase delimiter 178s registers an offense and corrects with an uppercase delimiter 178s registers an offense and corrects with a camel case delimiter 178s 178s RuboCop::Cop::Layout::AssignmentIndentation 178s ignores comparison operators 178s registers an offense for incorrectly indented rhs whenmultiple assignment with line breaks on each line 178s allows assignments that do not start on a newline 178s allows a properly indented rhs with fullwidth characters 178s registers an offense for incorrectly indented rhs 178s registers an offense for multi-lhs 178s allows a properly indented rhs 178s registers an offense for incorrectly indented rhs when multiple assignment 178s when indentation width is overridden for this cop only 178s autocorrects indentation 178s allows a properly indented rhs 178s 178s RuboCop::Cop::Style::RedundantCapitalW 178s registers no offense for arrays with character constants 178s registers no offense for normal arrays of strings 178s registers no offense for %w with interpolation-like syntax 178s does not register an offense for array with empty strings 178s does not register an offense for array with one element 178s registers no offense for %w without interpolation 178s does not register an offense for array containing non-string 178s registers no offense for %W with special characters 178s registers no offense for normal arrays of strings with interpolation 178s does not register an offense for array of non-words 178s registers an offense for misused %W 178s registers an offense for misused %W with different bracket 178s registers no offense for %W with interpolation 178s 178s RuboCop::CLI 178s registers an offense for a syntax error 178s does not register any offenses for an empty file 178s registers an offense for Parser warnings 178s finds a file with no .rb extension but has a shebang line 178s checks a given file with faults and returns 1 179s can process a file with an invalid UTF-8 byte sequence 179s unknown cop 179s in configuration file is given 179s prints the error and exists with code 2 179s when lines end with CR+LF 179s reports an offense 179s configuration of `AutoCorrect` 179s when setting `AutoCorrect: false` for `Style/StringLiterals` 179s does not suggest `1 offense autocorrectable` for `Style/StringLiterals` 179s when given a file/directory that is not under the current dir 179s and the Rakefile path is absolute 179s checks a Rakefile but Style/FileName does not report 179s and the Rakefile path is relative 179s checks a Rakefile but Style/FileName does not report 179s and the directory is relative 179s checks a Rakefile but Style/FileName does not report 179s and the directory is absolute 180s checks a Rakefile but Style/FileName does not report 180s when parallel static by default 180s when specifying `--debug` option only` 180s fails with an error message 180s when specifying `--debug` and `-a` options` 180s uses parallel inspection when correcting the file 180s when setting `UseCache: false` 180s fails with an error message 180s when setting `UseCache: true` 180s fails with an error message 180s configuration of `require` 180s unknown library is specified 180s exits with 2 180s when checking a correct file 180s returns 0 180s when super is used with a block 181s still returns 0 181s when errors are raised while processing files due to bugs 181s displays an error message to stderr 181s configuration from file 181s works when a configuration file passed by -c specifies Exclude with regexp 181s can have different config files in different directories 181s shows an error if the input file cannot be found 181s ignores excluded files 181s matches included/excluded files correctly when . argument is given 181s can exclude a typical vendor directory 182s prefers a config file in ancestor directory to another in home 182s prints a warning for an unrecognized configuration parameter 182s fails when a configuration file specifies an invalid Severity 182s does not read files in excluded list 182s displays style guide URLs if DisplayStyleGuide is true 182s can be configured to merge a parameter that is a hash 183s uses the DefaultFormatter if another formatter is not specified 183s excludes the vendor directory by default 183s can exclude a vendor directory indirectly 183s works when a configuration file specifies Severity for Metrics/ParameterLists and Layout/LineLength 183s cannot disable Syntax offenses 183s works when a configuration file specifies Severity for Metrics/ParameterLists and Layout 183s displays cop names if DisplayCopNames is false 184s can exclude a vendor directory with an erroneous config file 184s can disable parser-derived offenses with warning severity 184s can be configured with option to disable a certain error 184s does not consider Include parameters in subdirectories 184s only reads configuration in explicitly included hidden directories 184s works when a cop that others depend on is disabled 184s allows the default configuration file as the -c argument 185s can be configured to override a parameter that is a hash in a special case 185s prints an error for an unrecognized cop name in .rubocop.yml 185s prints an error message for an unrecognized EnforcedStyle 185s fails when a configuration file has invalid YAML syntax 185s works when a configuration file passed by -c specifies Exclude with strings 185s finds included files 185s can use an alternative max line length from a config file 186s runs without errors for an unrecognized cop name in .rubocop.yml and `--ignore-unrecognized-cops` option is given 186s can be configured with project config to disable a certain error 186s can exclude directories relative to .rubocop.yml 186s when MultilineMethodCallIndentation is used with aligned style and IndentationWidth parameter 186s fails with an error message 186s without using namespace 186s can be configured with option to disable a certain error 186s when MultilineOperationIndentation is used with aligned style and IndentationWidth parameter 186s fails with an error message 186s when configured for indented_internal_methods style indentation 187s accepts indented_internal_methods style indentation 187s registers offense for normal indentation in module 187s registers offense for normal indentation in class 187s when obsolete MultiSpaceAllowedForOperators param is used 187s displays a warning 187s when --force-default-config option is specified 187s when no config file specified 187s ignores config file 187s when config file specified with -c 187s ignores config file 187s when a file inherits from a higher level 187s inherits relative excludes correctly 187s when a value in a hash is overridden with nil 188s acts as if the key/value pair was removed 188s when configuration is taken from $HOME/.rubocop.yml 188s handles relative excludes correctly when run from project root 188s cops can exclude files based on config 188s ignores excluded files 188s for a disabled cop 188s reports no offense when enabled on part of a file 188s style guide only usage 188s via the config 188s AllCops/StyleGuideCopsOnly 188s when it is false 188s runs cops for rules regardless of any link to the style guide 188s when it is true 188s skips cops that have no link to a style guide 188s AllCops/DisabledByDefault 188s when it is false 189s runs all cops that are enabled in default configuration 189s when it is true 189s runs only the cop configured in .rubocop.yml 189s via the cli option 189s --only-guide-cops 189s skips cops that have no link to a style guide 189s runs cops for rules that link to a style guide 189s overrides configuration of AllCops/StyleGuideCopsOnly 189s when a directory is named `*` 189s does not crash 189s rubocop:disable comment 189s can disable selected cops on a single line 190s can disable selected cops in a code section 190s can disable all cops on a single line 190s can disable all cops in a code section 190s without using namespace 190s can disable selected cops on a single line but prints a warning 190s when not necessary 190s causes an offense to be reported 190s and there are no other offenses 190s exits with error code 190s and RedundantCopDisableDirective is individually disabled 191s does not report RedundantCopDisableDirective offenses 191s when using `rubocop:disable` line comment for `Lint/EmptyBlock` 191s does not register an offense for `Lint/RedundantCopDisableDirective` 191s when using `rubocop:disable` line comment for `Style/RedundantInitialize` 191s does not register an offense for `Lint/RedundantCopDisableDirective` 191s and RedundantCopDisableDirective is individually excluded 191s does not report RedundantCopDisableDirective offenses 191s and RedundantCopDisableDirective is disabled through department 191s does not report RedundantCopDisableDirective offenses 191s Specify `--init` option to `rubocop` command 191s when .rubocop.yml already exists 191s fails with an error message 191s when .rubocop.yml does not exist 191s generate a .rubocop.yml file 191s when --autocorrect-all is given 191s does not trigger RedundantCopDisableDirective due to lines moving around 191s info severity 191s when there are only info offenses 192s returns a 0 code 192s when there are not only info offenses 192s returns a 1 code 192s when `Lint/Syntax` is given `Severity: info` 192s is an invalid configuration 192s when given `--display-only-fail-level-offenses` 192s returns a 0 code but does not list offenses 192s when given `--fail-level info` 192s returns a 1 code 192s when interrupted 192s returns 130 192s configuration of target Ruby versions 192s when configured with an unknown version 192s fails with an error message 192s when configured with an unsupported ruby 193s fails with an error message 193s obsolete cops 193s when configuration for TrailingComma is given 193s fails with an error message 193s 193s RuboCop::Cop::Lint::EmptyClass 193s registers an offense for empty object metaclass 193s registers an offense when empty metaclass contains only comments 193s does not register an offense when empty has a parent 193s does not register an offense when class is not empty 193s registers an offense for empty class metaclass 193s does not register an offense when metaclass is not empty 193s registers an offense for empty class 193s when AllowComments is true 193s does not register an offense when empty class contains only comments 193s does not register an offense when empty metaclass contains only comments 193s 193s RuboCop::CommentConfig 193s comment_only_line? 193s when line is empty 193s returns true 193s when line contains code and comment 193s returns false 193s when line contains only code 193s returns false 193s returns false 193s returns false 193s returns false 193s when line contains only comment 193s returns true 193s returns true 193s #cop_disabled_line_ranges 193s collects line ranges by disabled cops 193s #extra_enabled_comments 193s has values as arrays of extra enabled cops 193s has keys as instances of Parser::Source::Comment for extra enabled comments 193s #cop_enabled_at_line? 194s supports disabling all cops except Lint/RedundantCopDisableDirective with keyword all 194s supports disabling cops with numbers in their name 194s supports disabling multiple lines with a pair of directive 194s supports disabling cops with multiple levels in department name 194s handles indented single line 194s supports disabling all lines after a directive 194s supports enabling/disabling multiple cops along with a comment 194s supports enabling/disabling multiple cops in a single directive 195s supports disabling cops with multiple uppercase letters 195s supports disabling cops on a comment line with an EOL comment 195s does not confuse a cop name including "all" with all cops 195s supports disabling single line with a directive at end of line 195s supports enabling/disabling cops without a prefix 195s just ignores unpaired enabling directives 195s does not confuse a comment directive embedded in a string literal with a real comment 195s can handle double disable of one cop 195s 195s RuboCop::Cop::Naming::MemoizedInstanceVariableName 195s does not register an offense when or-assignment-based memoization is used outside a method definition 195s with default EnforcedStyleForLeadingUnderscores => disallowed 195s when defined?-based memoization is used 195s does not register an offense when some code before defined 195s does not register an offense when some code after assignment 195s registers an offense when memoized variable does not match class method name 195s does not register an offense when there is no assignment 195s registers an offense when memoized variable does not match method name 195s memoized variable matches method name 195s does not register an offense 195s does not register an offense when memoized variable matches predicate method name 195s does not register an offense when memoized variable matches bang method name 195s does not register an offense with a leading `_` for both names 195s does not register an offense when method has leading `_` 195s non-memoized variable does not match method name 195s does not register an offense 195s with dynamically defined methods 195s when the variable name matches the method name 195s does not register an offense 195s when a method is defined inside a module callback 195s when the method does not match 195s registers an offense 195s when the method matches 195s does not register an offense 195s when the variable name does not match the method name 195s registers an offense 195s when a singleton method is defined inside a module callback 195s when the method matches 195s does not register an offense 195s when the method does not match 195s registers an offense 195s when or-assignment-based memoization is used 195s memoized variable does not match method name 195s registers an offense 195s memoized variable does not match method name for block 195s registers an offense 195s with dynamically defined methods 195s when a method is defined inside a module callback 195s when the method does not match 195s registers an offense 195s when the method matches 195s does not register an offense 195s when a singleton method is defined inside a module callback 195s when the method matches 195s does not register an offense 195s when the method does not match 195s registers an offense 195s when the variable name matches the method name 195s does not register an offense 195s when the variable name does not match the method name 195s registers an offense 195s memoized variable after other code does not match method name 195s registers an offense 195s registers an offense for a bang method 195s registers an offense for a predicate method 195s memoized variable does not match class method name 195s registers an offense 195s memoized variable does not match method name during assignment 195s registers an offense 195s memoized variable matches method name 195s does not register an offense when method has leading `_` 195s does not register an offense with a leading `_` for both names 195s does not register an offense 195s non-memoized variable does not match method name 195s does not register an offense 195s memoized variable matches method name for block 195s does not register an offense 195s memoized variable matches method name during assignment 195s does not register an offense 195s code follows memoized variable assignment 195s does not register an offense 195s instance variables in initialize methods 195s does not register an offense 195s memoized variable after other code 195s does not register an offense 195s memoized variable matches bang method name 195s does not register an offense 195s memoized variable matches predicate method name 195s does not register an offense 195s EnforcedStyleForLeadingUnderscores: optional 195s when or-assignment-based memoization is used 195s when defined?-based memoization is used 195s memoized variable matches method name 195s does not register an offense without a leading underscore 195s does not register an offense with a leading `_` for method name 195s does not register an offense with a leading `_` for both names 195s does not register an offense with a leading underscore 195s memoized variable matches method name 195s does not register an offense with a leading `_` for method name 195s does not register an offense with a leading underscore 195s does not register an offense with a leading `_` for both names 195s does not register an offense without a leading underscore 195s EnforcedStyleForLeadingUnderscores: required 195s when defined?-based memoization is used 195s registers an offense when names match but missing a leading _ 195s does not register an offense with a leading `_` for both names 195s registers an offense when it has leading `_` but names do not match 195s with dynamically defined methods 195s when a singleton method is defined inside a module callback 195s when the method matches 195s does not register an offense 195s when the method does not match 195s registers an offense 195s when a method is defined inside a module callback 195s when the method does not match 195s registers an offense 195s when the method matches 195s does not register an offense 195s when the variable name matches the method name 195s does not register an offense 195s when the variable name does not match the method name 195s registers an offense 195s when or-assignment-based memoization is used 195s registers an offense when names match but missing a leading _ 195s registers an offense when it has leading `_` but names do not match 195s does not register an offense with a leading `_` for both names 195s with dynamically defined methods 195s when the variable name does not match the method name 195s registers an offense 195s when a singleton method is defined inside a module callback 195s when the method does not match 195s registers an offense 195s when the method matches 195s does not register an offense 195s when the variable name matches the method name 195s does not register an offense 195s when a method is defined inside a module callback 195s when the method does not match 195s registers an offense 195s when the method matches 195s does not register an offense 195s 195s RuboCop::Cop::Style::DefWithParentheses 195s reports an offense for def with empty parens 195s accepts def with arg and parens 195s accepts empty parentheses in one liners 195s reports an offense for class def with empty parens 195s accepts def without arguments 195s Ruby >= 3.0 195s reports an offense for endless method definition with empty parens 195s 195s RuboCop::Cop::InternalAffairs::NumblockHandler 195s does not register an offense for cops with on_numblock alias_method 195s does not register an offense for cops with on_numblock alias 195s does not register an offense for cops with on_numblock method 195s registers an offense for cops with forgotten numblock handlers 195s 195s RuboCop::Cop::InternalAffairs::InheritDeprecatedCopClass 195s registers an offense when using `Cop` 195s registers an offense when using `RuboCop::Cop::Cop` 195s does not register an offense when not inherited super class 195s does not register an offense when using `Base` 195s 195s RuboCop::Cop::Style::SymbolArray 195s with non-default MinSize 195s does not autocorrect array of one symbol if MinSize > 1 195s when EnforcedStyle is percent 195s detects right value for MinSize to use for --auto-gen-config 195s autocorrects arrays of one symbol 195s doesn't break when a symbol contains ) 195s uses %I when appropriate 195s autocorrects arrays of symbols with new line 195s does not register an offense for array starting with %i 195s does not register an offense if symbol contains whitespace 195s autocorrects arrays of symbols with embedded newlines and tabs 195s registers an offense for arrays of symbols 195s registers an offense in a non-ambiguous block context 195s detects when the cop must be disabled to avoid offenses 195s does not register an offense for array with non-syms 195s when PreferredDelimiters is specified 195s autocorrects an array using partial newlines 195s autocorrects an array in multiple lines 195s autocorrects an array with delimiters 195s when EnforcedStyle is brackets 195s autocorrects an array has interpolations 195s autocorrects multiline %i array 195s autocorrects an array starting with %i 195s registers an offense for empty array starting with %i 195s does not register an offense for arrays of symbols 195s registers an offense for array starting with %i 195s 195s RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier 195s EnforcedStyle is `around` 195s accepts missing blank line when at the end of specifying `self` 195s requires blank line after protected 195s ignores protected deep inside a method call 195s autocorrects blank line after #{access_modifier} with comment 195s accepts missing blank line when at the end of block 195s accepts missing blank line when at the end of specifying a superclass 195s accepts missing blank line when at the end of block 195s ignores an accessor with the same name as private above a method definition 195s recognizes blank lines with DOS style line endings 195s accepts missing blank line when at the beginning of sclass 195s ignores an accessor with the same name as public above a method definition 195s requires blank line before protected 195s requires blank line when next line started with end 195s accepts missing blank line when at the end of block 195s requires blank line after, but not before, protected when at the beginning of class/module 195s requires blank line after private 195s ignores private with block argument 195s requires blank line when next line started with end 195s accepts missing blank line when at the beginning of module 195s accepts missing blank line when at the beginning of filewhen specifying a superclass that breaks the line 195s accepts missing blank line when at the end of specifying `self` 195s accepts missing blank line when at the beginning of file and preceded by a comment 195s requires blank line after module_function 195s accepts missing blank line when at the beginning of file and preceded by a comment 195s accepts missing blank line when at the end of specifying a superclass 195s ignores public deep inside a method call 195s accepts missing blank line when at the end of specifying `self` 195s accepts missing blank line when at the end of block 195s accepts missing blank line when at the end of specifying `self` 195s ignores comment line before private 195s ignores public inside a method call 195s accepts missing blank line when specifying a superclass that breaks the line 195s accepts missing blank line when at the beginning of class 195s autocorrects blank line after #{access_modifier} with comment 195s ignores private inside a method call 195s accepts missing blank line when at the end of specifying a superclass 195s accepts missing blank line when at the beginning of file and preceded by a comment 195s ignores module_function deep inside a method call 195s accepts missing blank line when at the beginning of sclass 195s requires blank line after, but not before, module_function when at the beginning of class/module 195s accepts missing blank line when at the beginning of filewhen specifying a superclass that breaks the line 195s requires blank line after public 195s ignores protected inside a method call 195s accepts missing blank line when at the beginning of module 195s requires blank line after, but not before, private when at the beginning of class/module 195s autocorrects blank line after #{access_modifier} with comment 195s accepts missing blank line when at the beginning of class 195s accepts missing blank line when at the beginning of module 195s ignores module_function with block argument 195s accepts only using access modifier 195s ignores an accessor with the same name as protected above a method definition 195s autocorrects blank line after #{access_modifier} with comment 195s accepts missing blank line when at the beginning of class 195s requires blank line before module_function 195s accepts missing blank line when specifying `self` that breaks the line 195s accepts missing blank line when at the beginning of file and preceded by a comment 195s ignores comment line before public 195s ignores an accessor with the same name as module_function above a method definition 195s accepts missing blank line when at the end of specifying a superclass 195s requires blank line before public 195s accepts only using access modifier 195s accepts missing blank line when at the beginning of filewhen specifying a superclass that breaks the line 195s ignores protected with block argument 195s requires blank line before private 195s ignores module_function with a right-hand-side condition 195s requires blank line when next line started with end 195s accepts only using access modifier 195s accepts missing blank line when specifying `self` that breaks the line 195s accepts only using access modifier 195s ignores public with block argument 195s ignores public with a right-hand-side condition 195s accepts missing blank line when at the beginning of sclass 195s accepts missing blank line when specifying a superclass that breaks the line 195s accepts missing blank line when specifying a superclass that breaks the line 195s accepts missing blank line when at the beginning of filewhen specifying a superclass that breaks the line 195s ignores private with a right-hand-side condition 195s recognizes blank lines with DOS style line endings 195s recognizes blank lines with DOS style line endings 195s ignores comment line before module_function 195s requires blank line when next line started with end 195s accepts missing blank line when at the beginning of module 195s ignores private deep inside a method call 195s ignores comment line before protected 195s accepts missing blank line when specifying `self` that breaks the line 195s ignores protected with a right-hand-side condition 195s accepts missing blank line when at the beginning of class 195s accepts missing blank line when specifying `self` that breaks the line 195s recognizes blank lines with DOS style line endings 195s requires blank line after, but not before, public when at the beginning of class/module 195s ignores module_function inside a method call 195s accepts missing blank line when specifying a superclass that breaks the line 195s accepts missing blank line when at the beginning of sclass 195s at the beginning of block 195s for blocks defined with {} 195s accepts missing blank line with arguments 195s accepts missing blank line 195s for blocks defined with do 195s accepts missing blank line 195s requires blank line after, but not before, module_function 195s accepts missing blank line with arguments 195s at the beginning of block 195s for blocks defined with do 195s accepts missing blank line with arguments 195s requires blank line after, but not before, public 195s accepts missing blank line 195s for blocks defined with {} 195s accepts missing blank line with arguments 195s accepts missing blank line 195s at the beginning of block 195s for blocks defined with do 195s accepts missing blank line 195s requires blank line after, but not before, protected 195s accepts missing blank line with arguments 195s for blocks defined with {} 195s accepts missing blank line 195s accepts missing blank line with arguments 195s at the beginning of block 195s for blocks defined with do 195s accepts missing blank line with arguments 195s accepts missing blank line 195s requires blank line after, but not before, private 195s for blocks defined with {} 195s accepts missing blank line 195s accepts missing blank line with arguments 195s EnforcedStyle is `only_before` 195s registers an offense for blank line after protected 195s registers an offense for missing blank line before public 195s registers an offense for missing blank line before module_function 195s accepts missing blank line after private 195s registers an offense for missing blank line before protected 195s accepts blank line after module_function 195s registers an offense for blank line after private 195s accepts blank line after public 195s does not register an offense when `end` immediately after private 195s accepts missing blank line after protected 195s registers an offense for missing blank line before private 195s does not register an offense when `end` immediately after protected 195s Ruby 2.7 195s ignores public with numblock argument 195s ignores private with numblock argument 195s registers an offense for missing around line before protected 195s registers an offense for missing around line before private 195s registers an offense for missing around line before public 195s ignores module_function with numblock argument 196s ignores protected with numblock argument 196s registers an offense for missing around line before module_function 196s 196s RuboCop::Cop::Bundler::GemComment 196s when investigating Ruby files 196s does not register any offenses 196s when investigating Gemfiles 196s and the gem is commented on the same line 196s does not register any offenses 196s and a gem has no comment 196s registers an offense 196s and the file is empty 196s does not register any offenses 196s when the "OnlyFor" option is set 196s including "version_specifiers" 196s when a gem is uncommented and has no version specified 196s does not register an offense 196s when a gem is uncommented and has a version specifier along with other options 196s registers an offense 196s when a gem is commented 196s does not register an offense 196s when a gem is uncommented and has multiple version specifiers 196s registers an offense 196s when a gem is uncommented and has a version specifier 196s registers an offense 196s when a gem is uncommented and has options but no version specifiers 196s does not register an offense 196s including one or more option names but not "version_specifiers" 196s when a gem is uncommented and contains only options not specified 196s does not register an offense 196s when a gem is uncommented and has one of the specified options 196s registers an offense 196s when a gem is uncommented and has a version specifier but none of the specified options 196s does not register an offense 196s including "restrictive_version_specifiers" 196s when a gem is uncommented and has both minimum and non-minimum version specifier 196s registers an offense 196s when a gem is uncommented and has a version specifier along with other options 196s registers an offense 196s when a gem is uncommented and has a frozen version specifier 196s registers an offense 196s when a gem is uncommented and has a non-minimum version specifier with a leading space 196s registers an offense 196s when a gem is uncommented and has a pessimistic version specifier 196s registers an offense 196s when a gem is uncommented and has only a minimum version specifier 196s does not register an offense 196s when a gem is commented 196s does not register an offense 196s when a gem is uncommented and has options but no version specifiers 196s does not register an offense 196s when a gem is uncommented and has no version specified 196s does not register an offense 196s when a gem is uncommented and has a version specifier without operator 196s registers an offense 196s and the gem is permitted 196s does not register any offenses 196s and the gem is commented 196s does not register any offenses 196s and the file contains source and group 196s does not register any offenses 196s 196s RuboCop::Cop::Style::MagicCommentFormat 196s DirectiveCapitalization 196s when lowercase 196s registers an offense and corrects when the case does not match 196s when uppercase 196s registers an offense and corrects when the case does not match 196s when not set 196s does not change the case of magic comment directives 196s all issues at once 196s registers and corrects multiple issues 196s invalid config 196s DirectiveCapitalization 196s raises an error 196s ValueCapitalization 196s raises an error 196s kebab case style 196s registers an offense for mixed case 196s does not register an offense for incorrect style in comments after the first statement 196s accepts a frozen string literal in snake case in emacs style 196s does not register an offense for dashes in other comments 196s registers an offense for snake case 196s accepts an empty source 196s accepts a magic comments in kebab case 196s registers an offense for snake case in emacs style 196s accepts a source with no tokens 196s ValueCapitalization 196s when lowercase 196s registers an offense and corrects when the case does not match 196s when not set 196s does not change the case of magic comment directives 196s when uppercase 196s registers an offense and corrects when the case does not match 196s snake case style 196s accepts a frozen string literal in snake case in emacs style 196s accepts an empty source 196s does not register an offense for dashes in other comments 196s accepts a magic comments in snake case 196s registers an offense for mixed case 196s registers an offense for kebab case 196s does not register an offense for incorrect style in comments after the first statement 196s registers an offense for kebab case in emacs style 196s accepts a source with no tokens 196s 196s RuboCop::Cop::Style::ObjectThen 196s EnforcedStyle: yield_self 196s registers an offense for then with proc param 196s accepts then with more than 1 param 196s accepts then without a block 196s registers an offense for then with block 196s EnforcedStyle: then 196s registers an offense for yield_self with proc param 196s accepts yield_self with more than 1 param 196s accepts yield_self without a block 196s Ruby 2.5 196s accepts yield_self with block 196s Ruby 2.7 196s registers an offense for yield_self with block 196s Ruby 2.6 196s registers an offense for yield_self with block 196s 196s RuboCop::Cop::Style::ParallelAssignment 196s corrects when using single indentation 196s registers an offense when the right side has multiple hashes 196s corrects when assigning from multiple methods with blocks 196s registers an offense when left hand side ends with an implicit variable 196s corrects when the expression uses a modifier if statement inside a method 196s corrects when using constants 196s registers an offense when the right side has constants 196s registers an offense when right hand side has maps with blocks 196s registers an offense when the right side has mixed expressions 196s corrects parallel assignment in if statements 196s corrects when the right variable is a symbol array 196s corrects when assigning to method returns 196s corrects when the right variable is a word array 196s corrects when the expression uses a modifier rescue statement as the only thing inside of a method 196s registers an offense with attributes when assignments must be reordered to preserve meaning 196s registers an offense with indices and attributes when assignments must be reordered to preserve meaning 196s registers an offense with indices of different variables 196s registers an offense when assignments must be reordered to preserve meaning 196s allows expanding an assigned var 196s corrects parallel assignment in until statements 196s allows more right variables than left variables 196s corrects when the expression is missing spaces 196s corrects when the number of left hand variables matches the number of right hand variables 196s corrects when using parallel assignment in singleton method 196s corrects when assignments must be reordered to avoid changing meaning 196s corrects when the expression uses a modifier if statement 196s registers an offense when the right side has methods with/without blocks 196s corrects parallel assignment in unless statements 196s corrects when the expression uses a modifier until statement 196s corrects when the expression uses a modifier while statement 196s registers an offense when assigning to same variables in same order 196s corrects when the expression uses a modifier rescue statement 196s corrects parallel assignment inside rescue statements within method definitions 196s allows more left variables than right variables 196s registers an offense when assigning to namespaced constants 196s corrects when the expression uses a modifier unless statement 196s registers an offense with indices 196s corrects when using nested indentation 196s registers an offense when the right side has mulitiple arrays 196s registers an offense when right hand side has namespaced constants 196s corrects when the right variable is an array 196s corrects parallel assignment in while statements 196s corrects parallel assignment in rescue statements within begin ... rescue 196s corrects when the expression uses a modifier rescue statement inside of a method 196s behaves like allowed 196s allows assignment of: obj.attr1, obj.attr2 = obj.attr2, obj.attr1 196s behaves like allowed 196s allows assignment of: CONSTANT, = 1, 2 196s behaves like allowed 196s allows assignment of: array = [1, 2, 3]; a, = array; 196s behaves like allowed 196s allows assignment of: a, b, c = *node, 1, 2 196s behaves like allowed 196s allows assignment of: a, b = *foo 196s behaves like allowed 196s allows assignment of: a, = *'foo' 196s behaves like allowed 196s allows assignment of: a[0], a[1] = a[1], a[0] 196s behaves like allowed 196s allows assignment of: obj.attr1, ary[0] = ary[0], obj.attr1 196s behaves like allowed 196s allows assignment of: a, = 1 196s behaves like allowed 196s allows assignment of: a = 1 196s behaves like allowed 196s allows assignment of: self.a, self.b = b, a 196s behaves like allowed 196s allows assignment of: foo = [1, 2, 3]; a, b, c = foo; 196s behaves like allowed 196s allows assignment of: self.a, self.b = self.b, self.a 196s behaves like allowed 196s allows assignment of: a, = *foo 196s behaves like allowed 196s allows assignment of: a = *'foo' 196s behaves like allowed 196s allows assignment of: a, = 1, 2, 3 196s behaves like allowed 196s allows assignment of: a, b = foo.map { |e| e.id } 196s behaves like allowed 196s allows assignment of: a, b, c = 1, 2, *node 196s behaves like allowed 196s allows assignment of: a = 1; b = 2; 196s behaves like allowed 196s allows assignment of: a, b = b, a 196s behaves like allowed 196s allows assignment of: a, b = (a + b), (a - b) 196s behaves like allowed 196s allows assignment of: *a, b = [1, 2, 3] 196s behaves like allowed 196s allows assignment of: a = a 196s behaves like allowed 196s allows assignment of: begin_token, end_token = CONSTANT 196s behaves like allowed 196s allows assignment of: ary[0], ary[1], ary[2] = ary[1], ary[2], ary[0] 196s using custom indentation width 196s works with guard clauses 196s works with rescue 196s works with nesting 196s works with standard correction 196s behaves like allowed 196s allows assignment of: a, b = foo() 196s behaves like allowed 196s allows assignment of: a, b = Float::INFINITY 196s behaves like allowed 196s allows assignment of: a, *b = [1, 2, 3] 196s behaves like allowed 196s allows assignment of: a, b, c = b, c, a 196s behaves like allowed 196s allows assignment of: a, = a 196s 196s RuboCop::Cop::Style::StringMethods 196s registers an offense 196s when using safe navigation operator 196s registers an offense 196s 196s RuboCop::Cop::Layout::MultilineMethodParameterLineBreaks 196s when two parameters are on next line 196s does not add any offenses 196s when there are no parameters 196s does not add any offenses 196s when many parameters including hash are on multiple lines, three on same line 196s registers an offense and corrects 196s when many parameter are on multiple lines, two on same line 196s registers an offense and corrects 196s when second parameter starts on same line as end of first 196s registers an offense and corrects 196s when there are multiple parameters on the first line 196s registers an offense and corrects starting from the 2nd argument 196s when parameter's default value starts on same line but ends on different line 196s registers an offense and corrects 196s when one parameter on same line 196s does not add any offenses 196s when many parameters are on multiple lines, three on same line 196s registers an offense and corrects 196s 196s RuboCop::Cop::Security::Open 196s registers an offense for `::URI.open` with string that starts with a pipe 196s accepts open with string that has a prefixed interpolation 196s registers an offense for `URI.open` with string that starts with a pipe 196s registers an offense for open with mode argument 196s accepts open on a literal string 196s registers an offense for open 196s accepts open with a literal string starting with a pipe 196s accepts open with a string that interpolates a literal 196s accepts File.open as method 196s accepts open with no arguments 196s accepts open with prefix string literal plus something 196s accepts open as variable 196s registers an offense for `URI.open` with a block 196s registers an offense for open with a block 196s registers an offense for open with string that starts with a pipe 196s registers an offense for open with dynamic string that is not prefixed 196s 196s RuboCop::Cop::Style::SymbolLiteral 196s accepts string syntax when symbols have special chars in them 196s accepts string syntax when symbol start with a digit 196s registers an offense for word-line symbols using string syntax 196s accepts string syntax when symbols have whitespaces in them 196s 196s RuboCop::Cop::Lint::ConstantResolution 196s registers an offense not qualifying a namespace const 196s registers no offense qualifying a namespace const 196s registers an offense not qualifying a const 196s registers no offense when qualifying a const 196s with Only set 196s registers an offense when an unqualified namespace const 196s registers no offense qualifying a namespace const 196s registers no with a namespace const 196s registers no offense when qualifying a const 196s registers no offense not qualifying another const 196s registers an offense with an unqualified const 196s module & class definitions 196s does not register offense 196s with Ignore set 196s registers no offense when an unqualified namespace const 196s registers no offense with an unqualified const 196s registers an offense not qualifying another const 196s registers an with a namespace const 196s registers no offense qualifying a namespace const 196s registers no offense when qualifying a const 196s 196s RuboCop::CLI --autocorrect 196s does not say [Corrected] if correction is not possible 196s corrects IndentationWidth and IndentationConsistency offenses 197s plays nicely with default cops in complex ExtraSpacing scenarios 197s does not correct ExtraSpacing in a hash that would be changed back 197s consistently quotes symbol keys in a hash using `Lint/SymbolConversion` with `EnforcedStyle: consistent` and `Style/QuotedSymbols` 197s corrects `EnforcedStyle: hash_rockets` of `Style/HashSyntax` with `Layout/HashAlignment` 197s corrects `Layout/SpaceAroundOperators` and `Layout/ExtraSpacing` offenses when using `ForceEqualSignAlignment: true` 197s does not crash Lint/SafeNavigationWithEmpty and offenses and accepts Style/SafeNavigation when checking `foo&.empty?` in a conditional 198s corrects LineEndConcatenation offenses leaving the RedundantInterpolation offense unchanged 198s corrects when specifying `EnforcedStyle: with_first_argument` of `Layout/ArgumentAlignment` and `EnforcedColonStyle: separator` of `Layout/HashAlignment` (`EnforcedColonStyle` is array) 198s corrects `Layout/DotPosition` and `Layout/SingleLineBlockChain` offenses 198s corrects only IndentationWidth without crashing 198s properly autocorrects when `Style/TernaryParentheses` requires parentheses that `Style/RedundantParentheses` would otherwise remove 198s corrects `Style/IfUnlessModifier` with `Style/SoleNestedConditional` 199s can correct HashSyntax when --only is used 199s corrects `Style/SoleNestedConditional` with `Style/InverseMethods` and `Style/IfUnlessModifier` 199s corrects `Naming/RescuedExceptionsVariableName` and `, `Style/RescueStandardError`and `Lint/OverwriteByRescue` offenses 199s can correct WordArray and SpaceAfterComma offenses 199s can correct empty line inside special form of nested modules 199s corrects when specifying `EnforcedStyle: with_first_argument` of `Layout/ArgumentAlignment` and `EnforcedColonStyle: separator` of `Layout/HashAlignment` 199s corrects properly when both `Style/MapToHash` and `Style/HashTransformKeys`or `Style/HashTransformValues` registers 200s can correct indentation and another thing 200s corrects when specifying `EnforcedStyle: with_fixed_indentation` of `Layout/ArgumentAlignment` and `EnforcedStyle: consistent` of `Layout/FirstArgumentIndentation` 200s avoids adding extra spaces when both `Style/Semicolon` and `Style/SingleLineMethods`both apply 200s corrects IndentationWidth and IndentationConsistency offenseswithout correcting `Style/TrailingBodyOnClass` 200s corrects code with indentation problems 200s corrects indentation for a begin/rescue/else/ensure/end block properly 201s can correct SpaceAfterComma and HashSyntax offenses 201s corrects when specifying `EnforcedStyle: with_fixed_indentation` of `Layout/ArgumentAlignment` and `Layout/HashAlignment` and `Layout/FirstHashElementIndentation` 201s can correct two empty lines at end of class body 201s does not crash when using `Layout/CaseIndentation` and `Layout/ElseAlignment` 201s corrects `EnforcedStyle: require_parentheses` of `Style/MethodCallWithArgsParentheses` with `EnforcedStyle: conditionals` of `Style/AndOr` 201s can correct IndentHash offenses with separator style 202s corrects Tab and IndentationConsistency offenses 202s breaks line at the beginning of trailing class/module body without removing a semicolon in the bodywhen using `Style/TrailingBodyOnClass` and `Style/TrailingBodyOnModule` 202s does not crash `Layout/ArgumentAlignment` and offenses and accepts `Layout/FirstArgumentIndentation` when specifying `EnforcedStyle: with_fixed_indentation` of `Layout/ArgumentAlignment` and `EnforcedStyle: special_for_inner_method_call` of `Layout/FirstArgumentIndentation` 202s corrects `EnforcedStyle: line_count_based` of `Style/BlockDelimiters` with `Style/CommentedKeyword` and `Layout/BlockEndNewline` 202s does not hang SpaceAfterPunctuation and SpaceInsideArrayLiteralBrackets 202s can correct single line methods 202s corrects `Lint/UnusedMethodArgument` with `Style/ExplicitBlockArgument` 203s can correct a problems and the problem it creates 203s does not crash when using Lint/SafeNavigationWithEmpty and Layout/EmptyLinesAroundBlockBody 203s corrects `EnforcedStyle: require_parentheses` of `Style/MethodCallWithArgsParentheses` with `Lint/AmbiguousOperator` 203s corrects `EnforcedStyle: require_parentheses` of `Style/MethodCallWithArgsParentheses` with `Style/RescueModifier` 203s can correct MethodDefParentheses and other offense 203s corrects `EnforcedStyle: require_parentheses` of `Style/MethodCallWithArgsParentheses` with `Style/NestedParenthesizedCalls` 203s does not crash `Layout/ArgumentAlignment` and offenses and accepts `Layout/FirstArgumentIndentation` when specifying `EnforcedStyle: with_fixed_indentation` of `Layout/ArgumentAlignment` and `EnforcedStyle: consistent_relative_to_receiver` of `Layout/FirstArgumentIndentation` 204s can change block comments and indent them 204s can correct TrailingEmptyLines and TrailingWhitespace offenses 204s corrects when specifying `EnforcedStyle: with_fixed_indentation` of `Layout/ArgumentAlignment` and `Layout/HashAlignment` 204s corrects `Style/InverseMethods` offenses when specifying `IncludeSemanticChanges: false` of `Style/NonNilCheck` and `EnforcedStyle: comparison` of `Style/NilComparison` 204s corrects HeredocArgumentClosingParenthesis offenses and ignores TrailingCommaInArguments offense 204s says [Correctable] if correction is unsafe 204s can correct two problems with blocks 205s corrects RedundantCopDisableDirective offenses 205s can correct MethodCallWithoutArgsParentheses and EmptyLiteral offenses 205s properly corrects when `Style/SoleNestedConditional` and one of `Style/NegatedIf` or `Style/NegatedUnless` detect offenses 205s handles different SpaceInsideBlockBraces and SpaceInsideHashLiteralBraces 205s corrects IndentationWidth and IndentationConsistency offenseswhen using `EnforcedStyle: outdent` and `EnforcedStyle: indented_internal_methods` 205s corrects Lint/ParenthesesAsGroupedExpression and offenses and accepts Style/RedundantParentheses 206s does not hang SpaceAfterPunctuation and SpaceInsideParens 206s indents the elements of a hash in hash based on the parent hash key when the parent hash is a method argument and has following other sibling pairs 206s can correct two problems in the same place 206s can correct HashSyntax and SpaceAroundOperators offenses 206s corrects IndentationWidth, RedundantBegin, and RescueEnsureAlignment offenses 206s corrects TrailingCommaIn(Array|Hash)Literal and Multiline(Array|Hash)BraceLayout offenses 207s corrects Style/BlockDelimiters offenses when specifyingLayout/SpaceInsideBlockBraces together 207s can be disabled for any cop in configuration 207s corrects Style/Next and Style/SafeNavigation offenses 207s corrects Style/InverseMethods and Style/Not offenses 207s corrects Style/BlockDelimiters offenses when specifyingLayout/SpaceBeforeBlockBraces with `EnforcedStyle: no_space` together 207s corrects `Style/RedundantBegin` with `Style/MultilineMemoization` 207s does not crash `Layout/ArgumentAlignment` and offenses and accepts `Layout/FirstArgumentIndentation` when specifying `EnforcedStyle: with_fixed_indentation` of `Layout/ArgumentAlignment` and `EnforcedStyle: special_for_inner_method_call_in_parentheses` of `Layout/FirstArgumentIndentation` 208s corrects SymbolProc and SpaceBeforeBlockBraces offenses 208s corrects `Lint/Lambda` and `Lint/UnusedBlockArgument` offenses 208s corrects Layout/RedundantLineBreak and Layout/SingleLineBlockChain offenses 208s does not correct Style/IfUnlessModifier offense disabled by a comment directive and does not fire Lint/RedundantCopDisableDirective offense even though that directive would make the modifier form too long 208s corrects InitialIndentation offenses 209s corrects `EnforcedStyle: require_parentheses` of `Style/MethodCallWithArgsParentheses` with `Layout/SpaceBeforeFirstArg` 209s honors Exclude settings in individual cops 209s registers an offense and corrects when using `Layout/ArgumentAlignment`, `Layout/FirstArgumentIndentation`, and `Layout/FirstMethodArgumentLineBreak` and specifying `EnforcedStyle: with_fixed_indentation` of `Layout/ArgumentAlignment` and `EnforcedStyle: consistent` of `Layout/FirstArgumentIndentation` 209s does not correct SpaceAroundOperators in a hash that would be changed back 209s corrects `Layout/DotPosition` and `Style/RedundantSelf` offenses 209s corrects RedundantBegin offenses and fixes indentation etc 209s corrects when specifying `EnforcedStyle: with_first_argument` of `Layout/ArgumentAlignment` and `EnforcedHashRocketStyle: separator` of `Layout/HashAlignment` 210s corrects `Style/TernaryParentheses` offenses and accepts `Lint/ParenthesesAsGroupedExpression` 210s caching 210s with an offense in the cache 210s corrects offenses 210s with no offenses in the cache 210s doesn't correct offenses 210s trailing comma cops 210s when the style is `consistent_comma` 210s corrects TrailingCommaInLiteral and TrailingCommaInArguments without producing a double comma 210s when the style is `comma` 210s corrects TrailingCommaInLiteral and TrailingCommaInArguments without producing a double comma 210s when BlockDelimiters has line_count_based style 211s corrects SpaceBeforeBlockBraces, SpaceInsideBlockBraces offenses 211s when BlockDelimiters has braces_for_chaining style 211s corrects SpaceBeforeBlockBraces, SpaceInsideBlockBraces offenses 211s space_inside_bracket cops 211s when array style is no_space & reference style is space 211s corrects SpaceInsideArrayLiteralBrackets and SpaceInsideReferenceBrackets 211s when array style is compact & reference style is no_space 211s corrects SpaceInsideArrayLiteralBrackets and SpaceInsideReferenceBrackets 211s when array style is compact & reference style is space 211s corrects SpaceInsideArrayLiteralBrackets and SpaceInsideReferenceBrackets 211s when array style is space & reference style is no space 211s corrects SpaceInsideArrayLiteralBrackets and SpaceInsideReferenceBrackets 211s when BlockDelimiters has semantic style 212s corrects SpaceBeforeBlockBraces, SpaceInsideBlockBraces offenses 212s 212s RuboCop::Cop::Layout::SpaceInsideParens 212s when EnforcedStyle is space 212s registers an offense for space inside empty parens 212s registers an offense in block parameter list with no spaces 212s accepts parentheses with comment and line break 212s accepts parentheses with line break 212s registers an offense for no space around heredoc start 212s accepts empty parentheses without spaces 212s registers an offense for no spaces inside parens 212s accepts parentheses with spaces 212s when EnforcedStyle is no_space 212s accepts parentheses with no spaces 212s accepts parentheses in block parameter list 212s registers an offense for spaces inside parens 212s accepts parentheses with line break 212s accepts parentheses with comment and line break 212s registers an offense for space around heredoc start 212s when EnforcedStyle is compact 212s registers an offense for no space around heredoc start 212s registers an offense for space inside empty parens 212s accepts three consecutive right parentheses 212s registers an offense for space between consecutive brackets 212s accepts parentheses with comment and line break 212s registers multiple offense for a missing and extra space between consecutive brackets 212s accepts parentheses with line break 212s accepts two consecutive left parentheses 212s accepts three consecutive left parentheses 212s accepts empty parentheses without spaces 212s accepts two consecutive right parentheses 212s registers an offense for no spaces inside parens 212s accepts parentheses with spaces 212s registers an offense in block parameter list with no spaces 212s 212s RuboCop::Cop::Lint::EmptyInterpolation 212s registers an offense and corrects #{} in interpolation 212s accepts non-empty interpolation 212s finds interpolations in string-like contexts 212s registers an offense and corrects #{ } in interpolation 212s 212s RuboCop::Cop::Layout::SpaceInsideReferenceBrackets 212s with space inside empty brackets not allowed 212s registers an offense and corrects empty brackets with multiple spaces inside 212s accepts empty brackets with no space inside 212s registers an offense and corrects empty brackets with 1 space inside 212s registers an offense and corrects empty brackets with newline inside 212s when EnforcedStyle is no_space 212s register and correct multiple offenses for multiple sets of ref brackets 212s does not register offense for array literals 212s does not register offense for ref bcts with no spaces that assign 212s registers an offense and corrects third ref brackets with leading whitespace 212s registers an offense and corrects outer ref brackets 212s registers an offense and corrects third ref brackets with trailing whitespace 212s accepts square brackets as method name 212s does not register offense for non-empty brackets with newline inside 212s accepts extra spacing in array brackets 212s registers an offense and corrects when a reference bracket with a leading whitespace is assigned by another reference bracket 212s accepts square brackets called with method call syntax 212s registers an offense and corrects second ref brackets with leading whitespace 212s does not register offense for reference brackets with no spaces 212s registers multiple offenses and corrects one set of ref brackets 212s registers an offense and corrects ref brackets with leading whitespace 212s registers an offense and corrects ref brackets with trailing whitespace 212s registers an offense and corrects when a reference bracket is assigned by another reference bracket with trailing whitespace 212s registers multiple offenses and corrects multiple sets of ref brackets 212s registers an offense and corrects second ref brackets with trailing whitespace 212s accepts an array as a reference object 212s registers an offense and corrects when a reference bracket with a trailing whitespace is assigned by another reference bracket 212s when EnforcedStyle is space 212s registers an offense and corrects second ref brackets with no trailing whitespace 212s accepts spaces in array brackets 212s does not register offense for reference brackets with spaces 212s does not register offense for array literals 212s accepts an array as a reference object 212s registers an offense and corrects third ref brackets with no leading whitespace 212s accepts square brackets called with method call syntax 212s registers and corrects multiple offenses for multiple sets of ref brackets 212s registers an offense and corrects ref brackets with no trailing whitespace 212s registers an offense and corrects ref brackets with no leading whitespace 212s registers an offense and corrects when a reference bracket is assigned by another reference bracket with no trailing whitespace 212s accepts square brackets as method name 212s registers and corrects multiple offenses in one set of ref brackets 212s does not register offense for ref bcts with spaces that assign 212s registers an offense and corrects when a reference bracket with no leading whitespace is assigned by another reference bracket 212s registers an offense and corrects second ref brackets with no leading whitespace 212s registers an offense and correct third ref brackets with no trailing whitespace 212s registers an offense and corrects when a reference bracket with no trailing whitespace is assigned by another reference bracket 212s with space inside empty braces allowed 212s registers offense and corrects empty brackets with newline inside 212s registers offense and corrects empty brackets with no space inside 212s accepts empty brackets with space inside 212s registers offense and corrects empty brackets with more than one space inside 212s 212s RuboCop::Cop::Style::WhenThen 212s registers an offense for when b; 212s registers an offense for when b, c; 212s accepts ; separating statements in the body of when 212s when inspecting a case statement with an empty branch 212s does not register an offense 212s 212s RuboCop::Cop::Lint::DuplicateMethods 212s registers an offense for duplicate attr_writer in class_eval block 212s doesn't register an offense for different private methods in module 212s doesn't register an offense for alias for gvar in class_eval block 212s handles class_eval with implicit receiver 212s accepts for attr_writer and getter in class_eval block 212s registers an offense for duplicate attr_reader in module 212s registers an offense for duplicate attr_reader in dynamic class 212s doesn't register an offense for alias for gvar in dynamic module 212s registers an offense for a duplicate instance method in separate class_eval block blocks 212s does not register an offense for same method name defined in different methods 212s doesn't register an offense for non-duplicate alias in class 212s registers an offense for duplicate class methods with named receiver in class 212s understands nested modules 212s doesn't register an offense for alias for gvar in module 212s registers an offense for duplicate attr in module 212s registers an offense for duplicate attr_writer in dynamic class 212s registers an offense when class << exp is used 212s registers an offense for duplicate protected methods in dynamic class 212s registers an offense for a duplicate instance method in separate class blocks 212s registers offenses for duplicate assignable attr in module 212s registers an offense for duplicate private methods in dynamic class 212s registers an offense for duplicate class methods in class 212s accepts for attr_writer and getter in dynamic module 212s recognizes difference between instance and class methods in dynamic module 212s accepts for non-duplicate alias_method in class 212s accepts for attr_reader and setter in dynamic class 212s understands class << self 212s registers an offense for duplicate nested method in self method of class_eval block 212s registers an offense for duplicate class methods in module 212s recognizes difference between instance and class methods in class 212s registers an offense when class << exp is used 212s registers an offense for duplicate alias_method in class_eval block 212s registers an offense for duplicate alias_method in dynamic module 212s registers 2 offenses for pair of duplicate methods in class 212s accepts for attr_reader and setter in dynamic module 212s registers an offense for duplicate private methods in dynamic module 212s registers an offense for duplicate private self methods in dynamic module 212s registers an offense for duplicate method in class_eval block 212s registers 2 offenses for pair of duplicate methods in class_eval block 212s registers an offense for duplicate nested method in self method of dynamic module 212s registers offenses for duplicate attr_accessor in class_eval block 212s accepts for attr_writer and getter in dynamic class 212s understands class << self 212s doesn't register offense for non-duplicate class methods in class_eval block 212s registers an offense for a duplicate class method in separate class_eval block blocks 212s doesn't register offense for non-duplicate class methods in dynamic class 212s registers an offense for duplicate alias_method in module 212s understands class << self 212s recognizes difference between instance and class methods in module 212s registers an offense for duplicate private methods in class 212s registers an offense for duplicate class methods in class_eval block 212s registers an offense for duplicate protected methods in module 212s registers offenses for duplicate assignable attr in class_eval block 212s doesn't register offense for non-duplicate class methods in class 212s understands nested modules 212s registers an offense for duplicate class methods in dynamic module 212s doesn't register an offense for alias for gvar in dynamic class 212s accepts for attr_writer and getter in class 212s doesn't register an offense for non-duplicate method in dynamic module 212s only registers an offense for the second instance of a duplicate instance method in separate files 212s only registers an offense for the second instance of a duplicate instance method in separate files 212s recognizes difference between instance and class methods in dynamic class 212s accepts for attr_reader and setter in class_eval block 212s accepts for attr_writer and getter in module 212s registers an offense for duplicate nested method in class_eval block 212s doesn't register an offense for non-duplicate method in class_eval block 212s doesn't register an offense for different private methods in class_eval block 212s registers an offense for duplicate private methods in module 212s registers offenses for duplicate assignable attr in class 212s does not register an offense for same method name defined in different methods 212s only registers an offense for the second instance of a duplicate instance method in separate files 212s registers an offense for duplicate alias_method in dynamic class 212s only registers an offense for the second instance of a duplicate instance method in separate files 212s properly registers and offense when deeply nested 212s registers 2 offenses for pair of duplicate methods in dynamic module 212s registers an offense for a duplicate class method in separate dynamic class blocks 212s does not register an offense for same method name defined in different self methods 212s registers an offense for duplicate attr_reader in dynamic module 212s registers an offense when class << exp is used 212s registers an offense for duplicate private self methods in dynamic class 212s registers 2 offenses for pair of duplicate methods in dynamic class 212s registers an offense for duplicate attr in dynamic class 212s does not register an offense for same method name defined in different self methods 212s registers an offense for duplicate class methods in dynamic class 212s registers an offense for duplicate class methods with `self` and named receiver in module 212s understands class << self 212s does not register an offense for same method name defined in different self methods 212s does not register an offense for same method name defined in different self methods 212s doesn't register an offense for different private methods in class 212s registers offenses for duplicate assignable attr in dynamic module 212s registers an offense for duplicate nested method in module 212s registers an offense for a duplicate instance method in separate dynamic module blocks 212s doesn't register an offense for non-duplicate alias in dynamic class 212s ignores Class.new blocks which are assigned to local variables 212s registers an offense when class << exp is used 212s registers an offense when class << exp is used 212s registers an offense for duplicate nested method in self method of dynamic class 212s only registers an offense for the second instance of a duplicate instance method in separate files 212s registers an offense for a duplicate instance method in separate dynamic class blocks 212s does not register an offense for same method name defined in different self methods 212s registers an offense for duplicate private self methods in class 212s accepts for non-duplicate alias_method in dynamic class 212s registers an offense for duplicate method in dynamic class 212s registers 2 offenses for pair of duplicate methods in module 212s registers an offense for duplicate attr in class 212s accepts for attr_reader and setter in class 212s understands class << self 212s registers an offense for duplicate alias in class_eval block 212s does not register an offense for same method name defined in different methods 212s recognizes difference between instance and class methods in class_eval block 212s doesn't register offense for non-duplicate class methods in module 212s registers an offense for duplicate protected methods in dynamic module 212s registers an offense for duplicate attr in class_eval block 212s ignores method definitions in RSpec `describe` blocks 212s registers an offense for duplicate attr_writer in dynamic module 212s registers an offense for duplicate private self methods in module 212s registers an offense for duplicate method in dynamic module 212s registers an offense for duplicate protected methods in class_eval block 212s accepts for attr_reader and setter in module 212s registers an offense for duplicate attr_writer in module 212s doesn't register offense for non-duplicate class methods in dynamic module 212s understands nested modules 212s accepts for non-duplicate alias_method in class_eval block 212s accepts for non-duplicate alias_method in module 212s registers offenses for duplicate assignable attr in dynamic class 212s registers an offense for duplicate protected methods in class 212s registers an offense for duplicate method in module 212s understands nested modules 212s registers an offense for a duplicate instance method in separate module blocks 212s doesn't register an offense for non-duplicate alias in dynamic module 212s registers an offense for duplicate alias in module 212s doesn't register an offense for non-duplicate method in module 212s registers an offense for duplicate method in class 212s doesn't register an offense for non-duplicate alias in module 212s registers an offense for duplicate nested method in class 212s accepts for non-duplicate alias_method in dynamic module 212s does not register for the same method in different scopes within `class << self` 212s registers an offense for a duplicate class method in separate class blocks 212s registers an offense for duplicate alias in dynamic class 212s understands nested modules 212s registers offenses for duplicate attr_accessor in class 212s registers an offense for duplicate nested method in dynamic module 212s registers an offense for duplicate methods at top level 212s registers offenses for duplicate attr_accessor in dynamic class 212s does not register an offense for same method name defined in different methods 212s registers an offense for duplicate attr_writer in class 212s registers an offense for a duplicate class method in separate dynamic module blocks 212s doesn't register an offense for non-duplicate method in class 212s registers an offense for duplicate attr_reader in class 212s registers an offense for duplicate class methods with `<<` and named receiver in module 213s registers an offense for duplicate nested method in self method of module 213s registers an offense for duplicate class methods with `self` and named receiver in class 213s registers an offense for duplicate alias in dynamic module 213s doesn't register an offense for different private methods in dynamic class 213s registers an offense for duplicate alias in class 213s registers an offense for a duplicate class method in separate module blocks 213s understands class << A 213s does not register an offense for same method name defined in different methods 213s registers an offense for duplicate alias_method in class 213s registers offenses for duplicate attr_accessor in dynamic module 213s registers an offense for duplicate class methods with `<<` and named receiver in class 213s doesn't register an offense for different private methods in dynamic module 213s registers an offense for duplicate private self methods in class_eval block 213s doesn't register an offense for non-duplicate method in dynamic class 213s registers an offense for duplicate nested method in self method of class 213s doesn't register an offense for non-duplicate alias in class_eval block 213s registers an offense for duplicate private methods in class_eval block 213s registers an offense for duplicate attr in dynamic module 213s registers an offense for duplicate class methods with named receiver in module 213s registers offenses for duplicate attr_accessor in module 213s registers an offense for duplicate attr_reader in class_eval block 213s registers an offense for duplicate nested method in dynamic class 213s doesn't register an offense for alias for gvar in class 213s when path is in the project root 213s adds a message with relative path 213s when path is not in the project root 213s adds a message with absolute path 213s 213s RuboCop::Cop::Metrics::Utils::CodeLengthCalculator 213s #calculate 213s raises when unknown foldable type is passed 213s when class 213s folds heredocs if asked 213s does not count lines of inner classes 213s does not count blank lines 213s folds hashes if asked 213s calculates class length 213s counts comments if asked 213s folds arrays if asked 213s when method 213s folds multiline hashes with line break after it as method args if asked 213s folds heredocs if asked 213s counts single line correctly if asked folding 213s folds multiline hashes without braces as method args if asked 213s does not count blank lines 213s folds hashes as method kwargs if asked 213s calculates method length 213s counts single line hash with line breaks correctly if asked folding 213s folds multiline hashes with line break before it as method args if asked 213s counts single line without parentheses correctly if asked folding 213s folds hashes if asked 213s counts single line hash as the one of method args if asked folding 213s folds hashes without braces as the one of method args if asked 213s counts single line hash as the one of method args with safe navigation operator if asked folding 213s counts single line hash with other args correctly if asked folding 213s folds hashes as method args if asked 213s folds hashes with comment if asked 213s counts comments if asked 213s folds arrays if asked 213s 213s RuboCop::Cop::Lint::SymbolConversion 213s does not register an offense for a dstr 213s does not register an offense for a normal symbol 213s does not register an offense for a symbol that requires quotes 213s behaves like offense 213s registers an offense for :"foo" 213s behaves like offense 213s registers an offense for "foo-bar".intern 213s EnforcedStyle: consistent 213s with a mix of string and symbol keys 213s does not register an offense 213s hash where keys are quoted but do not need to be 213s registers an offense 213s hash where no keys need to be quoted 213s does not register an offense 213s hash where there are keys needing quoting 213s registers an offense for unquoted keys 213s with different quote styles 213s does not register an offense 213s with a key with = 213s requires symbols to be quoted 213s behaves like offense 213s registers an offense for "foo_bar".to_sym 213s behaves like offense 213s registers an offense for "foo_bar".intern 213s behaves like offense 213s registers an offense for "foo-bar".to_sym 213s behaves like offense 213s registers an offense for "foo".to_sym 213s behaves like offense 213s registers an offense for :foo.intern 213s inside a percent literal array 213s does not register an offense 213s in an alias 213s does not register an offense 213s behaves like offense 213s registers an offense for "foo".intern 213s implicit `to_sym` call 213s does not register an offense 213s in a hash 213s values 213s does not register an offense for a normal symbol 213s registers an offense for a quoted symbol key 213s registers an offense for a quoted symbol value 213s keys 213s does not register an offense for a require quoted symbol 213s does not register an offense for operators 213s registers and corrects an offense for a quoted symbol that ends with `!` 213s registers and corrects an offense for a quoted symbol that ends with `?` 213s does not register an offense for a require quoted symbol that ends with `=` 213s does not register an offense for a normal symbol 213s registers an offense for a quoted symbol 213s does not register an offense for a require quoted symbol that contains `:` 213s behaves like offense 213s registers an offense for :"foo_bar" 213s behaves like offense 213s registers an offense for :foo.to_sym 213s single quoted symbol 213s does not register an offense 213s 213s RuboCop::Formatter::JUnitFormatter 213s #file_finished 213s displays an offense for `classname='test_2` in parsable text 213s displays end of parsable text 213s displays an offense for `classname='test_1` in parsable text 213s displays a non-offense element in parsable text 213s displays start of parsable text 213s 213s RuboCop::Cop::Style::TernaryParentheses 213s when configured to enforce parentheses omission 213s accepts condition including a range 213s with no space between the parentheses and question mark 213s registers an offense 213s with a simple condition 213s registers an offense for accessor in condition 213s registers an offense for yield in condition 213s accepts multi-line boolean expression starting on following line 213s registers an offense for query method in condition 213s registers an offense for multi-line boolean expression 213s with a complex condition 213s accepts parens around inner boolean expression 213s registers an offense for negated condition 213s registers an offense for defined with nested constant in condition 213s registers an offense for boolean expression using keyword 213s registers an offense for defined with method chain in condition 213s registers an offense for query method on object 213s registers an offense for defined with variable in condition 213s registers an offense for defined with class method in condition 213s registers an offense for equality check 213s registers an offense for arithmetic expression 213s registers an offense for boolean expression 213s with one line pattern matching 213s does not register an offense 213s with one line pattern matching 213s does not register an offense 213s with an assignment condition 213s registers an offense for equality check 213s accepts safe assignment 213s accepts double safe assignment 213s accepts safe assignment as part of multiple assignment 213s behaves like safe assignment disabled 213s registers an offense for parens around outer assignment 213s registers an offense for parens around inner assignment 213s registers an offense for parens around assignment 213s with an unparenthesized method call condition 213s registers an offense when calling method with a parameter 213s registers an offense for defined check 213s when calling method on a constant receiver 213s registers an offense 213s when calling method on a receiver 213s registers an offense 213s when calling method on a literal receiver 213s registers an offense 213s when calling method with multiple arguments 213s registers an offense 213s when configured to enforce parentheses inclusion 213s with a simple condition 213s registers an offense for query method in condition 213s registers an offense for accessor in condition 213s registers an offense for yield in condition 213s with a complex condition 213s registers an offense for boolean expression 213s registers an offense for defined? with variable in condition 213s registers an offense for defined? with class method in condition 213s registers an offense for arithmetic condition 213s registers an offense for defined? with method chain in condition 213s registers an offense for negated condition 213s registers an offense for boolean expression using keyword 213s registers an offense for boolean expression containing parens 213s registers an offense when calling method on a receiver 213s registers an offense for equality check 213s registers an offense for defined? with nested constant in condition 213s with an assignment condition 213s registers an offense for triple assignment 213s registers an offense for double assignment with equality check in condition 213s accepts safe assignment in condition 213s registers an offense for double assignment 213s configured for parentheses on complex and there are parens 213s accepts condition including a range 213s with a simple condition 213s registers an offense for query method in condition 213s registers an offense for accessor in condition 213s registers an offense for yield in condition 213s registers an offense for save navigation 213s registers an offense with preceding boolean keyword expression 213s with a complex condition 213s registers an offense for defined with nested constant in condition 213s registers an offense when calling method on a receiver 213s registers an offense for defined with variable in condition 213s registers an offense for defined with class method in condition 213s accepts boolean expression using keywords 213s accepts boolean expression 213s registers an offense for defined with method chain in condition 213s with an assignment condition 213s accepts equality check 213s accepts safe assignment as part of multiple assignment 213s accepts safe assignment 213s accepts accepts safe multiple assignment 213s behaves like safe assignment disabled 213s registers an offense for parens around inner assignment 213s registers an offense for parens around assignment 213s registers an offense for parens around outer assignment 213s with method call condition 213s registers an offense for defined check 213s registers an offense when calling method with a parameter 213s registers an offense when calling method on a receiver 213s with accessor in method call parameters 213s registers an offense for array include? without parens 213s registers an offense for array include? with multiple parameters with parens 213s registers an offense for array include? with multiple parameters without parens 213s without accessor in method call parameters 213s registers an offense for array include? with parens 213s registers an offense for array include? without parens 213s configured for parentheses on complex and there are no parens 213s with complex condition 213s registers an offense for comparison with multiplication 213s registers an offense for addition expression 213s registers an offense for subtraction expression 213s registers an offense for comparison with method call on receiver 213s registers an offense for arithmetic and equality check 213s registers an offense comparison with exponentiation 213s registers an offense for compound boolean expression 213s registers an offense for boolean expression 213s registers an offense for boolean expression with inner parens 213s registers an offense for comparison 213s with an assignment condition 213s accepts safe assignment 213s registers an offense for equality check 213s 213s RuboCop::Cop::Naming::VariableName 213s when configured for snake_case 213s registers an offense for method arguments 213s registers an offense for default method arguments 213s registers an offense for camel case in instance variable name 213s registers an offense for block arguments 213s registers an offense for keyword arguments 213s registers an offense for camel case when invoking method args 213s registers an offense for camel case in local variable name 213s accepts assigning to camel case constant 213s accepts one symbol size local variables 213s accepts screaming snake case globals 213s accepts local variables marked as unused 213s accepts screaming snake case constants 213s registers an offense for camel case in class variable name 213s registers an offense for keyword rest arguments 213s registers an offense for camel case local variables marked as unused 213s registers an offense for rest arguments 213s accepts assignment with indexing of self 213s registers an offense for correct + opposite 213s when AllowedIdentifiers is set 213s does not register an offense for a local variable name that is allowed 213s does not register an offense for a class variable name that is allowed 213s does not register an offense for a symbol that is allowed 213s does not register an offense for a instance variable name that is allowed 213s does not register an offense for a method name that is allowed 213s does not register an offense for a global variable name that is allowed 213s when AllowedPatterns is set 213s does not register an offense for a method name that matches the allowed pattern 213s does not register an offense for a local variable name that matches the allowed pattern 213s does not register an offense for a symbol that matches the allowed pattern 213s does not register an offense for a global variable name that matches the allowed pattern 213s does not register an offense for a class variable name that matches the allowed pattern 213s does not register an offense for a instance variable name that matches the allowed pattern 213s when configured for camelCase 213s accepts one symbol size local variables 213s registers an offense for default method arguments 213s accepts screaming snake case globals 213s accepts local variables marked as unused 213s registers an offense for keyword arguments 213s accepts assignment with indexing of self 213s registers an offense for camel case when invoking method args 213s registers an offense for opposite + correct 213s accepts camel case local variables marked as unused 213s accepts with non-ascii characters 213s registers an offense for snake case in method parameter 213s registers an offense for snake case in local variable name 213s accepts camel case in local variable name 213s registers an offense for block arguments 213s registers an offense for keyword rest arguments 213s accepts screaming snake case constants 213s accepts assigning to camel case constant 213s accepts camel case in class variable name 213s accepts camel case in instance variable name 213s registers an offense for rest arguments 213s when AllowedIdentifiers is set 213s does not register an offense for a class variable name that is allowed 213s does not register an offense for a method name that is allowed 213s does not register an offense for a symbol that is allowed 213s does not register an offense for a global variable name that is allowed 213s does not register an offense for a local variable name that is allowed 213s does not register an offense for a instance variable name that is allowed 213s when AllowedPatterns is set 213s does not register an offense for a symbol that matches the allowed pattern 213s does not register an offense for a class variable name that matches the allowed pattern 213s does not register an offense for a instance variable name that matches the allowed pattern 213s does not register an offense for a global variable name that matches the allowed pattern 214s does not register an offense for a method name that matches the allowed pattern 214s does not register an offense for a local variable name that matches the allowed pattern 214s 214s RuboCop::Cop::Layout::MultilineHashKeyLineBreaks 214s without line break after opening bracket 214s registers an offense and corrects nested hashes 214s registers an offense and corrects when key starts on same line as another 214s when on same line 214s does not add any offenses 214s with line break after opening bracket 214s registers an offense and corrects when key starts on same line as another 214s when key starts on same line as another with rockets 214s adds an offense 214s when on all keys on one line different than brackets 214s does not add any offenses 214s when on different lines than brackets but keys on one 214s does not add any offenses 214s 214s RuboCop::Cop::Style::TrailingCommaInArguments 214s with multi-line list of values 214s when EnforcedStyleForMultiline is comma 214s accepts a trailing comma in a method call with single line hashes 214s does not break when a safe method call is chained on the offending simple one 214s does not break when a safe method call is chained on the offending more complex one 214s does not break when a method call is chained on the offending one 214s accepts no trailing comma in a method call with a multiline braceless hash at the end with more than one parameter on a line 214s registers an offense for no trailing comma in a method call with hash parameters at the end 214s accepts a multiline call with a single argument and trailing comma 214s accepts trailing comma in a method call with hash parameters at the end 214s accepts a method call with two parameters on the same line 214s accepts an empty hash being passed as a method argument 214s accepts missing comma after heredoc with comments 214s when closing bracket is on same line as last value 214s accepts a method call with Hash as last parameter split on multiple lines 214s when EnforcedStyleForMultiline is consistent_comma 214s accepts no trailing comma in a method call with a block parameter at the end 214s accepts a trailing comma in a method call with a single hash parameter to a receiver object 214s autocorrects missing comma after a heredoc 214s accepts a multiline call with a single argument and trailing comma 214s accepts a multiline call with single argument on multiple lines 214s accepts a multiline call with arguments on a single line and trailing comma 214s accepts trailing comma in a method call with hash parameters at the end 214s accepts a trailing comma in a method call with single line hashes 214s registers an offense for no trailing comma in a method call withtwo parameters on the same line 214s registers an offense for no trailing comma in a method call with hash parameters at the end 214s accepts a trailing comma in a method call with a single hash parameter 214s when closing bracket is on same line as last value 214s registers an offense for a method call, with a Hash as the last parameter, split on multiple lines 214s when EnforcedStyleForMultiline is no_comma 214s accepts comma inside a heredoc parameter at the end 214s accepts comma inside a heredoc in brackets 214s accepts comma inside a heredoc with comments inside 214s accepts comma inside a heredoc with method and comments inside 214s registers an offense for trailing comma in a method call with hash parameters at the end 214s accepts a method call with hash parameters at the end and no trailing comma 214s accepts comma inside a modified heredoc parameter 214s autocorrects unwanted comma after modified heredoc parameter 214s when there is string interpolation inside heredoc parameter 214s accepts comma inside a heredoc parameter 214s autocorrects unwanted comma inside string interpolation 214s accepts comma inside a heredoc parameter when on a single line 214s with a single argument of anonymous function spanning multiple lines 214s when EnforcedStyleForMultiline is consistent_comma 214s accepts a single argument with no trailing comma 214s with single line list of values 214s when EnforcedStyleForMultiline is consistent_comma 214s accepts method call without parameters 214s registers an offense for trailing comma in a method call 214s registers an offense for trailing comma in a method call with hash parameters at the end 214s registers an offense for trailing comma preceded by whitespace in a method call 214s accepts method call without trailing comma when a line break before a method call 214s accepts method call without trailing comma 214s accepts method call without trailing comma with single element hash parameters at the end 214s accepts chained single-line method calls 214s accepts heredoc without trailing comma 214s when using safe navigation operator 214s registers an offense for trailing comma in a method call with hash parameters at the end 214s registers an offense for trailing comma in a method call 214s when EnforcedStyleForMultiline is no_comma 214s registers an offense for trailing comma in a method call 214s registers an offense for trailing comma preceded by whitespace in a method call 214s accepts method call without parameters 214s accepts method call without trailing comma with single element hash parameters at the end 214s accepts chained single-line method calls 214s accepts heredoc without trailing comma 214s accepts method call without trailing comma when a line break before a method call 214s registers an offense for trailing comma in a method call with hash parameters at the end 214s accepts method call without trailing comma 214s when using safe navigation operator 214s registers an offense for trailing comma in a method call 214s registers an offense for trailing comma in a method call with hash parameters at the end 214s when EnforcedStyleForMultiline is comma 214s registers an offense for trailing comma in a method call with hash parameters at the end 214s registers an offense for trailing comma preceded by whitespace in a method call 214s accepts method call without trailing comma 214s accepts method call without trailing comma when a line break before a method call 214s accepts chained single-line method calls 214s registers an offense for trailing comma in a method call 214s accepts method call without trailing comma with single element hash parameters at the end 214s accepts method call without parameters 214s accepts heredoc without trailing comma 214s when using safe navigation operator 214s registers an offense for trailing comma in a method call with hash parameters at the end 214s registers an offense for trailing comma in a method call 214s with a single argument spanning multiple lines 214s when EnforcedStyleForMultiline is consistent_comma 214s accepts a single argument with no trailing comma 214s 214s RuboCop::Cop::Metrics::CyclomaticComplexity 214s when AllowedMethods is enabled 214s does not register an offense when defining a class method 214s does not register an offense when defining an instance method 214s does not register an offense when using `define_method` 214s when Max is 1 214s registers an offense for &. 214s registers an offense for or 214s accepts a method with no decision points 214s registers an offense for || 214s counts only a single method 214s registers an offense for a rescue block 214s registers an offense for and 214s registers an offense for a ternary operator 214s counts enumerating methods with blocks as +1 214s registers an offense for a case/when block 214s registers an offense for an if modifier 214s does not count blocks in general 214s registers an offense for an until block 214s registers an offense for a for block 214s registers an offense for a while block 214s registers an offense for a `define_method` 214s registers an offense for &&= 214s deals with nested if blocks containing && and || 214s registers an offense for an unless modifier 214s registers an offense for ||= 214s accepts an empty method 214s counts enumerating methods with block-pass as +1 214s registers an offense for && 214s registers an offense for an elsif block 214s accepts an empty `define_method` 214s accepts complex code outside of methods 214s counts repeated &. on same untouched local variable as 1 214s Ruby 2.7 214s counts enumerating methods with numblocks as +1 214s when AllowedPatterns is enabled 214s does not register an offense when defining an instance method 214s does not register an offense when using `define_method` 214s does not register an offense when defining a class method 214s when Max is 2 214s counts stupid nested if and else blocks 214s 214s RuboCop::Cop::Style::EmptyMethod 214s when configured with expanded style 214s with a non-empty instance method definition 214s allows multi line method with a comment 214s allows multi line method 214s allows single line method 214s with an empty instance method definition 214s registers an offense for single line method 214s allows multi line method with blank line 214s allows multi line method 214s with a non-empty class method definition 214s allows multi line method with comment 214s allows single line method 214s allows multi line method 214s relation with Layout/LineLength 214s still corrects even if the method is longer than the configured Max 214s with an empty class method definition 214s registers an offense for single line method 214s allows empty multi line method 214s allows multi line method with a blank line 214s when method is nested in class scope 214s registers an offense for single line method 214s when configured with compact style 214s relation with Layout/LineLength 214s when that cop is disabled 214s corrects to long lines 214s when the correction would exceed the configured maximum 214s reports an offense but does not correct 214s with an empty instance method definition 214s registers an offense for method with arguments without parens 214s registers an offense for empty method 214s registers an offense for method with closing paren on following line 214s registers an offense for method with arguments 214s allows single line method 214s registers an offense for method with blank line 214s with a non-empty instance method definition 214s allows multi line method with comment 214s allows multi line method 214s allows single line method 214s with an empty class method definition 214s registers an offense for method with blank line 214s registers an offense for empty method 214s registers an offense for empty method with arguments 214s allows single line method 214s with a non-empty class method definition 214s allows single line method 214s allows multi line method 214s allows multi line method with comment 214s 214s RuboCop::Cop::Style::ZeroLengthPredicate 214s with collection variables 214s registers an offense for `0 != collection.size` 214s registers an offense for `collection.size == 0` 214s registers an offense for `collection.size != 0` 214s registers an offense for `0 == collection.size` 214s when inspecting a StringIO object 214s when initialized with a string 214s does not register an offense with top-level ::StringIO 214s does not register an offense 214s when initialized without arguments 214s does not register an offense with top-level ::StringIO 214s does not register an offense 214s when name of the variable is `size` or `length` 214s accepts inequality check 214s accepts equality check 214s accepts comparison 214s with hashes 214s registers an offense for `0 != hash.size` 214s registers an offense for `hash.size != 0` 214s registers an offense for `hash.size == 0` 214s registers an offense for `0 == hash.size 214s when inspecting a File::Stat object 214s does not register an offense with ::File 214s does not register an offense 214s when inspecting a Tempfile object 214s does not register an offense 214s does not register an offense with top-level ::Tempfile 214s with strings 214s registers an offense for `0 == string.size` 214s registers an offense for `string.size != 0` 214s registers an offense for `0 != string.size` 214s registers an offense for `string.size == 0` 214s with arrays 214s registers an offense for `array.size == 0` 214s registers an offense for `0 != array.size` 214s registers an offense for `1 > array.length` 214s registers an offense for `0 == array.size` 214s registers an offense for `array.length > 0` 214s registers an offense for `array.length == 0` 214s registers an offense for `array.length != 0` 214s registers an offense for `array.length < 1` 214s registers an offense for `0 == array.length` 214s registers an offense for `array.size != 0` 214s registers an offense for `0 < array.size` 214s registers an offense for `array.size > 0` 214s registers an offense for `1 > array.size` 214s registers an offense for `array.size < 1` 214s registers an offense for `0 < array.length 214s registers an offense for `0 != array.length` 214s 214s RuboCop::Cop::Lint::ConstantDefinitionInBlock 214s does not register an offense for a top-level class 214s does not register an offense for a constant with an explicit top-level scope 214s does not register an offense for a constant with an explicit self scope followed by another statement 214s registers an offense for a class defined within a block 214s does not register an offense for a top-level module followed by another statement 214s does not register an offense for a top-level constant followed by another statement 214s does not register an offense for a constant with an explicit self scope 214s registers an offense for a constant defined within a block 214s registers an offense for a module defined within a block 214s registers an offense for a module defined within a block followed by another statement 214s does not register an offense for a constant with an explicit top-level scope followed by another statement 214s registers an offense for a class defined within a block followed by another statement 214s does not register an offense for a top-level constant 214s does not register an offense for a top-level class followed by another statement 214s does not register an offense for a top-level module 214s registers an offense for a constant defined within a block followed by another statement 214s when `AllowedMethods: []` 214s registers an offense for a module defined within a block of `enums` method 214s registers an offense for a class defined within a block of `enums` method 214s registers an offense for a casign used within a block of `enums` method 214s when `AllowedMethods: [enums]` 214s does not register an offense for a casign used within a block of `enums` method 214s does not register an offense for a class defined within a block of `enums` method 214s does not register an offense for a module defined within a block of `enums` method 214s 214s RuboCop::Cop::Style::NumberedParametersLimit 214s with Ruby >= 2.7 214s does not register an offense for a numblock with fewer than `Max` parameters 214s does not register an offense for a numblock with exactly `Max` parameters 214s does not register an offense for a normal block with too many parameters 214s sets Max properly for auto-gen-config 214s when there are more than `Max` numbered parameters 214s registers an offense for a multiline `numblock` 214s registers an offense for a single line `numblock` 214s when Max is 1 214s uses the right offense message 214s when configuring Max 214s does not register an offense when there are not too many numbered params 214s 214s RuboCop::Cop::Style::IfInsideElse 214s handles a nested `if...then...else...end` 214s handles a nested `if...then...end` 214s ignores unless inside else 214s catches an if..else nested inside an else 214s handles a nested multiline `if...then...elsif...else...end` 214s catches an `if..else` nested inside an `else` and nested inside `if` branch code is empty 214s ignores nested ternary expressions 214s isn't offended by if..elsif..else 214s isn't offended if there is a statement following the if node 214s catches an if node nested inside an else 214s handles a nested `if...then...elsif...else...end` 214s ignores if inside unless 214s ignores ternary inside if..else 214s handles a nested `if...then...elsif...end` 214s catches a modifier if nested inside an else after elsif 214s isn't offended if there is a statement preceding the if node 214s catches an if..elsif..else nested inside an else 214s when AllowIfModifier is false 214s catches a modifier if nested inside an else 214s when AllowIfModifier is true 214s accepts a modifier if nested inside an else 214s 214s RuboCop::Cop::Lint::InterpolationCheck 214s does not register an offense for interpolation in nested strings 214s does not register an offense for escaped crab claws in dstr 214s does not register an offense for an escaped interpolation 214s registers an offense for interpolation in single quoted split string 214s does not register offense for strings in %w() 214s does not register an offense for properly interpolation strings 214s registers an offense for interpolation in double + single quoted split string 214s does not register an offense for interpolation in a regexp 214s registers an offense and corrects for interpolation in single quoted string 214s registers an offense and corrects when including interpolation and double quoted string in single quoted string 214s does not crash for \xff 214s 214s RuboCop::Cop::Style::IfUnlessModifierOfIfUnless 214s provides a good error message 214s conditional with modifier in body 214s accepts 214s `unless` / `else` with modifier 214s registers an offense and corrects 214s ternary with modifier 214s registers an offense and corrects 214s conditional with modifier 214s registers an offense and corrects 214s nested conditionals 214s accepts 214s 214s RuboCop::Cop::Style::InverseMethods 214s registers an offense for not (foo < bar) 214s registers an offense for calling !.any? inside parens 214s registers an offense for !(foo !~ bar) 214s registers an offense for !foo.exclude? 214s registers an offense for !foo.include? 214s allows comparing camel case constants on the left 214s registers an offense for !(foo < bar) 214s registers an offense for !(foo =~ bar) 214s allows an inverse method in a block with next 214s registers an offense for not (foo !~ bar) 214s registers an offense for not (foo > bar) 214s registers an offense for !(foo > bar) 214s registers an offense for !(foo == bar) 214s registers an offense for !foo.blank? 214s registers an offense for !foo.none? 214s allows an inverse method when double negation is used 214s registers an offense for not (foo =~ bar) 214s registers an offense for calling !.none? with a symbol proc 214s registers an offense for not (foo != bar) 214s registers an offense for !foo.present? 214s registers an offense for comparing snake case constants on the right 214s registers an offense for comparing snake case constants on the left 214s registers an offense for !foo.odd? 214s registers an offense for !(foo != bar) 214s registers an offense for not (foo == bar) 214s allows an inverse method with a block when double negation is used 214s registers an offense for !foo.any? 214s allows a method call without a not 214s registers an offense for !foo.even? 214s registers an offense for calling !.none? with a block 214s allows comparing camel case constants on the right 214s behaves like all variable types 214s registers an offense for calling not @@foo.none? 214s registers an offense for calling !@@foo.none? 214s behaves like all variable types 214s registers an offense for calling not foo.none? 214s registers an offense for calling !foo.none? 214s behaves like all variable types 214s registers an offense for calling !foo["bar"].none? 214s registers an offense for calling not foo["bar"].none? 214s behaves like all variable types 214s registers an offense for calling !@foo.none? 214s registers an offense for calling not @foo.none? 214s behaves like all variable types 214s registers an offense for calling !$foo.none? 214s registers an offense for calling not $foo.none? 214s behaves like all variable types 214s registers an offense for calling not foo.bar.none? 214s registers an offense for calling !foo.bar.none? 214s Ruby 2.7 214s registers an offense for calling !.none? with a numblock 214s behaves like all variable types 214s registers an offense for calling not FOO::BAR.none? 214s registers an offense for calling !FOO::BAR.none? 214s inverse blocks 214s corrects an inverted method call when using `BasicObject#!` with spaces before the method call 214s registers a single offense for nested inverse method calls 214s registers an offense for a multiline inverted equality block 214s registers an offense for a multiline method call where the last method is inverted 214s registers an offense for a multiline inverted equality block 214s corrects an inverted method call 215s registers an offense for an inverted equality block 215s corrects an inverted method call when using `BasicObject#!` with spaces before the method call 215s registers a single offense for nested inverse method calls 215s registers a single offense for nested inverse method calls 215s corrects an inverted do end method call 215s corrects a complex inverted method call 215s corrects an inverted method call when using `BasicObject#!` 215s registers an offense for foo.reject { |e| !e } 215s registers an offense for an inverted equality block 215s registers an offense for a multiline method call where the last method is inverted 215s corrects an inverted method call when using `BasicObject#!` 215s registers an offense for a multiline method call where the last method is inverted 215s registers an offense for an inverted equality block 215s corrects a complex inverted method call 215s corrects an inverted method call when using `BasicObject#!` with spaces before the method call 215s corrects a complex inverted method call 215s corrects an inverted method call 215s corrects an inverted method call when using `BasicObject#!` with spaces before the method call 215s corrects an inverted do end method call 215s corrects an inverted method call when using `BasicObject#!` 215s registers an offense for a multiline inverted equality block 215s corrects an inverted method call 215s registers a single offense for nested inverse method calls 215s corrects an inverted method call 215s registers an offense for an inverted equality block 215s corrects an inverted method call when using `BasicObject#!` 215s registers an offense for foo.reject! { |e| !e } 215s corrects a complex inverted method call 215s corrects an inverted do end method call 215s registers an offense for foo.select! { |e| !e } 215s corrects an inverted do end method call 215s registers an offense for a multiline inverted equality block 215s registers an offense for foo.select { |e| !e } 215s registers an offense for a multiline method call where the last method is inverted 215s behaves like all variable types 215s registers an offense for calling !FOO.none? 215s registers an offense for calling not FOO.none? 215s 215s RuboCop::Cop::Layout::EmptyLinesAroundModuleBody 215s when EnforcedStyle is empty_lines 215s registers an offense for module body not starting or ending with a blank 215s registers an offense for module body not ending with a blank 215s autocorrects beginning and end 215s accepts modules with an empty body 215s when EnforcedStyle is no_empty_lines 215s registers an offense for module body starting with a blank 215s autocorrects beginning and end 215s registers an offense for module body ending with a blank 215s when EnforcedStyle is empty_lines_special 215s when first child is a method 215s requires blank line at the beginning and ending of module body 215s when module has a namespace 215s requires no empty lines for namespace but requires blank line at the beginning and ending of module body 215s source without blank lines 215s registers and autocorrects the offenses 215s source with blank lines 215s autocorrects the offenses 215s source without blank lines 215s registers an offense for module not beginning and ending with a blank line 215s when first child is an access modifier 215s with no blank lines at the beginning and ending of module body 215s registers and corrects an offense 215s with blank lines at the beginning and ending of module body 215s registers no offense 215s module with constant and child module 215s registers and autocorrects the offenses 215s when namespace has multiple children 215s requires empty lines for namespace 215s module with empty body 215s without empty line 215s does NOT register offenses 215s with empty line 215s does NOT register offenses 215s module with only constants 215s registers and autocorrects the offenses 215s when first child is NOT a method 215s does not require blank line at the beginning of module body but requires blank line before first def definition and requires blank line at the end of module body 215s source with blank lines 215s registers an offense for module beginning with a blank line 215s when module has a namespace 215s requires no empty lines for namespace and does not require blank line at the beginning of module body but requires blank line at the end of module body 215s source with blank lines 215s registers and autocorrects the offenses 215s source without blank lines 215s registers and autocorrects the offenses 215s source with constants 215s registers and autocorrects the offenses 215s source without blank lines 215s registers an offense for module not ending with a blank line 215s source with comment before method definition 215s registers an offense for module beginning with a blank line 215s when EnforcedStyle is empty_lines_except_namespace 215s when only child is module 215s requires no empty lines for namespace 215s autocorrects beginning and end 215s registers offense for namespace body ending with a blank 215s registers offenses for namespaced module body not ending with a blank 215s registers offenses for namespaced module body not starting with a blank 215s registers offense for namespace body starting with a blank 215s when only child is class 215s registers offense for namespace body starting with a blank 215s registers offense for namespace body ending with a blank 215s requires no empty lines for namespace 215s when has multiple child modules 215s registers offenses for namespace body starting and ending without a blank 215s requires empty lines for namespace 215s 215s RuboCop::Cop::Style::SingleLineMethods 215s autocorrects def with argument and no parentheses 215s autocorrects def with semicolon before end 215s autocorrects def with semicolon after method name 215s accepts a multi-line method 215s does not crash on an method with a capitalized name 215s registers an offense for a single-line method 215s registers an offense for a single-line method and method body is enclosed in parentheses 215s autocorrects defs with parentheses after method name 215s autocorrects def with argument in parentheses 215s when AllowIfMethodIsEmpty is disabled 215s registers an offense for an empty method 215s when `Style/EndlessMethod` is enabled 215s with `allow_always` style 215s behaves like convert to endless method 215s corrects to an endless method definition 215s corrects to an endless class method definition when using == 215s corrects to an endless class method definition when using < 215s does not to an endless class method definition when using `break` 215s corrects to an endless method definition when method body is a literal 215s does not to an endless class method definition when using `next` 215s handles arguments properly 215s corrects to multiline method definition when defining setter method 215s corrects to an endless class method definition 215s corrects to an endless class method definition when using > 215s corrects to an endless class method definition when using === 215s retains comments 215s corrects to an endless class method definition when using >= 215s corrects to a normal method if the method body contains multiple statements 215s corrects to an endless class method definition when using != 215s corrects to an endless method definition when single line method call with parentheses 215s does not to an endless class method definition when using `return` 215s corrects to an endless class method definition when using <= 215s corrects to an endless method definition when single line method call without parentheses 215s does not add parens if they are already present 215s with AllowIfMethodIsEmpty: false 215s does not turn a method with no body into an endless method 215s with AllowIfMethodIsEmpty: true 215s does not correct 215s with `allow_single_line` style 215s behaves like convert to endless method 215s does not to an endless class method definition when using `break` 215s corrects to an endless method definition when single line method call without parentheses 215s corrects to a normal method if the method body contains multiple statements 215s corrects to an endless class method definition when using >= 215s corrects to an endless method definition 215s corrects to an endless class method definition when using < 215s does not to an endless class method definition when using `next` 215s corrects to multiline method definition when defining setter method 215s corrects to an endless method definition when method body is a literal 215s handles arguments properly 215s corrects to an endless method definition when single line method call with parentheses 215s corrects to an endless class method definition when using == 215s retains comments 215s corrects to an endless class method definition 215s corrects to an endless class method definition when using > 215s corrects to an endless class method definition when using != 215s does not add parens if they are already present 215s does not to an endless class method definition when using `return` 215s corrects to an endless class method definition when using <= 215s corrects to an endless class method definition when using === 215s with AllowIfMethodIsEmpty: true 215s does not correct 215s with AllowIfMethodIsEmpty: false 215s does not turn a method with no body into an endless method 215s prior to ruby 3.0 215s corrects to a multiline method 215s with `disallow` style 215s corrects to an normal method 215s endless methods 215s does not register an offense 215s when `Style/EndlessMethod` is disabled 215s corrects to an normal method 215s when AllowIfMethodIsEmpty is enabled 215s accepts a single-line empty method 215s 215s RuboCop::Cop::Style::TrailingUnderscoreVariable 215s configured to allow named underscore variables 215s registers an offense for nested assignments with trailing underscores 215s does not register an offense for multiple underscores preceded by a splat variable 215s does not register an offense for a named variable preceded by a names splat underscore variable 215s does not register an offense when there are no underscores 215s registers an offense for an underscore as the last param when there is also an underscore as the first param 215s does not register an offense for an underscore variable preceded by a named splat underscore variable 215s does not register an offense for multiple underscore variables preceded by a named splat underscore variable 215s does not register an offense for a named splat underscore as the last variable 215s registers an offense when multiple underscores are used as the last variables of parallel assignment 215s does not register an offense for an underscore preceded by a splat variable anywhere in the argument chain 215s does not register an offense for complex nested assignments without trailing underscores 215s does not register an offense for an underscore preceded by a splat variable 215s registers an offense for splat underscore as the last variable 215s registers an offense when underscore is the only variable in parallel assignment 215s registers an offense for multiple underscore variables preceded by a splat underscore variable 215s does not register an offense for an underscore preceded by a splat variable and another underscore 215s does not register an offense for nested assignments without trailing underscores 215s does not register an offense for a named underscore variable preceded by a splat variable 215s registers an offense when the last variable of parallel assignment is an underscore 215s registers an offense for complex nested assignments with trailing underscores 215s registers an offense when underscore is the second to last variable and blank is the last variable 215s does not register an offense for named variables that start with an underscore 215s does not register an offense for underscores at the beginning 215s does not register an offense for multiple named underscores preceded by a splat variable 215s autocorrect 215s with parentheses 215s removes assignment part when every assignment is to `_` 215s removes assignment part when it is the only variable 215s leaves parentheses but removes trailing underscores 215s leaves parentheses but removes trailing underscores and commas 215s configured to not allow named underscore variables 215s does not register an offense for an underscore preceded by a splat variable 215s registers an offense when multiple underscores are used as the last variables of parallel assignment 215s registers an offense for a named splat underscore as the last variable 215s registers an offense for complex nested assignments with trailing underscores 215s does not register an offense for underscores at the beginning 215s does not register an offense for a named variable preceded by a names splat underscore variable 215s registers an offense for splat underscore as the last variable 215s registers an offense for nested assignments with trailing underscores 215s registers an offense when the last variable of parallel assignment is an underscore 215s registers an offense for multiple underscore variables preceded by a named splat underscore variable 215s does not register an offense when there are no underscores 215s does not register an offense for a named underscore preceded by a splat variable 215s registers an offense for multiple underscore variables preceded by a splat underscore variable 215s registers an offense for an underscore variable preceded by a named splat underscore variable 215s registers an offense for named variables that start with an underscore 215s registers an offense when underscore is the only variable in parallel assignment 215s does not register an offense for a named underscore variable preceded by a splat variable 215s registers an offense for an underscore preceded by a named splat underscore 215s does not register an offense for nested assignments without trailing underscores 215s does not register an offense for an underscore preceded by a splat variable anywhere in the argument chain 215s does not register an offense for multiple underscores preceded by a splat variable 215s registers an offense when underscore is the second to last variable and blank is the last variable 215s does not register an offense for multiple named underscores preceded by a splat variable 215s does not register an offense for complex nested assignments without trailing underscores 215s registers an offense for an underscore as the last param when there is also an underscore as the first param 215s does not register an offense for an underscore preceded by a splat variable and another underscore 215s autocorrect 215s with parentheses 215s leaves parentheses but removes trailing underscores 215s leaves parentheses but removes trailing underscores and commas 215s removes assignment part when it is the only variable 215s removes assignment part when every assignment is to `_` 215s 215s RuboCop::Cop::Layout::FirstParameterIndentation 215s align_parentheses style 215s invalid indentation on multi-line defs 215s hash arguments 215s registers an offense and corrects incorrectly indented first element 215s hash arguments static def 215s registers an offense and corrects incorrectly indented first element 215s normal arguments 215s registers an offense and corrects incorrectly indented first element 215s no paren method defs 215s ignores 215s ignores with hash args 215s single line method defs 215s ignores with hash args 215s ignores 215s valid indentation on multi-line defs 215s accepts correctly indented first element 215s accepts correctly indented first element hash 215s consistent style 215s single line method defs 215s ignores with hash args 215s ignores 215s valid indentation on static multi-line defs 215s accepts correctly indented first element 215s accepts correctly indented first element hash 215s invalid indentation on multi-line defs 215s normal arguments 215s registers an offense and corrects incorrectly indented first element 215s hash arguments static method def 215s registers an offense and corrects incorrectly indented first element 215s hash arguments 215s registers an offense and corrects incorrectly indented first element 215s valid indentation on multi-line defs 215s accepts correctly indented first element 215s accepts correctly indented first element hash 215s no paren method defs 215s ignores 215s ignores with hash args 215s 215s RuboCop::Cop::Metrics::PerceivedComplexity 215s when Max is 2 215s counts stupid nested if and else blocks 215s when AllowedMethods is enabled 215s does not register an offense when defining a class method 215s does not register an offense when defining an instance method 215s does not register an offense when using `define_method` 215s when Max is 1 215s accepts complex code outside of methods 215s registers an offense for a while block 215s registers an offense for a case/when block without an expression after case 215s registers an offense for a for block 215s registers an offense for elsif and else blocks 215s registers an offense for || 215s counts only a single method 215s registers an offense for a ternary operator 215s registers an offense for or 215s registers an offense for and 215s deals with nested if blocks containing && and || 215s counts else in a case with no argument 215s registers an offense for a case/when block 215s registers an offense for an until block 215s does not count unknown block calls 215s registers an offense for a `define_method` 215s registers an offense for a rescue block 215s accepts an empty `define_method` 215s registers an offense for && 215s registers an offense for an if modifier 215s accepts an empty method 215s registers an offense for an unless modifier 215s accepts a method with no decision points 215s counts known iterating block 215s when AllowedPatterns is enabled 215s does not register an offense when using `define_method` 215s does not register an offense when defining a class method 215s does not register an offense when defining an instance method 215s 215s RuboCop::Cop::Layout::TrailingWhitespace 215s registers an offense for a line ending with space 215s is not fooled by __END__ within a documentation comment 215s accepts a line without trailing whitespace 215s registers offenses before __END__ but not after 215s registers an offense for a line ending with tab 215s is not fooled by heredoc containing __END__ 215s registers an offense for trailing whitespace in a heredoc string 215s registers an offense for a blank line with space 215s is not fooled by heredoc containing __END__ within a doc comment 215s autocorrects unwanted space 215s registers an offense for a tab in a heredoc 215s when `AllowInHeredoc` is set to false 215s corrects by removing trailing whitespace used for indentation in a heredoc string 215s does not correct trailing whitespace in a static heredoc string 215s corrects a whitespace line in a heredoc string that is longer than the indentation 215s corrects safely trailing whitespace in a heredoc string 215s when `AllowInHeredoc` is set to true 215s accepts trailing whitespace in a heredoc string 215s registers an offense for trailing whitespace at the heredoc begin 215s 215s RuboCop::Cop::Style::PercentLiteralDelimiters 215s `%` interpolated string 215s does not register an offense for preferred delimiters 215s registers an offense for other delimiters 215s registers an offense for a string with no content 215s registers an offense when the source contains invalid characters 215s does not register an offense for other delimiters when containing preferred delimiter characters 215s registers an offense for other delimiters when containing preferred delimiter characters in interpolation 215s invalid cop config 215s raises an error when invalid configuration is specified 215s `%Q` interpolated string 215s does not register an offense for preferred delimiters 215s registers an offense for other delimiters when containing preferred delimiter characters in interpolation 215s registers an offense for other delimiters 215s does not register an offense for other delimiters when containing preferred delimiter characters 215s `%i` symbol array 215s does not register an offense for preferred delimiters 215s registers an offense for other delimiters 215s does not register an offense for non-preferred delimiters enclosing escaped delimiters 215s `%I` interpolated symbol array 215s registers an offense for other delimiters 215s registers an offense for other delimiters when containing preferred delimiter characters in interpolation 215s does not register an offense for preferred delimiters 215s `%s` symbol 215s does not register an offense for preferred delimiters 215s registers an offense for other delimiters 215s `%w` string array 215s does not register an offense for preferred delimiters 215s does not register an offense for preferred delimiters with not a pairing delimiter 215s does not register an offense for other delimiters when containing preferred delimiter characters 215s does not register an offense for preferred delimiters with a pairing delimiters 215s does not register an offense for preferred delimiters with only a closing delimiter 215s registers an offense for other delimiters 215s autocorrect 215s preserves line breaks when fixing a multiline array 215s preserves indentation when correcting a multiline array 215s preserves irregular indentation when correcting a multiline array 215s fixes a string array in a scope 215s behaves like escape characters 215s corrects %r with \n in it 215s corrects %r with \t in it 215s behaves like escape characters 215s corrects %s with \t in it 215s corrects %s with \n in it 215s behaves like escape characters 215s corrects %x with \n in it 215s corrects %x with \t in it 215s behaves like escape characters 215s corrects %q with \n in it 215s corrects %q with \t in it 215s behaves like escape characters 215s corrects %i with \t in it 215s corrects %i with \n in it 215s behaves like escape characters 216s corrects %w with \t in it 216s corrects %w with \n in it 216s behaves like escape characters 216s corrects % with \t in it 216s corrects % with \n in it 216s behaves like escape characters 216s corrects %Q with \t in it 216s corrects %Q with \n in it 216s behaves like escape characters 216s corrects %W with \n in it 216s corrects %W with \t in it 216s `%q` string 216s does not register an offense for other delimiters when containing preferred delimiter characters 216s does not register an offense for preferred delimiters 216s registers an offense for other delimiters 216s `%x` interpolated system call 216s registers an offense for other delimiters when containing preferred delimiter characters in interpolation 216s does not register an offense for other delimiters when containing preferred delimiter characters 216s does not register an offense for preferred delimiters 216s registers an offense for other delimiters 216s `default` override 216s allows individual preferred delimiters to override `default` 216s allows all preferred delimiters to be set with one key 216s `%W` interpolated string array 216s does not register an offense for preferred delimiters 216s registers an offense for other delimiters 216s registers an offense for other delimiters when containing preferred delimiter characters in interpolation 216s does not register an offense for other delimiters when containing preferred delimiter characters 216s `%r` interpolated regular expression 216s does not register an offense for preferred delimiters 216s does not register an offense for other delimiters when containing preferred delimiter characters 216s registers an offense for a regular expression with option 216s registers an offense for other delimiters when containing preferred delimiter characters in interpolation 216s registers an offense for other delimiters 216s 216s RuboCop::PathUtil 216s #absolute? 216s returns a truthy value for a path beginning with slash 216s returns a falsey value for a path beginning with a directory name 216s #match_path? 216s matches glob expressions 216s does not match file in a subdirectory 216s matches strings to the full path 216s matches regexps 216s does not match dir/** for file in hidden dir 216s does not match invalid UTF-8 paths 216s matches dir/** for hidden file 216s #relative_path 216s supports custom base paths 216s builds paths relative to PWD by default as a stop-gap 216s 216s RuboCop::Cop::Style::ArrayJoin 216s does not register an offense for ambiguous cases 216s autocorrects '*' to 'join' when there are no spaces 216s autocorrects '*' to 'join' when setting to a variable 216s does not register an offense for numbers 216s registers an offense for an array followed by string 216s 216s RuboCop::Cop::Lint::IncompatibleIoSelectWithFiberScheduler 216s registers and corrects an offense when using `IO.select` with single write, `nil`, and timeout arguments 216s registers and corrects an offense when using `IO.select` with single read, `nil`, and timeout arguments 216s registers and corrects an offense when using `IO.select` with single write as `self` and timeout arguments 216s registers an offense when using `IO.select` with write argument and using return value but does not autocorrect 216s does not register an offense when using `IO.select` with multiple read arguments 216s does not register an offense when using `Enumerable#select` 216s does not register an offense when using `IO.select` with read and write arguments 216s registers and corrects an offense when using `IO.select` with single read and timeout arguments 216s registers an offense when using `IO.select` with read argument and using return value but does not autocorrect 216s registers and corrects an offense when using `IO.select` with single read argument and specify the first argument only 216s registers and corrects an offense when using `IO.select` with single write argument 216s registers and corrects an offense when using `IO.select` with single read argument 216s registers and corrects an offense when using `IO.select` with multiple read argument and specify the first argument only 216s registers and corrects an offense when using `::IO.select` with single read argument 216s registers and corrects an offense when using `IO.select` with single write and timeout arguments 216s does not register an offense when using `IO.select` with multiple write arguments 216s registers and corrects an offense when using `::IO.select` with single read and timeout arguments 216s registers and corrects an offense when using `IO.select` with single read as `self` and timeout arguments 216s 216s RuboCop::Cop::Style::AsciiComments 216s accepts comments with only ascii chars 216s registers an offense for comments with mixed chars 216s registers an offense for a comment with non-ascii chars 216s when certain non-ascii chars are allowed 216s registers an offense for comments with non-allowed non-ascii chars 216s accepts comment with allowed non-ascii chars 216s 216s RuboCop::Cop::Lint::DuplicateElsifCondition 216s registers an offense for repeated elsif conditions 216s does not register an offense for non-repeated elsif conditions 216s registers an offense for subsequent repeated elsif conditions 216s registers multiple offenses for multiple repeated elsif conditions 216s does not register an offense for partially repeated elsif conditions 216s 216s RuboCop::Cop::Style::RedundantInitialize 216s registers an offense for an `initialize` method with a default argument that does nothing 216s does not register an offense for a method not named `initialize` that only calls super 216s does not register an offense for an `initialize` method with a default keyword argument that calls `super` 216s does not register an offense for an `initialize` method with a default argument that calls `super` 216s registers and corrects an offense for an `initialize` method with arguments that only calls `super` with explicit args 216s does not register an offense for an `initialize` method that calls another method 216s registers an offense for an `initialize` method with a default keyword argument that does nothing 216s does not register an offense for an empty `initialize` method with a argument forwarding` 216s registers and corrects an offense for an `initialize` method that only calls `super` 216s does not register an offense for an empty method not named `initialize` 216s does not register an offense for an `initialize` method with only a comment 216s registers and corrects an offense for an `initialize` method with no arguments that calls `super` with no arguments 216s does not register an offense for an `initialize` method that calls another method before `super` 216s registers and corrects an offense for an empty `initialize` method 216s does not register an offense for an `initialize` method that calls `super` with no arguments 216s does not register an offense for an `initialize` method that calls another method after `super` 216s does not register an offense for an empty `initialize` method with a kwsplat` 216s does not register an offense for an empty `initialize` method with a splat` and super 216s does not register an offense for an empty `initialize` method with a splat` 216s registers and corrects an offense for an `initialize` method with arguments that only calls `super` 216s does not register an offense for an `initialize` method that calls `super` with a different argument list 216s when `AllowComments: false` 216s registers and corrects an offense for an `initialize` method with only a comment 216s 216s RuboCop::Cop::Lint::EmptyExpression 216s when used as a return value 216s registers an offense in the return value of a case statement 216s registers an offense in the return value of a method 216s registers an offense in the return value of a condition 216s when used in a condition 216s registers an offense in the condition of a ternary operator 216s registers an offense in the return value of a ternary operator 216s registers an offense inside `elsif` 216s registers an offense inside `if` 216s registers an offense inside `when` 216s registers an offense inside `case` 216s when used as a standalone expression 216s registers an offense 216s with nested empty expressions 216s registers an offense 216s when used as an assignment 216s registers an offense for the assigned value 216s 216s RuboCop::Cop::Lint::Debugger 216s does not register an offense for a console in comments 216s does not register an offense for a remote_pry method 216s does not register an offense for a binding method that is not disallowed 216s does not register an offense for a pry method 216s does not register an offense for a save_and_open_screenshot in comments 216s does not register an offense for a pry_remote method 216s does not register an offense for a save_and_open_page in comments 216s does not register an offense for a remote_byebug method 216s does not register an offense for a save_and_open_page method 216s does not register an offense for a debugger method 216s does not register an offense for a remote_pry in comments 216s does not register an offense for a irb in comments 216s does not register an offense for a pry_remote in comments 216s does not register an offense for a console method 216s does not register an offense for a irb method 216s does not register an offense for a debugger in comments 216s does not register an offense for a save_and_open_screenshot method 216s does not register an offense for a pry in comments 216s does not register an offense for a byebug method 216s does not register an offense for a byebug in comments 216s does not register an offense for a remote_byebug in comments 216s when a method group is disabled with nil 216s does not register an offense for a Pry debugger call 216s does register an offense for another group 216s web console 216s registers an offense for a `binding.console` call 216s does not register an offense for `console` without a receiver 216s debug.rb 216s registers an offense for a `binding.break` with `Kernel` call 216s registers an offense for a `break` binding call 216s registers an offense for a `b` binding call 216s registers an offense for a `binding.b` with `Kernel` call 216s built-in methods 216s registers an offense for a irb binding call 216s registers an offense for a binding.irb with Kernel call 216s rails 216s registers an offense for a debugger with ::Kernel call 216s registers an offense for a debugger with Kernel call 216s registers an offense for a debugger call 216s registers an offense for a debugger with an argument call 216s when a method group is disabled with false 216s does not register an offense for a Pry debugger call 216s does register an offense for another group 216s pry 216s registers an offense for a pry binding call 216s does not register an offense for a `rescue` call without Pry 216s registers an offense for a binding.pry with Kernel call 216s registers an offense for a pry binding with an argument call 216s registers an offense for a Pry.rescue call 216s registers an offense for a pry_remote binding call 216s registers an offense for a remote_pry binding with an argument call 216s does not register an offense for a `pry` call without binding 216s registers an offense for a pry_remote binding with an argument call 216s registers an offense for a remote_pry binding call 216s with the DebuggerMethods configuration 216s registers an offense for a `custom_debugger` call 216s does not register an offense for a byebug call 216s with a method chain 216s registers an offense for a `debugger.foo.bar` call 216s nested custom configurations 216s registers an offense for a `custom_debugger call 216s with a const chain 216s registers an offense for a `Foo::Bar::Baz.debug` call 216s with a const chain and a method chain 216s registers an offense for a `Foo::Bar::Baz.debug.this.code` call 216s RubyJard 216s registers an offense for a jard call 216s byebug 216s registers an offense for a remote_byebug call 216s registers an offense for a Kernel.byebug call 216s registers an offense for a byebug with an argument call 216s registers an offense for a Kernel.remote_byebug call 216s registers an offense for a byebug call 216s capybara 216s registers an offense for save_and_open_screenshot 216s registers an offense for save_and_open_page 216s with an argument 216s registers an offense for save_and_open_screenshot 216s registers an offense for save_and_open_page 216s 216s RuboCop::Cop::Lint::NestedMethodDefinition 216s does not register offense for nested definition inside module_exec 216s does not register offense for nested definition inside class shovel 216s does not register offense for nested definition inside class_exec 216s does not register offense for nested definition inside instance_eval 216s registers an offense for a nested class method definition 216s does not register offense for nested definition inside class_eval 216s does not register offense for nested definition inside Struct.new 216s does not register offense for nested definition inside ::Module.new 216s does not register an offense for a lambda definition inside method 216s does not register offense for definition of method on local var 216s does not register offense for nested definition inside ::Struct.new 216s does not register offense for nested definition inside instance_exec 216s registers an offense for a nested singleton method definition 216s does not register offense for nested definition inside Module.new 216s does not register offense for nested definition inside ::Class.new 216s registers an offense for a nested method definition inside lambda 216s does not register offense for nested definition inside Class.new 216s registers an offense for a nested method definition 216s does not register offense for nested definition inside module_eval 216s when `AllowedPatterns: [baz]` 216s registers offense for nested definition inside `do_qux` 216s does not register offense for nested definition inside `do_baz` 216s when `AllowedMethods: [has_many]` 216s does not register offense for nested definition inside `has_many` 216s registers offense for nested definition inside `denied_method` 216s 216s RuboCop::Cop::Style::Send 216s with __send__ 216s and with a receiver 216s does not register an offense for an invocation without args 216s does not register an offense for an invocation with args 216s and without a receiver 216s does not register an offense for an invocation with args 216s does not register an offense for an invocation without args 216s with send 216s and without a receiver 216s registers an offense for an invocation with args 216s does not register an offense for an invocation without args 216s and with a receiver 216s does not register an offense for an invocation without args 216s registers an offense for an invocation with args 216s when using safe navigation operator 216s registers an offense for an invocation with args 216s with public_send 216s and with a receiver 216s does not register an offense for an invocation with args 216s does not register an offense for an invocation without args 216s and without a receiver 216s does not register an offense for an invocation without args 216s does not register an offense for an invocation with args 216s 216s RuboCop::Cop::Layout::FirstArrayElementLineBreak 216s ignores elements listed on a single line 216s ignores properly formatted implicit arrays 216s send implicit arrays 216s registers and corrects the offense 216s masgn implicit arrays 216s registers and corrects the offense 216s elements listed on the first line 216s registers and corrects the offense 216s array nested in a method call 216s registers an corrects the offense 216s word arrays 216s registers and corrects the offense 216s 216s RuboCop::Cop::Layout::ConditionPosition 216s registers an offense and corrects for condition on the next line 216s accepts condition on a different line for modifiers 216s accepts condition on the same line 216s registers an offense and corrects for condition on the next line 216s accepts condition on the same line 216s registers an offense and corrects for condition on the next line 216s accepts condition on the same line 216s accepts condition on a different line for modifiers 216s accepts condition on the same line 216s registers an offense and corrects for condition on the next line 216s accepts condition on a different line for modifiers 216s accepts condition on a different line for modifiers 216s registers an offense and corrects for elsif condition on the next line 216s accepts ternary ops 216s 216s RuboCop::Cop::Lint::EmptyConditionalBody 216s registers an offense for missing `unless` body with `else` 216s registers an offense for missing `if` and `elsif` body 216s does not register an offense for missing `unless` body with a comment 216s registers an offense for missing `if` and `else` body 216s registers an offense for missing `if` body with `else` 216s registers an offense for missing `if` body with present `else` body 216s registers an offense for missing `if` body with `elsif` 216s registers an offense for missing all branches of `if` and `elsif` body 216s registers an offense for missing `unless` and `else` body 216s registers an offense for missing all branches of `if` and multiple `elsif` body 216s registers an offense for missing `if` and `else` body with some indentation 216s registers an offense for missing `elsif` body 216s registers an offense for missing `if` body 216s does not register an offense for missing `elsif` body with an inline comment 216s does not register an offense for missing `elsif` body with a comment 216s registers an offense for missing `unless` body 216s registers an offense for missing `elsif` body that is not the one with a comment 216s registers an offense for missing second `elsif` body without an inline comment 216s autocorrects properly when the if is assigned to a variable 216s does not register an offense for missing `if` body with a comment 216s when AllowComments is false 216s registers an offense for missing `if` body with a comment 216s registers an offense for missing `elsif` body with a comment 216s registers an offense for missing `unless` body with a comment 216s 216s RuboCop::Formatter::TextUtil 216s pluralize 216s will pluralize quantities greater than 1 216s will pluralize -1 216s will not change 0 to no 216s will pluralize negative quantities less than -1 216s will pluralize fractions 216s will change 0 to no when configured 216s will not pluralize 1 216s 216s RuboCop::Cop::Style::ExponentialNotation 216s EnforcedStyle is scientific 216s registers an offense for mantissa smaller than 1 216s registers no offense for a regular float 216s registers no offense for a negative mantissa 216s registers no offense for a negative exponent 216s registers an offense for mantissa greater than 10 216s registers no offense for a mantissa between 1 and 10 216s registers no offense for a float smaller than 1 216s registers no offense for a mantissa equal to 1 216s registers an offense for mantissa equal to 10 216s EnforcedStyle is integral 216s registers no offense for negative exponent 216s registers an offense for mantissa divisible by 10 216s registers an offense for decimal mantissa 216s registers no offense for a regular float 216s registers no offense for an integral mantissa 216s registers no offense for negative mantissa 216s registers no offense for a float smaller than 1 216s EnforcedStyle is engineering 216s registers no offense for a float smaller than 1 216s registers an offense for mantissa smaller than 0.1 216s registers an offense for a mantissa greater than -0.1 216s registers no offense for a regular float 216s registers an offense for mantissa smaller than -1000 216s registers no offense for a negative mantissa 216s registers an offense for exponent equal to -2 216s registers no offense for a mantissa equal to 1 216s registers no offense for a large mantissa 216s registers an offense for exponent equal to 4 216s registers no offense for a negative exponent 216s 216s RuboCop::Cop::Lint::PercentStringArray 216s with invalid byte sequence in UTF-8 216s accepts if tokens contain invalid byte sequence only 216s add an offense and corrects when tokens contain quotes 216s with binary encoded source 216s accepts if tokens contain no quotes 216s adds an offense and corrects when tokens contain quotes 216s detecting quotes or commas in a %w/%W string 216s accepts likely false positive :"#{a}" 216s accepts likely false positive %W(' ") 216s adds an offense and corrects when there are no quotes but one comma 216s adds an offense and corrects when tokens contain quotes and are comma separated 216s adds an offense and corrects when one token is quoted but there are no commas 216s accepts tokens without quotes or commas 216s accepts likely false positive %w(' ") 216s adds an offense and corrects when there are no quotes but one comma 216s accepts likely false positive %w(#{a} b) 216s accepts tokens without quotes or commas 216s adds an offense and corrects when one token is quoted but there are no commas 216s accepts likely false positive :"#{a}" 216s adds an offense and corrects when tokens contain both types of quotes 216s accepts likely false positive %w(' " ! = # ,) 216s adds an offense and corrects when tokens contain quotes and are comma separated 216s accepts likely false positive %W(' " ! = # ,) 216s adds an offense and corrects when tokens contain both types of quotes 216s accepts likely false positive %W(#{a} b) 216s 216s RuboCop::Cop::Style::MethodCallWithArgsParentheses 216s when EnforcedStyle is require_parentheses (default) 216s autocorrects calls where arg is method call 216s accepts parens in method call with args 216s autocorrects calls where the argument node is a constant 216s register no offense for superclass call without args 216s register an offense for non-receiver method call without parens 216s register an offense for methods starting with capital without parens 216s autocorrects partially parenthesized args by adding needed braces 216s register no offense for superclass call with parens 216s register no offense for yield without args 216s register an offense for method call without parens 216s accepts no parens in method call without args 216s register an offense for superclass call without parens 216s autocorrects call with multiple args by adding braces 216s autocorrects fully parenthesized args by removing space 216s accepts no parens for operators 216s autocorrects calls with multiple args by adding needed braces 216s accepts parens in method call with do-end blocks 216s autocorrects calls where multiple args are method calls 216s register an offense for yield without parens 216s autocorrects calls where the argument node is a number 216s accepts no parens for unary operators 216s autocorrects parenthesized args for local methods by removing space 216s accepts no parens for setter methods 216s when inspecting macro methods 216s in a module body 216s does not register an offense 216s in a class body 216s does not register an offense 216s with AllowedMethods 216s allow method listed in AllowedMethods 216s when using safe navigation operator 216s register an offense for method call without parens 216s AllowedPatterns 216s ignored methods listed in AllowedPatterns 216s behaves like endless methods 216s endless methods 216s with arguments 216s requires method calls to have parens 216s without arguments 216s does not register an offense when there are arguments 216s does not register an offense for `defs` when there are arguments 217s does not register an offense when there are no parens 217s does not register an offense when there are parens 217s does not register an offense for `defs` when there are parens 217s when inspecting macro methods with IncludedMacros 217s for a macro not on the included list 217s allows 217s behaves like endless methods 217s endless methods 217s without arguments 217s does not register an offense for `defs` when there are parens 217s does not register an offense when there are parens 217s does not register an offense for `defs` when there are arguments 217s does not register an offense when there are arguments 217s does not register an offense when there are no parens 217s with arguments 217s requires method calls to have parens 217s in a class body 217s finds offense 217s for a macro in both IncludedMacros and AllowedMethods 217s allows 217s in a module body 217s finds offense 217s when EnforcedStyle is omit_parentheses 217s register an offense for yield call with parens 217s accepts parens in camel case method without args 217s register an offense for parens in string interpolation 217s register an offense for %r regex literal as arguments 217s accepts no parens in method call with args 217s accepts parens in block passing calls 217s accepts parens in literals with unary operators as first argument 217s accepts parens in chained method calls 217s register an offense for superclass call with parens 217s register an offense for multi-line method calls 217s accepts parens in args splat 217s accepts parens in blocks with braces 217s accepts parens in method args 217s accepts parens in super without args 217s accepts parens in chaining with operators 217s register an offense in multi-line inheritance 217s register an offense in assignments 217s accepts parens in default keyword argument value calls 217s autocorrects complex multi-line calls 217s register an offense for parens in the last chain 217s accepts parens in single-line inheritance 217s accepts parens in args with ternary conditions 217s register an offense for hashes in keyword values 217s register an offense for parens in do-end blocks 217s accepts parens in nested method args 217s autocorrects multi-line calls with trailing whitespace 217s register an offense for camel-case methods with arguments 217s accepts parens in slash regexp literal as argument 217s accepts parens in argument calls with braced blocks 217s autocorrects single-line calls 217s accepts parens in assignment in conditions 217s accepts parens in default argument value calls 217s accepts parens in calls with args with logical operators 217s accepts parens in ternary condition calls 217s accepts parens in super method calls as arguments 217s accepts parens in calls with logical operators 217s accepts special lambda call syntax 217s accepts parens in yield argument method calls 217s accepts parens in operator method calls 217s accepts parens in implicit #to_proc 217s accepts no parens in method call without args 217s accepts parens in range literals 217s accepts parens in calls with hash as arg 217s accepts parens in super calls with braced blocks 217s accepts parens in chaining with safe operators 217s register an offense for parens in method call without args 217s register an offense in complex conditionals 217s accepts parens in splat calls 217s allowing parenthesis in chaining 217s accepts parens in the last call if any previous calls with parentheses 217s accepts no parens in the last call if previous calls with parens 217s register offense for single-line chaining without previous parens 217s register offense for multi-line chaining without previous parens 217s allowing parens in camel-case methods 217s accepts parens for camel-case method names 217s behaves like endless methods 217s endless methods 217s without arguments 217s registers an offense for `defs` when there are parens 217s does not register an offense for `defs` when there are arguments 217s does not register an offense when there are no parens 217s does not register an offense when there are arguments 217s registers an offense when there are parens 217s with arguments 217s requires method calls to have parens 217s allowing parens in multi-line calls 217s accepts parens for multi-line calls 217s numbered parameters in 2.7 217s accepts parens for braced numeric block calls 217s hash value omission in 3.1 217s registers and corrects an offense when explicit hash value with parentheses and using modifier form 217s registers an offense when with parentheses call expr follows 217s registers an offense using assignment with parentheses call expr follows 217s does not register an offense when hash value omission with parentheses and using modifier form 217s does not register an offense when without parentheses call expr follows 217s registers an offense when last argument is a hash value omission 217s forwarded arguments in 2.7 217s accepts parens for forwarded arguments 217s forwarded arguments in 3.0 217s accepts parens for forwarded arguments 217s allowing parens in string interpolation 217s accepts parens for camel-case method names 217s 217s RuboCop::Cop::Style::GuardClause 217s doesn't register an error if control flow expr has multiple lines 217s does not report an offense if return is inside if..elsif..else..end 217s accepts a method whose body is a modifier if / unless 217s registers an error with return in the else branch 217s registers an error with raise "error" in the if branch 217s does not report an offense if break is inside if..elsif..else..end 217s registers an error with next in the else branch 217s does not report an offense if raise "error" is inside elsif 217s doesn't register an error if condition has multiple lines 217s registers an error if non-control-flow branch has multiple lines 217s doesn't register an error if control flow expr has multiple lines 217s registers an error if non-control-flow branch has multiple lines 217s doesn't register an error if control flow expr has multiple lines 217s registers an error with next in the if branch 217s does not report an offense if body is if..elsif..end 217s does not register an offense when assigning the result of a guard condition with `else` 217s registers an error with raise "error" in the else branch 217s does not report an offense if break is inside elsif 217s doesn't report an offense if condition has multiple lines 217s registers an offense when using `|| raise` in `then` branch 217s registers an offense when using `|| raise` in `else` branch 217s accepts a method which body does not end with if / unless 217s registers an error if non-control-flow branch has multiple lines 217s does not report an offense if return is inside elsif 217s accepts a method with empty parentheses as its body 217s does not report an offense if next is inside elsif 217s does not report an offense if raise "error" is inside if..elsif..else..end 217s registers an error with break in the else branch 217s does not report an offense if next is inside if..elsif..else..end 217s registers an error with return in the if branch 217s accepts a method which body is if / unless with else 217s doesn't register an error if condition has multiple lines 217s registers an error with break in the if branch 217s doesn't register an error if condition has multiple lines 217s doesn't register an error if condition has multiple lines 217s registers an offense when using `and return` in `then` branch 217s registers an offense when using `and return` in `else` branch 217s registers an error if non-control-flow branch has multiple lines 217s doesn't register an error if control flow expr has multiple lines 217s behaves like reports offense 217s reports an offense if method body ends with if / unless without else 217s reports an offense if method body is if / unless without else 217s Invalid MinBodyLength 217s fails with an error 217s MinBodyLength: 1 217s reports an offense for if whose body has 1 line 217s AllowConsecutiveConditionals: false 217s reports an offense when not allowed same depth multiple if statement andpreceding expression is a conditional at the same depth 217s behaves like reports offense 217s reports an offense if method body is if / unless without else 217s reports an offense if method body ends with if / unless without else 217s method in module 217s registers an offense for instance method 217s registers an offense for singleton methods 217s AllowConsecutiveConditionals: true 217s does not register an offense when allowed same depth multiple if statement andpreceding expression is not a conditional at the same depth 217s reports an offense when allowed same depth multiple if statement andpreceding expression is not a conditional at the same depth 217s with Metrics/MaxLineLength enabled 217s when the correction is too long for a single line 217s with a nested `begin` node 217s does registers an offense 217s with a trivial body 217s does not register an offense 217s with a nested `if` node 217s does registers an offense 217s MinBodyLength: 4 217s accepts a method whose body has 3 lines 217s with Metrics/MaxLineLength disabled 217s registers an offense with modifier example code regardless of length 217s 217s RuboCop::Cop::Layout::CaseIndentation 217s with EnforcedStyle: end 217s with IndentOneStep: false 217s `case` ... `in` 217s regarding assignment where the right hand side is a `case` 217s accepts a correctly indented assignment 217s registers an offense and corrects an assignment indented some other way 217s with everything on a single line 217s does not register an offense 217s `in` and `end` same line 217s does not register an offense 217s `case` ... `when` 217s regarding assignment where the right hand side is a `case` 217s accepts a correctly indented assignment 217s registers an offense and corrects an assignment indented some other way 217s `else` and `end` same line 217s does not register an offense 217s `when` and `end` same line 217s does not register an offense 217s with everything on a single line 217s does not register an offense 217s with IndentOneStep: true 217s `case` ... `when` 217s regarding assignment where the right hand side is a `case` 217s accepts a correctly indented assignment 217s registers an offense and corrects an assignment indented as `case` 217s registers an offense and corrects an assignment indented some other way 217s with everything on a single line 217s does not register an offense 217s `case` ... `in` 217s with everything on a single line 217s does not register an offense 217s regarding assignment where the right hand side is a `case` 217s registers an offense and corrects an assignment indented as `case` 217s accepts a correctly indented assignment 217s registers an offense and corrects an assignment indented some other way 217s with EnforcedStyle: case 217s with IndentOneStep: false 217s `case` ... `when` 217s doesn't get confused by strings with `case` in them 217s registers an offense and corrects a `when` clause that is indented deeper than `case` 217s accepts correctly indented whens in complex combinations 217s doesn't get confused by symbols named `case` or `when` 217s accepts a `when` clause that's equally indented with `case` 217s regarding assignment where the right hand side is a `case` 217s registers an offense and corrects assignment indented as end 217s registers an offense and corrects assignment indented some other way 217s registers an offense and corrects correct + opposite style 217s accepts a correctly indented assignment 217s with everything on a single line 217s does not register an offense 217s `case` ... `in` 217s registers an offense and corrects an `in` clause that is indented deeper than `case` 217s doesn't get confused by strings with `case` in them 217s accepts correctly indented whens in complex combinations 217s accepts an `in` clause that's equally indented with `case` 217s doesn't get confused by symbols named `case` or `in` 217s with everything on a single line 217s does not register an offense 217s regarding assignment where the right hand side is a `case` 217s registers an offense and corrects assignment indented some other way 217s registers an offense and corrects assignment indented as `end` 217s registers an offense and corrects correct + opposite style 217s accepts a correctly indented assignment 217s with IndentOneStep: true 217s `case` ... `when` 217s registers an offense and corrects a `when` clause that is equally indented with `case` 217s accepts a `when` clause that's 2 spaces deeper than `case` 217s regarding assignment where the right hand side is a `case` 217s registers an offense and corrects an assignment indented some other way 217s accepts a correctly indented assignment 217s with everything on a single line 217s does not register an offense 217s when indentation width is overridden for this cop only 217s respects cop-specific IndentationWidth 217s `case` ... `in` 217s registers an offense and corrects an `in` clause that is equally indented with `case` 217s accepts an `in` clause that's 2 spaces deeper than `case` 217s when indentation width is overridden for this cop only 217s respects cop-specific IndentationWidth 217s with everything on a single line 217s does not register an offense 217s regarding assignment where the right hand side is a `case` 217s accepts a correctly indented assignment 217s registers an offense and corrects an assignment indented some other way 217s when `when` is on the same line as `case` 217s registers an offense but does not autocorrect 217s 217s RuboCop::Cop::Layout::HeredocArgumentClosingParenthesis 217s incorrect cases 217s simple incorrect case with call after 217s detects 217s double incorrect case new line chained calls 217s detects 217s simple incorrect case squiggles 217s detects 217s double incorrect case 217s detects 217s incorrect case with other param before constructor 217s detects 217s simple incorrect case comma with spaces and comma in heredoc 217s detects 217s complex chained incorrect case with multiple calls 217s detects and fixes the first 217s simple incorrect case comma with spaces 217s detects 217s simple incorrect case comma 217s detects 217s incorrect case with other param after 217s detects 217s incorrect case with other param before constructor and raise call 217s detects 217s incorrect case nested method call with comma 217s detects 217s incorrect case in array with double heredoc and spaced out comma 217s detects 217s complex incorrect case with multiple calls 217s detects and fixes the second 217s detects and fixes the first 217s nested incorrect case 217s detects 217s incorrect case in array with spaced out comma 217s detects 217s incorrect case with other param before 217s detects 217s simple incorrect case 217s detects 217s double case new line 217s detects and fixes 217s simple incorrect case hash 217s detects 217s simple incorrect case with call after trailing comma 217s detects 217s incorrect case in array with nested calls and double heredoc and spaced out comma 217s detects 217s correct cases 217s accepts when there is an argument between a heredoc argument and the closing paretheses 217s accepts correct case with other param before 217s accepts correct case with other param after 217s accepts double correct case 217s accepts double correct case nested 217s accepts method with heredoc argument of proc correct case 217s accepts simple correct case 217s accepts method chain with heredoc argument correct case 217s accepts double correct case new line 217s accepts hash correct case 217s invocation after the HEREDOC 217s ignores tr 217s ignores random call after 217s ignores random call 217s 217s RuboCop::Cop::Style::MultilineWhenThen 217s doesn't register an offense for multiline when statement without then 217s registers an offense when one line for multiple candidate values of `when` 217s registers an offense for multiline (two lines in a body) when statement with then 217s doesn't register an offense for singleline when statement with then 217s registers an offense for multiline (one line in a body) when statement with then 217s autocorrects when the body of `when` branch starts with `then` 217s does not register an offense when line break for multiple candidate values of `when` 217s does not register an offense for hash when statement with then 217s doesn't register an offense for multiline when statementwith then followed by other lines 217s doesn't register an offense when `then` required for a body of `when` is used 217s registers an offense for empty when statement with then 217s does not register an offense for array when statement with then 217s doesn't register an offense for empty when statement without then 217s 217s RuboCop::Cop::Style::DateTime 217s registers an offense when using DateTime for modern date 217s does not register an offense when using DateTime for historic date 217s registers an offense when using ::DateTime for current time 217s registers an offense when using DateTime for current time 217s does not register an offense when using DateTime in another namespace 217s does not register an offense when using Date for modern date 217s does not register an offense when using Time for current time 217s does not register an offense when using ::DateTime for historic date 217s when configured to allow #to_datetime 217s does not register an offense 217s when configured to not allow #to_datetime 217s registers an offense 217s 217s RuboCop::Cop::Lint::BinaryOperatorWithIdenticalOperands 217s registers an offense for `!=` with duplicate operands 217s registers an offense for `==` with duplicate operands 217s registers an offense for `<` with duplicate operands 217s does not register an offense for `>>` with duplicate operands 217s registers an offense for `===` with duplicate operands 217s registers an offense for `|` with duplicate operands 217s registers an offense for `-` with duplicate operands 217s does not register an offense for `+` with duplicate operands 217s registers an offense for `=~` with duplicate operands 217s registers an offense for `%` with duplicate operands 217s registers an offense for `/` with duplicate operands 217s does not register an offense for `**` with duplicate operands 217s does not register an offense for `<<` with duplicate operands 217s does not register an offense for `*` with duplicate operands 217s registers an offense for `<=>` with duplicate operands 217s does not register an offense when using arithmetic operator with numerics 217s registers an offense for `^` with duplicate operands 217s registers an offense for `>=` with duplicate operands 217s registers an offense for `>` with duplicate operands 217s registers an offense for `<=` with duplicate operands 217s registers an offense for `||` with duplicate operands 217s registers an offense for `&&` with duplicate operands 217s does not register an offense when using binary operator with different operands 217s does not crash on operator without any argument 217s 217s RuboCop::Cop::Lint::UselessRuby2Keywords 217s when `ruby2_keywords` is given a symbol 217s does not register an offense when there is no `def` 217s does not register an offense for an allowed def 217s registers an offense for an unnecessary `ruby2_keywords` 217s does not register an offense when the `def` is at a different depth 217s with a dynamically defined method 217s does not register an offense when the method has a `restarg` and a `shadowarg` 217s registers an offense for a numblock 217s registers an offense for an unnecessary `ruby2_keywords` 217s does not register an offense for an allowed `ruby2_keywords` 217s registers an offense when the method has a `shadowarg` 217s when `ruby2_keywords` is given a `def` node 217s registers an offense for a method without arguments 217s does not register an offense for a method with a `restarg` and no `kwrestarg` 217s registers an offense for a method with only keyword args 217s registers an offense for a method with only `kwrestarg` 217s does not register an offense for a method with a `restarg` and `blockarg` 217s registers an offense for a method with a `restarg` and keyword args 217s does not register an offense for a method with a `restarg` other optional args 217s does not register an offense for a method with a `restarg` other positional args 217s registers an offense for a method with a `restarg` and `kwrestarg` 217s registers an offense for a method with only positional args 217s registers an offense for a method with a `restarg` and `kwoptarg` 217s 217s RuboCop::Cop::RangeHelp 217s #range_with_comments_and_lines 217s returns a range that includes related comments and whole lines 217s source indicated by #range_with_surrounding_comma 217s when side is :right 217s is expected to eq "Error," 217s when side is :left 217s is expected to eq ",Error" 217s when side is :both 218s is expected to eq ",Error," 218s source indicated by #range_with_surrounding_space 218s when passing range as a positional argument 218s behaves like works with various `side`s 218s when side is :both 218s is expected to eq " a(2) " 218s when side is :left 218s is expected to eq " a(2)" 218s when side is :right 218s is expected to eq "a(2) " 218s when passing range as a kwarg 218s behaves like works with various `side`s 218s when side is :left 218s is expected to eq " a(2)" 218s when side is :both 218s is expected to eq " a(2) " 218s when side is :right 218s is expected to eq "a(2) " 218s source indicated by #range_by_whole_lines 218s when source doesn't end with a newline 218s with include_final_newline 218s is expected to eq 30 218s is expected to eq "newline_at_end" 218s without include_final_newline 218s is expected to eq "newline_at_end" 218s with end of one line 218s with include_final_newline 218s is expected to eq "puts 'example'\n" 218s without include_final_newline 218s is expected to eq "puts 'example'" 218s with parts of four lines 218s with include_final_newline 218s is expected to eq "puts 'example'\nputs 'another example'\n\nsomething_else\n" 218s without include_final_newline 218s is expected to eq "puts 'example'\nputs 'another example'\n\nsomething_else" 218s with beginning of one line 218s without include_final_newline 218s is expected to eq "puts 'another example'" 218s with include_final_newline 218s is expected to eq "puts 'another example'\n" 218s when part of a single line is selected 218s with include_final_newline 218s is expected to eq "puts 'example'\n" 218s without include_final_newline 218s is expected to eq "puts 'example'" 218s with parts of two lines 218s without include_final_newline 218s is expected to eq "puts 'example'\nputs 'another example'" 218s with include_final_newline 218s is expected to eq "puts 'example'\nputs 'another example'\n" 218s with a whole line plus beginning of next line 218s without include_final_newline 218s is expected to eq "puts 'example'\nputs 'another example'" 218s with include_final_newline 218s is expected to eq "puts 'example'\nputs 'another example'\n" 218s with a whole line except newline selected 218s without include_final_newline 218s is expected to eq "puts 'example'" 218s with include_final_newline 218s is expected to eq "puts 'example'\n" 218s 218s RuboCop::Cop::Style::LambdaCall 218s when style is set to braces 218s registers an offense for opposite + correct 218s autocorrects x.call to x.() 218s registers an offense for correct + multiple opposite styles 218s accepts a call without receiver 218s registers an offense for x.call() 218s autocorrects x.call asdf, x123 to x.(asdf, x123) 218s when style is set to call 218s registers an offense for x.() 218s registers an offense for correct + multiple opposite styles 218s registers an offense for correct + opposite 218s 218s RuboCop::Cop::Lint::EmptyBlock 218s does not register an offense when block is not empty 218s does not register an offense on an empty lambda 218s registers an offense for empty block within method call 218s does not register an offense for empty block with inner comments 218s registers an offense for an empty block given to a non-Kernel `proc` method 218s does not register an offense on an empty ::Proc.new 218s does not register an offense for empty block with inline comments 218s does not register an offense on an empty proc 218s does not register an offense on an empty stabby lambda 218s does not register an offense on an empty Proc.new 218s when AllowComments is false 218s registers an offense for empty block with inline comments 218s registers an offense for empty block with inner comments 218s when AllowEmptyLambdas is false 218s registers an offense on an empty proc 218s registers an offense for an empty lambda 218s registers an offense for an empty stabby lambda 218s registers an offense on an empty ::Proc.new 218s registers an offense on an empty Proc.new 218s 218s RuboCop::Cop::Layout::RedundantLineBreak 218s when InspectBlocks is false 218s for a block 218s accepts when the method call has parentheses 218s accepts when the method call has no arguments 218s when Layout/SingleLineBlockChain is enabled 218s accepts a multiline block without a chained method call 218s when Layout/SingleLineBlockChain is disabled 218s accepts a multiline block without a chained method call 218s accepts a method call chained onto a multiline block 218s for an expression that does not fit on a single line 218s accepts a method call on a multiple lines 218s with a longer max line length 218s accepts method call with a do keyword that would just surpass the max line length 218s accepts a method call followed by binary operations that are too long taken together 218s registers an offense for a method call with a do keyword that is just under the max line length 218s accepts a complex method call on a multiple lines 218s accepts an assignment containing a heredoc 218s accepts an assignment containing a method definition 218s for a block 218s accepts when it is difficult to convert to single line 218s when Layout/SingleLineBlockChain is disabled 218s reports an offense for a method call chained onto a single line block 218s for an expression that fits on a single line 218s registers an offense for a method call as right hand side of an assignment 218s accepts a method call with a block 218s registers an offense for a method call with a double and single quoted split string 218s registers an offense for a method call on multiple lines with backslash 218s registers an offense for a method call with a split operation 218s accepts a method call on a single line 218s registers an offense for a method call on multiple lines inside a block 218s registers an offense for a method call with a double quoted split string without parentheses 218s registers an offense for a method call with a single quoted split string 218s accepts an assignment containing a begin-end expression 218s registers an offense for a method call with a double quoted split string in parentheses 218s accepts a method call on multiple lines if there are comments on them 218s accepts an assignment containing an if expression 218s registers an offense for a method call on multiple lines 218s accepts a binary expression containing an if expression 218s accepts an assignment containing a case expression 218s with LineLength Max 100 218s registers an offense for a method without parentheses on multiple lines 218s method chains 218s registers an offense and corrects with a arguments on multiple lines 218s properly corrects a method chain on multiple lines 218s registers an offense and corrects with a string argument on multiple lines 218s does not register an offense with a heredoc argument 218s when Layout/SingleLineBlockChain is enabled 218s accepts a method call chained onto a single line block 218s when InspectBlocks is true 218s for a block 218s registers an offense when the method call has parentheses 218s registers an offense when the method call has no arguments 218s when Layout/SingleLineBlockChain is enabled 218s reports an offense for a multiline block without a chained method call 218s when Layout/SingleLineBlockChain is disabled 218s reports an offense for a multiline block without a chained method call 218s reports an offense for a method call chained onto a multiline block 218s when Layout/SingleLineBlockChain is enabled 218s accepts a method call chained onto a single line block 218s when Layout/SingleLineBlockChain is disabled 218s reports an offense for a method call chained onto a single line block 218s for an expression that fits on a single line 218s accepts a method call on a single line 218s accepts an assignment containing an if expression 218s registers an offense for a method call as right hand side of an assignment 218s registers an offense for a method call with a double quoted split string without parentheses 218s registers an offense for a method call with a double and single quoted split string 218s registers an offense for a method call on multiple lines 218s registers an offense for a method call on multiple lines with backslash 218s registers an offense for a method call with a split operation 218s accepts a method call with a block 218s accepts an assignment containing a case expression 218s registers an offense for a method call with a single quoted split string 218s accepts a binary expression containing an if expression 218s accepts an assignment containing a begin-end expression 218s accepts a method call on multiple lines if there are comments on them 218s registers an offense for a method call on multiple lines inside a block 218s registers an offense for a method call with a double quoted split string in parentheses 218s method chains 218s registers an offense and corrects with a string argument on multiple lines 218s does not register an offense with a heredoc argument 218s registers an offense and corrects with a arguments on multiple lines 218s properly corrects a method chain on multiple lines 218s with LineLength Max 100 218s registers an offense for a method without parentheses on multiple lines 218s for an expression that does not fit on a single line 218s accepts a method call on a multiple lines 218s with a longer max line length 218s accepts a complex method call on a multiple lines 218s accepts a method call followed by binary operations that are too long taken together 218s accepts an assignment containing a heredoc 218s accepts method call with a do keyword that would just surpass the max line length 218s accepts an assignment containing a method definition 218s registers an offense for a method call with a do keyword that is just under the max line length 218s for a block 218s accepts when it is difficult to convert to single line 218s 218s RuboCop::Cop::Style::TrailingBodyOnMethodDefinition 218s registers an offense when body trails after method definition 218s accepts a method with one line of body 218s autocorrects with comment after body 218s registers when body starts on def line & continues many more lines 218s autocorrects body with method definition with args not in parens 218s accepts a method with multiple lines of body 218s removes semicolon from method definition but not body when autocorrecting 218s registers when body starts on def line & continues one more line 218s does not register offense with trailing body on method end 218s when method is not on first line of processed_source 218s autocorrects offense 218s Ruby 3.0 or higher 218s does not register offense when endless method definition body is after newline in opening parenthesis 218s 218s RuboCop::Cop::Style::ClassVars 218s registers an offense for class variable set in class 218s registers an offense for class variable set on class receiver 218s does not register an offense for class variable usage 218s registers an offense for class variable declaration 218s 218s RuboCop::Cop::Style::ColonMethodDefinition 218s accepts a class method defined using . 218s using self 218s registers an offense for a class method defined using :: 218s using the class name 218s registers an offense for a class method defined using :: 218s 218s RuboCop::Cop::Lint::ToJSON 218s registers an offense and corrects using `#to_json` without arguments 218s does not register an offense when using `#to_json` with arguments 218s 218s RuboCop::Cop::Lint::MissingSuper 218s constructor 218s does not register an offense for the class with stateless parent class 218s registers an offense when no `super` call 218s does not register an offense for the class without parent class 218s does not register an offense when there is a `super` call 218s does not register an offense for the constructor-like method defined outside of a class 218s callbacks 218s registers an offense when class callback within `self << class` and without `super` call 218s registers an offense when method callback is without `super` call 218s registers an offense when class callback without `super` call 218s registers no offense when module callback without `super` call 218s does not register an offense when callback has a `super` call 218s 218s RuboCop::Cop::Lint::FormatParameterMismatch 218s does not register an offense when single argument is a hash 218s does not register an offense when arguments and fields match 218s identifies correctly digits for spacing in format 218s registers an offense if extra argument for dynamic width not given 218s does not register an offense when using named parameters with escaped `%` 218s correctly parses different sprintf formats 218s registers an offense when calling Kernel.format and the fields do not match 218s finds faults even when the string looks like a HEREDOC 218s does not register an offense for format with splat argument 218s constants do not register offenses 218s registers an offense when there are more arguments than expected 218s registers an offense when there are less arguments than expected 218s accepts an extra argument for dynamic width 218s does not register an offense argument is the result of a message send 218s does not register an offense when using named parameters 218s does not register an offense for sprintf with splat argument 218s correctly ignores double percent 218s registers an offense for String#% 218s registers an offense when calling Kernel.sprintf and the fields do not match 218s does not register offense for `String#%` when arguments, fields match 218s accepts an extra arg for dynamic width with other preceding flags 218s does not register an offense when single argument is not an array 218s registers offense with sprintf 218s ignores percent right next to format string 218s when multiple arguments are called for 218s and a single variable argument is passed 218s does not register an offense 218s and a single send node is passed 218s does not register an offense 218s when splat argument is present 218s does not register an offense when args count is less than expected 218s when args count is more than expected 218s does not register an offense for `#format` 218s does not register an offense for `#sprintf` 218s registers an offense for `#%` 218s when format is invalid 218s registers an offense 218s behaves like variables 218s does not register an offense for % called on a variable 218s does not register an offense for format called on a variable 218s does not register an offense for format called on a variable 218s on format with %{} interpolations 218s and multiple arguments 218s registers an offense 218s and 1 argument 218s does not register an offense 218s with wildcard 218s does not register an offense for multiple wildcards 218s does not register an offense for width and precision 218s does not register an offense for width 218s does not register an offense for precision 218s when format is not a string literal 218s does not register an offense 218s on format with %<> interpolations 218s and 1 argument 218s does not register an offense 218s and multiple arguments 218s registers an offense 218s when argument itself contains format characters and formats in format string and argument are not equal 218s ignores argument formatting 218s behaves like variables 218s does not register an offense for % called on a variable 218s does not register an offense for format called on a variable 218s does not register an offense for format called on a variable 218s behaves like variables 218s does not register an offense for % called on a variable 218s does not register an offense for format called on a variable 218s does not register an offense for format called on a variable 218s behaves like variables 218s does not register an offense for format called on a variable 218s does not register an offense for % called on a variable 218s does not register an offense for format called on a variable 218s when passed an empty array 218s does not register an offense 218s behaves like variables 218s does not register an offense for format called on a variable 218s does not register an offense for format called on a variable 218s does not register an offense for % called on a variable 218s when using (digit)$ flag 218s registers an offense when mismatch between the maximum value specified by (digit)$ flag and the number of arguments 218s does not register an offense 218s does not register an offense when match between the maximum value specified by (digit)$ flag and the number of arguments 218s 218s RuboCop::Cop::Layout::SpaceBeforeBlockBraces 218s with space before empty braces allowed 218s accepts empty braces with outer space 218s registers an offense and corrects empty braces 218s when EnforcedStyle is space 218s registers an offense and corrects left brace without outer space 218s accepts braces surrounded by spaces 218s registers an offense and corrects opposite + correct style 218s registers an offense and corrects multiline block where the left brace has no outer space 218s Ruby 2.7 218s registers an offense and corrects multiline block where the left brace has no outer space 218s registers an offense and corrects opposite + correct style 218s when EnforcedStyle is no_space 218s registers an offense and corrects braces surrounded by spaces 218s accepts left brace without outer space 218s registers an offense and corrects correct + opposite style 218s Ruby 2.7 218s registers an offense and corrects correct + opposite style 218s with `EnforcedStyle` of `Style/BlockDelimiters` 218s accepts left brace without outer space 218s with space before empty braces not allowed 218s registers an offense and corrects empty braces 218s accepts empty braces without outer space 218s with invalid value for EnforcedStyleForEmptyBraces 218s fails with an error 218s 218s RuboCop::Cop::Style::WordArray 218s when the WordRegex configuration is not a Regexp 218s still parses the code without raising an error 218s with a treacherous WordRegex configuration 218s doesn't break when words contain whitespace 218s doesn't break when words contain delimiters 218s when PreferredDelimiters is specified 218s autocorrects an array with delimiters 218s with non-default MinSize 218s does not autocorrect arrays of one symbol if MinSize > 1 218s with a WordRegex configuration which accepts almost anything 218s uses %w for strings which only appear to have an escape 218s uses %W when autocorrecting strings with non-printable chars 218s with a custom WordRegex configuration 218s registers an offense for arrays of email addresses 218s when EnforcedStyle is percent 218s keeps the line breaks in place after autocorrect 218s registers an offense in a non-ambiguous block context 218s uses %W when autocorrecting strings with embedded newlines and tabs 218s autocorrects an array of words using partial newlines 218s does not register offense for array with allowed number of strings 218s registers an offense for a %w() array containing spaces 218s does not register an offense for an array with comments in it 218s does not register an offense for array starting with %w 218s does not register an offense for array with empty strings 218s does not register an offense on non-word strings 218s does not register an offense for a %w() array containing non word characters 218s detects right value of MinSize to use for --auto-gen-config 218s corrects properly when there is an extra trailing comma 218s registers an offense for strings with newline and tab escapes 218s registers an offense for an array with comments outside of it 218s autocorrects an array of words and character constants 218s doesn't fail in wacky ways when multiple cop instances are used 218s registers an offense for arrays with character constants 218s autocorrects an array of words 218s registers an offense for arrays of single quoted strings 218s does not register an offense for array containing non-string 218s registers an offense for arrays of strings containing hyphens 218s autocorrects an array with one element 218s does not register an offense for array of non-words 218s registers an offense for arrays of double quoted strings 218s autocorrects an array of words in multiple lines 218s detects when the cop must be disabled to avoid offenses 218s when the default external encoding is UTF-8 218s registers an offense for arrays of unicode word characters 218s when the default external encoding is US-ASCII 218s registers an offense for arrays of unicode word characters 218s when EnforcedStyle is array 218s does not register an offense for arrays of strings with spaces 218s autocorrects a %W() array which uses escapes 218s autocorrects a %w() array which uses string with hyphen 218s doesn't fail with `encoding: binary 218s registers an offense for a %w() array 218s doesn't fail on strings which are not valid UTF-8 218s does not register an offense for arrays of single quoted strings 218s autocorrects a %W() array which uses string with hyphen 218s registers an offense for an empty %w() array 218s autocorrects a %W() array which uses string interpolation 218s autocorrects multiline %w() array 218s autocorrects a %w() array which uses single quotes 218s does not register an offense for arrays of strings with hyphens 218s does not register an offense for arrays of double quoted strings 218s 218s RuboCop::Cop::Bundler::GemVersion 218s when EnforcedStyle is set to required (default) 218s does not flag gems included in AllowedGems metadata 218s does not flag gems with a specified version 218s flags gems that do not specify a version 218s when EnforcedStyle is set to forbidden 218s does not flag gems included in AllowedGems metadata 218s flags gems that specify a gem version 218s does not flag gems without a specified version 218s 218s RuboCop::Cop::Gemspec::DependencyVersion 218s with `EnforcedStyle: required` 218s using add_development_dependency 218s does not register an offense when adding development dependency by parenthesized call with branch specification 218s does not register an offense when adding development dependency with commit ref specification 218s does not register an offense when adding development dependency with branch specification 218s does not register an offense when adding development dependency by parenthesized call with commit ref specification 218s registers an offense when adding development dependency using git option by parenthesized call without version specification 218s does not register an offense when adding development dependency with tag specification 218s registers an offense when adding development dependency using git option without version specification 218s registers an offense when adding development dependency without version specification 218s registers an offense when adding development dependency by parenthesized call without version specification 218s does not register an offense when adding development dependency by parenthesized call with tag specification 218s does not register an offense when adding development dependency with version specification 218s does not register an offense when adding development dependency by parenthesized call with version specification 218s with `AllowedGems` 218s registers an offense when adding dependency without version specification excepts allowed gems 218s registers an offense when adding dependency by parenthesized call without version specification excepts allowed gems 218s using add_runtime_dependency 219s does not register an offense when adding runtime dependency by parenthesized call with tag specification 219s does not register an offense when adding runtime dependency with tag specification 219s registers an offense when adding runtime dependency by parenthesized call without version specification 219s does not register an offense when adding runtime dependency with version specification 219s does not register an offense when adding runtime dependency by parenthesized call with branch specification 219s does not register an offense when adding runtime dependency by parenthesized call with commit ref specification 219s does not register an offense when adding runtime dependency with commit ref specification 219s registers an offense when adding runtime dependency using git option by parenthesized call without version specification 219s does not register an offense when adding runtime dependency by parenthesized call with version specification 219s registers an offense when adding runtime dependency using git option without version specification 219s does not register an offense when adding runtime dependency with branch specification 219s registers an offense when adding runtime dependency without version specification 219s using add_dependency 219s registers an offense when adding dependency without version specification 219s does not register an offense when adding dependency by parenthesized call with branch specification 219s does not register an offense when adding dependency by parenthesized call with tag specification 219s does not register an offense when adding dependency by parenthesized call with version specification 219s does not register an offense when adding dependency with tag specification 219s registers an offense when adding dependency using git option by parenthesized call without version specification 219s registers an offense when adding dependency using git option without version specification 219s registers an offense when adding dependency by parenthesized call without version specification 219s does not register an offense when adding dependency by parenthesized call with commit ref specification 219s does not register an offense when adding dependency with branch specification 219s does not register an offense when adding dependency with commit ref specification 219s does not register an offense when adding dependency with version specification 219s with `EnforcedStyle: forbidden` 219s using add_dependency 219s registers an offense when adding dependency with branch specification 219s does not register an offense when adding dependency using git option without version specification 219s registers an offense when adding dependency with tag specification 219s registers an offense when adding dependency with commit ref specification 219s does not register an offense when adding dependency using git option by parenthesized call without version specification 219s registers an offense when adding dependency with version specification 219s does not register an offense when adding dependency by parenthesized call without version specification 219s registers an offense when adding dependency by parenthesized call with commit ref specification 219s registers an offense when adding dependency by parenthesized call with tag specification 219s registers an offense when adding dependency by parenthesized call with version specification 219s registers an offense when adding dependency by parenthesized call with branch specification 219s does not register an offense when adding dependency without version specification 219s using add_development_dependency 219s registers an offense when adding development dependency by parenthesized call with branch specification 219s registers an offense when adding development dependency with version specification 219s does not register an offense when adding development dependency using git option without version specification 219s does not register an offense when adding development dependency using git option by parenthesized call without version specification 219s registers an offense when adding development dependency with branch specification 219s registers an offense when adding development dependency by parenthesized call with tag specification 219s does not register an offense when adding development dependency by parenthesized call without version specification 219s registers an offense when adding development dependency with tag specification 219s registers an offense when adding development dependency by parenthesized call with version specification 219s does not register an offense when adding development dependency without version specification 219s registers an offense when adding development dependency by parenthesized call with commit ref specification 219s registers an offense when adding development dependency with commit ref specification 219s with `AllowedGems` 219s registers an offense when adding dependency without version specification 219s registers an offense when adding dependency by parenthesized call without version specification 219s using add_runtime_dependency 219s does not register an offense when adding runtime dependency using git option by parenthesized call without version specification 219s registers an offense when adding runtime dependency by parenthesized call with branch specification 219s registers an offense when adding runtime dependency with branch specification 219s registers an offense when adding runtime dependency with version specification 219s registers an offense when adding runtime dependency by parenthesized call with version specification 219s registers an offense when adding runtime dependency with commit ref specification 219s registers an offense when adding runtime dependency by parenthesized call with tag specification 219s registers an offense when adding runtime dependency by parenthesized call with commit ref specification 219s does not register an offense when adding runtime dependency without version specification 219s does not register an offense when adding runtime dependency by parenthesized call without version specification 219s does not register an offense when adding runtime dependency using git option without version specification 219s registers an offense when adding runtime dependency with tag specification 219s 219s RuboCop::Cop::Naming::MethodName 219s accepts for non-ascii characters 219s when configured for camelCase 219s registers an offense for mixed snake case and camel case in attr. 219s accepts one line methods 219s accepts class emitter method in a class, even when it is defined inside another method 219s registers an offense for snake case in names 219s registers an offense for correct + opposite 219s accepts unary operator definitions 219s registers an offense for mixed snake case and camel case 219s accepts operator definitions 219s registers an offense for capitalized camel case 219s accepts camel case in instance method name 219s registers an offense for snake case name in attr. 219s registers an offense for mixed snake case and camel case in attr. 219s accepts class emitter method in a module, even when it is defined inside another method 219s accepts camel case in singleton method name 219s accepts class emitter method in a class 219s accepts camel case names in attr. 219s registers an offense for capitalized camel case name in attr. 219s registers an offense for camel case methods names in attr. 219s registers an offense for singleton snake_case method within class 219s registers an offense for singleton upper case method without corresponding class 219s accepts class emitter method in a module 219s when specifying `AllowedPatterns` 219s does not register an offense for snake case method name in attr. 219s does not register an offense for snake case method name matching `AllowedPatterns` 219s does not register an offense for camel case method name in attr. 219s does not register an offense for camel case method name matching `AllowedPatterns` 219s when configured for snake_case 219s accepts unary operator definitions 219s registers an offense for camel case method names in attr. 219s accepts snake case in names 219s accepts class emitter method in a class 219s registers an offense for singleton upper case method without corresponding class 219s registers an offense for camel case methods names in attr. 219s registers an offense for mixed snake case and camel case 219s registers an offense for singleton camelCase method within class 219s accepts class emitter method in a module, even when it is defined inside another method 219s accepts class emitter method in a module 219s registers an offense for mixed snake case and camel case in attr. 219s accepts one line methods 219s registers an offense for opposite + correct 219s registers an offense for mixed snake case and camel case in attr. 219s registers an offense for capitalized camel case 219s registers an offense for capitalized camel case name in attr. 219s registers an offense for camel case in instance method name 219s accepts operator definitions 219s accepts class emitter method in a class, even when it is defined inside another method 219s registers an offense for camel case in singleton method name 219s accepts snake case in attr. 219s when specifying `AllowedPatterns` 219s does not register an offense for snake case method name matching `AllowedPatterns` 219s does not register an offense for snake case method name in attr. 219s does not register an offense for camel case method name matching `AllowedPatterns` 219s does not register an offense for camel case method name in attr. 219s 219s RuboCop::Cop::Style::EnvHome 219s registers and corrects an offense when using `ENV.fetch('HOME')` 219s does not register an offense when using `ENV.fetch('HOME', default)` 219s does not register an offense when using `Dir.home` 219s registers and corrects an offense when using `ENV.fetch('HOME', nil)` 219s registers and corrects an offense when using `::ENV['HOME']` 219s registers and corrects an offense when using `ENV['HOME']` 219s does not register an offense when using `ENV['HOME'] = '/home/foo'` 219s 219s RuboCop::Cop::Layout::SpaceBeforeBrackets 219s does not register an offense when assigning an array 219s does not register an offense when using percent array literal argument without parentheses 219s does not register an offense when using array literal argument without parentheses 219s when assigning 219s does not register an offense when multiple spaces are inserted inside the left bracket 219s does not register an offense when space is used in left bracket 219s registers an offense and corrects when using space between receiver and left brackets 219s does not register an offense when not using space between receiver and left brackets 219s when referencing 219s does not register an offense when array literal argument is enclosed in parentheses 219s registers an offense and corrects when using space between cvar receiver and left brackets 219s does not register an offense when using space between method call and left brackets 219s does not register an offense when call desugared `Hash#[]` to ivar receiver 219s does not register an offense when call desugared `Hash#[]` to cvar receiver 219s does not register an offense when without receiver 219s registers an offense and corrects when using space between ivar receiver and left brackets 219s does not register an offense when not using space between variable receiver and left brackets 219s registers an offense and corrects when using space between gvar receiver and left brackets 219s does not register an offense when call desugared `Hash#[]` to lvar receiver 219s registers an offense and corrects when using space between lvar receiver and left brackets 219s does not register an offense when using multiple arguments 219s does not register an offense when it is used as a method argument 219s does not register an offense when not using space between method call and left brackets 219s 219s RuboCop::Cop::Lint::TopLevelReturnWithArgument 219s Code segment with inline if along with top-level return 219s expects no offense from the return without arguments 219s expects multiple offense from the return with arguments 219s Code segment containing semi-colon separated statements 219s expects an offense from the return with arguments and multi-line code 219s expects no offense from the return with arguments and multi-line code 219s Code segment with block level returns other than the top-level return 219s expects no offense from the return without arguments 219s expects offense from the return with arguments 219s Code segment with only top-level return statement 219s expects offense from the return with arguments 219s expects no offense from the return without arguments 219s expects multiple offenses from the return with arguments statements 219s Code segment with method-level return statements 219s expects offense when method-level & top-level return co-exist 219s 219s RuboCop::Cop::Style::ClassAndModuleChildren 219s compact style 219s registers a offense for classes with nested one-liner children 219s accepts compact style for classes/modules 219s accepts nesting for classes with an explicit superclass 219s accepts nesting for classes/modules with more than one child 219s registers an offense for modules with partially nested children 219s preserves comments between classes 219s accepts class/module with single method 219s registers and offense for deeply nested children 219s registers a offense for classes with nested children 219s registers a offense for modules with nested children 219s correctly indents heavily nested children 219s registers an offense for classes with partially nested children 219s nested style 219s registers an offense for partially nested modules 219s accepts cbase class name 219s registers an offense for not nested classes when namespace is defined as a module 219s accepts :: in parent class on inheritance 219s registers an offense for partially nested classes 219s registers an offense for not nested classes 219s registers an offense for not nested classes when namespace is defined as a class 219s accepts cbase module name 219s registers an offense for not nested classes with explicit superclass 219s accepts nested children 219s preserves comments 219s registers an offense for not nested modules 219s 219s RuboCop::Cop::Style::ModuleFunction 219s when enforced style is `module_function` 219s accepts `extend self` in a class 219s accepts for `extend self` in a module with private methods 219s registers an offense for `extend self` in a module 219s accepts for `extend self` in a module with declarative private 219s when enforced style is `extend_self` 219s registers an offense for `module_function` without an argument 219s accepts module_function with an argument 219s when enforced style is `forbidden` 219s accepts `extend self` in a class 219s registers an offense for `module_function` without an argument 219s registers an offense for `extend self` 219s in a module with private methods 219s in a module with declarative private 219s in a module 219s 219s RuboCop::Cop::InternalAffairs::ExampleHeredocDelimiter 219s when unexpected heredoc delimiter is used but heredoc body contains an expected delimiter line 219s does not register an offense 219s when unexpected heredoc delimiter is used in single-line heredoc 219s registers an offense 219s when unexpected heredoc delimiter is used in multi-line heredoc 219s registers an offense 219s when unexpected heredoc delimiter is used at non RuboCop specific expectation 219s does not register an offense 219s when expected heredoc delimiter is used at RuboCop specific expectation 219s does not register an offense 219s 219s RuboCop::Cop::Lint::NoReturnInBeginEndBlocks 219s rejects a return statement inside a block when using *= 219s rejects a return statement inside a block when using ||= 219s accepts a block with no return when using ||= 219s rejects a return statement inside a block when using += 219s rejects a return statement inside a block when using = 219s accepts a block with no return when using += 219s accepts a block with no return when using -= 219s accepts a block with no return when using /= 219s rejects a return statement inside a block when using /= 219s accepts a block with no return when using **= 219s accepts a block with no return when using *= 219s accepts a block with no return when using = 219s rejects a return statement inside a block when using -= 219s rejects a return statement inside a block when using **= 219s 219s RuboCop::Cop::Badge 219s can be converted to a string with the Department/CopName format 219s exposes department name 219s compares by value 219s exposes cop name 219s .parse 219s parses identifier 219s parses identifier 219s parses identifier 219s parses identifier 219s parses identifier 219s parses identifier 219s #camel_case 219s converts "lint" to CamelCase 219s converts "rspec" to CamelCase 219s converts "foo_bar" to CamelCase 219s #qualified? 219s says `Deep/Department/CopName` is qualified 219s says `Department/CopName` is qualified 219s says `CopName` is not qualified 219s .for 219s parses cop class name 219s parses cop class name 219s parses cop class name 219s parses cop class name 219s parses cop class name 219s .new 219s assigns name 219s assigns department 219s assigns name 219s assigns department 219s assigns name 219s assigns department 219s assigns name 219s assigns department 219s 219s RuboCop::Cop::Style::FileRead 219s registers an offense for and corrects `::File.open(filename).read` 219s registers an offense for and corrects the `File.open` with inline read block (mode 'r') 219s registers an offense for and corrects `File.open(filename, 'r+').read` 219s registers an offense for and corrects the `File.open` with symbolic read proc (mode 'rb') 219s registers an offense for and corrects `File.open(filename, 'r+b').read` 219s registers an offense for and corrects the `File.open` with multiline read block (mode 'r') 219s registers an offense for and corrects `File.open(filename, 'r+t').read` 219s registers an offense for and corrects `File.open(filename, 'rt').read` 219s registers an offense for and corrects `File.open(filename).read` 219s registers an offense for and corrects `File.open(filename, 'rb').read` 219s registers an offense for and corrects the `File.open` with multiline read block (mode 'rt') 219s registers an offense for and corrects the `File.open` with inline read block (mode 'rb') 219s registers an offense for and corrects the `File.open` with symbolic read proc (mode 'rt') 219s registers an offense for and corrects the `File.open` with inline read block (mode 'rt') 219s registers an offense for and corrects the `File.open` with symbolic read proc (mode 'r+b') 219s does not register an offense when not reading from the block variable 219s registers an offense for and corrects the `File.open` with inline read block (mode 'r+t') 219s registers an offense for and corrects the `File.open` with inline read block (mode 'r+') 219s registers an offense for and corrects the `File.open` with inline read block (mode 'r+b') 219s registers an offense for and corrects the `File.open` with multiline read block (mode 'r+') 219s registers an offense for and corrects the `File.open` with symbolic read proc (mode 'r') 219s registers an offense for and corrects the `File.open` with multiline read block (mode 'r+t') 219s registers an offense for and corrects `File.open(filename, 'r').read` 219s registers an offense for and corrects the `File.open` with multiline read block (mode 'r+b') 219s registers an offense for and corrects the `File.open` with symbolic read proc (mode 'r+') 219s registers an offense for and corrects the `File.open` with symbolic read proc (implicit text mode) 219s registers an offense for and corrects the `File.open` with multiline read block (implicit text mode) 219s registers an offense for and corrects the `File.open` with symbolic read proc (mode 'r+t') 219s registers an offense for and corrects the `File.open` with multiline read block (mode 'rb') 219s registers an offense for and corrects the `File.open` with inline read block (implicit text mode) 219s 219s RuboCop::Cop::Style::RedundantPercentQ 219s accepts a heredoc string that contains %q 219s accepts %q containing string interpolation 219s accepts %Q at the beginning of a double quoted string with interpolation 219s accepts %q at the beginning of a double quoted string with interpolation 219s accepts %Q at the beginning of a section of a double quoted string with interpolation 219s accepts %q at the beginning of a section of a double quoted string with interpolation 219s with %Q strings 219s accepts a string with double quotes and an escaped normal character 219s registers an offense for static string without quotes 219s registers an offense for dynamic string without quotes 219s accepts a string with double quotes and an escaped special character 219s autocorrects for strings that are concatenated with backslash 219s accepts regular expressions starting with %Q 219s accepts a dynamic %Q string with double quotes 219s registers an offense for static string with only double quotes 219s accepts a string with single quotes and double quotes 219s with %q strings 219s registers an offense for a string containing escaped backslashes 219s autocorrects for strings that are concatenated with backslash 219s registers an offense for only single quotes 219s accepts a string with escaped non-backslash characters 219s accepts regular expressions starting with %q 219s registers an offense for only double quotes 219s accepts a string with single quotes and double quotes 219s registers an offense for no quotes 219s accepts a string with escaped backslash and non-backslash characters 219s 219s RuboCop::Cop::Style::MixinUsage 219s does not register an offense when using inside nested module 219s prepend 219s registers an offense when using outside class 219s does not register an offense when using inside class 219s include 219s does not register an offense when using `include` in method definition inside class 219s registers an offense when using outside class (used above) 219s registers an offense when using outside class (used below) 219s registers an offense when using only `include` statement 219s doesn't register an offense when `include` call is a method argument 219s does not register an offense when using inside class 219s does not register an offense when using `include` in method definition inside module 219s does not register an offense when using inside block 219s does not register an offense when using outside class 219s registers an offense when using `include` in method definition outside class or module 219s does not register an offense when using inside block and `if` condition is after `include` 219s Multiple definition classes in one 219s does not register an offense when using inside class 219s Nested module 219s registers an offense when using outside class 219s extend 219s does not register an offense when using inside class 219s registers an offense when using outside class 219s 219s RuboCop::Formatter::Colorizable 219s #green 219s invokes #colorize(string, green 219s #red 219s invokes #colorize(string, red 219s #magenta 219s invokes #colorize(string, magenta 219s #blue 219s invokes #colorize(string, blue 219s #yellow 219s invokes #colorize(string, yellow 219s #colorize 219s when the global Rainbow.enabled is true 219s and the formatter's output is a tty 219s colorizes the passed string 219s and the formatter's output is not a tty 219s does nothing 219s and output is not a tty, but --color option was provided 219s colorizes the passed string 219s when the global Rainbow.enabled is false 219s and the formatter's output is a tty 219s does nothing 219s and the formatter's output is not a tty 219s does nothing 219s #black 219s invokes #colorize(string, black 219s #white 219s invokes #colorize(string, white 219s #cyan 219s invokes #colorize(string, cyan 219s 219s RuboCop::Cop::Lint::RescueType 219s accepts rescuing nothing 219s accepts rescue modifier 219s accepts rescuing nothing within a method definition 219s accepts rescuing a single exception 219s behaves like offenses 219s begin rescue 219s rescuing from 0.0 219s registers an offense and autocorrects 219s rescuing from 0.0 after another exception 219s registers an offense and autocorrects 219s rescuing from 0.0 before another exception 219s registers an offense and autocorrects 219s begin rescue ensure 219s rescuing from 0.0 219s registers an offense and autocorrects 219s def rescue 219s rescuing from 0.0 219s registers an offense and autocorrects 219s def rescue ensure 219s rescuing from 0.0 219s registers an offense and autocorrects 219s behaves like offenses 219s begin rescue 219s rescuing from {} 219s registers an offense and autocorrects 219s rescuing from {} before another exception 219s registers an offense and autocorrects 219s rescuing from {} after another exception 219s registers an offense and autocorrects 219s begin rescue ensure 219s rescuing from {} 219s registers an offense and autocorrects 219s def rescue ensure 219s rescuing from {} 219s registers an offense and autocorrects 219s def rescue 219s rescuing from {} 219s registers an offense and autocorrects 219s behaves like offenses 219s begin rescue 219s rescuing from "#{string}" before another exception 219s registers an offense and autocorrects 219s rescuing from "#{string}" after another exception 219s registers an offense and autocorrects 219s rescuing from "#{string}" 219s registers an offense and autocorrects 219s def rescue ensure 219s rescuing from "#{string}" 219s registers an offense and autocorrects 219s def rescue 219s rescuing from "#{string}" 219s registers an offense and autocorrects 219s begin rescue ensure 219s rescuing from "#{string}" 219s registers an offense and autocorrects 219s behaves like offenses 219s def rescue ensure 219s rescuing from nil 219s registers an offense and autocorrects 219s begin rescue ensure 219s rescuing from nil 219s registers an offense and autocorrects 219s def rescue 219s rescuing from nil 219s registers an offense and autocorrects 219s begin rescue 219s rescuing from nil before another exception 219s registers an offense and autocorrects 219s rescuing from nil after another exception 220s registers an offense and autocorrects 220s rescuing from nil 220s registers an offense and autocorrects 220s behaves like offenses 220s def rescue 220s rescuing from 0 220s registers an offense and autocorrects 220s begin rescue 220s rescuing from 0 after another exception 220s registers an offense and autocorrects 220s rescuing from 0 before another exception 220s registers an offense and autocorrects 220s rescuing from 0 220s registers an offense and autocorrects 220s begin rescue ensure 220s rescuing from 0 220s registers an offense and autocorrects 220s def rescue ensure 220s rescuing from 0 220s registers an offense and autocorrects 220s behaves like offenses 220s def rescue 220s rescuing from 'string' 220s registers an offense and autocorrects 220s begin rescue 220s rescuing from 'string' 220s registers an offense and autocorrects 220s rescuing from 'string' after another exception 220s registers an offense and autocorrects 220s rescuing from 'string' before another exception 220s registers an offense and autocorrects 220s def rescue ensure 220s rescuing from 'string' 220s registers an offense and autocorrects 220s begin rescue ensure 220s rescuing from 'string' 220s registers an offense and autocorrects 220s behaves like offenses 220s begin rescue ensure 220s rescuing from [] 220s registers an offense and autocorrects 220s def rescue ensure 220s rescuing from [] 220s registers an offense and autocorrects 220s def rescue 220s rescuing from [] 220s registers an offense and autocorrects 220s begin rescue 220s rescuing from [] before another exception 220s registers an offense and autocorrects 220s rescuing from [] after another exception 220s registers an offense and autocorrects 220s rescuing from [] 220s registers an offense and autocorrects 220s behaves like offenses 220s def rescue 220s rescuing from :symbol 220s registers an offense and autocorrects 220s begin rescue ensure 220s rescuing from :symbol 220s registers an offense and autocorrects 220s begin rescue 220s rescuing from :symbol after another exception 220s registers an offense and autocorrects 220s rescuing from :symbol before another exception 220s registers an offense and autocorrects 220s rescuing from :symbol 220s registers an offense and autocorrects 220s def rescue ensure 220s rescuing from :symbol 220s registers an offense and autocorrects 220s 220s RuboCop::Cop::Layout::EmptyLineAfterGuardClause 220s accepts a guard clause when the next line is `rescue` 220s accepts a `raise` guard clause not followed by empty line when guard clause is after condition without method invocation 220s accepts a guard clause followed by end 220s accepts a guard clause when the next line is `elsif` 220s registers and corrects when using guard clause is after `rubocop:enable` comment 220s accepts a guard clause when the next line is `rescue`-`else` 220s accepts a guard clause when the next line is `else` 220s registers an offense and corrects a `raise` guard clause not followed by empty line when `if` condition is after heredoc 220s registers an offense and corrects `next` guard clause not followed by empty line 220s registers an offense and corrects a guard clause not followed by empty line 220s registers and corrects when using guard clause is after `rubocop:disable` comment 220s registers an offense and corrects a guard clause that is a ternary operator 220s registers an offense and corrects a guard clause not followed by empty line when guard clause including heredoc 220s registers an offense and corrects a guard clause is before `begin` 220s registers an offense and corrects using heredoc with `and return` before guard condition 220s registers an offense and corrects a `raise` guard clause not followed by empty line when guard clause is after method call with argument 220s registers no offenses using heredoc with `and return` before guard condition with empty line 220s accepts a guard clause after a single line heredoc 220s accepts a guard clause followed by empty line when guard clause including heredoc 220s accepts a guard clause that is after a multiline heredoc nested argument call 220s registers an offense and corrects when using `and return` before guard condition 220s does not register an offense when the clause ends with a semicolon but is followed by a newline 220s registers an offense and corrects a method starting with end_ 220s registers an offense and corrects only the last guard clause 220s accepts a modifier if when the next line is `end` 220s accepts a guard clause that is after multiline heredoc 220s accepts multiple guard clauses 220s accepts modifier if 220s registers an offense and corrects a next guard clause not followed by empty line when guard clause is after heredoc including string interpolation 220s registers an offense and corrects a `raise` guard clause not followed by empty line when `unless` condition is after heredoc 220s accepts a guard clause inside oneliner block 220s registers an offense and corrects when using `or return` before guard condition 220s accepts using guard clause is after `rubocop:enable` comment 220s does not register an offense when there are multiple clauses on the same line 220s accepts a guard clause that is after a multiline heredoc with chained calls 220s accepts using guard clause is after `raise` 220s registers an offense when the clause ends with a semicolon but the next clause is on the next line 220s accepts a guard clause when the next line is `ensure` 220s does not register an offense when the clause is not followed by other code 220s 220s RuboCop::Cop::Style::DoubleNegation 220s when `EnforcedStyle: allowed_in_returns` 220s does not register an offense for ! 220s does not register an offense for `!!` when return location and using `case`, `when`, and `else` 220s registers an offense and corrects for `!!` when not return locationand using `if`, `elsif`, and `else` 220s registers an offense and corrects for `!!` with hash when not return locationand using `case`, `when`, and `else` 220s registers an offense and corrects for `!!` with single-line hash at return location 220s does not register an offense for `!!` with hash when return location and using `if`, `elsif`, and `else` 220s registers an offense and corrects for `!!` with array when not return locationand using `case`, `when`, and `else` 220s registers an offense and corrects for `!!` when not return locationand using `case`, `when`, and `else` 220s registers an offense and corrects for `!!` with single-line array at return location 220s registers an offense and corrects for `!!` 220s registers an offense and corrects for `!!` with complex array at return location 220s does not register an offense for `!!` when return location and using `rescue` and `ensure` 220s does not register an offense for `!!` with array when return location and using `case`, `when`, and `else` 220s does not register an offense for `!!` when return location 220s registers an offense and corrects for `!!` with nested hash at return location 220s does not register an offense for `!!` when return location and using `rescue` 220s does not register an offense for `!!` when return location and using `unless` 220s registers an offense and corrects for `!!` with nested array at return location 220s does not register an offense for `!!` with array when return location and using `if`, `elsif`, and `else` 220s registers an offense and corrects for `!!` with multi-line hash at return location 220s does not register an offense for `not not` 220s does not register an offense for `!!` when return location and using `if`, `elsif`, and `else` 220s does not register an offense for `!!` with hash when return location and using `case`, `when`, and `else` 220s does not register an offense for `!!` when using `return` keyword 220s does not register an offense for `!!` when return location by `define_singleton_method` 220s registers an offense and corrects for `!!` with array when not return locationand using `if`, `elsif`, and `else` 220s does not register an offense for `!!` when return location and using `rescue`, `else`, and `ensure` 220s does not register an offense for `!!` when return location by `define_method` 220s does not register an offense for `!!` when return location and using `ensure` 220s registers an offense and corrects for `!!` when not return location and using `unless` 220s registers an offense and corrects for `!!` with hash when not return locationand using `if`, `elsif`, and `else` 220s registers an offense and corrects for `!!` when not a return location 220s registers an offense and corrects for `!!` with multi-line array at return location 220s Ruby >= 2.7 220s does not register an offense for `!!` when return location and using `case`, `in`, and `else` 220s Ruby >= 2.7 220s registers an offense and corrects for `!!` when not return locationand using `case`, `in`, and `else` 220s when `EnforcedStyle: forbidden` 220s registers an offense and corrects for `!!` when not a return location 220s registers an offense for `!!` when return location and using `rescue` and `ensure` 220s registers an offense and corrects for `!!` when return location 220s registers an offense for `!!` when return location and using `rescue` 220s does not register an offense for ! 220s registers an offense and corrects for `!!` 220s does not register an offense for `not not` 220s registers an offense for `!!` when return location and using `ensure` 220s registers an offense for `!!` when return location and using `rescue`, `else`, and `ensure` 220s registers an offense and corrects for `!!` when using `return` keyword 220s 220s RuboCop::Cop::Layout::SpaceBeforeFirstArg 220s for method calls without parentheses 220s accepts a method call with one space before the first arg 220s registers an offense and corrects method call with two spaces before the first arg 220s accepts setter call 220s registers an offense for method call with no spaces before the first arg 220s accepts + operator 220s accepts multiple space containing line break 220s when using safe navigation operator 220s registers an offense and corrects method call with two spaces before the first arg 220s when AllowForAlignment is true 220s accepts method calls with aligned first arguments 220s when a vertical argument positions are aligned 220s registers an offense 220s when AllowForAlignment is false 220s registers an offense and corrects method calls with aligned first arguments 220s for method calls with parentheses 220s accepts a method call with space after the left parenthesis 220s accepts a method call without space 220s 220s RuboCop::Cop::AnnotationComment 220s #correct? 220s when no colon is required 220s behaves like incorrect 220s is expected to be falsey 220s behaves like incorrect 220s is expected to be falsey 220s behaves like incorrect 220s is expected to be falsey 220s behaves like correct 220s is expected to be truthy 220s behaves like incorrect 220s is expected to be falsey 220s behaves like incorrect 220s is expected to be falsey 220s behaves like incorrect 220s is expected to be falsey 220s behaves like correct 220s is expected to be truthy 220s behaves like incorrect 220s is expected to be falsey 220s behaves like incorrect 220s is expected to be falsey 220s behaves like incorrect 220s is expected to be falsey 220s behaves like incorrect 220s is expected to be falsey 220s behaves like incorrect 220s is expected to be falsey 220s behaves like correct 220s is expected to be truthy 220s when there is duplication in the keywords 220s when the shorter keyword is given first 220s behaves like correct 220s is expected to be truthy 220s behaves like incorrect 220s is expected to be falsey 220s behaves like correct 220s is expected to be truthy 220s behaves like incorrect 220s is expected to be falsey 220s when the longer keyword is given first 220s behaves like incorrect 220s is expected to be falsey 220s behaves like correct 220s is expected to be truthy 220s behaves like correct 220s is expected to be truthy 220s behaves like incorrect 220s is expected to be falsey 220s when a colon is required 220s behaves like incorrect 220s is expected to be falsey 220s behaves like incorrect 220s is expected to be falsey 220s behaves like correct 220s is expected to be truthy 220s behaves like incorrect 220s is expected to be falsey 220s behaves like incorrect 220s is expected to be falsey 220s behaves like incorrect 220s is expected to be falsey 220s behaves like incorrect 220s is expected to be falsey 220s behaves like incorrect 220s is expected to be falsey 220s behaves like incorrect 220s is expected to be falsey 220s behaves like correct 220s is expected to be truthy 220s behaves like correct 220s is expected to be truthy 220s behaves like incorrect 220s is expected to be falsey 220s behaves like incorrect 220s is expected to be falsey 220s behaves like incorrect 220s is expected to be falsey 220s #annotation? 220s when annotated with a non keyword 220s is expected to be falsey 220s when the keyword is not capitalized properly 220s is expected to equal true 220s when it includes a keyword 220s is expected to be falsey 220s when given a keyword followed by a space 220s is expected to equal true 220s when given a keyword followed by a colon 220s is expected to equal true 220s when given as the first word of a sentence 220s is expected to be falsey 220s when the keyword is multiple words 220s is expected to equal true 220s 220s RuboCop::Cop::Lint::UriRegexp 220s registers an offense and corrects using `::URI.regexp` with argument 220s does not register an offense when using `regexp` with variable receiver 220s does not register an offense when using `regexp` without receiver 220s registers an offense and corrects using `::URI.regexp` without argument 220s registers an offense and corrects using `URI.regexp` without argument 220s registers an offense and corrects using `URI.regexp` with argument 220s array argument 220s registers an offense and corrects using `URI.regexp` with %w arrays 220s registers an offense and corrects using `URI.regexp` with literal arrays 220s registers an offense and corrects using `URI.regexp` with %i arrays 220s 220s RuboCop::Cop::Lint::HeredocMethodCallPosition 220s incorrect cases 220s simple incorrect case with paren 220s detects 220s chained case with multiple line args 220s detects 220s chained case no parens 220s detects 220s chained case without args 220s detects 220s simple incorrect case 220s detects 220s with trailing comma in method call 220s detects 220s chained case with parens 220s detects 220s correct cases 220s accepts simple correct case 220s accepts chained correct case 220s ignores if no call 220s 220s RuboCop::Cop::Style::CollectionMethods 220s registers an offense for detect with proc param 220s registers an offense for member? with an argument and proc param 220s registers an offense for collect with an argument and proc param 220s accepts detect without a block 220s registers an offense for collect with proc param 220s registers an offense for collect with block 220s registers an offense for inject with block 220s registers an offense for detect with block 220s registers an offense for find_all with an argument and proc param 220s accepts find_all without a block 220s registers an offense for detect with an argument and proc param 220s registers an offense for inject with proc param 220s accepts inject without a block 220s registers an offense for inject with an argument and proc param 220s accepts member? without a block 220s registers an offense for member? with block 220s registers an offense for member? with proc param 220s registers an offense for find_all with block 220s accepts collect without a block 220s registers an offense for find_all with proc param 220s for methods that do not accept a symbol as implicit block 220s does not register an offense for a final symbol param 220s does not register an offense for a final symbol param with extra args 220s Ruby 2.7 220s registers an offense for detect with numblock 220s Ruby 2.7 220s registers an offense for find_all with numblock 220s for methods that accept a symbol as implicit block 220s registers an offense with a final symbol param 220s registers an offense with an argument and final symbol param 220s Ruby 2.7 220s registers an offense for member? with numblock 220s Ruby 2.7 220s registers an offense for inject with numblock 220s Ruby 2.7 220s registers an offense for collect with numblock 220s 220s RuboCop::Cop::Style::RescueModifier 220s handles parentheses around a rescue modifier 220s does not register an offense for nested normal rescue 220s registers an offense for modifier rescue around parallel assignment 220s does not register an offense for normal rescue 220s registers an offense for modifier rescue 220s handles modifier rescue in a method 220s handles more complex expression with modifier rescue 220s does not register an offense for normal rescue with ensure 220s handles modifier rescue in normal rescue 220s when a singleton method has implicit begin 220s handles modifier rescue in body of implicit begin 220s accepts normal rescue 220s when an instance method has implicit begin 220s handles modifier rescue in body of implicit begin 220s accepts normal rescue 220s excluded file 220s processes excluded files with issue 220s autocorrect 220s corrects complex rescue modifier 220s corrects doubled rescue modifiers 220s 220s RuboCop::Cop::Style::EndBlock 220s reports an offense and corrects END block 220s does not report offenses for other blocks 220s 220s RuboCop::Cop::Style::StringChars 220s does not register an offense when using `split(/ /)` 220s does not register an offense when using `split` 220s registers and corrects an offense when using `split("")` 220s registers and corrects an offense when using `split('')` 220s does not register an offense when using `chars` 220s registers and corrects an offense when using `split` without parentheses 220s registers and corrects an offense when using `split(//)` 220s 220s RuboCop::Cop::Layout::CommentIndentation 220s when allow_for_alignment is true 220s registers an offense and corrects 220s accepts comments with extra indentation if aligned with comment on previous line 220s registers offenses and corrects before __END__ but not after 220s near various kinds of brackets 220s accepts correctly indented comments 220s is unaffected by closing bracket that does not begin a line 220s on outer level 220s registers an offense and corrects an incorrectly indented (1) comment 220s accepts a correctly indented comment 220s registers an offense and corrects a documentation comment 220s accepts a comment that follows code 220s registers an offense for each incorrectly indented comment 220s registers an offense and corrects an incorrectly indented (2) comment 220s around program structure keywords 220s accepts correctly indented comments 220s with a blank line following the comment 220s accepts a correctly indented comment 220s when allow_for_alignment is false 220s registers an offense for comments with extra indentation 220s registers an offense and corrects 220s registers offenses and corrects before __END__ but not after 220s on outer level 220s accepts a comment that follows code 220s registers an offense and corrects a documentation comment 220s registers an offense for each incorrectly indented comment 220s accepts a correctly indented comment 220s registers an offense and corrects an incorrectly indented (2) comment 220s registers an offense and corrects an incorrectly indented (1) comment 220s around program structure keywords 220s accepts correctly indented comments 220s with a blank line following the comment 220s accepts a correctly indented comment 220s near various kinds of brackets 220s is unaffected by closing bracket that does not begin a line 220s accepts correctly indented comments 220s 220s RuboCop::Cop::Layout::MultilineBlockLayout 220s doesn't move end keyword in a way which causes infinite loop in combination with Style/BlockEndNewLine 220s registers an offense and corrects line-break before arguments with empty block 220s does not remove a trailing comma when only one argument is present 220s does not register offenses when there is a newline for {} block 220s registers offenses and corrects for new lambda literal syntax 220s registers an offense for missing newline in do/end block w/o params 220s does not register offenses when there is a newline for do/end block 220s autocorrects nested parens correctly 220s registers an offense and corrects a line break within destructured arguments 220s registers offenses and corrects for lambdas 220s considers the extra space required to join the lines together 220s does not register an offense for one-line do/end blocks 220s registers an offense and corrects for missing newline in {} block w/o params 220s autocorrects in more complex case with lambda and assignment, and aligns the next line two spaces out from the start of the block 220s does not register offenses when there are too many parameters to fit on one line 220s registers an offense and corrects for missing newline in do/end block with params 220s registers offenses when there are not too many parameters to fit on one line 220s registers an offense and corrects for missing newline before opening parenthesis `(` for block body 220s registers an offense and corrects a line-break within arguments 220s registers an offense and corrects for missing newline in {} block with params 220s registers an offense and corrects a do/end block with a mult-line body 220s registers an offense and corrects line-break within arguments 220s does not error out when the block is empty 220s does not register an offense for one-line {} blocks 220s registers an offense and corrects line-break before arguments 220s Ruby 2.7 220s registers an offense and corrects for missing newline in {} block w/o params 220s registers an offense and corrects for missing newline in do/end block with params 220s 220s RuboCop::Cop::Style::ImplicitRuntimeError 220s does not register an offense for `raise` with an error class 220s registers an offense for `raise` with a multiline string 220s registers an offense for `fail` with a multiline string 220s does not register an offense for `fail` without arguments 220s does not register an offense for `raise` without arguments 220s registers an offense for `raise` without error class 220s registers an offense for `fail` without error class 220s does not register an offense for `fail` with an error class 220s 220s RuboCop::Cop::Layout::ClosingHeredocIndentation 220s accepts correctly indented closing heredoc when aligned at the beginning of method definition and content is empty 220s accepts correctly indented closing heredoc when heredoc contents is before closing heredoc 220s registers an offense for incorrectly indented empty heredocs 220s accepts correctly indented closing heredoc when aligned at the beginning of method definition and using `strip_indent` 220s accepts correctly indented closing heredoc when aligned at the beginning of method definition 220s accepts correctly indented closing heredoc when heredoc contents with blank line 220s accepts correctly indented closing heredoc 220s accepts correctly indented closing heredoc when heredoc contents is after closing heredoc 220s does not register an offense for a << heredoc 220s does not register an offense for correctly indented empty heredocs 220s registers an offense for bad indentation of a closing heredoc 220s 220s RuboCop::Cop::Lint::AmbiguousOperatorPrecedence 220s registers an offense when the entire expression is wrapped in parentheses 220s does not register an offense when all operators in the expression have the same precedence 220s does not register an offense when expressions are wrapped in parentheses by reverse precedence 220s registers an offense when an expression with mixed precedence has no parens 220s corrects a super long expression in precedence order 220s allows an operator with `and` 220s does not register an offense when boolean expressions are wrapped in parens 220s does not register an offense when expressions are wrapped in parentheses by precedence 220s corrects a super long expression in reverse precedence order 220s registers an offense when an expression with mixed boolean operators has no parens 221s registers an offense for expressions containing booleans and operators 221s does not register an offense when there is only one operator in the expression 221s allows an operator with `or` 221s 221s RuboCop::Cop::Lint::AmbiguousAssignment 221s registers an offense when using `!` with `X` 221s does not register an offense when no mistype assignments 221s does not register an offense when no mistype assignments 221s registers an offense when using `!` with `@@x` 221s does not register an offense when no mistype assignments 221s registers an offense when using `+` with `@x` 221s registers an offense when using `*` with `@x` 221s registers an offense when using `*` with `$x` 221s registers an offense when using `-` with `@@x` 221s does not register an offense when no mistype assignments 221s registers an offense when using `+` with `@@x` 221s does not register an offense when no mistype assignments 221s registers an offense when using `*` with `x` 221s registers an offense when using `-` with `$x` 221s does not register an offense when no mistype assignments 221s registers an offense when using `+` with `$x` 221s does not register an offense when no mistype assignments 221s registers an offense when using `-` with `X` 221s does not register an offense when no mistype assignments 221s does not register an offense when no mistype assignments 221s does not register an offense when no mistype assignments 221s does not register an offense when no mistype assignments 221s registers an offense when using `!` with `x` 221s registers an offense when using `*` with `@@x` 221s does not register an offense when no mistype assignments 221s does not register an offense when no mistype assignments 221s registers an offense when using `-` with `x` 221s does not register an offense when no mistype assignments 221s does not register an offense when no mistype assignments 221s does not register an offense when no mistype assignments 221s registers an offense when using `+` with `x` 221s does not register an offense when no mistype assignments 221s registers an offense when using `!` with `@x` 221s does not register an offense when no mistype assignments 221s registers an offense when using `+` with `X` 221s registers an offense when using `!` with `$x` 221s registers an offense when using `*` with `X` 221s registers an offense when using `-` with `@x` 221s does not register an offense when no mistype assignments 221s does not register an offense when no mistype assignments 221s 221s RuboCop::Cop::Style::ReturnNil 221s when enforced style is `return` 221s registers an offense for return nil 221s does not register an offense for return nil from iterators 221s does not register an offense for returning others 221s when enforced style is `return_nil` 221s does not register an offense for returning others 221s registers an offense for return 221s 221s RuboCop::Cop::Style::FormatStringToken 221s supports flags and modifiers 221s ignores regexp 221s ignores __FILE__ 221s ignores time format (when used as argument to strftime) 221s ignores time format and unrelated `format` method using 221s ignores xstr 221s ignores time format (when used as argument to strptime) 221s ignores `%r` regexp 221s handles dstrs 221s ignores http links 221s ignores time format when it is stored in a variable 221s ignores placeholder arguments 221s ignores percent escapes 221s works inside hashes 221s behaves like enforced styles for format string tokens 221s when enforced style is annotated 221s sets the enforced style to annotated after inspecting "%s" 221s detects when the cop must be disabled to avoid offenses 221s #correctable_sequence? 221s supports dynamic string with interpolation 221s registers offenses for template style 221s behaves like maximum allowed unannotated 221s when MaxUnannotatedPlaceholdersAllowed is 2 221s does not register offenses for single unannotated 221s does not register offenses for dual unannotated 221s when MaxUnannotatedPlaceholdersAllowed is 1 221s does not register offenses for single unannotated 221s registers offense for dual unannotated 221s when enforced style is unannotated 221s #correctable_sequence? 221s when enforced style is template 221s detects when the cop must be disabled to avoid offenses 221s configures the enforced style to template after inspecting "%{a}" 221s supports dynamic string with interpolation 221s #correctable_sequence? 221s does not register offenses for annotated style 221s behaves like maximum allowed unannotated 221s when MaxUnannotatedPlaceholdersAllowed is 1 221s does not register offenses for single unannotated 221s does not register offenses for dual unannotated 221s when MaxUnannotatedPlaceholdersAllowed is 2 221s does not register offenses for dual unannotated 221s does not register offenses for single unannotated 221s behaves like enforced styles for format string tokens 221s when enforced style is annotated 221s #correctable_sequence? 221s detects when the cop must be disabled to avoid offenses 221s sets the enforced style to annotated after inspecting "%s" 221s supports dynamic string with interpolation 221s registers offenses for template style 221s behaves like maximum allowed unannotated 221s when MaxUnannotatedPlaceholdersAllowed is 1 221s registers offense for dual unannotated 221s does not register offenses for single unannotated 221s when MaxUnannotatedPlaceholdersAllowed is 2 221s does not register offenses for dual unannotated 221s does not register offenses for single unannotated 221s when enforced style is unannotated 221s #correctable_sequence? 221s when enforced style is template 221s #correctable_sequence? 221s does not register offenses for annotated style 221s supports dynamic string with interpolation 221s detects when the cop must be disabled to avoid offenses 221s configures the enforced style to template after inspecting "%{a}" 221s behaves like maximum allowed unannotated 221s when MaxUnannotatedPlaceholdersAllowed is 1 221s does not register offenses for dual unannotated 221s does not register offenses for single unannotated 221s when MaxUnannotatedPlaceholdersAllowed is 2 221s does not register offenses for dual unannotated 221s does not register offenses for single unannotated 221s behaves like enforced styles for format string tokens 221s when enforced style is annotated 221s sets the enforced style to annotated after inspecting "%s" 221s supports dynamic string with interpolation 221s detects when the cop must be disabled to avoid offenses 221s #correctable_sequence? 221s registers offenses for template style 221s behaves like maximum allowed unannotated 221s when MaxUnannotatedPlaceholdersAllowed is 2 221s does not register offenses for single unannotated 221s does not register offenses for dual unannotated 221s when MaxUnannotatedPlaceholdersAllowed is 1 221s registers offense for dual unannotated 221s does not register offenses for single unannotated 221s when enforced style is unannotated 221s #correctable_sequence? 221s when enforced style is template 221s detects when the cop must be disabled to avoid offenses 221s configures the enforced style to template after inspecting "%{a}" 221s does not register offenses for annotated style 221s #correctable_sequence? 221s supports dynamic string with interpolation 221s behaves like maximum allowed unannotated 221s when MaxUnannotatedPlaceholdersAllowed is 1 221s does not register offenses for dual unannotated 221s does not register offenses for single unannotated 221s when MaxUnannotatedPlaceholdersAllowed is 2 221s does not register offenses for single unannotated 221s does not register offenses for dual unannotated 221s behaves like enforced styles for format string tokens 221s when enforced style is annotated 221s registers offenses for template style 221s sets the enforced style to annotated after inspecting "%s" 221s #correctable_sequence? 221s supports dynamic string with interpolation 221s detects when the cop must be disabled to avoid offenses 221s behaves like maximum allowed unannotated 221s when MaxUnannotatedPlaceholdersAllowed is 2 221s does not register offenses for single unannotated 221s does not register offenses for dual unannotated 221s when MaxUnannotatedPlaceholdersAllowed is 1 221s does not register offenses for single unannotated 221s registers offense for dual unannotated 221s when enforced style is unannotated 221s #correctable_sequence? 221s when enforced style is template 221s supports dynamic string with interpolation 221s #correctable_sequence? 221s configures the enforced style to template after inspecting "%{a}" 221s detects when the cop must be disabled to avoid offenses 221s registers offenses for annotated style 221s behaves like maximum allowed unannotated 221s when MaxUnannotatedPlaceholdersAllowed is 1 221s registers offense for dual unannotated 221s does not register offenses for single unannotated 221s when MaxUnannotatedPlaceholdersAllowed is 2 221s does not register offenses for dual unannotated 221s does not register offenses for single unannotated 221s behaves like enforced styles for format string tokens 221s when enforced style is template 221s configures the enforced style to template after inspecting "%{a}" 221s #correctable_sequence? 221s detects when the cop must be disabled to avoid offenses 221s supports dynamic string with interpolation 221s does not register offenses for annotated style 221s behaves like maximum allowed unannotated 221s when MaxUnannotatedPlaceholdersAllowed is 1 221s does not register offenses for single unannotated 221s does not register offenses for dual unannotated 221s when MaxUnannotatedPlaceholdersAllowed is 2 221s does not register offenses for single unannotated 221s does not register offenses for dual unannotated 221s when enforced style is annotated 221s #correctable_sequence? 221s sets the enforced style to annotated after inspecting "%s" 221s detects when the cop must be disabled to avoid offenses 221s supports dynamic string with interpolation 221s registers offenses for template style 221s behaves like maximum allowed unannotated 221s when MaxUnannotatedPlaceholdersAllowed is 2 221s does not register offenses for single unannotated 221s does not register offenses for dual unannotated 221s when MaxUnannotatedPlaceholdersAllowed is 1 221s does not register offenses for single unannotated 221s registers offense for dual unannotated 221s when enforced style is unannotated 221s #correctable_sequence? 221s when enforced style is template 221s gives a helpful error message 221s behaves like enforced styles for format string tokens 221s when enforced style is unannotated 221s #correctable_sequence? 221s when enforced style is template 221s supports dynamic string with interpolation 221s detects when the cop must be disabled to avoid offenses 221s does not register offenses for annotated style 221s #correctable_sequence? 221s configures the enforced style to template after inspecting "%{a}" 221s behaves like maximum allowed unannotated 221s when MaxUnannotatedPlaceholdersAllowed is 2 221s does not register offenses for dual unannotated 221s does not register offenses for single unannotated 221s when MaxUnannotatedPlaceholdersAllowed is 1 221s does not register offenses for single unannotated 221s does not register offenses for dual unannotated 221s when enforced style is annotated 221s registers offenses for template style 221s #correctable_sequence? 221s detects when the cop must be disabled to avoid offenses 221s sets the enforced style to annotated after inspecting "%s" 221s supports dynamic string with interpolation 221s behaves like maximum allowed unannotated 221s when MaxUnannotatedPlaceholdersAllowed is 2 221s does not register offenses for single unannotated 221s does not register offenses for dual unannotated 221s when MaxUnannotatedPlaceholdersAllowed is 1 221s does not register offenses for single unannotated 221s registers offense for dual unannotated 221s behaves like enforced styles for format string tokens 221s when enforced style is annotated 221s sets the enforced style to annotated after inspecting "%s" 221s supports dynamic string with interpolation 221s #correctable_sequence? 221s registers offenses for template style 221s detects when the cop must be disabled to avoid offenses 221s behaves like maximum allowed unannotated 221s when MaxUnannotatedPlaceholdersAllowed is 1 221s registers offense for dual unannotated 221s does not register offenses for single unannotated 221s when MaxUnannotatedPlaceholdersAllowed is 2 221s does not register offenses for dual unannotated 221s does not register offenses for single unannotated 221s when enforced style is unannotated 221s #correctable_sequence? 221s when enforced style is template 221s #correctable_sequence? 221s configures the enforced style to template after inspecting "%{a}" 221s supports dynamic string with interpolation 221s detects when the cop must be disabled to avoid offenses 221s does not register offenses for annotated style 221s behaves like maximum allowed unannotated 221s when MaxUnannotatedPlaceholdersAllowed is 1 221s does not register offenses for single unannotated 221s does not register offenses for dual unannotated 221s when MaxUnannotatedPlaceholdersAllowed is 2 221s does not register offenses for single unannotated 221s does not register offenses for dual unannotated 221s behaves like enforced styles for format string tokens 221s when enforced style is annotated 221s #correctable_sequence? 221s registers offenses for template style 221s detects when the cop must be disabled to avoid offenses 221s supports dynamic string with interpolation 221s sets the enforced style to annotated after inspecting "%s" 221s behaves like maximum allowed unannotated 221s when MaxUnannotatedPlaceholdersAllowed is 2 221s does not register offenses for single unannotated 221s does not register offenses for dual unannotated 221s when MaxUnannotatedPlaceholdersAllowed is 1 221s registers offense for dual unannotated 221s does not register offenses for single unannotated 221s when enforced style is template 221s configures the enforced style to template after inspecting "%{a}" 221s detects when the cop must be disabled to avoid offenses 221s #correctable_sequence? 221s does not register offenses for annotated style 221s supports dynamic string with interpolation 221s behaves like maximum allowed unannotated 221s when MaxUnannotatedPlaceholdersAllowed is 1 221s does not register offenses for single unannotated 221s does not register offenses for dual unannotated 221s when MaxUnannotatedPlaceholdersAllowed is 2 221s does not register offenses for single unannotated 221s does not register offenses for dual unannotated 221s when enforced style is unannotated 221s #correctable_sequence? 221s behaves like enforced styles for format string tokens 221s when enforced style is template 221s does not register offenses for annotated style 221s supports dynamic string with interpolation 221s configures the enforced style to template after inspecting "%{a}" 221s #correctable_sequence? 221s detects when the cop must be disabled to avoid offenses 221s behaves like maximum allowed unannotated 221s when MaxUnannotatedPlaceholdersAllowed is 1 221s does not register offenses for single unannotated 221s does not register offenses for dual unannotated 221s when MaxUnannotatedPlaceholdersAllowed is 2 221s does not register offenses for single unannotated 221s does not register offenses for dual unannotated 221s when enforced style is unannotated 221s #correctable_sequence? 221s when enforced style is annotated 221s #correctable_sequence? 221s registers offenses for template style 221s supports dynamic string with interpolation 221s sets the enforced style to annotated after inspecting "%s" 221s detects when the cop must be disabled to avoid offenses 221s behaves like maximum allowed unannotated 221s when MaxUnannotatedPlaceholdersAllowed is 1 221s does not register offenses for single unannotated 221s registers offense for dual unannotated 221s when MaxUnannotatedPlaceholdersAllowed is 2 221s does not register offenses for single unannotated 221s does not register offenses for dual unannotated 221s behaves like enforced styles for format string tokens 221s when enforced style is annotated 221s detects when the cop must be disabled to avoid offenses 221s registers offenses for template style 221s sets the enforced style to annotated after inspecting "%s" 221s #correctable_sequence? 221s supports dynamic string with interpolation 221s behaves like maximum allowed unannotated 221s when MaxUnannotatedPlaceholdersAllowed is 2 221s does not register offenses for single unannotated 221s does not register offenses for dual unannotated 221s when MaxUnannotatedPlaceholdersAllowed is 1 221s registers offense for dual unannotated 221s does not register offenses for single unannotated 221s when enforced style is unannotated 221s #correctable_sequence? 221s when enforced style is template 221s #correctable_sequence? 221s does not register offenses for annotated style 221s detects when the cop must be disabled to avoid offenses 221s configures the enforced style to template after inspecting "%{a}" 221s supports dynamic string with interpolation 221s behaves like maximum allowed unannotated 221s when MaxUnannotatedPlaceholdersAllowed is 1 221s does not register offenses for dual unannotated 221s does not register offenses for single unannotated 221s when MaxUnannotatedPlaceholdersAllowed is 2 221s does not register offenses for single unannotated 221s does not register offenses for dual unannotated 221s behaves like enforced styles for format string tokens 221s when enforced style is annotated 221s #correctable_sequence? 221s detects when the cop must be disabled to avoid offenses 221s supports dynamic string with interpolation 221s sets the enforced style to annotated after inspecting "%s" 221s registers offenses for template style 221s behaves like maximum allowed unannotated 221s when MaxUnannotatedPlaceholdersAllowed is 1 221s does not register offenses for single unannotated 221s registers offense for dual unannotated 221s when MaxUnannotatedPlaceholdersAllowed is 2 221s does not register offenses for dual unannotated 221s does not register offenses for single unannotated 221s when enforced style is template 221s configures the enforced style to template after inspecting "%{a}" 221s #correctable_sequence? 221s supports dynamic string with interpolation 221s does not register offenses for annotated style 221s detects when the cop must be disabled to avoid offenses 221s behaves like maximum allowed unannotated 221s when MaxUnannotatedPlaceholdersAllowed is 2 221s does not register offenses for single unannotated 221s does not register offenses for dual unannotated 221s when MaxUnannotatedPlaceholdersAllowed is 1 221s does not register offenses for single unannotated 221s does not register offenses for dual unannotated 221s when enforced style is unannotated 221s #correctable_sequence? 221s behaves like enforced styles for format string tokens 221s when enforced style is unannotated 221s #correctable_sequence? 221s when enforced style is template 221s supports dynamic string with interpolation 221s detects when the cop must be disabled to avoid offenses 221s #correctable_sequence? 221s configures the enforced style to template after inspecting "%{a}" 221s does not register offenses for annotated style 221s behaves like maximum allowed unannotated 221s when MaxUnannotatedPlaceholdersAllowed is 2 221s does not register offenses for single unannotated 221s does not register offenses for dual unannotated 221s when MaxUnannotatedPlaceholdersAllowed is 1 221s does not register offenses for single unannotated 221s does not register offenses for dual unannotated 221s when enforced style is annotated 221s supports dynamic string with interpolation 221s #correctable_sequence? 221s detects when the cop must be disabled to avoid offenses 221s registers offenses for template style 221s sets the enforced style to annotated after inspecting "%s" 221s behaves like maximum allowed unannotated 221s when MaxUnannotatedPlaceholdersAllowed is 1 221s does not register offenses for single unannotated 221s registers offense for dual unannotated 221s when MaxUnannotatedPlaceholdersAllowed is 2 221s does not register offenses for single unannotated 221s does not register offenses for dual unannotated 221s behaves like enforced styles for format string tokens 221s when enforced style is unannotated 221s #correctable_sequence? 221s when enforced style is template 221s #correctable_sequence? 221s does not register offenses for annotated style 221s detects when the cop must be disabled to avoid offenses 221s supports dynamic string with interpolation 221s configures the enforced style to template after inspecting "%{a}" 221s behaves like maximum allowed unannotated 221s when MaxUnannotatedPlaceholdersAllowed is 1 221s does not register offenses for dual unannotated 221s does not register offenses for single unannotated 221s when MaxUnannotatedPlaceholdersAllowed is 2 221s does not register offenses for single unannotated 221s does not register offenses for dual unannotated 221s when enforced style is annotated 221s detects when the cop must be disabled to avoid offenses 221s #correctable_sequence? 221s registers offenses for template style 221s supports dynamic string with interpolation 221s sets the enforced style to annotated after inspecting "%s" 221s behaves like maximum allowed unannotated 221s when MaxUnannotatedPlaceholdersAllowed is 2 221s does not register offenses for dual unannotated 221s does not register offenses for single unannotated 221s when MaxUnannotatedPlaceholdersAllowed is 1 221s does not register offenses for single unannotated 221s registers offense for dual unannotated 221s behaves like enforced styles for format string tokens 221s when enforced style is annotated 221s detects when the cop must be disabled to avoid offenses 221s #correctable_sequence? 221s sets the enforced style to annotated after inspecting "%s" 221s supports dynamic string with interpolation 221s registers offenses for template style 221s behaves like maximum allowed unannotated 221s when MaxUnannotatedPlaceholdersAllowed is 1 221s does not register offenses for single unannotated 221s registers offense for dual unannotated 221s when MaxUnannotatedPlaceholdersAllowed is 2 221s does not register offenses for single unannotated 221s does not register offenses for dual unannotated 221s when enforced style is unannotated 221s #correctable_sequence? 221s when enforced style is template 221s configures the enforced style to template after inspecting "%{a}" 221s #correctable_sequence? 221s detects when the cop must be disabled to avoid offenses 221s supports dynamic string with interpolation 222s does not register offenses for annotated style 222s behaves like maximum allowed unannotated 222s when MaxUnannotatedPlaceholdersAllowed is 1 222s does not register offenses for dual unannotated 222s does not register offenses for single unannotated 222s when MaxUnannotatedPlaceholdersAllowed is 2 222s does not register offenses for single unannotated 222s does not register offenses for dual unannotated 222s behaves like enforced styles for format string tokens 222s when enforced style is unannotated 222s #correctable_sequence? 222s when enforced style is annotated 222s #correctable_sequence? 222s detects when the cop must be disabled to avoid offenses 222s registers offenses for template style 222s sets the enforced style to annotated after inspecting "%s" 222s supports dynamic string with interpolation 222s behaves like maximum allowed unannotated 222s when MaxUnannotatedPlaceholdersAllowed is 2 222s does not register offenses for single unannotated 222s does not register offenses for dual unannotated 222s when MaxUnannotatedPlaceholdersAllowed is 1 222s does not register offenses for single unannotated 222s registers offense for dual unannotated 222s when enforced style is template 222s does not register offenses for annotated style 222s detects when the cop must be disabled to avoid offenses 222s supports dynamic string with interpolation 222s configures the enforced style to template after inspecting "%{a}" 222s #correctable_sequence? 222s behaves like maximum allowed unannotated 222s when MaxUnannotatedPlaceholdersAllowed is 1 222s does not register offenses for single unannotated 222s does not register offenses for dual unannotated 222s when MaxUnannotatedPlaceholdersAllowed is 2 222s does not register offenses for dual unannotated 222s does not register offenses for single unannotated 222s behaves like enforced styles for format string tokens 222s when enforced style is template 222s configures the enforced style to template after inspecting "%{a}" 222s detects when the cop must be disabled to avoid offenses 222s #correctable_sequence? 222s does not register offenses for annotated style 222s supports dynamic string with interpolation 222s behaves like maximum allowed unannotated 222s when MaxUnannotatedPlaceholdersAllowed is 2 222s does not register offenses for dual unannotated 222s does not register offenses for single unannotated 222s when MaxUnannotatedPlaceholdersAllowed is 1 222s does not register offenses for single unannotated 222s does not register offenses for dual unannotated 222s when enforced style is unannotated 222s #correctable_sequence? 222s when enforced style is annotated 222s detects when the cop must be disabled to avoid offenses 222s sets the enforced style to annotated after inspecting "%s" 222s supports dynamic string with interpolation 222s registers offenses for template style 222s #correctable_sequence? 222s behaves like maximum allowed unannotated 222s when MaxUnannotatedPlaceholdersAllowed is 1 222s registers offense for dual unannotated 222s does not register offenses for single unannotated 222s when MaxUnannotatedPlaceholdersAllowed is 2 222s does not register offenses for single unannotated 222s does not register offenses for dual unannotated 222s behaves like enforced styles for format string tokens 222s when enforced style is annotated 222s #correctable_sequence? 222s detects when the cop must be disabled to avoid offenses 222s registers offenses for template style 222s sets the enforced style to annotated after inspecting "%s" 222s supports dynamic string with interpolation 222s behaves like maximum allowed unannotated 222s when MaxUnannotatedPlaceholdersAllowed is 2 222s does not register offenses for dual unannotated 222s does not register offenses for single unannotated 222s when MaxUnannotatedPlaceholdersAllowed is 1 222s registers offense for dual unannotated 222s does not register offenses for single unannotated 222s when enforced style is template 222s does not register offenses for annotated style 222s #correctable_sequence? 222s configures the enforced style to template after inspecting "%{a}" 222s supports dynamic string with interpolation 222s detects when the cop must be disabled to avoid offenses 222s behaves like maximum allowed unannotated 222s when MaxUnannotatedPlaceholdersAllowed is 2 222s does not register offenses for single unannotated 222s does not register offenses for dual unannotated 222s when MaxUnannotatedPlaceholdersAllowed is 1 222s does not register offenses for single unannotated 222s does not register offenses for dual unannotated 222s when enforced style is unannotated 222s #correctable_sequence? 222s when enforced style is annotated 222s gives a helpful error message 222s when AllowedMethods is disabled 222s registers an offense 222s when AllowedPatterns is disabled 222s registers an offense 222s when AllowedPatterns is enabled 222s does not register an offense 222s registers an offense for different method call within ignored method 222s does not register an offense for value in nested structure 222s when AllowedMethods is enabled 222s registers an offense for different method call within ignored method 222s does not register an offense 222s does not register an offense for value in nested structure 222s behaves like enforced styles for format string tokens 222s when enforced style is template 222s detects when the cop must be disabled to avoid offenses 222s #correctable_sequence? 222s does not register offenses for annotated style 222s configures the enforced style to template after inspecting "%{a}" 222s supports dynamic string with interpolation 222s behaves like maximum allowed unannotated 222s when MaxUnannotatedPlaceholdersAllowed is 1 222s does not register offenses for single unannotated 222s does not register offenses for dual unannotated 222s when MaxUnannotatedPlaceholdersAllowed is 2 222s does not register offenses for single unannotated 222s does not register offenses for dual unannotated 222s when enforced style is annotated 222s registers offenses for template style 222s sets the enforced style to annotated after inspecting "%s" 222s detects when the cop must be disabled to avoid offenses 222s supports dynamic string with interpolation 222s #correctable_sequence? 222s behaves like maximum allowed unannotated 222s when MaxUnannotatedPlaceholdersAllowed is 2 222s does not register offenses for single unannotated 222s does not register offenses for dual unannotated 222s when MaxUnannotatedPlaceholdersAllowed is 1 222s registers offense for dual unannotated 222s does not register offenses for single unannotated 222s when enforced style is unannotated 222s #correctable_sequence? 222s when enforced style is unannotated 222s gives a helpful error message 222s 222s RuboCop::Cop::Style::OrAssignment 222s when `then` branch body is empty 222s registers an offense 222s when using var = if var; var; else; something; end 222s registers an offense with global variables 222s registers an offense with class variables 222s does not register an offense if any of the variables are different 222s registers an offense with normal variables 222s registers an offense with instance variables 222s when using `elsif` statement 222s does not register an offense 222s when using var = something unless var 222s registers an offense for class variables 222s registers an offense for instance variables 222s registers an offense for normal variables 222s registers an offense for global variables 222s does not register an offense if any of the variables are different 222s when using unless var; var = something; end 222s registers an offense for normal variables 222s does not register an offense if any of the variables are different 222s registers an offense for class variables 222s registers an offense for global variables 222s registers an offense for instance variables 222s when using var = var ? var : something 222s registers an offense with class variables 222s does not register an offense if any of the variables are different 222s registers an offense with instance variables 222s registers an offense with normal variables 222s registers an offense with global variables 222s 222s RuboCop::Cop::InternalAffairs::NodeDestructuring 222s registers an offense when destructuring using a splat 222s does not register an offense when receiver is named `array` 222s when destructuring using `node.children` 222s registers an offense when receiver is named `send_node` 222s registers an offense when receiver is named `node` 222s 222s RuboCop::Formatter::SimpleTextFormatter 222s #report_file 222s behaves like report for severity 222s when the offense is not corrected 222s prints message as-is 222s when the offense is correctable 222s prints message as-is 222s the file is under the current working directory 222s prints as relative path 222s when the offense is automatically corrected 222s prints [Corrected] along with message 222s the file is outside of the current working directory 222s prints as absolute path 222s when the offense is marked as todo 222s prints [Todo] along with message 222s behaves like report for severity 222s the file is outside of the current working directory 222s prints as absolute path 222s when the offense is correctable 222s prints message as-is 222s when the offense is automatically corrected 222s prints [Corrected] along with message 222s the file is under the current working directory 222s prints as relative path 222s when the offense is not corrected 222s prints message as-is 222s when the offense is marked as todo 222s prints [Todo] along with message 222s behaves like report for severity 222s the file is outside of the current working directory 222s prints as absolute path 222s when the offense is not corrected 222s prints message as-is 222s when the offense is correctable 222s prints message as-is 222s when the offense is automatically corrected 222s prints [Corrected] along with message 222s when the offense is marked as todo 222s prints [Todo] along with message 222s the file is under the current working directory 222s prints as relative path 222s behaves like report for severity 222s when the offense is automatically corrected 222s prints [Corrected] along with message 222s the file is under the current working directory 222s prints as relative path 222s when the offense is marked as todo 222s prints [Todo] along with message 222s when the offense is correctable 222s prints message as-is 222s when the offense is not corrected 222s prints message as-is 222s the file is outside of the current working directory 222s prints as absolute path 222s behaves like report for severity 222s the file is under the current working directory 222s prints as relative path 222s when the offense is marked as todo 222s prints [Todo] along with message 222s the file is outside of the current working directory 222s prints as absolute path 222s when the offense is correctable 222s prints message as-is 222s when the offense is not corrected 222s prints message as-is 222s when the offense is automatically corrected 222s prints [Corrected] along with message 222s behaves like report for severity 222s when the offense is correctable 222s prints message as-is 222s the file is under the current working directory 222s prints as relative path 222s when the offense is automatically corrected 222s prints [Corrected] along with message 222s the file is outside of the current working directory 222s prints as absolute path 222s when the offense is marked as todo 222s prints [Todo] along with message 222s when the offense is not corrected 222s prints message as-is 222s #report_summary 222s when 2 offenses detected 222s handles pluralization correctly 222s when a offense detected 222s handles pluralization correctly 222s when a offense detected and a offense autocorrectable 222s handles pluralization correctly 222s when no files inspected 222s handles pluralization correctly 222s when 2 offenses are corrected and 2 offenses autocorrectable 222s handles pluralization correctly 222s when 2 offenses detected and 2 offenses autocorrectable 222s handles pluralization correctly 222s when a file inspected and no offenses detected 222s handles pluralization correctly 222s when 2 offenses are corrected 222s handles pluralization correctly 222s when an offense is corrected 222s prints about correction 222s 222s RuboCop::Cop::Style::NestedTernaryOperator 222s registers an offense and corrects for a nested ternary operator expression with no parentheses on the outside 222s can handle multiple nested ternaries 222s registers an offense and corrects for a nested ternary operator expression 222s registers an offense and corrects for a nested ternary operator expression with block 222s accepts a non-nested ternary operator within an if 222s 222s RuboCop::Cop::Lint::ShadowedArgument 222s block argument shadowing 222s when a block local variable is assigned but no argument is shadowed 222s accepts 222s when multiple arguments are shadowed 222s and one of them shadowed within a lambda while another is shadowed outside 222s registers an offense 222s when a single argument is shadowed 222s registers an offense 222s and shadowed within a block 222s registers an offense without specifying where the reassignment took place 222s and the block is nested within a conditional 222s registers an offense without specifying where the reassignment took place 222s and the argument was used before shadowing 222s accepts 222s and the block occurs after the reassignment 222s registers an offense 222s and was used before shadowing 222s accepts 222s and the block is nested within a block 222s registers an offense without specifying where the reassignment took place 222s and the argument was used before shadowing 222s accepts 222s and the argument was not shadowed outside the block 222s accepts 222s and the argument is not used 222s accepts 222s when zsuper is used 222s accepts 222s and shadowed within a conditional 222s registers an offense without specifying where the reassignment took place 222s and the conditional is nested within a lambda 222s registers an offense without specifying where the reassignment took place 222s and the argument was used before shadowing 222s accepts 222s and the conditional is nested within a conditional 222s registers an offense without specifying where the reassignment took place 222s and the argument was used before shadowing 222s accepts 222s and the conditional occurs after the reassignment 222s registers an offense 222s and the argument was not shadowed outside the conditional 222s accepts 222s and was used before shadowing 222s accepts 222s when binding is used 222s registers an offense 222s when IgnoreImplicitReferences config option is set to true 222s accepts 222s method argument shadowing 222s when a single argument is shadowed 222s registers an offense 222s when binding is used 222s registers an offense 222s when IgnoreImplicitReferences config option is set to true 222s accepts 222s and the argument is not used 222s accepts 222s when reassigning to splat variable 222s does not register an offense 222s and shadowed within a block 222s registers an offense without specifying where the reassignment took place 222s and the argument was not shadowed outside the block 222s accepts 222s and the block occurs after the reassignment 222s registers an offense 222s and the block is nested within a conditional 222s registers an offense without specifying where the reassignment took place 222s and the argument was used before shadowing 222s accepts 222s and the block is nested within a block 222s registers an offense without specifying where the reassignment took place 222s and the argument was used before shadowing 222s accepts 222s and was used before shadowing 222s accepts 222s when argument was used in shorthand assignment 222s does not register an offense 222s when a splat argument is shadowed 222s registers an offense 222s when zsuper is used 222s registers an offense 222s when argument was shadowed by zsuper 222s registers an offense 222s when IgnoreImplicitReferences config option is set to true 222s accepts 222s when argument was shadowed by zsuper 222s does not register an offense 222s and shadowed within a conditional 222s registers an offense without specifying where the reassignment took place 222s and the conditional occurs after the reassignment 222s registers an offense 222s and the conditional is nested within a conditional 222s registers an offense without specifying where the reassignment took place 222s and the argument was used before shadowing 222s accepts 222s and was used before shadowing 222s accepts 222s and the argument was not shadowed outside the conditional 222s accepts 222s and the conditional is nested within a lambda 222s registers an offense without specifying where the reassignment took place 222s and the argument was used before shadowing 222s accepts 222s when multiple arguments are shadowed 222s and one of them shadowed within a lambda while another is shadowed outside 222s registers an offense 222s 222s RuboCop::Cop::Lint::RefinementImportMethods 222s Ruby <= 3.0 222s does not register an offense when using `include` in `refine` block 222s does not register an offense when using `prepend` in `refine` block 222s Ruby >= 3.1 222s registers an offense when using `prepend` in `refine` block 222s does not register an offense when using `include` with a receiver in `refine` block 222s registers an offense when using `include` in `refine` block 222s does not register an offense when using `import_methods` in `refine` block 222s 222s RuboCop::Cop::Migration::DepartmentName 222s when todo/enable comments have cop names without departments 222s registers offenses and corrects 222s registers offenses and corrects when using a legacy cop name 222s registers offenses and corrects when there is space around `:` 222s when a disable comment contains an unexpected character for department name 222s accepts 222s when a disable comment has cop names with departments 222s accepts 222s when an unexpected disable comment format 222s does not register an offense 222s when a disable comment contains a plain comment 222s accepts 222s when only department name has given 222s does not register an offense 222s 222s RuboCop::Cop::Lint::DisjunctiveAssignmentInConstructor 222s empty constructor 222s accepts 222s constructor does not have disjunctive assignment 222s accepts 222s constructor has disjunctive assignment 222s LHS is lvar 222s accepts 222s LHS is ivar 222s registers an offense and corrects 222s constructor calls super after assignment 222s registers an offense and corrects 222s constructor calls any method before disjunctive assignment 222s accepts 222s constructor calls super before disjunctive assignment 222s accepts 222s 222s RuboCop::Cop::Layout::MultilineHashBraceLayout 222s ignores empty hashes 222s ignores single-line hashes 222s ignores implicit hashes 222s behaves like multiline literal brace layout trailing comma 222s symmetrical style 222s opening brace on same line as first element 222s last element has a trailing comma 222s autocorrects closing brace on different line from last element 222s same_line style 222s opening brace on same line as first element 222s last element has a trailing comma 222s autocorrects closing brace on different line as last element 222s behaves like multiline literal brace layout 222s symmetrical style 222s opening brace on separate line from first element 222s allows closing brace on separate line from last element 222s allows closing brace on separate line from last multiline element 222s detects closing brace on same line as last element 222s opening brace on same line as first element 222s autocorrects closing brace on different line from last element 222s allows closing brace on same line as last element 222s detects closing brace on different line from last element 222s allows closing brace on same line as last multiline element 222s with a chained call on the closing brace 222s and a comment after the last element 222s detects closing brace on separate line from last elementbut does not autocorrect the closing brace 222s but no comment after the last element 222s autocorrects the closing brace 222s same_line style 222s opening brace on same line as first element 222s allows closing brace on same line from last element 222s detects closing brace on different line from multiline element 222s allows closing brace on same line as multi-line element 222s autocorrects closing brace on different line as last element 222s with a chained call on the closing brace 222s but no comment after the last element 222s autocorrects the closing brace 222s and a comment after the last element 222s detects closing brace on separate line from last elementbut does not autocorrect the closing brace 222s opening brace on separate line from first element 222s allows closing brace on same line as last multiline element 222s detects closing brace on different line from last element 222s allows closing brace on same line as last element 222s heredoc 222s detects heredoc structures that are safe to add to 222s ignores heredocs that could share a last line 222s new_line style 222s opening brace on separate line from first element 222s detects closing brace on same line as last element 222s allows closing brace on separate line from last multiline element 222s allows closing brace on separate line from last element 222s opening brace on same line as first element 222s allows closing brace on different line from multi-line element 222s detects closing brace on same line as last multiline element 222s autocorrects closing brace on same line as last element 222s allows closing brace on different line from last element 222s behaves like multiline literal brace layout method argument 222s when arguments to a method 222s but no comment after the last element 222s autocorrects the closing brace 222s and a comment after the last element 222s detects closing brace on separate line from last element 222s 222s RuboCop::Cop::Team 222s .new 222s calls mobilize when passed classes 222s accepts cops directly classes 222s #debug? 222s when the option argument of .new is omitted 223s is expected to be falsey 223s when { debug: true } is passed to .new 223s is expected to be truthy 223s #external_dependency_checksum 223s does not error with no cops 223s when cop with different checksum joins 223s has a different checksum for the whole team 223s when a cop joins 223s returns string 223s when multiple cops join 223s returns string 223s #inspect_file 223s returns offenses 223s when done twice 224s allows cops to get ready 224s when Cop#on_* raises an error 224s records Team#errors 224s when a correction raises an error 224s records Team#errors 224s when Parser reports non-fatal warning for the file 224s returns Parser warning offenses 224s returns offenses from cops 224s when a cop has no interest in the file 224s returns all offenses except the ones of the cop 224s when autocorrection is enabled 225s does autocorrection 225s still returns offenses 225s when autocorrection is enabled and file encoding is mismatch 225s no error occurs 225s #autocorrect? 225s when { autocorrect: true } is passed to .new 225s is expected to be truthy 225s when the option argument of .new is omitted 225s is expected to be falsey 225s #forces 225s returns force instances 225s when a cop joined a force 225s returns the force 225s when no cops joined force 225s returns nothing 225s when multiple cops joined a same force 225s returns only one force instance 225s #cops 226s returns cop instances 226s when only some cop classes are passed to .new 226s returns only instances of the classes 226s when some classes are disabled with config 226s does not return instances of the classes 226s when incompatible cops are correcting together 226s autocorrects without SyntaxError 226s 226s RuboCop::Cop::Style::HashEachMethods 226s when node matches a keys#each or values#each 226s when receiver is a send 226s does not register an offense for foo#each_key 226s does not register an offense for Hash#each_value 226s registers offense, autocorrects foo#values.each to foo#each_value with a symbol proc argument 226s registers offense, autocorrects foo#values.each to foo#each_value 226s registers offense, autocorrects foo#keys.each to foo#each_key with a symbol proc argument 226s registers offense, autocorrects foo#keys.each to foo#each_key 226s Ruby 2.7 226s registers offense, autocorrects foo#keys.each to foo#each_key with numblock 226s when receiver is a hash literal 226s registers offense, autocorrects {}#values.each to {}#each_value with a symbol proc argument 226s does not register an offense for {}#each_value 226s registers offense, autocorrects {}#keys.each to {}#each_key with a symbol proc argument 226s does not register an offense for {}#each_key 226s registers offense, autocorrects {}#values.each with {}#each_value 226s registers offense, autocorrects {}#keys.each with {}#each_key 226s when `AllowedReceivers: ['execute']` 226s does not register an offense when receiver is `execute` method 226s does not register an offense when receiver is `execute` variable 226s registers an offense when receiver is not allowed name 226s does not register an offense when receiver is `execute` method with a symbol proc argument 226s when receiver is implicit 226s does not register an offense for each_key 226s does not register an offense for `keys.each` with a symbol proc argument 226s does not register an offense for each_value 226s does not register an offense for `values.each` with a symbol proc argument 226s does not register an offense for `values.each` 226s does not register an offense for `keys.each` 226s 226s RuboCop::Cop::Metrics::ParameterLists 226s registers an offense when optargs count exceeds the maximum 226s does not register an offense when method has no args 226s accepts a proc with more than 4 parameters 226s does not register an offense when method has allowed amount of optargs 226s accepts a method def with 4 parameters 226s does not register an offense when method has allowed amount of args with block arg 226s registers an offense for a method def with 5 parameters 226s accepts a lambda with more than 4 parameters 226s When CountKeywordArgs is true 226s counts keyword arguments as well 226s When CountKeywordArgs is false 226s does not count keyword arguments 226s does not count keyword arguments without default values 226s 226s RuboCop::Cop::Style::HashAsLastArrayItem 226s when EnforcedStyle is no_braces 226s registers an offense and corrects when hash with braces 226s does not register an offense when passing an implicit array to a setter 226s does not register an offense when the hash is empty 226s does not register an offense when hash is not the last element 226s does not register an offense when hash without braces 226s registers an offense and corrects when hash with braces and trailing comma 226s does not register an offense when hash is not inside array 226s registers an offense and corrects when hash with braces and trailing comma and new line 226s does not register an offense when the array is all hashes 226s when EnforcedStyle is braces 226s does not register an offense when hash is not inside array 226s does not register an offense when hash with braces 226s does not register an offense when the array is all hashes 226s does not register an offense when using double splat operator 226s does not register an offense when the hash is empty 226s registers an offense and corrects when hash without braces 226s 226s RuboCop::Formatter::EmacsStyleFormatter 226s #file_finished 226s displays parsable text 226s when the offense message contains a newline 226s strips newlines out of the error message 226s when the offense is automatically corrected 226s prints [Corrected] along with message 226s when the offense is marked as todo 226s prints [Todo] along with message 226s #finished 226s does not report summary 226s 226s RuboCop::Cop::Style::EndlessMethod 226s Ruby >= 3.0 226s EnforcedStyle: allow_single_line 226s registers an offense and corrects for a multiline endless method 226s does not register an offense for an endless method 226s does not register an offense for an endless method with arguments 226s registers an offense and corrects for a multiline endless method with arguments 226s registers an offense and corrects for a multiline endless method with begin 226s EnforcedStyle: disallow 226s registers an offense for an endless method with arguments 226s registers an offense for an endless method 226s EnforcedStyle: allow_always 226s does not register an offense for a multiline endless method with arguments 226s does not register an offense for a multiline endless method with begin 226s does not register an offense for an endless method 226s does not register an offense for a multiline endless method 226s does not register an offense for an endless method with arguments 226s 226s RuboCop::Cop::Style::EachForSimpleLoop 226s does not register offense if range endpoint is not constant 226s does not register offense if range startpoint is not constant 226s does not register offense for character range 226s when using an exclusive end range 226s autocorrects the source with inline block 226s autocorrects the source with multiline block 226s does not register offense for range not starting with zero and using param 226s autocorrects the range not starting with zero 226s with inline block with parameters 226s autocorrects an offense 226s with multiline block with parameters 226s autocorrects an offense 226s when using an inclusive end range 226s does not register offense for range not starting with zero and using param 226s autocorrects the range not starting with zero 226s autocorrects the source with multiline block 226s autocorrects the source with inline block 226s 226s RuboCop::Cop::Style::CharacterLiteral 226s accepts ? in a %w literal 226s registers an offense for character literals 226s autocorrects ?' to "'" 226s registers an offense for literals like \n 226s accepts literals like ?\C-\M-d 226s 226s RuboCop::Formatter::FuubarStyleFormatter 226s #with_color 226s when color is enabled 226s outputs coloring sequence code at the beginning and the end 226s when color is disabled 226s outputs nothing 226s #progressbar_color 226s when a convention offense is detected in a file 226s is yellow 226s when no offenses are detected in a file 226s is still green 226s when a offense is detected in a file and autocorrected 226s is green 226s when an error offense is detected in a file 226s is red 226s and then a convention offense is detected in the next file 226s is still red 226s initially 226s is green 226s when convention and error offenses are detected in a file 226s is red 226s 226s RuboCop::Cop::Style::StructInheritance 226s registers an offense when extending instance of ::Struct 226s accepts plain class 226s registers an offense when extending instance of `Struct` when there is a comment before class declaration 226s accepts extending DelegateClass 226s accepts assignment to Struct.new 226s registers an offense when extending instance of Struct without `do` ... `end` and class body is empty 226s accepts assignment to ::Struct.new 226s accepts assignment to block form of Struct.new 226s registers an offense when extending instance of Struct without `do` ... `end` and class body is empty and single line definition 226s registers an offense when extending instance of Struct 226s registers an offense when extending instance of Struct with do ... end 226s registers an offense when extending instance of ::Struct with do ... end 226s 226s RuboCop::Cop::Gemspec::DuplicatedAssignment 226s registers an offense when using `name=` twice with `cbase` 226s does not register an offense when using `<<` twice 226s registers an offense when using `required_ruby_version=` twice 226s registers an offense when using `name=` twice 226s registers an offense when using `version=` twice 226s does not register an offense when using `spec.add_dependency` twice 226s does not register an offense when `name=` method call is not block value 226s 226s RuboCop::Cop::Style::TrailingCommaInHashLiteral 226s with multi-line list of values 226s when EnforcedStyleForMultiline is comma 226s registers an offense for trailing comma in a comment 226s accepts trailing comma after a heredoc 226s registers an offense for no trailing comma 226s accepts a multiline hash with a single pair and trailing comma 226s accepts trailing comma 226s when closing bracket is on same line as last value 226s accepts literal with no trailing comma 226s when EnforcedStyleForMultiline is consistent_comma 226s accepts a multiline hash with pairs on a single line andtrailing comma 226s accepts trailing comma 226s registers an offense for no trailing comma 226s accepts a multiline hash with a single pair and trailing comma 226s accepts trailing comma after a heredoc 226s when closing bracket is on same line as last value 226s registers an offense for literal with no trailing comma 226s when EnforcedStyleForMultiline is no_comma 226s accepts comma inside a heredoc parameters at the end 226s accepts comma in comment after last value item 226s accepts literal with no trailing comma 226s registers an offense for trailing comma in literal 226s with single line list of values 226s when EnforcedStyleForMultiline is consistent_comma 226s accepts literal without trailing comma 226s accepts empty literal 226s registers an offense for trailing comma in a literal 226s accepts single element literal without trailing comma 226s when EnforcedStyleForMultiline is no_comma 226s accepts literal without trailing comma 226s registers an offense for trailing comma in a literal 226s accepts empty literal 226s accepts single element literal without trailing comma 226s when EnforcedStyleForMultiline is comma 226s registers an offense for trailing comma in a literal 226s accepts empty literal 226s accepts single element literal without trailing comma 226s accepts literal without trailing comma 226s 226s RuboCop::Cop::Style::SelectByRegexp 226s with find_all 226s does not register an offense when the receiver is `ENV` 226s registers an offense and corrects when there is no explicit regexp 226s does not register an offense when the block param is a method argument 226s registers an offense and corrects when the receiver is a range 226s registers an offense and corrects for `Regexp#match?` 226s registers an offense and corrects for `regexp =~ blockvar` 226s registers an offense and corrects with a multiline block 226s does not register an offense when the receiver is `to_hash` 226s does not register an offense when the receiver is `to_h` 226s does not register an offense when the block has multiple expressions 227s registers an offense if `to_h` is in the receiver chain but not the actual receiver 227s does not register an offense when the receiver is a hash literal 227s does not register an offense when the block does not match a regexp 227s does not register an offense when the receiver is `Hash.new` 227s does not register an offense when the receiver is `Hash[]` 227s does not register an offense when the block arity is not 1 227s registers an offense and corrects without a receiver 227s registers an offense and corrects for `blockvar =~ regexp` 227s does not register an offense when there is no block 227s registers an offense and corrects for `blockvar =~ lvar` 227s does not register an offense when given a proc 227s does not register an offense when the block uses an external variable in a regexp match 227s registers an offense and corrects for `lvar =~ blockvar` 227s registers an offense and corrects when the receiver is an array 227s registers an offense and corrects when the receiver is a set 227s registers an offense and corrects for `match?` 227s with `numblock`s 227s registers an offense and corrects for `regexp =~ blockvar` 227s registers an offense and corrects for `Regexp#match?` 227s registers an offense and corrects for `match?` 227s does not register an offense when the param is a method argument 227s does not register an offense if there is more than one numbered param 227s does not register an offense when using `match?` without a receiver 227s registers an offense and corrects for `blockvar =~ regexp` 227s with select 227s registers an offense and corrects for `match?` 227s does not register an offense when the block does not match a regexp 227s does not register an offense when the receiver is `to_h` 227s does not register an offense when the receiver is a hash literal 227s does not register an offense when the receiver is `ENV` 227s registers an offense and corrects when there is no explicit regexp 227s does not register an offense when the block uses an external variable in a regexp match 227s does not register an offense when the block arity is not 1 227s does not register an offense when the receiver is `Hash.new` 227s registers an offense and corrects when the receiver is a range 227s registers an offense and corrects when the receiver is a set 227s registers an offense and corrects with a multiline block 227s registers an offense and corrects for `lvar =~ blockvar` 227s does not register an offense when there is no block 227s registers an offense and corrects for `blockvar =~ regexp` 227s does not register an offense when the block param is a method argument 227s registers an offense if `to_h` is in the receiver chain but not the actual receiver 227s registers an offense and corrects for `blockvar =~ lvar` 227s registers an offense and corrects for `Regexp#match?` 227s registers an offense and corrects for `regexp =~ blockvar` 227s does not register an offense when the receiver is `to_hash` 227s registers an offense and corrects without a receiver 227s does not register an offense when given a proc 227s registers an offense and corrects when the receiver is an array 227s does not register an offense when the receiver is `Hash[]` 227s does not register an offense when the block has multiple expressions 227s with `numblock`s 227s registers an offense and corrects for `blockvar =~ regexp` 227s registers an offense and corrects for `regexp =~ blockvar` 227s does not register an offense if there is more than one numbered param 227s registers an offense and corrects for `Regexp#match?` 227s does not register an offense when the param is a method argument 227s registers an offense and corrects for `match?` 227s does not register an offense when using `match?` without a receiver 227s with reject 227s registers an offense and corrects without a receiver 227s does not register an offense when the block param is a method argument 227s does not register an offense when the receiver is `Hash[]` 227s registers an offense and corrects with a multiline block 227s registers an offense and corrects for `Regexp#match?` 227s registers an offense and corrects for `blockvar =~ regexp` 227s does not register an offense when the receiver is `Hash.new` 227s registers an offense and corrects for `lvar =~ blockvar` 227s does not register an offense when the receiver is `to_h` 227s registers an offense and corrects when there is no explicit regexp 227s does not register an offense when the block arity is not 1 227s does not register an offense when the block uses an external variable in a regexp match 227s does not register an offense when given a proc 227s registers an offense and corrects for `blockvar =~ lvar` 227s registers an offense and corrects for `regexp =~ blockvar` 227s does not register an offense when the block has multiple expressions 227s does not register an offense when the receiver is `ENV` 227s registers an offense if `to_h` is in the receiver chain but not the actual receiver 227s registers an offense and corrects when the receiver is a range 227s registers an offense and corrects for `match?` 227s does not register an offense when the receiver is `to_hash` 227s does not register an offense when there is no block 227s does not register an offense when the receiver is a hash literal 227s registers an offense and corrects when the receiver is a set 227s registers an offense and corrects when the receiver is an array 227s does not register an offense when the block does not match a regexp 227s with `numblock`s 227s does not register an offense when using `match?` without a receiver 227s registers an offense and corrects for `Regexp#match?` 227s does not register an offense if there is more than one numbered param 227s registers an offense and corrects for `blockvar =~ regexp` 227s does not register an offense when the param is a method argument 227s registers an offense and corrects for `regexp =~ blockvar` 227s registers an offense and corrects for `match?` 227s 227s RuboCop::Server::CLI 227s when not using any server options 227s returns exit status 0 227s when using exclusive `--restart-server` option 227s returns exit status 2 and display an error message 227s when using server option with `--cache-root=path` option 227s returns exit status 0 and display an information message 227s when using `--start-server` option 227s returns exit status 0 and display an information message 227s when using `--no-server` option 227s returns exit status 0 227s when using server option with `--cache-root path` option 227s returns exit status 0 and display an error message 227s when using exclusive `--start-server` option 227s returns exit status 2 and display an error message 227s when not using any server options and specifying `--server` in .rubocop file 227s returns exit status 0 and display an information message 227s when using exclusive `--server-status` option 228s returns exit status 2 and display an error message 228s when using exclusive `--stop-server` option 228s returns exit status 2 and display an error message 228s when not using any server options and specifying `--server` in `RUBOCOP_OPTS` environment variable 228s returns exit status 0 and display an information message 228s when using `--restart-server` option 228s returns exit status 0 and display an information and a warning messages 228s when using `--server` option 228s returns exit status 0 and display an information message 228s when using `--server-status` option 228s returns exit status 0 and display an information message 228s when using multiple server options 228s returns exit status 2 and display an error message 228s when using `--stop-server` option 228s returns exit status 0 and display a warning message 228s 228s RuboCop::Cop::Lint::UnderscorePrefixedVariableName 228s in a method calling `super` without arguments 228s when an underscore-prefixed argument is not used explicitly 229s does not register an offense 229s when an underscore-prefixed argument is used explicitly 229s registers an offense 229s in a method calling `super` with arguments 229s when an underscore-prefixed argument is not used 229s does not register an offense 229s when an underscore-prefixed argument is used explicitly 229s registers an offense 229s when an underscore-prefixed variable is used 229s registers an offense 229s when an underscore-prefixed variable is reassigned 229s does not register an offense 229s when an underscore-prefixed variable in top-level scope is used 229s registers an offense 229s when an underscore-prefixed keyword block argument is used 229s registers an offense 229s when AllowKeywordBlockArguments is set 229s does not register an offense 229s in a method calling `binding` with arguments 229s when an underscore-prefixed argument is used explicitly 229s registers an offense 229s when an underscore-prefixed argument is not used 229s does not register an offense 229s when an underscore-prefixed named capture variable is used 229s registers an offense 229s when an underscore-prefixed block argument is used 229s registers an offense 229s registers an offense 229s in a method calling `binding` without arguments 229s when an underscore-prefixed argument is not used explicitly 229s does not register an offense 229s when an underscore-prefixed argument is used explicitly 229s registers an offense 229s when an underscore-prefixed method argument is used 229s registers an offense 229s when an underscore-prefixed variable is captured by a block 229s accepts 229s when non-underscore-prefixed variable is used 229s does not register an offense 229s 229s RuboCop::Cop::Style::UnlessElse 229s unless with nested if-else 229s registers an offense 229s unless with else 229s registers an offense 229s and nested unless with else 229s registers offenses for both but corrects only the outer unless/else 229s unless without else 229s does not register an offense 229s 229s RuboCop::Cop::Style::NestedModifier 229s autocorrects if + if 229s adds parentheses to method arguments when needed in autocorrection 229s autocorrects unless + unless 229s autocorrects unless + if 229s does not add redundant parentheses in autocorrection 229s adds parentheses when needed in autocorrection 229s autocorrects if + unless 229s autocorrects unless with a comparison operator + if 229s registers one offense for more than two modifiers 229s while 229s behaves like not correctable 229s does not autocorrect when while is the outer modifier 229s does not autocorrect when while is the inner modifier 229s until 229s behaves like not correctable 229s does not autocorrect when until is the outer modifier 229s does not autocorrect when until is the inner modifier 229s 229s RuboCop::Cop::Style::For 229s when for is the enforced style 229s registers an offense for a tuple of items 229s accepts for 229s registers an offense for multiline each 229s accepts single line each 229s registers an offense for each without an item and uses _ as the item 229s registers an offense for correct + opposite style 229s registers multiple offenses 229s Ruby 2.7 229s registers an offense for each without an item and uses _ as the item 229s when using safe navigation operator 229s does not break 229s when each is the enforced style 229s registers an offense for opposite + correct style 229s registers an offense for for 229s accepts def for 229s registers multiple offenses 229s accepts multiline each 229s accepts :for 229s autocorrect 229s corrects an array with `*` operator 229s corrects an array with `|` operator 229s corrects an array with `-` operator 229s changes for that does not have do or semicolon to each 229s corrects an array with `&&` operator 229s corrects an array with `||` operator 229s corrects an array with `+` operator 229s corrects to `each` without parenthesize collection if non-operator method called 229s corrects a tuple of items 229s corrects an array with `&` operator 229s with range 229s changes for to each 229s changes for that does not have do or semicolon to each 229s without parentheses 229s changes for to each 229s changes for that does not have do or semicolon to each 229s 229s RuboCop::Cop::Layout::SpaceBeforeComma 229s registers an offense and corrects method call arg with space before comma 229s registers an offense and corrects array index with space before comma 229s registers an offense and corrects block argument with space before comma 229s handles more than one space before a comma 229s does not register an offense for no spaces before comma 229s heredocs 229s registers an offense and corrects 229s 229s RuboCop::Cop::Style::VariableInterpolation 229s registers an offense for interpolated regexp back references 229s registers an offense for interpolated global variables in symbol 229s registers an offense for interpolated global variables in backticks 229s registers an offense for interpolated class variables 229s registers an offense for interpolated regexp nth back references 229s does not register an offense for variables in expressions 229s registers an offense for interpolated instance variables 229s registers an offense for interpolated global variables in regexp 229s registers an offense for interpolated global variables in string 229s 229s RuboCop::Cop::Lint::DuplicateMagicComment 229s registers an offense when different encoding magic comments are duplicated 229s registers an offense when encoding and frozen magic comments are duplicated 229s does not register an offense when encoding and frozen magic comments are not duplicated 229s does not register an offense when frozen magic comments are not duplicated 229s does not register an offense when encoding magic comments are not duplicated 229s registers an offense when frozen magic comments are duplicated 229s registers an offense when same encoding magic comments are duplicated 229s 229s RuboCop::RakeTask 229s defining tasks 229s creates a rubocop task and a rubocop autocorrect task 229s creates a named task and a named autocorrect task 229s creates a rubocop task and a rubocop auto_correct task 229s creates a named task and a named auto_correct task 229s running tasks 229s runs with default options 229s runs with specified options if a block is given 229s uses the default formatter from .rubocop.yml if no formatter option is given 229s allows nested arrays inside formatters, options, and requires 229s will not error when result is not 0 and fail_on_error is false 229s exits when result is not 0 and fail_on_error is true 229s autocorrect 229s runs with --autocorrect-all 229s runs with --autocorrect 229s runs with with the options that were passed to its parent task 229s 229s RuboCop::Cop::Style::EmptyElse 229s with nested if and case statement 229s behaves like autocorrect 229s MissingElse is if 229s does autocorrection 229s MissingElse is disabled 229s does autocorrection 229s MissingElse is case 229s does not autocorrect 229s MissingElse is both 229s does not autocorrect 229s configured to warn on empty else and nil in else 229s given a case statement 229s with an else-clause with side-effects 229s doesn't register an offense 229s with a completely empty else-clause 229s behaves like autocorrect 229s MissingElse is if 229s does autocorrection 229s MissingElse is both 229s does not autocorrect 229s MissingElse is case 229s does not autocorrect 229s MissingElse is disabled 229s does autocorrection 229s with no else-clause 229s doesn't register an offense 229s with an else-clause containing only the literal nil 229s behaves like autocorrect 229s MissingElse is disabled 229s does autocorrection 229s MissingElse is if 229s does autocorrection 229s MissingElse is case 229s does not autocorrect 229s MissingElse is both 229s does not autocorrect 229s given an if-statement 229s with an else-clause containing only the literal nil 229s with one elsif 229s behaves like autocorrect 229s MissingElse is both 229s does not autocorrect 229s MissingElse is disabled 229s does autocorrection 229s MissingElse is if 229s does not autocorrect 229s MissingElse is case 229s does autocorrection 229s with multiple elsifs 229s behaves like autocorrect 229s MissingElse is case 229s does autocorrection 229s MissingElse is disabled 229s does autocorrection 229s MissingElse is if 229s does not autocorrect 229s MissingElse is both 229s does not autocorrect 229s with a completely empty else-clause 229s behaves like autocorrect 229s MissingElse is disabled 229s does autocorrection 229s MissingElse is case 229s does autocorrection 229s MissingElse is both 229s does not autocorrect 229s MissingElse is if 229s does not autocorrect 229s with no else-clause 229s doesn't register an offense 229s with an else-clause with side-effects 229s doesn't register an offense 229s given an unless-statement 229s with a completely empty else-clause 229s behaves like autocorrect 229s MissingElse is if 229s does not autocorrect 229s MissingElse is disabled 229s does autocorrection 229s MissingElse is case 229s does autocorrection 229s MissingElse is both 229s does not autocorrect 229s with no else-clause 229s doesn't register an offense 229s with an else-clause containing only the literal nil 229s behaves like autocorrect 229s MissingElse is if 229s does not autocorrect 229s MissingElse is both 229s does not autocorrect 229s MissingElse is case 229s does autocorrection 229s MissingElse is disabled 229s does autocorrection 229s with an else-clause with side-effects 229s doesn't register an offense 229s configured to warn on empty else 229s given an if-statement 229s in an if-statement 229s behaves like autocorrect 229s MissingElse is if 229s does not autocorrect 229s MissingElse is both 229s does not autocorrect 229s MissingElse is disabled 229s does autocorrection 229s MissingElse is case 229s does autocorrection 229s with no else-clause 229s doesn't register an offense 229s with an empty comment 229s does not autocorrect 229s with an else-clause containing only the literal nil 229s doesn't register an offense 229s with an else-clause with side-effects 229s doesn't register an offense 229s with a completely empty else-clause 229s not using semicolons 229s behaves like autocorrect 229s MissingElse is if 229s does not autocorrect 229s MissingElse is case 229s does autocorrection 229s MissingElse is both 229s does not autocorrect 229s MissingElse is disabled 229s does autocorrection 229s using semicolons 229s behaves like autocorrect 229s MissingElse is disabled 229s does autocorrection 229s MissingElse is case 229s does autocorrection 229s MissingElse is if 229s does not autocorrect 229s MissingElse is both 229s does not autocorrect 229s given an unless-statement 229s with no else-clause 229s doesn't register an offense 229s with an else-clause containing only the literal nil 229s doesn't register an offense 229s with an else-clause with side-effects 229s doesn't register an offense 229s with a completely empty else-clause 229s behaves like autocorrect 229s MissingElse is both 229s does not autocorrect 229s MissingElse is case 229s does autocorrection 229s MissingElse is if 229s does not autocorrect 229s MissingElse is disabled 229s does autocorrection 229s given a case statement 229s with an else-clause containing only the literal nil 229s doesn't register an offense 229s with an else-clause with side-effects 229s doesn't register an offense 229s with a completely empty else-clause 229s behaves like autocorrect 229s MissingElse is disabled 229s does autocorrection 229s MissingElse is case 229s does not autocorrect 229s MissingElse is both 229s does not autocorrect 229s MissingElse is if 229s does autocorrection 229s with no else-clause 229s doesn't register an offense 229s when `AllowComments: true` 229s given a case statement 229s with comment and nil else-clause 229s doesn't register an offense 229s with not comment and empty else-clause 229s registers an offense 229s with comment and empty else-clause 229s doesn't register an offense 229s with not comment and nil else-clause 229s registers an offense 229s given an if-statement 229s with not comment and empty else-clause 229s registers an offense 229s with not comment and nil else-clause 229s registers an offense 229s with comment and empty else-clause 229s doesn't register an offense 229s with comment and nil else-clause 229s doesn't register an offense 229s given an unless-statement 229s with not comment and empty else-clause 229s registers an offense 229s with not comment and nil else-clause 229s registers an offense 229s with comment and nil else-clause 229s doesn't register an offense 229s with comment and empty else-clause 229s doesn't register an offense 229s configured to warn on nil in else 229s given an unless-statement 229s with a completely empty else-clause 229s doesn't register an offense 229s with no else-clause 229s doesn't register an offense 229s with an else-clause with side-effects 229s doesn't register an offense 229s with an else-clause containing only the literal nil 229s behaves like autocorrect 229s MissingElse is disabled 229s does autocorrection 229s MissingElse is case 229s does autocorrection 229s MissingElse is both 229s does not autocorrect 229s MissingElse is if 229s does not autocorrect 229s given an if-statement 229s with an else-clause with side-effects 229s doesn't register an offense 229s with an else-clause containing only the literal nil using semicolons 229s with one elsif 229s behaves like autocorrect 229s MissingElse is both 229s does not autocorrect 229s MissingElse is if 229s does not autocorrect 229s MissingElse is case 229s does autocorrection 229s MissingElse is disabled 229s does autocorrection 229s with multiple elsifs 229s behaves like autocorrect 229s MissingElse is disabled 229s does autocorrection 229s MissingElse is both 229s does not autocorrect 229s MissingElse is if 229s does not autocorrect 229s MissingElse is case 229s does autocorrection 229s with an else-clause containing only the literal nil 229s when the result is assigned to a variable 229s behaves like autocorrect 229s MissingElse is both 229s does not autocorrect 229s MissingElse is if 229s does not autocorrect 229s MissingElse is disabled 229s does autocorrection 229s MissingElse is case 229s does autocorrection 229s when standalone 229s behaves like autocorrect 229s MissingElse is case 229s does autocorrection 229s MissingElse is if 229s does not autocorrect 229s MissingElse is disabled 229s does autocorrection 229s MissingElse is both 229s does not autocorrect 229s with no else-clause 229s doesn't register an offense 229s with a completely empty else-clause 229s doesn't register an offense 229s given a case statement 229s with an else-clause with side-effects 229s doesn't register an offense 229s with a completely empty else-clause 229s doesn't register an offense 229s with no else-clause 229s doesn't register an offense 229s with an else-clause containing only the literal nil 229s using semicolons 229s behaves like autocorrect 229s MissingElse is if 229s does autocorrection 229s MissingElse is case 229s does not autocorrect 229s MissingElse is both 229s does not autocorrect 229s MissingElse is disabled 229s does autocorrection 229s when the result is assigned to a variable 229s behaves like autocorrect 229s MissingElse is case 229s does not autocorrect 229s MissingElse is both 229s does not autocorrect 229s MissingElse is disabled 229s does autocorrection 229s MissingElse is if 229s does autocorrection 229s 229s RuboCop::Cop::Style::CommentAnnotation 229s with default RequireColon configuration (colon + space) 229s accepts upper case keyword with colon, space and note 229s accepts a keyword that is somewhere in a sentence 229s accepts a keyword that is just the beginning of a sentence 229s accepts a comment that is obviously a code example 229s accepts upper case keyword alone 229s multiline comment 229s only registers an offense on the first line 229s capitalized keyword 229s registers an offense and upcases 229s lower case keyword 229s registers an offense and upcases 229s upper case keyword with space but no note 229s registers an offense without autocorrection 229s with configured keyword 229s registers an offense for a missing colon after the word 229s when a keyword is not in the configuration 229s accepts the word without colon 229s offenses in consecutive inline comments 229s registers each of them 229s missing colon 229s registers an offense and adds colon 229s upper case keyword with colon but no note 229s registers an offense without autocorrection 229s missing space after colon 229s registers an offense and adds space 229s with multiword keywords 229s registers an offense for each matching keyword 229s with RequireColon configuration set to false 229s accepts a keyword that is just the beginning of a sentence 229s accepts a keyword that is somewhere in a sentence 229s accepts upper case keyword alone 229s accepts upper case keyword with colon, space and note 229s accepts a comment that is obviously a code example 229s offenses in consecutive inline comments 229s registers each of them 229s lower case keyword 229s registers an offense and upcases 229s with configured keyword 229s registers an offense for containing a colon after the word 229s upper case keyword with space but no note 229s registers an offense without autocorrection 229s with colon 229s registers an offense and removes colon 229s upper case keyword with colon but no note 229s registers an offense without autocorrection 229s when a keyword is not in the configuration 229s accepts the word with colon 229s multiline comment 229s only registers an offense on the first line 229s 229s RuboCop::Cop::Security::MarshalLoad 229s allows using dangerous Marshal methods for deep cloning 229s does not register an offense Marshal methods under another namespace 229s does not register an offense for Marshal.dump 229s registers an offense for using Marshal.load 229s registers an offense for using Marshal.restore 229s 229s RuboCop::Cop::Layout::MultilineMethodArgumentLineBreaks 229s when there are multiple arguments on the first line 229s registers an offense and corrects starting from the 2nd argument 229s when bracket hash assignment key on multiple lines 229s does not add any offenses 229s when bracket hash assignment on multiple lines 229s does not add any offenses 229s when argument starts on same line but ends on different line 229s registers an offense and corrects 229s when second argument starts on same line as end of first 229s registers an offense and corrects 229s when many arguments including hash are on multiple lines, three on same line 229s registers an offense and corrects 229s when one argument on same line 229s does not add any offenses 229s when two arguments are on next line 229s does not add any offenses 229s when many arguments are on multiple lines, three on same line 229s registers an offense and corrects 229s when many arguments are on multiple lines, two on same line 229s registers an offense and corrects 229s 229s RuboCop::Cop::Layout::ArgumentAlignment 229s aligned with fixed indentation 229s corrects indentation for kwargs starting on same line as other args 229s autocorrects when first line is indented 229s does not register an offense when using aligned braced hash as a argument 229s registers an offense and corrects when missed indentation kwargs 229s autocorrects by outdenting when indented too far 229s autocorrects by indenting when not indented 229s multi-line method calls 229s autocorrects relative to position of relevant method call 229s does not err on method call without a method name 230s can handle existing indentation from multi-line method calls 230s registers offenses and corrects double indentation from relevant method 230s assigned methods 230s with ArgumentAlignment:IndentationWidth set to 4 230s accepts the first parameter being on a new row 230s accepts the first parameter being on method row 230s with IndentationWidth:Width set to 4 230s accepts the first parameter being on method row 230s accepts the first parameter being on a new row 230s autocorrects even when first argument is in wrong position 230s aligned with first argument 230s registers an offense and corrects when missed indentation kwargs 230s accepts correctly aligned arguments 230s doesn't crash and burn when there are nested issues 230s can handle a string literal as other argument 230s doesn't get confused by extra comma at the end 230s can handle method calls without parentheses 230s can handle a call with a block inside another call 230s can handle a multiline hash as second parameter 230s can handle a correctly aligned string literal as first argument 230s doesn't get confused by a line break inside a parameter 230s can handle heredoc strings 230s accepts multiline []= method call 230s doesn't get confused by a symbol argument 230s can handle other method calls without parentheses 230s accepts calls that only span one line 230s doesn't get confused by symbols with embedded expressions 230s can handle a method call within a method call 230s registers an offense and corrects arguments with double indent 230s registers an offense and corrects multi-line outdented parameters 230s can handle a ternary condition with a block reference 230s can handle do-end 230s doesn't get confused by regexen with embedded expressions 230s registers an offense and corrects arguments with single indent 230s can handle parentheses used with no arguments 230s accepts correctly aligned arguments with fullwidth characters 230s can handle a call embedded in a string 230s accepts the first parameter being on a new row 230s registers an offense and corrects multiline missed indentation 230s accepts braceless hashes 230s registers an offense and corrects splat operator 230s registers an offense and correct multi-line parametersindented too far 230s does not crash in autocorrect on dynamic string in parameter value 230s when using safe navigation operator 230s registers an offense and corrects arguments with single indent 230s assigned methods 230s accepts the first parameter being on method row 230s accepts the first parameter being on a new row 230s 230s RuboCop::Cop::Style::InPatternThen 230s >= Ruby 2.7 230s accepts `;` separating statements in the body of `in` 230s registers an offense for `in b;` 230s registers an offense for `in b | c | d;` (alternative pattern) 230s registers an offense for `in b, c | d;` 230s registers an offense for `in b, c, d;` (array pattern) 230s when inspecting a case statement with an empty branch 230s does not register an offense 230s 230s RuboCop::Cop::Style::RedundantRegexpCharacterClass 230s with %r{} regexp 230s with a character class containing a single character 230s registers an offense and corrects 230s with a character class containing a single character before `{n,m}` quantifier 230s registers an offense and corrects 230s with a character class containing a single character before `+` quantifier 230s registers an offense and corrects 230s with a character class containing a single character inside a group 230s registers an offense and corrects 230s with multiple character classes containing single characters 230s registers an offense and corrects 230s with multiple character classes containing single characters 230s registers an offense and corrects 230s with a character class containing an unescaped-# 230s registers an offense and corrects 230s with a negated character class with a single element 230s does not register an offense 230s with a character class containing a negated posix bracket expression 230s does not register an offense 230s with a character class containing an escaped-0 230s does not register an offense (FAILED - 1) 230s with a character class containing set intersection 230s does not register an offense 230s with a character class containing a single character 230s registers an offense and corrects 230s with a regexp containing invalid g escape 230s registers an offense and corrects 230s with a character class containing escaped character requiring escape outside 230s registers an offense and corrects 230s with a character class containing a single character before `{n,m}` quantifier 230s registers an offense and corrects 230s with consecutive escaped square brackets 230s does not register an offense 230s with a character class containing a posix bracket expression 230s does not register an offense 230s with a redundant character class after an interpolation 230s registers an offense and corrects 230s with a character class containing a single unicode character property 230s registers an offense and corrects 230s with a character class containing an escaped [ 230s registers an offense and corrects 230s with a character class containing an escaped-# 230s registers an offense and corrects 230s with a character class containing an escaped ] 230s registers an offense and corrects 230s with a character class containing a space meta-character 230s registers an offense and corrects 230s with a character class containing a single character inside a group 230s registers an offense and corrects 230s with escaped square brackets surrounding a single character 230s does not register an offense 230s with an array index inside an interpolation 230s does not register an offense 230s with a character class containing a character requiring escape outside 230s does not register an offense 230s with consecutive escaped square brackets inside a character class 230s does not register an offense 230s with a character class containing a single range 230s does not register an offense 230s with an interpolated unnecessary-character-class regexp 230s registers an offense and corrects 230s with a character class containing a single negated unicode character property 230s registers an offense and corrects 230s with a character class containing a single unicode code-point 230s registers an offense and corrects 230s with a character class containing a negated-space meta-character 230s registers an offense and corrects 230s with a character class containing two characters 230s does not register an offense 230s with a multi-line interpolation 230s ignores offenses in the interpolated expression 230s with a character class with first element an escaped ] 230s does not register an offense 230s with a character class containing an escaped-b 230s does not register an offense 230s with a character class containing a single character before `+` quantifier 230s registers an offense and corrects 230s with a character class containing an interpolation 230s does not register an offense 230s with a character class containing multiple unicode code-points 230s does not register an offense and corrects 230s with a character class containing a space 230s when using free-spaced mode 230s with a commented single-element character class 230s does not register an offense 230s with a single space character class 230s does not register an offense with /iux 230s does not register an offense with /ix 230s does not register an offense with only /x 230s when not using free-spaced mode 230s registers an offense and corrects 230s with an unnecessary-character-class after a comment 230s registers an offense and corrects 230s 230s RuboCop::Cop::Lint::DeprecatedOpenSSLConstant 230s registers an offense with cipher constant and no arguments and corrects 230s registers an offense with cipher constant and no arguments and corrects 230s registers an offense with cipher constant and one argument and corrects 230s registers an offense when building an instance using an digest constant and corrects 230s registers an offense with AES + blocksize constant and corrects 230s registers an offense with cipher constant and `cbc` argument and corrects 230s registers an offense with cipher constant and no arguments and corrects 230s registers an offense with AES + blocksize constant and mode argument and corrects 230s does not register an offense when building digest using an algorithm string 230s does not register an offense with cipher constant and argument is a variable 230s registers an offense when using an digest constant with chained methods and corrects 230s does not register an offense with cipher constant and send argument is a method 230s does not register an offense when building digest using an algorithm string and nested digest constants 230s does not register an offense with cipher constant and argument is a constant 230s registers an offense with cipher constant and no arguments and corrects 230s registers an offense when using ::Digest class methods on an algorithm constant and corrects 230s registers an offense with cipher constant and double quoted string argument and corrects 230s registers an offense with cipher constant and two arguments and corrects 230s does not register an offense when using ::Digest class methods with an algorithm string and value 230s does not register an offense when using cipher with a string 230s when used in a block 230s registers an offense when using ::Digest class methods on an algorithm constant and corrects 230s 230s RuboCop::Cop::Lint::SafeNavigationConsistency 230s registers and corrects multiple offenses 230s registers an offense and corrects using safe navigation on the left of || 230s allows safe navigation when different variables are used 230s registers an offense and corrects using safe navigation on the left of && 230s registers an offense but does not correct non dot method calls 230s allows && without safe navigation 230s allows || without safe navigation 230s registers an offense and corrects when there is code before or after the condition 230s registers an offense and corrects using safe navigation on the right of || 230s registers a single offense and corrects when safe navigation is used multiple times 230s registers an offense and corrects using unsafe navigation and the safe navigation appears in a group 230s allows calls to methods that nil responds to 230s registers an offense and corrects using unsafe navigation with both && and || 230s registers an offense and corrects using safe navigation inside of separated conditions 230s registers an offense and corrects unsafe navigation that appears before safe navigation 230s registers an offense and corrects assignment 230s registers an offense and corrects using safe navigation in conditions on the right hand side 230s registers an offense and corrects using unsafe navigation with grouped conditions 230s registers an offense and corrects using safe navigation on the right of && 230s 230s RuboCop::Cop::Style::ClassEqualityComparison 230s registers an offense and corrects when comparing `Module#name` for equality 230s registers an offense and corrects when comparing single quoted class name for equality 230s registers an offense and corrects when comparing class using `equal?` for equality 230s registers an offense and corrects when comparing class using `eql?` for equality 230s registers an offense and corrects when comparing class using `==` for equality 230s does not register an offense when using `instance_of?` 230s registers an offense and corrects when comparing double quoted class name for equality 230s when AllowedMethods is enabled 230s does not register an offense when comparing class for equality 230s when AllowedPatterns is enabled 230s does not register an offense when comparing class for equality 230s with instance variable comparison in module 230s registers and corrects an offense 230s with String comparison in module 230s registers and corrects an offense 230s 230s RuboCop::Cop::Style::PreferredHashMethods 230s with enforced `short` style 230s registers an offense for has_key? with one arg 230s accepts has_key? with no args 230s registers an offense for has_value? with one arg 230s accepts has_value? with no args 230s when using safe navigation operator 230s registers an offense for has_value? with one arg 230s with enforced `verbose` style 230s registers an offense for key? with one arg 230s accepts value? with no args 230s registers an offense for value? with one arg 230s accepts key? with no args 230s 230s RuboCop::Cop::Style::MultilineBlockChain 230s accepts a chain of blocks spanning one line 230s accepts a chain of calls followed by a multi-line block 230s accepts a multi-line block chained with calls on one line 230s with multi-line block chaining 230s registers an offense for a chain where the second block is single-line 230s registers two offenses for a chain of three blocks 230s accepts a chain where the first block is single-line 230s registers an offense for a simple case 230s registers an offense for a slightly more complicated case 230s Ruby 2.7 230s registers an offense for a slightly more complicated case 230s 230s RuboCop::Cop::Lint::LambdaWithoutLiteralBlock 230s registers and corrects an offense when using lambda with `&Proc.new {}` block argument 230s does not register an offense when using `lambda.call` 230s does not register an offense when using lambda with a literal block 230s does not register an offense when using lambda with a symbol proc 230s registers and corrects an offense when using lambda with a proc variable block argument 230s registers and corrects an offense when using lambda with `&proc {}` block argument 230s 230s RuboCop::CLI --auto-gen-config 230s --auto-gen-config 230s honors rubocop:disable comments 231s does not include offense counts when --no-offense-counts is used 231s does not include a timestamp when --no-auto-gen-timestamp is used 231s can be called when there are no files to inspection 231s generates a todo list that removes the reports 231s includes --auto-gen-only-exclude in the command comment when given 232s generates Exclude instead of Max when --auto-gen-only-exclude is used 232s does not generate configuration for the Syntax cop 232s generates EnforcedStyle parameter if it solves all offenses 232s generates Exclude if no EnforcedStyle solves all offenses 232s can generate Exclude properties with a given limit 233s can generate a todo list 233s overwrites an existing todo file 233s when working with a cop who do not support autocorrection 233s can generate a todo list 233s when --config is used 233s can generate a todo list 234s can generate a todo list if default .rubocop.yml exists 234s when .rubocop.yml inherits from two other files 234s bases other cops' configuration on the code base's current maximum line length 234s when .rubocop.yml inherits from another file and .rubocop_todo.yml 234s bases other cops' configuration on the code base's current maximum line length 234s when cop is not safe to autocorrect 234s can generate a todo list, with the appropriate flag 234s for existing configuration with Exclude 235s leaves out Excludes that appear in .rubocop.yml but are merged globally 235s leaves out Excludes that appear in .rubocop.yml but are merged for the cop 235s generates Excludes that appear in .rubocop.yml 235s when inheriting from a URL 235s when there is a single entry 236s can generate a todo list 236s when there are multiple entries 236s can generate a todo list 236s console output 236s displays report summary but no offenses 236s with Layout/LineLength:Max overridden 236s when .rubocop.yml has Layout/LineLength disabled 236s skips the cop from both phases of the run 236s when .rubocop.yml has Layout/LineLength:Max more than code base max 236s bases other cops' configuration on the overridden LineLength:Max 236s when .rubocop.yml has Layout/LineLength:Max less than code base max 237s bases other cops' configuration on the overridden LineLength:Max 237s when --no-exclude-limit is given 237s always prefers Exclude to Enabled 237s when hash value omission enabled 237s generates Exclude if it solves all offenses 237s when existing config file has a YAML document start header 237s inserts `inherit_from` key after hearder 237s when .rubocop.yml inherits only from .rubocop_todo.yml in an array 238s bases other cops' configuration on the code base's current maximum line length 238s when working in a subdirectory 238s can generate a todo list 238s when .rubocop.yml inherits only from .rubocop_todo.yml 238s bases other cops' configuration on the code base's current maximum line length 238s when duplicated default configuration parameter 238s parameters are displayed without duplication 238s when .rubocop.yml is empty 238s bases other cops' configuration on the code base's current maximum line length 238s when different styles appear in different files 239s disables cop if --exclude-limit is exceeded 239s generates Exclude list if --exclude-limit is not exceeded 239s when .rubocop.yml inherits from another file 239s bases other cops' configuration on the code base's current maximum line length 239s when .rubocop.yml doesn't inherit 239s bases other cops' configuration on the code base's current maximum line length 239s when .rubocop.yml does not exist 240s bases other cops' configuration on the code base's current maximum line length 240s 240s RuboCop::Cop::Lint::AmbiguousOperator 240s with `-` unary operator in the first argument 240s without parentheses 240s with a whitespace on the right of the operator 240s does not register an offense 240s without whitespaces on the right of the operator 240s registers an offense and corrects 240s with parentheses around the operator 240s does not register an offense 240s with a splat operator in the first argument 240s with parentheses around the splatted argument 240s does not register an offense 240s without parentheses 240s without whitespaces on the right of the operator 240s registers an offense and corrects 240s with a whitespace on the right of the operator 240s does not register an offense 240s with a block ampersand in the first argument 240s with parentheses around the block argument 240s does not register an offense 240s without parentheses 240s with a whitespace on the right of the operator 240s does not register an offense 240s without whitespaces on the right of the operator 240s registers an offense and corrects 240s with a keyword splat operator in the first argument 240s without parentheses 240s with a whitespace on the right of the operator 240s does not register an offense 240s without whitespaces on the right of the operator 240s registers an offense and corrects 240s with parentheses around the keyword splat operator 240s does not register an offense 240s with `+` unary operator in the first argument 240s with parentheses around the operator 240s does not register an offense 240s without parentheses 240s with a whitespace on the right of the operator 240s does not register an offense 240s without whitespaces on the right of the operator 240s registers an offense and corrects 240s without whitespaces on the right of the operator when a method with no arguments is used in advance 240s registers an offense and corrects 240s when using safe navigation operator with a unary operator 240s does not register an offense 240s 240s RuboCop::Cop::Cop 240s initially has 0 offenses 240s will warn if custom severity is invalid 240s will set default severity 240s will report registered offenses 240s keeps track of offenses 240s will set custom severity if present 240s for a cop with a name 240s registers offense with its name 240s #safe_autocorrect? 240s when cop is declared unsafe 240s is expected to equal false 240s when autocorrection of the cop is declared unsafe 240s is expected to equal false 240s when safety is undeclared 240s is expected to equal true 240s #autocorrect? 240s when the option is not given 240s is expected to equal false 240s when the option is given 240s is expected to equal true 240s when the cop is set to not autocorrect 240s is expected to equal false 240s when cop does not support autocorrection 240s is expected to equal false 240s when disable_uncorrectable is enabled 240s is expected to equal true 240s with style cops 240s has right name 240s has right department 240s setting of Offense#corrected attribute 240s when cop supports autocorrection 240s when offense was not corrected because of an error 240s is set to false 240s when offense was corrected 240s is set to true 240s when autocorrection is not needed 240s is set to false 240s when cop does not support autocorrection 240s is not specified (set to nil) 240s when autocorrect is requested 240s is not specified (set to nil) 240s when disable_uncorrectable is enabled 240s is set to true 240s .documentation_url 240s for a builtin cop class 240s is expected to eq "https://docs.rubocop.org/rubocop/cops_layout.html#layoutblockendnewline" 240s for a custom cop class 240s is expected to be nil 240s with no submodule 240s has right name 240s has right department 240s when disabled by a comment 240s ignore_disable_comments is true 240s will not set offense as disabled 240s ignore_disable_comments is false 240s will set offense as disabled 240s .qualified_cop_name 240s returns the given cop name if it already has a namespace 240s returns the given cop name if it is not found in any namespace 240s returns the cop name in a different namespace if the provided namespace is incorrect 240s raises an error if the cop name is in more than one namespace 240s returns the given cop name if it already has a namespace even when the cop exists in multiple namespaces 240s adds namespace if the cop name is found in exactly one namespace 240s #relevant_file? 240s when the file is an anonymous source 240s is expected to equal true 240s when the file matches the Include configuration 240s is expected to equal true 240s when the file doesn't match the Include configuration 240s is expected to equal false 240s Registry 240s #departments 240s is expected to include :Lint 240s has departments 240s is expected to include :Style 240s contains every value only once 240s #with_department 240s returns 0 for an invalid type 240s has at least one cop per department 240s has each cop in exactly one type 240s with lint cops 240s has right name 240s has right department 240s 240s RuboCop::Cop::Security::YAMLLoad 240s registers an offense and corrects load with a literal string 240s registers an offense and corrects a fully qualified ::YAML.load 240s does not register an offense for YAML.load under a different namespace 240s does not register an offense for YAML.dump 240s Ruby >= 3.1 240s does not register an offense and corrects a fully qualified `::YAML.load` 240s does not register an offense and corrects load with a literal string 240s 240s RuboCop::Cop::InternalAffairs::LocationLineEqualityComparison 240s does not register an offense when using `same_line?` 240s registers and corrects an offense when comparing `#loc.line` with LHS and RHS 240s registers an offense and corrects when using `source_range.first_line` 240s registers an offense and corrects when using `first_line` 240s registers an offense and corrects when using `loc.first_line` 240s registers and corrects an offense when comparing `#loc.source_range` with LHS and RHS 240s 240s RuboCop::Cop::Lint::RaiseException 240s registers an offense and corrects for `fail` with `Exception.new` and message 240s registers an offense and corrects for `raise` with `Exception` 240s registers an offense and corrects for `fail` with `Exception` 240s registers an offense and corrects for `raise` with `Exception` and message 240s registers an offense and corrects for `fail` with `Exception` and message 240s registers an offense and corrects for `raise` with `Exception.new` and message 240s registers an offense and corrects for `raise` with `Exception.new(args*)` 240s does not register an offense for `fail` without arguments 240s does not register an offense for `raise` without arguments 240s registers an offense and corrects for `raise` with `::Exception` 240s does not register an offense when raising Exception with explicit namespace 240s registers an offense and corrects for `raise` with `::Exception.new` 240s registers an offense and corrects for `raise` with `::Exception` and message 240s when under namespace 240s registers an offense and corrects when Exception with cbase specified 240s does not register an offense when Exception without cbase specified 240s 240s isolated environment 240s is not affected by a config file above the work directory 240s 240s RuboCop::Formatter::FileListFormatter 240s #file_finished 240s displays parsable text 240s 240s RuboCop::Cop::Style::RedundantSelf 240s does not report an offense when lvasgn name is used in `if` 240s accepts a self receiver on an lvalue of a parallel assignment 240s does not report an offense when receiver and multiple assigned lvalue have the same name 240s reports an offense when a different lvasgn name is used in `if` 240s reports an offense a self receiver of .call 240s accepts a self receiver for methods named like ruby keywords 240s reports an offense a self receiver on an rvalue 240s accepts a self receiver with the square bracket operator 240s does not report an offense when masgn name is used in `if` 240s does not report an offense when lvasgn name is used in `until` 240s does not report an offense when masgn name is used in `while` 240s accepts a self receiver on an lvalue of mlhs arguments 240s does not report an offense when self receiver in a method argument and multiple assigned lvalue have the same name 240s does not report an offense when lvasgn name is nested below `if` 240s accepts a self receiver used to distinguish from constant 240s accepts a self receiver on an lvalue of a plus-assignment 240s accepts when nested receiver and lvalue have the name name 240s accepts a self receiver on an lvalue of an assignment 240s does not report an offense when masgn name is used in `until` 240s accepts a self receiver used to distinguish from argument of block 240s does not report an offense when receiver and lvalue have the same name 240s accepts a self receiver of methods also defined on `Kernel` 240s does not report an offense when self receiver in a method argument and lvalue have the same name 240s accepts a self receiver on an lvalue of an or-assignment 240s does not report an offense when lvasgn name is used in `while` 240s accepts a self receiver on an lvalue of an and-assignment 240s reports an offense when a different masgn name is used in `if` 240s does not report an offense when masgn name is used in `unless` 240s accepts a self receiver of .() 240s accepts a self receiver with the double less-than operator 240s does not report an offense when lvasgn name is used in `unless` 240s with ruby >= 2.7 240s with pattern matching 240s accepts a self receiver on a `hash-pattern` 240s registers an offense when using self with a different match var 240s accepts a self receiver on a `array-pattern` 240s accepts a self receiver in a `if-guard` 240s accepts a self receiver with a `match-alt` 240s registers an offense when using a self receiver with a pin 240s accepts a self receiver in a nested pattern` 240s accepts a self receiver on an `match-var` 240s accepts a self receiver in a conditional pattern 240s Ruby 2.7 240s registers offense for self usage in numblocks 240s instance methods 240s accepts a self receiver used to distinguish from blockarg 240s accepts a self receiver used to distinguish from local variable 240s accepts a self receiver used to distinguish from optional argument 240s accepts a self receiver used to distinguish from an argument when an inner method is defined 240s accepts a self receiver used to distinguish from argument 240s accepts a self receiver used to distinguish from an argument 240s class methods 240s accepts a self receiver used to distinguish from blockarg 240s accepts a self receiver used to distinguish from local variable 240s accepts a self receiver used to distinguish from optional argument 240s accepts a self receiver used to distinguish from argument 240s 240s RuboCop::Cop::Style::BlockComments 240s autocorrects an empty block comment by removing it 240s accepts regular comments 240s autocorrects a block comment into a regular comment 240s autocorrects a block comment into a regular comment (without trailingnewline) 240s registers an offense for block comments 240s 240s RuboCop::Cop::Lint::InheritException 240s when class inherits from `Exception` 240s with enforced style set to `runtime_error` 240s registers an offense and corrects 240s when creating a subclass using Class.new 240s registers an offense and corrects 240s when inheriting a standard lib exception class that is not a subclass of `StandardError` 240s does not register an offense 240s with enforced style set to `standard_error` 240s registers an offense and corrects 240s when inheriting a standard lib exception class that is not a subclass of `StandardError` 240s does not register an offense 240s when creating a subclass using Class.new 240s registers an offense and corrects 240s 240s RuboCop::Cop::Style::NumericPredicate 240s when configured to enforce numeric predicate methods 240s when checking if a number is negative 240s when target ruby version is 2.3 or higher 240s registers an offense in yoda condition 240s registers an offense 240s with a complex expression 240s registers an offense in yoda condition 240s registers an offense 240s when target ruby version is 2.2 or lower 240s does not register an offense 240s when checking if a number is positive 240s when target ruby version is 2.2 or lower 240s does not register an offense 240s when target ruby version is 2.3 or higher 240s registers an offense 240s registers an offense in yoda condition 240s with a complex expression 240s registers an offense 240s registers an offense in yoda condition 240s with checking if a number is not zero 240s allows comparing against a variable 240s allows comparing against a complex expression 240s allows comparing against a global variable 240s when checking if a number is zero 240s allows comparing against a global variable 240s registers an offense with a complex expression 240s registers an offense 240s when comparing against a method argument variable 240s registers an offense with complex expression 240s registers an offense 240s when configured to enforce numeric comparison methods 240s registers an offense for checking if a number is negative 240s registers an offense for checking if a number is zero 240s registers an offense for checking if a number is positive 240s allows checking if a number is not zero 240s when there are allowed methods 240s in block 240s ignored method 240s with a regex 240s allows checking if a number is negative 240s allows checking if a number is positive 240s with a string 240s allows checking if a number is positive 240s allows checking if a number is negative 240s not ignored method 240s registers an offense for checking if a number is negative 240s registers an offense for checking if a number is positive 240s simple method call 240s `EnforcedStyle` is `comparison` 240s allows checking if a number is zero 240s `EnforcedStyle` is `predicate` 240s allows checking if a number is zero 240s in argument 240s ignored method 240s with a string 240s allows checking if a number is positive 240s allows checking if a number is negative 240s with a regex 240s allows checking if a number is negative 240s allows checking if a number is positive 240s not ignored method 240s when checking if a number is positive 240s when target ruby version is 2.3 or higher 240s registers an offense 240s when target ruby version is 2.2 or lower 240s does not register an offense 240s when checking if a number is negative 240s when target ruby version is 2.2 or lower 240s does not register an offense 240s when target ruby version is 2.3 or higher 240s registers an offense 240s 240s RuboCop::Cop::Lint::RegexpAsCondition 240s does not register an offense for a regexp literal outside conditions 240s registers an offense and corrects for a regexp literal in `if` condition 240s does not register an offense for a regexp literal with `=~` operator 240s 240s RuboCop::Cop::Style::IfWithBooleanLiteralBranches 240s when `AllowedMethods: nonzero?` 240s does not register an offense when using `nonzero?` 240s when condition is a logical operator and all operands are predicate methods 240s registers and corrects an offense when using `unless foo? || bar?` with opposite boolean literal branches 240s registers and corrects an offense when using `if foo? && bar? || baz?` with boolean literal branches 240s registers and corrects an offense when using `unless foo? || bar?` with boolean literal branches 240s registers and corrects an offense when using `if foo? && bar?` with boolean literal branches 240s registers and corrects an offense when using `if foo? && bar? && baz?` with boolean literal branches 240s registers and corrects an offense when using `if foo? && bar?` with opposite boolean literal branches 240s when double negative is used in condition 240s registers and corrects an offense when using `if !!condition` with opposite boolean literal branches 240s registers and corrects an offense when using `if !!condition` with boolean literal branches 240s when condition is a method that does not known whether to return boolean value 240s does not register an offense when using `if condition` with boolean literal branches 240s does not register an offense when using `if condition` with opposite boolean literal branches 240s does not register an offense when using `unless condition` with boolean literal branches 240s does not register an offense when using `unless condition` with opposite boolean literal branches 240s when using `elsif` with boolean literal branches 240s does not register an offense when using multiple `elsif` with boolean literal branches 240s registers and corrects an offense when using single `elsif` with boolean literal branches 240s when complex condition 240s does not register an offense when using `if foo? || bar || baz?` with boolean literal branches 240s register and corrects an offense when using `if (foo? || bar) && baz?` with boolean literal branches 240s does not register an offense when using `if foo? && bar || baz?` with boolean literal branches 240s does not register an offense when using `if (foo? && bar) || baz?` with boolean literal branches 240s registers and corrects an offense when using `if foo? && bar && baz?` with boolean literal branches 240s registers and corrects an offense when using `if foo? || bar && baz?` with boolean literal branches 240s registers and corrects an offense when using `if foo? || (bar && baz)?` with boolean literal branches 240s does not register an offense when using `if foo? && (bar || baz)?` with boolean literal branches 240s when condition is a predicate method 240s registers and corrects an offense when using `if foo.do_something?` with opposite boolean literal branches 240s registers and corrects an offense when using `unless foo.do_something?` with boolean literal branches 240s registers and corrects an offense when using `unless foo.do_something?` with opposite boolean literal branches 240s registers and corrects an offense when using `elsif foo.do_something?` with boolean literal branches 240s registers and corrects an offense when using `elsif foo.do_something?` with opposite boolean literal branches 240s registers and corrects an offense when using `if foo.do_something?` with boolean literal branches 240s when condition is a logical operator and operands do not known whether to return boolean value 240s does not register an offense when using `unless foo && bar` with boolean literal branches 240s does not register an offense when using `if foo || bar` with opposite boolean literal branches 240s does not register an offense when using `if foo || bar` with boolean literal branches 240s does not register an offense when using `unless foo || bar` with boolean literal branches 240s does not register an offense when using `if foo && bar` with boolean literal branches 240s does not register an offense when using `unless foo && bar` with opposite boolean literal branches 241s does not register an offense when using `unless foo || bar` with opposite boolean literal branches 241s does not register an offense when using `if foo && bar` with opposite boolean literal branches 241s when condition is a comparison method 241s registers and corrects an offense when using ternary operator with boolean literal branches 241s registers and corrects an offense when using `if foo == bar` with boolean literal branches 241s registers and corrects an offense when using `if` with boolean literal branches directly under `def` 241s registers and corrects an offense when using opposite ternary operator with boolean literal branches 241s does not register an offense when using a branch that is not boolean literal 241s registers and corrects an offense when using opposite ternary operator with boolean literal branches 241s registers and corrects an offense when using `unless foo == bar` with opposite boolean literal branches 241s registers and corrects an offense when using `if foo == bar` with opposite boolean literal branches 241s does not register an offense when using a branch that is not boolean literal 241s registers and corrects an offense when using `if foo == bar` with opposite boolean literal branches 241s registers and corrects an offense when using opposite ternary operator with boolean literal branches 241s registers and corrects an offense when using `if foo == bar` with boolean literal branches 241s registers and corrects an offense when using opposite ternary operator with boolean literal branches 241s registers and corrects an offense when using `if foo == bar` with boolean literal branches 241s registers and corrects an offense when using `unless foo == bar` with boolean literal branches 241s registers and corrects an offense when using `unless foo == bar` with boolean literal branches 241s registers and corrects an offense when using `if foo == bar` with opposite boolean literal branches 241s registers and corrects an offense when using `unless foo == bar` with boolean literal branches 241s registers and corrects an offense when using `if foo == bar` with opposite boolean literal branches 241s registers and corrects an offense when using `if foo == bar` with opposite boolean literal branches 241s does not register an offense when using a branch that is not boolean literal 241s registers and corrects an offense when using `if foo == bar` with boolean literal branches 241s registers and corrects an offense when using opposite ternary operator with boolean literal branches 241s registers and corrects an offense when using ternary operator with boolean literal branches 241s registers and corrects an offense when using `unless foo == bar` with opposite boolean literal branches 241s registers and corrects an offense when using `if` with boolean literal branches directly under `def` 241s registers and corrects an offense when using opposite ternary operator with boolean literal branches 241s registers and corrects an offense when using `unless foo == bar` with opposite boolean literal branches 241s does not register an offense when using a branch that is not boolean literal 241s registers and corrects an offense when using `if foo == bar` with boolean literal branches 241s registers and corrects an offense when using `if` with boolean literal branches directly under `def` 241s registers and corrects an offense when using `unless foo == bar` with opposite boolean literal branches 241s registers and corrects an offense when using `unless foo == bar` with boolean literal branches 241s registers and corrects an offense when using ternary operator with boolean literal branches 241s registers and corrects an offense when using ternary operator with boolean literal branches 241s registers and corrects an offense when using `if foo == bar` with boolean literal branches 241s registers and corrects an offense when using opposite ternary operator with boolean literal branches 241s registers and corrects an offense when using ternary operator with boolean literal branches 241s registers and corrects an offense when using `unless foo == bar` with opposite boolean literal branches 241s registers and corrects an offense when using `if` with boolean literal branches directly under `def` 241s registers and corrects an offense when using `if` with boolean literal branches directly under `def` 241s registers and corrects an offense when using `if foo == bar` with opposite boolean literal branches 241s registers and corrects an offense when using `unless foo == bar` with opposite boolean literal branches 241s registers and corrects an offense when using `if foo == bar` with boolean literal branches 241s registers and corrects an offense when using ternary operator with boolean literal branches 241s registers and corrects an offense when using `unless foo == bar` with opposite boolean literal branches 241s registers and corrects an offense when using `unless foo == bar` with boolean literal branches 241s registers and corrects an offense when using `if` with boolean literal branches directly under `def` 241s does not register an offense when using a branch that is not boolean literal 241s registers and corrects an offense when using `if` with boolean literal branches directly under `def` 241s registers and corrects an offense when using ternary operator with boolean literal branches 241s does not register an offense when using a branch that is not boolean literal 241s registers and corrects an offense when using `if foo == bar` with opposite boolean literal branches 241s registers and corrects an offense when using `unless foo == bar` with boolean literal branches 241s registers and corrects an offense when using `unless foo == bar` with boolean literal branches 241s does not register an offense when using a branch that is not boolean literal 241s 241s RuboCop::Cop::Lint::MissingCopEnableDirective 241s when the cop is disabled in the config 241s reports no offense when re-disabling it until EOF 241s when the maximum range size is infinite 241s registers an offense when a department is disabled and never re-enabled 241s registers an offense when a cop is disabled and never re-enabled 241s does not register an offense when the disable cop is re-enabled 241s does not register an offense when the disable department is re-enabled 241s when the maximum range size is finite 241s registers an offense when a department is disabled and never re-enabled 241s does not register an offense when the disable department is re-enabled within the limit 241s does not register an offense when the disable cop is re-enabled within the limit 241s registers an offense when a cop is disabled and never re-enabled 241s registers an offense when a cop is disabled for too many lines 241s registers an offense when a department is disabled for too many lines 241s 241s RuboCop::Cop::InternalAffairs::OffenseLocationKeyword 241s does not register an offense when the `loc` is on a different node 241s does not register an offense when the `loc` is on a child node 241s when `node.loc.selector` is passed 241s registers an offense if message argument is passed 241s registers an offense 241s 241s RuboCop::Formatter::HTMLFormatter 241s outputs the cached result in HTML 241s outputs the result in HTML 241s 241s RuboCop::Cop::Style::RegexpLiteral 241s when PercentLiteralDelimiters is configured with brackets 241s respects the configuration when autocorrecting 241s %r regex with other delimiters than curly braces 241s registers an offense 241s when PercentLiteralDelimiters is configured with slashes 241s respects the configuration when autocorrecting 241s when `EnforcedStyle: omit_parentheses` of `Style/MethodCallWithArgsParentheses` cop 241s when using `%r` regexp with `EnforcedStyle: slashes` 241s registers an offense when not used as a method argument 241s does not register an offense when used as a method argument 241s does not register an offense when used as a safe navigation method argument 241s when using `%r` regexp with `EnforcedStyle: mixed` 241s does not register an offense when used as a method argument 241s does not register an offense when used as a safe navigation method argument 241s registers an offense when not used as a method argument 241s when regex contains slashes in interpolation 241s ignores the slashes that do not belong // regex 241s when `EnforcedStyle: require_parentheses` of `Style/MethodCallWithArgsParentheses` cop 241s when using `%r` regexp with `EnforcedStyle: slashes` 241s registers an offense when used as a method argument 241s does not register an offense when using a regexp starts with a blank as a safe navigation method argument 241s registers an offense when using a regexp starts with a blank 241s registers an offense when not used as a method argument 241s does not register an offense when using a regexp starts with a blank as a method argument 241s registers an offense when used as a safe navigation method argument 241s when using `%r` regexp with `EnforcedStyle: mixed` 241s does not register an offense when using a regexp starts with a blank as a method argument 241s registers an offense when not used as a method argument 241s registers an offense when used as a method argument 241s registers an offense when using a regexp starts with a blank 241s does not register an offense when using a regexp starts with a blank as a safe navigation method argument 241s registers an offense when used as a safe navigation method argument 241s when EnforcedStyle is set to mixed 241s a multi-line %r regex with slashes 241s is accepted 241s a single-line %r regex without slashes 241s registers an offense 241s a single-line `//` regex without slashes 241s is accepted 241s a single-line `//` regex with slashes 241s registers an offense 241s when configured to allow inner slashes 241s is accepted 241s a multi-line %r regex without slashes 241s is accepted 241s a single-line %r regex with slashes 241s is accepted 241s when configured to allow inner slashes 241s registers an offense 241s a multi-line `//` regex without slashes 241s registers an offense 241s a multi-line `//` regex with slashes 241s registers an offense 241s when EnforcedStyle is set to slashes 241s a single-line `//` regex without slashes 241s is accepted 241s a multi-line %r regex without slashes 241s registers an offense 241s a single-line `//` regex with slashes and interpolation 241s registers an offense 241s when configured to allow inner slashes 241s is accepted 241s a multi-line `//` regex with slashes 241s registers an offense 241s when configured to allow inner slashes 241s is accepted 241s a multi-line `//` regex without slashes 241s is accepted 241s a single-line `%r//` regex with slashes 241s is accepted 241s when configured to allow inner slashes 241s preserves slashes after autocorrection 241s a single-line %r regex without slashes 241s registers an offense 241s a single-line `//` regex with slashes 241s registers an offense 241s when configured to allow inner slashes 241s is accepted 241s a single-line %r regex with slashes 241s is accepted 241s when configured to allow inner slashes 241s registers an offense 241s a multi-line %r regex with slashes 241s is accepted 241s when configured to allow inner slashes 241s registers an offense 241s when EnforcedStyle is set to percent_r 241s a single-line `//` regex without slashes 241s registers an offense 241s a multi-line `//` regex without slashes 241s registers an offense 241s a multi-line %r regex with slashes 241s is accepted 241s a multi-line `//` regex with slashes 241s registers an offense 241s a single-line `//` regex with slashes 241s registers an offense 241s a single-line %r regex without slashes 241s is accepted 241s a multi-line %r regex without slashes 241s is accepted 241s a single-line %r regex with slashes 241s is accepted 241s 241s RuboCop::Cop::Layout::ParameterAlignment 241s aligned with fixed indentation 241s accepts proper indentation 241s registers an offense and corrects parameters aligned to first param 241s accepts parameter lists on a single line 241s accepts a method definition without parameters 241s doesn't get confused by splat 241s registers an offense and corrects parameters with double indent 241s accepts the first parameter being on a new row 241s defining self.method 241s registers an offense and corrects parameters aligned to first param 241s accepts proper indentation 241s aligned with first parameter 241s registers an offense and corrects parameters with double indent 241s registers an offense and corrects alignment in simple case 241s accepts proper indentation 241s doesn't get confused by splat 241s registers an offense and corrects parameters with single indent 241s accepts parameter lists on a single line 241s accepts the first parameter being on a new row 241s accepts a method definition without parameters 241s defining self.method 241s registers an offense and corrects parameters with single indent 241s accepts proper indentation 241s 241s RuboCop::Cop::Style::TrailingCommaInBlockArgs 241s curly brace block format 241s does not register an offense for keyword arguments 241s preserves semicolons in block/local variables 241s registers an offense when a trailing comma is not needed 241s does not register an offense when no arguments are present 241s does not register an offense when a trailing comma is required 241s does not register an offense for default arguments 241s ignores commas in default argument strings 241s does not register an offense when more than one argument is present with no trailing comma 241s when `->` has multiple arguments 241s does not register an offense 241s do/end block format 241s registers an offense when a trailing comma is not needed 241s ignores commas in default argument strings 241s does not register an offense for an empty block 241s does not register an offense for default arguments 241s does not register an offense when no arguments are present 241s does not register an offense for keyword arguments 241s does not register an offense when a trailing comma is required 241s does not register an offense when more than one argument is present with no trailing comma 241s preserves semicolons in block/local variables 241s when `lambda` has multiple arguments 241s does not register an offense when more than one argument is present with no trailing comma 241s registers an offense and corrects when a trailing comma isn't needed 241s 241s RuboCop::Cop::Lint::NestedPercentLiteral 241s registers offense for multiply nested percent literals 241s registers offense for nested percent literals 241s registers no offense for empty array 241s registers no offense for array 241s registers offense for repeated nested percent literals 241s registers no offense for percent modifier character in isolation 241s registers no offense for nestings under percent 241s registers no offense for percents in the middle of literals 241s when handling invalid UTF8 byte sequence 241s registers no offense for array 241s registers offense for nested percent literal 241s 241s RuboCop::Cop::Style::ParenthesesAroundCondition 241s does not blow up when the condition is a ternary op 241s allows parens if the condition node is a modifier rescue op 241s accepts parentheses around condition in a ternary 241s is not confused by leading parentheses in subexpression 241s allows parens if the condition node is a modifier while op 241s is not confused by parentheses in subexpression 241s registers an offense for parentheses around condition 241s accepts parentheses if there is no space between the keyword and (. 241s allows parens if the condition node is a modifier if op 241s does not blow up for empty if condition 241s allows parens if the condition node is a modifier unless op 241s does not blow up for empty unless condition 241s allows parens if the condition node is a modifier until op 241s does not register an offense when parentheses in multiple expressions separated by semicolon 241s safe assignment is allowed 241s accepts element assignment in condition surrounded with parentheses 241s accepts variable assignment in condition surrounded with parentheses 241s accepts setter in condition surrounded with parentheses 241s parentheses in multiline conditions are not allowed 241s registers an offense for parentheses around multiline condition 241s parentheses in multiline conditions are allowed 241s registers an offense for parentheses in single line condition 241s accepts parentheses around multiline condition 241s safe assignment is not allowed 241s does not accept variable assignment in condition surrounded with parentheses 241s does not accept element assignment in condition surrounded with parentheses 241s 241s RuboCop::Cop::Style::AutoResourceCleanup 241s does not register an offense for File.open with immediate close 241s does not register an offense for File.open with block-pass 241s does not register an offense for File.open with block 241s registers an offense for File.open without block 241s 241s RuboCop::FileFinder 241s #find_file_upwards 241s returns nil when file is not found 241s returns a file to be found upwards 241s #find_last_file_upwards 241s returns nil when file is not found 241s returns the last file found upwards 241s 241s RuboCop::Cop::Layout::BlockEndNewline 241s registers an offense and corrects when multiline block `}` is not on its own line 241s registers an offense and corrects when multiline block `}` is not on its own line and using heredoc argument with method chain 241s registers an offense and corrects when a multiline block ends with a method call with hash arguments 241s registers an offense and corrects when `}` of multiline block without processing is not on its own line 241s registers an offense and corrects when multiline block `}` is not on its own line and using heredoc argument 241s accepts multiline blocks with newlines before the end 241s registers an offense and corrects when multiline block end is not on its own line 241s registers an offense and corrects when multiline block `}` is not on its own line and using method chain 241s registers an offense and corrects when multiline block `}` is not on its own line and using multiple heredoc argument method chain 241s accepts a one-liner 241s registers an offense and corrects when multiline block `}` is not on its own line and using multiple heredoc arguments 241s registers an offense and corrects when a multiline block ends with a hash 241s Ruby 2.7 241s registers an offense and corrects when multiline block `}` is not on its own line and using heredoc argument 241s registers an offense and corrects when multiline block `}` is not on its own line and using method chain 241s 241s RuboCop::Cop::Lint::NextWithoutAccumulator 241s behaves like reduce/inject 241s given a reduce block 241s accepts next within a nested block 242s accepts next with a value 242s registers an offense for a bare next 242s Ruby 2.7 242s registers an offense for a bare next 242s behaves like reduce/inject 242s given a inject block 242s accepts next with a value 242s accepts next within a nested block 242s registers an offense for a bare next 242s Ruby 2.7 242s registers an offense for a bare next 242s given an unrelated block 242s accepts next with a value 242s accepts a bare next 242s 242s RuboCop::Cop::Style::CommandLiteral 242s when EnforcedStyle is set to mixed 242s a single-line %x string without backticks 242s registers an offense and corrects to backticks 242s a single-line %x string with backticks 242s is accepted 242s when configured to allow inner backticks 242s registers an offense without autocorrection 242s a multi-line %x string with backticks 242s is accepted 242s a multi-line %x string without backticks 242s is accepted 242s a multi-line ` string without backticks 242s registers an offense and corrects to %x 242s a single-line ` string with backticks 242s registers an offense without autocorrection 242s when configured to allow inner backticks 242s is accepted 242s a single-line ` string without backticks 242s is accepted 242s a multi-line ` string with backticks 242s registers an offense without autocorrection 242s heredoc commands 242s is ignored 242s when EnforcedStyle is set to percent_x 242s a multi-line %x string with backticks 242s is accepted 242s a single-line %x string with backticks 242s is accepted 242s a single-line ` string with backticks 242s registers an offense without autocorrection 242s a multi-line ` string with backticks 242s registers an offense without autocorrection 242s a single-line ` string without backticks 242s registers an offense and corrects to %x 242s a multi-line ` string without backticks 242s registers an offense and corrects to %x 242s a multi-line %x string without backticks 242s is accepted 242s a single-line %x string without backticks 242s is accepted 242s when PercentLiteralDelimiters only has a default 242s respects the configuration when autocorrecting 242s when PercentLiteralDelimiters is configured with curly braces 242s respects the configuration when autocorrecting 242s %x commands with other delimiters than parentheses 242s registers an offense 242s when PercentLiteralDelimiters is configured and a default exists 242s ignores the default when autocorrecting 242s when EnforcedStyle is set to backticks 242s a single-line %x string without backticks 242s registers an offense and corrects to backticks 242s a single-line %x string with backticks 242s is accepted 242s when configured to allow inner backticks 242s registers an offense without autocorrection 242s a multi-line ` string with backticks 242s registers an offense without autocorrection 242s when configured to allow inner backticks 242s is accepted 242s a single-line ` string with backticks 242s registers an offense without autocorrection 242s when configured to allow inner backticks 242s is accepted 242s a single-line ` string without backticks 242s is accepted 242s a multi-line %x string with backticks 242s is accepted 242s when configured to allow inner backticks 242s registers an offense without autocorrection 242s a multi-line %x string without backticks 242s registers an offense and corrects to backticks 242s a multi-line ` string without backticks 242s is accepted 242s 242s RuboCop::Cop::InternalAffairs::RedundantLocationArgument 242s when location argument is not passed 242s does not register an offense 242s when location argument is passed 242s when location argument is :expression 242s registers an offense 242s removes default `location` when preceded by another keyword 242s removes default `location` surrounded by other keywords 242s when there is a message argument 242s registers an offense 242s when location argument does not equal to :expression 242s does not register an offense 242s 242s RuboCop::Cop::Style::ConstantVisibility 242s does not register an offense in the top level scope 242s does not register an offense when passing a string to the visibility declaration 242s registers an offense for module definitions 242s when defining a constant in a class 242s with a multi-statement body 242s registers an offense when not using a visibility declaration 242s does not register an offense when using a visibility declaration 242s registers an offense when there is no matching visibility declaration 242s with a single-statement body 242s registers an offense when not using a visibility declaration 242s IgnoreModules 242s registers an offense for constants 242s does not register an offense for class definitions 242s when defining a constant in a module 242s does not register an offense when using a visibility declaration 242s registers an offense when not using a visibility declaration 242s 242s RuboCop::Cop::Layout::FirstHashElementIndentation 242s when the HashAlignment style is separator for : 242s accepts correctly indented first pair 242s registers an offense and corrects incorrectly indented } 242s registers an offense and corrects incorrectly indented first pair with : 242s when hash is operand 242s registers an offense and corrects incorrectly indented } 242s accepts correctly indented first pair 242s registers an offense and corrects incorrectly indented first pair 242s when EnforcedStyle is align_braces 242s registers an offense and corrects incorrectly indented } 242s registers an offense for incorrectly indented hash that is the value of a single pair hash 242s registers an offense for a hash that is a value of a multi pairs hashwhen the indent of its elements is not based on the hash key 242s accepts a first pair on the same line as the left brace 242s accepts single line hash 242s accepts several pairs per line 242s accepts correctly indented first pair 242s accepts an empty hash 242s when 'special_inside_parentheses' style is used 242s registers an offense and corrects incorrect indentation 242s when 'consistent' style is used 242s registers an offense and corrects incorrect indentation 242s when the HashAlignment style is separator for => 242s registers an offense and corrects incorrectly indented first pair with => 242s accepts correctly indented first pair 242s registers an offense and corrects incorrectly indented } 242s when hash is right hand side in assignment 242s accepts several pairs per line 242s accepts an empty hash 242s accepts correctly indented first pair 242s registers an offense and corrects incorrectly indented first pair 242s accepts single line hash 242s accepts a first pair on the same line as the left brace 242s when indentation width is overridden for this cop 242s accepts correctly indented first pair 242s registers an offense and corrects incorrectly indented first pair 242s when hash is method argument 242s and arguments are surrounded by parentheses 242s and EnforcedStyle is special_inside_parentheses 242s accepts special indentation for second argument 242s registers an offense for a hash that is a value of a multi pairs hashwhen the indent of its elements is not based on the hash key 242s accepts indent based on the preceding left parenthesiswhen the right brace and its following pair is on the same line 242s accepts special indentation for first argument 242s registers an offense and corrects 'consistent' indentation 242s accepts indent based on the left brace when the outer hash key and the left brace is not on the same line 242s registers an offense for incorrectly indented hash that is the value of a single pair hash 242s accepts normal indentation for hash within hash 242s registers an offense and corrects 'align_braces' indentation 242s when using safe navigation operator 242s registers an offense and corrects 'consistent' indentation 242s and EnforcedStyle is consistent 242s accepts normal indentation for first argument 242s registers an offense for incorrectly indented hash that is the value of a single pair hash 242s registers an offense and corrects incorrect indentation 242s registers an offense for a hash that is a value of a multi pairs hashwhen the indent of its elements is not based on the hash key 242s accepts indent based on the start of the line where the left brace iswhen the right brace and its following pair is on the same line 242s accepts normal indentation for second argument 242s accepts indent based on the left brace when the outer hash key and the left brace is not on the same line 242s and argument are not surrounded by parentheses 242s registers an offense for a hash that is a value of a multi pairs hashwhen the indent of its elements is not based on the hash key 242s accepts braceless hash 242s accepts a correctly indented multi-line hash with braces 242s registers an offense for the first inner hash member not based on the start of line when the outer hash pair has no following siblings 242s registers an offense for incorrectly indented multi-line hash with braces 242s accepts single line hash with braces 242s accepts indent based on the start of the line where the left brace iswhen the right brace and its following pair is on the same line 242s accepts indent based on the left brace when the outer hash key and the left brace is not on the same line 242s when hash is argument to setter 242s accepts correctly indented first pair 242s registers an offense and corrects incorrectly indented first pair 242s 242s RuboCop::Cop::Layout::EmptyLineAfterMagicComment 242s registers an offense for documentation immediately following comment 242s registers offense when frozen_string_literal used with shareable_constant_value without empty line 242s accepts an empty source file 242s accepts code that separates the comment from the code with a newline 242s accepts a source file with only a magic comment 242s accepts magic comment followed by encoding 242s accepts magic comment with shareable_constant_value 242s accepts magic comment with typed 242s registers an offense when multiple magic comments without empty line 242s registers an offense for code that immediately follows comment 242s registers an offense when code that immediately follows typed comment 242s 242s RuboCop::Cop::Lint::Loop 242s registers an offense and corrects for begin/end/while 242s accepts loop/break unless 242s registers an offense for begin/end/until 242s accepts loop/break if 242s 242s RuboCop::Cop::Naming::RescuedExceptionsVariableName 242s with the `PreferredName` setup 242s does not register an offense when using `exception` 242s registers an offense when using `_e` 242s registers an offense when using `e` 242s registers offenses when using `foo` and `bar` in multiple rescues 242s does not register an offense when using `_exception` 242s with default config 242s with variable being referenced 242s renames the variable references when autocorrecting 242s with multiple branches 242s registers and corrects each offense 242s with implicit rescue 242s without `Exception` variable 242s does not register an offense 242s with `Exception` variable 242s does not register an offense when using `_e` 242s registers an offense when using `exc` 242s does not register an offense when using `e` 242s registers an offense when using `_exc` 242s when the variable is reassigned 242s only corrects uses of the exception 242s only corrects the exception variable 242s with nested rescues 242s handles it 242s when the variable is reassigned using multiple assignment 242s only corrects uses of the exception 242s with explicit rescue 242s shadowing an external variable 242s does not register an offense 242s with splat operator as `Exception` list 242s does not register an offense without variable name 242s registers an offense with unexpected variable name 242s does not register an offense with expected variable name 242s with method as `Exception` 242s registers an offense with unexpected variable name 242s does not register an offense without variable name 242s does not register an offense with expected variable name 242s with lower letters class name 242s does not register an offense 242s without `Exception` variable 242s does not register an offense 242s with `Exception` variable 242s registers an offense when using `_exc` 242s registers offenses when using `foo` and `bar` in multiple rescues 242s does not register an offense when using `e` 242s registers an offense when using `exc` and renames its usage 242s does not register an offense when using `_e` 242s registers an offense when using `exc` 242s does not register an offense when using _e followed by e 242s 242s RuboCop::Cop::Style::StabbyLambdaParentheses 242s require_parentheses 242s does not register an offense for a stabby lambda with parentheses 242s registers an offense for a stabby lambda without parentheses 242s behaves like common 242s does not check a stabby lambda without arguments 242s does not check a method call named lambda 242s does not check the old lambda syntax 242s require_no_parentheses 242s registers an offense for a stabby lambda with parentheses 242s behaves like common 242s does not check the old lambda syntax 242s does not check a method call named lambda 242s does not check a stabby lambda without arguments 242s 242s RuboCop::Cop::Layout::InitialIndentation 242s accepts empty file 242s accepts unindented comment + assignment 242s registers an offense for indented method definition 242s accepts unindented method definition 242s registers an offense and corrects indented assignment disregarding comment 242s for a file with byte order mark 242s registers an offense and corrects indented method call 242s registers an offense and corrects indented method call after comment 242s accepts unindented method call 242s 242s RuboCop::Cop::Style::MapToHash 242s >= Ruby 2.6 242s `collect.to_h` with a block on `to_h` 242s registers an offense but does not correct 242s when the receiver is an hash 242s registers an offense and corrects 242s for `map.to_h` with block arity 2 242s registers an offense and corrects 242s for `collect.to_h` with block arity 1 242s registers an offense and corrects 242s `map` and `collect.to_h` with newlines 242s registers an offense and corrects with newline removal 242s when chained further 242s registers an offense and corrects 242s `collect` without `to_h` 242s does not register an offense 242s for `collect.to_h` with block arity 2 242s registers an offense and corrects 242s when the receiver is an array 242s registers an offense and corrects 242s when the receiver is an array 242s registers an offense and corrects 242s when chained further 242s registers an offense and corrects 242s `map.to_h` with a block on `to_h` 242s registers an offense but does not correct 242s when the receiver is an hash 242s registers an offense and corrects 242s for `map.to_h` with block arity 1 242s registers an offense and corrects 242s `map` and `map.to_h` with newlines 242s registers an offense and corrects with newline removal 242s `map` without `to_h` 242s does not register an offense 242s 242s RuboCop::Cop::Style::GlobalStdStream 242s does not register an offense when assigning other const to std stream gvar 242s does not register an offense when using non std stream const 242s registers an offense and corrects when using std stream as const 242s does not register an offense when assigning std stream const to std stream gvar 242s 242s RuboCop::Cop::Style::Not 242s parenthesizes when `not` is applied to and 242s parenthesizes when `not` is applied to a ternary op 242s parenthesizes when `not` is applied to or 242s registers an offense for not 242s autocorrects "not" with ! 242s does not register an offense for ! 242s parenthesizes when `not` would change the meaning of a binary exp 242s uses the reverse operator when `not` is applied to a comparison 242s autocorrects "not" followed by parens with ! 242s 242s RuboCop::StringInterpreter 242s .interpret 242s handles extended unicode 242s handles octal 242s handles unicode 242s handles hex 242s behaves like simple escape 242s handles \\v 242s behaves like simple escape 242s handles \\a 242s behaves like simple escape 242s handles \\e 242s behaves like simple escape 242s handles \\b 242s behaves like simple escape 242s handles \\f 242s behaves like simple escape 242s handles \\r 242s behaves like simple escape 242s handles \\s 242s behaves like simple escape 242s handles \\t 242s behaves like simple escape 242s handles \\n 242s 242s RuboCop::Cop::InternalAffairs::UndefinedConfig 242s registers an offense when the cop has no configuration at all 242s ignores `cop_config` in non-cop classes 242s ignores `cop_config` in non-cop subclasses 242s works when the base class is `Cop` instead of `Base` 242s registers an offense when the cop inherits `RuboCop::Cop::Base` 242s does not register an offense if using `cop_config` outside of a cop class 242s registers an offense when the cop is not within the `RuboCop::Cop` namespace 242s can handle an empty file 242s registers an offense when the cop inherits `Cop::Base` 242s registers an offense when the cop inherits `::RuboCop::Cop::Base` 242s does not register an offense for implicit configuration keys 242s works with deeper nested cop names 242s element lookup 242s registers an offense for missing configuration keys 242s does not register an offense for defined configuration keys 242s fetch 242s does not register an offense for defined configuration keys 242s registers an offense for missing configuration keys 242s with a default value 242s does not register an offense for defined configuration keys 242s registers an offense for missing configuration keys 242s 242s RuboCop::Cop::Lint::RedundantStringCoercion 242s accepts interpolation without #to_s 242s registers an offense and corrects `to_s` in interpolation 242s does not explode on empty interpolation 242s registers an offense and corrects `to_s` in an interpolation with several expressions 242s registers an offense and corrects an implicit receiver 242s accepts #to_s with arguments in an interpolation 242s 242s RuboCop::Cop::InternalAffairs::NodeMatcherDirective 242s does not insert a blank line if one already exists 242s does not register an offense if the directive is in a comment block 242s inserts a blank line between multiple multi-line pattern matchers 242s retains indentation properly when inserting 242s registers an offense if the matcher does not have a directive 242s does not insert a blank line if one already exists 242s does not register an offense if the directive is in a comment block 242s retains indentation properly when inserting 242s retains indentation properly when correcting 242s does not register an offense if called with a dynamic method name 242s does not register an offense if called with a dynamic method name 242s registers an offense if the matcher does not have a directive and a method call is used for a pattern argument 242s registers an offense if the directive name does not match the actual name 242s autocorrects with the right arguments if the pattern includes arguments 242s registers an offense if the matcher has multiple directives 242s registers an offense if the matcher does not have a directive but has preceding comments 242s registers an offense if the matcher has multiple directives 242s autocorrects with the right arguments if the pattern references a non-contiguous argument 242s inserts a blank line between multiple multi-line pattern matchers 242s does not register an offense if the node matcher already has a directive 242s inserts a blank line between multiple pattern matchers 242s inserts a blank line between multiple pattern matchers 242s registers an offense if the matcher does not have a directive 242s autocorrects with the right arguments if the pattern references a non-contiguous argument 242s registers an offense if the matcher does not have a directive and a method call is used for a pattern argument 242s autocorrects with the right arguments if the pattern includes arguments 242s registers an offense if the matcher does not have a directive but has preceding comments 242s registers an offense if the directive name does not match the actual name 242s retains indentation properly when correcting 242s does not register an offense if the node matcher already has a directive 242s 242s RuboCop::Cop::Style::OpenStructUse 242s when not using OpenStruct 242s registers no offense 242s when using custom namespaced OpenStruct 242s when inheriting from it 242s is expected to eq "class A < SomeNamespace::OpenStruct; end" 242s when used in assignments 242s registers no offense 242s when defined in custom namespace 242s when class 242s is expected to eq "module SomeNamespace\n class OpenStruct\n end\nend\n" 242s when module 242s is expected to eq "module SomeNamespace\n module OpenStruct\n end\nend\n" 242s when using OpenStruct 242s for OpenStruct 242s when inheriting from it via Class.new 242s registers an offense 242s when inheriting from it via < 242s registers an offense 242s when used in assignments 242s registers an offense 242s for ::OpenStruct 242s when inheriting from it via < 243s registers an offense 243s when used in assignments 243s registers an offense 243s when inheriting from it via Class.new 243s registers an offense 243s 243s RuboCop::TargetFinder 243s #find(..., :only_recognized_file_types) 243s does not find hidden files 243s returns absolute paths 243s when a pattern is passed 243s finds files which match the pattern 243s when files with a ruby extension are passed 243s picks all the ruby files 243s when local AllCops/Include lists two patterns 243s picks two files 243s when a subdirectory AllCops/Include only lists one pattern 243s picks two files 243s when some non-known Ruby files are specified in the configuration Include and they are not explicitly passed as arguments 243s includes them 243s when no argument is passed 243s finds files under the current directory 243s when same paths are passed 243s does not return duplicated file paths 243s when some non-known Ruby files are specified in the configuration Include and they are explicitly passed as arguments 243s includes them 243s when a non-ruby file is passed 243s doesn't pick the file 243s when files with ruby interpreters are passed 243s picks all the ruby files 243s when some paths are specified in the configuration Exclude and they are explicitly passed as arguments 243s normally 243s does not exclude them 243s when it's forced to adhere file exclusion configuration 243s excludes them 243s when a hidden directory path is passed 243s finds files under the specified directory 243s when a directory path is passed 243s finds files under the specified directory 243s when a file with a ruby filename is passed 243s picks all the ruby files 243s when a hidden directory path is passed 243s finds files under the specified directory 243s when input is passed on stdin 243s includes the file 243s #target_files_in_dir 243s picks files with extension .rb 243s does not pick files with no extension and no ruby shebang 243s does not pick files specified to be excluded in config 243s picks ruby executable files with no extension 243s does not pick directories 243s picks files specified to be included in config 243s when an exception is raised while reading file 243s and debug mode is enabled 243s outputs error message 243s and debug mode is disabled 243s outputs nothing 243s w/ --fail-fast option 243s works with the expected number of .rb files 243s #find(..., :all_file_types) 243s does not find hidden files 243s returns absolute paths 243s when some non-known Ruby files are specified in the configuration Include and they are not explicitly passed as arguments 243s includes them 243s when no argument is passed 243s finds files under the current directory 243s when a non-ruby file is passed 243s picks the file 243s when files with ruby interpreters are passed 243s picks all the ruby files 243s when a directory path is passed 243s finds files under the specified directory 243s when a hidden directory path is passed 243s finds files under the specified directory 243s when input is passed on stdin 243s includes the file 243s when a file with a ruby filename is passed 243s picks all the ruby files 243s when some paths are specified in the configuration Exclude and they are explicitly passed as arguments 243s when it's forced to adhere file exclusion configuration 243s excludes them 243s normally 243s does not exclude them 243s when files with a ruby extension are passed 243s picks all the ruby files 243s when local AllCops/Include lists two patterns 243s picks all the ruby files 243s when a subdirectory AllCops/Include only lists one pattern 243s picks all the ruby files 243s when some non-known Ruby files are specified in the configuration Include and they are explicitly passed as arguments 243s includes them 243s when a pattern is passed 243s finds files which match the pattern 243s when same paths are passed 243s does not return duplicated file paths 243s #find_files 243s can exclude symlinks as well as directories 243s does not search excluded top level directories 243s works also if a folder is named "**" 243s works also if a folder is named "{}" 243s prevents infinite loops when traversing symlinks 243s resolves symlinks when looking for excluded directories 243s works also if a folder is named "," 243s 243s RuboCop::Cop::Lint::Void 243s accepts void op <=> if on last line 243s accepts void op * if on last line 243s accepts backtick commands 243s registers an offense for void var var if not on last line 243s registers an offense for void sign op - if not on last line 243s accepts percent-x commands 243s accepts void op > by itself without a begin block 243s registers an offense for void lit [1] if not on last line 243s registers an offense for void op * if not on last line 243s registers an offense for void lit 1 if not on last line 243s registers an offense for void op % if not on last line 243s accepts void op == if on last line 243s registers an offense for void lit 2.0 if not on last line 243s accepts void op <= if on last line 243s registers an offense for void op <= if not on last line 243s accepts void op < if on last line 243s registers two offenses for void literals in `#tap` method 243s handles explicit begin blocks 243s accepts short call syntax 243s accepts void op === by itself without a begin block 243s registers an offense for void var VAR if not on last line 243s registers an offense for void var @@var if not on last line 243s accepts void op + by itself without a begin block 243s registers an offense for void `defined?` if not on last line 243s registers an offense for void op + if not on last line 243s accepts void unary op ! if on last line 243s accepts void op != by itself without a begin block 243s registers an offense for void lit :test if not on last line 243s accepts void op - by itself without a begin block 243s accepts void op > if on last line 243s registers an offense for void sign op + if not on last line 243s registers an offense for void op / if not on last line 243s registers two offenses for void literals in a `for` 243s registers an offense for void op <=> if not on last line 243s accepts void op < by itself without a begin block 243s registers an offense for void `self` if not on last line 243s accepts void op >= by itself without a begin block 243s accepts void op <=> by itself without a begin block 243s accepts void unary op + if on last line 243s registers an offense for void var $var if not on last line 243s accepts void op * by itself without a begin block 243s registers an offense for void op - if not on last line 243s registers an offense for void unary op ~ if not on last line 243s accepts void op === if on last line 243s registers an offense for void op == if not on last line 243s registers an offense for void op >= if not on last line 243s accepts void unary op - by itself without a begin block 243s registers an offense for void lit {} if not on last line 243s registers two offenses for void literals in an initialize method 243s registers two offenses for void literals in a setter method 243s accepts void op == by itself without a begin block 243s accepts void op % by itself without a begin block 243s registers two offenses for void literals in a `#each` method 243s registers an offense for void op < if not on last line 243s accepts void unary op ! by itself without a begin block 243s accepts void unary op - if on last line 243s registers an offense for void op > if not on last line 243s registers an offense for void literal in a method definition 243s accepts void op - if on last line 243s accepts method with irange block 243s registers an offense for void lit /test/ if not on last line 243s accepts void op + if on last line 243s accepts void op <= by itself without a begin block 243s accepts void unary op ~ by itself without a begin block 243s accepts void op % if on last line 243s accepts empty block 243s accepts void op / by itself without a begin block 243s registers an offense for void unary op ! if not on last line 243s registers an offense for void op != if not on last line 243s accepts void op >= if on last line 243s accepts void unary op ~ if on last line 243s accepts void op / if on last line 243s accepts void op != if on last line 243s handles `#each` block with single expression 243s accepts void unary op + by itself without a begin block 243s registers an offense for void var @var if not on last line 243s accepts method with erange block 243s registers an offense for void op === if not on last line 243s Ruby 2.7 243s registers two offenses for void literals in `#tap` method 243s when checking for methods with no side effects 243s registers an offense if not on last line 243s registers an offense for chained methods 243s when not checking for methods with no side effects 243s does not register an offense for void nonmutating methods 243s 243s RuboCop::Cop::Lint::RedundantSafeNavigation 243s does not register an offense when using `&.` outside of conditions 243s does not register an offense when using `&.respond_to?` with `nil` specific method as argument in condition 243s registers an offense and corrects when `&.` is used inside `unless` condition 243s registers an offense and corrects when `&.` is used inside `#{loop_type}` condition 243s does not register an offense when using `&.` with non-allowed method in condition 243s registers an offense and corrects when `&.` is used inside complex condition 243s registers an offense and corrects when `&.` is used inside `if` condition 243s registers an offense and corrects when `&.` is used inside `#{loop_type}` condition 243s 243s RuboCop::Cop::Layout::ClosingParenthesisIndentation 243s accepts begin nodes that are not grouped expressions 243s for grouped expressions 243s with line break before 1st operand 243s accepts a correctly aligned ) 243s registers an offense for misaligned ) 243s with no line break before 1st operand 243s accepts ) that does not begin its line 243s accepts a correctly aligned ) 243s registers an offense for misaligned ) 243s for method assignments with indented parameters 243s with no line break before 1st parameter 243s accepts a correctly aligned ) 243s can handle indentation up against the left edge 243s can handle inner method calls 243s registers an offense for misaligned ) 243s can handle individual arguments that are broken over lines 243s can handle hash arguments that are not broken over lines 243s accepts a correctly indented ) 243s with line break before 1st parameter 243s registers an offense for misaligned ) 243s accepts a correctly aligned ) 243s without arguments 243s accepts empty () 243s accepts a correctly aligned ) against ( 243s registers an offense for misaligned ) 243s can handle indentation up against the left edge 243s can handle indentation up against the method 243s for method calls 243s with first multiline arg on new line 243s accepts ) on the same level as ( with args on same line 243s accepts ) on the same level as ( with second arg on new line 243s with no line break before 1st parameter 243s registers an offense and corrects misindented ) when ) is aligned with the params 243s accepts a correctly indented ) 243s accepts a correctly aligned ) 243s registers an offense for misaligned ) 243s accepts a correctly indented ) inside a block 243s does not register an offense when using keyword arguments 243s with line break before 1st parameter 243s accepts a correctly aligned ) 243s registers an offense for misaligned ) 243s without arguments 243s accepts a correctly aligned ) against ( 243s accepts empty () 243s can handle indentation up against the left edge 243s for method definitions 243s with no line break before 1st parameter 243s registers an offense for misaligned ) 243s accepts a correctly aligned ) 243s accepts empty () 243s with line break before 1st parameter 243s registers an offense for misaligned ) 243s accepts a correctly aligned ) 243s for method chains 243s can handle multiple chains with differing breaks 243s registers an offense and corrects method chains 243s when using safe navigation operator 243s registers an offense and corrects misaligned ) 243s 243s RuboCop::Cop::Layout::MultilineAssignmentLayout 243s new_line style 243s registers an offense when the rhs is on the same line 243s ignores arrays 243s registers an offense for masgn with multi-line lhs 243s registers an offense when the rhs is on the same line in []= 243s registers an offense when the rhs is on the same line in setters 243s allows multi-line assignments on separate lines 243s when supported types is block 243s registers an offense when multi-line assignments using block definition is on the same line 243s allows multi-line assignments when using block definition on separate lines 243s allows multi-line assignments when using shovel operator 243s allows multi-line block defines on separate lines 243s configured supported types 243s allows supported types to be configured 243s same_line style 243s ignores arrays 243s registers an offense for masgn with multi-line lhs 243s allows multi-line assignments on the same line 243s registers an offense when the rhs is a different line in []= 243s registers an offense when the rhs is a different line 243s registers an offense when the rhs is a different line in setters 243s when supported types is block 243s allows when multi-line assignments using block definition is on the same line 243s registers an offense when multi-line assignments using block definition on separate lines 243s allows multi-line assignments when using shovel operator 243s allows multi-line block defines on separate lines 243s configured supported types 243s allows supported types to be configured 243s 243s RuboCop::Cop::InternalAffairs::CreateEmptyFile 243s does not register an offense when using `create_file(path, ['foo', 'bar'])` 243s registers an offense when using `create_file(path, "") 243s does not register an offense when using `receiver.create_file(path, '')` 243s does not register an offense when using `create_file(path, 'hello')` 243s does not register an offense when using `create_file(path)` 243s registers an offense when using `create_file(path, '') 243s 243s RuboCop::Cop::Style::RedundantParentheses 243s registers an offense for parens around a literal hash value 243s registers an offense for parens around last expressions in method body 243s accepts parentheses in yield call with hash 243s registers an offense for parens around a float exponentiation base 243s accepts parentheses in super call with hash 243s accepts parentheses around a constant passed to when 243s accepts parentheses around operator keywords 243s registers an offense when there is space around the parentheses 243s registers an offense for parens around a variable after semicolon 243s registers an offense for parens around a block body 243s accepts parentheses inside an irange 243s accepts parentheses around an irange 243s registers an offense for parens around method body 243s registers an offense for parens around last expressions in block body 243s accepts parentheses around a method call with unparenthesized arguments 243s registers an offense for parens around a positive exponent 243s accepts parentheses when they touch the following keyword 243s accepts parentheses around an erange 243s accepts parentheses when enclosed in parentheses at `until-post` 243s registers an offense for parens around an interpolated expression 243s registers an offense and corrects for a parenthesized item in a hash where the comma is on a line with the closing parens 243s accepts parentheses when enclosed in parentheses at `while-post` 243s registers an offense for parens around an integer exponentiation base 243s registers an offense for parens around a literal hash value and following newline 243s registers an offense and corrects when method arguments are unnecessarily parenthesized 243s registers an offense for parens around a negative exponent 243s registers an offense for parens around a literal in array and following newline 243s accepts parentheses around the error passed to rescue 243s registers an offense and corrects an array of multiple heredocs 243s accepts parentheses inside an erange 243s accepts parentheses when they touch the preceding keyword 243s registers an offense for parens around a receiver of a method call with an argument 243s registers an offense for parens around a literal in array 243s when a non-parenthesized call has an arg and a block 243s accepts parens around the arg 243s behaves like plausible 243s accepts parentheses when arguments are unparenthesized 243s behaves like redundant 243s registers an offense for parentheses around a literal 243s behaves like redundant 243s registers an offense for parentheses around an unary operation 243s behaves like redundant 243s registers an offense for parentheses around an unary operation 243s behaves like redundant 243s registers an offense for parentheses around a method call 243s behaves like redundant 243s registers an offense for parentheses around a literal 243s literals in an array 243s when there is a comma on the same line as the closing parentheses 243s registers an offense and corrects when there is assignment 243s registers an offense and corrects when there is a subsequent item 243s registers an offense and corrects when there is no subsequent item 243s registers an offense and corrects when there is a trailing comma 243s when parentheses are used like method argument parentheses 243s accepts parens around the arg 243s behaves like plausible 243s accepts parentheses when arguments are unparenthesized 243s behaves like plausible 243s accepts parentheses when arguments are unparenthesized 243s behaves like redundant 243s registers an offense for parentheses around a literal 243s behaves like redundant 243s registers an offense for parentheses around a literal 243s behaves like redundant 243s registers an offense for parentheses around a variable 243s behaves like plausible 243s accepts parentheses when arguments are unparenthesized 243s behaves like plausible 243s accepts parentheses when arguments are unparenthesized 243s behaves like redundant 243s registers an offense for parentheses around a literal 243s when the first argument in a method call begins with a hash literal 243s registers an offense if the argument list is parenthesized 243s accepts parentheses if the argument list is not parenthesized 243s behaves like redundant 243s registers an offense for parentheses around a literal 243s behaves like plausible 243s accepts parentheses when arguments are unparenthesized 243s behaves like redundant 243s registers an offense for parentheses around a variable 243s behaves like redundant 243s registers an offense for parentheses around a keyword 243s behaves like keyword with return value 243s behaves like redundant 243s registers an offense for parentheses around a keyword 243s behaves like redundant 243s registers an offense for parentheses around a keyword 243s behaves like redundant 243s registers an offense for parentheses around a keyword 243s behaves like plausible 243s accepts parentheses when arguments are unparenthesized 243s behaves like redundant 243s registers an offense for parentheses around an unary operation 243s behaves like redundant 243s registers an offense for parentheses around a method call 243s behaves like redundant 243s registers an offense for parentheses around a method call 243s behaves like redundant 243s registers an offense for parentheses around a method call 243s behaves like plausible 243s accepts parentheses when arguments are unparenthesized 243s behaves like redundant 243s registers an offense for parentheses around a method call 243s behaves like plausible 243s accepts parentheses when arguments are unparenthesized 243s behaves like plausible 243s accepts parentheses when arguments are unparenthesized 243s behaves like redundant 243s registers an offense for parentheses around a keyword 243s behaves like redundant 243s registers an offense for parentheses around a variable 243s behaves like redundant 243s registers an offense for parentheses around a literal 243s when a hash literal is the second argument in a method call 243s registers an offense 243s behaves like redundant 243s registers an offense for parentheses around a literal 243s behaves like redundant 243s registers an offense for parentheses around a method call 243s behaves like redundant 243s registers an offense for parentheses around a literal 243s pin operator 243s behaves like redundant parentheses 243s registers an offense and corrects an instance variable 243s behaves like allowed parentheses 243s accepts parentheses on a method call on an instance variable 243s behaves like allowed parentheses 243s accepts parentheses on a method call on a global variable 243s behaves like allowed parentheses 243s accepts parentheses on an array literal 243s behaves like allowed parentheses 243s accepts parentheses on a method call on a class variable 243s behaves like allowed parentheses 243s accepts parentheses on an expression 243s behaves like allowed parentheses 244s accepts parentheses on a function call with arguments 244s behaves like allowed parentheses 244s accepts parentheses on a hash literal 244s behaves like allowed parentheses 244s accepts parentheses on a range literal 244s behaves like redundant parentheses 244s registers an offense and corrects a global variable 244s behaves like redundant parentheses 244s registers an offense and corrects a class variable 244s behaves like allowed parentheses 244s accepts parentheses on a method call on a local variable 244s behaves like allowed parentheses 244s accepts parentheses on a function call with no arguments 244s behaves like allowed parentheses 244s accepts parentheses on an int literal 244s behaves like redundant parentheses 244s registers an offense and corrects a local variable 244s behaves like redundant 244s registers an offense for parentheses around a keyword 244s behaves like redundant 244s registers an offense for parentheses around an unary operation 244s behaves like redundant 244s registers an offense for parentheses around a literal 244s behaves like plausible 244s accepts parentheses when arguments are unparenthesized 244s behaves like redundant 244s registers an offense for parentheses around a constant 244s behaves like redundant 244s registers an offense for parentheses around a method call 244s behaves like plausible 244s accepts parentheses when arguments are unparenthesized 244s behaves like redundant 244s registers an offense for parentheses around a literal 244s behaves like plausible 244s accepts parentheses when arguments are unparenthesized 244s behaves like redundant 244s registers an offense for parentheses around a literal 244s behaves like plausible 244s accepts parentheses when arguments are unparenthesized 244s behaves like plausible 244s accepts parentheses when arguments are unparenthesized 244s behaves like keyword with return value 244s behaves like plausible 244s accepts parentheses when arguments are unparenthesized 244s behaves like redundant 244s registers an offense for parentheses around a keyword 244s behaves like redundant 244s registers an offense for parentheses around a keyword 244s behaves like redundant 244s registers an offense for parentheses around a keyword 244s ternaries 244s when Style/TernaryParentheses has EnforcedStyle: require_parentheses 244s behaves like plausible 244s accepts parentheses when arguments are unparenthesized 244s when Style/TernaryParentheses has EnforcedStyle: require_no_parentheses 244s registers an offense for parens around ternary condition 244s when Style/TernaryParentheses is not enabled 244s registers an offense for parens around constant ternary condition 244s when Style/TernaryParentheses has EnforcedStyle: require_parentheses_when_complex 244s behaves like plausible 244s accepts parentheses when arguments are unparenthesized 244s behaves like plausible 244s accepts parentheses when arguments are unparenthesized 244s behaves like keyword with arguments 244s behaves like redundant 244s registers an offense for parentheses around a keyword 244s behaves like redundant 244s registers an offense for parentheses around a keyword 244s behaves like plausible 244s accepts parentheses when arguments are unparenthesized 244s behaves like redundant 244s registers an offense for parentheses around a keyword 244s behaves like plausible 244s accepts parentheses when arguments are unparenthesized 244s behaves like plausible 244s accepts parentheses when arguments are unparenthesized 244s behaves like redundant 244s registers an offense for parentheses around a literal 244s behaves like redundant 244s registers an offense for parentheses around a keyword 244s behaves like keyword with return value 244s behaves like redundant 244s registers an offense for parentheses around a keyword 244s behaves like plausible 244s accepts parentheses when arguments are unparenthesized 244s behaves like redundant 244s registers an offense for parentheses around a keyword 244s behaves like redundant 244s registers an offense for parentheses around a keyword 244s behaves like redundant 244s registers an offense for parentheses around a keyword 244s behaves like redundant 244s registers an offense for parentheses around a method call 244s behaves like redundant 244s registers an offense for parentheses around a literal 244s behaves like redundant 244s registers an offense for parentheses around a literal 244s behaves like keyword with arguments 244s behaves like redundant 244s registers an offense for parentheses around a keyword 244s behaves like plausible 244s accepts parentheses when arguments are unparenthesized 244s behaves like redundant 244s registers an offense for parentheses around a keyword 244s behaves like redundant 244s registers an offense for parentheses around a keyword 244s behaves like redundant 244s registers an offense for parentheses around a keyword 244s behaves like redundant 244s registers an offense for parentheses around a method call 244s behaves like plausible 244s accepts parentheses when arguments are unparenthesized 244s behaves like redundant 244s registers an offense for parentheses around a keyword 244s behaves like redundant 244s registers an offense for parentheses around a literal 244s 244s RuboCop::Cop::Lint::UselessSetterCall 244s is not confused by operators ending with = 244s accepts exception assignments without exploding 244s when a lvar possibly contains an object passed as argument by logical-operator-assignment at the end of the method 244s accepts the setter call on the lvar 244s when a lvar contains an object passed as argument at the end of the method 244s accepts the setter call on the lvar 244s with singleton method ending with setter call on local object 244s registers an offense and corrects 244s when a lvar declared as an argument is no longer the passed object at the end of the method 244s registers an offense and corrects for the setter call on the lvar 244s with method ending with ivar assignment 244s accepts 244s when a lvar contains a local object instantiated with literal 244s registers an offense and corrects for the setter call on the lvar 244s with method ending with square bracket setter on local object 244s registers an offense and corrects 244s with method ending with setter call on ivar 244s accepts 244s when a lvar contains an object passed as argument by multiple-assignment at the end of the method 244s accepts the setter call on the lvar 244s when a lvar does not contain any object passed as argument with multiple-assignment at the end of the method 244s registers an offense and corrects 244s when a lvar contains a non-local object returned by a method 244s accepts 244s with method ending with setter call on local object 244s registers an offense and corrects 244s with method ending with setter call on argument 244s accepts 244s when a lvar does not contain any object passed as argument by binary-operator-assignment at the end of the method 244s registers an offense and corrects 244s 244s RuboCop::Cop::InternalAffairs::StyleDetectedApiUse 244s does not register an offense when correct_style_detected and a unrecognized_style_detected are both used 244s registers an offense when unexpected_style_detected is used without a correct_style_detected follow up 244s registers an offense when opposite_style_detected is used in a conditional expression 244s registers an offense when no_acceptable_style! is used in a conditional expression 244s does not register an offense when correct_style_detected and a opposite_style_detected are both used 244s registers an offense when conflicting_styles_detected is used in a conditional expression 244s does not register an offense when correct_style_detected and a ambiguous_style_detected are both used 244s registers an offense when ambiguous_style_detected is used in a conditional expression 244s registers an offense when correct_style_detected is used without a negative *_style_detected follow up 244s does not register an offense when correct_style_detected and a conflicting_styles_detected are both used 244s registers an offense when ambiguous_style_detected is used without a correct_style_detected follow up 244s registers an offense when correct_style_detected is used in a conditional expression 244s registers an offense when opposite_style_detected is used without a correct_style_detected follow up 244s registers an offense when no_acceptable_style! is used without a correct_style_detected follow up 244s registers an offense when conflicting_styles_detected is used without a correct_style_detected follow up 244s does not register an offense when correct_style_detected and a no_acceptable_style! are both used 244s does not register an offense when correct_style_detected and a unexpected_style_detected are both used 244s registers an offense when unrecognized_style_detected is used without a correct_style_detected follow up 244s registers an offense when unexpected_style_detected is used in a conditional expression 244s registers an offense when unrecognized_style_detected is used in a conditional expression 244s 244s RuboCop::Cop::Lint::NumberConversion 244s to_method in symbol form 244s does not register an offense when using `Integer` constructor 244s registers offense with try 244s registers an offense when using nested number conversion methods 244s does not register an offense when using `Complex` constructor 244s does not register an offense when using `Float` constructor 244s registers offense with send 244s registers offense and autocorrects without parentheses 244s registers offense and autocorrects 244s AllowedMethods 244s does not register an offense for an allowed method 244s registers an offense for other methods 244s registers an offense 244s when `#to_i` called on a variable on a hash 244s when `#to_i` called on a variable 244s when `#to_i` called on a hash value 244s when using `#to_i` for number literals 244s when using `#to_r` 244s when using `#to_c` for number literals 244s when using `#to_c` 244s when using `#to_f` for number literals 244s when using `#to_i` 244s when `#to_i` called on a variable on a array 244s when using `#to_r` for number literals 244s when using `#to_f` 244s does not register an offense 244s when using Complex() 244s when `#to_i` called without a receiver 244s when `:to_f` is one of multiple method arguments 244s when using Integer() with integer 244s when using Float() 244s IgnoredClasses 244s when using Time 244s when using DateTime 244s when using Time/DateTime with multiple method calls 244s AllowedPatterns 244s does not register an offense for an allowed method 244s registers an offense for other methods 244s 244s RuboCop::Cop::Style::MinMax 244s with an array literal containing calls to `#min` and `#max` 244s when the expression is used as a return value 244s does not register an offense if the receivers do not match 244s does not register an offense if the receiver is implicit 244s does not register an offense if there are additional elements 244s registers an offense if the receivers match 244s when the expression is used in a parallel assignment 244s does not register an offense if the receivers do not match 244s does not register an offense if the receiver is implicit 244s does not register an offense if there are additional elements 244s registers an offense if the receivers match 244s when the expression stands alone 244s does not register an offense if the receivers do not match 244s does not register an offense if there are additional elements 244s does not register an offense if the receiver is implicit 244s registers an offense if the receivers match 244s 244s RuboCop::Cop::Layout::ElseAlignment 244s accepts a ternary if 244s with if statement 244s accepts a correctly aligned if/elsif/else/end 244s accepts a one line if statement 244s accepts an if/else branches with rescue clauses 244s accepts indentation after else when if is on new line after assignment 244s registers an offense for misaligned else 244s registers an offense for misaligned elsif 244s with assignment 244s when alignment style is variable 244s and end is aligned with variable 244s accepts an if/else 244s accepts an if-else with end aligned with setter 244s accepts an if with end aligned with element assignment 244s accepts an if/else with chaining after the end 244s accepts an if/else with chaining with a block after the end 244s accepts an if-elsif-else with end aligned with setter 244s and end is aligned with keyword 244s registers offenses for an if with setter 244s registers an offense for an if 244s registers an offense for an if with element assignment 244s when alignment style is keyword by choice 244s and end is aligned with variable 244s registers an offense for an if 244s and end is aligned with keyword 244s accepts a while in assignment 244s accepts an if in assignment 244s accepts an if/else in assignment on next line 244s accepts an if/else in assignment 244s accepts an until in assignment 244s for a file with byte order mark 244s accepts a correctly aligned if/elsif/else/end 244s ensure/rescue/else in Block Argument 244s accepts a correctly aligned else with assignment 244s registers an offense for misaligned else 244s accepts a correctly aligned else 244s with unless 244s accepts a correctly aligned else in an otherwise empty unless 244s registers an offense for misaligned else 244s accepts an empty unless 244s with def/rescue/else/ensure/end 244s registers an offense for misaligned else 244s accepts a correctly aligned else 244s with case 244s accepts case without else 244s registers an offense for misaligned else 244s accepts else aligned with when but not with case 244s accepts correctly aligned case/when/else 244s >= Ruby 2.7 244s with case match 244s accepts correctly aligned case/when/else 244s accepts case match without else 244s registers an offense for misaligned else 244s accepts correctly aligned empty else 244s with def/defs 244s accepts an empty def body 244s accepts an empty defs body 244s when modifier and def are on the same line 244s accepts a correctly aligned body 244s registers an offense for else not aligned with private 244s with def/rescue/else/end 244s registers an offense for misaligned else 244s accepts a correctly aligned else 244s with begin/rescue/else/ensure/end 244s registers an offense for misaligned else 244s accepts a correctly aligned else 244s 244s RuboCop::Cop::Layout::DotPosition 244s Trailing dots style 244s does not get confused by several lines of chained methods 244s does not err on method call with multi-line arguments 244s does not err on method call without a method name 244s does not err on method call on same line 244s does not err on method call with no dots 244s accepts trailing dot in multi-line method call 244s registers an offense for leading dot in multi-line call 244s when the receiver has a heredoc argument 244s as the first argument 244s registers an offense 244s with another method on the same line 244s does not register an offense 244s with multiple heredocs 244s registers an offense 244s as the last argument 244s registers an offense 244s with a dynamic heredoc 244s registers an offense 244s when using safe navigation operator 244s registers an offense for correct + opposite 244s accepts trailing dot in multi-line method call 244s when there is a heredoc with a following method 244s does not register an offense for a heredoc 244s when the receiver is a heredoc 244s registers an offense 244s Leading dots style 244s registers an offense for correct + opposite 244s registers an offense for trailing dot in multi-line call 244s accepts leading do in multi-line method call 244s does not err on method call on same line 244s does not err on method call with no dots 244s registers an offense for only dot line 244s does not err on method call without a method name 244s when a method spans multiple lines 244s registers an offense 244s when the receiver has a heredoc argument 244s with multiple heredocs 244s registers an offense 244s as the first argument 244s registers an offense 244s as the last argument 244s registers an offense 244s with another method on the same line 244s does not register an offense 244s with a dynamic heredoc 244s registers an offense 244s when using safe navigation operator 244s accepts leading do in multi-line method call 244s registers an offense for correct + opposite 244s with multiple offenses 244s registers all of them 244s when there is an intervening line comment 244s does not register offense 244s when there is an intervening blank line 244s does not register offense 244s when the receiver is a heredoc 244s registers an offense 244s 244s RuboCop::Ext::RegexpNode 244s #parsed_tree 244s with a regexp not containing interpolation 244s returns the expected tree 244s with an extended mode regexp with comment 244s returns the expected tree 244s with a regexp with subexpressions 244s has location information 244s with a regexp containing interpolation 244s returns the expected blanked tree 244s with a regexp containing a multi-line interpolation 244s returns the expected blanked tree 244s #each_capture 244s when called without argument 244s is expected to match [(be an instance of Regexp::Expression::Group::Capture), (be an instance of Regexp::Expression::Group::Named)] 244s when called with a `named: false` 244s is expected to match [(be an instance of Regexp::Expression::Group::Capture)] 244s when called with a `named: true` 244s is expected to match [(be an instance of Regexp::Expression::Group::Named)] 244s 244s RuboCop::Cop::Naming::MethodParameterName 244s does not register offense for empty restarg 244s can register multiple offenses in one method definition 244s does not register offense for valid default parameters 244s does not register offense for empty kwrestarg 244s registers offense when parameter is less than minimum length 244s does not register offense for valid keyword parameters 244s does not register offense for valid parameter names 244s does not register for method without parameters 244s registers offense for offensive keyword parameters 244s registers offense when parameter with prefix is less than minimum length 244s registers offense when parameter ends in number on class method 244s registers offense when parameter contains uppercase characters 244s does not register offense for valid parameter names on self.method 244s registers offense when parameter ends in number 244s registers offense for offensive default parameter 244s with ForbiddenNames 244s accepts parameter that uses a forbidden name's letters 244s registers offense for parameter listed as forbidden 244s when using argument forwarding 244s does not register an offense 244s with AllowedNames 244s accepts underscore param names 244s accepts specified block param names 244s accepts param names prefixed with underscore 244s registers unlisted offensive names 244s with AllowNamesEndingInNumbers 244s accept parameters that end in numbers 244s 244s RuboCop::Cop::Lint::UselessElseWithoutRescue 244s with `else` with `rescue` 244s accepts 244s with `else` without `rescue` 244s registers an offense 244s 244s RuboCop::Cop::Lint::ElseLayout 244s does not register an offense if the entire if is on a single line 244s registers an offense and corrects for elsifs 244s registers an offense and corrects for expr on same line as else 244s registers an offense and corrects for the entire else body being on the same line 244s does not register an offense for an elsif with no body 244s registers and corrects an offense when using multiple `elsif`s 244s accepts empty braces 244s accepts proper else 244s accepts modifier forms 244s accepts ternary ops 244s 244s RuboCop::Cop::Style::MethodCallWithoutArgsParentheses 244s accepts parens after not 244s accepts parens in method call with args 244s registers an offense for `obj.method += func()` 244s registers an offense for `obj.method &&= func()` 244s accepts parentheses for methods starting with an upcase letter 244s accepts special lambda call syntax 244s autocorrects calls that could be empty literals 244s registers an offense for `obj.method ||= func()` 244s registers an offense for parens in method call without args 244s method call as argument 244s accepts without parens 244s registers an offense with empty parens 244s registers an empty parens offense for multiple assignment 244s when AllowedMethods is enabled 244s ignores method listed in AllowedMethods 244s assignment to a variable with the same name 244s accepts parens in default argument assignment 244s accepts parens in parallel assignment 244s accepts parens in complex assignment 244s accepts parens in shorthand assignment 244s accepts parens in local variable assignment 244s when AllowedPatterns is enabled 244s ignores method listed in AllowedMethods 244s 244s RuboCop::Cop::Style::Copyright 244s does not register an offense when the notice is in a block comment 244s does not register an offense when the notice is present 244s does not register an offense when the notice is not the first comment 244s when the copyright notice is missing and the source code file starts with a shebang 244s adds an offense 244s when the copyright notice comes after any code 244s adds an offense 244s when the copyright notice is missing and the source code file starts with shebang and an encoding comment 244s adds an offense 244s when the source code file is empty 244s adds an offense 244s when the copyright notice is missing 244s fails to autocorrect when the AutocorrectNotice does not match the Notice pattern 244s fails to autocorrect if no AutocorrectNotice is given 244s adds an offense 244s when the copyright notice is missing and the source code file starts with an encoding comment 244s adds an offense 244s 244s RuboCop::Cop::Lint::DeprecatedConstants 244s registers and corrects an offense when using deprecated methods that have no alternative 244s registers and corrects an offense when using `::NIL` 244s does not register an offense when not using deprecated constant 244s registers and corrects an offense when using `TRUE` 244s registers and corrects an offense when using `::Triple::Nested::Constant` 244s does not register an offense when using `__ENCODING__ 244s registers and corrects an offense when using `NIL` 244s registers and corrects an offense when using `::TRUE` 244s registers and corrects an offense when using `FALSE` 244s registers and corrects an offense when using `::FALSE` 244s registers and corrects an offense when using deprecated methods that have no deprecated version 244s Ruby >= 2.6 244s registers and corrects an offense when using `Net::HTTPServerException` 244s Ruby <= 2.7 244s does not register an offense when using `Random::DEFAULT` 244s Ruby >= 3.0 244s registers and corrects an offense when using `Random::DEFAULT` 245s registers and corrects an offense when using `::Random::DEFAULT` 245s Ruby <= 2.5 245s does not register an offense when using `Net::HTTPServerException` 245s 245s RuboCop::Cop::Style::MethodDefParentheses 245s require_no_parentheses_except_multiline 245s behaves like endless methods 245s endless methods 245s accepts parens for method calls inside an endless method 245s accepts parens without args 245s accepts parens with args 245s accepts parens with `forward-arg` 245s when args span multiple lines 245s reports an offense for correct + opposite 245s auto-adds required parens to argument lists on multiple lines 245s when args are all on a single line 245s behaves like no parentheses 245s accepts a class def with parameters with parens 245s reports an offense for opposite + correct 245s reports an offense for class def with parameters with parens 245s reports an offense for def with parameters with parens 245s requires parens for anonymous block forwarding 245s accepts a def with parameters but no parens 245s requires parens for forwarding 245s accepts def with no args and no parens 245s auto-removes the parens for defs 245s reports an offense for def with no args and parens 245s require_no_parentheses 245s behaves like endless methods 245s endless methods 245s accepts parens with `forward-arg` 245s accepts parens for method calls inside an endless method 245s accepts parens with args 245s accepts parens without args 245s behaves like no parentheses 245s reports an offense for def with parameters with parens 245s reports an offense for opposite + correct 245s accepts a class def with parameters with parens 245s accepts a def with parameters but no parens 245s reports an offense for def with no args and parens 245s accepts def with no args and no parens 245s requires parens for forwarding 245s auto-removes the parens for defs 245s requires parens for anonymous block forwarding 245s reports an offense for class def with parameters with parens 245s require_parentheses 245s reports an offense for correct + opposite 245s reports an offense for class def with parameters but no parens 245s auto-adds required parens to argument lists on multiple lines 245s auto-adds required parens for a defs after a passing method 245s auto-adds required parens for a defs 245s reports an offense for def with parameters but no parens 245s accepts def with no args and no parens 245s behaves like endless methods 245s endless methods 245s accepts parens with `forward-arg` 245s accepts parens for method calls inside an endless method 245s accepts parens without args 245s accepts parens with args 245s 245s RuboCop::Cop::Metrics::AbcSize 245s when Max is 2.3 245s accepts a total score of 2.24 245s when Max is 2 245s accepts two assignments 245s when Max is 100.321 245s reports size and max as <100, 100, 400> 424.3/100.3 245s when Max is 10.3 245s reports size and max as <10, 10, 40> 42.43/10.3 245s when Max is 1.3 245s reports size and max as <1, 1, 4> 4.24/1.3 245s when Max is 1000.3 245s reports size and max as <1000, 1000, 4000> 4243/1000 245s when Max is 0 245s registers an offense for an assignment of an element 245s registers an offense for an if modifier 245s registers an offense for a `define_method` 245s accepts an empty `define_method` 245s registers an offense for complex content including A, B, and C scores 245s treats safe navigation method calls like regular method calls + a condition 245s accepts an empty method 245s registers an offense for an assignment of a local variable 245s when method is in list of allowed methods 245s when AllowedPatterns is enabled 245s does not register an offense when using `define_method` 245s does not register an offense when defining a class method 245s does not register an offense when defining an instance method 245s when AllowedMethods is enabled 245s does not register an offense when defining a class method 245s does not register an offense when defining an instance method 245s does not register an offense when using `define_method` 245s Ruby 2.7 245s registers an offense for a `define_method` with numblock 245s when CountRepeatedAttributes is `false` 245s does not count repeated attributes 245s when CountRepeatedAttributes is `true` 245s counts repeated attributes 245s 245s RuboCop::Cop::Naming::AsciiIdentifiers 245s when AsciiConstants is true 245s registers an offense for a variable name with mixed chars 245s does not get confused by an empty file 245s accepts identifiers with only ascii chars 245s registers an offense for a constant name with non-ascii chars 245s does not get confused by a byte order mark 245s registers an offense for a variable name with non-ascii chars 245s when AsciiConstants is false 245s does not get confused by a byte order mark 245s accepts identifiers with only ascii chars 245s does not get confused by an empty file 245s registers an offense for a variable name with mixed chars 245s registers an offense for a variable name with non-ascii chars 245s accepts constants with only ascii chars 245s 245s RuboCop::Cop::Lint::ConstantOverwrittenInRescue 245s registers an offense when overriding an exception with an exception result 245s does not register an offense when not overriding an exception with an exception result 245s does not register an offense when using `=>` but correctly assigning to variables 245s 245s RuboCop::Server::Cache 245s .pid_running? 245s works properly when concurrency with server stopping and cleaning cache dir 245s .cache_path 245s when `CacheRootDirectory` configure value is set 245s when cache root path is not specified path 245s contains the root from `CacheRootDirectory` configure value 245s when cache root path is not specified path and `XDG_CACHE_HOME` environment variable is spacified 245s contains the root from `CacheRootDirectory` configure value 245s when cache root path is specified path 245s contains the root from cache root path 245s when `XDG_CACHE_HOME` environment variable is set 245s when cache root path is specified path 245s contains the root from cache root path 245s when cache root path is not specified path 245s contains the root from `XDG_CACHE_HOME` 245s when .rubocop.yml is empty 245s when cache root path is not specified path 245s does not raise an error 245s when `RUBOCOP_CACHE_ROOT` environment variable is set 245s when cache root path is not specified path 245s contains the root from `RUBOCOP_CACHE_ROOT` 245s when cache root path is not specified path and `XDG_CACHE_HOME` environment variable is specified 245s contains the root from `RUBOCOP_CACHE_ROOT` 245s when cache root path is specified path 245s contains the root from cache root path 245s when cache root path is specified path 245s is the specified path 245s when cache root path is not specified as default 245s is the default path 245s when ERB pre-processing of the configuration file 245s when cache root path is not specified path 245s does not raise an error 245s 245s RuboCop::Cop::Layout::DefEndAlignment 245s when EnforcedStyleAlignWith is start_of_line 245s accepts matching defs ... end 245s accepts matching def ... end 245s registers an offense for mismatched foo def test end and autocorrects 245s registers an offense for mismatched def test end and autocorrects 245s accepts matching foo def ... end 245s accepts matching foo bar def ... end 245s accepts matching def ... end 245s registers an offense for mismatched def Test.test end and autocorrects 245s when using refinements and `private def` 245s does not register an offense 245s when including an anonymous module containing `private def` 245s does not register an offense 245s correct + opposite 245s registers an offense 245s when EnforcedStyleAlignWith is def 245s registers an offense for mismatched def test end and autocorrects 245s registers an offense for mismatched def Test.test end and autocorrects 245s registers an offense for mismatched foo def test end and autocorrects 245s accepts matching def ... end 245s accepts matching foo def ... end 245s accepts matching defs ... end 245s correct + opposite 245s registers an offense 245s 245s RuboCop::Cop::Layout::BlockAlignment 245s accepts end aligned with a constant 245s accepts end aligned with an or-asgn (||=) 245s accepts end aligned with an op-asgn (+=, -=) 245s accepts end aligned with a call chain left hand side 245s registers an offense for mismatched block end with a mass assignment 245s accepts end aligned with a global variable 245s accepts end aligned with an and-asgn (&&=) 245s registers an offense for mismatched block end with an and-asgn (&&=) 245s accepts end aligned with a method call with arguments 245s accepts end aligned with a class variable 246s registers an offense for mismatched block end with a variable 246s registers an offense for mismatched block end with an or-asgn (||=) 246s registers an offense for mismatched block end with a global variable 246s registers an offense for mismatched block end with a method call 246s registers an offense for mismatched end not aligned with the block that is an argument 246s registers an offense for mismatched block end with an op-asgn (+=, -=) 246s accepts end aligned with a method call 246s accepts end aligned with an instance variable 246s registers an offense for mismatched block end with a constant 246s accepts a block end that does not begin its line 246s accepts end aligned with a mass assignment 246s does not raise an error for nested block in a method call 246s accepts end aligned with a variable 246s registers an offense for mismatched block end with a class variable 246s registers an offense for mismatched end with a method call with arguments 246s registers an offense for mismatched block end with an instance variable 246s accepts end aligned with the block when the block is a method argument 246s when variables of a mass assignment spans several lines 246s registers an offense for end aligned with the block 246s accepts end aligned with the variables 246s and the block is an operand 246s accepts end aligned with a variable 246s when the block is terminated by } 246s mentions } (not end) in the message 246s when configured to align with start_of_line 246s errors when do aligned 246s allows when start_of_line aligned 246s Ruby 2.7 246s accepts end aligned with a call chain left hand side 246s registers an offense for mismatched block end with a mass assignment 246s when multiple similar-looking blocks have misaligned ends 246s registers an offense for each of them 246s on a logically negated method call 246s registers an offense and corrects 246s aligns end with the ! operator 246s on a splatted method call 246s aligns end with the splat operator 246s registers an offense and corrects misaligned end braces 246s when the block is defined on the next line 246s registers an offenses for mismatched end alignment 246s accepts end aligned with the block expression 246s when the block has arguments 246s registers an offense for mismatched block end 246s when the block is a logical operand 246s accepts a correctly aligned block end 246s on an arithmetically negated method call 246s aligns end with the - operator 246s registers an offense and corrects 246s on a bit-flipped method call 246s aligns end with the ~ operator 246s registers an offense and corrects misaligned end brace 246s when there is an assignment chain 246s registers an offense for an end aligned with the 2nd variable 246s accepts end aligned with the first variable 246s when configured to align with do 246s allows when do aligned 246s errors when start_of_line aligned 246s when the block has no arguments 246s registers an offense for mismatched block end 246s when the method part is a call chain that spans several lines 246s accepts pretty alignment style 246s registers offenses for misaligned ends 246s accepts end indented as the start of the block 246s accepts two kinds of end alignment 246s 246s RuboCop::Cop::Lint::ShadowingOuterLocalVariable 246s when a splat block argument has same name as an outer scope variable 246s registers an offense 246s when a block argument has same name as an outer scope variable 246s registers an offense 246s when a block block argument has same name as an outer scope variable 246s registers an offense 246s when a block local variable has same name as an outer scope variablewith same branches of same nested `if` condition node 246s registers an offense 246s when a block local variable has same name as an outer scope variablewith same branches of same `unless` condition node 246s registers an offense 246s when a block local variable has same name as an outer scope variable 246s registers an offense 246s when a block local variable has same name as an outer scope variablewith same branches of same `case` condition node 246s registers an offense 246s when a block argument has a same name starts with "_" as an outer scope variable 246s does not register an offense 246s when a block local variable has same name as an outer scope variablewith different branches of same `if` condition node 246s does not register an offense 246s when an outer scope variable is referenced in a block 246s does not register an offense 246s when a block local variable has same name as an outer scope variablewith same branches of same `if` condition node 246s registers an offense 246s when an outer scope variable is reassigned in a block 246s does not register an offense 246s when the same variable name as a block variable is used in return value assignment of `if` 246s does not register an offense 246s with Ractor.new 246s does not register an offense 246s when a block local variable has same name as an outer scope variablewith different branches of same `unless` condition node 246s does not register an offense 246s when a block argument has same name "_" as outer scope variable "_" 246s does not register an offense 246s when a method argument has same name as an outer scope variable 246s does not register an offense 246s when a block argument has different name with outer scope variables 246s does not register an offense 246s when a block local variable has same name as an outer scope variablewith different branches of same `case` condition node 246s does not register an offense 246s when multiple block arguments have a same name starts with "_" 246s does not register an offense 246s when multiple block arguments have same name "_" 246s does not register an offense 246s when a block local variable has same name as an outer scope variablewith same branches of same `if` condition node not in the method definition 246s registers an offense 246s 246s RuboCop::Cop::Style::RedundantEach 246s registers an offense when using `reverse_each.each_with_object` 246s does not register an offense when using `each_with_object` 246s registers an offense when using `each.each(&:foo)` 246s does not register an offense when using `each.with_object` 246s does not register an offense when using `each {}.each_with_index {}` 246s registers an offense when using a method starting with `each_` with `each_with_index` 246s does not register an offense when using `reverse_each(&:foo).each {...}` 246s registers an offense when using `each.each_with_object` 246s registers an offense when using `reverse_each.each_with_index` 246s does not register an offense when using `each_with_index` 246s does not register an offense when using `each {}.reverse_each {}` 246s does not register an offense when using `each {}.each_with_object([]) {}` 246s does not register an offense when using `each` with a symbol proc for last argument 246s registers an offense when using `reverse_each.each` 246s does not register an offense when using `each_with_index.reverse_each` 246s does not register an offense when using `each_ancestor.each` 246s does not register an offense when using `each_foo {}.each_with_object([]) {}` 246s does not register an offense when any method is used between methods with `each` in the method name 246s registers an offense when using a method starting with `each_` with `each_with_object` 246s registers an offense when using `each.each_with_index` 246s registers an offense when using `each.each` 246s does not register an offense when using `each` as enumerator 246s does not register an offense when using only single `each` 246s does not register an offense when using `reverse_each {}.each {}` 246s registers an offense when using `each.reverse_each` 246s does not register an offense when using `each.with_index` 246s does not register an offense when not chaining `each_` calls 246s does not register an offense when using `each` with a symbol proc argument 246s 246s RuboCop::Cop::Style::CommentedKeyword 246s accepts keyword letter sequences that are not keywords 246s does not register an offense for certain comments 246s registers an offense and corrects when commenting on the same line as `module` 246s registers an offense and corrects when commenting on the same line as `begin` 246s registers an offense and corrects when commenting on the same line as `def` 246s registers an offense and corrects when commenting on the same line as `class` 246s checks a long comment in less than one second 246s registers an offense and corrects when commenting on indented keywords 246s registers an offense and corrects when commenting on the same line as `end` 246s does not register an offense if AST contains # symbol 246s registers an offense and corrects for one-line cases 246s does not register an offense if there are no comments after keywords 246s registers an offense and corrects when commenting after keyword with spaces 246s 246s RuboCop::Cop::Layout::FirstHashElementLineBreak 246s ignores implicit hashes in method calls with parens 246s registers an offense and corrects hash nested in a method call 246s registers an offense and corrects elements listed on the first line 246s registers an offense and corrects single element multi-line hash 246s ignores implicit hashes in method calls without parens 246s ignores implicit hashes in method calls that are improperly formatted 246s ignores elements listed on a single line 246s 246s RuboCop::Cop::MessageAnnotator 246s #annotate 246s with options on 246s returns an annotated message 246s when the output format is JSON 246s returns the message unannotated 246s with default options 246s returns the message 246s #urls 246s returns style guide and reference url when they are specified 246s returns an empty array without StyleGuide URL 246s returns multiple reference urls 246s returns style guide url when it is specified 246s returns an empty array if the reference url is blank 246s returns reference url when it is specified 246s with style guide url 246s when a base URL is specified 246s does not specify a URL if a cop does not have one 246s can use a path-based setting 246s allows absolute URLs in the cop config 246s combines correctly with a target-based setting 246s can accept relative paths if base has a full path 246s when a nested department is specified 246s returns style guide url when it is specified 246s when a department other than AllCops is specified 246s returns style guide url when it is specified 246s when StyleGuide is not set in the config 246s does not add style guide url 246s when StyleGuide is set in the config 246s adds style guide url 246s 246s RuboCop::Cop::Naming::PredicateName 246s without method definition macros 246s accepts method name when corrected name is invalid identifier 246s does not register any offenses when using an internal affair macro 246s registers an offense when using `define_method` 246s with restricted prefixes 246s registers an offense when method name starts with "is" 246s accepts method name when corrected name is invalid identifier 246s registers an offense when method name starts with "has" 246s accepts method name that starts with unknown prefix 246s accepts method name that is an assignment 246s without restricted prefixes 246s registers an offense when method name starts with "has" 246s accepts method name when corrected name is invalid identifier 246s registers an offense when method name starts with "is" 246s accepts method name that starts with unknown prefix 246s with permitted predicate names 246s accepts method name which is in permitted list 246s with method definition macros 246s registers an offense when using `define_method` 246s registers an offense when using an internal affair macro 246s accepts method name when corrected name is invalid identifier 246s 246s RuboCop::Cop::Style::IpAddresses 246s does not register an offense on an empty string 246s with allowed addresses 246s does not register an offense if the case differs 246s does not register an offense for a allowed addresses 246s IPv6 246s registers an offense for a valid address 246s registers an offense for a shortened address 246s registers an offense for an address with 0s collapsed 246s registers an offense for a very short address 246s does not register an offense for an invalid address 246s registers an offense for the loopback address 246s the unspecified address :: (shortform of 0:0:0:0:0:0:0:0) 246s does not register an offense 246s when it is removed from the allowed addresses 246s registers an offense 246s IPv4 246s does not register an offense for an invalid address 246s does not register an offense for an address inside larger text 246s registers an offense for a valid address 246s 246s RuboCop::Cop::Layout::LineLength 246s registers an offense for a line that's 81 characters wide 246s accepts a line that's 80 characters wide 246s accepts the first line if it is a shebang line 246s highlights excessive characters 246s registers an offense for long line before __END__ but not after 246s when IgnoreCopDirectives is disabled 246s and the source is too long and has a trailing cop directive 246s highlights the excess source and cop directive 246s and the source is acceptable length 246s with a trailing RuboCop directive 246s registers an offense for the line 246s with an inline comment 246s highlights the excess comment 246s when line is indented with tabs 246s registers an offense for a long line 246s accepts a short line 246s when IgnoreCopDirectives is enabled 246s and the Rubocop directive causes an excessive line length 246s accepts the line 246s and has explanatory text 246s does not register an offense 246s and the source is too long 246s highlights only the non-directive part 246s and the source contains non-directive #s as non-comment 246s registers an offense for the line 246s and the source contains non-directive # as comment 246s highlights only the non-directive part 246s and the Rubocop directive is excessively long 246s accepts the line 246s when AllowURI option is disabled 246s and all the excessive characters are part of a URL 246s registers an offense for the line 246s when AllowHeredoc option is enabled 246s accepts long lines in heredocs 246s when the source has no AST 246s does not crash 246s and only certain heredoc delimiters are permitted 246s rejects long lines in heredocs with not permitted delimiters 246s autocorrection 246s method definition 246s when over limit 246s adds an offense and autocorrects it 246s when under limit 246s does not add any offenses 246s array 246s when under limit 246s does not add any offenses 246s when already on two lines 246s does not add any offenses 246s when over limit 246s adds an offense and autocorrects it 246s when two arrays on two lines allows outer to get broken first 246s adds an offense only to inner and does not autocorrect it 246s when has inside array 246s adds an offense only to outer and autocorrects it 246s comments 246s when over limit with semicolon 246s adds offense and does not autocorrect 246s long blocks 246s Ruby 2.7 246s adds an offense for {} block does correct it 246s adds an offense for do-end block and does correct it 246s do/end 246s adds an offense for block without arguments and does correct it 246s adds an offense for block with arguments and does correct it 246s let block 246s adds an offense and does correct it 246s braces 246s adds an offense and does correct it 246s no spaces 246s adds an offense and does correct it 246s lambda syntax 246s when argument is enclosed in parentheses 246s registers an offense and corrects 246s when argument is not enclosed in parentheses 246s registers an offense and corrects 246s method call 246s with a hash with a too long first item 246s when not parenthesized 246s when there is only one element 246s does not autocorrect 246s when there are multiple elements 246s moves the 2nd element to a new line 246s when on multiple lines 246s does not correct 246s when the hash is parenthesized 246s corrects 246s when parenthesized 246s corrects 246s when two together 246s does not add any offenses 246s when call with hash on same line 246s adds an offense only to outer and autocorrects it 246s when unparenthesized 246s when there are multiple arguments 246s splits the line after the first element 246s when there is one argument 246s does not autocorrect 246s with a heredoc argument 246s does not break up the line when parentheses are omitted 246s does not break up the line 246s does not break up the line when a heredoc is used as the first element of an array 246s and the heredoc is after the line should split 246s can break up the line before the heredoc argument 246s and other arguments before the heredoc 246s can break up the line before the heredoc argument 246s when nested method calls allows outer to get broken up first 246s adds offense and does not autocorrect 246s when over limit 246s adds an offense and autocorrects it 246s when under limit 246s does not add any offenses 246s with long argument list 246s registers an offense and autocorrects it 246s when two method calls 246s adds an offense only to outer and autocorrects it 246s multiple assignment 246s when over limit at right hand side 246s registers and corrects an offense 246s hash 246s when over limit rocket symbol 246s adds an offense and autocorrects it 246s when under limit 246s does not add any offenses 246s when over limit rocket 246s adds an offense and autocorrects it 246s when over limit because of a comment 246s adds an offense and does not autocorrect 246s when over limit and already on multiple lines long key 246s adds an offense and does not autocorrect 246s when over limit 246s adds an offense and autocorrects it 246s when over limit and keys already on multiple lines 246s adds an offense and does not autocorrect 246s when nested hashes on same line 246s adds an offense only to outer and autocorrects it 246s when hash in method call 246s adds an offense only to outer and autocorrects it 246s semicolon 246s semicolons inside string literal 246s adds offense and autocorrects elsewhere 246s when over limit and many semicolons 246s adds offense and autocorrects it by breaking the semicolonbefore the hash 246s when over limit and many spaces around semicolon 246s adds offense and autocorrects it by breaking the semicolonbefore the hash 246s when over limit and semicolon at end of line 246s adds offense and autocorrects it by breaking the first semicolonbefore the hash 246s semicolon inside string literal 246s adds offense and autocorrects elsewhere 246s when under limit 246s does not add any offenses 246s when over limit and many semicolons at the end 246s adds offense and does not autocorrectbefore the hash 246s when over limit 246s adds offense and autocorrects it by breaking the semicolonbefore the hash 246s when over limit and one semicolon at the end 246s adds offense and does not autocorrectbefore the hash 246s HEREDOC 246s when over limit with semicolon 246s adds offense and does not autocorrect 246s no breakable collections 246s adds an offense and does not autocorrect it 246s when AllowURI option is enabled 246s and the URL fits within the max allowed characters 246s registers an offense for the line 246s and the excessive characters include part of a URL in double quotes 246s does not include the quote as part of the offense 246s and the excessive characters include part of a URL in braces and another word 246s registers an offense for the line 246s and the URI is assigned 246s does not register an offense 246s and all the excessive characters are part of a URL 246s accepts the line 246s and the URL is wrapped in single quotes 246s accepts the line 246s and the URL is wrapped in double quotes 246s accepts the line 246s and the URL is wrapped in braces 246s accepts the line 246s and the URL is wrapped in braces with title 246s accepts the line 246s and the excessive characters include part of a URL and trailing whitespace 246s registers an offense for the line 246s and the URL does not have a http(s) scheme 246s rejects the line 246s and the scheme has been configured 246s does not register an offense 246s and an error other than URI::InvalidURIError is raised while validating a URI-ish string 246s does not crash 246s and the excessive characters include a complete URL 246s registers an offense for the line 246s and the excessive characters include part of a URL and another word 246s registers an offense for the line 246s and the URI is an argument 246s does not register an offense 246s when AllowedPatterns option is set 246s only registers an offense for lines not matching the pattern 246s affecting by IndentationWidth from Layout\Tab 246s without AllowURI option 246s behaves like with tabs indentation 246s registers an offense for a line that's including 2 tab with size 2 and 28 other characters 246s accepts a line that's including 1 tab with size 2 and 28 other characters 246s with AllowURI option 246s accepts a line that's including URI with text 246s accepts a line that's including URI 246s accepts a line that's including URI in quotes with text 246s accepts a line that's including URI and exceeds by 1 char 246s behaves like with tabs indentation 246s registers an offense for a line that's including 2 tab with size 2 and 28 other characters 246s accepts a line that's including 1 tab with size 2 and 28 other characters 246s 246s Changelog 246s parses correctly 246s merges correctly 246s Changelog::Entry 246s #ref_id 246s when there is no body 246s is expected to eq "x" 246s when there is an issue referenced with [Fixes #x] the body 246s is expected to eq "123" 246s when there is an issue referenced with [Fix #x] the body 246s is expected to eq "123" 246s when there is no issue referenced in the body 246s is expected to eq "x" 246s #content 246s when there is no issue referenced 246s generates correct content 246s when there is an issue referenced 246s generates correct content 246s #body 246s when there is an issue referenced with [Fixes #x] the body 246s is expected to eq "Fix something" 246s when there is no body 246s is expected to eq "" 246s when there is no issue referenced in the body 246s is expected to eq "Fix something" 246s when there is an issue referenced with [Fix #x] the body 246s is expected to eq "Fix something" 246s 246s RuboCop::Cop::Layout::HeredocIndentation 246s quoted by " 246s accepts for indented, with `~` 246s accepts for indented, but without `~` 246s registers an offense for not indented, without `~` 246s accepts for an empty line 246s registers an offense for not indented 246s does not register an offense when not indented but with whitespace, with `-` 246s displays message to use `<<~` instead of `<<-` 246s registers an offense for first line minus-level indented, with `-` 246s registers an offense for too deep indented with whitespace line 246s registers an offense for not indented enough with empty line 246s registers an offense for too deep indented with empty line 246s registers an offense for not indented enough with whitespace line 246s registers an offense for too deep indented 246s registers an offense for not indented, with `~` 246s accepts for indented, but with `-` 246s accepts for include empty lines 247s registers an offense for minus level indented 247s accepts for not indented but with whitespace 247s displays message to use `<<~` instead of `<<` 247s when Layout/LineLength is configured 247s accepts for long heredoc 247s quoted by ` 247s accepts for include empty lines 247s accepts for indented, with `~` 247s accepts for indented, but with `-` 247s accepts for indented, but without `~` 247s registers an offense for too deep indented 247s accepts for not indented but with whitespace 247s registers an offense for not indented, without `~` 247s registers an offense for too deep indented with whitespace line 247s registers an offense for not indented, with `~` 247s registers an offense for not indented enough with empty line 247s accepts for an empty line 247s does not register an offense when not indented but with whitespace, with `-` 247s registers an offense for not indented 247s registers an offense for not indented enough with whitespace line 247s registers an offense for first line minus-level indented, with `-` 247s displays message to use `<<~` instead of `<<-` 247s registers an offense for too deep indented with empty line 247s registers an offense for minus level indented 247s displays message to use `<<~` instead of `<<` 247s when Layout/LineLength is configured 247s accepts for long heredoc 247s quoted by ' 247s registers an offense for not indented enough with empty line 247s registers an offense for too deep indented 247s registers an offense for first line minus-level indented, with `-` 247s registers an offense for not indented 247s registers an offense for not indented enough with whitespace line 247s accepts for indented, but with `-` 247s registers an offense for too deep indented with empty line 247s accepts for an empty line 247s displays message to use `<<~` instead of `<<-` 247s accepts for indented, with `~` 247s does not register an offense when not indented but with whitespace, with `-` 247s displays message to use `<<~` instead of `<<` 247s registers an offense for minus level indented 247s registers an offense for not indented, without `~` 247s accepts for include empty lines 247s accepts for indented, but without `~` 247s registers an offense for not indented, with `~` 247s accepts for not indented but with whitespace 247s registers an offense for too deep indented with whitespace line 247s when Layout/LineLength is configured 247s accepts for long heredoc 247s quoted by 247s does not register an offense when not indented but with whitespace, with `-` 247s registers an offense for too deep indented with whitespace line 247s registers an offense for too deep indented 247s registers an offense for minus level indented 247s registers an offense for not indented, without `~` 247s accepts for indented, but with `-` 247s displays message to use `<<~` instead of `<<-` 247s accepts for an empty line 247s registers an offense for not indented 247s accepts for indented, but without `~` 247s displays message to use `<<~` instead of `<<` 247s registers an offense for too deep indented with empty line 247s registers an offense for not indented enough with empty line 247s accepts for include empty lines 247s accepts for not indented but with whitespace 247s registers an offense for not indented enough with whitespace line 247s registers an offense for first line minus-level indented, with `-` 247s accepts for indented, with `~` 247s registers an offense for not indented, with `~` 247s when Layout/LineLength is configured 247s accepts for long heredoc 247s 247s RuboCop::Cop::Style::Attr 247s registers offense for attr within class_eval 247s accepts attr when it has a receiver 247s registers an offense attr 247s does not register offense for custom `attr` method 247s accepts attr when it does not take arguments 247s registers offense for attr within module_eval 247s autocorrects 247s attr with multiple names to attr_reader 247s attr to attr_reader 247s attr, false to attr_reader 247s attr :name, true to attr_accessor :name 247s 247s RuboCop::Cop::Style::OneLineConditional 247s when AlwaysCorrectToMultiline is true 247s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 247s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 247s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 247s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 247s registers and corrects an offense with multi-line construct for if/then/else/end 247s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 247s registers and corrects an offense with multi-line construct for if-then-elsif-then-else-end 247s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 247s does not register an offense for unless/then/else/end with empty else 247s does not register an offense for if/then/end 247s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end that contains unparenthesized operator method calls 247s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 247s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end that contains method calls with parenthesized arguments 247s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end that contains method calls with unparenthesized arguments 247s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 247s does not register an offense for unless/then/end 247s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 247s registers and corrects an offense with multi-line construct for if-then-elsif-then-elsif-then-else-end 247s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 247s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 247s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 247s registers and corrects an offense with multi-line construct for if/then/else/end when `then` without body 247s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 247s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 247s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 247s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 247s registers and corrects an offense with multi-line construct for unless/then/else/end 247s does not register an offense for if/then/else/end with empty else 247s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 247s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 247s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 247s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 247s registers and corrects an offense with multi-line construct when one of the branches of if/then/else/end contains `next` keyword 247s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 247s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 247s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 247s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 247s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 247s behaves like if/then/else/end with keyword 247s registers and corrects an offense with multi-line construct when one of the branches of if/then/else/end contains `break` keyword 247s when IndentationWidth differs from default 247s registers and corrects an offense with multi-line construct for if/then/else/end 247s behaves like if/then/else/end with constructs changing precedence 247s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end with `yield a` constructs inside inner branches 247s behaves like if/then/else/end with keyword 247s registers and corrects an offense with multi-line construct when one of the branches of if/then/else/end contains `raise` keyword 247s behaves like if/then/else/end with keyword 247s registers and corrects an offense with multi-line construct when one of the branches of if/then/else/end contains `retry` keyword 247s behaves like if/then/else/end with constructs changing precedence 247s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end with `a and b` constructs inside inner branches 247s behaves like if/then/else/end with constructs changing precedence 247s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end with `defined? :A` constructs inside inner branches 247s behaves like if/then/else/end with constructs changing precedence 247s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end with `puts 1` constructs inside inner branches 247s behaves like if/then/else/end with constructs changing precedence 247s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end with `a or b` constructs inside inner branches 247s behaves like if/then/else/end with constructs changing precedence 247s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end with `a = b` constructs inside inner branches 247s behaves like if/then/else/end with constructs changing precedence 247s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end with `a ? b : c` constructs inside inner branches 247s behaves like if/then/else/end with constructs changing precedence 247s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end with `super b` constructs inside inner branches 247s behaves like if/then/else/end with keyword 247s registers and corrects an offense with multi-line construct when one of the branches of if/then/else/end contains `self` keyword 247s behaves like if/then/else/end with constructs changing precedence 247s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end with `not a` constructs inside inner branches 247s when AlwaysCorrectToMultiline is false 247s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 247s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 247s registers and corrects an offense with multi-line construct for if-then-elsif-then-else-end 247s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 247s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 247s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 247s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 247s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 247s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 247s registers and corrects an offense with multi-line construct for if-then-elsif-then-elsif-then-else-end 247s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 247s does not register an offense for unless/then/end 247s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 247s registers and corrects an offense with ternary operator without adding parentheses for if/then/else/end that contains unparenthesized operator method calls 247s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 247s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 247s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 247s registers and corrects an offense with ternary operator and adding parentheses for if/then/else/end that contains method calls with unparenthesized arguments 247s registers and corrects an offense with multi-line construct for if-then-elsif-then-end 247s does not register an offense for if/then/else/end with empty else 247s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 247s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 247s registers and corrects an offense with ternary operator without adding parentheses for if/then/else/end that contains method calls with parenthesized arguments 247s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 247s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 247s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 247s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 247s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 247s registers and corrects an offense with ternary operator for unless/then/else/end 247s does not register an offense for if/then/end 247s does not register an offense for unless/then/else/end with empty else 247s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 247s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 247s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 247s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 247s registers and corrects an offense with ternary operator for if/then/else/end when `then` without body 247s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 247s registers and corrects an offense with ternary operator when one of the branches of if/then/else/end contains `next` keyword 247s registers and corrects an offense with ternary operator for if/then/else/end 247s behaves like if/then/else/end with constructs changing precedence 247s registers and corrects an offense with ternary operator and adding parentheses inside for if/then/else/end with `super b` constructs inside inner branches 247s behaves like if/then/else/end with constructs changing precedence 247s registers and corrects an offense with ternary operator and adding parentheses inside for if/then/else/end with `defined? :A` constructs inside inner branches 247s behaves like if/then/else/end with constructs changing precedence 247s registers and corrects an offense with ternary operator and adding parentheses inside for if/then/else/end with `puts 1` constructs inside inner branches 247s behaves like if/then/else/end with constructs changing precedence 247s registers and corrects an offense with ternary operator and adding parentheses inside for if/then/else/end with `a = b` constructs inside inner branches 247s behaves like if/then/else/end with keyword 247s registers and corrects an offense with ternary operator when one of the branches of if/then/else/end contains `break` keyword 247s behaves like if/then/else/end with constructs changing precedence 247s registers and corrects an offense with ternary operator and adding parentheses inside for if/then/else/end with `not a` constructs inside inner branches 247s behaves like if/then/else/end with constructs changing precedence 247s registers and corrects an offense with ternary operator and adding parentheses inside for if/then/else/end with `a and b` constructs inside inner branches 247s behaves like if/then/else/end with constructs changing precedence 247s registers and corrects an offense with ternary operator and adding parentheses inside for if/then/else/end with `a or b` constructs inside inner branches 247s behaves like if/then/else/end with constructs changing precedence 247s registers and corrects an offense with ternary operator and adding parentheses inside for if/then/else/end with `a ? b : c` constructs inside inner branches 247s behaves like if/then/else/end with keyword 247s registers and corrects an offense with ternary operator when one of the branches of if/then/else/end contains `self` keyword 247s behaves like if/then/else/end with keyword 247s registers and corrects an offense with ternary operator when one of the branches of if/then/else/end contains `raise` keyword 247s behaves like if/then/else/end with keyword 247s registers and corrects an offense with ternary operator when one of the branches of if/then/else/end contains `retry` keyword 247s behaves like if/then/else/end with constructs changing precedence 247s registers and corrects an offense with ternary operator and adding parentheses inside for if/then/else/end with `yield a` constructs inside inner branches 247s 247s RuboCop::Cop::Bundler::GemFilename 247s with default configuration (EnforcedStyle => `Gemfile`) 247s with gems.locked file path 247s registers an offense 247s with gems.rb file path 247s registers an offense 247s with Gemfile file path 247s does not register an offense 247s with Gemfile.lock file path 247s does not register an offense 247s with non-root Gemfile.lock file path 247s does not register an offense 247s with non-root Gemfile file path 247s does not register an offense 247s with non-root gems.locked file path 247s registers an offense 247s with non-root gems.rb file path 247s registers an offense 247s with EnforcedStyle set to `gems.rb` 247s with non-root gems.rb file path 247s does not register an offense 247s with non-root Gemfile.lock file path 247s registers an offense 247s with non-root gems.locked file path 247s does not register an offense 247s with Gemfile file path 247s registers an offense 247s with non-root Gemfile file path 247s registers an offense 247s with gems.rb file path 247s does not register an offense 247s with Gemfile.lock file path 247s registers an offense 247s 247s RuboCop::Cop::Style::RescueStandardError 247s implicit 247s accepts rescue modifier 247s when rescuing in a begin block 247s accepts rescuing a single error class other than StandardError, assigned to a variable 247s accepts rescuing no error class, assigned to a variable 247s accepts rescuing StandardError with other errors, assigned to a variable 247s accepts rescuing a single error class other than StandardError 247s accepts rescuing ::StandardError with other errors 247s accepts rescuing StandardError with other errors 247s accepts rescuing no error class 247s when rescuing StandardError by itself 247s registers an offense 247s when the error is assigned to a variable 247s registers an offense 247s with ::StandardError 247s registers an offense 247s with ::StandardError 247s registers an offense 247s when rescuing in a method definition 247s accepts rescuing StandardError with other errors, assigned to a variable 247s accepts rescuing a single error other than StandardError, assigned to a variable 247s accepts rescuing no error class, assigned to a variable 247s accepts rescuing no error class 247s accepts rescuing a single error other than StandardError 247s accepts rescuing StandardError with other errors 247s when rescuing StandardError by itself 247s registers an offense 247s when the error is assigned to a variable 247s registers an offense 247s explicit 247s accepts rescue modifier 247s when rescuing in a begin block 247s accepts rescuing a single error other than StandardError 247s accepts rescuing StandardError by itself 247s accepts rescuing StandardError with other errors, assigned to a variable 247s accepts rescuing StandardError with other errors 247s accepts rescuing a single error other than StandardErrorassigned to a variable 247s accepts rescuing StandardError by itself, assigned to a variable 247s when calling rescue without an error class 247s registers an offense 247s when the error is assigned to a variable 247s registers an offense 247s when rescuing in a method definition 247s accepts rescuing a single error other than StandardError, assigned to a variable 247s accepts rescuing a single error other than StandardError 247s accepts rescuing StandardError with other errors 247s accepts rescuing StandardError by itself, assigned to a variable 247s accepts rescuing StandardError with other errors, assigned to a variable 247s accepts rescuing StandardError by itself 247s when rescue is called without an error class 247s registers an offense 247s when the error is assigned to a variable 247s registers an offense 247s 247s RuboCop::Cop::Layout::SpaceAfterSemicolon 247s does not crash if semicolon is the last character of the file 247s registers an offense and corrects semicolon without space after it 247s inside block braces 247s when EnforcedStyle for SpaceInsideBlockBraces is space 247s registers an offense and corrects no space between a semicolon and a closing brace 247s behaves like common behavior 247s accepts a space between a semicolon and a closing brace 247s when EnforcedStyle for SpaceInsideBlockBraces is no_space 247s accepts no space between a semicolon and a closing brace 247s behaves like common behavior 247s accepts a space between a semicolon and a closing brace 247s 247s RuboCop::Cop::Metrics::MethodLength 247s accepts a method with multiline arguments and less than 5 lines of body 247s is not fooled by one-liner methods, syntax #1 247s does not count blank lines 247s accepts a method with less than 5 lines 247s does not count commented lines by default 247s is not fooled by one-liner methods, syntax #2 247s properly counts lines when method ends with block 247s accepts empty methods 247s when method is defined on a singleton class 247s registers an offense 247s when `CountAsOne` is not empty 247s folds array into one line 247s when CountComments is enabled 247s also counts commented lines 247s when using numbered parameter 247s when method is defined with `define_method` 247s registers an offense 247s when method is an instance method 247s registers an offense 247s when method is defined with `define_method` 247s registers an offense 247s when method is a class method 247s registers an offense 247s when methods to allow are defined 247s AllowedPatterns is enabled 247s accepts the user_name method 247s raises offense for firstname 247s AllowedMethods is enabled 247s still rejects other methods with more than 5 lines 247s accepts the foo method with more than 5 lines 247s 247s RuboCop::ConfigObsoletion::RenamedCop 247s #message 247s when the cop has changed names but in a new department 247s is expected to start with "The `Style/MyCop` cop has been renamed to `Layout/NewCop`" 247s when the cop has been moved to a new department 247s is expected to start with "The `Style/MyCop` cop has been moved to `Layout/MyCop`" 247s when the cop has changed names but in the same department 247s is expected to start with "The `Style/MyCop` cop has been renamed to `Style/NewCop`" 247s 247s RuboCop::Cop::Lint::UnexpectedBlockArity 247s registers multiple offenses 247s with a block 247s with optargs 247s with arity 1 247s registers an offense 247s with arity 2 247s does not register an offense 247s with keyword args 247s registers an offense 247s with a keyword splat 247s registers an offense 247s with no receiver 247s does not register an offense 247s when given no parameters 247s registers an offense 247s when given one parameter 247s registers an offense 247s when given a splat parameter 247s does not register an offense 247s with shadow args 247s registers an offense 247s when given three parameters 247s does not register an offense 247s when destructuring 247s with arity 1 247s registers an offense 247s with arity 2 247s does not register an offense 247s when given two parameters 248s does not register an offense 248s with a numblock 248s when using enough parameters, but not all explicitly 248s does not register an offense 248s when given no parameters 248s registers an offense 248s when given two parameters 248s does not register an offense 248s when given three parameters 248s does not register an offense 248s when given one parameter 248s registers an offense 248s with no receiver 248s does not register an offense 248s 248s RuboCop::Cop::InternalAffairs::RedundantContextConfigParameter 248s does not register an offense when using `:ruby30` only 248s does not register an offense when not using `:config` 248s registers an offense when using `:config` parameter 248s registers an offense when using `:config` parameter with other parameters 248s does not register an offense when using `:config` in other than `context` 248s 248s RuboCop::Cop::Naming::ClassAndModuleCamelCase 248s allows module_parent method 248s accepts CamelCase names 248s is not fooled by qualified names 248s registers an offense for underscore in class and module name 248s custom allowed names 248s does not register offense for multiple allowed names 248s 248s RuboCop::Cop::Lint::EmptyEnsure 248s does not register an offense for non-empty ensure 248s registers an offense and corrects empty ensure 248s 248s RuboCop::Cop::Lint::CircularArgumentReference 248s circular argument references in keyword arguments 248s when the keyword argument is not circular, but calls a method of some other object with the same name 248s does not register an offense 248s when the keyword argument is not circular, but calls a method of its own class with a self specification 248s does not register an offense 248s when there is one circular argument reference 248s registers an offense 248s when the keyword argument is not circular, and calls a method 248s does not register an offense 248s when there are multiple offensive keyword arguments 248s registers an offense 248s when the keyword argument is not circular 248s does not register an offense 248s circular argument references in ordinal arguments 248s when the method contains a circular argument reference 248s registers an offense 248s when the method does not contain a circular argument reference 248s does not register an offense 248s when the seemingly-circular default value is a method call 248s does not register an offense 248s 248s RuboCop::Cop::Lint::RequireRelativeSelfPath 248s does not register an offense when using `require_relative` without argument 248s does not register an offense when the filename is the same but the extension does not match 248s registers an offense when using `require_relative` with self file path argument (with ext) 248s registers an offense when using `require_relative` with self file path argument 248s does not register an offense when using `require_relative` without self file path argument 248s does not register an offense when using a variable as an argument of `require_relative` 248s 248s RuboCop::Cop::Lint::AmbiguousRange 248s for an irange 248s registers an offense and corrects when not parenthesized 248s does not register an offense if the range is composed of literals 248s does not register an offense for a constant 248s does not register an offense for `self` 248s registers an offense and corrects when the entire range is parenthesized but contains complex boundaries 248s does not register an offense if the range is parenthesized 248s can handle an endless range 248s can handle a beginningless range 248s does not register an offense for a variable 248s registers an offense and corrects when one side is parenthesized but the other is not 248s registers an offense and corrects when there are clauses on both sides 248s method calls 248s with RequireParenthesesForMethodChains: false 248s does not register an offense for a chained method call without parens 248s does not register an offense for a chained method call with parens 248s behaves like common behavior 248s does not register an offense for a unary + 248s does not register an offense for a non-chained method call 248s requires parens when calling a method on a basic literal 248s does not register an offense for a unary - 248s with RequireParenthesesForMethodChains: true 248s registers an offense for a chained method call without parens 248s does not register an offense for a chained method call with parens 248s behaves like common behavior 248s does not register an offense for a unary - 248s requires parens when calling a method on a basic literal 248s does not register an offense for a non-chained method call 248s does not register an offense for a unary + 248s for an erange 248s registers an offense and corrects when the entire range is parenthesized but contains complex boundaries 248s does not register an offense for a variable 248s registers an offense and corrects when one side is parenthesized but the other is not 248s does not register an offense for a constant 248s can handle an endless range 248s can handle a beginningless range 248s registers an offense and corrects when not parenthesized 248s does not register an offense if the range is composed of literals 248s registers an offense and corrects when there are clauses on both sides 248s does not register an offense for `self` 248s does not register an offense if the range is parenthesized 248s method calls 248s with RequireParenthesesForMethodChains: false 248s does not register an offense for a chained method call with parens 248s does not register an offense for a chained method call without parens 248s behaves like common behavior 248s does not register an offense for a unary + 248s does not register an offense for a unary - 248s does not register an offense for a non-chained method call 248s requires parens when calling a method on a basic literal 248s with RequireParenthesesForMethodChains: true 248s does not register an offense for a chained method call with parens 248s registers an offense for a chained method call without parens 248s behaves like common behavior 248s does not register an offense for a unary - 248s does not register an offense for a unary + 248s does not register an offense for a non-chained method call 248s requires parens when calling a method on a basic literal 248s 248s RuboCop::Cop::Layout::LineEndStringConcatenationIndentation 248s when EnforcedStyle is aligned 248s accepts indented strings in implicit return statement of a singleton method definition 248s accepts a heredoc string with interpolation 248s accepts indented strings in implicit return statement of a method definition 248s accepts indented strings in implicit return statement of a block 248s registers an offense for indented string 248s accepts single line string literal concatenation 248s accepts an empty heredoc string with interpolation 248s accepts string literal with line break concatenated with other string 248s registers an offense for unaligned strings in hash literal values 248s registers an offense for third part of a string if it is aligned only with the first 248s accepts indented strings in ordinary statement 248s registers an offense for aligned strings in an if/elsif/else statement 248s accepts a heredoc string ... 248s accepts aligned strings in method call 248s accepts a multiline string literal 248s accepts indented strings in implicit return statement of a method definition after other statement 248s for assignment with x = 248s accepts aligned strings 248s registers an offense for indented strings 248s for assignment with @x = 248s accepts aligned strings 248s registers an offense for indented strings 248s for assignment with $x = 248s accepts aligned strings 248s registers an offense for indented strings 248s for assignment with x ||= 248s accepts aligned strings 248s registers an offense for indented strings 248s for assignment with X = 248s accepts aligned strings 248s registers an offense for indented strings 248s for assignment with x += 248s registers an offense for indented strings 248s accepts aligned strings 248s when EnforcedStyle is indented 248s registers an offense for aligned string 248s accepts indented strings in implicit return statement of a method definition after other statement 248s accepts string literal with line break concatenated with other string 248s accepts single line string literal concatenation 248s accepts a multiline string literal 248s accepts indented strings in implicit return statement of a singleton method definition 248s accepts a heredoc string with interpolation 248s accepts indented strings in ordinary statement 248s accepts a heredoc string ... 248s accepts an empty heredoc string with interpolation 248s accepts indented strings in implicit return statement of a block 248s registers an offense for aligned strings in hash literal values 248s registers an offense for unaligned third part of string 248s accepts indented strings 248s registers an offense for aligned strings in an if/elsif/else statement 248s accepts indented strings in implicit return statement of a method definition 248s for assignment with x += 248s accepts indented strings 248s registers an offense for aligned strings 248s for assignment with X = 248s registers an offense for aligned strings 248s accepts indented strings 248s when IndentationWidth is 1 248s accepts indented strings 248s for assignment with $x = 248s registers an offense for aligned strings 248s accepts indented strings 248s for assignment with x ||= 248s accepts indented strings 248s registers an offense for aligned strings 248s for assignment with @x = 248s accepts indented strings 248s registers an offense for aligned strings 248s for assignment with x = 248s registers an offense for aligned strings 248s accepts indented strings 248s 248s RuboCop::Cop::Style::RedundantSort 248s registers an offense when [](-1) is called on sort_by 248s registers an offense when last is called on sort_by no block 248s does not register an offense when sort_by is used without first 248s registers an offense when slice(0) is called on sort 248s does not register an offense when first is used without sort_by 248s does not register an offense when first is used before sort 248s registers an offense when last is called on sort_by 248s registers an offense when [](0) is called on sort 248s registers an offense when slice(0) is called on sort_by 248s registers an offense when last is called with sort 248s does not register an offense when sort_by is not given a block 248s registers an offense when first is called on sort_by 248s registers an offense when last is called on sort with comparator 248s registers an offense when first is called on sort_by with line breaks 248s registers an offense when at(-1) is called with sort 248s registers an offense when [-1] is called on sort 248s registers an offense when first is called with sort 248s does not register an offense when first has an argument 248s does not register an offense for sort!.first 248s registers an offense when [0] is called on sort_by 248s registers an offense when [0] is called on sort 248s registers an offense when first is called on sort_by with line breaks and `&&` operator 248s registers an offense when first is called on sort_by with line breaks and `and` operator 248s registers an offense when first is called on sort_by with line breaks and `||` operator 248s registers an offense when [-1] is called on sort_by 248s registers an offense when slice(-1) is called on sort_by 248s does not register an offense when sort has an argument 248s registers an offense when first is called on sort_by with line breaks and `or` operator 248s does not register an offense for sort_by!(&:something).last 248s registers an offense when at(0) is called on sort_by 248s registers an offense when first is called on sort_by no block 248s registers an offense with `sort_by { a || b }` 248s when not taking first or last element 248s does not register an offense when at(-2) is called on sort_by 248s does not register an offense when [-1] is called on sort with an argument 248s does not register an offense when [1] is called on sort 248s >= Ruby 2.7 248s when using numbered parameter 248s registers an offense and corrects when at(0) is called on sort_by 248s registers an offense and corrects when last is called on sort with comparator 248s registers an offense and corrects when first is called on sort_by 248s 248s RuboCop::Cop::Lint::TripleQuotes 248s does not register an offense for implicit concatenation 248s string interpolation 248s does not register an offense 248s with nested extra quotes 248s registers an offense and corrects 248s heredocs 248s does not register an offense 248s triple quotes 248s on one line 248s registers an offense and corrects 248s when only quotes 248s registers an offense and corrects to a single empty quote 248s on multiple lines 248s registers an offense and corrects 248s with only whitespace 248s does not register 248s quintuple quotes 248s registers an offense and corrects 248s 248s RuboCop::Cop::Style::OptionalArguments 248s allows methods with only one required argument 248s allows methods with only required arguments 248s allows methods with only optional arguments 248s registers an offense for each optional argument when multiple optional arguments are followed by a required argument 248s allows methods with multiple optional arguments at the end 248s allows methods without arguments 248s registers an offense when an optional argument is followed by a required argument 248s allows methods with only one optional argument 248s named params 248s required params 248s registers an offense for optional arguments that come before required arguments where there are name arguments 248s allows optional arguments to come before a mix of required and optional named argument 248s allows optional arguments before required named arguments 248s with default values 248s allows optional arguments before an optional named argument 248s 248s RuboCop::Cop::Style::ClassMethods 248s does not register an offense outside class/module bodies 248s does not register an offense for methods using self 248s registers an offense for methods using a module name 248s does not register an offense for other top-level singleton methods 248s registers an offense for methods using a class name 248s 248s RuboCop::Cop::Naming::BlockParameterName 248s registers offense when param is less than minimum length 248s does not register for brace block without parameters 248s does not register for block without parameters 248s registers offense when param ends in number 248s does not register offense for valid parameter names 248s registers offense when param contains uppercase characters 248s can register multiple offenses in one block 248s registers offense when param with prefix is less than minimum length 248s with ForbiddenNames 248s accepts param that uses a forbidden name's letters 248s registers offense for param listed as forbidden 248s with AllowNamesEndingInNumbers 248s accept params that end in numbers 248s with AllowedNames 248s registers unlisted offensive names 248s accepts specified block param names 248s 248s RuboCop::Formatter::ClangStyleFormatter 248s #report_file 248s displays text containing the offending source line 248s when the source line is blank 248s does not display offending source line 248s when the source contains multibyte characters 248s displays text containing the offending source line 248s when the offense is automatically corrected 248s prints [Corrected] along with message 248s when the offense is correctable 248s prints message as-is 248s when the offense is not corrected 248s prints message as-is 248s when the offending source spans multiple lines 248s displays the first line with ellipses 248s 248s RuboCop::Cop::Style::Strip 248s registers an offense for str.lstrip.rstrip 248s registers an offense for str.rstrip.lstrip 248s 248s RuboCop::Formatter::QuietFormatter 248s #report_summary 248s when 2 offenses are corrected 248s handles pluralization correctly 248s when 2 offenses detected and 2 offenses correctable 248s handles pluralization correctly 248s when 2 offenses detected 248s handles pluralization correctly 248s when a file inspected and no offenses detected 248s handles pluralization correctly 248s when a offense detected 248s handles pluralization correctly 248s when no files inspected 248s handles pluralization correctly 248s when 2 offenses are corrected and 2 offenses correctable 248s handles pluralization correctly 248s when an offense is corrected 248s prints about correction 248s when a offense detected and a offense correctable 248s handles pluralization correctly 248s #report_file 248s when the offense is automatically corrected 248s prints [Corrected] along with message 248s when the offense is not corrected 248s prints message as-is 248s the file is under the current working directory 248s prints as relative path 248s when the offense is correctable 248s prints message as-is 248s the file is outside of the current working directory 248s prints as absolute path 248s 248s RuboCop::Cop::Layout::SpaceAroundEqualsInParameterDefault 248s when EnforcedStyle is no_space 248s registers an offense and corrects default value assignment with space 248s registers an offense and corrects assignment of empty list with space 248s registers an offense and corrects assignment of empty string with space 248s accepts default value assignment without space 248s when EnforcedStyle is space 248s accepts default value assignment with spaces and unary + operator 248s accepts default value assignment with space 248s registers an offense and corrects default value assignment without space 248s registers an offense and corrects default value assignment where first is partially right without space 248s registers an offense and corrects assigning empty string without space 248s registers an offense and corrects missing space for arguments with unary operators 248s registers an offense and corrects assignment of empty list without space 248s 248s RuboCop::Formatter::AutoGenConfigFormatter 248s #report_file_as_mark 248s when a refactor severity offense is detected 248s prints "R" 248s when no offenses are detected 248s prints "." 248s when different severity offenses are detected 248s prints highest level mark 248s when a refactor convention offense is detected 248s prints "C" 248s #finished 248s calls #report_summary 248s when no offenses are detected 248s does not report offenses 248s when any offenses are detected 248s outputs report summary 248s does not report offenses 248s 248s RuboCop::Cop::Lint::BooleanSymbol 248s registers an offense when using `:true` 248s does not register an offense when using `true` 248s does not register an offense when using regular symbol 248s does not register an offense when using `false` 248s does not register an offense when used inside percent-literal symbol array 248s registers an offense when using `:false` 248s when using the new hash syntax 248s registers an offense when using `false:` 248s registers an offense when using `key: :false` 248s registers an offense when using `true:` 248s 248s RuboCop::Cop::Style::FloatDivision 248s EnforcedStyle is right_coerce 248s registers offense and corrects for left coerce with calculations 248s registers offense and corrects for both coerce 248s does not register offense for right coerce 248s registers offense and corrects for left coerce 248s EnforcedStyle is fdiv 248s registers offense and corrects for left coerce 248s registers offense and corrects for both coerce 248s does not register offense on usage of fdiv 248s registers offense and corrects for left coerce with calculations 248s registers offense and corrects for right coerce 248s EnforcedStyle is single_coerce 248s does not register offense for right coerce only 248s registers offense and corrects for left coerce with calculations 248s does not register offense for left coerce only 248s registers offense and corrects for both coerce 248s EnforcedStyle is left_coerce 248s registers offense and corrects for both coerce 248s does not register offense for left coerce 248s registers offense and corrects for right coerce with calculations 248s registers offense and corrects for right coerce 248s 248s RuboCop::Cop::Lint::EnsureReturn 248s registers an offense when returning multiple values in `ensure` 248s does not check when ensure block has no body 248s registers an offense and corrects for return in ensure 248s registers an offense and corrects for return with argument in ensure 248s does not register an offense for return outside ensure 248s 248s RuboCop::Cop::Metrics::ClassLength 248s rejects a class with more than 5 lines 248s accepts empty classes 248s accepts a class with less than 5 lines 248s reports the correct beginning and end lines 248s does not count blank lines 248s accepts a class with 5 lines 248s when `CountAsOne` is not empty 248s folds array into one line 248s when a class has inner classes 248s does not count lines of inner classes 248s rejects a class with 6 lines that belong to the class directly 248s when overlapping constant assignments 248s does not register an offense 248s when inspecting a class defined with ::Class.new 248s registers an offense 248s when using numbered parameter 248s when inspecting a class defined with ::Class.new 248s registers an offense 248s when inspecting a class defined with Class.new 248s registers an offense 248s when inspecting a class defined with Struct.new 248s registers an offense when multiple assignments to constants 248s registers an offense 248s registers an offense when inspecting or equals (`||=`) for constant 248s when CountComments is enabled 248s registers an offense for a class that only contains comments 248s also counts commented lines 248s when inspecting a class defined with Struct.new 248s registers an offense when inspecting or equals (`||=`) for constant 248s registers an offense when multiple assignments to constants 248s registers an offense 248s when inspecting a class defined with Class.new 248s registers an offense 248s when CountComments is disabled 248s accepts classes that only contain comments 248s 248s RuboCop::Cop::Style::EmptyCaseCondition 248s given a case statement with an empty case 248s when using `when ... then` in `case` in a method call 248s behaves like detect/correct empty case, accept non-empty case 248s accepts the source with case 248s registers an offense and autocorrects 248s when using `when ... then` in `case` in `return` 248s behaves like detect/correct empty case, accept non-empty case 248s accepts the source with case 248s registers an offense and autocorrects 248s when used as an argument of a method with comment 248s behaves like detect/correct empty case, accept non-empty case 248s accepts the source with case 248s registers an offense and autocorrects 248s with multiple when branches and an `else` with code comments 248s behaves like detect/correct empty case, accept non-empty case 248s registers an offense and autocorrects 248s accepts the source with case 248s with a when branch including comma-delimited alternatives 248s behaves like detect/correct empty case, accept non-empty case 248s registers an offense and autocorrects 248s accepts the source with case 248s when using `return ... if` in `else` clause and assigning the return value of `case` 248s does not register an offense 248s when using `return` in `when` clause and assigning the return value of `case` 248s does not register an offense 248s with when branches using then 248s behaves like detect/correct empty case, accept non-empty case 248s registers an offense and autocorrects 248s accepts the source with case 248s when using `return ... if` in `when` clause and assigning the return value of `case` 248s does not register an offense 248s when using `return` in `else` clause and assigning the return value of `case` 248s does not register an offense 248s with multiple when branches and an else 248s behaves like detect/correct empty case, accept non-empty case 248s registers an offense and autocorrects 248s accepts the source with case 248s with a single when branch and an else 248s behaves like detect/correct empty case, accept non-empty case 248s accepts the source with case 249s registers an offense and autocorrects 249s when used as an argument of a method without comment 249s behaves like detect/correct empty case, accept non-empty case 249s registers an offense and autocorrects 249s accepts the source with case 249s with first when branch including comma-delimited alternatives 249s behaves like detect/correct empty case, accept non-empty case 249s registers an offense and autocorrects 249s accepts the source with case 249s with multiple when branches and no else 249s behaves like detect/correct empty case, accept non-empty case 249s registers an offense and autocorrects 249s accepts the source with case 249s with a single when branch and no else 249s behaves like detect/correct empty case, accept non-empty case 249s accepts the source with case 249s registers an offense and autocorrects 249s 249s RuboCop::Cop::Layout::EmptyLinesAroundBlockBody 249s when EnforcedStyle is no_empty_lines for do end block 249s registers an offense for block body ending with a blank 249s registers an offense for block body starting with a blank passed to a multi-line method call 249s is not fooled by single line blocks 249s accepts block body starting with a line with spaces 249s registers an offense for block body starting with a blank 249s Ruby 2.7 249s registers an offense for block body ending with a blank 249s when EnforcedStyle is empty_lines for { } block 249s registers an offense for block body not starting or ending with a blank 249s is not fooled by single line blocks 249s ignores block with an empty body 249s when EnforcedStyle is empty_lines for do end block 249s ignores block with an empty body 249s registers an offense for block body not starting or ending with a blank 249s is not fooled by single line blocks 249s when EnforcedStyle is no_empty_lines for { } block 249s registers an offense for block body starting with a blank passed to a multi-line method call 249s accepts block body starting with a line with spaces 249s is not fooled by single line blocks 249s registers an offense for block body starting with a blank 249s registers an offense for block body ending with a blank 249s Ruby 2.7 249s registers an offense for block body ending with a blank 249s 249s RuboCop::Cop::Style::ArgumentsForwarding 249s TargetRubyVersion >= 3.1 249s registers an offense when using restarg and anonymous block arg 249s registers an offense when using restarg, kwargs, and anonymous block arg 249s TargetRubyVersion <= 2.6 249s does not register an offense when using restarg with block arg 249s TargetRubyVersion >= 2.7 249s does not register an offense when different arguments are used 249s does not register an offense when the block arg is overwritten 249s does not register an offense when assigning the restarg outside forwarding method arguments 249s registers an offense when delegating 249s registers an offense when using restarg, kwargs and block arg 249s does not register an offense when referencing the restarg outside forwarding method arguments 249s registers an offense when using restarg and block arg 249s registers an offense when forwarding to a method in block 249s registers an offense when passing restarg and block arg in defs 249s does not register an offense when different argument names are used 249s does not register an offense when the restarg is overwritten 249s does not register an offense when using the restarg outside forwarding method arguments 249s registers an offense when the parentheses of arguments are omitted 249s does not register an offense when the kwarg is overwritten 249s does not register an offense when body of method definition is empty 249s does not register an offense when using arguments forwarding 249s AllowOnlyRestArgument: false 249s registers an offense when using only rest arg 249s registers an offense when using only kwrest arg 249s AllowOnlyRestArgument: true 249s does not register an offense when using only kwrest arg 249s does not register an offense when using only rest arg 249s 249s RuboCop::Cop::Style::MultilineIfThen 249s does not get confused by a nested postfix unless 249s registers an offense for then in multiline unless 249s does not raise an error for an implicit match if 249s does not get confused by a postfix unless 249s does not get confused by empty elsif branch 249s does not raise an error for an implicit match unless 249s registers an offense for then in multiline elsif 249s accepts table style if/then/elsif/ends 249s registers an offense for then in multiline if 249s does not get confused by a then in a when 249s does not get confused by a commented-out then 249s 249s RuboCop::Cop::Layout::SpaceAfterNot 249s accepts no space after ! 249s accepts space after not keyword 249s registers an offense and corrects space after ! with the negated receiver wrapped in parentheses 249s registers an offense and corrects multiple spaces after ! 249s registers an offense and corrects a single space after ! 249s 249s RuboCop::Cop::Layout::IndentationWidth 249s with Width set to 2 249s with block 249s registers an offense for bad indentation of a do/end body 249s does not register an offense for good indentation of `do` ... `ensure` ... `end` block 249s registers an offense for bad indentation of a {} body 249s registers an offense for bad indentation of `do` ... `ensure` ... `end` block 249s accepts badly indented code if block end is not on separate line 249s accepts a correctly indented block body 249s accepts an empty block body 249s Ruby 2.7 249s registers an offense for bad indentation of a do-end body 249s registers an offense for bad indentation of a {} body 249s when consistency style is indented_internal_methods 249s registers an offense for bad indentation in a do/end body 249s when using safe navigation operator 249s registers an offense for bad indentation of a {} body 249s registers an offense for an if with setter 249s with while/until 249s registers an offense for bad indentation of begin/end/while 249s registers an offense for bad indentation of a while body 249s registers an offense for bad indentation of an until body 249s accepts an empty while 249s with case 249s accepts indented when/else plus indented body 249s registers an offense for bad indentation in a case/when body 249s accepts aligned values in when clause 249s accepts correctly indented case/when/else 249s accepts case/when/else laid out as a table 249s accepts case/when/else with then beginning a line 249s registers an offense for bad indentation in a case/else body 249s with case match 249s accepts aligned value in `in` clause and `else` is empty 249s registers an offense for bad indentation in a case/in body 249s accepts aligned values in `in` clause 249s accepts case/in/else laid out as a table 249s accepts case/in/else with then beginning a line 249s accepts correctly indented case/in/else 249s registers an offense for bad indentation in a case/else body 249s accepts indented in/else plus indented body 249s with begin/rescue/else/ensure/end 249s registers an offense for bad indentation of bodies 249s with unless 249s registers an offense for bad indentation of an unless body 249s accepts an empty unless 249s with def/rescue/end 249s registers an offense for bad indentation of bodies 249s registers an offense for bad indent of defs bodies with a modifier 249s with for 249s registers an offense for bad indentation of a for body 249s accepts an empty for 249s with module 249s leaves body unchanged if the first body line is on the same line with module keyword 249s when consistency style is indented_internal_methods 249s registers an offense for bad indentation of a module body 249s accepts normal non-indented internal methods of module functions 249s when consistency style is normal 249s accepts an empty module body 249s registers an offense for bad indentation of a module body 249s with def/defs 249s when end is aligned with def 249s registers an offense for bad indentation of a def body 249s accepts an empty defs body 249s accepts an empty def body 249s with an assignment 249s registers an offense for bad indentation of a defs body 249s when modifier and def are on the same line 249s registers an offense for bad indentation of a defs body 249s registers an offense for bad indentation of a def body 249s accepts a correctly aligned body 249s when end is aligned with start of line 249s accepts an empty def body 249s registers an offense for bad indentation of a def body 249s registers an offense for bad indentation of a defs body 249s with an assignment 249s accepts an empty defs body 249s when multiple modifiers and def are on the same line 249s accepts a correctly aligned body 249s registers an offense for bad indentation of a defs body 249s registers an offense for bad indentation of a def body 249s when multiple modifiers are used in a block anda method call is made at end of the block 249s accepts a correctly aligned body 249s registers an offense for bad indentation of a def 249s registers an offense for bad indentation of a def body 249s when modifier and def are on the same line 249s registers an offense for bad indentation of a def body 249s registers an offense for bad indentation of a defs body 249s accepts a correctly aligned body 249s with class 249s accepts an empty class body 249s leaves body unchanged if the first body line is on the same line with an opening of singleton class 249s registers an offense for bad indentation of a class body 249s leaves body unchanged if the first body line is on the same line with class keyword 249s when consistency style is normal 249s accepts indented public, protected, and private 249s registers offenses for indented_internal_methods indentation 249s when consistency style is indented_internal_methods 249s registers an offense for normal non-indented internal methods indentation 249s registers an offense for normal non-indented internal methods indentation when defined in a singleton class 249s when consistency style is outdent 249s accepts access modifier is outdent 249s with access modifier 249s registers an offense for bad indentation of sections 249s registers an offense and corrects for bad modifier indentation before good method definition 249s with if statement 249s registers an offense for bad indentation of an else body when if body contains no code 249s registers and corrects on offense for bad indentation 249s accepts `rescue`/`ensure` after an empty body 249s registers an offense for bad indentation of an if body 249s accepts an if/else branches with rescue clauses 249s leaves block unchanged if block end is not on its own line 249s registers an offense for bad indentation of an else body when if and elsif body contains no code 249s accepts if/elsif/else/end laid out as a table 249s accepts a one line if statement 249s does not raise any error with empty braces 249s indents parenthesized expressions 249s accepts indentation after if on new line after assignment 249s accepts `ensure` after an empty def 249s registers offense for bad indentation of modifier if in else 249s registers an offense for bad indentation of an else body 249s registers offense for bad indentation of ternary inside else 249s accepts `rescue` after an empty def 249s accepts an empty if 249s does not indent heredoc strings 249s accepts `ensure` after an empty body 249s accepts `rescue`/`ensure` after an empty def 249s leaves rescue ; end unchanged 249s handles lines with only whitespace 249s accepts a correctly aligned if/elsif/else/end 249s accepts `rescue` after an empty body 249s accepts if/then/else/end laid out as another table 249s registers an offense for bad indentation of an elsif body 249s does not correct in scopes that contain block comments 249s accepts a correctly aligned if/elsif/else/end as a method argument 249s with assignment 249s when alignment style is variable 249s and end is aligned with variable 249s accepts an if/else 249s accepts an if/else with chaining after the end 249s accepts an if/else with chaining with a block after the end 249s accepts an if with end aligned with setter 249s accepts an if with end aligned with element assignment 249s accepts an if with end aligned with variable 249s and end is aligned with keyword 249s registers an offense for a while 249s registers an offense for an if with setter 249s registers an offense for an if 249s registers an offense for an until 249s registers an offense for an if with element assignment 249s accepts an if/else in assignment on next line 249s and end is aligned randomly 249s registers an offense for an until 249s registers an offense for a while 249s registers an offense for an if 249s when alignment style is start_of_line 249s and end is aligned with keyword 249s registers an offense for a while 249s registers an offense for an if with setter 249s registers an offense for an if with element assignment 249s registers an offense for an if 249s accepts an if/else in assignment on next line 249s registers an offense for an until 249s and end is aligned randomly 249s registers an offense for a while 249s registers an offense for an until 249s registers an offense for an if 249s and end is aligned with variable 249s accepts an if/else with chaining with a block after the end 249s accepts an if with end aligned with setter 249s accepts an if with end aligned with variable 249s accepts an if with end aligned with element assignment 249s accepts an if/else with chaining after the end 249s accepts an if/else 249s when alignment style is keyword 249s and end is aligned with keyword 249s accepts an if/else in assignment 249s accepts an if in assignment 249s accepts an until in assignment 249s accepts a while in assignment 249s accepts an if/else in assignment on next line 249s and end is aligned with variable 249s registers and corrects bad indentation 249s registers an offense for a while 249s registers an offense for an if 249s with Width set to 4 249s registers and corrects offense for bad indentation 249s with if statement 249s registers an offense for bad indentation of an if body 249s with ignored patterns set 249s accepts unindented lines for those keywords 249s for a file with byte order mark 249s accepts correctly indented method definition 249s 249s RuboCop::Cop::Lint::StructNewOverride 249s registers an offense using `Struct.new(...)` with a block 249s does not register an offense with no overrides 249s registers an offense using `Struct.new(symbol)` 249s registers an offense using `Struct.new(symbol, string)` 249s registers an offense using `Struct.new(...symbols)` 249s registers an offense using `Struct.new(...)` with multiple overrides 249s registers an offense using `Struct.new(...)` with an option argument 249s registers an offense using `::Struct.new(symbol)` 249s registers an offense using `Struct.new(string, ...symbols)` 249s does not register an offense with an override within a given block 249s 249s RuboCop::Formatter::OffenseCountFormatter 249s #finished 249s when output tty is true 249s has a progress bar 249s when there are many offenses 249s when --display-style-guide was given 249s shows links and sorts by offense count first and then by cop name 249s when --display-style-guide was not given 249s sorts by offense count first and then by cop name 249s #report_summary 249s when an offense is detected 249s shows the cop and the offense count 249s #file_finished 249s when no offenses are detected 249s does not add to offense_counts 249s when any offenses are detected 249s increments the count for the cop in offense_counts 249s 249s RuboCop::Cop::Style::EachWithObject 249s ignores inject and reduce passed in symbol 249s ignores inject and reduce with empty body 249s ignores inject and reduce with passed in, but not returned hash 249s correctly autocorrects 249s does not blow up for reduce with no arguments 249s correctly autocorrects with return value only 249s ignores inject/reduce with assignment to accumulator param in block 249s ignores inject and reduce with condition as body 249s finds inject and reduce with passed in and returned hash 249s when a simple literal is passed as initial value 249s ignores inject/reduce 249s Ruby 2.7 249s finds inject and reduce with passed in and returned hash and numblock 249s 249s RuboCop::Cop::Metrics::BlockLength 249s accepts a block with multiline receiver and less than 3 lines of body 249s rejects brace blocks too 249s accepts a block with less than 3 lines 249s rejects a block with more than 5 lines 249s does not count blank lines 249s accepts empty blocks 249s does not count commented lines by default 249s reports the correct beginning and end lines 249s properly counts nested blocks 249s when `CountAsOne` is not empty 249s folds array into one line 249s when CountComments is enabled 249s also counts commented lines 249s when defining a Struct 249s does not register an offense 249s when using numbered parameter 249s rejects a block with more than 5 lines 249s does not count blank lines 249s accepts a block with less than 3 lines 249s reports the correct beginning and end lines 249s when methods to allow are defined 249s when IgnoredMethods is enabled 249s when string 249s does not report an offense 249s that does not match 249s reports an offense 249s when regex 249s does not report an offense 249s that does not match 249s reports an offense 249s when ExcludedMethods is enabled 249s does not report an offense 249s that does not match 249s reports an offense 249s when AllowedPatterns is enabled 249s does not report an offense 249s that does not match 249s reports an offense 249s when AllowedMethods is enabled 249s when a method is allowed, but receiver is a module 249s does not report an offense 249s behaves like allow an offense on an allowed method 249s accepts the foo method with a long block 249s still rejects other methods with long blocks 249s when receiver contains whitespaces 249s allows whitespaces 249s behaves like allow an offense on an allowed method 249s accepts the foo method with a long block 249s still rejects other methods with long blocks 249s when defining a class 249s does not register an offense 249s when defining a module 249s does not register an offense 249s 249s RuboCop::Cop::Style::Dir 249s when using `#dirname` and `#realpath` 249s registers an offense 249s registers an offense with ::File 249s when using `#expand_path` and `#dirname` 249s registers an offense 249s registers an offense with ::File 249s 249s RuboCop::Cop::Lint::NumberedParameterAssignment 249s registers an offense when using `_10` lvar 249s registers an offense when using `_0` lvar 249s does not register an offense when index assignment 249s does not register an offense when using non numbered parameter 249s when Ruby 2.7 or lower 249s registers an offense when using `_7` numbered parameter 249s registers an offense when using `_3` numbered parameter 249s registers an offense when using `_8` numbered parameter 249s registers an offense when using `_2` numbered parameter 249s registers an offense when using `_4` numbered parameter 249s registers an offense when using `_1` numbered parameter 249s registers an offense when using `_9` numbered parameter 249s registers an offense when using `_6` numbered parameter 249s registers an offense when using `_5` numbered parameter 249s 249s RuboCop::Cop::Style::Semicolon 249s accept semicolons inside strings 249s accepts one line empty method definitions 249s registers an offense for several expressions 249s accepts one line empty module definitions 249s registers an offense for range (`1..42`) with semicolon 249s registers an offense for semicolon at the end no matter what 249s registers an offense for range (`1...42`) with semicolon 249s accepts semicolon after params if so configured 249s registers an offense for a semicolon at the beginning of a line 249s accepts semicolon before end if so configured 249s registers an offense for one line method with two statements 249s accepts one line empty class definitions 249s accepts one line method definitions 249s registers an offense for a single expression 249s when AllowAsExpressionSeparator is true 249s accepts one line method with two statements 250s accepts several expressions 250s Ruby >= 2.6 250s registers an offense for endless range with semicolon (irange and erange) 250s registers an offense for endless range with semicolon (irange only) 250s registers an offense for endless range with semicolon in the method definition 250s does not register an offense for endless range without semicolon 250s with a multi-expression line without a semicolon 250s does not register an offense 250s 250s RuboCop::Cop::InternalAffairs::RedundantMessageArgument 250s does not register an offense when formatted `MSG` is passed 250s does not register an offense when `#message` with another node is passed 250s when `MSG` is passed 250s registers an offense 250s when `#message` is passed 250s registers an offense 250s when `#message` with offending node is passed 250s when message is the only keyword argument 250s registers an offense 250s when there are others keyword arguments 250s registers an offense 250s 250s RuboCop::ResultCache 250s #save 250s when the @path is not writable 250s behaves like invalid cache location 250s doesn't raise an exception 250s behaves like invalid cache location 250s doesn't raise an exception 250s when the default internal encoding is UTF-8 250s writes non UTF-8 encodable data to file with no exception 250s the cache path 250s when CacheRootDirectory not set 250s and XDG_CACHE_HOME is not set 250s contains $HOME/.cache 250s and XDG_CACHE_HOME is set 250s contains the given path and UID 250s when CacheRootDirectory is set 250s contains the given root 250s and RUBOCOP_CACHE_ROOT is set 250s contains the root from RUBOCOP_CACHE_ROOT 250s .cleanup 250s removes the oldest files in the cache if needed 250s cached result that was saved with no command line option 250s when --display-cop-names is given 250s is invalid 250s when --only is given 250s is invalid 250s when a cache source is read 250s has utf8 encoding 250s when no option is given 250s is valid and can be loaded 250s when file contents have changed 250s is invalid 250s when end of line characters have changed 250s is invalid 250s when team external_dependency_checksum changes 250s is invalid 250s when a symlink is present in the cache location 250s and symlink attack protection is disabled 250s permits caching and prints no warning 250s and symlink attack protection is enabled 250s prevents caching and prints a warning 250s when file permission have changed 250s is invalid 250s when team external_dependency_checksum is the same 250s is valid 250s when --format is given 250s is valid and can be loaded 250s when --cache-root is given 250s takes the cache_root from the options 250s when offenses are saved 250s an offense with status corrected 250s serializes them with uncorrected status 250s an offense with status uncorrected 250s serializes them with uncorrected status 250s an offense with status corrected_with_todo 250s serializes them with uncorrected status 250s an offense with status new_status 250s serializes them with new_status status 250s an offense with status unsupported 250s serializes them with unsupported status 250s 250s RuboCop::Cop::Style::MutableConstant 250s Strict: false 250s allows method call assignments 250s behaves like mutable objects 250s when assigning with = 250s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 250s when assigning with ||= 250s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 250s when assigning an array without brackets 250s adds brackets when autocorrecting 250s does not insert brackets for %w() arrays 250s splat expansion 250s expansion of a range 250s registers an offense and corrects to use to_a.freeze 250s with parentheses 250s registers an offense and corrects to use to_a.freeze 250s Ruby 3.0 or higher 250s raises offense only for shareable_constant_value as none when set in the order of: literal, none and experimental_everything 250s raises offense when shareable_constant_value is specified as an inline comment 250s when assigning a regexp 250s does not register an offense 250s when assigning a range (irange) 250s does not register an offense when without parenthesis 250s does not register an offense when with parenthesis 250s when using shareable_constant_value 250s behaves like literals that are frozen 250s behaves like immutable objects 250s allows [1, 2, 3] to be ||= to a constant 250s allows [1, 2, 3] to be assigned to a constant 250s behaves like immutable objects 250s allows 'str' to be ||= to a constant 250s allows 'str' to be assigned to a constant 250s behaves like immutable objects 250s allows %w(a b c) to be ||= to a constant 250s allows %w(a b c) to be assigned to a constant 250s behaves like immutable objects 250s allows { a: 1, b: 2 } to be assigned to a constant 250s allows { a: 1, b: 2 } to be ||= to a constant 250s behaves like immutable objects 250s allows ::ENV['foo'] to be assigned to a constant 250s allows ::ENV['foo'] to be ||= to a constant 250s behaves like immutable objects 250s allows 1 to be assigned to a constant 250s allows 1 to be ||= to a constant 250s behaves like immutable objects 250s allows 1.5 to be ||= to a constant 250s allows 1.5 to be assigned to a constant 250s behaves like immutable objects 250s allows ENV['foo'] to be ||= to a constant 250s allows ENV['foo'] to be assigned to a constant 250s behaves like immutable objects 250s allows "top#{1 + 2}" to be assigned to a constant 250s allows "top#{1 + 2}" to be ||= to a constant 250s behaves like immutable objects 250s allows 'foo' + 'bar' to be assigned to a constant 250s allows 'foo' + 'bar' to be ||= to a constant 250s behaves like immutable objects 250s allows :sym to be assigned to a constant 250s allows :sym to be ||= to a constant 250s behaves like immutable objects 250s allows FOO - BAR to be ||= to a constant 250s allows FOO - BAR to be assigned to a constant 250s behaves like immutable objects 250s allows FOO + BAR to be assigned to a constant 250s allows FOO + BAR to be ||= to a constant 250s behaves like literals that are frozen 250s behaves like immutable objects 250s allows 'str' to be assigned to a constant 250s allows 'str' to be ||= to a constant 250s behaves like immutable objects 250s allows FOO + BAR to be ||= to a constant 250s allows FOO + BAR to be assigned to a constant 250s behaves like immutable objects 250s allows ENV['foo'] to be assigned to a constant 250s allows ENV['foo'] to be ||= to a constant 250s behaves like immutable objects 250s allows FOO - BAR to be ||= to a constant 250s allows FOO - BAR to be assigned to a constant 250s behaves like immutable objects 250s allows 'foo' + 'bar' to be ||= to a constant 250s allows 'foo' + 'bar' to be assigned to a constant 250s behaves like immutable objects 250s allows %w(a b c) to be assigned to a constant 250s allows %w(a b c) to be ||= to a constant 250s behaves like immutable objects 250s allows 1 to be assigned to a constant 250s allows 1 to be ||= to a constant 250s behaves like immutable objects 250s allows [1, 2, 3] to be ||= to a constant 250s allows [1, 2, 3] to be assigned to a constant 250s behaves like immutable objects 250s allows { a: 1, b: 2 } to be assigned to a constant 250s allows { a: 1, b: 2 } to be ||= to a constant 250s behaves like immutable objects 250s allows ::ENV['foo'] to be assigned to a constant 250s allows ::ENV['foo'] to be ||= to a constant 250s behaves like immutable objects 250s allows 1.5 to be ||= to a constant 250s allows 1.5 to be assigned to a constant 250s behaves like immutable objects 250s allows :sym to be ||= to a constant 250s allows :sym to be assigned to a constant 250s behaves like immutable objects 250s allows "top#{1 + 2}" to be ||= to a constant 250s allows "top#{1 + 2}" to be assigned to a constant 250s behaves like literals that are not frozen 250s behaves like mutable objects 250s when assigning with = 250s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 250s when assigning with ||= 250s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 250s behaves like mutable objects 250s when assigning with ||= 250s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 250s when assigning with = 250s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 250s behaves like immutable objects 250s allows ::ENV['foo'] to be assigned to a constant 250s allows ::ENV['foo'] to be ||= to a constant 250s behaves like immutable objects 250s allows 'foo' + 'bar' to be assigned to a constant 250s allows 'foo' + 'bar' to be ||= to a constant 250s behaves like immutable objects 250s allows ENV['foo'] to be assigned to a constant 250s allows ENV['foo'] to be ||= to a constant 250s behaves like mutable objects 250s when assigning with = 250s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 250s when assigning with ||= 250s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 250s behaves like immutable objects 250s allows 1 to be ||= to a constant 250s allows 1 to be assigned to a constant 250s behaves like immutable objects 250s allows FOO + BAR to be ||= to a constant 250s allows FOO + BAR to be assigned to a constant 250s behaves like immutable objects 250s allows :sym to be assigned to a constant 250s allows :sym to be ||= to a constant 250s behaves like immutable objects 250s allows FOO - BAR to be ||= to a constant 250s allows FOO - BAR to be assigned to a constant 250s behaves like mutable objects 250s when assigning with = 250s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 250s when assigning with ||= 250s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 250s behaves like immutable objects 250s allows 1.5 to be assigned to a constant 250s allows 1.5 to be ||= to a constant 250s behaves like mutable objects 250s when assigning with = 250s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 250s when assigning with ||= 250s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 250s behaves like literals that are frozen 250s behaves like immutable objects 250s allows 1.5 to be assigned to a constant 250s allows 1.5 to be ||= to a constant 250s behaves like immutable objects 250s allows 'str' to be assigned to a constant 250s allows 'str' to be ||= to a constant 250s behaves like immutable objects 250s allows 1 to be ||= to a constant 250s allows 1 to be assigned to a constant 250s behaves like immutable objects 250s allows ENV['foo'] to be ||= to a constant 250s allows ENV['foo'] to be assigned to a constant 250s behaves like immutable objects 250s allows { a: 1, b: 2 } to be ||= to a constant 250s allows { a: 1, b: 2 } to be assigned to a constant 250s behaves like immutable objects 250s allows ::ENV['foo'] to be ||= to a constant 250s allows ::ENV['foo'] to be assigned to a constant 250s behaves like immutable objects 250s allows [1, 2, 3] to be ||= to a constant 250s allows [1, 2, 3] to be assigned to a constant 250s behaves like immutable objects 250s allows :sym to be ||= to a constant 250s allows :sym to be assigned to a constant 250s behaves like immutable objects 250s allows FOO + BAR to be ||= to a constant 250s allows FOO + BAR to be assigned to a constant 250s behaves like immutable objects 250s allows FOO - BAR to be ||= to a constant 250s allows FOO - BAR to be assigned to a constant 250s behaves like immutable objects 250s allows 'foo' + 'bar' to be assigned to a constant 250s allows 'foo' + 'bar' to be ||= to a constant 250s behaves like immutable objects 250s allows "top#{1 + 2}" to be ||= to a constant 250s allows "top#{1 + 2}" to be assigned to a constant 250s behaves like immutable objects 250s allows %w(a b c) to be assigned to a constant 250s allows %w(a b c) to be ||= to a constant 250s when assigning a range (erange) 250s does not register an offense when with parenthesis 250s does not register an offense when without parenthesis 250s behaves like string literal 250s Ruby 3.0 or higher 250s when the frozen string literal comment is true 250s does not register an offense when using a multiline string 250s registers an offense when using interpolated heredoc constant 250s registers an offense when using a multiline string with interpolation 250s behaves like immutable objects 250s allows <<~HERE 250s foo 250s bar 250s HERE 250s to be ||= to a constant 250s allows <<~HERE 250s foo 250s bar 250s HERE 250s to be assigned to a constant 250s behaves like mutable objects 250s when assigning with = 250s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 250s when assigning with ||= 250s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 250s when the frozen string literal comment is missing 250s behaves like mutable objects 250s when assigning with = 250s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 250s when assigning with ||= 250s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 250s when the frozen string literal comment is false 250s behaves like mutable objects 250s when assigning with = 250s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 250s when assigning with ||= 250s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 250s Ruby 2.7 or lower 250s when the frozen string literal comment is false 250s behaves like mutable objects 250s when assigning with = 250s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 250s when assigning with ||= 250s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 250s when the frozen string literal comment is missing 250s behaves like mutable objects 250s when assigning with = 250s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 250s when assigning with ||= 250s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 250s when the frozen string literal comment is true 250s does not register an offense when using interpolated heredoc constant 250s does not register an offense when using a multiline string 250s behaves like immutable objects 250s allows "#{a}" to be assigned to a constant 250s allows "#{a}" to be ||= to a constant 250s behaves like immutable objects 250s allows <<~HERE 250s foo 250s bar 250s HERE 250s to be ||= to a constant 250s allows <<~HERE 250s foo 250s bar 250s HERE 250s to be assigned to a constant 250s behaves like mutable objects 250s when assigning with ||= 250s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 250s when assigning with = 250s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 250s behaves like immutable objects 250s allows 1.5 to be ||= to a constant 250s allows 1.5 to be assigned to a constant 250s behaves like immutable objects 250s allows ENV['foo'] to be ||= to a constant 250s allows ENV['foo'] to be assigned to a constant 250s behaves like immutable objects 250s allows 'foo' + 'bar' to be ||= to a constant 250s allows 'foo' + 'bar' to be assigned to a constant 250s behaves like mutable objects 250s when assigning with = 250s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 250s when assigning with ||= 250s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 250s behaves like immutable objects 250s allows ::ENV['foo'] to be assigned to a constant 250s allows ::ENV['foo'] to be ||= to a constant 250s behaves like mutable objects 250s when assigning with = 250s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 250s when assigning with ||= 250s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 250s behaves like immutable objects 250s allows FOO - BAR to be ||= to a constant 250s allows FOO - BAR to be assigned to a constant 250s behaves like mutable objects 250s when assigning with ||= 250s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 250s when assigning with = 250s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 250s behaves like immutable objects 250s allows :sym to be assigned to a constant 250s allows :sym to be ||= to a constant 250s Ruby 2.7 or lower 250s when assigning a regexp 250s registers an offense 250s when using shareable_constant_values 250s behaves like literals that are not frozen 250s behaves like immutable objects 250s allows FOO - BAR to be assigned to a constant 250s allows FOO - BAR to be ||= to a constant 250s behaves like mutable objects 250s when assigning with = 250s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 250s when assigning with ||= 250s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 250s behaves like immutable objects 250s allows FOO + BAR to be ||= to a constant 250s allows FOO + BAR to be assigned to a constant 250s behaves like immutable objects 250s allows 1.5 to be assigned to a constant 250s allows 1.5 to be ||= to a constant 250s behaves like immutable objects 250s allows :sym to be ||= to a constant 250s allows :sym to be assigned to a constant 250s behaves like mutable objects 250s when assigning with = 250s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 250s when assigning with ||= 250s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 250s behaves like mutable objects 250s when assigning with ||= 250s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 250s when assigning with = 250s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 250s behaves like immutable objects 250s allows ::ENV['foo'] to be assigned to a constant 250s allows ::ENV['foo'] to be ||= to a constant 250s behaves like immutable objects 250s allows 1 to be ||= to a constant 250s allows 1 to be assigned to a constant 250s behaves like immutable objects 250s allows 'foo' + 'bar' to be ||= to a constant 250s allows 'foo' + 'bar' to be assigned to a constant 250s behaves like mutable objects 250s when assigning with = 250s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 250s when assigning with ||= 250s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 250s behaves like mutable objects 250s when assigning with ||= 250s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 250s when assigning with = 250s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 250s behaves like immutable objects 250s allows ENV['foo'] to be assigned to a constant 250s allows ENV['foo'] to be ||= to a constant 250s behaves like literals that are not frozen 250s behaves like immutable objects 250s allows ::ENV['foo'] to be ||= to a constant 250s allows ::ENV['foo'] to be assigned to a constant 250s behaves like immutable objects 250s allows 'foo' + 'bar' to be assigned to a constant 250s allows 'foo' + 'bar' to be ||= to a constant 250s behaves like immutable objects 250s allows ENV['foo'] to be assigned to a constant 250s allows ENV['foo'] to be ||= to a constant 250s behaves like mutable objects 250s when assigning with = 250s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 250s when assigning with ||= 250s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 250s behaves like immutable objects 250s allows FOO - BAR to be assigned to a constant 250s allows FOO - BAR to be ||= to a constant 250s behaves like mutable objects 250s when assigning with ||= 250s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 250s when assigning with = 250s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 250s behaves like mutable objects 250s when assigning with ||= 250s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 250s when assigning with = 250s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 250s behaves like mutable objects 250s when assigning with ||= 250s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 250s when assigning with = 250s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 250s behaves like immutable objects 250s allows 1.5 to be assigned to a constant 250s allows 1.5 to be ||= to a constant 250s behaves like immutable objects 250s allows :sym to be assigned to a constant 250s allows :sym to be ||= to a constant 250s behaves like mutable objects 250s when assigning with ||= 250s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 250s when assigning with = 250s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 250s behaves like immutable objects 250s allows 1 to be ||= to a constant 250s allows 1 to be assigned to a constant 250s behaves like immutable objects 250s allows FOO + BAR to be assigned to a constant 250s allows FOO + BAR to be ||= to a constant 250s behaves like literals that are not frozen 250s behaves like immutable objects 250s allows FOO + BAR to be assigned to a constant 250s allows FOO + BAR to be ||= to a constant 250s behaves like immutable objects 250s allows 1 to be ||= to a constant 250s allows 1 to be assigned to a constant 250s behaves like mutable objects 250s when assigning with ||= 251s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 251s when assigning with = 251s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 251s behaves like immutable objects 251s allows 1.5 to be ||= to a constant 251s allows 1.5 to be assigned to a constant 251s behaves like immutable objects 251s allows :sym to be ||= to a constant 251s allows :sym to be assigned to a constant 251s behaves like mutable objects 251s when assigning with = 251s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 251s when assigning with ||= 251s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 251s behaves like immutable objects 251s allows 'foo' + 'bar' to be assigned to a constant 251s allows 'foo' + 'bar' to be ||= to a constant 251s behaves like immutable objects 251s allows FOO - BAR to be ||= to a constant 251s allows FOO - BAR to be assigned to a constant 251s behaves like immutable objects 251s allows ENV['foo'] to be ||= to a constant 251s allows ENV['foo'] to be assigned to a constant 251s behaves like mutable objects 251s when assigning with ||= 251s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 251s when assigning with = 251s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 251s behaves like mutable objects 251s when assigning with = 251s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 251s when assigning with ||= 251s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 251s behaves like immutable objects 251s allows ::ENV['foo'] to be ||= to a constant 251s allows ::ENV['foo'] to be assigned to a constant 251s behaves like mutable objects 251s when assigning with ||= 251s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 251s when assigning with = 251s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 251s behaves like literals that are not frozen 251s behaves like immutable objects 251s allows ::ENV['foo'] to be assigned to a constant 251s allows ::ENV['foo'] to be ||= to a constant 251s behaves like mutable objects 251s when assigning with ||= 251s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 251s when assigning with = 251s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 251s behaves like immutable objects 251s allows FOO - BAR to be ||= to a constant 251s allows FOO - BAR to be assigned to a constant 251s behaves like immutable objects 251s allows 'foo' + 'bar' to be assigned to a constant 251s allows 'foo' + 'bar' to be ||= to a constant 251s behaves like immutable objects 251s allows 1.5 to be ||= to a constant 251s allows 1.5 to be assigned to a constant 251s behaves like mutable objects 251s when assigning with = 251s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 251s when assigning with ||= 251s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 251s behaves like mutable objects 251s when assigning with ||= 251s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 251s when assigning with = 251s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 251s behaves like mutable objects 251s when assigning with ||= 251s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 251s when assigning with = 251s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 251s behaves like immutable objects 251s allows FOO + BAR to be assigned to a constant 251s allows FOO + BAR to be ||= to a constant 251s behaves like mutable objects 251s when assigning with = 251s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 251s when assigning with ||= 251s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 251s behaves like immutable objects 251s allows ENV['foo'] to be ||= to a constant 251s allows ENV['foo'] to be assigned to a constant 251s behaves like immutable objects 251s allows :sym to be ||= to a constant 251s allows :sym to be assigned to a constant 251s behaves like immutable objects 251s allows 1 to be ||= to a constant 251s allows 1 to be assigned to a constant 251s when assigning a range (erange) without parenthesis 251s adds parentheses when autocorrecting 251s does not insert parenthesis to range enclosed in parentheses 251s when assigning a range (irange) without parenthesis 251s adds parentheses when autocorrecting 251s does not insert parenthesis to range enclosed in parentheses 251s behaves like immutable objects 251s allows FOO + BAR to be assigned to a constant 251s allows FOO + BAR to be ||= to a constant 251s behaves like immutable objects 251s allows 1 to be assigned to a constant 251s allows 1 to be ||= to a constant 251s Strict: true 251s freezes a heredoc 251s allows calls to freeze 251s behaves like immutable objects 251s allows ::Struct.new to be assigned to a constant 251s allows ::Struct.new to be ||= to a constant 251s when assigning an array without brackets 251s adds brackets when autocorrecting 251s does not insert brackets for %w() arrays 251s methods and operators that produce frozen objects 251s accepts assigning to an environment variable with a fallback 251s accepts comparison operators 251s accepts checking fixed size 251s accepts operating on multiple floats 251s accepts operating on multiple integers 251s accepts operating on a constant and a float 251s accepts operating on a constant and an interger 251s behaves like immutable objects 251s allows ::OTHER_CONST to be ||= to a constant 251s allows ::OTHER_CONST to be assigned to a constant 251s when assigning with an operator 251s behaves like operator methods 251s registers an offense and corrects with parens and freeze 251s behaves like operator methods 251s registers an offense and corrects with parens and freeze 251s behaves like operator methods 251s registers an offense and corrects with parens and freeze 251s behaves like operator methods 251s registers an offense and corrects with parens and freeze 251s behaves like operator methods 251s registers an offense and corrects with parens and freeze 251s behaves like operator methods 251s registers an offense and corrects with parens and freeze 251s behaves like immutable objects 251s allows OTHER_CONST to be assigned to a constant 251s allows OTHER_CONST to be ||= to a constant 251s behaves like mutable objects 251s when assigning with ||= 251s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 251s when assigning with = 251s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 251s behaves like immutable objects 251s allows 1 to be assigned to a constant 251s allows 1 to be ||= to a constant 251s behaves like mutable objects 251s when assigning with = 251s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 251s when assigning with ||= 251s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 251s behaves like immutable objects 251s allows ENV['foo'] to be ||= to a constant 251s allows ENV['foo'] to be assigned to a constant 251s behaves like string literal 251s Ruby 2.7 or lower 251s when the frozen string literal comment is false 251s behaves like mutable objects 251s when assigning with = 251s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 251s when assigning with ||= 251s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 251s when the frozen string literal comment is true 251s does not register an offense when using interpolated heredoc constant 251s does not register an offense when using a multiline string 251s behaves like immutable objects 251s allows <<~HERE 251s foo 251s bar 251s HERE 251s to be assigned to a constant 251s allows <<~HERE 251s foo 251s bar 251s HERE 251s to be ||= to a constant 251s behaves like immutable objects 251s allows "#{a}" to be assigned to a constant 251s allows "#{a}" to be ||= to a constant 251s when the frozen string literal comment is missing 251s behaves like mutable objects 251s when assigning with = 251s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 251s when assigning with ||= 251s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 251s Ruby 3.0 or higher 251s when the frozen string literal comment is true 251s does not register an offense when using a multiline string 251s registers an offense when using interpolated heredoc constant 251s registers an offense when using a multiline string with interpolation 251s behaves like immutable objects 251s allows <<~HERE 251s foo 251s bar 251s HERE 251s to be ||= to a constant 251s allows <<~HERE 251s foo 251s bar 251s HERE 251s to be assigned to a constant 251s behaves like mutable objects 251s when assigning with ||= 251s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 251s when assigning with = 251s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 251s when the frozen string literal comment is false 251s behaves like mutable objects 251s when assigning with = 251s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 251s when assigning with ||= 251s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 251s when the frozen string literal comment is missing 251s behaves like mutable objects 251s when assigning with ||= 251s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 251s when assigning with = 251s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 251s behaves like immutable objects 251s allows ::Namespace::OTHER_CONST to be assigned to a constant 251s allows ::Namespace::OTHER_CONST to be ||= to a constant 251s behaves like immutable objects 251s allows Struct.new to be ||= to a constant 251s allows Struct.new to be assigned to a constant 251s behaves like immutable objects 251s allows Namespace::OTHER_CONST to be ||= to a constant 251s allows Namespace::OTHER_CONST to be assigned to a constant 251s behaves like immutable objects 251s allows Struct.new(:node) do 251s def assignment? 251s true 251s end 251s end 251s to be assigned to a constant 251s allows Struct.new(:node) do 251s def assignment? 251s true 251s end 251s end 251s to be ||= to a constant 251s behaves like mutable objects 251s when assigning with = 251s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 251s when assigning with ||= 251s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 251s operators that produce unfrozen objects 251s registers an offense when operating on multiple strings 251s registers an offense when operating on a constant and a string 251s splat expansion 251s expansion of a range 251s registers an offense and corrects to use to_a.freeze 251s with parentheses 251s registers an offense and corrects to use to_a.freeze 251s behaves like mutable objects 251s when assigning with ||= 251s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 251s when assigning with = 251s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 251s behaves like immutable objects 251s allows ::ENV['foo'] to be assigned to a constant 251s allows ::ENV['foo'] to be ||= to a constant 251s behaves like mutable objects 251s when assigning with ||= 251s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 251s when assigning with = 251s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 251s behaves like immutable objects 251s allows 1.5 to be ||= to a constant 251s allows 1.5 to be assigned to a constant 251s behaves like immutable objects 251s allows :sym to be ||= to a constant 251s allows :sym to be assigned to a constant 251s behaves like mutable objects 251s when assigning with = 251s registers an offense for Something.new assigned to a constant and corrects by adding .freeze 251s when assigning with ||= 251s registers an offense for Something.new assigned to a constant and corrects by adding .freeze 251s when assigning with multiple operator calls 251s registers an offense and corrects with parens and freeze 251s behaves like immutable objects 251s allows Struct.new(:a, :b) to be assigned to a constant 251s allows Struct.new(:a, :b) to be ||= to a constant 251s 251s RuboCop::Cop::Lint::AssignmentInCondition 251s registers an offense for constant assignment in condition 251s registers an offense for assignment after ||= in condition 251s registers an offense for lvar assignment in condition 251s accepts ||= in condition 251s registers an offense for clvar assignment in condition 251s registers an offense for assignment methods 251s registers an offense for gvar assignment in condition 251s accepts == in condition 251s registers an offense for lvar assignment in while condition 251s accepts = in a block followed by method call 251s accepts = in a block that is called in a condition 251s does not blow up for empty unless condition 251s registers an offense for lvar assignment in until condition 251s does not blow up for empty if condition 251s registers an offense for collection element assignment in condition 251s registers an offense for ivar assignment in condition 251s accepts assignment in a block after || 251s registers an offense for = in condition inside a block 251s registers an offense for assignment after == in condition 251s safe assignment is not allowed 251s does not accept []= in condition surrounded with braces 251s does not accept = in condition surrounded with braces 251s safe assignment is allowed 251s accepts = in condition surrounded with braces 251s accepts []= in condition surrounded with braces 251s 251s RuboCop::Cop::Lint::SuppressedException 251s with AllowComments set to false 251s registers an offense for empty rescue block 251s does not register an offense for rescue with body 251s when empty rescue for `def` 251s registers an offense for empty rescue with comment 251s registers an offense for empty rescue without comment 251s with AllowNil set to true 251s does not register an offense for inline nil rescue 251s does not register an offense for rescue block with nil 251s with AllowNil set to false 251s registers an offense for inline nil rescue 251s registers an offense for rescue block with nil 251s when empty rescue for defs 251s registers an offense for empty rescue with comment 251s registers an offense for empty rescue without comment 251s Ruby 2.5 or higher 251s when empty rescue for `do` block 251s registers an offense for empty rescue with comment 251s registers an offense for empty rescue without comment 251s with AllowComments set to true 251s registers an offense for empty rescue on single line with a comment after it 251s does not register an offense for empty rescue with comment 251s Ruby 2.5 or higher 251s when empty rescue for `do` block 251s does not register an offense for empty rescue with comment 251s registers an offense for empty rescue without comment 251s Ruby 2.7 or higher 251s when empty rescue for `do` block with a numbered parameter 251s does not register an offense for empty rescue with comment 251s registers an offense for empty rescue without comment 251s when empty rescue for `defs` 251s does not register an offense for empty rescue with comment 251s registers an offense for empty rescue without comment 251s when empty rescue for `def` 251s does not register an offense for empty rescue with comment 251s registers an offense for empty rescue without comment 251s 251s RuboCop::Cop::Gemspec::RubyVersionGlobalsUsage 251s does not register an offense when no `RUBY_VERSION` 251s registers an offense when using `RUBY_VERSION` 251s registers an offense when using `::RUBY_VERSION` 251s 251s RuboCop::Cop::Naming::ConstantName 251s registers an offense for snake case in const name 251s registers an offense for non-POSIX upper case in const name 251s checks qualified const names 251s does not check names if rhs is a `Class.new` 251s registers an offense for camel case in const name 251s registers an offense for camel case in const namewhen using frozen range assignment 251s does not check names if rhs is a `Struct.new` with conditional assign 251s registers an offense for camel case in const namewhen using frozen object assignment 251s allows screaming snake case in const name 251s does not check names if rhs is a `Class.new` with conditional assign 251s registers offenses for camel case in multiple const assignment 251s does not check if rhs is a non-offensive const assignment 251s registers 1 offense if rhs is offending const assignment 251s allows screaming snake case in multiple const assignment 251s does not check names if rhs is a method call 251s does not check names if rhs is a method call with block 251s does not check names if rhs is a `Struct.new` 251s does not check names if rhs is a method call with conditional assign 251s allows screaming snake case with POSIX upper case characters 251s does not check if rhs is another constant 251s when a rhs is a conditional expression 251s when conditional branches contain a value other than a constant 251s does not check names 251s when conditional branches contain only string values 251s registers an offense 251s when conditional branches contain only constants 251s does not check names 251s 251s RuboCop::Cop::Style::MissingRespondToMissing 251s allows method_missing and respond_to_missing? implemented as class methods 251s allows method_missing and respond_to_missing? when defined with inline access modifier 251s registers an offense respond_to_missing? is implemented as an instance method and method_missing is implemented as a class method 251s registers an offense respond_to_missing? is implemented as a class method and method_missing is implemented as an instance method 251s registers an offense when method_missing is implemented as a class methods 251s allows method_missing and respond_to_missing? when defined with inline access modifier and method_missing is not qualified by inline access modifier 251s registers an offense when respond_to_missing? is not implemented 251s allows method_missing and respond_to_missing? implemented as instance methods 251s 251s RuboCop::Cop::Naming::FileName 251s with snake_case file names without file extension 251s does not register an offense 251s with include acronym name 251s does not register an offense 251s with camelCase file names without file extension 251s registers an offense 251s with non-ascii characters in filename 251s does not register an offense 251s with dotfiles 251s does not register an offense 251s with snake_case names which use ? and ! 251s does not register an offense 251s with acronym namespace 251s does not register an offense 251s with snake_case names which use + 251s does not register an offense 251s with camelCase file names ending in .rb 251s registers an offense 251s when the file is specified in AllCops/Include 251s with a non-snake_case file name 251s does not register an offense 251s when ExpectMatchingDefinition is true 251s on a file which defines a nested class 251s in a non-matching directory under spec 251s registers an offense 251s in a directory elsewhere which only matches the module name 251s does not register an offense 251s in a directory with multiple instances of spec 251s does not register an offense 251s in a non-matching directory under lib 251s registers an offense 251s in a directory with multiple instances of src 251s does not register an offense 251s in a directory with multiple instances of lib 251s does not register an offense 251s in a matching directory under lib 251s does not register an offense 251s in a directory elsewhere which does not match the module name 251s registers an offense 251s in a non-matching directory under src 251s registers an offense 251s in a matching directory under spec 251s does not register an offense 251s in a matching directory under src 251s does not register an offense 251s in a matching directory under test 251s does not register an offense 251s in a directory with multiple instances of test 251s does not register an offense 251s in a non-matching directory under test 251s registers an offense 251s on a file which defines multiple classes 251s in a matching directory under lib 251s does not register an offense 251s in a matching directory under src 251s does not register an offense 251s in a directory elsewhere which does not match the module name 251s registers an offense 251s in a matching directory under spec 251s does not register an offense 251s in a directory with multiple instances of test 251s does not register an offense 251s in a non-matching directory under test 251s registers an offense 251s in a directory with multiple instances of lib 251s does not register an offense 251s in a matching directory under test 251s does not register an offense 251s in a non-matching directory under lib 251s registers an offense 251s in a directory elsewhere which only matches the module name 251s does not register an offense 251s in a directory with multiple instances of spec 251s does not register an offense 251s in a non-matching directory under spec 251s registers an offense 251s in a directory with multiple instances of src 251s does not register an offense 251s in a non-matching directory under src 251s registers an offense 251s on a file which uses Name::Spaced::Module syntax 251s in a directory with multiple instances of spec 251s does not register an offense 251s in a directory elsewhere which does not match the module name 251s registers an offense 251s in a matching directory under test 251s does not register an offense 251s in a non-matching directory under spec 251s registers an offense 251s in a directory elsewhere which only matches the module name 251s does not register an offense 251s in a non-matching directory under lib 251s registers an offense 251s in a matching directory under src 251s does not register an offense 251s in a directory with multiple instances of src 251s does not register an offense 251s in a non-matching directory under src 251s registers an offense 251s in a matching directory under lib 251s does not register an offense 251s in a non-matching directory under test 251s registers an offense 251s in a directory with multiple instances of lib 251s does not register an offense 251s in a matching directory under spec 251s does not register an offense 251s in a directory with multiple instances of test 251s does not register an offense 251s on a file which defines a nested module 251s in a directory elsewhere which does not match the module name 251s registers an offense 251s in a directory with multiple instances of src 251s does not register an offense 251s in a directory with multiple instances of spec 251s does not register an offense 251s in a directory with multiple instances of test 251s does not register an offense 251s in a matching directory under lib 251s does not register an offense 251s in a non-matching directory under test 251s registers an offense 251s in a non-matching directory under lib 251s registers an offense 251s in a directory elsewhere which only matches the module name 251s does not register an offense 251s in a non-matching directory under src 251s registers an offense 251s in a matching directory under test 251s does not register an offense 251s in a matching directory under src 251s does not register an offense 251s in a matching directory under spec 251s does not register an offense 251s in a non-matching directory under spec 251s registers an offense 251s in a directory with multiple instances of lib 251s does not register an offense 251s on a file which defines a Struct with a block 251s in a matching directory under spec 251s does not register an offense 251s in a non-matching directory under src 251s registers an offense 251s in a matching directory under src 251s does not register an offense 251s in a non-matching directory under test 251s registers an offense 251s in a non-matching directory under lib 251s registers an offense 251s in a matching directory under test 251s does not register an offense 251s in a matching directory under lib 251s does not register an offense 251s in a directory elsewhere which only matches the module name 251s does not register an offense 251s in a directory with multiple instances of lib 251s does not register an offense 251s in a directory with multiple instances of spec 251s does not register an offense 251s in a directory with multiple instances of test 251s does not register an offense 251s in a non-matching directory under spec 251s registers an offense 251s in a directory with multiple instances of src 251s does not register an offense 251s in a directory elsewhere which does not match the module name 251s registers an offense 251s on an empty file 251s registers an offense 251s on an empty file with a space in its filename 251s registers an offense 251s on a file which defines a Struct without a block 251s in a directory with multiple instances of lib 251s does not register an offense 251s in a non-matching directory under test 251s registers an offense 251s in a matching directory under src 251s does not register an offense 251s in a matching directory under spec 251s does not register an offense 251s in a matching directory under lib 251s does not register an offense 251s in a non-matching directory under src 251s registers an offense 251s in a directory elsewhere which only matches the module name 251s does not register an offense 251s in a directory elsewhere which does not match the module name 251s registers an offense 251s in a directory with multiple instances of spec 251s does not register an offense 251s in a directory with multiple instances of test 251s does not register an offense 251s in a non-matching directory under lib 251s registers an offense 251s in a non-matching directory under spec 251s registers an offense 251s in a directory with multiple instances of src 251s does not register an offense 251s in a matching directory under test 252s does not register an offense 252s on a file which defines no class or module at all 252s under lib when not added to root 252s registers an offense 252s under test 252s registers an offense 252s under some other random directory 252s registers an offense 252s under spec 252s registers an offense 252s under src 252s registers an offense 252s under lib 252s registers an offense 252s with acronym class name 252s does not register an offense 252s when Regex is set 252s with a non-matching name 252s registers an offense 252s with a matching name 252s does not register an offense 252s with snake_case file names ending in .rb 252s does not register an offense 252s with snake_case file names with multiple extensions 252s does not register an offense 252s with non-snake-case file names with a shebang 252s does not register an offense 252s when IgnoreExecutableScripts is disabled 252s registers an offense 252s with snake_case file names with non-rb extension 252s does not register an offense 252s when CheckDefinitionPathHierarchy is false 252s on a file with a non-matching class 252s registers an offense 252s in a non-matching directory, but with a matching class 252s does not register an offense 252s with a non-matching module containing a matching class 252s does not register an offense 252s with a matching module containing a non-matching class 252s does not register an offense 252s on a file with a matching struct 252s does not register an offense 252s with a non-matching module containing a matching struct 252s does not register an offense 252s on an empty file 252s registers an offense 252s on a file with a matching class 252s does not register an offense 252s with a matching module containing a non-matching struct 252s does not register an offense 252s on a file with a non-matching struct 252s registers an offense 252s 252s RuboCop::Cop::Corrector 252s #rewrite 252s allows removal of a range 252s accepts a node instead of a range 252s allows removal of characters from range ending 252s allows removal of characters from range beginning 252s raises a useful error if not given a node or a range 252s allows replacement of a range 252s allows insertion after a source range 252s allows insertion before a source range 252s allows insertion before and after a source range 252s allows removal of characters preceding range 252s when range is from incorrect source 252s raises exception from insert_before 252s raises exception from remove_preceding 252s raises exception from insert_after 252s raises exception from remove 252s raises exception from remove_leading 252s raises exception from remove_trailing 252s raises exception from replace 252s 252s RuboCop::Cop::Style::DoubleCopDisableDirective 252s does not register an offense for cops with single cop directive 252s registers an offense for duplicate disable directives 252s registers an offense for duplicate todo directives 252s 252s RuboCop::Cop::Style::RedundantRegexpEscape 252s with multibyte characters 252s removes the escape character at the right position 252s with a single-line %r^^ regexp 252s with escaped delimiters inside a character-class 252s does not register an offense 252s with escaped delimiters and regexp options 252s does not register an offense 252s with escaped delimiters outside a character-class 252s does not register an offense 252s without escapes 252s does not register an offense 252s with a single-line %r() regexp 252s without escapes 252s does not register an offense 252s with escaped delimiters outside a character-class 252s does not register an offense 252s with escaped delimiters inside a character-class 252s does not register an offense 252s with escaped delimiters and regexp options 252s does not register an offense 252s with a multi-line %r// regexp 252s with escaped slashes 252s does not register an offense 252s without escapes 252s does not register an offense 252s with a single-line %r__ regexp 252s with escaped delimiters and regexp options 252s does not register an offense 252s without escapes 252s does not register an offense 252s with escaped delimiters inside a character-class 252s does not register an offense 252s with escaped delimiters outside a character-class 252s does not register an offense 252s with a single-line %r~~ regexp 252s without escapes 252s does not register an offense 252s with escaped delimiters and regexp options 252s does not register an offense 252s with escaped delimiters outside a character-class 252s does not register an offense 252s with escaped delimiters inside a character-class 252s does not register an offense 252s with a single-line `//` regexp 252s with an escaped '+' inside a character class 252s registers an offense and corrects 252s with an escaped 'V' inside a character class 252s does not register an offense 252s with an escaped 'r' outside a character class 252s does not register an offense 252s with a POSIX character class then allowed escape inside a character class 252s does not register an offense 252s with an escaped 'B' inside a character class 252s does not register an offense 252s with an escaped 'u0041' outside a character class 252s does not register an offense 252s with an interpolated unnecessary-escape regexp 252s registers an offense and corrects 252s with an escaped 'X' outside a character class 252s does not register an offense 252s with an uppercase metacharacter outside a character class 252s does not register an offense 252s with an interpolation followed by redundant escapes 252s registers offenses and corrects 252s with an escaped '[' outside a character class 252s does not register an offense 252s with an escaped 'z' inside a character class 252s does not register an offense 252s with an escaped 'l' inside a character class 252s does not register an offense 252s with an escaped interpolation outside a character class 252s does not register an offense 252s with an escaped 'x41' inside a character class 252s does not register an offense 252s with an escaped 'm' inside a character class 252s does not register an offense 252s with an escaped '{' inside a character class 252s registers an offense and corrects 252s with an escaped 't' outside a character class 252s does not register an offense 252s with an escaped 'Z' outside a character class 252s does not register an offense 252s with an escaped '.' inside a character class 252s registers an offense and corrects 252s with an escaped 'U' inside a character class 252s does not register an offense 252s with an escaped 'R' inside a character class 252s does not register an offense 252s with an escaped 'w' outside a character class 252s does not register an offense 252s with an escaped '.' outside a character class 252s does not register an offense 252s with an escaped 'j' outside a character class 252s does not register an offense 252s with an escaped 'p{alpha}' outside a character class 252s does not register an offense 252s with an escaped 'y' inside a character class 252s does not register an offense 252s with an escaped 'M-a' inside a character class 252s does not register an offense 252s with escaped slashes 252s does not register an offense 252s with an escaped '\' outside a character class 252s does not register an offense 252s with regexp options and a redundant escape 252s registers offenses and corrects 252s with a line continuation within a character class 252s does not register an offense 252s with an escaped '#' inside a character class 252s does not register an offense 252s with a backreference 252s does not register an offense 252s with an escaped 'I' outside a character class 252s does not register an offense 252s with an escaped 'Q' inside a character class 252s does not register an offense 252s with an escaped 'o' outside a character class 252s does not register an offense 252s with an escaped '|' outside a character class 252s does not register an offense 252s with an escaped 'E' outside a character class 252s does not register an offense 252s with an escaped 'C-c' inside a character class 252s does not register an offense 252s with an escaped 'R' outside a character class 252s does not register an offense 252s with an escaped 'W' inside a character class 252s does not register an offense 252s with an escaped '^' inside a character class 252s does not register an offense 252s with an escaped 'D' inside a character class 252s does not register an offense 252s with an escaped . inside a character class beginning with : 252s registers an offense and corrects 252s with an escaped 'Y' outside a character class 252s does not register an offense 252s with an escaped 'a' outside a character class 252s does not register an offense 252s with an invalid g escape 252s does not register an offense 252s with an escaped 'u{0041}' inside a character class 252s does not register an offense 252s with an escaped 'b' inside a character class 252s does not register an offense 252s with an escaped '}' inside a character class 252s registers an offense and corrects 252s with an escaped 'B' outside a character class 252s does not register an offense 252s with an escaped '*' outside a character class 252s does not register an offense 252s with an escaped 'P{alpha}' inside a character class 252s does not register an offense 252s with an escaped '#' outside a character class 252s does not register an offense 252s with an escaped 's' inside a character class 252s does not register an offense 252s with an escaped 'K' inside a character class 252s does not register an offense 252s with an escaped ' ' outside a character class 252s does not register an offense 252s with an escaped 'S' inside a character class 252s does not register an offense 252s with an escaped 'q' inside a character class 252s does not register an offense 252s with an escaped 'v' inside a character class 252s does not register an offense 252s with a line continuation 252s does not register an offense 252s with an escaped 'z' outside a character class 252s does not register an offense 252s with an escaped 'w' inside a character class 252s does not register an offense 252s with an escaped 'cc' outside a character class 252s does not register an offense 252s with an escaped 'P{alpha}' outside a character class 252s does not register an offense 252s with an escaped '-' outside a character class 252s registers an offense and corrects 252s with an escaped 'u0041' inside a character class 252s does not register an offense 252s with an escaped 'U' outside a character class 252s does not register an offense 252s with an escaped 'y' outside a character class 252s does not register an offense 252s with an escaped 'Q' outside a character class 252s does not register an offense 252s with an escaped '|' inside a character class 252s registers an offense and corrects 252s with an escaped 'o' inside a character class 252s does not register an offense 252s with an escaped '-' character being the last character inside a character class 252s registers an offense and corrects 252s with an escaped ')' outside a character class 252s does not register an offense 252s with an escaped '\' inside a character class 252s does not register an offense 252s with an escaped 'q' outside a character class 252s does not register an offense 252s with an escaped '*' inside a character class 252s registers an offense and corrects 252s with an escaped '(' inside a character class 252s registers an offense and corrects 252s with an escaped 'F' inside a character class 252s does not register an offense 252s with an escaped 't' inside a character class 252s does not register an offense 252s with an escaped 'v' outside a character class 252s does not register an offense 252s with an escaped 'd' outside a character class 252s does not register an offense 252s with an escaped 'm' outside a character class 252s does not register an offense 252s with an escaped 'Y' inside a character class 252s does not register an offense 252s with an escaped 'X' inside a character class 252s does not register an offense 252s with an escaped 'n101' inside a character class 252s does not register an offense 252s with an escaped 'j' inside a character class 252s does not register an offense 252s with an escaped 'E' inside a character class 252s does not register an offense 252s with a nested character class containing redundant escape 252s registers an offense and corrects 252s with an escaped 'Z' inside a character class 252s does not register an offense 252s with an escaped '+' inside a character class inside a group 252s registers an offense and corrects 252s with multiple escaped metachars inside a character class 252s registers offenses and corrects 252s with an escaped '{' outside a character class 252s does not register an offense 252s with an escaped 'x41' outside a character class 252s does not register an offense 252s with an escaped '$' inside a character class 252s registers an offense and corrects 252s with an escaped 'L' inside a character class 252s does not register an offense 252s with an escaped '-' inside a character class 252s registers an offense and corrects 252s with an escape inside an interpolated string 252s does not register an offense 252s with an escaped 'S' outside a character class 252s does not register an offense 252s with an escaped '(' outside a character class 252s does not register an offense 252s with an escaped ']' outside a character class 252s does not register an offense 252s with an escaped 'e' outside a character class 252s does not register an offense 252s with an escaped 'N' outside a character class 252s does not register an offense 252s with an escaped character class and following escaped char 252s does not register an offense 252s with an escaped ')' inside a character class 252s registers an offense and corrects 252s with an escaped 'd' inside a character class 252s does not register an offense 252s with an escaped '}' outside a character class 252s does not register an offense 252s with a POSIX character class then disallowed escape inside a character class 252s registers an offense and corrects 252s with an escaped 'f' inside a character class 252s does not register an offense 252s with an escaped 'W' outside a character class 252s does not register an offense 252s with an escaped 'H' outside a character class 252s does not register an offense 252s with an escaped 'T' outside a character class 252s does not register an offense 252s with an escaped 'H' inside a character class 252s does not register an offense 252s with an uppercase metacharacter inside a character class 252s does not register an offense 252s with an escaped 's' outside a character class 252s does not register an offense 252s with an escaped ']' inside a character class 252s does not register an offense 252s with an escaped 'F' outside a character class 252s does not register an offense 252s with an escaped 'h' inside a character class 252s does not register an offense 252s with an escaped 'l' outside a character class 252s does not register an offense 252s with an escaped 'i' inside a character class 252s does not register an offense 252s with a character class and following escaped char 252s does not register an offense 252s with an escaped 'L' outside a character class 252s does not register an offense 252s with an escaped 'D' outside a character class 252s does not register an offense 252s with an escaped 'r' inside a character class 252s does not register an offense 252s with an escaped '-' character being the first character inside a character class 252s registers an offense and corrects 252s with an escaped 'N' inside a character class 252s does not register an offense 252s with an escaped 'e' inside a character class 252s does not register an offense 252s with an escaped 'J' outside a character class 252s does not register an offense 252s with an escaped interpolation inside a character class 252s does not register an offense 252s with an escaped '[' inside a character class 252s does not register an offense 252s with an escaped 'cc' inside a character class 252s does not register an offense 252s with an escaped 'a' inside a character class 252s does not register an offense 252s with an escaped 'f' outside a character class 252s does not register an offense 252s with an escaped 'M-a' outside a character class 252s does not register an offense 252s with an escaped 'K' outside a character class 252s does not register an offense 252s with an escaped ' ' inside a character class 252s does not register an offense 252s with an escaped ' 252s ' outside a character class 252s does not register an offense 252s with an escaped '$' outside a character class 252s does not register an offense 252s with an escaped 'T' inside a character class 252s does not register an offense 252s with an escaped '+' outside a character class 252s does not register an offense 252s with an escaped 'A' outside a character class 252s does not register an offense 252s with an escaped 'I' inside a character class 252s does not register an offense 252s with an escaped 'O' inside a character class 252s does not register an offense 252s with an escaped 'u{0041}' outside a character class 252s does not register an offense 252s with an escaped 'i' outside a character class 252s does not register an offense 252s with a free-spaced mode regex 252s with a commented redundant escape 252s does not register an offense 252s with redundant escape preceded by an escaped comment 252s registers offenses and corrects 252s with a commented [ and ] 252s does not register an offense 252s with a commented redundant escape on a single line 252s does not register an offense 252s with an escaped 'G' outside a character class 252s does not register an offense 252s with an escaped 'n101' outside a character class 252s does not register an offense 252s with an escaped '?' inside a character class 252s registers an offense and corrects 252s without escapes 252s does not register an offense 252s with a nested character class then allowed escape 252s does not register an offense 252s with an escaped 'J' inside a character class 252s does not register an offense 252s with an escaped 'h' outside a character class 252s does not register an offense 252s with an escaped 'G' inside a character class 252s does not register an offense 252s with an escaped '?' outside a character class 252s does not register an offense 252s with an escaped '^' outside a character class 252s does not register an offense 252s with an escaped 'b' outside a character class 252s does not register an offense 252s with an escaped 'C-c' outside a character class 252s does not register an offense 252s with an escaped 'O' outside a character class 252s does not register an offense 252s with an escaped 'p{alpha}' inside a character class 252s does not register an offense 252s with an escaped 'A' inside a character class 252s does not register an offense 252s with an escaped 'V' outside a character class 252s does not register an offense 252s with a multi-line %r{} regexp 252s with a redundant escape after a line with comment 252s registers an offense and corrects 252s with a # inside a character class 252s does not register an offense 252s with redundantly-escaped slashes 252s registers an offense and corrects 252s without escapes 252s does not register an offense 252s with a single-line %r<> regexp 252s with escaped delimiters outside a character-class 252s does not register an offense 252s without escapes 252s does not register an offense 252s with escaped delimiters inside a character-class 252s does not register an offense 252s with escaped delimiters and regexp options 252s does not register an offense 252s with a single-line %r@@ regexp 252s with escaped delimiters and regexp options 252s does not register an offense 252s with escaped delimiters inside a character-class 252s does not register an offense 252s without escapes 252s does not register an offense 252s with escaped delimiters outside a character-class 252s does not register an offense 252s with a single-line %r// regexp 252s with escaped slashes 252s does not register an offense 252s without escapes 252s does not register an offense 252s with a single-line %r{} regexp 252s with redundantly-escaped slashes 252s registers an offense and corrects 252s with an escaped { or } inside a character class 252s does not register an offense 252s with an escaped { or } outside a character class 252s does not register an offense 252s without escapes 252s does not register an offense 252s with a single-line %r!! regexp 252s with escaped delimiters inside a character-class 252s does not register an offense 252s with escaped delimiters and regexp options 252s does not register an offense 252s without escapes 252s does not register an offense 252s with escaped delimiters outside a character-class 252s does not register an offense 252s 252s RuboCop::Cop::Layout::SpaceInsideRangeLiteral 252s accepts complex range literal with space in it 252s accepts multiline range literal with no space in it 252s registers an offense for space inside ... literal 252s accepts no space inside ... literal 252s registers an offense for space inside .. literal 252s registers an offense in multiline range literal with space in it 252s accepts no space inside .. literal 252s 252s RuboCop::Cop::Style::ClassCheck 252s when enforced style is kind_of? 252s registers an offense for is_a? and corrects to kind_of? 252s when enforced style is is_a? 252s registers an offense for kind_of? and corrects to is_a? 252s 252s RuboCop::Cop::VariableForce 252s #process_node 252s when processing a regexp with a line break at the start of capture parenthesis 252s does not raise an error 252s when processing an empty regex 252s does not raise an error 252s when processing lvar node 252s when the variable is not yet declared 252s does not raise error 252s when processing a regex with regopt 252s does not raise an error 252s 252s RuboCop::Cop::Style::SignalException 252s when enforced style is `fail` 252s accepts `raise` with explicit receiver 252s registers an offense for raise in begin section 252s registers an offense for raise in def body 252s registers an offense for raise in rescue section 252s registers an offense for `raise` with `Kernel` as explicit receiver 252s when enforced style is `raise` 252s registers an offense for `fail` with `Kernel` as explicit receiver 252s accepts `fail` with explicit receiver 252s accepts `fail` if a custom `fail` instance method is defined 252s registers an offense for fail in begin section 252s registers an offense for fail in rescue section 252s accepts `fail` if a custom `fail` singleton method is defined 252s registers an offense for fail in def body 252s when enforced style is `semantic` 252s is not confused by nested begin/rescue 252s accepts `raise` and `fail` with explicit receiver 252s registers an offense for fail in second rescue 252s registers an offense for raise in def body 252s registers one offense for each raise 252s registers an offense for `raise` and `fail` with `Kernel` as explicit receiver 252s accepts raise in def rescue section 252s registers an offense for fail in def rescue section 252s accepts raise in rescue section 252s registers an offense for fail in rescue section 252s registers only offense for one raise that should be fail 252s registers an offense for raise not in a begin/rescue/end 252s accepts raise in def with multiple rescues 252s registers an offense for `raise` and `fail` with `::Kernel` as explicit receiver 252s registers an offense for raise in begin section 252s 252s RuboCop::Cop::Layout::BeginEndAlignment 252s registers an offense for mismatched begin end and autocorrects 252s accepts matching puts 1; begin ... end 252s accepts matching begin ... end 252s when EnforcedStyleAlignWith is start_of_line 252s accepts matching var = begin ... end 252s registers an offense for mismatched var << begin end and autocorrects 252s registers an offense for mismatched begin end and autocorrects 252s accepts matching puts 1; begin ... end 252s 252s RuboCop::Cop::Lint::OrAssignmentToConstant 252s registers an offense with or-assignment to a constant 252s does not register an offense with or-assignment to an instance variable 252s does not register an offense with or-assignment to a local variable 252s does not register an offense with plain assignment to a constant 252s does not register an offense with or-assignment to a class variable 252s does not register an offense with or-assignment to a global variable 252s does not register an offense with or-assignment to an attribute 252s 252s RuboCop::Cop::Lint::FlipFlop 252s registers an offense for exclusive flip-flops 253s registers an offense for inclusive flip-flops 253s 253s RuboCop::Cop::Style::IfWithSemicolon 253s registers an offense and corrects for one line if/;/end 253s can handle modifier conditionals 253s accepts without `else` branch 253s when elsif is present 253s accepts with `else` branch 253s accepts without `else` branch 253s accepts second elsif block 253s 253s RuboCop::Cop::Lint::EachWithObjectArgument 253s accepts a string argument 253s registers an offense for fixnum argument 253s registers an offense for bignum argument 253s registers an offense for float argument 253s accepts a variable argument 253s accepts two arguments 253s when using safe navigation operator 253s registers an offense for fixnum argument 253s 253s RuboCop::Cop::InternalAffairs::RedundantDescribedClassAsSubject 253s does not register an offense when using `subject(:cop)` with multiple arguments to `described_class.new` 253s registers an offense when using `subject(:cop)` with no argument `described_class.new` and `:config` is specified 253s registers an offense when using `subject(:cop)` and `:config` is not specified in `describe` 253s registers an offense when using `subject(:cop)` and `:config` is already specified in `describe` 253s 253s RuboCop::Cop::InternalAffairs::RedundantLetRuboCopConfigNew 253s registers an offense when using `let(:config)` and `:config` is not specified in `describe` 253s registers an offense when using `let(:config)` with no argument `RuboCop::Config.new` and `:config` is specified 253s does not register an offense when using `let(:config)` with arguments to `RuboCop::Config.new` 253s registers an offense when using `let(:config)` and `:config` is already specified in `describe` 253s 253s RuboCop::Cop::Lint::DeprecatedClassMethods 253s when using `ENV.freeze` 253s registers an offense 253s does not register an offense for method calls to `ENV` other than `freeze` 253s prefer `File.exist?` over `File.exists?` 253s registers an offense and corrects ::File.exists? 253s registers an offense and corrects File.exists? 253s does not register an offense for File.exist? 253s prefer `Addrinfo#getaddrinfo` over `Socket.gethostbyname` 253s does not register an offense for method `gethostbyname` on other receivers 253s registers an offense for ::Socket.gethostbyname 253s registers an offense for Socket.gethostbyname 253s prefer `Addrinfo#getnameinfo` over `Socket.gethostbyaddr` 253s does not register an offense for method `gethostbyaddr` on other receivers 253s registers an offense for Socket.gethostbyaddr 253s registers an offense for ::Socket.gethostbyaddr 253s prefer `Dir.exist?` over `Dir.exists?` 253s does not register an offense for offensive method `exists?`on other receivers 253s registers an offense and corrects Dir.exists? 253s does not register an offense for Dir.exist? 253s registers an offense and corrects ::Dir.exists? 253s when using `ENV.dup` 253s does not register an offense for method calls to `ENV` other than `dup` 253s registers an offense 253s prefer `block_given?` over `iterator?` 253s registers an offense and corrects iterator? 253s does not register an offense for offensive method `iterator?`on other receivers 253s does not register an offense for block_given? 253s when using `ENV.clone` 253s does not register an offense for method calls to `ENV` other than `clone` 253s registers an offense 253s 253s RuboCop::Cop::Lint::TrailingCommaInAttributeDeclaration 253s does not register an offense when not using trailing comma 253s registers an offense when using trailing comma 253s 253s RuboCop::Cop::Style::NonNilCheck 253s when `EnforcedStyle: comparison` of `Style/NilComparison` cop 253s `IncludeSemanticChanges: true` 253s registers an offense for `foo != nil` 253s `IncludeSemanticChanges: false` 253s does not register an offense for `foo != nil` 253s when not allowing semantic changes 253s does not register an offense for !x.nil? 253s does not register an offense if last expression in predicate 253s does not register an offense if only expression in class predicate 253s registers an offense but does not correct when the code was not modified 253s does not register an offense for not x.nil? 253s does not register an offense if only expression in predicate 253s does not register an offense if last expression in class predicate 253s does not register an offense with implicit receiver 253s does not register an offense for != 0 253s registers an offense for != nil 253s when allowing semantic changes 253s autocorrects by changing `x != nil` to `x` 253s does not register an offense for `!x` 253s does not register an offense for `x.nil?` 253s corrects code that would not be modified if IncludeSemanticChanges were false 253s registers an offense for `not x.nil?` 253s registers an offense for unless x.nil? 253s does not blow up with ternary operators 253s registers an offense for `!x.nil?` 253s does not blow up when autocorrecting implicit receiver 253s 253s RuboCop::Cop::Lint::NonAtomicFileOperation 253s does not register an offense when not checking for the existence 253s registers an offense when use `FileTest.exist?` before creating file with an option `force: true` 253s registers an offense when use file existence checks `if` by postfix before removing file 253s registers an offense when use `FileTest.exists?` before creating file 253s registers an offense when using `FileTest.exist?` as a condition for `elsif` 253s does not register an offense when use `FileTest.exist?` before remove recursive file 253s registers an offense when use file existence checks `unless` by postfix before creating file 253s registers an offense when use `FileTest.exist?` before force creating file 253s registers an offense when use `FileTest.exist?` before force remove file 253s does not register an offense when use `FileTest.exist?` before creating file with an option `force: false` 253s registers an offense when use `FileTest.exist?` before remove file 253s registers an offense when use `FileTest.exist?` before remove file 253s registers an offense when use `FileTest.exist?` before remove file 253s registers an offense when use `FileTest.exist?` before force creating file 253s registers an offense when use `FileTest.exist?` before remove file 253s does not register an offense when processing other than file operations 253s registers an offense when use `FileTest.exist?` before force remove file 253s registers an offense when use `FileTest.exist?` before creating file 253s registers an offense when use `FileTest.exist?` before creating file with an option not `force` 253s does not register an offense when use `FileTest.exist?` before remove recursive file 253s does not register an offense when not an exist check 253s registers an offense when use `FileTest.exist?` before remove file 253s registers an offense when use `FileTest.exist?` before remove file 253s registers an offense when use `FileTest.exist?` before remove file 253s does not register an offense when using complex conditional with `&&` 253s registers an offense when use `FileTest.exist?` before remove file 253s registers an offense when use `FileTest.exist?` before force creating file 253s registers an offense when use `FileTest.exist?` with negated `if` before creating file 253s does not register an offense when not a method of file operation 253s registers an offense when use `FileTest.exist?` before remove file 253s does not register an offense when checking for the existence of different files 253s does not register an offense when using complex conditional with `||` 253s does not register an offense when using `FileTest.exist?` with `if` condition that has `else` branch 253s registers an offense when use `FileTest.exist?` before remove file 253s 253s RuboCop::Cop::Style::CaseLikeIf 253s registers an offense and corrects when using `=~` 253s registers an offense and corrects when using nested conditions with `||` 253s does not register an offense when using `match?` with non regexp 253s registers an offense and corrects when using `===` 253s registers an offense and corrects when using `is_a?` 253s does not register an offense when using ternary operator 253s does not register an offense when using `==` with constant containing 1 letter in name 253s does not register an offense when only `if-else` 253s registers an offense and corrects when using `match?` with non regexp in other branches except first 253s registers an offense and corrects when using `==` with literal 253s does not register an offense when using `=~` in first branch with non regexp 253s does not register an offense when one of `||` subconditions is not convertible 253s does not register an offense when using `include?` without a receiver 253s does not register an offense when not all conditions contain target 253s registers an offense and corrects when target is a method call 253s does not register an offense when one of the branches contains `==` with class reference 253s does not register an offense when using `cover?` without a receiver 253s does not register an offense when an object overrides `equal?` with no arity 253s does not register an offense when using `equal?` without a receiver 253s does not register an offense when using `unless` 253s does not register an offense when only single `if` 253s registers an offense and corrects when using `match?` with regexp 253s registers an offense and corrects when using `include?` with range 253s registers an offense and corrects when using `==` with constant 253s does not register an offense when using `==` with method call with arguments 253s does not register an offense when using `match?` in first branch with non regexp 253s does not register an offense when using `match?` without a receiver 253s does not register an offense when using modifier `if` 253s does not register an offense when using `==` with class reference 253s registers an offense and corrects when using `||` within conditions 253s when using regexp with named captures 253s registers and corrects an offense with =~ and regexp on rhs 253s registers and corrects an offense with match? and regexp on lhs 253s does not register an offense with match and regexp on lhs 253s does not register an offense with match and regexp on rhs 253s does not register an offense with =~ and regexp on lhs 253s registers and corrects an offense with match? and regexp on rhs 253s 253s RuboCop::Cop::Style::DocumentationMethod 253s when declaring methods outside a class 253s when declaring methods for class instance 253s without documentation comment 253s registers an offense 253s registers an offense with `end` on the same line 253s with documentation comment 253s does not register an offense 253s does not register an offense with `end` on the same line 253s with both public and private methods 253s when required for non-public methods 253s registers an offense 253s when the public method has documentation 253s does not register an offense 253s when the public method has no documentation 253s registers an offense 253s when method is private 253s does not register an offense with inline `private` 253s does not register an offense 253s does not register an offense with inline `private` and `end` 253s does not register an offense with `end` on the same line 253s when required for non-public methods 253s registers an offense with inline `private` and `end` 253s registers an offense 253s registers an offense with inline `private` 253s registers an offense with `end` on the same line 253s with both public and private methods 253s when the public method has documentation 253s does not register an offense 253s when required for non-public methods 253s registers an offense 253s when the public method has no documentation 253s registers an offense 253s with documentation comment 253s does not register an offense with `end` on the same line 253s does not register an offense 253s without documentation comment 253s when method is public 253s registers an offense 253s registers an offense with `end` on the same line 253s registers an offense when method is public, but there were private methods before 253s when method is protected 253s does not register an offense with inline `protected` 253s does not register an offense 253s when required for non-public methods 253s registers an offense with inline `protected` 253s registers an offense 253s when method is private 253s does not register an offense 253s does not register an offense with inline `private` 253s does not register an offense with `end` on the same line 253s does not register an offense with inline `private` and `end` 253s when required for non-public methods 253s registers an offense 253s registers an offense with `end` on the same line 253s registers an offense with inline `private` and `end` 253s registers an offense with inline `private` 253s when declaring methods in a class 253s with annotation comment 253s registers an offense 253s with documentation comment 253s when method is public 253s does not register an offense 253s does not register an offense with `end` on the same line 253s with directive comment 253s registers an offense 253s without documentation comment 253s when method is private 253s does not register an offense with inline `private` and `end` 253s does not register an offense with `end` on the same line 253s does not register an offense with inline `private` 253s does not register an offense 253s when required for non-public methods 253s registers an offense with `end` on the same line 253s registers an offense 253s registers an offense with inline `private` 253s registers an offense with inline `private` and `end` 253s when method is public 253s registers an offense with `end` on the same line 253s registers an offense 253s with both public and private methods 253s when required for non-public methods 253s registers an offense 253s when the public method has documentation 253s does not register an offense 253s when the public method has no documentation 253s registers an offense 253s when declaring methods in a module 253s with documentation comment 253s when method is public 253s does not register an offense 253s does not register an offense with `end` on the same line 253s when method is module_function 253s does not register an offense for separate def 253s does not register an offense for inline def 253s without documentation comment 253s when method is module_function 253s registers an offense for separate def 253s registers an offense for inline def 253s when method is private 253s does not register an offense with inline `private` and `end` 253s does not register an offense 253s does not register an offense with inline `private` 253s does not register an offense with `end` on the same line 253s when required for non-public methods 253s registers an offense with inline `private` and `end` 253s registers an offense with inline `private` 253s registers an offense 253s registers an offense with `end` on the same line 253s when method is public 253s registers an offense with `end` on the same line 253s registers an offense 253s with both public and private methods 253s when the public method has no documentation 253s registers an offense 253s when the public method has documentation 253s does not register an offense 253s when required for non-public methods 253s registers an offense 253s 253s RuboCop::Cop::Lint::RequireParentheses 253s accepts parentheses around expression with boolean operator 253s accepts method call with parentheses in ternary 253s accepts condition that is not a call 253s registers an offense for missing parentheses around expression in ternary 253s registers an offense for missing parentheses around expression with || operator 253s accepts method calls that are all operations 253s accepts missing parentheses when method is not a predicate 253s accepts missing parentheses around expression with + operator 253s accepts method calls without parentheses followed by keyword and/or 253s accepts calls to methods that are operators 253s accepts missing parentheses when using ternary operator in square bracksts 253s registers an offense for missing parentheses around expression with && operator 253s accepts missing parentheses when using ternary operator 253s accepts calls to methods that are setters 253s when using safe navigation operator 253s registers an offense for missing parentheses around expression with && operator 253s 253s RuboCop::Cop::Style::StringConcatenation 253s does not register an offense when using `+` with all non string arguments 253s correctly handles strings with special characters 253s registers an offense and corrects for string concatenation 253s registers an offense and corrects for string concatenation as part of other expression 253s correctly handles nested concatenable parts 253s multiline 253s multiline block 253s registers an offense but does not correct 253s if condition 253s registers an offense but does not correct 253s string continuation 253s does not register an offense 253s simple expressions 253s registers an offense and corrects 253s empty quotes 253s registers offense and corrects 253s nested interpolation 253s registers an offense and corrects 253s inline block 253s registers an offense but does not correct 253s Mode = conservative 253s when first operand is not string literal 253s does not register offense 253s when first operand is string literal 253s registers offense 253s heredoc 253s registers an offense but does not correct when string concatenation with multiline heredoc text 253s registers an offense but does not correct 253s double quotes inside string 253s registers an offense and corrects with double quotes 253s registers an offense and corrects with percentage quotes 253s double quotes inside string surrounded single quotes 253s registers an offense and corrects with double quotes 253s 253s RuboCop::Cop::Style::TrailingBodyOnModule 253s autocorrects with comment after body 253s registers offense with multi-line module 253s registers offense when module definition uses semicolon 253s accepts regular module 253s registers an offense when body trails after module definition 253s autocorrects when there are multiple semicolons 253s when module is not on first line of processed_source 253s autocorrects offense 253s 253s RuboCop::RemoteConfig 253s .file 253s downloads the file if cache lifetime has been reached 253s downloads the file if the file does not exist 253s does not download the file if cache lifetime has not been reached 253s when remote URL is configured with basic auth 253s downloads the file if the file does not exist 253s downloads the file if cache lifetime has been reached 253s does not download the file if cache lifetime has not been reached 253s when the remote URL responds with 500 253s raises error 253s when the remote URL responds with 404 253s raises error 253s when the remote URL responds with 500 253s raises error 253s when remote URL is configured with token auth 253s does not download the file if cache lifetime has not been reached 253s downloads the file if the file does not exist 253s downloads the file if cache lifetime has been reached 253s when the remote URL responds with 404 253s raises error 253s when the remote URL responds with redirect 253s follows the redirect and downloads the file 253s when the remote URL responds with not modified 253s reuses the existing cached file 253s when the network is inaccessible 253s reuses the existing cached file 253s .inherit_from_remote 253s when the remote includes file starting with `./` 253s returns remote includes URI 253s 253s RuboCop::Cop::VariableForce::Assignment 253s .new 253s when an assignment node is passed 253s does not raise error 253s when any other type node is passed 253s raises error 253s when an argument declaration node is passed 253s raises error 253s #meta_assignment_node 253s when it is ||= operator assignment 253s returns or_asgn node 253s when it is multiple assignment 253s returns masgn node 253s when it is &&= operator assignment 253s returns and_asgn node 253s when it is += operator assignment 253s returns op_asgn node 253s #operator 253s when it is += operator assignment 253s returns += 253s when it is normal assignment 253s returns = 253s when it is multiple assignment 253s returns = 253s when it is ||= operator assignment 253s returns ||= 253s when it is &&= operator assignment 253s returns &&= 253s #name 253s returns the variable name 253s 253s RuboCop::Cop::Lint::RedundantRequireStatement 253s registers an offense when using requiring `enumerator` in condition 253s registers an offense when using requiring `enumerator` with modifier form 253s registers an offense when using requiring `enumerator` 253s target ruby version >= 2.5 253s register an offense and corrects when using requiring `pp` or already redundant features 253s target ruby version <= 2.4 253s does not register an offense when using requiring `pp` 253s target ruby version >= 2.1 253s register an offense and corrects when using requiring `thread` or already redundant features 253s target ruby version >= 2.2 253s registers an offense when using requiring `rational`, `complex` 253s target ruby version <= 2.6 253s does not register an offense when using requiring `ruby2_keywords` 253s target ruby version < 3.1 253s does not register an offense and corrects when using requiring `fiber` 253s target ruby version >= 3.1 253s registers an offense and corrects when using requiring `fiber` or already redundant features 253s target ruby version >= 3.2 253s registers an offense and corrects when using requiring `set` 253s target ruby version >= 2.7 253s registers an offense when using requiring `ruby2_keywords` or already redundant features 253s target ruby version <= 2.1 253s does not register an offense when using requiring `rational`, `complex` 253s target ruby version <= 2.0 254s does not register an offense when using requiring `thread` 254s 254s RuboCop::Cop::Layout::SpaceBeforeComment 254s accepts an EOL comment with a preceding space 254s accepts a comment that begins a line 254s accepts a doc comment 254s registers an offense and corrects missing space before an EOL comment 254s registers an offense and corrects after a heredoc 254s 254s RuboCop::Cop::EnforceSuperclass 254s registers an offense for Class.new definition 254s registers an offense for top-level constant ::Class.new definition 254s registers an offense for models that subclass ActiveRecord::Base 254s registers an offense for model defined using top-level 254s registers an offense for models that subclass ::ActiveRecord::Base 254s registers an offense for single-line definitions 254s when MyModel subclasses ApplicationRecord 254s behaves like no offense 254s registers no offenses for `MyModel = Class.new(ApplicationRecord) do 254s end 254s MyModel = Class.new(ApplicationRecord) 254s ` 254s behaves like no offense 254s registers no offenses for `MyModel = ::Class.new(::ApplicationRecord) do 254s end 254s MyModel = ::Class.new(::ApplicationRecord) 254s ` 254s behaves like no offense 254s registers no offenses for `class MyModel < ::ApplicationRecord; end` 254s behaves like no offense 254s registers no offenses for `class MyModel < ApplicationRecord; end` 254s when ApplicationRecord subclasses ActiveRecord::Base 254s behaves like no offense 254s registers no offenses for `ApplicationRecord = Class.new(ActiveRecord::Base) 254s ` 254s behaves like no offense 254s registers no offenses for `class ::ApplicationRecord < ActiveRecord::Base; end` 254s behaves like no offense 254s registers no offenses for `class ApplicationRecord < ActiveRecord::Base; end` 254s behaves like no offense 254s registers no offenses for `::ApplicationRecord = ::Class.new(::ActiveRecord::Base) do; end 254s ` 254s behaves like no offense 254s registers no offenses for `ApplicationRecord = Class.new(::ActiveRecord::Base) do; end 254s ` 254s behaves like no offense 254s registers no offenses for `::ApplicationRecord = ::Class.new(::ActiveRecord::Base) 254s ` 254s behaves like no offense 254s registers no offenses for `::ApplicationRecord = Class.new(ActiveRecord::Base) do; end 254s ` 254s behaves like no offense 254s registers no offenses for `ApplicationRecord = Class.new(ActiveRecord::Base) do; end 254s ` 254s 254s RuboCop::Cop::Lint::EmptyWhen 254s when `AllowComments: true` 254s accepts an empty when ... then body with a comment 254s accepts an empty when body with a comment 254s registers an offense for missing when body without a comment 254s when a `when` body is missing 254s registers an offense when case line has no expression 254s registers an offense for missing when body with a comment followed by else 254s registers an offense for a missing when body 254s registers an offense for missing when body with a comment 254s registers an offense for missing when ... then body followed by else 254s registers an offense for missing when ... then body 254s registers an offense for missing when body followed by else 254s when `AllowComments: false` 254s registers an offense for empty when body with a comment 254s when a `when` body is present 254s accepts case with when ... then statements 254s accepts with no case line expression 254s accepts case with when bodies and else clause 254s accepts case with when ... then statements and else clause 254s accepts case with when bodies 254s 254s RuboCop::Cop::Style::CaseEquality 254s when AllowOnSelfClass is true 254s does not fail when the receiver is implicit 254s does not register an offense for === when the receiver is not a camel cased constant 254s registers an offense and corrects for === when the receiver is a regexp 254s registers an offense and corrects for === when the receiver is self.klass 254s registers an offense and does not correct for === when receiver is of some other type 254s does not register an offense for === when the receiver is self.class 254s registers an offense and corrects for === when the receiver is a range 254s when AllowOnConstant is false 254s registers an offense and corrects for === when the receiver is a range 254s registers an offense and does not correct for === when receiver is of some other type 254s registers an offense and corrects for === when the receiver is a regexp 254s does not register an offense for === when the receiver is not a camel cased constant 254s registers an offense and corrects for === when the receiver is a constant 254s does not fail when the receiver is implicit 254s when AllowOnSelfClass is false 254s registers an offense and corrects for === when the receiver is a regexp 254s registers an offense and does not correct for === when receiver is of some other type 254s does not fail when the receiver is implicit 254s does not register an offense for === when the receiver is not a camel cased constant 254s registers an offense and corrects for === when the receiver is self.class 254s registers an offense and corrects for === when the receiver is a range 254s when AllowOnConstant is true 254s registers an offense and corrects for === when the receiver is a range 254s does not register an offense for === when the receiver is a constant 254s does not fail when the receiver is implicit 254s registers an offense and corrects for === when the receiver is a regexp 254s registers an offense and does not correct for === when receiver is of some other type 254s does not register an offense for === when the receiver is not a camel cased constant 254s 254s RuboCop::Cop::Style::HashTransformValues 254s below Ruby 2.6 254s does not flag _.to_h{...} 254s when using Ruby 2.6 or newer 254s does not flag `_.to_h{...}` when both key & value are transformed 254s flags _.to_h{...} when transform_values could be used 254s register and corrects an offense _.to_h{...} when value is a hash literal and is not enclosed in braces 254s does not flag `_.to_h{...}` when its receiver is an array literal 254s register and corrects an offense _.to_h{...} when value is a hash literal and is enclosed in braces 254s does not flag _.to_h {...} when value block argument is unused 254s does not flag `_.to_h{...}` when its receiver is `each_with_index` 254s does not flag `_.to_h{...}` when its receiver is `with_index` 254s does not flag `_.to_h{...}` when its receiver is `zip` 254s below Ruby 2.4 254s does not flag even if transform_values could be used 254s when using Ruby 2.4 or newer 254s does not flag _.map{...}.to_h when both key & value are transformed 254s does not flag `Hash[_.map{...}]` when its receiver is `with_index` 254s flags _.map {...}.to_h when transform_values could be used when line break before `to_h` 254s does not flag `each_with_object` when its receiver is `zip` 254s does not flag each_with_object when no transformation occurs 254s does not flag `each_with_object` when its receiver is `with_index` 254s does not flag `_.map{...}.to_h` when its receiver is `zip` 254s does not flag Hash[_.map{...}] when both key & value are transformed 254s correctly autocorrects _.map{...}.to_h with block 254s does not flag `_.map{...}.to_h` when its receiver is `with_index` 254s does not flag `each_with_object` when its receiver is `each_with_index` 254s does not flag `Hash[_.map{...}]` when its receiver is an array literal 254s does not flag `Hash[_.map{...}]` when its receiver is `each_with_index` 254s does not flag value transformation when receiver is array literal 254s does not flag `Hash[_.map{...}]` when its receiver is `zip` 254s flags _.map {...}.to_h when transform_values could be used when wrapped in another block 254s does not flag each_with_object when receiver is array literal 254s does not flag `each_with_object` when its argument is used in the value 254s flags Hash[_.map{...}] when transform_values could be used 254s does not flag each_with_object when both key & value are transformed 254s does not flag `_.map{...}.to_h` when its receiver is `each_with_index` 254s does not flag value transformation in the absence of to_h 254s does not flag each_with_object when value transformation uses key 254s does not flag each_with_object when its argument is not modified 254s does not flag _.map {...}.to_h when value block argument is unused 254s flags _.map {...}.to_h when transform_values could be used 254s with multiline block 254s flags each_with_object when transform_values could be used 254s with safe navigation operator 254s flags each_with_object when transform_values could be used 254s with inline block 254s flags each_with_object when transform_values could be used 254s 254s RuboCop::Cop::Layout::SpaceAfterColon 254s registers an offense and corrects a keyword optional argument without a space 254s accepts colons in symbols 254s accepts colons in strings 254s accepts hash rockets 254s accepts if 254s accepts hashes with a space after colons 254s accepts colon in ternary followed by space 254s registers an offense and corrects colon without space after it 254s accepts colons denoting required keyword argument 254s accepts required keyword arguments 254s Ruby >= 3.1 254s does not register an offense colon without space after it when using hash value omission 254s accepts colons denoting hash value omission argument 254s 254s RuboCop::Cop::Style::NumericLiteralPrefix 254s binary literals 254s registers an offense for uppercase prefix 254s does not register offense for lowercase prefix 254s hex literals 254s registers an offense for uppercase prefix 254s does not register offense for lowercase prefix 254s octal literals 254s when config is zero_with_o 254s does not register offense for lowercase prefix 254s registers an offense for prefixes `0` and `0O` 254s when config is zero_only 254s registers an offense for prefix `0O` and `0o` 254s does not register offense for prefix `0` 254s decimal literals 254s does not register offense for no prefix 254s registers an offense for prefixes 254s 254s RuboCop::Cop::Bundler::DuplicatedGem 254s when investigating Ruby files 254s does not register any offenses 254s when investigating Gemfiles 254s does not register an offense when gem is duplicated within `case` statement 254s does not register an offense when gem is duplicated within `if-else` statement 254s does not register an offense when gem is duplicated within `if-elsif` statement 254s registers an offense when gem from default group is conditionally duplicated 254s and the file is empty 254s does not register any offenses 254s and no duplicate gems are present 254s does not register any offenses 254s and a gem is duplicated in default group 254s registers an offense 254s and a duplicated gem is in a git/path/group/platforms block 254s registers an offense 254s 254s RuboCop::Cop::Lint::UnusedMethodArgument 254s when IgnoreEmptyMethods config parameter is set 254s registers an offense for a non-empty method with multiple unused parameters 254s accepts an empty singleton method with a single unused parameter 254s accepts an empty method with a single unused parameter 254s accepts an empty method with multiple unused parameters 254s registers an offense for a non-empty method with a single unused parameter 254s inspection 254s when a block argument is unused 254s does not care 254s when an argument with a default value is unused 254s registers an offense and preserves the default value 254s when a variable is unused 254s does not care 254s in a method calling `super` without arguments 254s when a method argument is not used explicitly 254s accepts since the arguments are guaranteed to be the same as superclass' ones and the user has no control on them 254s in a method calling `binding` with arguments 254s when a method argument is unused 254s registers an offense 254s when an underscore-prefixed method argument is unused 254s accepts 254s when an optional keyword argument is unused 254s registers an offense but does not suggest underscore-prefix 254s and AllowUnusedKeywordArguments set 254s does not care 254s in a method calling `binding` without arguments 254s accepts all arguments 254s inside another method definition 254s registers offenses 254s when a singleton method argument is unused 254s registers an offense 254s when a method argument is used 254s accepts 254s when a trailing block argument is unused 254s registers an offense and removes the unused block arg 254s in a method calling `super` with arguments 254s when a method argument is unused 254s registers an offense 254s when a method takes multiple arguments 254s and all the arguments are unused 254s registers offenses and suggests the use of `*` and autocorrects to add underscore-prefix to all arguments 254s and an argument is unused 254s registers an offense and adds underscore-prefix 254s and one argument is assigned to another, whilst other's value is not used 254s registers an offense 254s and arguments are swap-assigned 254s accepts 254s and there is some whitespace around the unused argument 254s registers an offense and preserves whitespace 254s when a splat argument is unused 254s registers an offense and preserves the splat 254s when a required keyword argument is unused 254s when a required keyword argument is unused 254s registers an offense but does not suggest underscore-prefix 254s when IgnoreNotImplementedMethods config parameter is set 254s accepts an empty singleton method with a single unused parameter &raise NotImplementedError 254s accepts a method with a single unused parameter & fails without message 254s accepts a method with a single unused parameter & raises NotImplementedError, message 254s accepts a method with a single unused parameter & raises NotImplementedError 254s accepts a method with a single unused parameter & raises ::NotImplementedError 254s accepts an empty method with multiple unused parameters 254s registers an offense for a non-empty method with multiple unused parameters 254s accepts a method with a single unused parameter & fails with message 254s registers an offense for a non-empty method with a single unused parameter 254s 254s RuboCop::Formatter::GitHubActionsFormatter 254s #finished 254s when file is relative to the current directory 254s reports offenses as error with the relative path 254s when fail level is defined 254s reports offenses below fail level as warnings 254s reports offenses above or at fail level as errors 254s when offenses are detected 254s reports offenses as errors 254s when no offenses are detected 254s does not print anything 254s when message contains % 254s escapes message 254s 254s RuboCop::Cop::Security::JSONLoad 254s registers an offense and corrects JSON.restore 254s does not register an offense for JSON under another namespace 254s allows JSON.dump 254s registers an offense and corrects JSON.load 254s allows JSON.parse 254s 254s RuboCop::Runner 254s #run with cops autocorrecting each-other 254s with two pairs of conflicting cops 254s with display options 254s --display-only-correctable 254s ommits uncorrectable `Layout/LineLength` 254s returns false 254s --display-only-safe-correctable 254s ommits unsafe correctable `Style/FrozenStringLiteral` 254s returns false 254s if there is an offense in an inspected file 254s aborts because of an infinite loop 254s with three cop cycle 254s if there is an offense in an inspected file 254s aborts because of an infinite loop 254s with two conflicting cops 254s if there is an offense in an inspected file 254s aborts because of an infinite loop 254s if there are multiple offenses in an inspected file 254s aborts because of an infinite loop 254s #run when interrupted 254s with SIGINT 255s returns false 255s #run 255s if there are no offenses in inspected files 255s returns true 255s if -s/--stdin is used with an offense 255s sends the offense to a formatter 255s returns false 255s if there is an offense in an inspected file 255s returns false 255s sends the offense to a formatter 255s if a cop crashes 255s does not call ResultCache#save 255s 255s RuboCop::Cop::Offense 255s does not blow up if a message contains % 255s overrides #to_s 255s redefines == to compare offenses based on their contents 255s is frozen 255s has a few required attributes 255s #location 255s is frozen 255s offenses that span multiple lines 255s highlights the first line 255s #message 255s is frozen 255s #cop_name 255s is frozen 255s when the location is pseudo 255s returns a source line 255s returns the first line 255s returns a column length 255s returns a location with valid size and length 255s returns a column range 255s returns the last column 255s returns the last line 255s returns a real column 255s returns a line 255s returns a column 255s #severity 255s is frozen 255s #severity_level 255s when severity is :refactor 255s is 2 255s when severity is :info 255s is 1 255s when severity is :fatal 255s is 6 255s offenses that span part of a line 255s highlights the first line 255s #<=> 255s when receiver has {:line=>5, :col=>6} and other has {:line=>5, :col=>5} 255s returns 1 255s when receiver has {:cop=>"B"} and other has {:cop=>"A"} 255s returns 1 255s when receiver has {:line=>6, :cop=>"A"} and other has {:line=>5, :cop=>"B"} 255s returns 1 255s when receiver has {:col=>6, :cop=>"A"} and other has {:col=>5, :cop=>"B"} 255s returns 1 255s when receiver has {} and other has {} 255s returns 0 255s when receiver has {:line=>6, :col=>4} and other has {:line=>5, :col=>5} 255s returns 1 255s when receiver has {:line=>6} and other has {:line=>5} 255s returns 1 255s when unknown severity is passed 255s raises error 255s 255s RuboCop::Cop::Lint::ScriptPermission 255s with file permission 0755 255s accepts without shebang line 255s accepts with blank 255s accepts with shebang line 255s with stdin 255s skips investigation 255s with file permission 0644 255s registers an offense for script permission 255s if autocorrection is off 255s leaves the file intact 255s 255s RuboCop::Cop::Lint::ReturnInVoidContext 255s with an initialize method containing a return with a value 255s registers an offense 255s with a setter method containing a return with a value 255s registers an offense 255s when return is in top scope 255s accepts 255s with a class method called initialize containing a return 255s accepts 255s with a setter method containing a return without a value 255s accepts 255s with a non initialize method containing a return 255s accepts 255s with an initialize method containing a return without a value 255s accepts 255s 255s RuboCop::Cop::Lint::Syntax 255s .offenses_from_processed_source 255s with a parser error 255s returns an offense 255s with --display-cop-names option 255s returns an offense with cop name 255s with a diagnostic error 255s returns an offense 255s with --display-cop-names option 255s returns an offense with cop name 255s with --autocorrect --disable-uncorrectable options 255s returns an offense 255s 255s RuboCop::Cop::Layout::LeadingCommentSpace 255s does not register an offense for more than one # 255s does not register an offense for # followed by no text 255s does not register an offense for more than one space 255s accepts =begin/=end comments 255s registers an offense and corrects comment without leading space 255s does not register an offense for #! on first line 255s registers an offense and corrects #! after the first line 255s does not register an offense for only #s 255s accepts sprockets directives 255s RDoc syntax 255s does not register an offense when using `#++` or `#--` 255s registers an offense when starting `:` 255s Doxygen style 255s when config option is enabled 255s does not register offense when using Doxygen style 255s when config option is disabled 255s registers an offense and corrects using Doxygen style 255s Gemfile Ruby comment 255s when config option is disabled 255s registers an offense when using ruby config as comment 255s when config option is enabled 255s file not named Gemfile 255s registers an offense when using ruby config as comment 255s file named Gemfile 255s does not register an offense when using ruby config as comment 255s file named config.ru 255s does not register an offense for #\ on first line 255s registers an offense and corrects for #\ after the first line 255s file not named config.ru 255s registers an offense and corrects #\ on first line 255s registers an offense and corrects #\ after the first line 255s 255s RuboCop::Cop::Style::EmptyLiteral 255s Empty String 255s registers an offense for ::String.new 255s does not register an offense for String.new("top") 255s does not register an offense for ::String.new("top") 255s registers an offense for String.new 255s registers an offense for String.new() 255s when double-quoted string literals are preferred 255s registers an offense for ::String.new 255s registers an offense for String.new 255s when frozen string literals is enabled 255s does not register an offense for String.new 255s when Style/FrozenStringLiteral is enabled 255s and there is a frozen_string_literal: false comment 255s registers an offense and corrects 255s and there is no magic comment 255s does not register an offense 255s Empty Array 255s registers an offense for ::Array.new 255s registers an offense for Array.new() 255s does not register an offense for Array.new(3) 255s autocorrects Array.new in block in block 255s does not register an offense for ::Array.new with block 255s does not register an offense Array.new with block 255s does not register Array.new with block in other block 255s registers an offense for Array.new 255s Empty Hash 255s does not register an offense for Hash.new { block } 255s autocorrects Hash.new to {} and wraps all arguments in parentheses when it is the first argument to super 255s registers an offense for Hash.new() 255s does not register an offense for ::Hash.new(3) 255s does not register an offense for ::Hash.new { block } 255s registers an offense for Hash.new 255s autocorrects Hash.new in block 255s registers an offense for ::Hash.new 255s autocorrects Hash.new to {} as the first parameter to a method 255s autocorrects Hash.new to {} as the only parameter to a method 255s does not register an offense for Hash.new(3) 255s autocorrects Hash.new to {} in various contexts 255s autocorrects Hash.new to {} and wraps it in parentheses when it is the only argument to super 255s Ruby 2.7 255s does not register an offense for Hash.new { _1[_2] = [] } 255s does not register an offense for ::Hash.new { _1[_2] = [] } 255s 255s RuboCop::Cop::Lint::RandOne 255s behaves like offenses 255s rand(1.0) 255s registers an offense 255s behaves like offenses 255s Kernel.rand(-1.0) 255s registers an offense 255s behaves like offenses 255s Kernel.rand(-1) 255s registers an offense 255s behaves like no offense 255s rand(2) 255s does not register an offense 255s behaves like offenses 255s rand 1 255s registers an offense 255s behaves like offenses 255s Kernel.rand 1.0 255s registers an offense 255s behaves like no offense 255s rand(-1..1) 255s does not register an offense 255s behaves like offenses 255s ::Kernel.rand(1) 255s registers an offense 255s behaves like no offense 255s rand 255s does not register an offense 255s behaves like offenses 255s rand(-1) 255s registers an offense 255s behaves like offenses 255s Kernel.rand(1) 255s registers an offense 255s behaves like no offense 255s ::Kernel.rand 255s does not register an offense 255s behaves like no offense 255s Kernel.rand 255s does not register an offense 255s behaves like no offense 255s Kernel.rand(-1..1) 255s does not register an offense 255s behaves like offenses 255s rand(-1.0) 255s registers an offense 255s behaves like no offense 255s Kernel.rand 2 255s does not register an offense 255s 255s RuboCop::Cop::Lint::SelfAssignment 255s registers an offense when using multiple var self-assignment 255s registers an offense when using shorthand-or var self-assignment 255s registers an offense when using local var self-assignment 255s does not register an offense when using multiple var assignment through method call 255s registers an offense when using global var self-assignment 255s does not register an offense when using constant var assignment for constant from another scope 255s does not register an offense when using constant var or-assignment for constant from another scope 255s does not register an offense when using class var assignment 255s registers an offense when using class var self-assignment 255s does not register an offense when using multiple var assignment through splat 255s does not register an offense when using shorthand-or var assignment 255s registers an offense when using constant var self-assignment 255s does not register an offense when using shorthand-and var assignment 255s does not register an offense when using local var assignment 255s does not register an offense when using multiple var assignment 255s registers an offense when using instance var self-assignment 255s does not register an offense when using instance var assignment 255s does not register an offense when using global var assignment 255s registers an offense when using multiple var self-assignment through array 255s registers an offense when using shorthand-and var self-assignment 255s 255s RuboCop::Cop::Utils::FormatString 255s finds the correct number of fields 255s #valid? 255s returns true when there are only named formats 255s returns false when there are unnumbered and named formats 255s returns true when there are only unnumbered formats 255s returns true when there are only numbered formats 255s returns false when there are numbered and named formats 255s returns true when there are only named with escaped `%` formats 255s returns false when there are unnumbered and numbered formats 255s #named_interpolation? 255s behaves like named format sequence 255s detects named format sequence 255s does not detect escaped named format sequence 255s behaves like named format sequence 255s detects named format sequence 255s does not detect escaped named format sequence 255s behaves like named format sequence 255s detects named format sequence 255s does not detect escaped named format sequence 255s behaves like named format sequence 255s does not detect escaped named format sequence 255s detects named format sequence 255s 255s RuboCop::ConfigRegeneration 255s #options 255s when there is a blank todo file 255s is expected to eq {:auto_gen_config=>true} 255s it parses options from the generation comment 255s is expected to eq {:auto_gen_config=>true, :auto_gen_only_exclude=>true, :auto_gen_timestamp=>false, :exclude_limit=>"100", :offense_counts=>false} 255s when no todo file exists 255s is expected to eq {:auto_gen_config=>true} 255s when the todo file is malformed 255s is expected to eq {:auto_gen_config=>true} 255s 255s RuboCop::Cop::Style::CombinableLoops 255s when looping method 255s does not register an offense for when the same method with different arguments 255s does not register an offense when the same loops are interleaved with some code 255s does not register an offense for when the same method with different arguments and safe navigation 255s does not register an offense when each branch contains the same single loop over the same collection 255s does not register an offense when the same loop method is used over different collections 255s registers an offense when looping over the same data as previous loop 255s does not register an offense when different loop methods are used over the same collection 255s Ruby 2.7 255s registers an offense when looping over the same data as previous loop in numblocks 255s when for loop 255s does not register an offense when each branch contains the same single loop over the same collection 255s does not register an offense when the same loops are interleaved with some code 255s registers an offense when looping over the same data as previous loop 255s does not register an offense when the same loop method is used over different collections 255s 255s RuboCop::Cop::Security::IoMethods 255s when using `IO` receiver and string argument that starts with a pipe character (`" | command"`) 255s behaves like accepts 255s does not register an offense when using `IO.read(" | command")` 255s behaves like accepts 255s does not register an offense when using `IO.readlines(" | command")` 255s behaves like accepts 255s does not register an offense when using `IO.write(" | command", "hi")` 255s behaves like accepts 255s does not register an offense when using `IO.foreach(" | command") { |x| puts x }` 255s behaves like accepts 255s does not register an offense when using `IO.binwrite(" | command", "hi")` 255s when using `IO` receiver and variable argument 255s registers and corrects an offense when using `foreach` 255s behaves like offense 255s registers and corrects an offense when using `read` 255s behaves like offense 255s registers and corrects an offense when using `write` 255s behaves like offense 255s registers and corrects an offense when using `readlines` 255s behaves like offense 255s registers and corrects an offense when using `binread` 255s behaves like offense 255s registers and corrects an offense when using `binwrite` 255s when using no receiver 255s behaves like accepts 255s does not register an offense when using `binwrite("command", "hi")` 255s behaves like accepts 255s does not register an offense when using `write("command", "hi")` 255s behaves like accepts 255s does not register an offense when using `readlines("command")` 255s behaves like accepts 255s does not register an offense when using `read("command")` 255s behaves like accepts 255s does not register an offense when using `foreach("command") { |x| puts x }` 255s when using `IO` receiver and string argument that starts with a pipe character (`"| command"`) 255s behaves like accepts 255s does not register an offense when using `IO.binwrite("| command", "hi")` 255s behaves like accepts 255s does not register an offense when using `IO.readlines("| command")` 255s behaves like accepts 255s does not register an offense when using `IO.read("| command")` 255s behaves like accepts 255s does not register an offense when using `IO.foreach("| command") { |x| puts x }` 255s behaves like accepts 255s does not register an offense when using `IO.write("| command", "hi")` 255s when using `File` receiver 255s behaves like accepts 255s does not register an offense when using `File.binwrite(path, "hi")` 255s behaves like accepts 255s does not register an offense when using `File.readlines(path)` 255s behaves like accepts 255s does not register an offense when using `File.binread(path)` 255s behaves like accepts 255s does not register an offense when using `File.read(path)` 255s behaves like accepts 255s does not register an offense when using `File.foreach(path) { |x| puts x }` 255s when using `IO` receiver and string argument 255s registers and corrects an offense when using `foreach` 255s behaves like offense 255s registers and corrects an offense when using `write` 255s behaves like offense 255s registers and corrects an offense when using `binwrite` 255s behaves like offense 255s registers and corrects an offense when using `readlines` 255s behaves like offense 255s registers and corrects an offense when using `binwrite` 255s behaves like offense 255s registers and corrects an offense when using `read` 255s 255s RuboCop::Cop::Lint::FloatOutOfRange 255s does not register an offense for tiny little itty bitty floats 255s does not register an offense for respectably sized floats 255s does not register an offense for 0.0 255s on whopping big floats which tip the scales 255s registers an offense 255s on floats so close to zero that nobody can tell the difference 255s registers an offense 255s 255s RuboCop::Cop::Naming::InclusiveLanguage 255s identifiers 255s when CheckIdentifiers config is true 255s registers an offense 255s when CheckIdentifiers config is false 255s does not register offenses for identifiers 255s constants 255s when CheckConstants config is true 255s registers offenses for constants 255s when CheckConstants config is false 255s does not register offenses for constants 255s suggestions 255s flagged term with two suggestions 255s includes both suggestions in the offense message 255s flagged term with three or more suggestions 255s includes all suggestions in the message 255s flagged term with one suggestion 255s includes the suggestion in the offense message 255s strings 255s does not register offenses and not raise `ArgumentError` for invalid byte sequence in UTF-8 255s registers an offense for a multiline string 255s registers an offense for an interpolated string 255s registers an offense in a heredoc 255s when CheckStrings config is false 255s does not register offenses for strings 255s allowed use 255s does not register an offense for an allowed use 255s offense after an allowed use 255s registers an offense at the correct location 255s flagged term matching 255s registers an offense for a partial word match 255s registers an offense when using a flagged term 255s registers an offense when using a flagged term with mixed case 255s regex 255s registers an offense for a flagged term matched with a regexp 255s multiple offenses on a line 255s registers an offense for each word 255s disable default flagged term 255s ignores flagged terms that are set to nil 255s WholeWord: true 255s only flags when the term is a whole word 255s symbols 255s when CheckSymbols is true 255s registers an offense 255s when CheckSymbols is false 255s does not register an offense 255s variables 255s when CheckVariables config is true 255s registers offenses for instance variables 255s registers offenses for global variables 255s registers offenses for class variables 255s when CheckVariables config is false 255s does not register offenses for variables 255s filepath 255s CheckFilepaths is false 255s does not register an offense 255s multiple offenses in filename 255s registers an offense with all problematic words 255s one offense in filename 255s registers an offense 255s offense in directory name 255s registers an offense for a director 255s comments 255s registers an offense in a single line comment 255s registers an offense in a block comment 255s when CheckComments is false 255s does not register an offense 255s 255s RuboCop::Cop::Layout::EmptyComment 255s registers an offense and corrects an empty comment without space next to code 255s does not register an offense when using comment text with leading and trailing blank lines 255s does not register an offense when using comment text 255s registers an offense and corrects using multiline empty comments 255s register offenses and correct multiple empty comments next to code 255s registers an offense and corrects using an empty comment next to code 255s register offenses and correct multiple aligned empty comments next to code 255s registers an offense and corrects using single line empty comment 255s allow border comment (default) 255s does not register an offense when using border comment 255s allow margin comment (default) 255s does not register an offense when using margin comment 255s disallow border comment 255s registers an offense and corrects using border comment 255s registers an offense and corrects using single line empty comment 255s disallow margin comment 255s registers an offense and corrects using margin comment 255s 255s RuboCop::Cop::Style::DocumentDynamicEvalDefinition 255s registers an offense when using eval-type method with interpolated string that is not heredoc without comment doc 255s registers an offense when using eval-type method with string interpolation without comment docs 255s does not register an offense when using eval-type method with string interpolation with comment docs 255s does not register an offense when using eval-type method without string interpolation 255s does not register an offense when using eval-type method with interpolated string that is not heredoc with comment doc 255s block comment in heredoc 256s does not register an offense when using multiple methods 256s does not evaluate comments if there is no interpolation 256s does not register an offense for a matching block comment 256s does not register an offense when using multiple methods with split comments 256s registers an offense if the comment does not match the method 256s does not register an offense when using inline comments 256s does not register an offense when using other text 256s block comment outside heredoc 256s does not register an offense for a matching block comment before the heredoc 256s registers an offense if the comment does not match the method 256s does not register an offense for a matching block comment after the heredoc 256s does not register an offense when using inline comments 256s does not register an offense when using multiple methods 256s does not register an offense when using other text 256s 256s RuboCop::Cop::Lint::MultipleComparison 256s registers an offense for x <= y <= z 256s registers an offense for x < y >= z 256s accepts to use `&` operator 256s accepts to use `^` operator 256s registers an offense for x >= y <= z 256s registers an offense for x > y < z 256s registers an offense for x <= y >= z 256s registers an offense for x <= y > z 256s registers an offense for x <= y < z 256s registers an offense for x < y <= z 256s registers an offense for x < y < z 256s accepts to use one compare operator 256s registers an offense for x > y >= z 256s registers an offense for x > y > z 256s registers an offense for x >= y < z 256s registers an offense for x >= y > z 256s registers an offense for x >= y >= z 256s accepts to use `|` operator 256s registers an offense for x > y <= z 256s registers an offense for x < y > z 256s 256s RuboCop::Cop::Layout::MultilineOperationIndentation 256s when EnforcedStyle is indented 256s accepts two spaces indentation in assignment of array element 256s accepts indented operands inside and outside a block 256s accepts two spaces indentation of second line 256s accepts alignment inside a grouped expression 256s accepts any indentation of method parameters 256s registers an offense and corrects extra indentation of third line 256s registers an offense and corrects an unindented multiline operation that is the left operand in another operation 256s registers an offense and corrects aligned operators in assignment 256s accepts indented operands in ordinary statement 256s registers an offense for a 2 space indentation of until condition 256s accepts indented operands in if condition 256s accepts the indentation of a broken string 256s accepts double indentation of unless condition 256s registers an offense and corrects aligned code on LHS of equality operator 256s registers an offense and corrects correct + unrecognized style 256s accepts unary operations 256s registers an offense and corrects three space indentation of second line 256s accepts indentation of next unless condition 256s accepts any indentation of parameters to #[] 256s accepts indentation of return if condition 256s does not check method calls 256s accepts normal indentation inside grouped expression 256s registers an offense for a 2 space indentation of if condition 256s accepts indented operands in an array 256s accepts indentation of assignment 256s accepts two spaces indentation in assignment of local variable 256s accepts double indentation of if condition 256s accepts an expression where the first operand spans multiple lines 256s accepts indentation of return unless condition 256s accepts indentation of next if condition 256s accepts special indentation of for expression 256s accepts normal indentation of method parameters 256s registers an offense and corrects wrong indentation of for expression 256s accepts indented operands in if body 256s registers an offense for a 2 space indentation of while condition 256s accepts indented operands in for body 256s accepts indented operands in unless body 256s accepts no extra indentation of third line 256s registers an offense and corrects aligned operands in if conditions 256s accepts indented operands in while body 256s accepts double indentation of until condition 256s accepts indented operands in until body 256s registers an offense and corrects emacs ruby-mode 1.1 indentation of an expression in an array 256s registers an offense for a 2 space indentation of unless condition 256s registers an offense and corrects one space indentation of second line 256s accepts double indentation of while condition 256s registers an offense and corrects no indentation of second line 256s when indentation width is overridden for this cop 256s accepts indentation of while condition which is offset by a single normal indentation step 256s accepts indented operands in until body 256s accepts indentation of unless condition which is offset by a single normal indentation step 256s registers an offense and corrects 256s accepts indented operands in if body 256s registers an offense for a 4 space indentation of if condition 256s registers an offense for a 4 space indentation of unless condition 256s registers an offense for a 4 space indentation of while condition 256s accepts indented operands in unless body 256s accepts indented operands in while body 256s accepts indented operands in if condition 256s registers an offense for a 4 space indentation of until condition 256s accepts indentation of until condition which is offset by a single normal indentation step 256s accepts indentation of if condition which is offset by a single normal indentation step 256s when EnforcedStyle is aligned 256s accepts indented operands in for body 256s registers an offense and corrects three space indentation of second line 256s registers an offense for misaligned operands in unless condition 256s registers an offense and corrects one space indentation of second line 256s accepts any indentation of parameters to #[] 256s accepts aligned operands in if condition 256s registers an offense and corrects unaligned operands in op-assignment 256s accepts aligned operands in assignment 256s registers an offense and corrects emacs ruby-mode 1.1 indentation of an expression in an array 256s registers an offense and corrects misaligned operands in unless condition 256s registers an offense and corrects indented operand in second argument 256s accepts indented operands in an array 256s does not check method calls 256s registers an offense and corrects indented second part of string 256s accepts indented code on LHS of equality operator 256s accepts an expression where the first operand spans multiple lines 256s accepts indented operands in ordinary statement 256s accepts indented operands inside block + assignment 256s registers an offense for misaligned operands in until condition 256s registers an offense for misaligned operands in while condition 256s accepts indented operands with ternary operators 256s registers an offense for misaligned operands in if condition 256s registers an offense and corrects no indentation of second line 256s accepts unary operations 256s accepts alignment inside a grouped expression 256s accepts two spaces indentation in assignment of array element 256s registers an offense and corrects an unindented multiline operation that is the left operand in another operation 256s registers an offense and corrects misaligned string operand when plus is used 256s registers an offense and corrects indented operands in if condition 256s registers an offense and corrects misaligned string operand when the first operand has backslash continuation 256s accepts no extra indentation of third line 256s accepts aligned or:ed operands in assignment 256s accepts two spaces indentation in assignment of local variable 256s accepts indented operands inside and outside a block 256s registers an offense and corrects extra indentation of third line 256s accepts two spaces indentation of second line 256s 256s RuboCop::Cop::Layout::SpaceInsideHashLiteralBraces 256s registers an offense for correct + opposite 256s accepts hash literals with no braces 256s accepts hashes with spaces by default 256s registers an offense for hashes with no spaces if so configured 256s can handle interpolation in a braceless hash literal 256s on Hash[{ x: 1 } => [1]] 256s does not register an offense 256s when EnforcedStyle is no_space 256s accepts multiline hash 256s registers an offense for hashes with spaces 256s accepts hashes with no spaces 256s accepts multiline hash with comment 256s registers an offense for opposite + correct 256s when using method argument that both key and value are hash literals 256s accepts hashes with no spaces 256s with space inside empty braces allowed 256s registers an offense for empty braces with no space inside 256s accepts empty braces with space inside 256s when using method argument that both key and value are hash literals 256s registers hashes with no spaces 256s with newline inside empty braces not allowed 256s registers an offense 256s with space inside empty braces not allowed 256s registers an offense for empty braces with space inside 256s accepts empty braces with no space inside 256s when EnforcedStyle is compact 256s registers an offense for nested hashes with spaces 256s accepts multiline hash with comment 256s registers an offense for opposite + correct 256s accepts multiline hash 256s registers offenses for hashes with no spaces 256s doesn't register an offense for non-nested hashes with spaces 256s on { key: "{" } 256s does not register an offense 256s offending hash following empty hash 256s registers an offense on both sides 256s 256s RuboCop::Cop::Lint::IdentityComparison 256s does not register an offense when a receiver that is not `object_id` uses `==` 256s registers an offense and corrects when using `==` for comparison between `object_id`s 256s does not register an offense when using `==` for comparison between `object_id` and other 256s does not register an offense when rhs is `object_id` without receiver 256s does not register an offense when lhs is `object_id` without receiver 256s does not register an offense when using `==` 256s 256s RuboCop::Cop::Bundler::OrderedGems 256s when a gem is referenced from a variable 256s ignores the line 256s resets the sorting to a new block 256s When the gemfile is empty 256s does not register any offenses 256s When a gem that starts with a capital letter is not sorted 256s registers an offense 256s When a gem declaration takes several lines 256s registers an offense 256s When gems are alphabetically sorted 256s does not register any offenses 256s When gems are not alphabetically sorted 256s registers an offense 256s When a gem is sorted but not so when disregarding _- 256s when ConsiderPunctuation is true 256s does not register an offense 256s by default 256s registers an offense 256s When gems have an inline comment, and not sorted 256s registers an offense 256s When each individual group of line is not sorted 256s registers some offenses 256s When a gem that starts with a capital letter is sorted 256s does not register an offense 256s When there are duplicated gems in group 256s registers an offense 256s When each individual group of line is sorted 256s does not register any offenses 256s When gem groups is separated by multiline comment 256s with TreatCommentsAsGroupSeparators: true 256s accepts 256s with TreatCommentsAsGroupSeparators: false 256s registers an offense 256s When gems are asciibetically sorted irrespective of _ 256s does not register an offense 256s 256s RuboCop::Cop::Lint::NonLocalExitFromIterator 256s allows return in define_method 256s allows return with value 256s allows return in define_singleton_method 256s when lambda is inside of block followed by method chain 256s allows 256s when the return is within a nested method definition 256s allows return in an instance method definition 256s allows return in a class method definition 256s when block in middle of nest is followed by method chain 256s registers offenses 256s when block is followed by method chain 256s and has multiple arguments 256s registers an offense 256s and has no argument 256s allows 256s and has single argument 256s registers an offense 256s when block is lambda 256s allows 256s when block is not followed by method chain 256s allows 256s 256s RuboCop::Cop::Lint::DuplicateCaseCondition 256s registers an offense for repeated logical operator when expressions 256s accepts non-redundant case expressions 256s registers an offense for repeated case conditionals 256s accepts trivial case expressions 256s registers multiple offenses for multiple repeated case conditionals 256s accepts non-redundant case expressions with an else expression 256s accepts similar but not equivalent && expressions 256s registers multiple offenses for repeated multi-value conditionals 256s registers an offense for subsequent repeated case conditionals 256s 256s RuboCop::Cop::Lint::LiteralInInterpolation 256s handles nested interpolations when autocorrecting 256s handles backslash in double quotes when autocorrecting 256s accepts interpolation of erange where endpoints are not literals 256s accepts empty interpolation 256s accepts interpolation of xstr 256s handles double quotes in single quotes when autocorrecting 256s handles backslash in single quotes when autocorrecting 256s does not register an offense when space literal at the end of heredoc line 256s accepts interpolation of irange where endpoints are not literals 256s behaves like literal interpolation 256s removes interpolation around 1..2 when there is more text 256s registers an offense for 1..2 in interpolation and removes interpolation around it 256s registers an offense only for final 1..2 in interpolation 256s removes interpolation around multiple 1..2 256s when there is non-literal and literal interpolation 256s when literal interpolation is before non-literal 256s only removes interpolation around literal 256s when literal interpolation is after non-literal 256s only removes interpolation around literal 256s behaves like literal interpolation 256s removes interpolation around multiple %w[] 256s registers an offense only for final %w[] in interpolation 256s registers an offense for %w[] in interpolation and removes interpolation around it 256s removes interpolation around %w[] when there is more text 256s when there is non-literal and literal interpolation 256s when literal interpolation is before non-literal 256s only removes interpolation around literal 256s when literal interpolation is after non-literal 256s only removes interpolation around literal 256s behaves like literal interpolation 256s removes interpolation around true when there is more text 256s registers an offense for true in interpolation and removes interpolation around it 256s removes interpolation around multiple true 256s registers an offense only for final true in interpolation 256s when there is non-literal and literal interpolation 256s when literal interpolation is after non-literal 256s only removes interpolation around literal 256s when literal interpolation is before non-literal 256s only removes interpolation around literal 256s behaves like literal interpolation 256s removes interpolation around :"symbol" when there is more text 256s registers an offense for :"symbol" in interpolation and removes interpolation around it 256s removes interpolation around multiple :"symbol" 256s registers an offense only for final :"symbol" in interpolation 256s when there is non-literal and literal interpolation 256s when literal interpolation is before non-literal 256s only removes interpolation around literal 256s when literal interpolation is after non-literal 256s only removes interpolation around literal 256s behaves like literal interpolation in words literal 256s accepts interpolation of an array literal containing a symbol with space in %W[] 256s removes interpolation of a symbol literal without space in %W[] 256s accepts interpolation of a symbol literal with space in %W[] 256s accepts interpolation of a string literal with space in %W[] 256s removes interpolation of an array containing a symbol literal without space in %W[] 256s accepts interpolation of an array literal containing a string with space in %W[] 256s removes interpolation of an array containing a string literal without space in %W[] 256s removes interpolation of a string literal without space in %W[] 256s behaves like special keywords 256s accepts strings like __END__ 256s registers an offense and autocorrects interpolation after __END__ 256s behaves like literal interpolation 256s registers an offense for 1 in interpolation and removes interpolation around it 256s registers an offense only for final 1 in interpolation 256s removes interpolation around multiple 1 256s removes interpolation around 1 when there is more text 256s when there is non-literal and literal interpolation 256s when literal interpolation is before non-literal 256s only removes interpolation around literal 256s when literal interpolation is after non-literal 256s only removes interpolation around literal 256s behaves like special keywords 256s registers an offense and autocorrects interpolation after __LINE__ 256s accepts strings like __LINE__ 256s behaves like literal interpolation 256s registers an offense only for final 1_123 in interpolation 256s removes interpolation around multiple 1_123 256s removes interpolation around 1_123 when there is more text 256s registers an offense for 1_123 in interpolation and removes interpolation around it 256s when there is non-literal and literal interpolation 256s when literal interpolation is before non-literal 256s only removes interpolation around literal 256s when literal interpolation is after non-literal 256s only removes interpolation around literal 256s behaves like literal interpolation 256s removes interpolation around nil when there is more text 256s registers an offense only for final nil in interpolation 256s removes interpolation around multiple nil 256s registers an offense for nil in interpolation and removes interpolation around it 256s when there is non-literal and literal interpolation 256s when literal interpolation is after non-literal 256s only removes interpolation around literal 256s when literal interpolation is before non-literal 256s only removes interpolation around literal 256s behaves like non-special string literal interpolation 256s registers an offense for 'foo' and removes the interpolation and quotes around 'foo' 256s behaves like special keywords 256s registers an offense and autocorrects interpolation after __ENCODING__ 256s accepts strings like __ENCODING__ 256s behaves like literal interpolation 256s removes interpolation around false when there is more text 256s registers an offense for false in interpolation and removes interpolation around it 256s registers an offense only for final false in interpolation 256s removes interpolation around multiple false 256s when there is non-literal and literal interpolation 256s when literal interpolation is before non-literal 256s only removes interpolation around literal 256s when literal interpolation is after non-literal 256s only removes interpolation around literal 256s behaves like literal interpolation 256s registers an offense only for final %w[v1] in interpolation 256s removes interpolation around multiple %w[v1] 256s registers an offense for %w[v1] in interpolation and removes interpolation around it 256s removes interpolation around %w[v1] when there is more text 256s when there is non-literal and literal interpolation 256s when literal interpolation is before non-literal 256s only removes interpolation around literal 256s when literal interpolation is after non-literal 256s only removes interpolation around literal 256s behaves like literal interpolation 256s removes interpolation around multiple :symbol 256s registers an offense only for final :symbol in interpolation 256s removes interpolation around :symbol when there is more text 256s registers an offense for :symbol in interpolation and removes interpolation around it 256s when there is non-literal and literal interpolation 256s when literal interpolation is after non-literal 256s only removes interpolation around literal 256s when literal interpolation is before non-literal 256s only removes interpolation around literal 256s behaves like literal interpolation 256s removes interpolation around 0o377 when there is more text 256s registers an offense for 0o377 in interpolation and removes interpolation around it 256s removes interpolation around multiple 0o377 256s registers an offense only for final 0o377 in interpolation 256s when there is non-literal and literal interpolation 256s when literal interpolation is before non-literal 256s only removes interpolation around literal 256s when literal interpolation is after non-literal 256s only removes interpolation around literal 256s behaves like literal interpolation 256s removes interpolation around multiple -1 256s registers an offense for -1 in interpolation and removes interpolation around it 256s removes interpolation around -1 when there is more text 256s registers an offense only for final -1 in interpolation 256s when there is non-literal and literal interpolation 256s when literal interpolation is after non-literal 256s only removes interpolation around literal 256s when literal interpolation is before non-literal 256s only removes interpolation around literal 256s behaves like literal interpolation 256s removes interpolation around multiple %i[ s1 s2 ] 257s removes interpolation around %i[ s1 s2 ] when there is more text 257s registers an offense only for final %i[ s1 s2 ] in interpolation 257s registers an offense for %i[ s1 s2 ] in interpolation and removes interpolation around it 257s when there is non-literal and literal interpolation 257s when literal interpolation is before non-literal 257s only removes interpolation around literal 257s when literal interpolation is after non-literal 257s only removes interpolation around literal 257s in string-like contexts 257s removes interpolation in regular expressions 257s removes interpolation in backticks 257s removes interpolation in symbols 257s behaves like literal interpolation 257s registers an offense for 2.0 in interpolation and removes interpolation around it 257s removes interpolation around 2.0 when there is more text 257s registers an offense only for final 2.0 in interpolation 257s removes interpolation around multiple 2.0 257s when there is non-literal and literal interpolation 257s when literal interpolation is after non-literal 257s only removes interpolation around literal 257s when literal interpolation is before non-literal 257s only removes interpolation around literal 257s behaves like literal interpolation 257s registers an offense for %w[v1 v2] in interpolation and removes interpolation around it 257s removes interpolation around %w[v1 v2] when there is more text 257s removes interpolation around multiple %w[v1 v2] 257s registers an offense only for final %w[v1 v2] in interpolation 257s when there is non-literal and literal interpolation 257s when literal interpolation is before non-literal 257s only removes interpolation around literal 257s when literal interpolation is after non-literal 257s only removes interpolation around literal 257s behaves like literal interpolation 257s registers an offense for ["a", "b"] in interpolation and removes interpolation around it 257s registers an offense only for final ["a", "b"] in interpolation 257s removes interpolation around multiple ["a", "b"] 257s removes interpolation around ["a", "b"] when there is more text 257s when there is non-literal and literal interpolation 257s when literal interpolation is after non-literal 257s only removes interpolation around literal 257s when literal interpolation is before non-literal 257s only removes interpolation around literal 257s behaves like literal interpolation 257s registers an offense only for final 0xaabb in interpolation 257s registers an offense for 0xaabb in interpolation and removes interpolation around it 257s removes interpolation around 0xaabb when there is more text 257s removes interpolation around multiple 0xaabb 257s when there is non-literal and literal interpolation 257s when literal interpolation is after non-literal 257s only removes interpolation around literal 257s when literal interpolation is before non-literal 257s only removes interpolation around literal 257s behaves like special keywords 257s accepts strings like __FILE__ 257s registers an offense and autocorrects interpolation after __FILE__ 257s behaves like literal interpolation 257s removes interpolation around multiple %i[s1 s2] 257s registers an offense for %i[s1 s2] in interpolation and removes interpolation around it 257s removes interpolation around %i[s1 s2] when there is more text 257s registers an offense only for final %i[s1 s2] in interpolation 257s when there is non-literal and literal interpolation 257s when literal interpolation is before non-literal 257s only removes interpolation around literal 257s when literal interpolation is after non-literal 257s only removes interpolation around literal 257s behaves like literal interpolation 257s registers an offense only for final 123_456_789_123_456_789 in interpolation 257s registers an offense for 123_456_789_123_456_789 in interpolation and removes interpolation around it 257s removes interpolation around multiple 123_456_789_123_456_789 257s removes interpolation around 123_456_789_123_456_789 when there is more text 257s when there is non-literal and literal interpolation 257s when literal interpolation is after non-literal 257s only removes interpolation around literal 257s when literal interpolation is before non-literal 257s only removes interpolation around literal 257s behaves like literal interpolation 257s removes interpolation around [] when there is more text 257s removes interpolation around multiple [] 257s registers an offense for [] in interpolation and removes interpolation around it 257s registers an offense only for final [] in interpolation 257s when there is non-literal and literal interpolation 257s when literal interpolation is after non-literal 257s only removes interpolation around literal 257s when literal interpolation is before non-literal 257s only removes interpolation around literal 257s behaves like literal interpolation in words literal 257s accepts interpolation of a string literal with space in %I[] 257s removes interpolation of an array containing a symbol literal without space in %I[] 257s removes interpolation of a string literal without space in %I[] 257s removes interpolation of an array containing a string literal without space in %I[] 257s removes interpolation of a symbol literal without space in %I[] 257s accepts interpolation of an array literal containing a string with space in %I[] 257s accepts interpolation of an array literal containing a symbol with space in %I[] 257s accepts interpolation of a symbol literal with space in %I[] 257s behaves like literal interpolation 257s registers an offense only for final 1...2 in interpolation 257s removes interpolation around 1...2 when there is more text 257s removes interpolation around multiple 1...2 257s registers an offense for 1...2 in interpolation and removes interpolation around it 257s when there is non-literal and literal interpolation 257s when literal interpolation is after non-literal 257s only removes interpolation around literal 257s when literal interpolation is before non-literal 257s only removes interpolation around literal 257s behaves like non-special string literal interpolation 257s registers an offense for "foo" and removes the interpolation and quotes around "foo" 257s behaves like literal interpolation 257s removes interpolation around multiple {"a" => "b"} 257s registers an offense only for final {"a" => "b"} in interpolation 257s removes interpolation around {"a" => "b"} when there is more text 257s registers an offense for {"a" => "b"} in interpolation and removes interpolation around it 257s when there is non-literal and literal interpolation 257s when literal interpolation is before non-literal 257s only removes interpolation around literal 257s when literal interpolation is after non-literal 257s only removes interpolation around literal 257s behaves like literal interpolation 257s registers an offense only for final %i[s1 s2] in interpolation 257s registers an offense for %i[s1 s2] in interpolation and removes interpolation around it 257s removes interpolation around multiple %i[s1 s2] 257s removes interpolation around %i[s1 s2] when there is more text 257s when there is non-literal and literal interpolation 257s when literal interpolation is before non-literal 257s only removes interpolation around literal 257s when literal interpolation is after non-literal 257s only removes interpolation around literal 257s behaves like literal interpolation 257s removes interpolation around %I[s1 s2] when there is more text 257s registers an offense for %I[s1 s2] in interpolation and removes interpolation around it 257s registers an offense only for final %I[s1 s2] in interpolation 257s removes interpolation around multiple %I[s1 s2] 257s when there is non-literal and literal interpolation 257s when literal interpolation is after non-literal 257s only removes interpolation around literal 257s when literal interpolation is before non-literal 257s only removes interpolation around literal 257s behaves like literal interpolation 257s registers an offense for 1.2e-3 in interpolation and removes interpolation around it 257s registers an offense only for final 1.2e-3 in interpolation 257s removes interpolation around 1.2e-3 when there is more text 257s removes interpolation around multiple 1.2e-3 257s when there is non-literal and literal interpolation 257s when literal interpolation is after non-literal 257s only removes interpolation around literal 257s when literal interpolation is before non-literal 257s only removes interpolation around literal 257s 257s RuboCop::Cop::Layout::ClassStructure 257s registers an offense and corrects when there is a comment in the macro method 257s registers an offense and corrects when literal constant is after method definitions 257s registers an offense and corrects when xstr heredoc constant is defined after public method 257s registers an offense and corrects when dstr heredoc constant is defined after public method 257s registers an offense and corrects when str heredoc constant is defined after public method 257s constant is not a literal 257s registers offense but does not autocorrect 257s when the first line ends with a comment 257s reports an offense and swaps the lines 257s initializer is private and comes after attribute macro 257s registers an offense and autocorrects 257s simple example 257s is expected to eq "class Person\n include AnotherModule\n extend SomeModule\n CONST = 'wrong place'\nend\n" 257s with protected methods declared before private 257s is expected to eq class MyClass 257s def public_method 257s end 257s 257s private 257s 257s def first_private...ar before `private_methods`. 257s end 257s 257s def second_protected_method 257s end 257s end 257s when def modifier is used 257s registers an offense and corrects public method with modifier declared after private method with modifier 257s registers an offense and corrects public method after private method marked by its name 257s registers an offense and corrects public method without modifier declared after private method with modifier 257s with attribute macros before after validations 257s is expected to eq class Person 257s include AnotherModule 257s extend SomeModule 257s 257s CustomError = Cla...rivate :other_public_method 257s 257s private 257s 257s def some_private_method 257s end 257s end 257s with a complete ordered example 257s does not create offense 257s 257s RuboCop::Cop::Lint::UselessMethodDefinition 257s does not register an offense for empty class level `initialize` method 257s does not register an offense when method definition contains optional argument 257s does not register an offense for empty constructor 257s does not register an offense for constructor with only comments 257s does not register an offense when method definition contains optional keyword argument 257s does not register an offense when `super` arguments differ from method arguments 257s registers an offense and corrects for method containing only `super` call 257s does not register an offense for method containing additional code to `super` 257s does not register an offense when non-constructor contains only comments 257s does not register an offense for constructor containing additional code to `super` 257s 257s RuboCop::Cop::Metrics::Utils::AbcSizeCalculator 257s #calculate 257s assignment with ternary operator 257s is expected to eq "<2, 6, 2>" 257s with a known iterating block 257s is expected to eq "<2, 4, 2>" 257s with unused assignments 257s is expected to eq "<2, 1, 0>" 257s when counting repeated calls 257s is expected to eq "<1, 4, 0>" 257s elsif vs else if 257s elsif 257s is expected to eq "<0, 5, 3>" 257s else if 257s is expected to eq "<0, 5, 4>" 257s with a for 257s is expected to eq "<2, 1, 1>" 257s method with arguments 257s is expected to eq "<4, 0, 0>" 257s multiple assignment 257s is expected to eq "<3, 1, 0>" 257s same with extra condition 257s is expected to eq "<2, 9, 5>" 257s with ||= on a constant 257s is expected to eq "<1, 0, 1>" 257s with &.foo 257s is expected to eq "<0, 4, 2>" 257s with repeated lvar receivers 257s is expected to eq "<3, 5, 3>" 257s with ||= 257s is expected to eq "<2, 0, 1>" 257s if and arithmetic operations 257s is expected to eq "<2, 8, 4>" 257s with += 257s is expected to eq "<2, 0, 0>" 257s with += for setters 257s is expected to eq "<1, 2, 0>" 257s multiple assignment with method setters 257s is expected to eq "<3, 5, 0>" 257s with []= 257s is expected to eq "<2, 1, 0>" 257s with a block 257s is expected to eq "<2, 3, 0>" 257s same but with 7 arguments 257s is expected to eq "<9, 3, 0>" 257s equivalent to multiple assignment with method setters 257s is expected to eq "<3, 5, 0>" 257s with .foo = 257s is expected to eq "<1, 2, 0>" 257s with a yield 257s is expected to eq "<0, 1, 0>" 257s when discounting repeated calls 257s when root receiver is self/nil 257s is expected to eq "<2, 9, 1>" 257s when root receiver is a var 257s is expected to eq "<3, 9, 0>" 257s when some calls have arguments 257s is expected to eq "<1, 7, 0>" 257s multiple calls with return 257s is expected to eq "<0, 3, 0>" 257s with &&= 257s is expected to eq "<2, 0, 1>" 257s 257s RuboCop::Cop::Naming::VariableNumber 257s when AllowedIdentifiers is set 257s does not register an offense for a symbol that is allowed 257s does not register an offense for a global variable name that is allowed 257s does not register an offense for a method name that is allowed 257s does not register an offense for a local variable name that is allowed 257s does not register an offense for a instance variable name that is allowed 257s does not register an offense for a class variable name that is allowed 257s when configured for normal 257s registers an offense for snake case numbering in method name 257s registers an offense for snake case numbering in method camel case parameter 257s registers an offense for snake case numbering in a global variable name 257s registers an offense for snake case numbering in symbol 257s registers an offense for snake case numbering in method parameter 257s does not register an offense for normal case numbering in symbol 257s behaves like offense 257s registers an offense for _myLocal_1 in normalcase 257s behaves like accepts 257s accepts foo10_bar in normalcase 257s behaves like offense 257s registers an offense for sha_256 in normalcase 257s behaves like accepts 257s accepts user1_id in normalcase 257s behaves like offense 257s registers an offense for local_FOO_1 in normalcase 257s behaves like accepts 257s accepts localFOO1 in normalcase 257s behaves like offense_array 257s registers an offense for ["a_1", "a2"] in normalcase 257s behaves like accepts 257s accepts sha256 in normalcase 257s behaves like accepts 257s accepts local1 in normalcase 257s behaves like accepts 257s accepts snake_case in normalcase 257s behaves like offense 257s registers an offense for myAttribute_1 in normalcase 257s behaves like accepts 257s accepts user_1_id in normalcase 257s behaves like accepts 257s accepts local_ in normalcase 257s behaves like accepts 257s accepts _1 in normalcase 257s behaves like offense 257s registers an offense for @myAttribute_1 in normalcase 257s behaves like offense 257s registers an offense for @@local_1 in normalcase 257s behaves like accepts 257s accepts emparejó in normalcase 257s behaves like offense 257s registers an offense for local_1 in normalcase 257s behaves like accepts 257s accepts @foo in normalcase 257s behaves like accepts 257s accepts _ in normalcase 257s behaves like accepts integer symbols 257s accepts integer symbol 257s accepts integer symbol array literal 257s behaves like offense 257s registers an offense for localFOO_1 in normalcase 257s behaves like accepts 257s accepts _foo in normalcase 257s behaves like accepts 257s accepts @__foo__ in normalcase 257s behaves like accepts 257s accepts target_u2f_device in normalcase 257s behaves like offense 257s registers an offense for @local_1 in normalcase 257s when configured for non integer 257s registers an offense for normal case numbering in method parameter 257s registers an offense for snake case numbering in symbol 257s registers an offense for snake case numbering in method camel case parameter 257s registers an offense for normal case numbering in method name 257s registers an offense for normal case numbering in symbol 257s registers an offense for snake case numbering in method parameter 257s registers an offense for normal case numbering in method camel case parameter 257s registers an offense for snake case numbering in method name 257s behaves like offense 257s registers an offense for local1 in non_integer 257s behaves like accepts 257s accepts _1 in non_integer 257s behaves like offense 257s registers an offense for @local1 in non_integer 257s behaves like accepts 257s accepts fooBar in non_integer 257s behaves like accepts 257s accepts _ in non_integer 257s behaves like offense 257s registers an offense for local_1 in non_integer 257s behaves like accepts integer symbols 257s accepts integer symbol 257s accepts integer symbol array literal 257s behaves like offense 257s registers an offense for _myLocal1 in non_integer 257s behaves like offense 257s registers an offense for @local_1 in non_integer 257s behaves like accepts 257s accepts @@foo in non_integer 257s behaves like accepts 257s accepts local_ in non_integer 257s behaves like offense 257s registers an offense for myAttribute1 in non_integer 257s behaves like accepts 257s accepts @foo in non_integer 257s behaves like offense 257s registers an offense for @myAttribute_1 in non_integer 257s behaves like accepts 257s accepts @__foo__ in non_integer 257s behaves like offense_array 257s registers an offense for ["a_1", "aone"] in non_integer 257s behaves like accepts 257s accepts _foo in non_integer 257s behaves like accepts 257s accepts localone in non_integer 257s behaves like offense 257s registers an offense for @myAttribute1 in non_integer 257s behaves like accepts 257s accepts emparejó in non_integer 257s behaves like offense 257s registers an offense for myAttribute_1 in non_integer 257s behaves like offense 257s registers an offense for _myLocal_1 in non_integer 257s behaves like accepts 257s accepts local_one in non_integer 257s when CheckMethodNames is false 257s does not register an offense for snake case numbering in method name 257s when AllowedPatterns is set 257s registers an offense for a method name that does not match an allowed pattern 257s registers an offense for a class variable name that does not match an allowed pattern 257s does not register an offense for a instance variable name that matches an allowed pattern 257s does not register an offense for a class variable name that matches an allowed pattern 257s registers an offense for a instance variable name that does not match an allowed pattern 257s registers an offense for a local variable name that does not match an allowed pattern 257s does not register an offense for a local variable name that matches an allowed pattern 257s registers an offense for a global variable name that does not match an allowed pattern 257s does not register an offense for a global variable name that matches an allowed pattern 257s does not register an offense for a method name that matches an allowed pattern 257s does not register an offense for a symbol that matches an allowed pattern 257s registers an offense for a symbol that does not match an allowed pattern 257s when CheckSymbols is false 257s does not register an offense for snake case numbering in symbol 257s when configured for snake_case 257s registers an offense for normal case numbering in method parameter 257s registers an offense for normal case numbering in method name 257s registers an offense for normal case numbering in symbol 257s registers an offense for normal case numbering in method camel case parameter 257s does not register an offense for snake case numbering in symbol 257s registers an offense for normal case numbering in a global variable name 257s behaves like offense 257s registers an offense for _unused1 in snake_case 257s behaves like accepts 257s accepts _foo in snake_case 257s behaves like accepts 257s accepts @foo in snake_case 257s behaves like offense 257s registers an offense for @@local1 in snake_case 257s behaves like accepts 257s accepts a_1_b_1 in snake_case 257s behaves like accepts 257s accepts a_1_b in snake_case 257s behaves like offense 257s registers an offense for @local1 in snake_case 257s behaves like offense 257s registers an offense for local1 in snake_case 257s behaves like offense_array 257s registers an offense for ["a1", "a_2"] in snake_case 257s behaves like accepts 257s accepts @__foo__ in snake_case 257s behaves like accepts 257s accepts local_1 in snake_case 257s behaves like accepts 257s accepts _ in snake_case 257s behaves like accepts 257s accepts local_123 in snake_case 257s behaves like accepts 257s accepts emparejó in snake_case 257s behaves like accepts 257s accepts local_12 in snake_case 257s behaves like offense 257s registers an offense for @camelCase1 in snake_case 257s behaves like accepts 257s accepts _1 in snake_case 257s behaves like accepts integer symbols 257s accepts integer symbol array literal 257s accepts integer symbol 257s behaves like accepts 257s accepts local_ in snake_case 257s behaves like offense 257s registers an offense for camelCase1 in snake_case 257s behaves like offense 257s registers an offense for aB1 in snake_case 257s behaves like accepts 257s accepts aB_1 in snake_case 257s 257s RuboCop::Cop::Style::UnpackFirst 257s ruby version >= 2.4 257s registers offense 257s when using `#unpack` with `#at` 257s when using `#unpack` with dot and square brackets 257s when using `#unpack` with `#slice` 257s when using `#unpack` with `#first` 257s when using `#unpack` with square brackets 257s does not register offense 257s when using `#unpack1` 257s when using `#unpack` accessing second element 257s 257s RuboCop::Cop::Layout::EmptyLinesAroundExceptionHandlingKeywords 257s with complex method definition - registers many offenses 257s accepts `begin` and `rescue` are on the same line 257s accepts no empty line 257s accepts last `rescue` and `end` are on the same line 257s registers an offense for above rescue keyword with a blank 257s registers an offense for rescue section starting with a blank 257s with complex begin-end - registers many offenses 257s registers an offense for rescue section ending with a blank 257s accepts `def` and `rescue` are on the same line 257s registers an offense for rescue section ending for method definition a blank 257s accepts empty begin 257s accepts empty method definition 257s accepts empty lines around begin body 257s accepts `rescue` and `end` are on the same line 257s 257s RuboCop::Cop::Gemspec::OrderedDependencies 257s behaves like ordered dependency 257s when add_development_dependency 257s When gems are alphabetically sorted 257s does not register any offenses 257s when dependency is separated by multiline comment 257s with TreatCommentsAsGroupSeparators: true 257s accepts 257s with TreatCommentsAsGroupSeparators: false 257s registers an offense 257s when gems are not alphabetically sorted 257s registers an offense 257s when each individual group of line is sorted 257s does not register any offenses 257s behaves like ordered dependency 257s when add_dependency 257s when dependency is separated by multiline comment 257s with TreatCommentsAsGroupSeparators: true 257s accepts 257s with TreatCommentsAsGroupSeparators: false 257s registers an offense 257s when each individual group of line is sorted 257s does not register any offenses 257s When gems are alphabetically sorted 257s does not register any offenses 257s when gems are not alphabetically sorted 257s registers an offense 257s When using method call to gem names 257s does not register any offenses 257s When using a local variable in an argument of dependent gem 257s does not register any offenses 257s behaves like ordered dependency 257s when add_runtime_dependency 257s When gems are alphabetically sorted 257s does not register any offenses 257s when gems are not alphabetically sorted 257s registers an offense 257s when dependency is separated by multiline comment 257s with TreatCommentsAsGroupSeparators: false 257s registers an offense 257s with TreatCommentsAsGroupSeparators: true 257s accepts 257s when each individual group of line is sorted 257s does not register any offenses 257s when different dependencies are consecutive 257s does not register any offenses 257s 257s RuboCop::Cop::Style::NegatedIfElseCondition 257s works with comments when neither branch is a begin node 257s does not register an offense when only part of the condition is negated 257s registers an offense and corrects a multiline ternary 257s does not register an offense when both branches are empty 258s registers an offense when using negated condition and `if` branch body is empty 258s registers an offense and corrects when negating condition with `!` for `if-else` 258s moves comments to correct branches during autocorrect 258s works with comments and multiple statements 258s does not register an offense when `if` with `!!` condition 258s registers an offense and corrects nested `if-else` with negated condition 258s correctly moves comments at the end of branches 258s does not register an offense when the `else` branch is empty 258s works with duplicate nodes 258s works with comments when one branch is a begin and the other is not 258s registers an offense and corrects when negating condition with `not` for ternary 258s does not register an offense when `if` with negated condition has no `else` branch 258s registers an offense and corrects when negating condition with `not` for `if-else` 258s does not register an offense when negating condition for `if-elsif` 258s behaves like negation method 258s registers an offense and corrects when negating condition with `!~` for ternary 258s registers an offense and corrects when negating condition with `!~` in parentheses for ternary 258s registers an offense and corrects when negating condition with `!~` in begin-end for `if-else` 258s registers an offense and corrects when negating condition with `!~` in parentheses for `if-else` 258s registers an offense and corrects when negating condition with `!~` in begin-end for ternary 258s registers an offense and corrects when negating condition with `!~` for `if-else` 258s behaves like negation method 258s registers an offense and corrects when negating condition with `!=` for `if-else` 258s registers an offense and corrects when negating condition with `!=` for ternary 258s registers an offense and corrects when negating condition with `!=` in parentheses for ternary 258s registers an offense and corrects when negating condition with `!=` in begin-end for ternary 258s registers an offense and corrects when negating condition with `!=` in begin-end for `if-else` 258s registers an offense and corrects when negating condition with `!=` in parentheses for `if-else` 258s 258s RuboCop::Cop::Style::ConditionalAssignment 258s autocorrects assignment in if else when the assignment spans multiple lines 258s allows method calls in if else 258s allows if elsif else with the same assignment only in elsif else 258s registers an offense for assignment in if elsif elsif else 258s doesn't crash when assignment statement uses chars which have special meaning in a regex 258s allows assignment in multiple branches when it is wrapped in a modifier 258s allows assignment using different operators in if elsif else 258s allows modifier if inside of if else 258s allows if else without variable assignment 258s allows assignment to the result of a ternary operation 258s registers an offense for assignment in unless else 258s allows method calls in conditionals 258s allows if elsif else with the same assignment only in if elsif 258s allows modifier if 258s registers an offense in an if else if the assignment is already at the line length limit 258s allows if elsif else with the same assignment only in if else 258s registers an offense for assignment in ternary operation using strings 258s allows aref assignment with different indices in if..else 258s allows assignment using different operators in if else 258s allows assignment of different variables in if else 258s registers an offense for assignment in case with when else 258s registers an offense for assignment in if then elsif then else 258s registers an offense for assignment in case when then else 258s doesn't crash with empty braces 258s counts array assignment when determining multiple assignment 258s allows assignment of different variables in case when else 258s registers an offense for assignment in if elsif else 258s allows assignment using different (method) operators in if..else 258s allows different assignment types in case with when else 258s behaves like all assignment types 258s for a instance variable lval 258s registers an offense for assignment using &&= in ternary 258s with end alignment to keyword 258s for a instance variable lval 258s registers an offense for assignment using &&= in case when 258s registers an offense for assignment using &&= in if else 258s for a global variable lval 258s registers an offense for assignment using &&= in case when 258s registers an offense for assignment using &&= in if else 258s for a class variable lval 258s registers an offense for assignment using &&= in case when 258s registers an offense for assignment using &&= in if else 258s for a local variable lval 258s registers an offense for assignment using &&= in if else 258s registers an offense for assignment using &&= in case when 258s for a constant lval 258s registers an offense for assignment using &&= in case when 258s registers an offense for assignment using &&= in if else 258s for a class variable lval 258s registers an offense for assignment using &&= in ternary 258s with end alignment to start_of_line 258s for a constant lval 258s registers an offense for assignment using &&= in case when 258s registers an offense for assignment using &&= in if else 258s for a instance variable lval 258s registers an offense for assignment using &&= in case when 258s registers an offense for assignment using &&= in if else 258s for a class variable lval 258s registers an offense for assignment using &&= in case when 258s registers an offense for assignment using &&= in if else 258s for a global variable lval 258s registers an offense for assignment using &&= in if else 258s registers an offense for assignment using &&= in case when 258s for a local variable lval 258s registers an offense for assignment using &&= in case when 258s registers an offense for assignment using &&= in if else 258s for a constant lval 258s registers an offense for assignment using &&= in ternary 258s for a local variable lval 258s registers an offense for assignment using &&= in ternary 258s for a global variable lval 258s registers an offense for assignment using &&= in ternary 258s behaves like comparison methods 258s registers an offense for comparison methods in ternary operations 258s with end alignment to start_of_line 258s corrects comparison methods in if elsif else 258s corrects comparison methods in unless else 258s corrects comparison methods in case when 258s >= Ruby 2.7 258s corrects comparison methods in case in 258s with end alignment to keyword 258s corrects comparison methods in unless else 258s corrects comparison methods in case when 258s corrects comparison methods in if elsif else 258s >= Ruby 2.7 258s corrects comparison methods in case in 258s behaves like all assignment types 258s with end alignment to start_of_line 258s for a global variable lval 258s registers an offense for assignment using ^= in if else 258s registers an offense for assignment using ^= in case when 258s for a instance variable lval 258s registers an offense for assignment using ^= in case when 258s registers an offense for assignment using ^= in if else 258s for a constant lval 258s registers an offense for assignment using ^= in if else 258s registers an offense for assignment using ^= in case when 258s for a local variable lval 258s registers an offense for assignment using ^= in case when 258s registers an offense for assignment using ^= in if else 258s for a class variable lval 258s registers an offense for assignment using ^= in case when 258s registers an offense for assignment using ^= in if else 258s for a constant lval 258s registers an offense for assignment using ^= in ternary 258s for a class variable lval 258s registers an offense for assignment using ^= in ternary 258s for a global variable lval 258s registers an offense for assignment using ^= in ternary 258s for a local variable lval 258s registers an offense for assignment using ^= in ternary 258s with end alignment to keyword 258s for a local variable lval 258s registers an offense for assignment using ^= in if else 258s registers an offense for assignment using ^= in case when 258s for a class variable lval 258s registers an offense for assignment using ^= in if else 258s registers an offense for assignment using ^= in case when 258s for a instance variable lval 258s registers an offense for assignment using ^= in if else 258s registers an offense for assignment using ^= in case when 258s for a constant lval 258s registers an offense for assignment using ^= in if else 258s registers an offense for assignment using ^= in case when 258s for a global variable lval 258s registers an offense for assignment using ^= in if else 258s registers an offense for assignment using ^= in case when 258s for a instance variable lval 258s registers an offense for assignment using ^= in ternary 258s behaves like all assignment types 258s for a class variable lval 258s registers an offense for assignment using -= in ternary 258s for a instance variable lval 258s registers an offense for assignment using -= in ternary 258s for a global variable lval 258s registers an offense for assignment using -= in ternary 258s with end alignment to keyword 258s for a instance variable lval 258s registers an offense for assignment using -= in if else 258s registers an offense for assignment using -= in case when 258s for a local variable lval 258s registers an offense for assignment using -= in case when 258s registers an offense for assignment using -= in if else 258s for a global variable lval 258s registers an offense for assignment using -= in case when 258s registers an offense for assignment using -= in if else 258s for a constant lval 258s registers an offense for assignment using -= in if else 258s registers an offense for assignment using -= in case when 258s for a class variable lval 258s registers an offense for assignment using -= in if else 258s registers an offense for assignment using -= in case when 258s for a constant lval 258s registers an offense for assignment using -= in ternary 258s for a local variable lval 258s registers an offense for assignment using -= in ternary 258s with end alignment to start_of_line 258s for a constant lval 258s registers an offense for assignment using -= in case when 258s registers an offense for assignment using -= in if else 258s for a instance variable lval 258s registers an offense for assignment using -= in if else 258s registers an offense for assignment using -= in case when 258s for a local variable lval 258s registers an offense for assignment using -= in case when 258s registers an offense for assignment using -= in if else 258s for a class variable lval 258s registers an offense for assignment using -= in case when 258s registers an offense for assignment using -= in if else 258s for a global variable lval 258s registers an offense for assignment using -= in if else 258s registers an offense for assignment using -= in case when 258s behaves like else followed by new conditional without else 258s allows if elsif else unless 258s behaves like all variable types 258s allows assignment to the return of if else 258s registers an offense assigning any variable type in ternary 258s allows assignment to the return of case when 258s registers an offense assigning any variable type in if else 258s allows assignment to the return of a ternary 258s registers an offense assigning any variable type in case when 258s autocorrect 258s corrects =~ in ternary operations 258s preserves comments during correction in if else 258s preserves comments during correction in case when else 258s corrects assignment to unbracketed array in if else 258s aref assignment 258s corrects if..else 258s with different indices 258s doesn't register an offense 258s self.attribute= assignment 258s corrects if..else 258s with different receivers 258s doesn't register an offense 258s constant assignment 258s corrects if..else with namespaced constant 258s corrects if..else with top-level constant 258s assignment from a method 258s corrects unless else 258s corrects case when 258s corrects if else 258s multiple assignment 258s does not register an offense in if else 258s does not register an offense in case when 258s behaves like all assignment types 258s with end alignment to start_of_line 258s for a instance variable lval 258s registers an offense for assignment using <<= in case when 258s registers an offense for assignment using <<= in if else 258s for a constant lval 258s registers an offense for assignment using <<= in case when 258s registers an offense for assignment using <<= in if else 258s for a class variable lval 258s registers an offense for assignment using <<= in case when 258s registers an offense for assignment using <<= in if else 258s for a global variable lval 258s registers an offense for assignment using <<= in case when 258s registers an offense for assignment using <<= in if else 258s for a local variable lval 258s registers an offense for assignment using <<= in case when 258s registers an offense for assignment using <<= in if else 258s for a constant lval 258s registers an offense for assignment using <<= in ternary 258s for a global variable lval 258s registers an offense for assignment using <<= in ternary 258s for a class variable lval 258s registers an offense for assignment using <<= in ternary 258s with end alignment to keyword 258s for a class variable lval 258s registers an offense for assignment using <<= in if else 258s registers an offense for assignment using <<= in case when 258s for a instance variable lval 258s registers an offense for assignment using <<= in case when 258s registers an offense for assignment using <<= in if else 258s for a local variable lval 258s registers an offense for assignment using <<= in if else 258s registers an offense for assignment using <<= in case when 258s for a constant lval 258s registers an offense for assignment using <<= in case when 258s registers an offense for assignment using <<= in if else 258s for a global variable lval 258s registers an offense for assignment using <<= in if else 258s registers an offense for assignment using <<= in case when 258s for a local variable lval 258s registers an offense for assignment using <<= in ternary 258s for a instance variable lval 258s registers an offense for assignment using <<= in ternary 258s behaves like all variable types 258s allows assignment to the return of case when 258s registers an offense assigning any variable type in ternary 258s allows assignment to the return of a ternary 258s registers an offense assigning any variable type in if else 258s registers an offense assigning any variable type in case when 258s allows assignment to the return of if else 258s assignment as the last statement 258s allows assignment in if elsif else with some branches only containing variable assignment and others containing more than variable assignment 258s allows multiple assignment in if elsif else when the last assignment is the same and the earlier assignments do not appear in all branches 258s allows multiple assignment in if else 258s allows more than variable assignment in if else 258s allows multiple assignments in case when with multiple whens 258s allows multiple assignments in case when if there are uniq variables in the when branches 258s allows multiple assignment in if elsif else 258s allows multiple assignment in case when else when the last assignment is the same and the earlier assignments do not appear in all branches 258s allows variable assignment in unless else with more than variable assignment 258s allows variable assignment in case when else with more than variable assignment 258s allows multiple assignment in if elsif elsif else 258s allows multiple assignment in unless else 258s allows multiple assignments in case when with only one when 258s allows multiple assignment in case statements when the last assignment is the same and the earlier assignments do not appear in all branches 258s allows more than variable assignment in if elsif else 258s multiple assignment in only one branch 258s allows multiple assignment is in elsif 258s does not register an offense when multiple assignment is in else 258s allows multiple assignment is in if 258s behaves like allows out of order multiple assignment in if elsif else 258s allows out of order multiple assignment in if elsif else 258s behaves like comparison methods 258s registers an offense for comparison methods in ternary operations 258s with end alignment to keyword 258s corrects comparison methods in unless else 258s corrects comparison methods in case when 258s corrects comparison methods in if elsif else 258s >= Ruby 2.7 258s corrects comparison methods in case in 258s with end alignment to start_of_line 258s corrects comparison methods in unless else 258s corrects comparison methods in case when 258s corrects comparison methods in if elsif else 258s >= Ruby 2.7 258s corrects comparison methods in case in 258s behaves like all assignment types 258s for a class variable lval 258s registers an offense for assignment using %= in ternary 258s with end alignment to start_of_line 258s for a local variable lval 258s registers an offense for assignment using %= in if else 258s registers an offense for assignment using %= in case when 258s for a class variable lval 258s registers an offense for assignment using %= in if else 258s registers an offense for assignment using %= in case when 258s for a instance variable lval 258s registers an offense for assignment using %= in if else 258s registers an offense for assignment using %= in case when 258s for a global variable lval 258s registers an offense for assignment using %= in if else 258s registers an offense for assignment using %= in case when 258s for a constant lval 258s registers an offense for assignment using %= in if else 258s registers an offense for assignment using %= in case when 258s with end alignment to keyword 258s for a local variable lval 258s registers an offense for assignment using %= in if else 258s registers an offense for assignment using %= in case when 258s for a instance variable lval 258s registers an offense for assignment using %= in case when 258s registers an offense for assignment using %= in if else 258s for a global variable lval 258s registers an offense for assignment using %= in case when 258s registers an offense for assignment using %= in if else 258s for a constant lval 258s registers an offense for assignment using %= in case when 258s registers an offense for assignment using %= in if else 258s for a class variable lval 258s registers an offense for assignment using %= in if else 258s registers an offense for assignment using %= in case when 258s for a local variable lval 258s registers an offense for assignment using %= in ternary 258s for a instance variable lval 258s registers an offense for assignment using %= in ternary 258s for a global variable lval 258s registers an offense for assignment using %= in ternary 258s for a constant lval 258s registers an offense for assignment using %= in ternary 258s behaves like all variable types 258s allows assignment to the return of a ternary 258s registers an offense assigning any variable type in ternary 258s allows assignment to the return of if else 258s registers an offense assigning any variable type in case when 258s registers an offense assigning any variable type in if else 258s allows assignment to the return of case when 258s behaves like all assignment types 258s with end alignment to start_of_line 258s for a local variable lval 258s registers an offense for assignment using >>= in if else 258s registers an offense for assignment using >>= in case when 258s for a class variable lval 258s registers an offense for assignment using >>= in if else 258s registers an offense for assignment using >>= in case when 258s for a global variable lval 258s registers an offense for assignment using >>= in case when 258s registers an offense for assignment using >>= in if else 258s for a instance variable lval 258s registers an offense for assignment using >>= in case when 258s registers an offense for assignment using >>= in if else 258s for a constant lval 258s registers an offense for assignment using >>= in case when 258s registers an offense for assignment using >>= in if else 258s with end alignment to keyword 258s for a local variable lval 258s registers an offense for assignment using >>= in if else 258s registers an offense for assignment using >>= in case when 258s for a class variable lval 258s registers an offense for assignment using >>= in if else 259s registers an offense for assignment using >>= in case when 259s for a constant lval 259s registers an offense for assignment using >>= in if else 259s registers an offense for assignment using >>= in case when 259s for a instance variable lval 259s registers an offense for assignment using >>= in case when 259s registers an offense for assignment using >>= in if else 259s for a global variable lval 259s registers an offense for assignment using >>= in case when 259s registers an offense for assignment using >>= in if else 259s for a global variable lval 259s registers an offense for assignment using >>= in ternary 259s for a class variable lval 259s registers an offense for assignment using >>= in ternary 259s for a instance variable lval 259s registers an offense for assignment using >>= in ternary 259s for a constant lval 259s registers an offense for assignment using >>= in ternary 259s for a local variable lval 259s registers an offense for assignment using >>= in ternary 259s IncludeTernaryExpressions false 259s allows assignment in ternary operation 259s correction would exceed max line length 259s allows assignment to the same variable in if else if the correction would cause the condition to exceed the configured LineLength 259s allows assignment to the same variable in case when else if the correction would create a line longer than the configured LineLength 259s allows assignment to the same variable in if else if the correction would create a line longer than the configured LineLength 259s behaves like all assignment types 259s for a global variable lval 259s registers an offense for assignment using << in ternary 259s with end alignment to start_of_line 259s for a local variable lval 259s registers an offense for assignment using << in case when 259s registers an offense for assignment using << in if else 259s for a global variable lval 259s registers an offense for assignment using << in case when 259s registers an offense for assignment using << in if else 259s for a instance variable lval 259s registers an offense for assignment using << in if else 259s registers an offense for assignment using << in case when 259s for a constant lval 259s registers an offense for assignment using << in case when 259s registers an offense for assignment using << in if else 259s for a class variable lval 259s registers an offense for assignment using << in case when 259s registers an offense for assignment using << in if else 259s for a constant lval 259s registers an offense for assignment using << in ternary 259s for a instance variable lval 259s registers an offense for assignment using << in ternary 259s with end alignment to keyword 259s for a global variable lval 259s registers an offense for assignment using << in case when 259s registers an offense for assignment using << in if else 259s for a class variable lval 259s registers an offense for assignment using << in if else 259s registers an offense for assignment using << in case when 259s for a instance variable lval 259s registers an offense for assignment using << in if else 259s registers an offense for assignment using << in case when 259s for a local variable lval 259s registers an offense for assignment using << in case when 259s registers an offense for assignment using << in if else 259s for a constant lval 259s registers an offense for assignment using << in if else 259s registers an offense for assignment using << in case when 259s for a local variable lval 259s registers an offense for assignment using << in ternary 259s for a class variable lval 259s registers an offense for assignment using << in ternary 259s empty branch 259s allows assignment in unless without an else 259s allows an empty if statement 259s allows assignment in if without an else 259s allows assignment in case when without an else 259s allows an empty when branch with an else 259s allows case with an empty else 259s allows an empty elsif statement 259s allows if elsif without else 259s with nested conditionals 259s does not consider branches of nested ifs 259s eventually autocorrects all branches 259s configured to check conditions with multiple statements 259s allows assignment in multiple branches when it is wrapped in a modifier 259s registers an offense for multiple assignment when an earlier assignment is is protected by a modifier 259s autocorrect 259s corrects multiple assignment in case when 259s corrects multiple assignment in if elsif else 259s corrects multiple assignment in if elsif else with multiple elsifs 259s corrects multiple assignment in if else 259s corrects multiple assignment in case when with multiple whens 259s corrects assignment in an if statement that is nested in unless else 259s corrects multiple assignment in unless else 259s assignment as the last statement 259s registers an offense for multiple assignment in if elsif else 259s registers offense for multiple assignments in case when with only one when 259s registers offense for multiple assignment in unless else 259s registers an offense in case when else with more than variable assignment 259s registers an offense in if else with more than variable assignment 259s registers an offense in if elsif else with some branches only containing variable assignment and others containing more than variable assignment 259s register an offense for multiple assignment in if else 259s registers offense for multiple assignments in case when with multiple whens 259s registers an offense in unless else with more than variable assignment 259s registers an offense in if elsif else with more than variable assignment 259s registers offense for multiple assignment in if elsif elsif else 259s behaves like allows out of order multiple assignment in if elsif else 259s allows out of order multiple assignment in if elsif else 259s multiple assignment in only one branch 259s registers an offense when multiple assignment is in elsif 259s registers an offense when multiple assignment is in if 259s registers an offense when multiple assignment is in else 259s behaves like all assignment types 259s for a global variable lval 259s registers an offense for assignment using /= in ternary 259s for a instance variable lval 259s registers an offense for assignment using /= in ternary 259s with end alignment to keyword 259s for a class variable lval 259s registers an offense for assignment using /= in if else 259s registers an offense for assignment using /= in case when 259s for a instance variable lval 259s registers an offense for assignment using /= in if else 259s registers an offense for assignment using /= in case when 259s for a global variable lval 259s registers an offense for assignment using /= in if else 259s registers an offense for assignment using /= in case when 259s for a constant lval 259s registers an offense for assignment using /= in if else 259s registers an offense for assignment using /= in case when 259s for a local variable lval 259s registers an offense for assignment using /= in case when 259s registers an offense for assignment using /= in if else 259s for a local variable lval 259s registers an offense for assignment using /= in ternary 259s for a class variable lval 259s registers an offense for assignment using /= in ternary 259s for a constant lval 259s registers an offense for assignment using /= in ternary 259s with end alignment to start_of_line 259s for a global variable lval 259s registers an offense for assignment using /= in if else 259s registers an offense for assignment using /= in case when 259s for a class variable lval 259s registers an offense for assignment using /= in case when 259s registers an offense for assignment using /= in if else 259s for a local variable lval 259s registers an offense for assignment using /= in if else 259s registers an offense for assignment using /= in case when 259s for a instance variable lval 259s registers an offense for assignment using /= in case when 259s registers an offense for assignment using /= in if else 259s for a constant lval 259s registers an offense for assignment using /= in case when 259s registers an offense for assignment using /= in if else 259s behaves like all assignment types 259s for a local variable lval 259s registers an offense for assignment using ||= in ternary 259s with end alignment to start_of_line 259s for a global variable lval 259s registers an offense for assignment using ||= in case when 259s registers an offense for assignment using ||= in if else 259s for a instance variable lval 259s registers an offense for assignment using ||= in if else 259s registers an offense for assignment using ||= in case when 259s for a local variable lval 259s registers an offense for assignment using ||= in if else 259s registers an offense for assignment using ||= in case when 259s for a class variable lval 259s registers an offense for assignment using ||= in case when 259s registers an offense for assignment using ||= in if else 259s for a constant lval 259s registers an offense for assignment using ||= in if else 259s registers an offense for assignment using ||= in case when 259s for a constant lval 259s registers an offense for assignment using ||= in ternary 259s for a global variable lval 259s registers an offense for assignment using ||= in ternary 259s with end alignment to keyword 259s for a global variable lval 259s registers an offense for assignment using ||= in case when 259s registers an offense for assignment using ||= in if else 259s for a class variable lval 259s registers an offense for assignment using ||= in case when 259s registers an offense for assignment using ||= in if else 259s for a local variable lval 259s registers an offense for assignment using ||= in if else 259s registers an offense for assignment using ||= in case when 259s for a constant lval 259s registers an offense for assignment using ||= in if else 259s registers an offense for assignment using ||= in case when 259s for a instance variable lval 259s registers an offense for assignment using ||= in if else 259s registers an offense for assignment using ||= in case when 259s for a class variable lval 259s registers an offense for assignment using ||= in ternary 259s for a instance variable lval 259s registers an offense for assignment using ||= in ternary 259s behaves like all variable types 259s allows assignment to the return of if else 259s registers an offense assigning any variable type in case when 259s registers an offense assigning any variable type in ternary 259s registers an offense assigning any variable type in if else 259s allows assignment to the return of case when 259s allows assignment to the return of a ternary 259s behaves like comparison methods 259s registers an offense for comparison methods in ternary operations 259s with end alignment to keyword 259s corrects comparison methods in case when 259s corrects comparison methods in if elsif else 259s corrects comparison methods in unless else 259s >= Ruby 2.7 259s corrects comparison methods in case in 259s with end alignment to start_of_line 259s corrects comparison methods in case when 259s corrects comparison methods in if elsif else 259s corrects comparison methods in unless else 259s >= Ruby 2.7 259s corrects comparison methods in case in 259s behaves like all assignment types 259s for a constant lval 259s registers an offense for assignment using *= in ternary 259s with end alignment to keyword 259s for a global variable lval 259s registers an offense for assignment using *= in if else 259s registers an offense for assignment using *= in case when 259s for a instance variable lval 259s registers an offense for assignment using *= in case when 259s registers an offense for assignment using *= in if else 259s for a constant lval 259s registers an offense for assignment using *= in if else 259s registers an offense for assignment using *= in case when 259s for a class variable lval 259s registers an offense for assignment using *= in case when 259s registers an offense for assignment using *= in if else 259s for a local variable lval 259s registers an offense for assignment using *= in case when 259s registers an offense for assignment using *= in if else 259s for a local variable lval 259s registers an offense for assignment using *= in ternary 259s for a class variable lval 259s registers an offense for assignment using *= in ternary 259s with end alignment to start_of_line 259s for a constant lval 259s registers an offense for assignment using *= in if else 259s registers an offense for assignment using *= in case when 259s for a local variable lval 259s registers an offense for assignment using *= in if else 259s registers an offense for assignment using *= in case when 259s for a global variable lval 259s registers an offense for assignment using *= in if else 259s registers an offense for assignment using *= in case when 259s for a class variable lval 259s registers an offense for assignment using *= in case when 259s registers an offense for assignment using *= in if else 259s for a instance variable lval 259s registers an offense for assignment using *= in case when 259s registers an offense for assignment using *= in if else 259s for a global variable lval 259s registers an offense for assignment using *= in ternary 259s for a instance variable lval 259s registers an offense for assignment using *= in ternary 259s behaves like all assignment types 259s for a class variable lval 259s registers an offense for assignment using += in ternary 259s with end alignment to start_of_line 259s for a local variable lval 259s registers an offense for assignment using += in if else 259s registers an offense for assignment using += in case when 259s for a instance variable lval 259s registers an offense for assignment using += in case when 259s registers an offense for assignment using += in if else 259s for a class variable lval 259s registers an offense for assignment using += in case when 259s registers an offense for assignment using += in if else 259s for a global variable lval 259s registers an offense for assignment using += in if else 259s registers an offense for assignment using += in case when 259s for a constant lval 259s registers an offense for assignment using += in if else 259s registers an offense for assignment using += in case when 259s for a constant lval 259s registers an offense for assignment using += in ternary 259s for a instance variable lval 259s registers an offense for assignment using += in ternary 259s for a local variable lval 259s registers an offense for assignment using += in ternary 259s for a global variable lval 259s registers an offense for assignment using += in ternary 259s with end alignment to keyword 259s for a local variable lval 259s registers an offense for assignment using += in if else 259s registers an offense for assignment using += in case when 259s for a instance variable lval 259s registers an offense for assignment using += in if else 259s registers an offense for assignment using += in case when 259s for a constant lval 259s registers an offense for assignment using += in if else 259s registers an offense for assignment using += in case when 259s for a global variable lval 259s registers an offense for assignment using += in if else 259s registers an offense for assignment using += in case when 259s for a class variable lval 259s registers an offense for assignment using += in case when 259s registers an offense for assignment using += in if else 259s behaves like all variable types 259s allows assignment to the return of if else 259s registers an offense assigning any variable type in case when 259s allows assignment to the return of a ternary 259s registers an offense assigning any variable type in ternary 259s allows assignment to the return of case when 259s registers an offense assigning any variable type in if else 259s behaves like all variable types 259s allows assignment to the return of a ternary 259s allows assignment to the return of if else 259s registers an offense assigning any variable type in ternary 259s registers an offense assigning any variable type in if else 259s allows assignment to the return of case when 259s registers an offense assigning any variable type in case when 259s behaves like comparison methods 259s registers an offense for comparison methods in ternary operations 259s with end alignment to keyword 259s corrects comparison methods in if elsif else 259s corrects comparison methods in unless else 259s corrects comparison methods in case when 259s >= Ruby 2.7 259s corrects comparison methods in case in 259s with end alignment to start_of_line 259s corrects comparison methods in if elsif else 259s corrects comparison methods in case when 259s corrects comparison methods in unless else 259s >= Ruby 2.7 259s corrects comparison methods in case in 259s behaves like all variable types 259s registers an offense assigning any variable type in if else 259s allows assignment to the return of a ternary 259s allows assignment to the return of if else 259s registers an offense assigning any variable type in ternary 259s allows assignment to the return of case when 259s registers an offense assigning any variable type in case when 259s behaves like comparison methods 259s registers an offense for comparison methods in ternary operations 259s with end alignment to start_of_line 259s corrects comparison methods in case when 259s corrects comparison methods in unless else 259s corrects comparison methods in if elsif else 259s >= Ruby 2.7 259s corrects comparison methods in case in 259s with end alignment to keyword 259s corrects comparison methods in unless else 259s corrects comparison methods in case when 259s corrects comparison methods in if elsif else 259s >= Ruby 2.7 259s corrects comparison methods in case in 259s behaves like all assignment types 259s for a class variable lval 259s registers an offense for assignment using |= in ternary 259s with end alignment to keyword 259s for a global variable lval 259s registers an offense for assignment using |= in case when 259s registers an offense for assignment using |= in if else 259s for a constant lval 259s registers an offense for assignment using |= in if else 259s registers an offense for assignment using |= in case when 259s for a local variable lval 259s registers an offense for assignment using |= in if else 259s registers an offense for assignment using |= in case when 259s for a instance variable lval 259s registers an offense for assignment using |= in if else 259s registers an offense for assignment using |= in case when 259s for a class variable lval 260s registers an offense for assignment using |= in case when 260s registers an offense for assignment using |= in if else 260s for a global variable lval 260s registers an offense for assignment using |= in ternary 260s for a instance variable lval 260s registers an offense for assignment using |= in ternary 260s for a constant lval 260s registers an offense for assignment using |= in ternary 260s with end alignment to start_of_line 260s for a local variable lval 260s registers an offense for assignment using |= in case when 260s registers an offense for assignment using |= in if else 260s for a constant lval 260s registers an offense for assignment using |= in case when 260s registers an offense for assignment using |= in if else 260s for a global variable lval 260s registers an offense for assignment using |= in if else 260s registers an offense for assignment using |= in case when 260s for a class variable lval 260s registers an offense for assignment using |= in case when 260s registers an offense for assignment using |= in if else 260s for a instance variable lval 260s registers an offense for assignment using |= in case when 260s registers an offense for assignment using |= in if else 260s for a local variable lval 260s registers an offense for assignment using |= in ternary 260s behaves like else followed by new conditional without else 260s allows if elsif else if 260s behaves like comparison methods 260s registers an offense for comparison methods in ternary operations 260s with end alignment to keyword 260s corrects comparison methods in unless else 260s corrects comparison methods in case when 260s corrects comparison methods in if elsif else 260s >= Ruby 2.7 260s corrects comparison methods in case in 260s with end alignment to start_of_line 260s corrects comparison methods in case when 260s corrects comparison methods in if elsif else 260s corrects comparison methods in unless else 260s >= Ruby 2.7 260s corrects comparison methods in case in 260s behaves like comparison methods 260s registers an offense for comparison methods in ternary operations 260s with end alignment to keyword 260s corrects comparison methods in unless else 260s corrects comparison methods in if elsif else 260s corrects comparison methods in case when 260s >= Ruby 2.7 260s corrects comparison methods in case in 260s with end alignment to start_of_line 260s corrects comparison methods in if elsif else 260s corrects comparison methods in unless else 260s corrects comparison methods in case when 260s >= Ruby 2.7 260s corrects comparison methods in case in 260s behaves like all assignment types 260s for a constant lval 260s registers an offense for assignment using **= in ternary 260s for a class variable lval 260s registers an offense for assignment using **= in ternary 260s for a instance variable lval 260s registers an offense for assignment using **= in ternary 260s for a global variable lval 260s registers an offense for assignment using **= in ternary 260s for a local variable lval 260s registers an offense for assignment using **= in ternary 260s with end alignment to keyword 260s for a global variable lval 260s registers an offense for assignment using **= in case when 260s registers an offense for assignment using **= in if else 260s for a class variable lval 260s registers an offense for assignment using **= in case when 260s registers an offense for assignment using **= in if else 260s for a local variable lval 260s registers an offense for assignment using **= in case when 260s registers an offense for assignment using **= in if else 260s for a constant lval 260s registers an offense for assignment using **= in if else 260s registers an offense for assignment using **= in case when 260s for a instance variable lval 260s registers an offense for assignment using **= in case when 260s registers an offense for assignment using **= in if else 260s with end alignment to start_of_line 260s for a global variable lval 260s registers an offense for assignment using **= in if else 260s registers an offense for assignment using **= in case when 260s for a local variable lval 260s registers an offense for assignment using **= in case when 260s registers an offense for assignment using **= in if else 260s for a class variable lval 260s registers an offense for assignment using **= in if else 260s registers an offense for assignment using **= in case when 260s for a constant lval 260s registers an offense for assignment using **= in if else 260s registers an offense for assignment using **= in case when 260s for a instance variable lval 260s registers an offense for assignment using **= in if else 260s registers an offense for assignment using **= in case when 260s behaves like all assignment types 260s with end alignment to start_of_line 260s for a local variable lval 260s registers an offense for assignment using = in if else 260s registers an offense for assignment using = in case when 260s for a global variable lval 260s registers an offense for assignment using = in if else 260s registers an offense for assignment using = in case when 260s for a class variable lval 260s registers an offense for assignment using = in case when 260s registers an offense for assignment using = in if else 260s for a instance variable lval 260s registers an offense for assignment using = in if else 260s registers an offense for assignment using = in case when 260s for a constant lval 260s registers an offense for assignment using = in if else 260s registers an offense for assignment using = in case when 260s for a class variable lval 260s registers an offense for assignment using = in ternary 260s for a local variable lval 260s registers an offense for assignment using = in ternary 260s for a constant lval 260s registers an offense for assignment using = in ternary 260s for a instance variable lval 260s registers an offense for assignment using = in ternary 260s with end alignment to keyword 260s for a global variable lval 260s registers an offense for assignment using = in case when 260s registers an offense for assignment using = in if else 260s for a class variable lval 260s registers an offense for assignment using = in if else 260s registers an offense for assignment using = in case when 260s for a local variable lval 260s registers an offense for assignment using = in if else 260s registers an offense for assignment using = in case when 260s for a instance variable lval 260s registers an offense for assignment using = in if else 260s registers an offense for assignment using = in case when 260s for a constant lval 260s registers an offense for assignment using = in if else 260s registers an offense for assignment using = in case when 260s for a global variable lval 260s registers an offense for assignment using = in ternary 260s for if elsif else if else 260s autocorrects the inner offense first 260s autocorrects the outer offense later 260s behaves like comparison methods 260s registers an offense for comparison methods in ternary operations 260s with end alignment to start_of_line 260s corrects comparison methods in case when 260s corrects comparison methods in if elsif else 260s corrects comparison methods in unless else 260s >= Ruby 2.7 260s corrects comparison methods in case in 260s with end alignment to keyword 260s corrects comparison methods in unless else 260s corrects comparison methods in case when 260s corrects comparison methods in if elsif else 260s >= Ruby 2.7 260s corrects comparison methods in case in 260s behaves like all assignment types 260s for a global variable lval 260s registers an offense for assignment using &= in ternary 260s with end alignment to keyword 260s for a local variable lval 260s registers an offense for assignment using &= in if else 260s registers an offense for assignment using &= in case when 260s for a constant lval 260s registers an offense for assignment using &= in case when 260s registers an offense for assignment using &= in if else 260s for a instance variable lval 260s registers an offense for assignment using &= in case when 260s registers an offense for assignment using &= in if else 260s for a class variable lval 260s registers an offense for assignment using &= in case when 260s registers an offense for assignment using &= in if else 260s for a global variable lval 260s registers an offense for assignment using &= in case when 260s registers an offense for assignment using &= in if else 260s with end alignment to start_of_line 260s for a constant lval 260s registers an offense for assignment using &= in case when 260s registers an offense for assignment using &= in if else 260s for a class variable lval 260s registers an offense for assignment using &= in if else 260s registers an offense for assignment using &= in case when 260s for a local variable lval 260s registers an offense for assignment using &= in if else 260s registers an offense for assignment using &= in case when 260s for a global variable lval 260s registers an offense for assignment using &= in if else 260s registers an offense for assignment using &= in case when 260s for a instance variable lval 260s registers an offense for assignment using &= in case when 260s registers an offense for assignment using &= in if else 260s for a class variable lval 260s registers an offense for assignment using &= in ternary 260s for a local variable lval 260s registers an offense for assignment using &= in ternary 260s for a constant lval 260s registers an offense for assignment using &= in ternary 260s for a instance variable lval 260s registers an offense for assignment using &= in ternary 260s behaves like comparison methods 260s registers an offense for comparison methods in ternary operations 260s with end alignment to start_of_line 260s corrects comparison methods in case when 260s corrects comparison methods in unless else 260s corrects comparison methods in if elsif else 260s >= Ruby 2.7 260s corrects comparison methods in case in 260s with end alignment to keyword 260s corrects comparison methods in case when 260s corrects comparison methods in if elsif else 260s corrects comparison methods in unless else 260s >= Ruby 2.7 260s corrects comparison methods in case in 260s EndAlignment configured to start_of_line 260s autocorrect 260s uses proper end alignment in unless 260s uses proper end alignment in if 260s uses proper end alignment in case 260s behaves like comparison methods 260s registers an offense for comparison methods in ternary operations 260s with end alignment to keyword 260s corrects comparison methods in unless else 260s corrects comparison methods in if elsif else 260s corrects comparison methods in case when 260s >= Ruby 2.7 260s corrects comparison methods in case in 260s with end alignment to start_of_line 260s corrects comparison methods in unless else 260s corrects comparison methods in if elsif else 260s corrects comparison methods in case when 260s >= Ruby 2.7 260s corrects comparison methods in case in 260s 260s RuboCop::Cop::Layout::EmptyLines 260s does not register an offense for empty lines in a string 260s registers an offense for consecutive empty lines 260s does not register an offense for comments 260s does not register an offense when there are no tokens 260s does not register an offense for heredocs with empty lines inside 260s 260s RuboCop::Cop::Lint::RedundantSplatExpansion 260s allows splat expansion inside of an array 260s allows an array using a constructor 260s allows assigning to a splat variable 260s allows expanding a method call on an array literal 260s allows expansions of an array that is assigned to a variable in rescue 260s allows assigning to an expanded range 260s registers an offense and corrects an array literal being expanded in a rescue 260s allows assigning to a splat 260s allows assigning a variable to a splat expansion of a variable 260s accepts expanding a variable as a method parameter 260s arrays being expanded with %i variants using splat expansion 260s splat expansion inside of an array 260s registers an offense and changes %I to a list of symbols 260s registers an offense and corrects %i to a list of symbols 260s expanding an array literal in a when condition 260s allows an array that is assigned to a variable 260s registers an offense and corrects an array using %W 260s registers an offense and corrects %I to a list of symbols 260s registers an offense and corrects %i to a list of symbols 260s allows an array using a constructor 260s registers an offense and corrects an array using [] 260s registers an offense and corrects an array using %w 260s behaves like splat expansion 260s method parameters 260s registers an offense and converts to an array 260s behaves like splat literal assignment 260s registers an offense and converts to an array 260s behaves like splat expansion 260s behaves like splat literal assignment 260s registers an offense and converts to an array 260s method parameters 260s registers an offense and converts to an array 260s assignment to splat expansion 260s registers and corrects an array using top-level const 260s registers an offense and corrects an array using a constructor 260s when `AllowPercentLiteralArrayArgument: false` 260s registers an offense when using percent literal array 260s registers an offense when using percent symbol literal array 260s behaves like array splat expansion 260s behaves like splat literal assignment 260s registers an offense and removes the splat from array 260s method parameters 260s registers an offense and converts to a list of arguments 260s splat expansion of method parameters 260s registers an offense and corrects an array literal %i 260s registers an offense and corrects an array literal %I 260s behaves like array splat expansion 260s behaves like splat literal assignment 260s registers an offense and removes the splat from array 260s method parameters 260s registers an offense and converts to a list of arguments 260s behaves like array splat expansion 260s method parameters 260s registers an offense and converts to a list of arguments 260s behaves like splat literal assignment 260s registers an offense and removes the splat from array 260s behaves like array splat expansion 260s method parameters 260s registers an offense and converts to a list of arguments 260s behaves like splat literal assignment 260s registers an offense and removes the splat from array 260s behaves like splat expansion 260s method parameters 260s registers an offense and converts to an array 260s behaves like splat literal assignment 260s registers an offense and converts to an array 260s behaves like array splat expansion 260s method parameters 260s registers an offense and converts to a list of arguments 260s behaves like splat literal assignment 260s registers an offense and removes the splat from array 260s expanding Array.new call on array literal 260s with ::Array.new 260s when the array literal contains exactly one element 260s registers an offense and corrects 260s when the array literal contains exactly one element 260s registers an offense and corrects 260s when the array literal contains more than one element 260s accepts 260s when `AllowPercentLiteralArrayArgument: true` 260s does not register an offense when using percent string literal array 260s does not register an offense when using percent symbol literal array 260s splat expansion inside of an array 260s registers an offense and corrects expansion of %W to a list of words 260s registers an offense and corrects expansion of %w to a list of words 260s registers an offense and corrects the expansion of an array literalinside of an array literal 260s behaves like splat expansion 260s method parameters 260s registers an offense and converts to an array 260s behaves like splat literal assignment 260s registers an offense and converts to an array 260s expanding Array.new call on method argument 260s registers an offense and corrects 260s 260s RuboCop::Cop::Style::FormatString 260s when enforced style is percent 260s registers an offense for sprintf with 3 arguments 260s registers an offense and corrects when using springf with second argument that uses an operator 260s accepts sprintf with 1 argument 260s accepts String#% 260s accepts format without arguments 260s registers an offense for sprintf with a hash argument 260s registers an offense for format 260s accepts sprintf without arguments 260s registers an offense for format with 3 arguments 260s registers an offense for format with a hash argument 260s registers an offense for sprintf 260s accepts format with 1 argument 260s when enforced style is sprintf 260s registers an offense for format with 2 arguments 260s registers an offense for something followed by an array 260s does not register an offense for ambiguous cases 260s registers an offense for String#% with a hash argument 260s registers an offense for variable argument but does not autocorrect 260s registers an offense for variable argument and assignment but does not autocorrect 260s registers an offense for format 260s registers an offense for a string followed by something 260s works if the first operand contains embedded expressions 260s does not register an offense for numbers 260s when enforced style is format 260s works if the first operand contains embedded expressions 260s registers an offense for sprintf 260s does not autocorrect String#% with variable argument and assignment 260s registers an offense for variable argument but does not autocorrect 260s registers an offense for something followed by an array 260s does not register an offense for ambiguous cases 260s registers an offense for a string followed by something 260s registers an offense for something followed by a hash 260s registers an offense for sprintf with 2 arguments 260s does not register an offense for numbers 260s 260s RuboCop::Cop::Style::AccessModifierDeclarations 260s when `inline` is configured 260s does not offend when module_function is inlined with a symbol 260s does not offend when module_function is inlined with a method 260s offends when protected is not inlined and has a comment 260s offends when module_function is not inlined 260s accepts when #{access_modifier} is a hash literal value 260s registers an offense for correct + multiple opposite styles of #{access_modifier} usage 260s offends when protected is not inlined 260s offends when public is not inlined and has a comment 260s does not offend when private is inlined with a method 260s offends when private is not inlined and has a comment 260s accepts when #{access_modifier} is a hash literal value 260s does not offend when protected is inlined with a method 260s registers an offense for correct + multiple opposite styles of #{access_modifier} usage 260s offends when public is not inlined 260s does not offend when public is inlined with a symbol 260s registers an offense for correct + multiple opposite styles of #{access_modifier} usage 260s accepts when #{access_modifier} is a hash literal value 260s offends when private is not inlined 260s offends when module_function is not inlined and has a comment 260s does not offend when private is inlined with a symbol 260s registers an offense for correct + multiple opposite styles of #{access_modifier} usage 260s accepts when #{access_modifier} is a hash literal value 260s does not offend when public is inlined with a method 260s does not offend when protected is inlined with a symbol 260s allow access modifiers on symbols 260s accepts when argument to #{access_modifier} is a symbol 260s when methods are modified by group modifier 260s registers and autocorrects an offense 260s do not allow access modifiers on symbols 260s accepts when argument to #{access_modifier} is a symbol 260s do not allow access modifiers on symbols 260s accepts when argument to #{access_modifier} is a symbol 260s allow access modifiers on symbols 260s accepts when argument to #{access_modifier} is a symbol 260s when methods are modified by group modifier 260s registers and autocorrects an offense 260s when methods are modified by group modifier 260s registers and autocorrects an offense 260s allow access modifiers on symbols 260s accepts when argument to #{access_modifier} is a symbol 260s allow access modifiers on symbols 260s accepts when argument to #{access_modifier} is a symbol 260s do not allow access modifiers on symbols 260s accepts when argument to #{access_modifier} is a symbol 260s when methods are modified by group modifier 260s registers and autocorrects an offense 260s do not allow access modifiers on symbols 260s accepts when argument to #{access_modifier} is a symbol 260s when `group` is configured 260s accepts when using only #{access_modifier} 260s does not registers an offense when using #{access_modifier} in a block 260s accepts when #{access_modifier} is a hash literal value 260s registers an offense for correct + multiple opposite styles of #{access_modifier} usage 260s does not offend when public is not inlined 260s does not offend when protected is not inlined and has a comment 260s offends when module_function is inlined with a method 260s does not registers an offense when using #{access_modifier} in a block 260s accepts when using only #{access_modifier} 260s does not registers an offense when using #{access_modifier} in a block 260s does not offend when private is not inlined and has a comment 260s does not offend when module_function is not inlined and has a comment 260s registers an offense for correct + multiple opposite styles of #{access_modifier} usage 260s offends when private is inlined with a method 260s registers an offense for correct + multiple opposite styles of #{access_modifier} usage 260s accepts when #{access_modifier} is a hash literal value 261s registers an offense for correct + multiple opposite styles of #{access_modifier} usage 261s offends when protected is inlined with a method 261s does not offend when private is not inlined 261s accepts when using only #{access_modifier} 261s accepts when #{access_modifier} is a hash literal value 261s does not offend when protected is not inlined 261s does not registers an offense when using #{access_modifier} in a block 261s accepts when using only #{access_modifier} 261s does not offend when public is not inlined and has a comment 261s does not offend when module_function is not inlined 261s offends when public is inlined with a method 261s accepts when #{access_modifier} is a hash literal value 261s do not allow access modifiers on symbols 261s accepts when argument to #{access_modifier} is a symbol 261s when non-existent method is modified by inline modifier with disallowed symbol 261s registers an offense but does not autocorrect it 261s when method is modified by inline modifier with disallowed symbol 261s registers and autocorrects an offense 261s do not allow access modifiers on symbols 261s accepts when argument to #{access_modifier} is a symbol 261s when method has comments 261s registers and autocorrects an offense 261s do not allow access modifiers on symbols 261s accepts when argument to #{access_modifier} is a symbol 261s when method is modified by inline modifier 261s registers and autocorrects an offense 261s when method is modified by inline modifier with disallowed symbol 261s registers and autocorrects an offense 261s when method is modified by inline modifier where group modifier already exists 261s registers and autocorrects an offense 261s allow access modifiers on symbols 261s accepts when argument to #{access_modifier} is a symbol 261s when method is modified by inline modifier 261s registers and autocorrects an offense 261s when method is modified by inline modifier where group modifier already exists 261s registers and autocorrects an offense 261s when method has comments 261s registers and autocorrects an offense 261s allow access modifiers on symbols 261s accepts when argument to #{access_modifier} is a symbol 261s when method is modified by inline modifier 261s registers and autocorrects an offense 261s when non-existent method is modified by inline modifier with disallowed symbol 261s registers an offense but does not autocorrect it 261s allow access modifiers on symbols 261s accepts when argument to #{access_modifier} is a symbol 261s when method has comments 261s registers and autocorrects an offense 261s when method has comments 261s registers and autocorrects an offense 261s do not allow access modifiers on symbols 261s accepts when argument to #{access_modifier} is a symbol 261s when method is modified by inline modifier where group modifier already exists 261s registers and autocorrects an offense 261s when non-existent method is modified by inline modifier with disallowed symbol 261s registers an offense but does not autocorrect it 261s allow access modifiers on symbols 261s accepts when argument to #{access_modifier} is a symbol 261s when method is modified by inline modifier 261s registers and autocorrects an offense 261s when method is modified by inline modifier with disallowed symbol 261s registers and autocorrects an offense 261s when method is modified by inline modifier with disallowed symbol 261s registers and autocorrects an offense 261s when method is modified by inline modifier where group modifier already exists 261s registers and autocorrects an offense 261s when non-existent method is modified by inline modifier with disallowed symbol 261s registers an offense but does not autocorrect it 261s 261s RuboCop::Cop::Style::Next 261s does not crash with empty brackets 261s does not blow up on empty body until block 261s keeps comments when autocorrecting 261s does not crash with an empty body branch 261s handles nested autocorrections 261s does not blow up on empty body while block 261s does not blow up on empty body for block 261s allows super nodes 261s handles `then` when autocorrecting 261s allows empty blocks 261s allows loops with conditions at the end with ternary op 261s doesn't reindent heredoc bodies when autocorrecting 261s behaves like iterators 261s registers an offense for if inside of times 261s registers an offense for if inside of each 261s registers an offense for if inside of for 261s registers an offense for if inside of select 261s allows loops with if with else at the end 261s reports an offense for if whose body has 3 lines 261s allows loops with conditional break 261s registers an offense for if inside of each_with_object 261s autocorrects a misaligned end 261s registers an offense for if inside of map 261s allows loops with if being the entire body with else 261s registers an offense for a condition at the end of an iterator when there is more in the iterator than the condition 261s registers an offense for if inside of nested iterators 261s registers an offense for if inside of select! 261s registers an offense for if inside of downto 261s allows loops with conditional return 261s registers an offense for if inside of reject 261s registers an offense for if inside of loop 261s registers an offense for if inside of collect 261s registers an offense when line break before condition 261s allows loops with if with else, nested in another condition 261s registers an offense for if inside of nested iterators 261s registers an offense for if inside of reject! 261s EnforcedStyle: always 261s registers an offense for modifier if 261s Ruby 2.7 261s registers an offense for if inside of downto numblock 261s EnforcedStyle: skip_modifier_ifs 261s allows modifier if 261s behaves like iterators 261s registers an offense for unless inside of select 261s allows loops with unless being the entire body with else 261s registers an offense for unless inside of nested iterators 261s allows loops with unless with else at the end 261s registers an offense for unless inside of loop 261s registers an offense for unless inside of reject! 261s registers an offense for unless inside of each_with_object 261s registers an offense for unless inside of nested iterators 261s registers an offense for a condition at the end of an iterator when there is more in the iterator than the condition 261s registers an offense for unless inside of downto 261s allows loops with conditional return 261s registers an offense when line break before condition 261s allows loops with conditional break 261s reports an offense for unless whose body has 3 lines 261s registers an offense for unless inside of map 261s allows loops with unless with else, nested in another condition 261s registers an offense for unless inside of reject 261s registers an offense for unless inside of times 261s autocorrects a misaligned end 261s registers an offense for unless inside of select! 261s registers an offense for unless inside of each 261s registers an offense for unless inside of collect 261s registers an offense for unless inside of for 261s Ruby 2.7 261s registers an offense for unless inside of downto numblock 261s EnforcedStyle: always 261s registers an offense for modifier unless 261s EnforcedStyle: skip_modifier_ifs 261s allows modifier unless 261s MinBodyLength: 3 261s accepts if whose body has 1 line 261s Invalid MinBodyLength 261s fails with an error 261s 261s RuboCop::Cop::Style::HashTransformKeys 261s below Ruby 2.5 261s does not flag even if transform_keys could be used 261s when using Ruby 2.5 or newer 261s correctly autocorrects _.map{...}.to_h without block 261s does not flag key transformation when receiver is array literal 261s correctly autocorrects Hash[_.map{...}] 261s does not flag _.map {...}.to_h when key block argument is unused 261s does not flag `_.map{...}.to_h` when its receiver is `each_with_index` 261s flags _.map{...}.to_h when transform_keys could be used when line break before `to_h` 261s does not flag each_with_object when key transformation uses value 261s does not flag `each_with_object` when its receiver is `zip` 261s does not flag Hash[_.map{...}] when both key & value are transformed 261s does not flag `each_with_object` when its receiver is `each_with_index` 261s flags Hash[_.map{...}] when transform_keys could be used 261s does not flag `Hash[_.map{...}]` when its receiver is `each_with_index` 261s does not flag `Hash[_.map{...}]` when its receiver is `zip` 261s does not flag `each_with_object` when its receiver is `with_index` 261s does not flag each_with_object when its receiver is array literal 261s does not flag each_with_object when both key & value are transformed 261s does not flag each_with_object when no transformation occurs 261s does not flag _.map{...}.to_h when both key & value are transformed 261s flags _.map{...}.to_h when transform_keys could be used 261s does not flag `Hash[_.map{...}]` when its receiver is an array literal 261s does not flag each_with_object when its argument is not modified 261s correctly autocorrects _.map{...}.to_h with block 261s flags _.map {...}.to_h when transform_keys could be used when wrapped in another block 261s does not flag `Hash[_.map{...}]` when its receiver is `with_index` 261s does not flag `each_with_object` when its argument is used in the key 261s does not flag `_.map{...}.to_h` when its receiver is `zip` 261s does not flag `_.map{...}.to_h` when its receiver is `with_index` 261s does not flag key transformation in the absence of to_h 261s with multiline block 261s flags each_with_object when transform_keys could be used 261s with inline block 261s flags each_with_object when transform_keys could be used 261s with safe navigation operator 261s flags each_with_object when transform_keys could be used 261s when using Ruby 2.6 or newer 261s does not flag `_.to_h{...}` when its receiver is `each_with_index` 261s does not flag `_.to_h{...}` when its receiver is `zip` 261s does not flag `_.to_h{...}` when both key & value are transformed 261s does not flag `_.to_h{...}` when its receiver is `with_index` 261s flags _.to_h{...} when transform_keys could be used 261s does not flag `_.to_h{...}` when its receiver is an array literal 261s does not flag _.to_h {...} when key block argument is unused 261s below Ruby 2.6 261s does not flag _.to_h{...} 261s 261s RuboCop::Cop::Style::NilComparison 261s configured with comparison preferred 261s registers and corrects an offense for `!x.nil?` 261s registers an offense for nil? 261s configured with predicate preferred 261s registers and corrects an offense when using `x == nil` as a guard condition 261s registers an offense for === nil 261s registers an offense for == nil 261s 261s RuboCop::Cop::Style::SelfAssignment 261s registers an offense for non-shorthand assignment / and @x 261s registers an offense for non-shorthand assignment & and x 261s registers an offense for non-shorthand assignment && and @x 261s registers an offense for non-shorthand assignment - and x 261s registers an offense for non-shorthand assignment - and @x 261s registers an offense for non-shorthand assignment ** and @x 261s registers an offense for non-shorthand assignment * and @@x 261s registers an offense for non-shorthand assignment ** and @@x 261s registers an offense for non-shorthand assignment + and x 261s registers an offense for non-shorthand assignment + and @x 261s registers an offense for non-shorthand assignment && and @@x 261s registers an offense for non-shorthand assignment || and @@x 261s registers an offense for non-shorthand assignment + and @@x 261s registers an offense for non-shorthand assignment | and @@x 261s registers an offense for non-shorthand assignment / and @@x 261s registers an offense for non-shorthand assignment & and @x 261s registers an offense for non-shorthand assignment | and x 261s registers an offense for non-shorthand assignment * and @x 261s registers an offense for non-shorthand assignment && and x 261s registers an offense for non-shorthand assignment & and @@x 261s registers an offense for non-shorthand assignment | and @x 261s registers an offense for non-shorthand assignment || and x 261s registers an offense for non-shorthand assignment || and @x 261s registers an offense for non-shorthand assignment - and @@x 261s registers an offense for non-shorthand assignment * and x 261s registers an offense for non-shorthand assignment ** and x 261s registers an offense for non-shorthand assignment / and x 261s 261s RuboCop::Cop::Layout::SpaceAfterMethodName 261s accepts a def with arguments but no parentheses 261s registers an offense and corrects def with space before the parenthesis 261s accepts a def without arguments 261s accepts an assignment def with arguments but no parentheses 261s accepts a defs without arguments 261s accepts class method def with arguments but no parentheses 261s registers offense and corrects class def with space before parenthesis 261s registers offense and corrects assignment def with space before parenthesis 261s 261s RuboCop::Cop::Style::MultilineMethodSignature 261s when arguments span multiple lines 261s when correction would exceed maximum line length 261s does not register an offense 261s when correction would not exceed maximum line length 261s registers an offense and corrects 261s when defining an instance method 261s registers an offense and corrects when `end` is on the following line 261s registers an offense and corrects when `end` is on the same line with last argument 261s registers an offense and corrects when `end` is on the same line with only closing parentheses 261s when defining an class method 261s registers an offense and corrects when `end` is on the same line 261s registers an offense and corrects when `end` is on the same line with only closing parentheses 261s registers an offense and corrects when `end` is on the following line 261s when arguments span a single line 261s when defining an instance method 261s registers an offense and corrects when line break after opening parenthesis 261s registers an offense and corrects when closing paren is on the following line 261s when method signature is on a single line 261s does not register an offense for parameterized method 261s does not register an offense for unparameterized method 261s when defining an class method 261s when method signature is on a single line 261s does not register an offense for unparameterized method 261s does not register an offense for parameterized method 261s when arguments span a single line 261s registers an offense and corrects when closing paren is on the following line 261s 261s RuboCop::Cop::Layout::LineContinuationLeadingSpace 261s EnforcedStyle: leading 261s registers an offense when 1st line has multiple trailing spaces 261s registers an offense when 1st line has one trailing space 261s registers offenses when 1st and 2nd line has trailing spaces 261s registers offense in the right location when 1st line is not the string 261s marks the correct range when string is a positional method argument 261s puts the offense message in correct position also on indented line 261s marks the correct range when string is a block method argument 261s interpolated strings 261s registers offenses when 1st line has leading spaces and 1st line is interpolated 261s registers an offense for incorrectly formatted multiline interpolated string 261s registers offenses when 1st line has trailing spaces and 2nd line is interpolated 261s registers no offense for correctly formatted multiline interpolation 261s registers no offense for correctly formatted multiline interpolated string 261s registers no offense on doubly interpolated string alone 261s registers no offense on interpolated string alone 261s EnforcedStyle: trailing 261s marks the correct range when string is a positional method argument 261s marks the correct range when string is a block method argument 261s registers an offense when 2nd line has one leading space 261s registers offense in the right location when 1st line is not the string 261s registers an offense when 2nd line has multiple leading spaces 261s puts the offense message in correct position also on indented line 261s registers offenses when 2nd and 3rd line has leading spaces 261s interpolated strings 261s registers no offense on doubly interpolated string alone 261s registers an offense for incorrectly formatted multiline interpolated string 261s registers offenses when 2nd line has leading spaces and 1st line is interpolated 261s registers no offense on interpolated string alone 261s registers no offense for correctly formatted multiline interpolated string 261s registers no offense for correctly formatted multiline interpolation 261s registers offenses when 2nd line has leading spaces and 2nd line is interpolated 261s 261s RuboCop::Cop::Layout::IndentationConsistency 261s with if statement 261s accepts an empty if 261s accepts an if/else in assignment with end aligned with variable and chaining with a block after the end 261s accepts an if/else in assignment with end aligned with variable 261s registers an offense and corrects bad indentation in an if body 261s accepts if/elsif/else/end with fullwidth characters 261s accepts an if/else in assignment with end aligned with if 261s accepts an if in assignment with end aligned with variable 261s registers an offense and corrects bad indentation in an else body 261s accepts if/elsif/else/end laid out as a table 261s accepts a correctly aligned if/elsif/else/end 261s accepts if/then/else/end laid out as another table 261s accepts an if/else branches with rescue clauses 261s registers an offense and corrects bad indentation in an elsif body 261s accepts an if in assignment with end aligned with if 261s accepts an if/else in assignment with end aligned with variable and chaining after the end 261s accepts a one line if statement 261s accepts an if/else in assignment on next line with end aligned with if 261s with class 261s with normal style configured 261s accepts indented public, protected, and private 261s registers an offense and corrects bad indentation in def but not for outdented public, protected, and private 261s accepts an empty class body 261s registers an offense and corrects bad indentation in a class body 261s with indented_internal_methods style configured 261s accepts different indentation in different visibility sections 261s accepts different indentation in different visibility sections when using `Struct.new` 261s with while/until 261s registers an offense and corrects bad indentation in begin/end/while 261s accepts an empty while 261s registers an offense and corrects bad indentation in a while body 261s registers an offense and corrects bad indentation in an until body 261s with module 261s accepts an empty module body 261s registers an offense and corrects bad indentation of private methods 261s registers an offense and corrects bad indentation in a module body 261s even when there are no public methods 261s registers an offense and corrects bad indentation of private methods 261s with top-level code 261s accepts when using access modifier at the top level 261s accepts an empty expression string interpolation 261s registers and corrects an offense when using access modifier and indented method definition at the top level 261s with case 261s accepts case/when/else with then beginning a line 261s registers an offense and corrects bad indentation in a case/when body 261s registers an offense and corrects bad indentation in a case/else body 261s accepts indented when/else plus indented body 261s accepts case/when/else laid out as a table 261s accepts correctly indented case/when/else 261s with def/defs 261s accepts an empty def body 261s registers an offense and corrects bad indentation in a def body 261s registers an offense and corrects bad indentation in a defs body 261s accepts an empty defs body 261s with unless 261s accepts an empty unless 261s registers an offense and corrects bad indentation in an unless body 261s with for 261s registers an offense and corrects bad indentation in a for body 261s accepts an empty for 261s with block 261s registers an offense and corrects bad indentation in a {} body 261s accepts a correctly indented block body 261s does not autocorrect an offense within another offense 261s registers an offense and correct bad indentation in a do/end body 262s accepts an empty block body 262s 262s RuboCop::Cop::Layout::SingleLineBlockChain 262s does not register an offense for method call chained on the same line as a multiline block 262s does not register an offense for method call chained on a new line after a single line block 262s registers an offense for no selector method call chained on the same line as a block 262s does not register an offense for method call chained on a new line after a single line block with trailing dot 262s registers an offense for method call chained on the same line as a block 262s does not register an offense for method call chained without a dot 262s 262s RuboCop::Formatter::TapFormatter 262s #file_finished 262s when no offenses are detected 262s prints "ok" 262s when any offenses are detected 262s prints "not ok" 262s #report_file 262s when the source contains multibyte characters 262s displays text containing the offending source line 262s #finished 262s when no offenses are detected 262s does not report offenses 262s when any offenses are detected 262s reports all detected offenses for all failed files 262s 262s RuboCop::FeatureLoader 262s .load 262s with namespaced feature 262s loads it as namespaced feature 262s with dot-prefixed namespaced feature 262s loads it as namespaced feature 262s with normally loadable feature 262s loads it normally 262s with unloadable namespaced feature 262s raises LoadError with preferred message 262s with unexpected LoadError from require 262s raises LoadError 262s with dot-prefixed loadable feature 262s loads it as relative path 262s 262s RuboCop::Cop::Layout::SpaceAroundMethodCallOperator 262s does not register an offense when using `__ENCODING__` 262s does not register an offense when no method call operator 262s safe navigation operator 262s registers an offense and corrects when space around multiple method call operator 262s registers an offense and corrects when space before last method call operator 262s does not register an offense when no space around method call 262s registers an offense and corrects when spaces before method call 262s registers an offense and corrects when space around intermediate method call operator 262s registers an offense and corrects when space after last method call operator 262s registers an offense and corrects when space before method call 262s does not register an offense when no space around any `.` operators 262s registers an offense and corrects when spaces after method call 262s registers an offense and corrects when space after method call 262s registers an offense and corrects when space before first method call operator 262s registers an offense and corrects when spaces around method call 262s registers an offense and corrects when space after first method call operator 262s when multi line method call 262s registers an offense and corrects when space before method call in suffix chaining 262s does not register an offense when no space after the `&.` 262s registers an offense and corrects when space before method call 262s dot operator 262s registers an offense and corrects when space after method call 262s does not register an offense when no space around any `.` operators 262s registers an offense and corrects when space around intermediate method call operator 262s registers an offense and corrects when spaces after `Proc#call` shorthand call 262s registers an offense and corrects when spaces after method call 262s registers an offense and corrects when space around multiple method call operator 262s registers an offense and corrects when spaces before method call 262s registers an offense and corrects when space before last method call operator 262s registers an offense and corrects when spaces around method call 262s registers an offense and corrects when space after first method call operator 262s registers an offense and corrects when space before first method call operator 262s does not register an offense when no space around method call 262s registers an offense and corrects when space before method call 262s registers an offense and corrects when space after last method call operator 262s when multi line method call 262s registers an offense and corrects when space before method call 262s registers an offense and corrects when space before method call in suffix chaining 262s does not register an offense when no space after the `.` 262s when there is a space between `.` operator and a comment 262s registers an offense when there is a space before `.` 262s does not register an offense when there is not a space before `.` 262s :: operator 262s registers an offense and corrects when space after last method call operator 262s registers an offense and corrects when space after method call 262s registers an offense and corrects when spaces after method call 262s registers an offense and corrects when multiple spaces with assignment 262s registers an offense and corrects when space after first operator with assignment 262s registers an offense and corrects when space around multiple method call operator 262s does not register an offense if no space before `::` operator with assignment 262s does not register an offense when no space around any `.` operators 262s does not register an offense when no space around method call 262s registers an offense and corrects when space around intermediate method call operator 262s does not register an offense if no space with conditionals 262s does not register an offense if no space before `::` operator with inheritance 262s when multi line method call 262s does not register an offense when no space after the `::` 262s registers an offense and corrects when space before method call 262s 262s RuboCop::Cop::Style::ColonMethodCall 262s does not register an offense for nested class 262s does not register an offense when for constructor methods 262s registers an offense for instance method call with arg 262s registers an offense for instance method call 262s registers an offense for class method call with arg 262s registers an offense for class method call 262s does not register an offense for Java package namespaces 262s does not register an offense for constant access 262s does not register an offense for Java static types 262s does not register an offense for op methods 262s 262s RuboCop::Cop::Layout::EmptyLinesAroundMethodBody 262s registers an offense for class method body starting with a blank 262s registers an offense for class method body ending with a blank 262s is not fooled by single line methods 262s registers an offense for method body ending with a blank 262s accepts method body starting with a line with spaces 262s registers an offense for method body starting with a blank 262s 262s RuboCop::Cop::InternalAffairs::MethodNameEndWith 262s registers an offense if there is potentially usage of `assignment_method?` 262s registers an offense if `method_name` is a variable and there is potentially usage of `assignment_method?` 262s registers offense if there is potentially usage of `predicate_method?` 262s registers offense if there is potentially usage of `bang_method?` 262s registers offense if there is potentially usage of `bang_method?` with safe navigation operator 262s does not register offense if argument for end_with? is some other string 262s Ruby >= 2.7 262s registers an offense if method_name is symbol 262s registers offense if argument for Symbol#end_with? is '!' with safe navigation operator 262s registers offense if argument for Symbol#end_with? is '!' 262s registers offense if argument for Symbol#end_with? is '?' 262s registers an offense if method_name is symbol with safe navigation operator 262s does not register offense if argument for Symbol#end_with? is some other string 262s registers offense if argument for Symbol#end_with? is '?' with safe navigation operator 262s 262s RuboCop::Cop::Lint::SendWithMixinArgument 262s registers an offense when using `public_send` method 262s does not register an offense when using `include` 262s registers an offense when using `__send__` method 262s registers an offense when using `send` with `include` 262s does not register an offense when using `prepend` 262s does not register an offense when not using a mixin method 262s registers an offense when using `send` with `extend` 262s does not register an offense when using `extend` 262s registers an offense when using `send` with `prepend` 262s when using namespace for module 262s registers an offense when using `send` with `include` 262s when specifying a mixin method as a string 262s registers an offense when using `send` with `extend` 262s registers an offense when using `send` with `include` 262s registers an offense when using `send` with `prepend` 262s 262s RuboCop::Cop::Style::MultilineInPatternThen 262s >= Ruby 2.7 262s autocorrects when the body of `in` branch starts with `then` 262s doesn't register an offense when `then` required for a body of `in` is used 262s registers an offense for multiline (two lines in a body) `in` statement with `then` 262s registers an offense for empty `in` statement with `then` 262s registers an offense for multiline (one line in a body) `in` statement with `then` 262s doesn't register an offense for multiline `in` statement with `then` followed by other lines 262s doesn't register an offense for empty `in` statement without `then` 262s registers an offense when one line for multiple candidate values of `in` 262s does not register an offense for hash `in` statement with `then` 262s doesn't register an offense for multiline `in` statement without `then` 262s doesn't register an offense for singleline `in` statement with `then` 262s does not register an offense for array `when` statement with `then` 262s does not register an offense when line break for multiple candidate values of `in` 262s 262s RuboCop::Cop::Style::BlockDelimiters 262s BracesRequiredMethods 262s BracesRequiredMethods methods 262s allows braces 262s registers an offense with do 262s other methods 262s autocorrects { and } to do and end 262s allows braces 262s EnforcedStyle: braces_for_chaining 262s autocorrects do-end with `rescue` to {} if it is a functional block 262s autocorrects do-end with `ensure` to {} if it is a functional block 262s accepts a single line block with braces 262s accepts a multi-line functional block with {} if it is an ignored method by regex 262s accepts a multi-line block with do-end 262s accepts a multi-line functional block with {} if it is an ignored method 262s disallows {} with no chain inside of Hash[] 262s registers an offense for multi-line chained do-end blocks 262s accepts a multi-line block that needs braces to be valid ruby 262s allows when :[] is chained 262s allows do/end inside Hash[] 262s registers an offense for a single line block with do-end 262s allows chaining to } inside of Hash[] 262s Ruby >= 2.7 262s accepts a multi-line numblock with do-end 262s accepts a multi-line numblock that needs braces to be valid ruby 262s registers an offense for a single line numblock with do-end 262s accepts a single line numblock with braces 262s when there are braces around a multi-line block 262s allows when the block is being chained with attribute assignment 262s registers an offense when combined with attribute assignment 262s registers an offense in the simple case 262s allows when the block is being chained 262s with safe navigation 262s registers an offense for multi-line chained do-end blocks 262s EnforcedStyle: line_count_based 262s accepts a multi-line block that needs braces to be valid ruby 262s registers an offense for a single line block with do-end 262s accepts a multi-line block with do-end 262s accepts a single line block with braces 262s autocorrects do-end for single line blocks to { and } 262s does not autocorrect do-end if {} would change the meaning 262s does not autocorrect {} if do-end would change the meaning 262s when there are braces around a multi-line block 262s autocorrects adjacent curly braces correctly 262s can handle special method names such as []= and done? 262s registers an offense when there is a comment after the closing brace and using method chain 262s registers an offense when combined with attribute assignment 262s accepts a multi-line functional block with {} if it is an ignored method by regex 262s registers an offense when there is a comment after the closing brace and block body is empty 262s autocorrects { and } to do and end 262s does not autocorrect {} if do-end would introduce a syntax error 262s registers an offense when there is a comment after the closing brace and block body is not empty 262s registers an offense and keep chained block when there is a comment after the closing brace and block body is not empty 262s accepts a multi-line functional block with {} if it is an ignored method 262s registers an offense for braces if do-end would not change the meaning 262s registers an offense in the simple case 262s accepts braces if do-end would change the meaning 262s Ruby >= 2.7 262s registers an offense for a single line numblock with do-end 262s accepts a single line numblock with braces 262s accepts a multi-line numblock that needs braces to be valid ruby 262s accepts a multi-line numblock with do-end 262s with a single line do-end block with an inline `rescue` 262s autocorrects properly 262s EnforcedStyle: always_braces 262s accepts a multi-line functional block with do-end if it is an ignored method 262s autocorrects do-end with `ensure` to {} if it is a functional block 262s autocorrects do-end with `rescue` to {} if it is a functional block 262s accepts a single line block with braces 262s registers an offense for multi-lined do-end blocks when combined with attribute assignment 262s registers an offense for a single line block with do-end 262s accepts a multi-line block that needs braces to be valid ruby 262s accepts a multi-line functional block with do-end if it is an ignored method by regex 262s registers an offense for a multi-line block with do-end 262s does not autocorrect do-end if {} would change the meaning 262s registers an offense for multi-line chained do-end blocks 262s when there are braces around a multi-line block 262s allows in the simple case 262s allows when the block is being chained 262s allows when combined with attribute assignment 262s EnforcedStyle: semantic 262s autocorrects do-end to {} with appropriate spacing 262s autocorrects do-end to {} if it is a functional block 262s allows {} if it is a known functional method 262s autocorrects do-end to {} if it is a functional block and does not change the meaning 262s accepts a multi-line functional block with do-end if it is an ignored method by regex 262s registers an offense for a multi-line block with do-end if the return value is attribute-assigned 262s autocorrects do-end with `rescue` to {} if it is a functional block 262s registers an offense for a multi-line block with do-end if the return value is assigned 262s accepts a multi-line block with braces if it is the return value of its scope 262s accepts a multi-line block with braces when passed to a method 262s accepts a multi-line functional block with do-end if it is a known procedural method 262s autocorrects do-end with `ensure` to {} if it is a functional block 262s accepts a single line block with {} if used in an if statement 262s accepts a multi-line block with braces if the return value is assigned 262s accepts a multi-line block with do-end if it is the return value of its scope 262s accepts a single line block with {} if used in an irange 262s registers an offense for a multi-line block with do-end if the return value is passed to a method 262s accepts a single line block with {} if used in an array 262s registers an offense for a multi-line block with braces if the return value is not used 262s accepts a multi-line functional block with do-end if it is an ignored method 262s allows {} if it is a known procedural method 262s accepts a multi-line block with braces when passed to a known functional method 262s accepts a multi-line block with braces when chained 262s accepts a single line block with {} followed by a safe navigation method call 262s accepts a single line block with {} if used in a logical or 262s accepts a single line block with {} if used in a logical and 262s accepts a single line block with {} if used in an erange 262s with a procedural multi-line block 262s autocorrects { and } to do and end 262s autocorrects { and } to do and end with appropriate spacing 262s with a procedural one-line block 262s with AllowBracesOnProceduralOneLiners false or unset 262s accepts a single line block with do-end if it is procedural 262s registers an offense for a single line procedural block 262s with AllowBracesOnProceduralOneLiners true 262s accepts a single line procedural block with braces 262s accepts a single line procedural do-end block 262s 262s RuboCop::Cop::Style::SpecialGlobalVars 262s when style is use_perl_names 262s registers an offense for $PROCESS_ID 262s does not register an offense for backrefs like $1 262s autocorrects $INPUT_RECORD_SEPARATOR to $/ 262s registers an offense for $PID 262s registers an offense for $LOADED_FEATURES 262s registers an offense for $PROGRAM_NAME 262s registers an offense for $LOAD_PATH 262s autocorrects #{$LOAD_PATH} to #$: 262s when style is use_builtin_english_names 262s does not register an offense for Perl names 262s does not register an offense for backrefs like $1 262s generates correct auto-config when mixed styles are used 262s generates correct auto-config when Perl variable names are used 262s does not register an offenses for builtin names 262s autocorrects non-preffered builtin names 262s when style is use_english_names 262s when add require English is disabled 262s autocorrects #$: to #{$LOAD_PATH} 262s registers an offense for $$ 262s generates correct auto-config when Perl variable names are used 262s registers an offense for $" 262s registers an offense for $: 262s does not register an offense for backrefs like $1 262s autocorrects #{$!} to #{$ERROR_INFO} 262s is clear about variables from the English library vs those not 262s generates correct auto-config when mixed styles are used 262s registers an offense for $0 262s autocorrects $/ to $INPUT_RECORD_SEPARATOR 262s when add require English is enabled 262s when English is already required at top-level 262s moves require English above replacement 262s leaves require English alone for $$ 262s when English has not been required at top-level 262s does not add for replacement outside of English lib 262s adds require English for $$ 262s adds require English for twice `$*` in nested code 262s adds require English for $$ in nested code 262s 262s RuboCop::Cop::Lint::NonDeterministicRequireOrder 262s when not requiring files 262s does not register an offense 262s when requiring files 262s when Ruby 2.7 or lower 262s with unsorted index 262s registers an offense and autocorrects to add .sort when the block has `require` 262s registers an offense with extra logic 262s registers an offense and autocorrects to add .sort when the numblock has `require` 262s registers an offense and autocorrects to add .sort when the block has `require_relative` 262s with top-level ::Dir 262s registers an offense and corrects to add .sort 262s with require block passed as parameter 262s registers an offense an autocorrects to add sort 262s with require_relative block passed as parameter 262s registers an offense an autocorrects to add sort 262s with unsorted glob 262s registers an offense and autocorrects to add .sort 262s with require block passed as parameter 262s registers an offense an autocorrects to add sort 262s with top-level ::Dir 262s registers an offense and corrects to add .sort 262s with direct block glob 262s registers an offense and autocorrects to add .sort.each 262s with top-level ::Dir 262s registers an offense and corrects to add .sort.each 262s with require_relative block passed as parameter 262s registers an offense and autocorrects to add sort 262s with require block passed as parameter 262s registers an offense and autocorrects to add sort 262s with sorted glob 262s does not register an offense 262s when Ruby 3.0 or higher 262s with `Dir.glob` 262s does not register an offense 262s with `sort: false` keyword option 262s does not register an offense 262s with top-level ::Dir 262s does not register an offense 262s with require block passed as parameter 262s does not register an offense 262s with `Dir[]` 262s does not register an offense 262s with extra logic 262s does not register an offense 262s with require block passed as parameter 262s does not register an offense 262s with top-level ::Dir 262s does not register an offense 262s with direct block glob 262s does not register an offense 262s with require block passed as parameter 262s does not register an offense 262s with top-level ::Dir 262s does not register an offense 262s with sorted index 262s does not register an offense 262s 262s RuboCop::Cop::Layout::EndOfLine 262s when EnforcedStyle is crlf 262s registers an offense for CR+LF 262s does not register offense for no CR at end of file 262s does not register offenses after __END__ 262s accepts an empty file 262s and the default external encoding is US_ASCII 262s does not crash on UTF-8 encoded non-ascii characters 262s can inspect non-UTF-8 encoded source with proper encoding comment 262s and there are many lines ending with LF 262s registers only one offense 262s can inspect non-UTF-8 encoded source with proper encoding comment 262s when EnforcedStyle is lf 262s accepts an empty file 262s registers an offense for CR+LF 262s registers an offense for CR at end of file 262s does not register offenses after __END__ 262s and the default external encoding is US_ASCII 262s does not crash on UTF-8 encoded non-ascii characters 262s can inspect non-UTF-8 encoded source with proper encoding comment 262s and there are many lines ending with CR+LF 262s can inspect non-UTF-8 encoded source with proper encoding comment 262s registers only one offense 262s when EnforcedStyle is native 262s registers an offense for an incorrect EOL 262s 262s RuboCop::Cop::Style::EmptyBlockParameter 262s accepts an empty block parameter with a lambda 262s accepts a block that is do-end style without parameter 262s accepts a non-empty block parameter with {} style 262s registers an offense for an empty block parameter with {} style 262s accepts a block that is {} style without parameter 262s accepts a non-empty block parameter with do-end style 262s registers an offense for an empty block parameter with do-end style 262s registers an offense for an empty block parameter with super 262s registers an offense for an empty block parameter with lambda 262s 262s RuboCop::Cop::Layout::FirstArrayElementIndentation 262s when array is method argument 262s and arguments are surrounded by parentheses 262s and EnforcedStyle is special_inside_parentheses 262s accepts indent based on the left brace when the outer hash key and the left bracket is not on the same line 262s registers an offense for incorrectly indented multi-line array that is the value of a single pair hash 262s accepts special indentation for second argument 262s registers an offense for a multi-line array that is a value of a multi pairs hash when the indent of its elements is not based on the hash key 262s registers an offense and corrects 'consistent' indentation 262s accepts special indentation for first argument 262s accepts indent based on the preceding left parenthesis when the right bracket and its following pair is on the same line 262s accepts normal indentation for array within array 263s registers an offense and corrects 'align_brackets' indentation 263s when using safe navigation operator 263s registers an offense and corrects 'consistent' indentation 263s and EnforcedStyle is consistent 263s accepts normal indentation for second argument 263s accepts indent based on the left brace when the outer hash key and the left bracket is not on the same line 263s registers an offense for incorrectly indented multi-line array that is the value of a single pair hash 263s accepts normal indentation for first argument 263s registers an offense and corrects incorrect indentation 263s registers an offense for a multi-line array that is a value of a multi pairs hash when the indent of its elements is not based on the hash key 263s accepts indent based on the start of the line where the left bracket iswhen the right bracket and its following pair is on the same line 263s and argument are not surrounded by parentheses 263s accepts indent based on the start of the line where the left bracket iswhen the right bracket and its following pair is on the same line 263s accepts a correctly indented multi-line array with brackets 263s accepts indent based on the left bracket when the outer hash key and the left bracket is not on the same line 263s registers an offense for incorrectly indented multi-line array that is the value of a single pair hash 263s registers an offense for a multi-line array that is a value of a multi pairs hash when the indent of its elements is not based on the hash key 263s registers an offense and corrects incorrectly indented multi-line array with brackets 263s accepts single line array with brackets 263s accepts bracketless array 263s when EnforcedStyle is align_brackets 263s accepts an empty array 263s accepts multi-assignments with no brackets 263s accepts single line array 263s accepts multi-assignments with brackets 263s accepts a first element on the same line as the left bracket 263s accepts correctly indented first element 263s accepts several elements per line 263s registers an offense and corrects incorrectly indented ] 263s when 'consistent' style is used 263s registers an offense and corrects incorrect indentation 263s registers an offense and corrects incorrectly indented 1st element 263s when indentation width is overridden for this cop 263s registers an offense and corrects indentation that does not match IndentationWidth 263s accepts correctly indented first element 263s when 'special_inside_parentheses' style is used 263s registers an offense and corrects incorrect indentation 263s when array is argument to setter 263s registers an offense and corrects incorrectly indented first element 263s accepts correctly indented first element 263s when array is right hand side in assignment 263s accepts correctly indented first element 263s accepts multi-assignments with no brackets 263s registers an offense and corrects incorrectly indented first element 263s accepts multi-assignments with brackets 263s accepts a first element on the same line as the left bracket 263s accepts single line array 263s accepts an empty array 263s accepts several elements per line 263s when array is operand 263s registers an offense and corrects incorrectly indented ] 263s accepts correctly indented first element 263s registers an offense and corrects incorrectly indented first element 263s when indentation width is overridden for this cop 263s accepts correctly indented first element 263s registers an offense and corrects incorrectly indented 1st element 263s 263s RuboCop::Cop::Lint::UnreachableCode 263s accepts code with conditional `exit!` 263s registers an offense for `next` in all `case` branches 263s accepts `return` as the final expression 263s accepts `retry` is in `if` branch only 263s accepts code with conditional `retry` 263s accepts `next` is in all `if` branches 263s accepts `retry` is in `else` branch only 263s accepts `redo` as the final expression 263s registers an offense for `throw` before other statements 263s accepts `return` is in `if`, and without `else` 263s registers an offense for `retry` in all `if` branches with other expressions 263s accepts `break` is in `if`, and without `else` 263s accepts code with conditional `return` 263s registers an offense for `raise` in all `if` and `elsif` branches 263s registers an offense for `throw` in all `case` branches 263s accepts `abort` is in `if` branch only 263s accepts `fail` as the final expression 263s accepts `exit` as the final expression 263s accepts `throw` is in `if`, and without `else` 263s accepts `next` is in `if` branch only 263s accepts `exit!` is not in `elsif` branch 263s registers an offense for `raise` before other statements 263s accepts `exit!` is in `else` branch only 263s registers an offense for `redo` before other statements 263s registers an offense for `raise` in all `case` branches 263s accepts `break` as the final expression 263s accepts `break` is not in `elsif` branch 263s accepts `retry` is not in `elsif` branch 263s accepts `abort` as the final expression 263s registers an offense for `fail` in all `case` branches 263s accepts `throw` is not in `elsif` branch 263s accepts code with conditional `next` 263s registers an offense for `retry` in all `case` branches 263s registers an offense for `raise` in all `if` branches with other expressions 263s registers an offense for `retry` in all `if` branches 263s accepts `raise` is not in `elsif` branch 263s accepts code with conditional `redo` 263s registers an offense for `break` in all `if` branches 263s accepts `exit!` as the final expression 263s accepts `return` is in `case` branch without else 263s registers an offense for `redo` in all `case` branches 263s accepts `abort` is not in `elsif` branch 263s registers an offense for `retry` in `begin` 263s registers an offense for `abort` in all `if` branches 263s accepts `exit` is not in `elsif` branch 263s registers an offense for `next` in all `if` branches with other expressions 263s registers an offense for `break` before other statements 263s accepts code with conditional `fail` 263s registers an offense for `abort` in all `if` branches with other expressions 263s registers an offense for `next` before other statements 263s accepts `exit!` is in `if` branch only 263s accepts `retry` as the final expression 263s accepts `redo` is in `if` branch only 263s accepts `return` is in all `if` branches 263s accepts `raise` is in `if`, and without `else` 263s accepts `abort` is in `if`, and without `else` 263s accepts `raise` is in `else` branch only 263s registers an offense for `return` in all `case` branches 263s accepts `exit!` is in all `if` branches 263s accepts `fail` is in `else` branch only 263s registers an offense for `exit` in all `if` and `elsif` branches 263s registers an offense for `exit!` in all `case` branches 263s accepts `return` is in `if` branch only 263s accepts `redo` is in `case` branch without else 263s registers an offense for `return` before other statements 263s accepts `redo` is in `if`, and without `else` 263s accepts `break` is in `case` branch without else 263s accepts `fail` is in `case` branch without else 263s accepts `next` is in `else` branch only 263s accepts `redo` is not in `elsif` branch 263s accepts `exit` is in `case` branch without else 263s registers an offense for `exit` in all `if` branches 263s registers an offense for `exit!` in all `if` branches with other expressions 263s registers an offense for `next` in all `if` and `elsif` branches 263s registers an offense for `return` in all `if` branches 263s accepts `throw` is in `case` branch without else 263s registers an offense for `abort` before other statements 263s accepts `raise` is in `if` branch only 263s accepts `throw` as the final expression 263s registers an offense for `fail` in all `if` branches with other expressions 263s registers an offense for `abort` in all `if` and `elsif` branches 263s accepts `exit!` is in `case` branch without else 263s accepts `fail` is in `if` branch only 263s accepts `throw` is in all `if` branches 263s accepts `redo` is in `else` branch only 263s registers an offense for `return` in all `if` branches with other expressions 263s accepts `fail` is in `if`, and without `else` 263s accepts `abort` is in all `if` branches 263s registers an offense for `redo` in all `if` branches 263s registers an offense for `return` in all `if` and `elsif` branches 263s accepts `abort` is in `else` branch only 263s registers an offense for `exit!` before other statements 263s accepts `break` is in `if` branch only 263s registers an offense for `throw` in all `if` and `elsif` branches 263s registers an offense for `return` in `begin` 263s registers an offense for `next` in `begin` 263s accepts `throw` is in `if` branch only 263s registers an offense for `exit!` in all `if` branches 263s registers an offense for `break` in all `if` branches with other expressions 263s accepts `retry` is in `case` branch without else 263s accepts `exit!` is in `if`, and without `else` 263s accepts `break` is in `else` branch only 263s accepts `retry` is in all `if` branches 263s registers an offense for `exit` before other statements 263s registers an offense for `exit` in all `if` branches with other expressions 263s accepts `retry` is in `if`, and without `else` 263s registers an offense for `exit!` in `begin` 263s accepts code with conditional `throw` 263s accepts `return` is in `else` branch only 263s accepts `exit` is in `if`, and without `else` 263s registers an offense for `redo` in all `if` and `elsif` branches 263s accepts `exit` is in `if` branch only 263s registers an offense for `retry` in all `if` and `elsif` branches 263s registers an offense for `fail` in all `if` and `elsif` branches 263s accepts `next` is in `if`, and without `else` 263s accepts `throw` is in `else` branch only 263s registers an offense for `fail` in all `if` branches 263s accepts code with conditional `raise` 263s registers an offense for `raise` in `begin` 263s accepts `fail` is not in `elsif` branch 263s registers an offense for `fail` before other statements 263s accepts `break` is in all `if` branches 263s accepts `next` is not in `elsif` branch 263s registers an offense for `next` in all `if` branches 263s registers an offense for `redo` in all `if` branches with other expressions 263s registers an offense for `retry` before other statements 263s accepts `return` is not in `elsif` branch 263s accepts `fail` is in all `if` branches 263s accepts code with conditional `abort` 263s registers an offense for `throw` in `begin` 263s registers an offense for `abort` in all `case` branches 263s registers an offense for `break` in all `case` branches 263s registers an offense for `throw` in all `if` branches with other expressions 263s accepts `redo` is in all `if` branches 263s accepts `exit` is in `else` branch only 263s registers an offense for `break` in `begin` 263s accepts `raise` is in all `if` branches 263s registers an offense for `abort` in `begin` 263s registers an offense for `exit` in all `case` branches 263s registers an offense for `throw` in all `if` branches 263s accepts `raise` is in `case` branch without else 263s accepts `exit` is in all `if` branches 263s registers an offense for `fail` in `begin` 263s accepts `next` as the final expression 263s accepts `abort` is in `case` branch without else 263s accepts `raise` as the final expression 263s registers an offense for `raise` in all `if` branches 263s registers an offense for `exit` in `begin` 263s accepts code with conditional `exit` 263s registers an offense for `break` in all `if` and `elsif` branches 263s accepts code with conditional `break` 263s registers an offense for `redo` in `begin` 263s accepts `next` is in `case` branch without else 263s registers an offense for `exit!` in all `if` and `elsif` branches 263s 263s RuboCop::Cop::Style::MultipleComparison 263s registers an offense and corrects when `a` is compared three times, once on the righthand side 263s registers an offense and corrects when `a` is compared twice in `if` and `elsif` conditions 263s registers an offense and corrects when `a` is compared three times on the right hand side 263s registers an offense and corrects when `a` is compared three times 263s does not register an offense for a duplicated condition 263s does not register an offense for comparing multiple int literals 263s does not register an offense when comparing two sides of the disjunction is unrelated 263s does not register an offense for comparing an lvar 263s does not register an offense for comparing multiple literal strings 263s registers an offense and corrects when multiple comparison is not part of a conditional 263s registers an offense and corrects when `a` is compared twice 263s does not register an offense for a == b || b == a 263s does not register an offense for Array#include? 263s does not register an offense for comparing lvars 263s does not register an offense for comparing lvars when a string is on the lefthand side 263s when `AllowMethodComparison: false` 263s registers an offense and corrects when using multiple method calls 263s when `AllowMethodComparison: true` 263s does not register an offense when using multiple method calls 263s 263s RuboCop::Cop::Style::ClassMethodsDefinitions 263s when EnforcedStyle is self_class 263s does not register an offense when defining singleton methods not on self 263s does not register an offense when defining class methods with `class << self` 263s registers an offense when defining class methods with `def self.method` 263s when EnforcedStyle is def_self 263s does not register an offense when defining singleton methods using `self << object` 263s registers an offense and corrects when defining class methods with `class << self` 263s does not register an offense when class << self does not contain methods 263s does not register an offense when class << self contains only class methods 263s registers an offense and corrects when defining class methods with `class << self` and there is no blank line between method definition and attribute accessor 263s correctly handles methods with annotation comments 263s registers and corrects an offense when defining class methods with `class << self` with comment only body 263s correctly handles class << self containing multiple methods 263s registers and corrects an offense when defining class methods with `class << self` with inline comment 263s does not register an offense when defining class methods with `def self.method` 263s does not register an offense when `class << self` contains non public methods 263s removes empty class << self when correcting 263s correctly handles def self.x within class << self 263s 263s RuboCop::Cop::Style::MultilineTernaryOperator 263s registers an offense and corrects when condition is multiline and using assignment method 263s accepts a single line ternary operator expression 263s registers an offense and corrects when condition is multiline 263s registers an offense and corrects when condition is multiline and using hash key assignment 263s registers an offense and corrects when everything is on a separate line 263s register an offense and corrects when returning a multiline ternary operator expression with `break` 263s registers offense and corrects when the if branch and the else branch are on a separate line from the condition 263s registers an offense and corrects when the false branch is on a separate line 263s registers an offense and corrects when the false branch is on a separate line and assigning a return value 263s register an offense and corrects when returning a multiline ternary operator expression with method call 263s register an offense and corrects when returning a multiline ternary operator expression with `return` 263s register an offense and corrects when returning a multiline ternary operator expression with `next` 263s 263s RuboCop::Cop::Style::RedundantException 263s reports an offense for a raise with ::RuntimeError.new 263s reports an offense for a fail with RuntimeError.new 263s reports an offense for a raise with ::RuntimeError 263s accepts a raise with ::RuntimeError if it does not have 2 args 263s accepts a fail with RuntimeError if it does not have 2 args 263s reports an offense for a raise with RuntimeError.new 263s reports an offense for a fail with RuntimeError and () 263s accepts rescue w/ non redundant error 263s accepts a raise with RuntimeError if it does not have 2 args 263s reports an offense for a raise with RuntimeError and () 263s reports an offense for a raise with RuntimeError 263s reports an offense for a fail with RuntimeError.new 263s reports an offense for a fail with ::RuntimeError.new 263s accepts a fail with ::RuntimeError if it does not have 2 args 263s accepts rescue w/ non redundant error 263s accepts rescue w/ non redundant error 263s reports an offense for a fail with ::RuntimeError and () 263s reports an offense for a raise with ::RuntimeError and () 263s reports an offense for a fail with ::RuntimeError.new 263s reports an offense for a fail with ::RuntimeError 263s accepts rescue w/ non redundant error 263s reports an offense for a fail with RuntimeError 263s reports an offense for a raise with RuntimeError.new 263s reports an offense for a raise with ::RuntimeError.new 263s 263s RuboCop::Cop::InternalAffairs::ExampleDescription 263s with `expect_correction` 263s registers an offense when given an improper description 263s in conjunction with expect_offense 263s registers an offense when given an improper description 263s when the description is invalid for both methods 263s registers an offense for the first method encountered 263s with `expect_offense` 263s registers an offense when given an improper description 263s does not register an offense when given a proper description 263s does not register an offense when given an unexpected description 263s with `expect_no_offenses` 263s does not register an offense when given a proper description 263s does not register an offense when given an unexpected description 263s registers an offense when given an improper description 263s does not crash when given a proper description that is split with + 263s when not making an expectation on offenses 263s does not register an offense 263s with `expect_no_corrections` 263s registers an offense when given an improper description 263s in conjunction with expect_offense 263s registers an offense when given an improper description 263s 263s RuboCop::Cop::VariableForce::Reference 263s .new 263s when non variable reference node is passed 263s raises error 263s 263s RuboCop::Cop::Lint::DuplicateRescueException 263s registers an offense when duplicate exception exists within rescues with empty `rescue` branch 263s registers an offense when duplicate exception exists within rescues with `else` branch 263s does not register an offense when there are no duplicate exceptions 263s registers an offense when duplicate exception exists 263s registers an offense when multiple duplicate exceptions exist 263s registers an offense when duplicate exception splat exists 263s 263s RuboCop::Cop::Style::ExplicitBlockArgument 263s correctly corrects when method already has an explicit block argument 263s does not register an offense when `yield` is not inside block 263s registers an offense and corrects when method contains multiple `yield`s 263s does not register an offense when code is called outside of a method 263s does not register an offense when there is more than one block argument and not all are yielded 263s does not add extra parens when correcting 263s registers an offense and corrects when block just yields its arguments 263s does not register an offense when `yield` is the sole block body 263s correctly corrects when using safe navigation method call 263s does not register an offense when arguments are yielded in a different order 263s correctly corrects when the method call has a trailing comma in its argument list 263s adds to the existing arguments when correcting 263s does not add extra parens to `super` when correcting 263s registers an offense and corrects when multiple arguments are yielded 264s registers an offense and corrects when `yield` is inside block of `super` 264s registers an offense and corrects when `yield` inside block has no arguments 264s does not register an offense when `yield` arguments is not a prefix of block arguments 264s 264s RuboCop::Cop::Style::SoleNestedConditional 264s does not register an offense when using nested modifier on value assigned in multiple conditions 264s registers an offense and corrects when nested `||` operator modifier condition 264s registers an offense and corrects when `if` foo do_something end `if` bar 264s registers an offense and corrects when using nested `if` within `unless` 264s registers an offense and corrects when using `||` in the outer condition and nested modifier condition 264s does not register an offense when using nested conditional within `elsif` 264s registers an offense and corrects when using nested `if` within `if` 264s registers an offense and corrects when using `unless` and multiple method arguments with parenthesesin the outer condition and nested modifier condition 264s registers an offense and corrects when `if` foo && bar do_something end `if` baz 264s registers an offense and corrects when using nested `unless` modifier conditional 264s registers an offense and corrects for multiple nested conditionals 264s registers an offense and corrects when using nested `unless` within `if` 264s registers an offense and corrects when `unless` foo && bar do_something end `if` baz 264s registers an offense and corrects when using `unless` and `||` without parens in the outer condition and nested modifier condition 264s registers an offense and corrects for multiple nested conditionals with using method call outer condition by omitting parentheses 264s does not register an offense when nested conditional has an `else` branch 264s does not register an offense when no nested conditionals 264s registers an offense and corrects when using nested `if` within `if foo = bar` 264s does not register an offense when using nested modifier on value assigned in single condition 264s registers an offense and corrects when `if` foo && bar do_something end `unless` baz 264s registers an offense and corrects when using nested `if` within `unless foo == bar` 264s registers an offense and corrects when using nested `if` modifier conditional 264s registers an offense and corrects when `if` foo do_something end `unless` bar 264s registers an offense and corrects when using nested `unless` modifier multiple conditional 264s registers an offense and corrects when using `unless` and `||` and parens in the outer condition and nested modifier condition 264s registers an offense and corrects when using nested `unless` within `unless` 264s registers an offense and corrects when using nested `unless` modifier with a single expression condition 264s registers an offense and corrects when `unless` foo do_something end `if` bar 264s does not register an offense for nested conditionals when outer conditional has an `else` branch 264s does not register an offense when using nested conditional is not the whole body 264s registers an offense and corrects when `if` foo do_something end `if` bar && baz 264s registers an offense and corrects when using `unless` and method arguments without parentheses in the outer condition and nested modifier condition 264s does not register an offense when using nested ternary within conditional 264s registers an offense and corrects when using `unless` and `&&` without parens in the outer condition and nested modifier condition 264s registers an offense and corrects when using nested conditional and branch contains a comment 264s registers an offense and corrects when `if` foo do_something end `unless` bar && baz 264s registers an offense and corrects when there are outer and inline comments 264s registers an offense and corrects when nested `||` operator condition 264s registers an offense and corrects when using guard conditional with outer comment 264s registers an offense and corrects when using `||` in the outer condition 264s registers an offense and corrects when using `unless` and method arguments with parentheses in the outer condition and nested modifier condition 264s when the inner condition has a send node with parens 264s in guard style 264s registers an offense and corrects 264s in modifier style 264s registers an offense and corrects 264s when AllowModifier is true 264s does not register an offense when using nested modifier conditional 264s when the inner condition has a send node without parens 264s in guard style 264s registers an offense and corrects 264s in modifier style 264s registers an offense and corrects 264s with a block 264s registers an offense and corrects 264s with a `csend` node 264s registers an offense and corrects 264s when disabling `Style/IfUnlessModifier` 264s registers an offense and corrects when using nested conditional and branch contains a comment 264s registers an offense and corrects when there are outer and inline comments 264s 264s RuboCop::Cop::Layout::MultilineMethodCallBraceLayout 264s ignores single-line calls 264s ignores implicit calls 264s ignores calls without arguments 264s ignores calls with a multiline empty brace 264s ignores calls with an empty brace 264s behaves like multiline literal brace layout trailing comma 264s same_line style 264s opening brace on same line as first element 264s last element has a trailing comma 264s autocorrects closing brace on different line as last element 264s symmetrical style 264s opening brace on same line as first element 264s last element has a trailing comma 264s autocorrects closing brace on different line from last element 264s when EnforcedStyle is new_line 264s ignores single-line calls with multi-line receiver with leading dot 264s still ignores single-line calls 264s ignores single-line calls with multi-line receiver 264s when comment present before closing brace 264s corrects closing brace without crashing 264s behaves like multiline literal brace layout 264s heredoc 264s ignores heredocs that could share a last line 264s detects heredoc structures that are safe to add to 264s new_line style 264s opening brace on same line as first element 264s allows closing brace on different line from multi-line element 264s detects closing brace on same line as last multiline element 264s allows closing brace on different line from last element 264s autocorrects closing brace on same line as last element 264s opening brace on separate line from first element 264s allows closing brace on separate line from last element 264s detects closing brace on same line as last element 264s allows closing brace on separate line from last multiline element 264s symmetrical style 264s opening brace on same line as first element 264s autocorrects closing brace on different line from last element 264s detects closing brace on different line from last element 264s allows closing brace on same line as last element 264s allows closing brace on same line as last multiline element 264s with a chained call on the closing brace 264s but no comment after the last element 264s autocorrects the closing brace 264s and a comment after the last element 264s detects closing brace on separate line from last elementbut does not autocorrect the closing brace 264s opening brace on separate line from first element 264s allows closing brace on separate line from last multiline element 264s detects closing brace on same line as last element 264s allows closing brace on separate line from last element 264s same_line style 264s opening brace on separate line from first element 264s allows closing brace on same line as last element 264s allows closing brace on same line as last multiline element 264s detects closing brace on different line from last element 264s opening brace on same line as first element 264s allows closing brace on same line as multi-line element 264s allows closing brace on same line from last element 264s detects closing brace on different line from multiline element 264s autocorrects closing brace on different line as last element 264s with a chained call on the closing brace 264s and a comment after the last element 264s detects closing brace on separate line from last elementbut does not autocorrect the closing brace 264s but no comment after the last element 264s autocorrects the closing brace 264s 264s RuboCop::Cop::Layout::MultilineMethodDefinitionBraceLayout 264s ignores implicit defs 264s ignores single-line defs 264s ignores defs without params 264s new_line style 264s opening brace on separate line from first element 264s detects closing brace on same line as last element 264s allows closing brace on separate line from last element 264s allows closing brace on separate line from last multiline element 264s opening brace on same line as first element 264s allows closing brace on different line from multi-line element 264s allows closing brace on different line from last element 264s autocorrects closing brace on same line as last element 264s detects closing brace on same line as last multiline element 264s heredoc 264s ignores heredocs that could share a last line 264s detects heredoc structures that are safe to add to 264s same_line style 264s opening brace on separate line from first element 264s allows closing brace on same line as last multiline element 264s detects closing brace on different line from last element 264s allows closing brace on same line as last element 264s opening brace on same line as first element 264s detects closing brace on different line from multiline element 264s allows closing brace on same line as multi-line element 264s autocorrects closing brace on different line as last element 264s allows closing brace on same line from last element 264s symmetrical style 264s opening brace on separate line from first element 264s allows closing brace on separate line from last element 264s detects closing brace on same line as last element 264s allows closing brace on separate line from last multiline element 264s opening brace on same line as first element 264s autocorrects closing brace on different line from last element 264s detects closing brace on different line from last element 264s allows closing brace on same line as last element 264s allows closing brace on same line as last multiline element 264s 264s RuboCop::DirectiveComment 264s #cop_names 264s when department and cops specified 264s is expected to eq ["Foo/Bar", "Foo/Baz", "Baz/Cop"] 264s when redundant directive cop department specified 264s is expected to eq ["Lint/One", "Lint/Two"] 264s when only department specified 264s is expected to eq ["Foo/Bar", "Foo/Baz"] 264s when only cop specified 264s is expected to eq ["Foo/Bar"] 264s when all cops mentioned 264s is expected to eq ["all_names"] 264s when couple departments specified 264s is expected to eq ["Foo/Bar", "Foo/Baz", "Baz/Bar"] 264s #match_captures 264s when disable 264s is expected to eq ["disable", "all", nil, nil] 264s when enable 264s is expected to eq ["enable", "Foo/Bar", nil, "Foo/"] 264s when typo 264s is expected to be nil 264s when todo 264s is expected to eq ["todo", "all", nil, nil] 264s #overridden_by_department? 264s when there are no departments 264s is expected to equal false 264s when there are no cops 264s is expected to equal false 264s when cop is not overridden by it's department 264s is expected to equal false 264s when cop is overridden by it's department 264s is expected to equal true 264s #enabled? 264s when disable 264s is expected to equal false 264s when enable 264s is expected to equal true 264s when todo 264s is expected to equal false 264s #disabled_all? 264s when disabled all cops 264s is expected to equal true 264s when enabled all cops 264s is expected to equal false 264s when disabled specific cops 264s is expected to equal false 264s when enabled specific cops 264s is expected to equal false 264s #directive_count 264s when few cops used 264s is expected to eq 2 264s when cops and departments used 264s is expected to eq 4 264s when few department used 264s is expected to eq 3 264s #in_directive_department? 264s when cop disabled 264s is expected to equal false 264s when cop department disabled 264s is expected to equal true 264s when another department disabled 264s is expected to equal false 264s #single_line? 264s when does NOT relate to single line 264s is expected to equal false 264s when relates to single line 264s is expected to equal true 264s #disabled? 264s when enable 264s is expected to equal false 264s when disable 264s is expected to equal true 264s when todo 264s is expected to equal true 264s #enabled_all? 264s when disabled all cops 264s is expected to equal false 264s when enabled all cops 264s is expected to equal true 264s when enabled specific cops 264s is expected to equal false 264s when disabled specific cops 264s is expected to equal false 264s #line_number 264s returns line number for directive 264s .before_comment 264s when line has code 264s is expected to eq "def foo " 264s when line has NO code 264s is expected to eq "" 264s #all_cops? 264s when mentioned specific cops 264s is expected to equal false 264s when mentioned all 264s is expected to equal true 264s #match? 264s when disabled all cops 264s is expected to equal true 264s when cop names are superset of names 264s is expected to equal false 264s when there are no cop names 264s is expected to equal false 264s when cop names are subset of names 264s is expected to equal false 264s when cop names are same as in the comment 264s is expected to equal true 264s when cop names are same but in a different order 264s is expected to equal true 264s when cop names are same but have duplicated names 264s is expected to equal true 264s #department_names 264s when only department specified 264s is expected to eq ["Foo"] 264s when couple departments specified 264s is expected to eq ["Foo", "Baz"] 264s when only cop specified 264s is expected to eq [] 264s when all cops mentioned 264s is expected to eq [] 264s when department and cops specified 264s is expected to eq ["Foo"] 264s 264s RuboCop::Cop::Style::BisectedAttrAccessor 264s registers an offense and corrects when both accessors of the name exists and accessor contains multiple names 264s registers an offense and corrects when attr and attr_writer exists 264s registers and corrects in a module 264s does not register an offense when accessors are within different visibility scopes 264s registers an offense for accessors with the same visibility in different scopes 264s does not register an offense when using `attr_accessor` 264s registers an offense and corrects when both accessors of the name exists 264s does not register an offense when only one accessor of the name exists 264s registers an offense and corrects when both accessors of the splat exists 264s registers an offense and corrects when within eigenclass 264s registers an offense and corrects when both accessors are in the same visibility scope 264s registers an offense and corrects properly when attr_writer is before attr_reader 264s multiple bisected accessors 264s when some attr names are bisected 264s registers and retains non-bisected attrs 264s when all attr names are bisected 264s registers and replaces with attr_accessor 264s 264s RuboCop::Cop::VariableForce::Scope 264s #each_node 264s inner scope boundary handling 264s when there's a method invocation with block 264s yields only the block node and the child send node 264s when there's a singleton method definition 264s yields only the defs node and the method host node 264s outer scope boundary handling 264s when the scope is module 264s yields the body nodes 264s when the scope is singleton method 264s yields the argument and the body nodes 264s when the scope is block 264s yields the argument and the body nodes 264s when the scope is singleton class 264s yields the body nodes 264s when the scope is instance method 264s yields the argument and the body nodes 264s when the scope is top level 264s yields the body nodes 264s when the scope is class 264s yields the body nodes 264s .new 264s when lvasgn node is passed 264s accepts that as top level scope 264s when begin node is passed 264s accepts that as top level scope 264s #include? 264s with child node the scope does not include 264s is expected to equal false 264s with node of the scope itself 264s is expected to equal false 264s with child node the scope includes 264s is expected to equal true 264s with descendant node the scope does not include 264s is expected to equal false 264s with ancestor node the scope does not include 264s is expected to equal false 264s #body_node 264s when the scope is instance method 264s returns the body node 264s when the scope is class 264s returns the body node 264s when the scope is singleton method 264s returns the body node 264s when the scope is module 264s returns the body node 264s when the scope is singleton class 264s returns the body node 264s when the scope is top level 264s returns the body node 264s when the scope is block 264s returns the body node 264s #name 264s when the scope is instance method definition 264s returns the method name 264s when the scope is singleton method definition 264s returns the method name 264s 264s RuboCop::Cop::Lint::UriEscapeUnescape 264s registers an offense when using `URI.unescape(enc_uri)` 264s registers an offense when using `URI.escape('http://example.com')` 264s registers an offense when using `::URI.escape('http://example.com')` 264s registers an offense when using `::URI.unescape(enc_uri)` 264s registers an offense when using `URI.encode('http://example.com')` 264s registers an offense when using `URI.decode(enc_uri)` 264s registers an offense when using `::URI.encode('http://example.com)` 264s registers an offense when using `URI.escape('@?@!', '!?')` 264s registers an offense when using `::URI.decode(enc_uri)` 264s 264s RuboCop::Cop::Layout::FirstMethodArgumentLineBreak 264s registers an offense and corrects hash arg spanning multiple lines 264s ignores methods without arguments 264s registers an offense and corrects hash arg without a line break before the first pair 264s ignores arguments without parens 264s ignores kwargs listed on a single line when the arguments are used in `super` 264s ignores arguments listed on a single line 264s args listed on the first line 264s registers an offense and corrects using safe navigation operator 264s registers an offense and corrects using `super` 264s registers an offense and corrects 264s 264s RuboCop::Cop::Layout::HashAlignment 264s register no offense for superclass call without args 264s accepts pairs that don't start a line 264s accepts single line hash 264s register no offense for yield without args 264s accepts several pairs per line 264s with different settings for => and : 264s registers offenses and correct misaligned entries 264s accepts aligned entries 264s with default configuration 264s registers an offense and corrects zero or multiple spaces 264s registers an offense and corrects multiline value starts in wrong place 264s registers an offense and corrects alignment when using double splat in an explicit hash 264s registers an offense and corrects table alignment 264s registers an offense and corrects alignment when using double splat in braces 264s registers an offense and corrects mixed hash styles 264s registers an offense and corrects separator alignment 264s does not register an offense when value starts on next line 264s registers an offense and corrects misaligned hash keys 264s accepts left-aligned hash keys with single spaces 264s registers an offense and corrects misaligned mixed multiline hash keys 264s with implicit hash as last argument 264s accepts an empty hash 264s registers an offense and corrects right alignment of keys 264s accepts aligned hash keys 264s registers an offense and corrects misaligned hash keys 264s ignore explicit last argument hash 264s accepts misaligned keys in explicit hash 264s accepts misaligned keys in explicit hash for super 264s registers an offense and corrects misaligned keys in implicit hash 264s registers an offense and corrects misaligned keys in implicit hash for super 264s accepts misaligned keys in explicit hash for yield 264s registers an offense and corrects misaligned keys in implicit hash for yield 264s when using hash value omission 264s accepts misaligned keys in explicit hash 264s registers an offense and corrects misaligned keys in implicit hash 264s always inspect last argument hash 264s registers an offense and corrects misaligned keys in explicit hash for super 264s registers an offense and corrects misaligned keys in implicit hash for yield 264s registers offense and corrects misaligned keys in explicit hash 264s registers an offense and corrects misaligned keys in explicit hash for yield 264s registers an offense and corrects misaligned keys in implicit hash for super 264s registers offense and corrects misaligned keys in implicit hash 264s when using hash value omission 264s registers offense and corrects misaligned keys in implicit hash 264s registers offense and corrects misaligned keys in explicit hash 264s when `EnforcedStyle: with_fixed_indentation` of `ArgumentAlignment` 264s register and corrects an offense 264s does not register an offense using aligned hash literal 264s does not register an offense using aligned hash argument for `proc.()` 264s does not register an offense for an empty hash literal 264s registers and corrects an offense when using misaligned keyword arguments 264s when using hash value omission 264s register and corrects an offense 264s does not register and corrects an offense when using aligned keyword arguments 264s with `EnforcedColonStyle`: `table` 264s and aligned keys but a double splat argument after 264s does not register an offense on the `kwsplat` 264s and a double splat argument after a hash key 264s registers an offense on the misaligned key and corrects 264s and a misaligned double splat argument 264s registers an offense and corrects 264s and misaligned keys 264s registers an offense and corrects 264s when using hash value omission 264s and aligned keys 264s does not register an offense and corrects 264s when the only item is a kwsplat 264s does not register an offense 264s always ignore last argument hash 264s accepts misaligned keys in explicit hash for super 264s accepts misaligned keys in implicit hash for yield 264s accepts misaligned keys in explicit hash 264s accepts misaligned keys in explicit hash for yield 264s accepts misaligned keys in implicit hash for super 264s accepts misaligned keys in implicit hash 264s with table+separator alignment configuration 264s accepts a single method argument entry with colon 264s with table alignment configuration 264s accepts an empty hash 264s registers an offense for misaligned hash values 264s accepts a multiline array of single line hashes 264s registers an offense and corrects for misaligned hash keys 264s accepts aligned hash keys and values 264s accepts pairs that don't start a line 264s accepts a symbol only hash followed by a keyword splat 264s accepts a keyword splat only hash 264s accepts hashes that use different separators 264s accepts single line hash 264s accepts hashes that use different separators and double splats 264s registers an offense and corrects misaligned hash rockets 264s accepts several pairs per line 264s when using hash value omission 264s accepts pairs that don't start a line 264s accepts several pairs per line 264s accepts single line hash 264s when using hash value omission 264s accepts aligned hash keys and values 264s with multiple preferred(key and table) alignment configuration 264s registers an offense and corrects misaligned hash keys with mixed hash style 264s registers an offense and corrects misaligned hash values, prefer table when least offenses 264s accepts aligned hash keys, by both 264s accepts aligned hash keys, by keys 264s registers an offense and corrects misaligned hash values 264s accepts an empty hash 264s registers an offense and corrects misaligned hash values, prefer key when least offenses 264s accepts aligned hash keys, by table 264s accepts aligned hash keys with mixed hash style 264s registers an offense and corrects misaligned hash values, works separate for each hash 264s table and key config 264s registers an offense and corrects misaligned hash values, prefer table because it is specified first 264s with invalid configuration 264s fails 264s with separator alignment configuration 264s registers an offense and corrects misaligned hash rockets 264s accepts aligned hash keys 264s accepts single line hash 264s accepts pairs that don't start a line 264s registers an offense and corrects mixed indentation and spacing 264s accepts an empty hash 264s registers an offense and corrects misaligned hash values 264s accepts hashes with different separators 264s accepts several pairs per line 264s doesn't break code by moving long keys too far left 264s when using hash value omission 264s accepts aligned hash keys 264s registers an offense and corrects mixed indentation and spacing 264s when using hash value omission 264s accepts single line hash 264s accepts several pairs per line 264s accepts pairs that don't start a line 264s ignore implicit last argument hash 264s accepts misaligned keys in implicit hash for yield 264s accepts misaligned keys in implicit hash for super 264s accepts misaligned keys in implicit hash 264s registers an offense and corrects misaligned keys in explicit hash for super 264s registers an offense and corrects misaligned keys in explicit hash 264s registers an offense and corrects misaligned keys in explicit hash for yield 264s when using hash value omission 264s accepts single line hash 264s accepts pairs that don't start a line 264s accepts several pairs per line 264s with `EnforcedHashRocketStyle`: `table` 264s and misaligned keys 264s registers an offense and corrects 264s when the only item is a kwsplat 264s does not register an offense 264s and a misaligned double splat argument 264s registers an offense and corrects 264s and aligned keys but a double splat argument after 264s does not register an offense on the `kwsplat` 264s and a double splat argument after a hash key 264s registers an offense on the misaligned key and corrects 264s 264s RuboCop::Cop::Style::NegatedUnless 264s does not blow up on a negated ternary operator 264s does not blow up for empty unless condition 264s does not blow up for empty if condition 264s does not blow up for ternary ops 264s with “prefix” style 264s does not register an offense for postfix 264s registers an offense for prefix 264s with “both” style 265s accepts an unless where only part of the condition is negated 265s registers an offense for unless with exclamation point condition 265s accepts an unless where the condition is doubly negated 265s registers an offense for unless with "not" condition 265s accepts an unless/else with negative condition 265s autocorrects by replacing parenthesized unless not with if 265s with “postfix” style 265s does not register an offense for prefix 265s registers an offense for postfix 265s 265s RuboCop::Cop::Style::DisableCopsWithinSourceCodeDirective 265s registers an offense for disabling all cops 265s registers an offense for enabled cop within source code 265s registers an offense for disabled cop within source code 265s with AllowedCops 265s when an allowed cop is disabled 265s does not register an offense 265s when an mix of cops are disabled 265s registers an offense and corrects 265s when using leading source comment 265s does not register an offense 265s when an non-allowed cop is disabled 265s registers an offense and corrects 265s 265s RuboCop::Cop::InternalAffairs::UselessMessageAssertion 265s does not register an offense for an assertion about the message 265s registers an offense for described_class::MSG in let 265s registers an offense for specs that expect offense using the MSG 265s registers an offense for specs that assert using the MSG 265s 265s RuboCop::Cop::Layout::EndAlignment 265s registers an offense for mismatched module Test end and autocorrects 265s registers an offense for mismatched puts 1; unless test end and autocorrects 265s accepts matching puts 1; case ... end 265s accepts matching until ... end 265s accepts matching class ... end 265s registers an offense for mismatched puts 1; case a when b end and autocorrects 265s accepts matching puts 1; unless ... end 265s accepts matching while ... end 265s registers an offense for mismatched puts 1; class Test end and autocorrects 265s registers an offense for mismatched unless test end and autocorrects 265s registers an offense for mismatched puts 1; if test end and autocorrects 265s accepts matching if ... end 265s registers an offense for mismatched puts 1; while test end and autocorrects 265s accepts matching puts 1; module ... end 265s registers an offense for mismatched module Test end and autocorrects 265s accepts matching class ... end 265s registers an offense for mismatched until test end and autocorrects 265s can handle ternary if 265s accepts matching puts 1; if ... end 265s accepts matching unless ... end 265s registers an offense for mismatched while test end and autocorrects 265s accepts matching module ... end 265s registers an offense for mismatched if test end and autocorrects 265s accepts matching puts 1; until ... end 265s accepts matching puts 1; while ... end 265s registers an offense for mismatched case a when b end and autocorrects 265s registers an offense for mismatched puts 1; class Test end and autocorrects 265s accepts matching puts 1; class ... end 265s registers an offense for mismatched puts 1; until test end and autocorrects 265s accepts matching case ... end 265s can handle modifier if 265s regarding assignment 265s when EnforcedStyleAlignWith is keyword 265s accepts matching var = while ... end 265s registers an offense for mismatched var = until test end and autocorrects 265s registers an offense for mismatched var = unless test end and autocorrects 265s accepts matching var = if ... end 265s registers an offense for mismatched var = if test end and autocorrects 265s registers an offense for mismatched var << until test end and autocorrects 265s accepts matching var = unless ... end 265s registers an offense for mismatched var = while test end and autocorrects 265s accepts matching var = case ... end 265s accepts matching var[0] = case ... end 265s accepts matching var = until ... end 265s when EnforcedStyleAlignWith is variable 265s accepts matching var = unless ... end 265s registers an offense for mismatched var = until test do_something end and autocorrects 265s registers an offense for mismatched h[k] << if test end and autocorrects 265s accepts matching var = if ... end 265s accepts matching var = until ... end 265s registers an offense for mismatched h[k] = if test end and autocorrects 265s registers an offense for mismatched var = if test end and autocorrects 265s registers an offense for mismatched var &&= if test end and autocorrects 265s registers an offense for mismatched @@var = if test end and autocorrects 265s registers an offense for mismatched CNST = if test end and autocorrects 265s registers an offense for mismatched $var = if test end and autocorrects 265s registers an offense for mismatched var = while test end and autocorrects 265s registers an offense for mismatched var << until test end and autocorrects 265s accepts matching var = while ... end 265s registers an offense for mismatched var[x] = while test end and autocorrects 265s registers an offense for mismatched @@var << if test end and autocorrects 265s registers an offense for mismatched var = # comment while test end and autocorrects 265s registers an offense for mismatched var = until test end.j and autocorrects 265s accepts matching @@var = if ... end 265s accepts matching var ||= if ... end 265s accepts matching var += if ... end 265s registers an offense for mismatched var ||= if test end and autocorrects 265s registers an offense for mismatched var = until test end and autocorrects 265s registers an offense for mismatched @var << if test end and autocorrects 265s registers an offense for mismatched $var << if test end and autocorrects 265s accepts matching $var = if ... end 265s registers an offense for mismatched var = unless test end and autocorrects 265s accepts matching h[k] = if ... end 265s accepts matching var << if ... end 265s accepts matching var = if ... end 265s accepts matching var &&= if ... end 265s registers an offense for mismatched var << case a when b end and autocorrects 265s registers an offense for mismatched var << unless test end and autocorrects 265s registers an offense for mismatched var << if test end and autocorrects 265s accepts matching var = until ... end 265s accepts matching CNST = if ... end 265s accepts matching var = case ... end 265s accepts matching a, b = if ... end 265s registers an offense for mismatched var = unless test end and autocorrects 265s accepts matching @var = if ... end 265s registers an offense for mismatched var += if test end and autocorrects 265s registers an offense for mismatched var = case a when b end and autocorrects 265s registers an offense for mismatched CNST << if test end and autocorrects 265s registers an offense for mismatched @var = if test end and autocorrects 265s accepts matching var = until ... end 265s accepts matching h.k = if ... end 265s registers an offense for mismatched var = if test end and autocorrects 265s registers an offense for mismatched h.k = if test end and autocorrects 265s registers an offense for mismatched a, b = if test end and autocorrects 265s case as argument 265s when EnforcedStyleAlignWith is variable 265s accepts matching test case ... end 265s registers an offense for mismatched test case a when b end and autocorrects 265s when EnforcedStyleAlignWith is keyword 265s registers an offense for mismatched test case a when b end and autocorrects 265s accepts matching test case ... end 265s when EnforcedStyleAlignWith is start_of_line 265s accepts matching test case a when b ... end 265s registers an offense for mismatched test case a when b end and autocorrects 265s when EnforcedStyleAlignWith is start_of_line 265s registers an offense for mismatched puts 1; unless test end and autocorrects 265s registers an offense for mismatched puts 1; case a when b end and autocorrects 265s accepts matching puts 1; unless ... end 265s registers an offense for mismatched var = unless test end and autocorrects 265s registers an offense for mismatched while test end and autocorrects 265s registers an offense for mismatched var = while test end and autocorrects 265s accepts matching var = unless ... end 265s registers an offense for mismatched puts 1; until test end and autocorrects 265s accepts matching var = while ... end 265s accepts matching var = if ... end 265s registers an offense for mismatched var = if test end and autocorrects 265s accepts matching puts 1; class ... end 265s registers an offense for mismatched var << case a when b end and autocorrects 265s registers an offense for mismatched puts 1; class Test end and autocorrects 265s registers an offense for mismatched var << until test end and autocorrects 265s registers an offense for mismatched var = if test end and autocorrects 265s accepts matching var = case ... end 265s registers an offense for mismatched var = case a when b end and autocorrects 265s registers an offense for mismatched if test end and autocorrects 265s registers an offense for mismatched var << if test end and autocorrects 265s registers an offense for mismatched puts 1; if test end and autocorrects 265s registers an offense for mismatched puts 1; while test end and autocorrects 265s accepts matching puts 1; case ... end 265s accepts matching puts 1; module ... end 265s registers an offense for mismatched class Test end and autocorrects 265s registers an offense for mismatched var << unless test end and autocorrects 265s registers an offense for mismatched unless test end and autocorrects 265s accepts matching puts 1; until ... end 265s accepts matching var = if ... end 265s registers an offense for mismatched until test end and autocorrects 265s registers an offense for mismatched case a when b end and autocorrects 265s accepts matching var << while ... end 265s accepts matching var = until ... end 265s registers an offense for mismatched var << while test end and autocorrects 265s registers an offense for mismatched module Test end and autocorrects 265s registers an offense for mismatched puts 1; module Test end and autocorrects 265s registers an offense for mismatched var = until test end and autocorrects 265s accepts matching puts 1; while ... end 265s accepts matching puts 1; if ... end 265s registers an offense for mismatched puts(if test end) and autocorrects 265s when EnforcedStyleAlignWith is variable 265s accepts matching case ... end 265s registers an offense for mismatched puts 1; case a when b end and autocorrects 265s register an offense when using `+` operator method and `end` is not aligned 265s accepts matching puts 1; case ... end 265s registers an offense for mismatched puts 1; if test end and autocorrects 265s registers an offense for mismatched if test end and autocorrects 265s accepts matching puts 1; class ... end 265s register an offense when using a conditional statement in a method argument and `end` is not aligned 265s registers an offense for mismatched puts 1; until test end and autocorrects 265s registers an offense for mismatched puts 1; module Test end and autocorrects 265s registers an offense for mismatched puts 1; class Test end and autocorrects 265s accepts matching puts 1; unless ... end 265s accepts matching class ... end 265s registers an offense for mismatched module Test end and autocorrects 265s accepts matching unless ... end 265s accepts matching if ... end 265s registers an offense for mismatched unless test end and autocorrects 265s registers an offense for mismatched while test end and autocorrects 265s registers an offense for mismatched case a when b end and autocorrects 265s registers an offense for mismatched until test end and autocorrects 265s registers an offense for mismatched puts 1; unless test end and autocorrects 265s accepts matching puts 1; until ... end 265s accepts matching until ... end 265s accepts matching puts 1; if ... end 265s accepts matching while ... end 265s registers an offense for mismatched class Test end and autocorrects 265s registers an offense for mismatched puts 1; while test end and autocorrects 265s accepts matching puts 1; module ... end 265s accepts matching module ... end 265s register an offense when using `-` operator method and `end` is not aligned 265s accepts matching puts 1; while ... end 265s when end is preceded by something else than whitespace 265s does not register an offense 265s correct + opposite 265s registers an offense and corrects 265s 265s RuboCop::Cop::Lint::BigDecimalNew 265s registers an offense and corrects using `BigDecimal.new()` 265s registers an offense and corrects using `::BigDecimal.new()` 265s does not register an offense when using `BigDecimal()` 265s 265s RuboCop::Cop::Style::BarePercentLiterals 265s when EnforcedStyle is bare_percent 265s and strings are dynamic 265s accepts %q 265s accepts "" string with interpolation 265s accepts '' 265s registers an offense for %Q() 265s accepts __FILE__ 265s accepts "" 265s accepts %() 265s accepts regular expressions 265s accepts heredoc 265s and strings are static 265s accepts '' 265s accepts "" string with interpolation 265s accepts "" 265s accepts %() 265s registers an offense for %Q() 265s accepts heredoc 265s accepts %q 265s accepts regular expressions 265s accepts __FILE__ 265s when EnforcedStyle is percent_q 265s and strings are dynamic 265s accepts %Q() 265s accepts __FILE__ 265s accepts heredoc 265s registers an offense for %() 265s accepts %q 265s accepts '' 265s accepts regular expressions 265s accepts "" 265s accepts "" string with interpolation 265s and strings are static 265s accepts %q 265s accepts __FILE__ 265s registers an offense for %() 265s accepts heredoc 265s accepts %Q() 265s accepts '' 265s accepts regular expressions 265s accepts "" string with interpolation 265s accepts "" 265s 265s RuboCop::Cop::Lint::UselessTimes 265s registers an offense and corrects with 1.times with block arg 265s registers an offense and corrects with negative times 265s registers an offense and corrects when 1.times with empty block argument 265s does not register an offense for an integer > 1 265s registers an offense and corrects with 1.times with method chain 265s registers an offense and corrects with 0.times with block arg 265s registers an offense and corrects when there is a blank line in the method definition 265s registers an offense and corrects with 1.times 265s registers an offense and corrects with negative times with block arg 265s registers an offense and corrects with 0.times 265s short-form method 265s does not adjust surrounding space 265s registers an offense and corrects with negative times 265s registers an offense and corrects with 1.times 265s does not register an offense for an integer > 1 265s registers an offense and corrects with 0.times 265s multiline block 265s correctly handles a multiline block with 1.times 265s does not try to correct a block if the block arg is changed 265s corrects a block that changes another lvar 265s does not try to correct a block if the block arg is changed in parallel assignment 265s within indentation 265s corrects properly when replacing 265s corrects properly when removing multiline 265s corrects properly when removing single line 265s inline `Integer#times` calls 265s does not try to correct `0.times` 265s does not try to correct `1.times` 265s 265s RuboCop::Cop::Force 265s #run_hook 265s invokes a hook in all cops 265s .force_name 265s returns the class name without namespace 265s 265s RuboCop::Cop::Style::Encoding 265s does not register an offense on a different magic comment type 265s registers an offense when encoding present on 2nd line after shebang 265s registers an offense when encoding present and UTF-8 265s does not register an offense when encoding present but not UTF-8 265s does not register an offense when encoding is in the wrong place 265s registers an offense and corrects if there are multiple encoding magic comments 265s does not register an offense when encoding is not at the top of the file 265s registers an offense and corrects the magic comment follows another magic comment 265s does not register an offense when no encoding present 265s vim comments 265s registers an offense and corrects 265s emacs comment 265s only removes encoding if there are other editor comments 265s registers an offense for encoding 265s 265s RuboCop::Cop::Style::FileWrite 265s registers an offense for and corrects `::File.open(filename, 'wb').write(content)` 265s registers an offense for and corrects `::File.open(filename, 'w+').write(content)` 265s registers an offense for and corrects the `File.open` with inline write block (mode 'w+t') 265s registers an offense for and corrects the `File.open` with inline write block (mode 'wb') 265s registers an offense for and corrects the `File.open` with multiline write block (mode 'wb') with heredoc 265s registers an offense for and corrects `::File.open(filename, 'w+t').write(content)` 265s registers an offense for and corrects `File.open(filename, 'wt').write(content)` 265s registers an offense for and corrects `File.open(filename, 'wb').write(content)` 265s registers an offense for and corrects `File.open(filename, 'w+').write(content)` 265s registers an offense for and corrects the `File.open` with multiline write block (mode 'wt') 265s registers an offense for and corrects the `File.open` with multiline write block (mode 'w+b') with heredoc 265s registers an offense for and corrects the `File.open` with multiline write block (mode 'w+') with heredoc 265s does not register an offense for the `File.open` with multiline write block when not writing to the block variable 265s registers an offense for and corrects `File.open(filename, 'w+t').write(content)` 265s registers an offense for and corrects `File.open(filename, 'w+b').write(content)` 265s registers an offense for and corrects `::File.open(filename, 'wt').write(content)` 265s registers an offense for and corrects `::File.open(filename, 'w+b').write(content)` 265s registers an offense for and corrects `::File.open(filename, 'w').write(content)` 265s registers an offense for and corrects the `File.open` with multiline write block (mode 'wb') 265s registers an offense for and corrects `File.open(filename, 'w').write(content)` 265s registers an offense for and corrects the `File.open` with multiline write block (mode 'w') 265s does not register an offense when a splat argument is passed to `f.write` 265s registers an offense for and corrects the `File.open` with multiline write block (mode 'w+b') 265s registers an offense for and corrects the `File.open` with multiline write block (mode 'w+') 265s registers an offense for and corrects the `File.open` with multiline write block (mode 'w+t') 265s registers an offense for and corrects the `File.open` with multiline write block (mode 'w') with heredoc 265s registers an offense for and corrects the `File.open` with inline write block (mode 'w+b') 265s registers an offense for and corrects the `File.open` with inline write block (mode 'w+') 265s registers an offense for and corrects the `File.open` with inline write block (mode 'w') 265s registers an offense for and corrects the `File.open` with inline write block (mode 'wt') 265s registers an offense for and corrects the `File.open` with multiline write block (mode 'wt') with heredoc 265s registers an offense for and corrects the `File.open` with multiline write block (mode 'w+t') with heredoc 265s 265s RuboCop::Cop::Style::RandomWithOffset 265s does not register an offense when using rand(irange).succ with a non-integer range value 265s registers an offense when using Random.rand 265s registers an offense when using ::Kernel.rand 266s registers an offense when using rand(erange) - offset 266s registers an offense when using rand(int).succ 266s registers an offense when using ::Random.rand 266s registers an offense when using offset + Random.rand(int) 266s does not register an offense when using rand(irange) + offset with a non-integer range value 266s does not register an offense when using rand(erange).pred with a non-integer range value 266s registers an offense when using rand(irange) + offset 266s registers an offense when using rand(int) + offset 266s registers an offense when using rand(irange) - offset 266s registers an offense when using offset - ::Random.rand(int) 266s does not register an offense when using range with double dots 266s does not register an offense when using range with triple dots 266s does not register an offense when using offset - rand(erange) with a non-integer range value 266s registers an offense when using rand(erange).succ 266s registers an offense when using rand(erange) + offset 266s registers an offense when using rand(int).pred 266s registers an offense when using offset - rand(irange) 266s registers an offense when using Kernel.rand 266s registers an offense when using offset - rand(erange) 266s registers an offense when using offset - rand(int) 266s registers an offense when using rand(int).next 266s registers an offense when using offset + rand(int) 266s registers an offense when using Random.rand(int).succ 266s registers an offense when using rand(int) - offset 266s registers an offense when using rand(irange).succ 266s registers an offense when using ::Random.rand(int).pred 266s 266s RuboCop::Cop::InternalAffairs::NodeTypePredicate 266s does not register an offense for a predicate node type check 266s comparison node type check 266s registers an offense and autocorrects 266s 266s RuboCop::Cop::Style::StderrPuts 266s registers no offense when using `$stderr.puts` with no arguments 266s registers an offense when using `$stderr.puts('hello')` 266s registers an offense when using `::STDERR.puts('hello')` 266s registers an offense when using `STDERR.puts('hello')` 266s registers no offense when using `STDERR.puts` with no arguments 266s 266s RuboCop::Cop::Style::RedundantReturn 266s autocorrects by removing redundant returns 266s accepts return in a non-final position 266s does not blow up on empty method body 266s reports an offense for def with only a return 266s reports an offense for defs with only a return 266s reports an offense for def ending with return with splat argument 266s does not blow up on empty if body 266s reports an offense for def ending with return 266s reports an offense for defs ending with return 266s when multi-value returns are not allowed 266s reports an offense for def with only a return 266s reports an offense for def ending with return 266s reports an offense for defs with only a return 266s reports an offense for defs ending with return 266s autocorrects by removing return when using an explicit hash 266s autocorrects by making an implicit hash explicit 266s reports an offense when multiple return values have a parenthesized return value 266s when rescue and return blocks present 266s registers an offense and autocorrects when rescue has else clause 266s registers an offense and autocorrects when inside function or rescue block 266s when case nodes are empty 266s accepts empty when nodes 266s when multi-value returns are allowed 266s accepts def with only a return 266s accepts def ending with return 266s accepts defs ending with return 266s accepts defs with only a return 266s when return is inside an if-branch 266s registers an offense and autocorrects 266s when return is inside a when-branch 266s registers an offense and autocorrects 266s when return is inside begin-end body 266s registers an offense and autocorrects 266s when return has no arguments 266s behaves like common behavior 266s registers an offense for return and autocorrects replacing return with nil 266s behaves like common behavior 266s registers an offense for return() and autocorrects replacing return() with nil 266s 266s RuboCop::Cop::Lint::ErbNewArguments 266s <= Ruby 2.5 266s does not register an offense when using `ERB.new` with non-keyword arguments 266s >= Ruby 2.6 266s registers an offense when using `ERB.new` with non-keyword 2nd and 3rd arguments andkeyword 4th argument 266s does not register an offense when using `ERB.new` without optional arguments 266s registers an offense when using `ERB.new` with non-keyword 2nd, 3rd and 4th arguments 266s registers an offense when using `ERB.new` with non-keyword 2nd argument 266s does not register an offense when using `ERB.new` with keyword arguments 266s registers an offense when using `ERB.new` with non-keyword 2nd, 3rd and 4th arguments andkeyword 5th argument 266s registers an offense when using `ERB.new` with non-keyword 2nd and 3rd arguments 266s registers an offense when using `::ERB.new` with non-keyword 2nd, 3rd and 4th arguments 266s when using `ActionView::Template::Handlers::ERB.new` 266s does not register an offense when using `ERB.new` without arguments 266s 266s RuboCop::Cop::Style::TrailingBodyOnClass 266s accepts class inheritance 266s registers offense with multi-line class 266s autocorrects with comment after body 266s accepts regular class 266s registers an offense when body trails after class definition 266s when class is not on first line of processed_source 266s autocorrect offense 266s 266s RuboCop::Cop::Style::HashSyntax 266s configured to enforce ruby19 style 266s configured to use hash rockets when symbol values are found 266s accepts an empty hash 266s registers an offense when any element has a symbol value in method calls 266s registers an offense when using hash rockets and no elements have a symbol value 266s registers an offense when any element uses a symbol for the value 266s accepts ruby19 syntax when no elements have symbol values 266s accepts both hash rockets and ruby19 syntax in the same code 266s autocorrects to hash rockets when all elements have symbol value 266s accepts ruby19 syntax when no elements have symbol values in method calls 266s accepts hash in ruby19 style with no symbol values 266s registers an offense for hashes with elements on multiple lines 266s with SpaceAroundOperators enabled 266s registers an offense for hash rockets in method calls 266s accepts hash rockets when symbol characters are not supported 266s accepts hash rockets when keys have different types 266s accepts new syntax in a hash literal 266s registers offense for hash rocket syntax when new is possible 266s accepts new syntax in method calls 266s autocorrects even if it interferes with SpaceAroundOperators 266s autocorrects a missing space when hash is used as argument 266s registers offense when keys start with an uppercase letter 266s accepts hash rockets when symbol keys end with = 266s preserves quotes during autocorrection 266s registers an offense for mixed syntax when new is possible 266s accepts an empty hash 266s registers an offense when symbol keys have strings in them 266s if PreferHashRocketsForNonAlnumEndingSymbols is false 266s registers an offense for hash rockets when symbols end with ? 266s registers an offense for hash rockets when symbols end with ! 266s if PreferHashRocketsForNonAlnumEndingSymbols is true 266s accepts hash rockets when symbols end with ! 266s accepts hash rockets when symbols end with ? 266s when using a return value uses `return` 266s registers an offense and corrects when enclosed in parentheses 266s registers an offense and corrects when not enclosed in parentheses 266s ruby < 2.2 266s accepts hash rockets when symbol keys have string in them 266s with SpaceAroundOperators disabled 266s autocorrects even if there is no space around => 266s configured to enforce shorthand syntax style 266s Ruby <= 3.0 266s does not register an offense when hash key and hash value are the same 266s Ruby >= 3.1 266s does not register an offense when hash key and hash value are partially the same 266s does not register an offense when call expr with argument and a block follows 266s registers an offense when hash key and hash value are not the same and method with `[]` is called 266s does not register an offense when `return` with one line `if` condition follows (without parentheses) 266s does not register an offense when with parentheses call expr follows 266s registers and corrects an offense when hash key and hash value (lvar) are the same 266s does not register an offense when hash pattern matching 266s registers an offense when one line `if` condition follows (with parentheses) 266s does not register an offense when without parentheses call expr follows after nested method call 266s does not register an offense when without parentheses call expr follows 266s registers and corrects an offense when hash key and hash value are the same 266s registers and corrects an offense when hash key and hash value are the same and it in the method body 266s registers and corrects an offense when hash key and hash value are the same and it in the method bodyand an expression follows 266s does not register an offense when hash key and hash value are the same but the value ends `!` 266s registers and corrects an offense when hash key and hash value are partially the same 266s registers an offense when one line `until` condition follows (with parentheses) 266s does not register an offense when hash values are omitted 266s does not register an offense when hash key and hash value are not the same 266s registers and corrects an offense when `Hash[foo: foo]` 266s registers and corrects an offense when `Hash[foo: foo]` and an expression follows 266s does not register an offense when method call hash key and hash value are the same 266s does not register an offense when with parentheses call expr follows assignment expr 266s does not register an offense when call expr without arguments and with a block follows 266s does not register an offense when one line `if` condition follows (without parentheses) 266s does not register an offense when symbol hash key and hash value (lvar) are not the same 266s does not register an offense when one line `until` condition follows (without parentheses) 266s does not register an offense when lvar hash key and hash value are the same 266s does not register an offense when hash key and hash value are the same but the value ends `?` 266s does not register an offense when symbol hash key and string hash value are the same 266s when hash roket syntax 266s does not register an offense 266s configured to accept both shorthand and explicit use of hash literal value 266s Ruby <= 3.0 266s does not register an offense when hash key and hash value are the same 266s Ruby >= 3.1 266s does not register an offense when hash key and hash value are the same 266s does not register an offense when hash key and hash value are partially the same 266s does not register an offense when hash values are omitted 266s does not register an offense when hash key and hash value are not the same 266s configured to enforce ruby 1.9 style with no mixed keys 266s UseHashRocketsWithSymbolValues enabled 266s accepts new syntax in method calls 266s registers an offense when keys start with a digit 266s accepts hash rockets when keys have different types 266s autocorrects to hash rockets when all elements have symbol value 266s registers an offense for hash rockets in method calls 266s accepts new syntax when keys are interpolated string 266s registers an offense when keys have different types and styles 266s registers an offense for mixed syntax when new is possible 266s registers an offense when keys have special symbols in them 266s registers an offense when keys have whitespaces in them 266s registers an offense when any element uses a symbol for the value 266s registers an offense when any element has a symbol value in method calls 266s accepts new syntax in a hash literal 266s accepts an empty hash 266s registers offense for hash rocket syntax when new is possible 266s ruby < 2.2 266s registers an offense when keys have whitespaces and mix styles 266s accepts hash rockets when keys have special symbols in them 266s registers an offense when keys start with a digit and mix styles 266s accepts hash rockets when keys have whitespaces in them 266s accepts hash rockets when keys start with a digit 266s registers an offense when keys have special symbols and mix styles 266s UseHashRocketsWithSymbolValues disabled 266s registers an offense for hash rockets in method calls 266s accepts new syntax in a hash literal 266s accepts hash rockets when keys have different types 266s registers an offense when keys have different types and styles 266s accepts an empty hash 266s registers an offense when keys start with a digit 266s registers offense for hash rocket syntax when new is possible 266s accepts new syntax when keys are interpolated string 266s registers an offense when keys have special symbols in them 266s registers an offense for mixed syntax when new is possible 266s registers an offense when keys have whitespaces in them 266s accepts new syntax in method calls 266s ruby < 2.2 266s accepts hash rockets when keys have special symbols in them 266s registers an offense when keys start with a digit and mix styles 266s accepts hash rockets when keys start with a digit 266s accepts hash rockets when keys have whitespaces in them 266s registers an offense when keys have whitespaces and mix styles 266s registers an offense when keys have special symbols and mix styles 266s configured to disallow mixing of implicit and explicit hash literal value 266s Ruby >= 3.1 266s does not register an offense when all hash values are omitted 266s does not register an offense when all hash values are present, but only some values can be omitted 266s registers an offense when some hash values are omitted but they cannot all be omitted 266s does not register an offense when all hash values are present, but no values can be omitted 266s registers an offense when some hash values are omitted but they can all be omitted 266s registers an offense when all hash values are present, but can all be omitted 266s Ruby <= 3.0 266s does not register an offense when all hash key and hash values are the same 266s configured to enforce no mixed keys 266s accepts old hash rockets style 266s accepts hash rockets in method calls 266s registers an offense when keys have whitespaces and mix styles 266s registers an offense when keys start with a digit and mix styles 266s accepts hash rockets when keys have special symbols in them 266s registers an offense for mixed syntax when new is possible 266s registers an offense when keys have different types and styles 266s accepts an empty hash 266s autocorrects mixed key hashes 266s accepts hash rockets when keys have different types 266s accepts hash rockets when keys start with a digit 266s accepts new syntax in method calls 266s registers an offense when keys have special symbols and mix styles 266s accepts the hash rocket syntax when new is possible 266s accepts hash rockets when keys have whitespaces in them 266s accepts new hash style 266s accepts new syntax in a hash literal 266s configured to enforce hash rockets style 266s registers offense for Ruby 1.9 style 266s registers an offense for mixed syntax 266s accepts hash rockets in a hash literal 266s registers an offense for 1.9 style in method calls 266s accepts an empty hash 266s accepts hash rockets in method calls 266s UseHashRocketsWithSymbolValues has no impact 266s does not register an offense when there is a symbol value 266s configured to enforce explicit hash value syntax style 266s Ruby <= 3.0 266s does not register an offense when hash key and hash value are the same 266s Ruby >= 3.1 266s does not register an offense when hash key and hash value are the same 266s registers and corrects an offense when hash key and hash value are partially the same 266s does not register an offense when hash key and hash value are not the same 266s registers and corrects an offense when hash values are omitted 266s 266s RuboCop::Cop::Style::SlicingWithRange 266s >= Ruby 2.6 266s reports no offense for excluding end 266s reports no offense for other methods 266s reports no offense for array with range inside 266s reports an offense for slicing to ..-1 266s reports an offense for slicing from expression to ..-1 266s >= Ruby 2.7 266s reports no offense for startless 266s <= Ruby 2.5 266s reports no offense for array slicing with -1 266s 266s RuboCop::Cop::Style::RedundantSelfAssignment 266s registers an offense and corrects when assigning to attribute of non `self` 266s does not register an offense when assigning to attribute of `self` the result from other object 266s does not register an offense when there is no a receiver 266s does not register an offense when lhs and receiver are different 266s registers an offense and corrects when assigning to attribute of `self` 266s when lhs and receiver are the same 266s registers an offense and corrects when assigning to global variable 266s registers an offense and corrects when assigning to class variable 266s registers an offense and corrects when assigning to instance variable 266s registers an offense and corrects when assigning to local variable 266s 266s RuboCop::Cop::Style::IfUnlessModifier 266s accepts if-end when used as LHS of binary arithmetic 266s accepts if/elsif 266s accepts code with EOL comment since user might want to keep it 266s accepts if-end followed by a chained call using `.` 266s accepts if-else-end 266s adds parens in autocorrect when if-end used with `&&` operator 266s adds parens in autocorrect when if-end used with `||` operator 266s accepts if-end followed by a chained call using `&.` 266s when if-end condition is a value in a hash 266s when it is not short enough to fit on a single line 266s accepts it in the multiline form 266s when it is short enough to fit on a single line 266s corrects it to the single-line form 266s when if-end condition is an element of an array 266s when not short enough to fit on a single line 266s accepts it in the multiline form 266s when short enough to fit on a single line 266s corrects it to the single-line form 266s unless-end with conditional as body 266s accepts 266s when if-end condition has a first line comment 266s when it is not short enough to fit on a single line 266s accepts it in the multiline form 266s when it is short enough to fit on a single line 266s corrects it to the single-line form 266s with a named regexp capture on the LHS 266s does not register an offense 266s multiline unless that fits on one line 266s registers an offense 266s modifier if that does not fit on one line 266s when Layout/LineLength is disabled with enable/disable comments 266s accepts 266s when Layout/LineLength is disabled with an EOL comment 266s accepts 266s when Layout/LineLength is enabled 266s corrects it to normal form 266s and the long line is allowed because AllowURI is true 266s accepts 266s when using a method with heredoc argument 266s accepts 266s and the long line is too long because AllowURI is false 266s registers an offense 266s when variable assignment is used in the branch body of if modifier 266s registers an offense 266s IgnoreCopDirectives 266s and the long line is too long because IgnoreCopDirectives is false 266s registers an offense 266s and the long line is allowed because IgnoreCopDirectives is true 266s accepts 266s when Layout/LineLength is disabled in configuration 266s accepts 266s with tabs used for indentation 266s with Layout/IndentationStyle: IndentationWidth config 266s behaves like with tabs indentation 266s it fits on one line 266s registers an offense 266s it doesn't fit on one line 266s doesn't register an offense 266s with Layout/IndentationWidth: Width config 266s behaves like with tabs indentation 266s it fits on one line 266s registers an offense 266s it doesn't fit on one line 266s doesn't register an offense 266s behaves like condition modifier cop 266s for a multiline 'unless' 266s corrects it when assignment is in body 266s corrects it if result fits in one line 266s doesn't break when used as RHS of class var assignment 266s accepts it when condition has local variable assignment 266s doesn't break when used as RHS of binary arithmetic 266s doesn't break when used as RHS of instance var assignment 266s accepts it if single line would not fit on one line 266s doesn't break when used as RHS of local var assignment 266s handles one-line usage 266s accepts an empty body 266s accepts it if body spans more than one line 266s handles inline comments during autocorrection 266s doesn't break when used as RHS of constant assignment 266s accepts multiline condition in modifier form 266s registers an offense 266s when there is a comment on the first line and some code after the end keyword 266s does not register an offense 266s when Layout/LineLength is disabled 266s registers an offense even for a long modifier statement 266s behaves like condition modifier cop 266s for a multiline 'if' 266s handles one-line usage 266s accepts it when condition has local variable assignment 266s corrects it if result fits in one line 266s accepts it if single line would not fit on one line 266s handles inline comments during autocorrection 266s accepts it if body spans more than one line 266s accepts an empty body 266s corrects it when assignment is in body 266s doesn't break when used as RHS of instance var assignment 266s doesn't break when used as RHS of binary arithmetic 266s doesn't break when used as RHS of local var assignment 266s doesn't break when used as RHS of class var assignment 266s doesn't break when used as RHS of constant assignment 266s accepts multiline condition in modifier form 266s registers an offense 266s when there is a comment on the first line and some code after the end keyword 266s does not register an offense 266s when Layout/LineLength is disabled 266s registers an offense even for a long modifier statement 266s if-end is argument to a non-parenthesized method call 266s adds parentheses so as not to change meaning 266s when Layout/LineLength is disabled 266s registers an offense even for a long modifier statement 266s when if-end condition is assigned to a variable 266s with variable being on the previous line 266s when it is short enough to fit on a single line 266s corrects it to the single-line form 266s when it is not short enough to fit on a single line 266s accepts it in the multiline form 266s with variable being on the same line 266s when it is not short enough to fit on a single line 267s accepts it in the multiline form 267s when it is short enough to fit on a single line 267s corrects it to the single-line form 267s multiline if that fits on one line with comment near end 267s accepts 267s short multiline if near an else etc 267s registers an offense 267s multiline if that fits on one line 267s registers an offense 267s and has two statements separated by semicolon 267s accepts 267s if-end is argument to a parenthesized method call 267s adds parentheses because otherwise it would cause SyntaxError 267s with implicit match conditional 267s when a multiline if fits on one line 267s registers an offense 267s when a multiline if doesn't fit on one line 267s accepts 267s if-end with conditional as body 267s accepts 267s modifier if that does not fit on one line, but is not the only statement on the line 267s accepts 267s multiline if that fits on one line with comment on first line 267s registers an offense and preserves comment 267s when if-end condition has some code after the end keyword 267s when it is not short enough to fit on a single line 267s accepts it in the multiline form 267s when it is short enough to fit on a single line 267s corrects it to the single-line form 267s 267s RuboCop::Cop::Style::YodaCondition 267s enforce not yoda 267s accepts class variable on left 267s accepts interpolated string on left 267s accepts number on both sides 267s accepts variable on left after assign 267s accepts subtraction expression on left of comparison 267s accepts accessor and variable on left in boolean expression 267s registers an offense number on left 267s accepts interpolated regex on left 267s accepts instance variable on left 267s accepts __FILE__ on left in program name check 267s accepts string literal on right 267s accepts number on left of <=> 267s accepts __FILE__ on left in negated program name check 267s accepts negation 267s accepts assignment 267s registers an offense number on left of comparison 267s accepts method call on receiver on left 267s registers an offense for boolean literal on left 267s accepts string literal on left of case equality check 267s accepts global variable on left 267s registers an offense for string literal on left 267s accepts safe navigation on left 267s accepts array of numbers on both sides 267s registers an offense for nil on left 267s with EnforcedStyle: forbid_for_equality_operators_only 267s registers an offense for negated equality check 267s registers an offense for equality check 267s accepts mixed order in comparisons 267s accepts nil on left of comparison 267s accepts number on left of comparison 267s within an if or ternary statement 267s registers an offense for number on left in if condition 267s registers an offense for number on left of >= in ternary condition 267s registers an offense for number on left in modifier if 267s registers an offense for nil on left in ternary condition 267s registers an offense for number on left of comparison in if condition 267s registers an offense for number on left of <= in ternary condition 267s enforce yoda 267s accepts negation 267s accepts variable on right after assignment 267s accepts safe navigation on right 267s registers an offense for nil on right 267s registers an offense for boolean literal on right 267s accepts numbers on both sides 267s registers an offense for string literal on right 267s accepts class variable on right 267s accepts subtraction on right of comparison 267s accepts string literal on left 267s accepts number on left of <=> 267s accepts accessor and variable on right in boolean expression 267s registers an offense for number on right of comparison 267s registers an offense for number on right 267s accepts method call on receiver on right 267s accepts global variable on right 267s accepts instance variable on right 267s accepts string literal on right of case equality check 267s accepts arrays of numbers on both sides 267s accepts assignment 267s with EnforcedStyle: require_for_equality_operators_only 267s registers an offense for negated equality check 267s registers an offense for equality check 267s accepts number on right of comparison 267s accepts nil on right of comparison 267s accepts mixed order in comparisons 267s within an if or ternary statement 267s registers an offense number on right in if condition 267s registers an offense for number on right in modifier if 267s registers an offense number on right of comparison in if condition 267s registers an offense for number on right of >= in ternary condition 267s registers an offense for number on right of <= in ternary condition 267s registers an offense for nil on right in ternary condition 267s 267s RuboCop::Cop::Style::WhileUntilDo 267s registers an offense for do in multiline until 267s accepts do in single-line until 267s accepts multi-line until without do 267s accepts do in single-line while 267s registers an offense for do in multiline while 267s accepts multi-line while without do 267s 267s RuboCop::TargetRuby 267s when TargetRubyVersion is not set 267s when .ruby-version is present 267s does not read .tool-versions, Gemfile.lock or gems.locked 267s when .ruby-version contains a version prefixed by "ruby-" 267s correctly determines the target ruby version 267s when .ruby-version contains a JRuby version 267s uses the default target ruby version 267s when the MRI version contains multiple digits 267s reads it to determine the target ruby version 267s when .ruby-version contains a Rbx version 267s uses the default target ruby version 267s when .ruby-version contains an MRI version 267s reads it to determine the target ruby version 267s when .ruby-version contains "system" version 267s uses the default target ruby version 267s when .ruby-version is not present 267s and Gemfile.lock exists 267s uses the default Ruby when rbx is in Gemfile.lock 267s uses MRI Ruby version when it is present in Gemfile.lock 267s uses MRI Ruby version when it has multiple digits 267s uses the default Ruby when Ruby is not in Gemfile.lock 267s uses the default Ruby when jruby is in Gemfile.lock 267s and gems.locked exists 267s uses the default Ruby when jruby is in gems.locked 267s uses the default Ruby when Ruby is not in gems.locked 267s uses the default Ruby when rbx is in gems.locked 267s uses MRI Ruby version when it is present in gems.locked 267s uses MRI Ruby version when it has multiple digits 267s gemspec file 267s when file contains `required_ruby_version` as a string 267s sets target_ruby from inclusive range 267s sets target_ruby from exclusive range 267s sets target_ruby from approximate version 267s when file does not contain `required_ruby_version` 267s sets default target_ruby 267s when file contains `required_ruby_version` as an array 267s sets target_ruby from required_ruby_version with many requirements 267s sets target_ruby to the minimal version satisfying the requirements 267s when file contains `required_ruby_version` as a requirement 267s sets target_ruby from required_ruby_version from inclusive requirement range 267s sets first known ruby version that satisfies requirement 267s when bundler lock files are not present 267s uses the default target ruby version 267s when .ruby-version is not in a parent directory 267s when gems.locked is in a parent directory 267s does 267s when Gemfile.lock is in a parent directory 267s does 267s when .tool-versions is present 267s when .tool-versions does not contain a ruby version 267s uses the default ruby version 267s when .tool-versions contains a ruby version 267s does not read Gemfile.lock, gems.locked 267s reads it to determine the target ruby version 267s when .ruby-version is in a parent directory 267s reads it to determine the target ruby version 267s when TargetRubyVersion is set 267s uses TargetRubyVersion 267s does not read Gemfile.lock or gems.locked 267s does not read .ruby-version 267s 267s RuboCop::Cop::Lint::DuplicateRegexpCharacterClassElement 267s with no repeated character class elements 267s does not register an offense 267s with repeated elements in different character classes 267s does not register an offense 267s with a repeated character class element with quantifier 267s registers an offense and corrects 267s with a repeated character class element 267s registers an offense and corrects 267s with a repeated character posix character class inside a group 267s registers an offense and corrects 267s with no repeated character class elements when `"\0\07"` (means `"\u0000\a"`) 267s does not register an offense 267s with a repeated character class element and %r{} literal 267s registers an offense and corrects 267s with a repeated character class element inside a group 267s registers an offense and corrects 267s with a repeated intersection character class 267s does not register an offense 267s with repeated character class elements when `"\0\08"` (means `"\u0000\u00008"`) 267s registers an offense 267s with a repeated character class element with interpolation 267s registers an offense and corrects 267s with a repeated range element 267s registers an offense and corrects 267s with a range that covers a repeated element character class 267s does not register an offense 267s with multiple regexps with the same interpolation 267s does not register an offense 267s 267s RuboCop::Formatter::DisabledConfigFormatter 267s when there's .rubocop.yml 267s merges in excludes from .rubocop.yml 267s when exclude_limit option is omitted 267s disables the cop with 15 offending files 267s when any offenses are detected 267s displays YAML configuration disabling all cops with offenses 267s when exclude_limit option is passed 267s respects the file exclusion list limit 267s with autocorrect supported cop 267s adds a comment about --autocorrect option 267s when no files are inspected 267s creates a .rubocop_todo.yml even in such case 267s 267s RuboCop::Cop::Lint::IneffectiveAccessModifier 267s when `private_class_method` is used 267s when `private_class_method` contains all private method names 267s doesn't register an offense 267s when `private_class_method` does not contain the method 267s registers an offense 267s when `private` is applied to a class method 267s registers an offense 267s when there is an intervening instance method 267s still registers an offense 267s when a `class << self` block is used 267s doesn't register an offense 267s when no access modifier is used 267s doesn't register an offense 267s when `protected` is applied to a class method 267s registers an offense 267s when there is `begin` before a method definition 267s does not register an offense 267s 267s RuboCop::Cop::Layout::EmptyLinesAroundAttributeAccessor 267s accepts code when attribute method is method chained 267s registers an offense and corrects for some attribute accessors and comment line 267s accepts code that where the attr_accessor is the last line 267s registers an offense and corrects for code that immediately follows accessor 267s registers an offense and corrects for an attribute accessor and some comment line 267s does not register an offense and corrects when using `if` ... `else` branches 267s registers an offense and corrects for an attribute accessor and `rubocop:disable` comment line 267s accepts code that separates attribute accessors from the code with a newline 267s registers an offense and corrects for an attribute accessor and `rubocop:enable` comment line 267s registers an offense and corrects for code that immediately follows accessor with comment 267s accepts code that separates attribute accessors from the code and comment line with a newline 267s accepts code when used in class definition 267s registers an offense and corrects for an attribute accessor and `rubocop:enable` comment line and other comment 267s accepts code that separates an attribute accessor from the code with a newline 267s accepts code that separates an attribute accessor from the code and `rubocop:enable` comment line with a newline 267s registers an offense and corrects for an attribute accessor and comment line 267s when `AllowedMethods: private` 267s does not register an offense for code that immediately ignored methods after accessor 267s when `AllowedMethods: []` 267s registers an offense for code that immediately ignored methods after accessor 267s when `AllowAliasSyntax: false` 267s registers an offense for code that immediately `alias` syntax after accessor 267s when `AllowAliasSyntax: true` 267s does not register an offense for code that immediately `alias` syntax after accessor 267s 267s RuboCop::Cop::Naming::HeredocDelimiterNaming 267s when the delimiter contains non-letter characters 267s does not register an offense when delimiter contains a number 267s does not register an offense when delimiter contains an underscore 267s with an interpolated heredoc 267s does not register an offense with a meaningful delimiter 267s registers an offense with a non-meaningful delimiter 267s with multiple heredocs starting on the same line 267s registers an offense with a leading non-meaningful delimiter 267s does not register an offense with meaningful delimiters 267s registers an offense with a trailing non-meaningful delimiter 267s with a squiggly heredoc 267s registers an offense with a non-meaningful delimiter 267s does not register an offense with a meaningful delimiter 267s with a non-interpolated heredoc 267s when using double quoted delimiters 267s does not register an offense with a meaningful delimiter 267s registers an offense with a non-meaningful delimiter 267s when using non-word delimiters 267s registers an offense 267s when using back tick delimiters 267s does not register an offense with a meaningful delimiter 267s registers an offense with a non-meaningful delimiter 267s when using single quoted delimiters 267s does not register an offense with a meaningful delimiter 267s registers an offense with a non-meaningful delimiter 267s with a naked heredoc 267s registers an offense with a non-meaningful delimiter 267s does not register an offense with a meaningful delimiter 267s 267s RuboCop::Cop::VariableForce::Variable 267s .new 267s when non variable declaration node is passed 267s raises error 267s #referenced? 267s when the variable is not assigned 267s is expected to be falsey 267s and the variable is referenced 267s is expected to be truthy 267s when the variable has an assignment 267s and the variable is referenced 267s is expected to be truthy 267s and the variable is not yet referenced 267s is expected to be falsey 267s 267s RuboCop::Cop::InternalAffairs::MethodNameEqual 267s does not register an offense when using `#method?` 267s registers an offense when using `#method == :do_something` 267s registers an offense when using `#method == other_node.do_something` 267s 267s RuboCop::Cop::Style::OptionHash 267s registers an offense 267s when the last argument is an options hash named something else 267s does not register an offense 267s when the argument name is in the list of suspicious names 267s registers an offense 267s permitted list 267s ignores if the method is permitted 267s when passing options hash to super 267s does not register an offense when code exists before call to super 267s does not register an offense 267s does not register an offense when call to super is in a nested block 267s when the last argument is a non-options-hash optional hash 267s does not register an offense 267s when there are no arguments 267s does not register an offense 267s 267s RuboCop::Cop::Style::MultilineMemoization 267s EnforcedStyle: braces 267s with a multiline memoization 267s without a `begin` and `end` block 267s allows with a conditional on the following line 267s allows with a conditional on the first line 267s allows with another block on the following line 267s allows with another block on the first line 267s with a multiline memoization 267s without braces 267s when the expression is wrapped in `begin` and `end` keywords 267s registers an offense for begin...end block on following line 267s registers an offense for begin...end block on first line 267s with a single line memoization 267s allows expression on first line 267s allows expression on the following line 267s EnforcedStyle: keyword 267s with a multiline memoization 267s without a `begin` and `end` block 267s when the expression is wrapped in parentheses 267s registers an offense with multiline expression 267s registers an offense when expression starts on first line 267s registers an offense when expression starts on following line 267s with a multiline memoization 267s without a `begin` and `end` block 267s allows with another block on the first line 267s allows with another block on the following line 267s allows with a conditional on the following line 267s allows with a conditional on the first line 267s with a single line memoization 267s allows expression on the following line 267s allows expression on first line 267s 267s RuboCop::Cop::Style::NestedFileDirname 267s Ruby <= 3.0 267s does not register an offense when using `File.dirname(path)` nested two times 267s Ruby >= 3.1 267s registers and corrects an offense when using `File.dirname(path)` nested three times 267s does not register an offense when using `File.dirname(path, 2)` 267s registers and corrects an offense when using `File.dirname(path)` nested two times 267s does not register an offense when using non nested `File.dirname(path)` 267s 267s RuboCop::Cop::Style::InfiniteLoop 267s registers an offense for a while loop with [1] as condition 267s registers an offense for until false if loop {} would work because of previous assignment in a while loop 267s accepts while true if loop {} would change semantics 267s registers an offense for a while loop with 2.0 as condition 267s registers an offense for until false if loop {} would work because the assigned variable is not used afterwards 267s registers an offense for a until loop with nil as condition 267s registers an offense for while true if loop {} would work because it is an instance variable being assigned 267s registers an offense for while true or until false if loop {} would work because of an earlier assignment 267s accepts Kernel#loop 267s registers an offense for a while loop with {} as condition 267s registers an offense for a while loop with 1 as condition 267s registers an offense for a until loop with false as condition 267s accepts modifier while true if loop {} would change semantics 267s registers an offense for modifier until false if loop {} would not change semantics 267s behaves like autocorrector 267s autocorrects single line modifier while with and 267s autocorrects begin-end-while with two statements 267s autocorrects the usage of while with do 267s autocorrects the usage of while without do 267s autocorrects begin-end-while with one statement 267s autocorrects single line modifier while 267s with non-default indentation width 267s autocorrects multi-line modifier while and indents correctly 267s behaves like autocorrector 267s autocorrects begin-end-until with two statements 267s autocorrects single line modifier until 267s autocorrects single line modifier until with and 267s autocorrects the usage of until with do 267s autocorrects the usage of until without do 267s autocorrects begin-end-until with one statement 267s with non-default indentation width 267s autocorrects multi-line modifier until and indents correctly 267s 267s RuboCop::Cop::Style::PerlBackrefs 267s autocorrects $` to Regexp.last_match.pre_match 267s autocorrects $' to Regexp.last_match.post_match 267s autocorrects $PREMATCH to Regexp.last_match.pre_match 267s autocorrects $& to Regexp.last_match(0) 267s autocorrects `#$1` to `#{Regexp.last_match(1)}` 267s autocorrects $+ to Regexp.last_match(-1) 267s autocorrects $1 to ::Regexp.last_match(1) in namespace 267s autocorrects $LAST_PAREN_MATCH to Regexp.last_match(-1) 267s autocorrects $9 to Regexp.last_match(9) 267s autocorrects /#$1/ to /#{Regexp.last_match(1)}/ 267s autocorrects puts $1 to puts Regexp.last_match(1) 267s autocorrects $POSTMATCH to Regexp.last_match.post_match 267s autocorrects $MATCH to Regexp.last_match(0) 267s autocorrects "#$1" to "#{Regexp.last_match(1)}" 267s 267s RuboCop::Cop::Layout::FirstMethodParameterLineBreak 267s accepts params without parens 267s accepts params listed on a single line 267s registers an offense and corrects params with default values 267s registers an offense and corrects params listed on the first line 267s accepts single-line methods 267s accepts methods without params 267s registers an offense and corrects params on first line of singleton method 267s 267s RuboCop::Cop::Lint::RequireRangeParentheses 267s does not register an offense when using `42..nil` 267s registers an offense when the end of the range (`..`) is line break 267s does not register an offense when using `nil..42` 267s does not register an offense when begin and end of the range are on the same line 267s does not register an offense when the end of the range (`..`) is line break and is enclosed in parentheses 267s registers an offense when the end of the range (`...`) is line break 267s Ruby >= 2.7 267s does not register an offense when using beginless range only 267s Ruby >= 2.6 267s does not register an offense when using endless range only 267s 267s RuboCop::MagicComment 267s returns nil for encoding when comment is # xyz shareable_constant_value: literal xyz 267s returns "literal" for shareable_constant_value when comment is # SHAREABLE-CONSTANT-VALUE: literal 267s returns nil for frozen_string_literal when comment is # frozen_string_literal: true encoding: ascii-8bit 267s returns nil for encoding when comment is # @typed 267s returns "ascii-8bit" for encoding when comment is #vim: filetype=ruby, fileencoding=ascii-8bit, typed=strict 267s returns nil for frozen_string_literal when comment is # sHaReaBLE-CoNstANT-ValUE: literal 267s returns nil for frozen_string_literal when comment is # 267s returns "ascii-8bit" for encoding when comment is # coding: utf-8 -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- 267s returns nil for frozen_string_literal when comment is #vim: filetype=ruby, fileencoding=ascii-8bit 267s returns "utf-8" for encoding when comment is # encoding: utf-8 267s returns nil for typed when comment is # xyz shareable_constant_value: literal 267s returns nil for encoding when comment is # typed: false 267s returns nil for shareable_constant_value when comment is # frozen_string_literal: invalid 267s returns nil for frozen_string_literal when comment is # shareable_constant_value: experimental_copy 267s returns "strict" for typed when comment is # typed: strict 267s returns nil for shareable_constant_value when comment is # encoding: ascii-8bit frozen_string_literal: true 267s returns nil for typed when comment is CSV.generate(encoding: Encoding::UTF_8) do |csv| 267s returns nil for shareable_constant_value when comment is # eNcOdInG: utf-8 267s returns nil for frozen_string_literal when comment is # @typed 267s returns nil for typed when comment is # -*- coding: ASCII-8BIT; typed: strict -*- 267s returns nil for shareable_constant_value when comment is # vim:fileencoding=utf-8 267s returns nil for frozen_string_literal when comment is # incoding: utf-8 267s returns nil for typed when comment is # vim: filetype=python, fileencoding=ascii-8bit 267s returns nil for typed when comment is # incoding: utf-8 267s returns nil for typed when comment is # coding: utf-8 -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- 267s returns true for frozen_string_literal when comment is # -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- 267s returns nil for shareable_constant_value when comment is CSV.generate(encoding: Encoding::UTF_8) do |csv| 267s returns nil for shareable_constant_value when comment is # -*- encoding : ascii-8bit -*- 267s returns nil for shareable_constant_value when comment is # coding: utf-8 -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- 267s returns nil for typed when comment is #vim: filetype=ruby, fileencoding=ascii-8bit 267s returns nil for encoding when comment is # typed: true 267s returns true for frozen_string_literal when comment is # frozen_string_literal: true 267s returns nil for frozen_string_literal when comment is # vim: filetype=python, fileencoding=ascii-8bit 267s returns nil for frozen_string_literal when comment is # ENCODING: utf-8 267s returns nil for shareable_constant_value when comment is # vim: filetype=python, fileencoding=ascii-8bit 267s returns nil for typed when comment is # frozen-string-literal: true 267s returns nil for frozen_string_literal when comment is # SHAREABLE-CONSTANT-VALUE: literal 267s returns "utf-8" for encoding when comment is # ENCODING: utf-8 267s returns nil for shareable_constant_value when comment is # ENCODING: utf-8 267s returns nil for frozen_string_literal when comment is # encoding: stateless-iso-2022-jp-kddi 267s returns nil for typed when comment is # encoding: stateless-iso-2022-jp-kddi 267s returns nil for encoding when comment is # shareable-constant-value: literal 267s returns nil for frozen_string_literal when comment is # shareable_constant_value: none 267s returns nil for shareable_constant_value when comment is # fRoZeN-sTrInG_lItErAl: true 267s returns nil for typed when comment is # -*- frozen-string-literal: true -*- 267s returns nil for frozen_string_literal when comment is CSV.generate(encoding: Encoding::UTF_8) do |csv| 267s returns "ascii-8bit" for encoding when comment is # vim: filetype=ruby, fileencoding=ascii-8bit 267s returns "none" for shareable_constant_value when comment is # shareable_constant_value: none 267s returns nil for shareable_constant_value when comment is # encoding: utf-8 267s returns "literal" for shareable_constant_value when comment is # shareable_constant_value:literal 267s returns nil for typed when comment is # shareable_constant_value:literal 267s returns nil for encoding when comment is # frozen_string_literal: false 267s returns nil for typed when comment is # SHAREABLE-CONSTANT-VALUE: literal 267s returns nil for typed when comment is # vim: filetype=ruby, fileencoding=ascii-8bit 267s returns nil for shareable_constant_value when comment is #vim: filetype=ruby, fileencoding=ascii-8bit 267s returns nil for encoding when comment is # xyz shareable_constant_value: literal 267s returns nil for typed when comment is # frozen_string_literal: invalid 267s returns nil for shareable_constant_value when comment is # coding: utf-8 267s returns "ascii-8bit" for encoding when comment is #vim: filetype=ruby, fileencoding=ascii-8bit 267s returns nil for encoding when comment is # shareable_constant_value: experimental_everything 267s returns nil for shareable_constant_value when comment is # FROZEN-STRING-LITERAL: true 267s returns nil for shareable_constant_value when comment is # typed: ignore 267s returns nil for frozen_string_literal when comment is # typed:strict 267s returns true for frozen_string_literal when comment is # frozen_string_literal:true 267s returns nil for shareable_constant_value when comment is # typed: true 267s returns nil for shareable_constant_value when comment is # coding: utf-8 267s returns nil for typed when comment is # shareable_constant_value: literal 267s returns nil for typed when comment is # coding: utf-8 vim: filetype=ruby, fileencoding=ascii-8bit 267s returns "false" for typed when comment is # typed: false 267s returns nil for shareable_constant_value when comment is # incoding: utf-8 267s returns "invalid" for frozen_string_literal when comment is # frozen_string_literal: invalid 267s returns nil for frozen_string_literal when comment is # shareable-constant-value: literal 267s returns nil for shareable_constant_value when comment is # frozen-string-literal: true 267s returns nil for typed when comment is # ENCODING: utf-8 267s returns nil for frozen_string_literal when comment is # xyz shareable_constant_value: literal xyz 267s returns nil for typed when comment is # -*- encoding : ascii-8bit -*- 267s returns nil for typed when comment is # fRoZeN-sTrInG_lItErAl: true 267s returns nil for typed when comment is # shareable_constant_value: none 267s returns nil for shareable_constant_value when comment is # xyz shareable_constant_value: literal xyz 267s returns nil for shareable_constant_value when comment is # -*- coding: ASCII-8BIT; typed: strict -*- 267s returns nil for encoding when comment is # shareable_constant_value: none 267s returns nil for typed when comment is # coding: utf-8 267s returns nil for shareable_constant_value when comment is # @typed 267s returns nil for frozen_string_literal when comment is # -*- coding: ASCII-8BIT; typed: strict -*- 267s returns nil for encoding when comment is # SHAREABLE-CONSTANT-VALUE: literal 267s returns nil for frozen_string_literal when comment is # shareable_constant_value: experimental_everything 267s returns nil for typed when comment is # encoding: ascii-8bit frozen_string_literal: true 267s returns nil for frozen_string_literal when comment is # -*- encoding : ascii-8bit -*- 267s returns nil for shareable_constant_value when comment is # encoding: stateless-iso-2022-jp-kddi 267s returns "ascii-8bit" for encoding when comment is # frozen_string_literal: true encoding: ascii-8bit 267s returns nil for frozen_string_literal when comment is #typed:strict 267s returns nil for frozen_string_literal when comment is # eNcOdInG: utf-8 267s returns true for frozen_string_literal when comment is # frozen_string_literal: true 267s returns true for frozen_string_literal when comment is # frozen-string-literal: true 267s returns "utf-8" for encoding when comment is # coding: utf-8 vim: filetype=ruby, fileencoding=ascii-8bit 267s returns nil for shareable_constant_value when comment is # typed: false 267s returns nil for typed when comment is # xyz shareable_constant_value: literal xyz 267s returns "strict" for typed when comment is # typed:strict 267s returns nil for encoding when comment is # frozen_string_literal: invalid 267s returns nil for encoding when comment is # shareable_constant_value: literal 267s returns "ascii-8bit" for encoding when comment is # -*- encoding : ascii-8bit -*- 267s returns nil for shareable_constant_value when comment is # vim: filetype=ruby, fileencoding=ascii-8bit 267s returns nil for encoding when comment is # frozen_string_literal: true 267s returns nil for shareable_constant_value when comment is # frozen_string_literal: true 267s returns nil for shareable_constant_value when comment is # frozen_string_literal: true encoding: ascii-8bit 267s returns nil for typed when comment is # 267s returns nil for shareable_constant_value when comment is # -*- frozen-string-literal: true -*- 267s returns "true" for typed when comment is # typed: true 267s returns nil for encoding when comment is # typed: ignore 267s returns nil for frozen_string_literal when comment is # encoding: ascii-8bit frozen_string_literal: true 267s returns nil for encoding when comment is #typed:strict 267s returns nil for frozen_string_literal when comment is # coding: utf-8 vim: filetype=ruby, fileencoding=ascii-8bit 267s returns nil for typed when comment is # frozen_string_literal:true 267s returns nil for encoding when comment is CSV.generate(encoding: Encoding::UTF_8) do |csv| 267s returns "literal" for shareable_constant_value when comment is # shareable_constant_value: literal 267s returns nil for shareable_constant_value when comment is # frozen_string_literal:true 267s returns nil for frozen_string_literal when comment is # typed: true 267s returns nil for encoding when comment is # vim: filetype=ruby,fileencoding=ascii-8bit 267s returns nil for frozen_string_literal when comment is # coding: utf-8 267s returns nil for encoding when comment is # fRoZeN-sTrInG_lItErAl: true 267s returns "ascii-8bit" for encoding when comment is # vim: filetype=python, fileencoding=ascii-8bit 267s returns nil for typed when comment is # encoding: utf-8 267s returns nil for typed when comment is # sHaReaBLE-CoNstANT-ValUE: literal 267s returns nil for encoding when comment is # typed:strict 267s returns nil for shareable_constant_value when comment is # vim: filetype=ruby, fileencoding=ascii-8bit 267s returns true for frozen_string_literal when comment is # coding: utf-8 -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- 267s returns nil for encoding when comment is # frozen-string-literal: true 267s returns "utf-8" for encoding when comment is # eNcOdInG: utf-8 267s returns nil for frozen_string_literal when comment is # typed: strong 267s returns "ascii-8bit" for encoding when comment is # -*- coding: ASCII-8BIT; typed: strict -*- 267s returns nil for typed when comment is # vim: filetype=ruby,fileencoding=ascii-8bit 267s returns nil for typed when comment is # vim:fileencoding=utf-8 267s returns true for frozen_string_literal when comment is # FROZEN-STRING-LITERAL: true 267s returns nil for shareable_constant_value when comment is # vim: filetype=ruby,fileencoding=ascii-8bit 267s returns nil for frozen_string_literal when comment is # vim:fileencoding=utf-8 267s returns nil for frozen_string_literal when comment is # vim: filetype=ruby, fileencoding=ascii-8bit 267s returns nil for typed when comment is # frozen_string_literal: false 267s returns nil for typed when comment is # -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- 267s returns "ascii-8bit" for encoding when comment is # vim: filetype=ruby, fileencoding=ascii-8bit 267s returns nil for typed when comment is # frozen_string_literal: true 267s returns nil for shareable_constant_value when comment is # typed:strict 267s returns nil for typed when comment is #vim: filetype=ruby, fileencoding=ascii-8bit, typed=strict 267s returns "experimental_everything" for shareable_constant_value when comment is # shareable_constant_value: experimental_everything 267s returns nil for frozen_string_literal when comment is # coding: utf-8 267s returns "literal" for shareable_constant_value when comment is # sHaReaBLE-CoNstANT-ValUE: literal 267s returns "ascii-8bit" for encoding when comment is # encoding: ascii-8bit frozen_string_literal: true 267s returns nil for encoding when comment is # frozen_string_literal:true 267s returns nil for frozen_string_literal when comment is # typed: strict 267s returns true for frozen_string_literal when comment is # fRoZeN-sTrInG_lItErAl: true 267s returns nil for frozen_string_literal when comment is # encoding: utf-8 267s returns "strict" for typed when comment is #typed:strict 267s returns nil for frozen_string_literal when comment is #vim: filetype=ruby, fileencoding=ascii-8bit, typed=strict 267s returns nil for typed when comment is # shareable-constant-value: literal 267s returns nil for typed when comment is # vim: filetype=ruby, fileencoding=ascii-8bit 267s returns nil for encoding when comment is # FROZEN-STRING-LITERAL: true 267s returns nil for frozen_string_literal when comment is # xyz shareable_constant_value: literal 267s returns nil for typed when comment is # frozen_string_literal: true encoding: ascii-8bit 267s returns false for frozen_string_literal when comment is # frozen_string_literal: false 267s returns nil for encoding when comment is # typed: strict 267s returns nil for encoding when comment is # vim:fileencoding=utf-8 267s returns nil for frozen_string_literal when comment is # vim: filetype=ruby,fileencoding=ascii-8bit 267s returns "literal" for shareable_constant_value when comment is # shareable-constant-value: literal 267s returns nil for typed when comment is # FROZEN-STRING-LITERAL: true 267s returns nil for encoding when comment is # shareable_constant_value: experimental_copy 267s returns nil for typed when comment is # shareable_constant_value: experimental_copy 267s returns nil for typed when comment is # frozen_string_literal: true 267s returns nil for encoding when comment is # -*- frozen-string-literal: true -*- 267s returns nil for encoding when comment is # 267s returns nil for typed when comment is # @typed 267s returns true for frozen_string_literal when comment is # -*- frozen-string-literal: true -*- 267s returns nil for shareable_constant_value when comment is # typed: strict 267s returns nil for encoding when comment is # typed: strong 267s returns "utf-8" for encoding when comment is # coding: utf-8 267s returns "strong" for typed when comment is # typed: strong 267s returns nil for encoding when comment is # frozen_string_literal: true 267s returns nil for frozen_string_literal when comment is # typed: ignore 267s returns nil for shareable_constant_value when comment is #typed:strict 267s returns "experimental_copy" for shareable_constant_value when comment is # shareable_constant_value: experimental_copy 267s returns nil for encoding when comment is # shareable_constant_value:literal 267s returns nil for shareable_constant_value when comment is # coding: utf-8 vim: filetype=ruby, fileencoding=ascii-8bit 267s returns nil for typed when comment is # eNcOdInG: utf-8 267s returns nil for typed when comment is # shareable_constant_value: experimental_everything 267s returns nil for shareable_constant_value when comment is # -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- 267s returns nil for frozen_string_literal when comment is # typed: false 267s returns nil for shareable_constant_value when comment is # xyz shareable_constant_value: literal 267s returns nil for encoding when comment is # sHaReaBLE-CoNstANT-ValUE: literal 267s returns "ascii-8bit" for encoding when comment is # -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- 267s returns "utf-8" for encoding when comment is # coding: utf-8 267s returns nil for shareable_constant_value when comment is # 267s returns nil for frozen_string_literal when comment is # shareable_constant_value:literal 267s returns nil for typed when comment is # coding: utf-8 267s returns nil for frozen_string_literal when comment is # vim: filetype=ruby, fileencoding=ascii-8bit 267s returns "ignore" for typed when comment is # typed: ignore 267s returns nil for frozen_string_literal when comment is # shareable_constant_value: literal 267s returns nil for shareable_constant_value when comment is # frozen_string_literal: false 267s returns nil for shareable_constant_value when comment is # typed: strong 267s returns "stateless-iso-2022-jp-kddi" for encoding when comment is # encoding: stateless-iso-2022-jp-kddi 267s returns nil for shareable_constant_value when comment is #vim: filetype=ruby, fileencoding=ascii-8bit, typed=strict 267s returns nil for shareable_constant_value when comment is # frozen_string_literal: true 267s returns nil for encoding when comment is # incoding: utf-8 267s #without 267s simple format 267s when the entire comment is a single value 267s is expected to eq "" 267s when the comment contains a different magic value 267s is expected to eq "# frozen-string-literal: true" 267s vim format 267s when the comment has multiple tokens 267s is expected to eq "# vim: filetype=ruby" 267s emacs format 267s with one token 267s is expected to eq "" 267s with multiple tokens 267s is expected to eq "# -*- frozen_string_literal: true -*-" 267s #valid_shareable_constant_value? 267s when given comment specified as unknown value 267s is expected to equal false 267s when given comment is not specified 267s is expected to equal false 267s when given comment specified as `literal` 267s is expected to equal true 267s when given comment specified as `experimental_copy` 267s is expected to equal true 267s when given comment specified as `experimental_everything` 267s is expected to equal true 267s when given comment specified as `none` 267s is expected to equal true 267s #valid? 267s with an frozen string literal comment 267s is expected to equal true 267s with a non magic comment 267s is expected to equal false 267s with an empty string 267s is expected to equal false 267s with an shareable constant value comment 267s is expected to equal true 267s with an encoding comment 267s is expected to equal true 267s 267s RuboCop::Formatter::MarkdownFormatter 268s outputs the result in Markdown 268s outputs the cached result in Markdown 268s 268s RuboCop::Cop::Lint::DuplicateHashKey 268s behaves like duplicated non literal key 268s does not register an offense for duplicated `{ some_method_call => :sym }` hash keys 268s target ruby version >= 2.6 268s behaves like duplicated literal key 268s registers an offense for duplicated `(42..)` hash keys 268s behaves like duplicated non literal key 268s does not register an offense for duplicated `some_method_call(x, y)` hash keys 268s behaves like duplicated literal key 268s registers an offense for duplicated `!true` hash keys 268s behaves like duplicated literal key 268s registers an offense for duplicated `"#{2}"` hash keys 268s when there are two duplicated keys in a hash 268s registers two offenses 268s behaves like duplicated literal key 268s registers an offense for duplicated `'str'` hash keys 268s behaves like duplicated non literal key 268s does not register an offense for duplicated `%r{abx#{foo}}ixo` hash keys 268s behaves like duplicated literal key 268s registers an offense for duplicated `/./` hash keys 268s behaves like duplicated literal key 268s registers an offense for duplicated `false` hash keys 268s behaves like duplicated literal key 268s registers an offense for duplicated `1` hash keys 268s behaves like duplicated literal key 268s registers an offense for duplicated `(false <=> true)` hash keys 268s behaves like duplicated non literal key 268s does not register an offense for duplicated `{ :sym => some_method_call }` hash keys 268s When a key is duplicated three times in a hash literal 268s registers two offenses 268s When there is no duplicated key in the hash 268s does not register an offense 268s behaves like duplicated non literal key 268s does not register an offense for duplicated `/.#{some_method_call}/` hash keys 268s behaves like duplicated literal key 268s registers an offense for duplicated `{ a: 1, b: 2 }` hash keys 268s behaves like duplicated literal key 268s registers an offense for duplicated `%r{abx}ixo` hash keys 268s behaves like duplicated literal key 268s registers an offense for duplicated `[1, 2, 3]` hash keys 268s behaves like duplicated literal key 268s registers an offense for duplicated `{ :a => 1, :b => 2 }` hash keys 268s behaves like duplicated literal key 268s registers an offense for duplicated `(1)` hash keys 268s behaves like duplicated non literal key 268s does not register an offense for duplicated `[some_method_call]` hash keys 268s behaves like duplicated literal key 268s registers an offense for duplicated `(false && true)` hash keys 268s when there is a duplicated key in the hash literal 268s registers an offense 268s behaves like duplicated non literal key 268s does not register an offense for duplicated `(x or false)` hash keys 268s behaves like duplicated literal key 268s registers an offense for duplicated `(false or true)` hash keys 268s behaves like duplicated non literal key 268s does not register an offense for duplicated `some_method_call` hash keys 268s behaves like duplicated non literal key 268s does not register an offense for duplicated `(x && false)` hash keys 268s behaves like duplicated non literal key 268s does not register an offense for duplicated `"#{some_method_call}"` hash keys 268s behaves like duplicated non literal key 268s does not register an offense for duplicated `(x == false)` hash keys 268s behaves like duplicated literal key 268s registers an offense for duplicated `nil` hash keys 268s behaves like duplicated literal key 268s registers an offense for duplicated `1.0` hash keys 268s 268s RuboCop::Cop::Layout::MultilineArrayLineBreaks 268s when nested arrays 268s registers an offense and corrects 268s when on same line 268s does not add any offenses 268s when on same line, separate line from brackets 268s does not add any offenses 268s when two elements on same line 268s registers an offense and corrects 268s 268s RuboCop::Cop::InternalAffairs::SingleLineComparison 268s registers and corrects an offense when comparing `loc.last_line` with `loc.first_line` 268s registers and corrects an offense when negative comparing `last_line` with `first_line` 268s registers and corrects an offense when comparing `source_range.last_line` with `source_range.first_line` 268s registers and corrects an offense when comparing `last_line` with `first_line` 268s registers and corrects an offense when comparing `loc.first_line` with `loc.last_line` 268s does not register an offense when the receivers are not a match 268s registers and corrects an offense when comparing `first_line` with `last_line` 268s registers and corrects an offense when comparing `loc.last_line` with `loc.line` 268s does not register an offense when comparing the same line 268s registers and corrects an offense when comparing `source_range.first_line` with `source_range.last_line` 268s registers and corrects an offense when comparing `loc.line` with `loc.last_line` 268s registers and corrects an offense when negative comparing `first_line` with `last_line` 268s 268s RuboCop::Cop::Commissioner 268s #investigate 268s stores all errors raised by the cops 268s traverses the AST and invoke cops specific callbacks 268s when given a source with parsing errors 268s only calls on_other_file 268s when a cop reports offenses 268s returns all offenses found by the cops 268s when passed :raise_error option 268s re-raises the exception received while processing 268s when given a force 268s passes the input params to all cops/forces that implement their own #investigate method 268s when passed :raise_cop_error option 268s re-raises the exception received while processing 268s traverses the AST with on_send / on_csend 268s for unrestricted cops 268s calls on_send all method calls 268s for a restricted cop 268s calls on_send for the right method calls 268s on both csend and send 268s calls on_send for the right method calls 268s 268s RuboCop::Cop::Security::Eval 268s accepts eval on a literal string 268s accepts eval with no arguments 268s accepts eval as method 268s registers an offense for eval as function 268s accepts eval with a multiline string 268s registers an offense for eval as command 268s accepts eval as variable 268s accepts eval with a string that interpolates a literal 268s registers an offense `Binding#eval` 268s registers an offense for eval with string that has an interpolation 268s with an explicit binding, filename, and line number 268s registers an offense for eval as function 268s accepts eval on a literal string 268s registers an offense for eval as command 268s 268s Pending: (Failures listed here are expected and do not affect your suite's status) 268s 268s 1) RuboCop::Cop::Lint::UselessAssignment when a variable is reassigned in loop body but won't be referenced either next iteration or loop condition registers an offense 268s # Requires an advanced logic that checks whether the return value of an operator assignment is used or not. 268s Failure/Error: 268s expect_offense(<<~RUBY) 268s def some_method 268s total = 0 268s foo = 0 268s 268s while total < 100 268s total += 1 268s foo += 1 268s ^^^ Useless assignment to variable - `foo`. 268s end 268s 268s Diff: 268s @@ -5,7 +5,6 @@ 268s while total < 100 268s total += 1 268s foo += 1 268s - ^^^ Useless assignment to variable - `foo`. 268s end 268s 268s total 268s # /usr/share/rubygems-integration/all/gems/rubocop-1.39.0/lib/rubocop/rspec/expect_offense.rb:123:in `expect_offense' 268s # ./spec/rubocop/cop/lint/useless_assignment_spec.rb:341:in `block (3 levels) in ' 268s # /usr/share/rubygems-integration/all/gems/webmock-3.25.1/lib/webmock/rspec.rb:39:in `block (2 levels) in ' 268s 268s Failures: 268s 268s 1) RuboCop::Cop::Style::RedundantRegexpCharacterClass with a character class containing an escaped-0 does not register an offense 268s Failure/Error: expect_no_offenses('foo = /[\032]/') 268s 268s expected: "foo = /[\\032]/" 268s got: "foo = /[\\032]/ ^^^^^^ Redundant single-element character class, `[\\032]` can be replaced with `\\032`.\n" 268s 268s (compared using ==) 268s 268s Diff: 268s @@ -1 +1 @@ 268s -foo = /[\032]/ 268s +foo = /[\032]/ ^^^^^^ Redundant single-element character class, `[\032]` can be replaced with `\032`. 268s # /usr/share/rubygems-integration/all/gems/rubocop-1.39.0/lib/rubocop/rspec/expect_offense.rb:184:in `expect_no_offenses' 268s # ./spec/rubocop/cop/style/redundant_regexp_character_class_spec.rb:315:in `block (3 levels) in ' 268s # /usr/share/rubygems-integration/all/gems/webmock-3.25.1/lib/webmock/rspec.rb:39:in `block (2 levels) in ' 268s 268s Finished in 1 minute 56.93 seconds (files took 4.38 seconds to load) 268s 19119 examples, 1 failure, 1 pending 268s 268s Failed examples: 268s 268s rspec ./spec/rubocop/cop/style/redundant_regexp_character_class_spec.rb:314 # RuboCop::Cop::Style::RedundantRegexpCharacterClass with a character class containing an escaped-0 does not register an offense 268s 268s Randomized with seed 53014 268s 269s /usr/bin/ruby3.3 -I/usr/share/rubygems-integration/all/gems/rspec-support-3.13.1/lib:/usr/share/rubygems-integration/all/gems/rspec-core-3.13.0/lib /usr/share/rubygems-integration/all/gems/rspec-core-3.13.0/exe/rspec --pattern ./spec/\*\*/\*_spec.rb --exclude-pattern spec/rubocop/config_loader_spec.rb,spec/project_spec.rb,spec/rubocop/cli/options_spec.rb,spec/rubocop/cli/suggest_extensions_spec.rb,spec/rubocop/config_obsoletion_spec.rb,spec/rubocop/lockfile_spec.rb,spec/rubocop/server/rubocop_server_spec.rb,spec/rubocop/version_spec.rb,./spec/rubocop/cop/generator_spec.rb --format documentation failed 269s mv ./.gem2deb.lib lib 269s autopkgtest [18:36:25]: test gem2deb-test-runner: -----------------------] 270s autopkgtest [18:36:26]: test gem2deb-test-runner: - - - - - - - - - - results - - - - - - - - - - 270s gem2deb-test-runner FAIL non-zero exit status 1 270s autopkgtest [18:36:26]: @@@@@@@@@@@@@@@@@@@@ summary 270s gem2deb-test-runner FAIL non-zero exit status 1