0s autopkgtest [18:40:30]: starting date and time: 2026-02-09 18:40:30+0000 0s autopkgtest [18:40:30]: git checkout: 508d4a25 a-v-ssh wait_for_ssh: demote "ssh connection failed" to a debug message 0s autopkgtest [18:40:30]: host juju-7f2275-prod-proposed-migration-environment-9; command line: /home/ubuntu/autopkgtest/runner/autopkgtest --output-dir /tmp/autopkgtest-work.wjh688d7/out --timeout-copy=6000 --setup-commands 'ln -s /dev/null /etc/systemd/system/bluetooth.service; printf "http_proxy=http://squid.internal:3128\nhttps_proxy=http://squid.internal:3128\nno_proxy=127.0.0.1,127.0.1.1,localhost,localdomain,internal,login.ubuntu.com,archive.ubuntu.com,ports.ubuntu.com,security.ubuntu.com,ddebs.ubuntu.com,changelogs.ubuntu.com,keyserver.ubuntu.com,launchpadlibrarian.net,launchpadcontent.net,launchpad.net,keystone.ps5.canonical.com,objectstorage.prodstack5.canonical.com,radosgw.ps5.canonical.com\n" >> /etc/environment' --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 -- lxd -r lxd-armhf-10.145.243.229 lxd-armhf-10.145.243.229:autopkgtest/ubuntu/resolute/armhf 21s autopkgtest [18:40:51]: testbed dpkg architecture: armhf 23s autopkgtest [18:40:53]: testbed apt version: 3.1.15 27s autopkgtest [18:40:57]: @@@@@@@@@@@@@@@@@@@@ test bed setup 29s autopkgtest [18:40:59]: testbed release detected to be: None 36s autopkgtest [18:41:06]: updating testbed package index (apt update) 38s Get:1 http://ftpmaster.internal/ubuntu resolute-proposed InRelease [124 kB] 39s Get:2 http://ftpmaster.internal/ubuntu resolute InRelease [124 kB] 39s Get:3 http://ftpmaster.internal/ubuntu resolute-updates InRelease [124 kB] 39s Get:4 http://ftpmaster.internal/ubuntu resolute-security InRelease [124 kB] 39s Get:5 http://ftpmaster.internal/ubuntu resolute-proposed/restricted Sources [1764 B] 39s Get:6 http://ftpmaster.internal/ubuntu resolute-proposed/universe Sources [1630 kB] 41s Get:7 http://ftpmaster.internal/ubuntu resolute-proposed/main Sources [174 kB] 41s Get:8 http://ftpmaster.internal/ubuntu resolute-proposed/multiverse Sources [29.4 kB] 41s Get:9 http://ftpmaster.internal/ubuntu resolute-proposed/main armhf Packages [245 kB] 42s Get:10 http://ftpmaster.internal/ubuntu resolute-proposed/universe armhf Packages [1403 kB] 43s Get:11 http://ftpmaster.internal/ubuntu resolute-proposed/multiverse armhf Packages [7452 B] 43s Get:12 http://ftpmaster.internal/ubuntu resolute/main Sources [1412 kB] 45s Get:13 http://ftpmaster.internal/ubuntu resolute/universe Sources [21.3 MB] 67s Get:14 http://ftpmaster.internal/ubuntu resolute/restricted Sources [15.1 kB] 67s Get:15 http://ftpmaster.internal/ubuntu resolute/main armhf Packages [1374 kB] 69s Get:16 http://ftpmaster.internal/ubuntu resolute/universe armhf Packages [15.1 MB] 88s Fetched 43.2 MB in 49s (875 kB/s) 88s Reading package lists... 94s autopkgtest [18:42:04]: upgrading testbed (apt dist-upgrade and autopurge) 96s Reading package lists... 96s Building dependency tree... 96s Reading state information... 96s Calculating upgrade... 97s The following packages will be upgraded: 97s cryptsetup-bin dracut-install iproute2 iptables libcryptsetup12 libip4tc2 97s libip6tc2 libxtables12 wget 97s 9 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 97s Need to get 2407 kB of archives. 97s After this operation, 152 kB of additional disk space will be used. 97s Get:1 http://ftpmaster.internal/ubuntu resolute/main armhf iptables armhf 1.8.11-2ubuntu3 [345 kB] 98s Get:2 http://ftpmaster.internal/ubuntu resolute/main armhf libip4tc2 armhf 1.8.11-2ubuntu3 [22.0 kB] 98s Get:3 http://ftpmaster.internal/ubuntu resolute/main armhf libip6tc2 armhf 1.8.11-2ubuntu3 [22.3 kB] 98s Get:4 http://ftpmaster.internal/ubuntu resolute/main armhf libxtables12 armhf 1.8.11-2ubuntu3 [33.5 kB] 98s Get:5 http://ftpmaster.internal/ubuntu resolute/main armhf iproute2 armhf 6.18.0-1ubuntu1 [1123 kB] 99s Get:6 http://ftpmaster.internal/ubuntu resolute/main armhf libcryptsetup12 armhf 2:2.8.0-1ubuntu3 [254 kB] 99s Get:7 http://ftpmaster.internal/ubuntu resolute/main armhf wget armhf 1.25.0-2ubuntu4 [327 kB] 100s Get:8 http://ftpmaster.internal/ubuntu resolute/main armhf cryptsetup-bin armhf 2:2.8.0-1ubuntu3 [232 kB] 100s Get:9 http://ftpmaster.internal/ubuntu resolute/main armhf dracut-install armhf 109-11ubuntu1 [47.9 kB] 100s Preconfiguring packages ... 100s Fetched 2407 kB in 3s (785 kB/s) 101s (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 ... 68683 files and directories currently installed.) 101s Preparing to unpack .../0-iptables_1.8.11-2ubuntu3_armhf.deb ... 101s Unpacking iptables (1.8.11-2ubuntu3) over (1.8.11-2ubuntu2) ... 101s Preparing to unpack .../1-libip4tc2_1.8.11-2ubuntu3_armhf.deb ... 101s Unpacking libip4tc2:armhf (1.8.11-2ubuntu3) over (1.8.11-2ubuntu2) ... 101s Preparing to unpack .../2-libip6tc2_1.8.11-2ubuntu3_armhf.deb ... 101s Unpacking libip6tc2:armhf (1.8.11-2ubuntu3) over (1.8.11-2ubuntu2) ... 101s Preparing to unpack .../3-libxtables12_1.8.11-2ubuntu3_armhf.deb ... 101s Unpacking libxtables12:armhf (1.8.11-2ubuntu3) over (1.8.11-2ubuntu2) ... 101s Preparing to unpack .../4-iproute2_6.18.0-1ubuntu1_armhf.deb ... 101s Unpacking iproute2 (6.18.0-1ubuntu1) over (6.16.0-1ubuntu3) ... 101s Preparing to unpack .../5-libcryptsetup12_2%3a2.8.0-1ubuntu3_armhf.deb ... 101s Unpacking libcryptsetup12:armhf (2:2.8.0-1ubuntu3) over (2:2.8.0-1ubuntu2) ... 101s Preparing to unpack .../6-wget_1.25.0-2ubuntu4_armhf.deb ... 101s Unpacking wget (1.25.0-2ubuntu4) over (1.25.0-2ubuntu3) ... 101s Preparing to unpack .../7-cryptsetup-bin_2%3a2.8.0-1ubuntu3_armhf.deb ... 101s Unpacking cryptsetup-bin (2:2.8.0-1ubuntu3) over (2:2.8.0-1ubuntu2) ... 101s Preparing to unpack .../8-dracut-install_109-11ubuntu1_armhf.deb ... 101s Unpacking dracut-install (109-11ubuntu1) over (109-9ubuntu1) ... 101s Setting up libip4tc2:armhf (1.8.11-2ubuntu3) ... 101s Setting up wget (1.25.0-2ubuntu4) ... 101s Setting up libip6tc2:armhf (1.8.11-2ubuntu3) ... 101s Setting up libxtables12:armhf (1.8.11-2ubuntu3) ... 101s Setting up dracut-install (109-11ubuntu1) ... 101s Setting up libcryptsetup12:armhf (2:2.8.0-1ubuntu3) ... 101s Setting up cryptsetup-bin (2:2.8.0-1ubuntu3) ... 101s Setting up iptables (1.8.11-2ubuntu3) ... 101s Setting up iproute2 (6.18.0-1ubuntu1) ... 101s Processing triggers for man-db (2.13.1-1build1) ... 102s Processing triggers for install-info (7.2-5) ... 102s Processing triggers for libc-bin (2.42-2ubuntu4) ... 105s Reading package lists... 105s Building dependency tree... 105s Reading state information... 105s Solving dependencies... 105s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 107s autopkgtest [18:42:17]: rebooting testbed after setup commands that affected boot 149s autopkgtest [18:42:59]: testbed running kernel: Linux 6.8.0-87-generic #88~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Oct 14 14:00:09 UTC 2 173s autopkgtest [18:43:23]: @@@@@@@@@@@@@@@@@@@@ apt-source rubocop 184s Get:1 http://ftpmaster.internal/ubuntu resolute/universe rubocop 1.39.0+dfsg-1build1 (dsc) [2425 B] 184s Get:2 http://ftpmaster.internal/ubuntu resolute/universe rubocop 1.39.0+dfsg-1build1 (tar) [1029 kB] 184s Get:3 http://ftpmaster.internal/ubuntu resolute/universe rubocop 1.39.0+dfsg-1build1 (diff) [11.1 kB] 184s gpgv: Signature made Fri Jan 9 19:37:41 2026 UTC 184s gpgv: using RSA key 25E3FF2D7F469DBE7D0D4E50AFCFEC8E669CE1C2 184s gpgv: Can't check signature: No public key 184s dpkg-source: warning: cannot verify inline signature for ./rubocop_1.39.0+dfsg-1build1.dsc: no acceptable signature found 184s autopkgtest [18:43:34]: testing package rubocop version 1.39.0+dfsg-1build1 186s autopkgtest [18:43:36]: build not needed 190s autopkgtest [18:43:40]: test gem2deb-test-runner: preparing testbed 192s Reading package lists... 192s Building dependency tree... 192s Reading state information... 192s Solving dependencies... 193s The following NEW packages will be installed: 193s gem2deb-test-runner libjs-jquery libjs-jquery-easing libjs-jquery-fancybox 193s libjs-jquery-mousewheel libjs-jquery-ui libruby libruby3.3 pry racc rake 193s rubocop ruby ruby-addressable ruby-ast ruby-coderay ruby-crack ruby-csv 193s ruby-did-you-mean ruby-diff-lcs ruby-docile ruby-hashdiff ruby-json 193s ruby-method-source ruby-minitest ruby-net-telnet ruby-parallel 193s ruby-power-assert ruby-progressbar ruby-public-suffix ruby-rainbow 193s ruby-regexp-parser ruby-rspec ruby-rspec-core ruby-rspec-expectations 193s ruby-rspec-mocks ruby-rspec-support ruby-rubocop-ast ruby-ruby2-keywords 193s ruby-rubygems ruby-simplecov ruby-simplecov-html ruby-test-unit 193s ruby-unicode-display-width ruby-webmock ruby-webrick ruby-whitequark-parser 193s ruby-xmlrpc ruby3.3 rubygems-integration 193s 0 upgraded, 50 newly installed, 0 to remove and 0 not upgraded. 193s Need to get 9525 kB of archives. 193s After this operation, 60.3 MB of additional disk space will be used. 193s Get:1 http://ftpmaster.internal/ubuntu resolute/main armhf rubygems-integration all 1.19build1 [5666 B] 193s Get:2 http://ftpmaster.internal/ubuntu resolute/main armhf ruby-csv all 3.3.4-1 [43.0 kB] 193s Get:3 http://ftpmaster.internal/ubuntu resolute/main armhf ruby-did-you-mean all 1.6.3-2build1 [14.9 kB] 193s Get:4 http://ftpmaster.internal/ubuntu resolute/main armhf ruby-net-telnet all 0.2.0-1build1 [13.5 kB] 193s Get:5 http://ftpmaster.internal/ubuntu resolute/main armhf ruby-ruby2-keywords all 0.0.5-1build1 [4398 B] 193s Get:6 http://ftpmaster.internal/ubuntu resolute/main armhf ruby-webrick all 1.9.1-1build1 [60.9 kB] 193s Get:7 http://ftpmaster.internal/ubuntu resolute/main armhf ruby-xmlrpc all 0.3.3-2build1 [24.9 kB] 193s Get:8 http://ftpmaster.internal/ubuntu resolute/main armhf libruby3.3 armhf 3.3.8-2ubuntu2 [5595 kB] 200s Get:9 http://ftpmaster.internal/ubuntu resolute/main armhf ruby3.3 armhf 3.3.8-2ubuntu2 [59.0 kB] 200s Get:10 http://ftpmaster.internal/ubuntu resolute/main armhf libruby armhf 1:3.3 [5162 B] 200s Get:11 http://ftpmaster.internal/ubuntu resolute/main armhf ruby-rubygems all 3.6.7-2ubuntu2 [332 kB] 200s Get:12 http://ftpmaster.internal/ubuntu resolute/main armhf ruby armhf 1:3.3 [3670 B] 200s Get:13 http://ftpmaster.internal/ubuntu resolute/main armhf rake all 13.2.1-1build1 [45.9 kB] 200s Get:14 http://ftpmaster.internal/ubuntu resolute/universe armhf ruby-minitest all 5.26.1-1 [49.3 kB] 200s Get:15 http://ftpmaster.internal/ubuntu resolute/universe armhf ruby-power-assert all 3.0.1-1 [11.4 kB] 200s Get:16 http://ftpmaster.internal/ubuntu resolute/universe armhf ruby-test-unit all 3.6.2-1 [67.0 kB] 201s Get:17 http://ftpmaster.internal/ubuntu resolute/universe armhf gem2deb-test-runner armhf 2.2.5 [18.3 kB] 201s Get:18 http://ftpmaster.internal/ubuntu resolute/main armhf libjs-jquery all 3.7.1+dfsg+~3.5.33-1build1 [321 kB] 201s Get:19 http://ftpmaster.internal/ubuntu resolute/universe armhf libjs-jquery-easing all 12-4build1 [7078 B] 201s Get:20 http://ftpmaster.internal/ubuntu resolute/universe armhf libjs-jquery-mousewheel all 1:3.1.13-5 [6324 B] 201s Get:21 http://ftpmaster.internal/ubuntu resolute/universe armhf libjs-jquery-fancybox all 12-4build1 [45.8 kB] 201s Get:22 http://ftpmaster.internal/ubuntu resolute/universe armhf libjs-jquery-ui all 1.13.2+dfsg-1build1 [251 kB] 201s Get:23 http://ftpmaster.internal/ubuntu resolute/universe armhf ruby-coderay all 1.1.3-8build1 [78.4 kB] 202s Get:24 http://ftpmaster.internal/ubuntu resolute/universe armhf ruby-method-source all 1.1.0-1 [8502 B] 202s Get:25 http://ftpmaster.internal/ubuntu resolute/universe armhf pry all 0.15.2-1 [122 kB] 202s Get:26 http://ftpmaster.internal/ubuntu resolute/universe armhf racc all 1.8.1-2 [71.5 kB] 202s Get:27 http://ftpmaster.internal/ubuntu resolute/main armhf ruby-json armhf 2.15.2+dfsg-1 [65.8 kB] 202s Get:28 http://ftpmaster.internal/ubuntu resolute/universe armhf ruby-progressbar all 1.11.0-1 [16.3 kB] 202s Get:29 http://ftpmaster.internal/ubuntu resolute/universe armhf ruby-parallel all 1.27.0-1 [13.5 kB] 202s Get:30 http://ftpmaster.internal/ubuntu resolute/universe armhf ruby-ast all 2.4.3-1 [10.8 kB] 202s Get:31 http://ftpmaster.internal/ubuntu resolute/universe armhf ruby-whitequark-parser all 3.3.4.2-2 [511 kB] 203s Get:32 http://ftpmaster.internal/ubuntu resolute/universe armhf ruby-rainbow all 3.1.1-1 [12.4 kB] 203s Get:33 http://ftpmaster.internal/ubuntu resolute-proposed/universe armhf ruby-regexp-parser all 2.11.3-1 [58.1 kB] 203s Get:34 http://ftpmaster.internal/ubuntu resolute/universe armhf ruby-rubocop-ast all 1.24.0-2 [50.3 kB] 203s Get:35 http://ftpmaster.internal/ubuntu resolute/universe armhf ruby-unicode-display-width all 1.6.1-1 [8904 B] 203s Get:36 http://ftpmaster.internal/ubuntu resolute/universe armhf rubocop all 1.39.0+dfsg-1build1 [455 kB] 203s Get:37 http://ftpmaster.internal/ubuntu resolute/universe armhf ruby-public-suffix all 6.0.2-1.1 [14.6 kB] 203s Get:38 http://ftpmaster.internal/ubuntu resolute/universe armhf ruby-addressable all 2.8.7-2 [55.4 kB] 203s Get:39 http://ftpmaster.internal/ubuntu resolute/universe armhf ruby-crack all 0.4.4-4 [8764 B] 203s Get:40 http://ftpmaster.internal/ubuntu resolute/universe armhf ruby-diff-lcs all 1.5.1-1 [22.8 kB] 203s Get:41 http://ftpmaster.internal/ubuntu resolute/universe armhf ruby-docile all 1.4.1-1 [7038 B] 203s Get:42 http://ftpmaster.internal/ubuntu resolute/universe armhf ruby-hashdiff all 1.2.1-1 [13.8 kB] 203s Get:43 http://ftpmaster.internal/ubuntu resolute/universe armhf ruby-rspec-support all 3.13.0c0e0m0s1-2 [29.2 kB] 203s Get:44 http://ftpmaster.internal/ubuntu resolute/universe armhf ruby-rspec-core all 3.13.0c0e0m0s1-2 [164 kB] 204s Get:45 http://ftpmaster.internal/ubuntu resolute/universe armhf ruby-rspec-expectations all 3.13.0c0e0m0s1-2 [89.8 kB] 204s Get:46 http://ftpmaster.internal/ubuntu resolute/universe armhf ruby-rspec-mocks all 3.13.0c0e0m0s1-2 [81.0 kB] 204s Get:47 http://ftpmaster.internal/ubuntu resolute/universe armhf ruby-rspec all 3.13.0c0e0m0s1-2 [3500 B] 204s Get:48 http://ftpmaster.internal/ubuntu resolute/universe armhf ruby-simplecov-html all 0.12.3-2 [477 kB] 204s Get:49 http://ftpmaster.internal/ubuntu resolute/universe armhf ruby-simplecov all 0.22.0-2 [40.9 kB] 204s Get:50 http://ftpmaster.internal/ubuntu resolute/universe armhf ruby-webmock all 3.25.1-1 [48.0 kB] 205s Fetched 9525 kB in 12s (818 kB/s) 205s Selecting previously unselected package rubygems-integration. 205s (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 ... 68686 files and directories currently installed.) 205s Preparing to unpack .../00-rubygems-integration_1.19build1_all.deb ... 205s Unpacking rubygems-integration (1.19build1) ... 205s Selecting previously unselected package ruby-csv. 205s Preparing to unpack .../01-ruby-csv_3.3.4-1_all.deb ... 205s Unpacking ruby-csv (3.3.4-1) ... 205s Selecting previously unselected package ruby-did-you-mean. 205s Preparing to unpack .../02-ruby-did-you-mean_1.6.3-2build1_all.deb ... 205s Unpacking ruby-did-you-mean (1.6.3-2build1) ... 205s Selecting previously unselected package ruby-net-telnet. 205s Preparing to unpack .../03-ruby-net-telnet_0.2.0-1build1_all.deb ... 205s Unpacking ruby-net-telnet (0.2.0-1build1) ... 205s Selecting previously unselected package ruby-ruby2-keywords. 205s Preparing to unpack .../04-ruby-ruby2-keywords_0.0.5-1build1_all.deb ... 205s Unpacking ruby-ruby2-keywords (0.0.5-1build1) ... 205s Selecting previously unselected package ruby-webrick. 205s Preparing to unpack .../05-ruby-webrick_1.9.1-1build1_all.deb ... 205s Unpacking ruby-webrick (1.9.1-1build1) ... 205s Selecting previously unselected package ruby-xmlrpc. 205s Preparing to unpack .../06-ruby-xmlrpc_0.3.3-2build1_all.deb ... 205s Unpacking ruby-xmlrpc (0.3.3-2build1) ... 205s Selecting previously unselected package libruby3.3:armhf. 205s Preparing to unpack .../07-libruby3.3_3.3.8-2ubuntu2_armhf.deb ... 205s Unpacking libruby3.3:armhf (3.3.8-2ubuntu2) ... 205s Selecting previously unselected package ruby3.3. 205s Preparing to unpack .../08-ruby3.3_3.3.8-2ubuntu2_armhf.deb ... 205s Unpacking ruby3.3 (3.3.8-2ubuntu2) ... 205s Selecting previously unselected package libruby:armhf. 205s Preparing to unpack .../09-libruby_1%3a3.3_armhf.deb ... 205s Unpacking libruby:armhf (1:3.3) ... 205s Selecting previously unselected package ruby-rubygems. 205s Preparing to unpack .../10-ruby-rubygems_3.6.7-2ubuntu2_all.deb ... 205s Unpacking ruby-rubygems (3.6.7-2ubuntu2) ... 205s Selecting previously unselected package ruby. 206s Preparing to unpack .../11-ruby_1%3a3.3_armhf.deb ... 206s Unpacking ruby (1:3.3) ... 206s Selecting previously unselected package rake. 206s Preparing to unpack .../12-rake_13.2.1-1build1_all.deb ... 206s Unpacking rake (13.2.1-1build1) ... 206s Selecting previously unselected package ruby-minitest. 206s Preparing to unpack .../13-ruby-minitest_5.26.1-1_all.deb ... 206s Unpacking ruby-minitest (5.26.1-1) ... 206s Selecting previously unselected package ruby-power-assert. 206s Preparing to unpack .../14-ruby-power-assert_3.0.1-1_all.deb ... 206s Unpacking ruby-power-assert (3.0.1-1) ... 206s Selecting previously unselected package ruby-test-unit. 206s Preparing to unpack .../15-ruby-test-unit_3.6.2-1_all.deb ... 206s Unpacking ruby-test-unit (3.6.2-1) ... 206s Selecting previously unselected package gem2deb-test-runner. 206s Preparing to unpack .../16-gem2deb-test-runner_2.2.5_armhf.deb ... 206s Unpacking gem2deb-test-runner (2.2.5) ... 206s Selecting previously unselected package libjs-jquery. 206s Preparing to unpack .../17-libjs-jquery_3.7.1+dfsg+~3.5.33-1build1_all.deb ... 206s Unpacking libjs-jquery (3.7.1+dfsg+~3.5.33-1build1) ... 206s Selecting previously unselected package libjs-jquery-easing. 206s Preparing to unpack .../18-libjs-jquery-easing_12-4build1_all.deb ... 206s Unpacking libjs-jquery-easing (12-4build1) ... 206s Selecting previously unselected package libjs-jquery-mousewheel. 206s Preparing to unpack .../19-libjs-jquery-mousewheel_1%3a3.1.13-5_all.deb ... 206s Unpacking libjs-jquery-mousewheel (1:3.1.13-5) ... 206s Selecting previously unselected package libjs-jquery-fancybox. 206s Preparing to unpack .../20-libjs-jquery-fancybox_12-4build1_all.deb ... 206s Unpacking libjs-jquery-fancybox (12-4build1) ... 206s Selecting previously unselected package libjs-jquery-ui. 206s Preparing to unpack .../21-libjs-jquery-ui_1.13.2+dfsg-1build1_all.deb ... 206s Unpacking libjs-jquery-ui (1.13.2+dfsg-1build1) ... 206s Selecting previously unselected package ruby-coderay. 206s Preparing to unpack .../22-ruby-coderay_1.1.3-8build1_all.deb ... 206s Unpacking ruby-coderay (1.1.3-8build1) ... 206s Selecting previously unselected package ruby-method-source. 206s Preparing to unpack .../23-ruby-method-source_1.1.0-1_all.deb ... 206s Unpacking ruby-method-source (1.1.0-1) ... 206s Selecting previously unselected package pry. 206s Preparing to unpack .../24-pry_0.15.2-1_all.deb ... 206s Unpacking pry (0.15.2-1) ... 206s Selecting previously unselected package racc. 206s Preparing to unpack .../25-racc_1.8.1-2_all.deb ... 206s Unpacking racc (1.8.1-2) ... 206s Selecting previously unselected package ruby-json:armhf. 206s Preparing to unpack .../26-ruby-json_2.15.2+dfsg-1_armhf.deb ... 206s Unpacking ruby-json:armhf (2.15.2+dfsg-1) ... 206s Selecting previously unselected package ruby-progressbar. 206s Preparing to unpack .../27-ruby-progressbar_1.11.0-1_all.deb ... 206s Unpacking ruby-progressbar (1.11.0-1) ... 206s Selecting previously unselected package ruby-parallel. 206s Preparing to unpack .../28-ruby-parallel_1.27.0-1_all.deb ... 206s Unpacking ruby-parallel (1.27.0-1) ... 206s Selecting previously unselected package ruby-ast. 206s Preparing to unpack .../29-ruby-ast_2.4.3-1_all.deb ... 206s Unpacking ruby-ast (2.4.3-1) ... 206s Selecting previously unselected package ruby-whitequark-parser. 206s Preparing to unpack .../30-ruby-whitequark-parser_3.3.4.2-2_all.deb ... 206s Unpacking ruby-whitequark-parser (3.3.4.2-2) ... 206s Selecting previously unselected package ruby-rainbow. 206s Preparing to unpack .../31-ruby-rainbow_3.1.1-1_all.deb ... 206s Unpacking ruby-rainbow (3.1.1-1) ... 207s Selecting previously unselected package ruby-regexp-parser. 207s Preparing to unpack .../32-ruby-regexp-parser_2.11.3-1_all.deb ... 207s Unpacking ruby-regexp-parser (2.11.3-1) ... 207s Selecting previously unselected package ruby-rubocop-ast. 207s Preparing to unpack .../33-ruby-rubocop-ast_1.24.0-2_all.deb ... 207s Unpacking ruby-rubocop-ast (1.24.0-2) ... 207s Selecting previously unselected package ruby-unicode-display-width. 207s Preparing to unpack .../34-ruby-unicode-display-width_1.6.1-1_all.deb ... 207s Unpacking ruby-unicode-display-width (1.6.1-1) ... 207s Selecting previously unselected package rubocop. 207s Preparing to unpack .../35-rubocop_1.39.0+dfsg-1build1_all.deb ... 207s Unpacking rubocop (1.39.0+dfsg-1build1) ... 207s Selecting previously unselected package ruby-public-suffix. 207s Preparing to unpack .../36-ruby-public-suffix_6.0.2-1.1_all.deb ... 207s Unpacking ruby-public-suffix (6.0.2-1.1) ... 207s Selecting previously unselected package ruby-addressable. 207s Preparing to unpack .../37-ruby-addressable_2.8.7-2_all.deb ... 207s Unpacking ruby-addressable (2.8.7-2) ... 207s Selecting previously unselected package ruby-crack. 207s Preparing to unpack .../38-ruby-crack_0.4.4-4_all.deb ... 207s Unpacking ruby-crack (0.4.4-4) ... 207s Selecting previously unselected package ruby-diff-lcs. 207s Preparing to unpack .../39-ruby-diff-lcs_1.5.1-1_all.deb ... 207s Unpacking ruby-diff-lcs (1.5.1-1) ... 207s Selecting previously unselected package ruby-docile. 207s Preparing to unpack .../40-ruby-docile_1.4.1-1_all.deb ... 207s Unpacking ruby-docile (1.4.1-1) ... 207s Selecting previously unselected package ruby-hashdiff. 207s Preparing to unpack .../41-ruby-hashdiff_1.2.1-1_all.deb ... 207s Unpacking ruby-hashdiff (1.2.1-1) ... 207s Selecting previously unselected package ruby-rspec-support. 207s Preparing to unpack .../42-ruby-rspec-support_3.13.0c0e0m0s1-2_all.deb ... 207s Unpacking ruby-rspec-support (3.13.0c0e0m0s1-2) ... 207s Selecting previously unselected package ruby-rspec-core. 207s Preparing to unpack .../43-ruby-rspec-core_3.13.0c0e0m0s1-2_all.deb ... 207s Unpacking ruby-rspec-core (3.13.0c0e0m0s1-2) ... 207s Selecting previously unselected package ruby-rspec-expectations. 207s Preparing to unpack .../44-ruby-rspec-expectations_3.13.0c0e0m0s1-2_all.deb ... 207s Unpacking ruby-rspec-expectations (3.13.0c0e0m0s1-2) ... 207s Selecting previously unselected package ruby-rspec-mocks. 207s Preparing to unpack .../45-ruby-rspec-mocks_3.13.0c0e0m0s1-2_all.deb ... 207s Unpacking ruby-rspec-mocks (3.13.0c0e0m0s1-2) ... 207s Selecting previously unselected package ruby-rspec. 207s Preparing to unpack .../46-ruby-rspec_3.13.0c0e0m0s1-2_all.deb ... 207s Unpacking ruby-rspec (3.13.0c0e0m0s1-2) ... 207s Selecting previously unselected package ruby-simplecov-html. 207s Preparing to unpack .../47-ruby-simplecov-html_0.12.3-2_all.deb ... 207s Unpacking ruby-simplecov-html (0.12.3-2) ... 207s Selecting previously unselected package ruby-simplecov. 207s Preparing to unpack .../48-ruby-simplecov_0.22.0-2_all.deb ... 207s Unpacking ruby-simplecov (0.22.0-2) ... 207s Selecting previously unselected package ruby-webmock. 207s Preparing to unpack .../49-ruby-webmock_3.25.1-1_all.deb ... 207s Unpacking ruby-webmock (3.25.1-1) ... 207s Setting up ruby-rainbow (3.1.1-1) ... 207s Setting up ruby-ruby2-keywords (0.0.5-1build1) ... 207s Setting up ruby-regexp-parser (2.11.3-1) ... 207s Setting up ruby-power-assert (3.0.1-1) ... 207s Setting up ruby-hashdiff (1.2.1-1) ... 207s Setting up ruby-public-suffix (6.0.2-1.1) ... 207s Setting up libjs-jquery-mousewheel (1:3.1.13-5) ... 207s Setting up rubygems-integration (1.19build1) ... 207s Setting up ruby-minitest (5.26.1-1) ... 207s Setting up ruby-method-source (1.1.0-1) ... 207s Setting up ruby-test-unit (3.6.2-1) ... 207s Setting up ruby-ast (2.4.3-1) ... 207s Setting up ruby-net-telnet (0.2.0-1build1) ... 207s Setting up ruby-csv (3.3.4-1) ... 207s Setting up ruby-rspec-support (3.13.0c0e0m0s1-2) ... 207s Setting up ruby-webrick (1.9.1-1build1) ... 207s Setting up ruby-progressbar (1.11.0-1) ... 207s Setting up ruby-docile (1.4.1-1) ... 207s Setting up libjs-jquery (3.7.1+dfsg+~3.5.33-1build1) ... 207s Setting up ruby-did-you-mean (1.6.3-2build1) ... 207s Setting up ruby-xmlrpc (0.3.3-2build1) ... 207s Setting up libjs-jquery-easing (12-4build1) ... 207s Setting up ruby-addressable (2.8.7-2) ... 207s Setting up libjs-jquery-fancybox (12-4build1) ... 207s Setting up ruby-parallel (1.27.0-1) ... 207s Setting up libjs-jquery-ui (1.13.2+dfsg-1build1) ... 207s Setting up rake (13.2.1-1build1) ... 207s Setting up libruby3.3:armhf (3.3.8-2ubuntu2) ... 207s Setting up ruby-rubygems (3.6.7-2ubuntu2) ... 207s Setting up ruby3.3 (3.3.8-2ubuntu2) ... 207s Setting up libruby:armhf (1:3.3) ... 207s Setting up ruby (1:3.3) ... 207s Setting up racc (1.8.1-2) ... 207s Setting up ruby-json:armhf (2.15.2+dfsg-1) ... 207s Setting up ruby-coderay (1.1.3-8build1) ... 207s Setting up ruby-rspec-core (3.13.0c0e0m0s1-2) ... 207s Setting up ruby-unicode-display-width (1.6.1-1) ... 207s Setting up pry (0.15.2-1) ... 207s Setting up ruby-diff-lcs (1.5.1-1) ... 207s Setting up ruby-whitequark-parser (3.3.4.2-2) ... 207s Setting up ruby-simplecov-html (0.12.3-2) ... 207s Setting up ruby-crack (0.4.4-4) ... 207s Setting up gem2deb-test-runner (2.2.5) ... 207s Setting up ruby-rubocop-ast (1.24.0-2) ... 207s Setting up ruby-simplecov (0.22.0-2) ... 207s Setting up ruby-rspec-expectations (3.13.0c0e0m0s1-2) ... 207s Setting up rubocop (1.39.0+dfsg-1build1) ... 207s Setting up ruby-rspec-mocks (3.13.0c0e0m0s1-2) ... 207s Setting up ruby-webmock (3.25.1-1) ... 207s Setting up ruby-rspec (3.13.0c0e0m0s1-2) ... 207s Processing triggers for libc-bin (2.42-2ubuntu4) ... 207s Processing triggers for man-db (2.13.1-1build1) ... 215s autopkgtest [18:44:05]: test gem2deb-test-runner: gem2deb-test-runner --autopkgtest --check-dependencies 2>&1 215s autopkgtest [18:44:05]: test gem2deb-test-runner: [----------------------- 217s 217s ┌──────────────────────────────────────────────────────────────────────────────┐ 217s │ Checking Rubygems dependency resolution on ruby3.3 │ 217s └──────────────────────────────────────────────────────────────────────────────┘ 217s 217s RUBYLIB=. GEM_PATH= ruby3.3 -e gem\ \"rubocop\" 217s mv lib ./.gem2deb.lib 217s mv ./.gem2deb.lib lib 217s 217s ┌──────────────────────────────────────────────────────────────────────────────┐ 217s │ Run tests for ruby3.3 from debian/ruby-tests.rake │ 217s └──────────────────────────────────────────────────────────────────────────────┘ 217s 217s RUBYLIB=. GEM_PATH= ruby3.3 -S rake --rakelibdir /gem2deb-nonexistent -f debian/ruby-tests.rake 217s mv lib ./.gem2deb.lib 218s /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 223s 223s Randomized with seed 59169 223s 223s RuboCop::Cop::Layout::EmptyLinesAroundMethodBody 223s registers an offense for class method body starting with a blank 223s registers an offense for method body starting with a blank 223s registers an offense for class method body ending with a blank 223s is not fooled by single line methods 223s registers an offense for method body ending with a blank 223s accepts method body starting with a line with spaces 223s 223s RuboCop::Cop::Lint::UselessSetterCall 223s accepts exception assignments without exploding 223s is not confused by operators ending with = 223s with method ending with setter call on argument 223s accepts 223s when a lvar does not contain any object passed as argument by binary-operator-assignment at the end of the method 223s registers an offense and corrects 223s with method ending with setter call on ivar 223s accepts 223s when a lvar contains a non-local object returned by a method 223s accepts 223s when a lvar contains an object passed as argument by multiple-assignment at the end of the method 223s accepts the setter call on the lvar 223s with singleton method ending with setter call on local object 223s registers an offense and corrects 223s when a lvar contains a local object instantiated with literal 223s registers an offense and corrects for the setter call on the lvar 223s with method ending with setter call on local object 223s registers an offense and corrects 223s when a lvar declared as an argument is no longer the passed object at the end of the method 223s registers an offense and corrects for the setter call on the lvar 223s when a lvar does not contain any object passed as argument with multiple-assignment at the end of the method 223s registers an offense and corrects 223s when a lvar contains an object passed as argument at the end of the method 223s accepts the setter call on the lvar 223s with method ending with square bracket setter on local object 223s registers an offense and corrects 223s when a lvar possibly contains an object passed as argument by logical-operator-assignment at the end of the method 223s accepts the setter call on the lvar 223s with method ending with ivar assignment 223s accepts 223s 223s RuboCop::Cop::Layout::EmptyLinesAroundModuleBody 223s when EnforcedStyle is empty_lines_special 223s when first child is NOT a method 223s 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 223s source with comment before method definition 223s registers an offense for module beginning with a blank line 223s source without blank lines 223s registers an offense for module not ending with a blank line 223s when module has a namespace 223s 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 223s source with blank lines 224s registers and autocorrects the offenses 224s source without blank lines 224s registers and autocorrects the offenses 224s source with constants 224s registers and autocorrects the offenses 224s source with blank lines 224s registers an offense for module beginning with a blank line 224s module with only constants 224s registers and autocorrects the offenses 224s when namespace has multiple children 224s requires empty lines for namespace 224s module with constant and child module 224s registers and autocorrects the offenses 224s when first child is an access modifier 224s with blank lines at the beginning and ending of module body 224s registers no offense 224s with no blank lines at the beginning and ending of module body 224s registers and corrects an offense 224s module with empty body 224s without empty line 224s does NOT register offenses 224s with empty line 224s does NOT register offenses 224s when first child is a method 224s requires blank line at the beginning and ending of module body 224s when module has a namespace 224s requires no empty lines for namespace but requires blank line at the beginning and ending of module body 224s source without blank lines 224s registers and autocorrects the offenses 224s source with blank lines 224s autocorrects the offenses 224s source without blank lines 224s registers an offense for module not beginning and ending with a blank line 224s when EnforcedStyle is no_empty_lines 224s registers an offense for module body ending with a blank 224s autocorrects beginning and end 224s registers an offense for module body starting with a blank 224s when EnforcedStyle is empty_lines 224s registers an offense for module body not ending with a blank 224s autocorrects beginning and end 224s accepts modules with an empty body 224s registers an offense for module body not starting or ending with a blank 224s when EnforcedStyle is empty_lines_except_namespace 224s when has multiple child modules 224s registers offenses for namespace body starting and ending without a blank 224s requires empty lines for namespace 224s when only child is class 224s requires no empty lines for namespace 224s registers offense for namespace body starting with a blank 224s registers offense for namespace body ending with a blank 224s when only child is module 224s autocorrects beginning and end 224s registers offense for namespace body ending with a blank 224s requires no empty lines for namespace 224s registers offense for namespace body starting with a blank 224s registers offenses for namespaced module body not starting with a blank 224s registers offenses for namespaced module body not ending with a blank 224s 224s RuboCop::Formatter::GitHubActionsFormatter 224s #finished 224s when file is relative to the current directory 224s reports offenses as error with the relative path 224s when offenses are detected 224s reports offenses as errors 224s when message contains % 224s escapes message 224s when fail level is defined 224s reports offenses below fail level as warnings 224s reports offenses above or at fail level as errors 224s when no offenses are detected 224s does not print anything 224s 224s RuboCop::Cop::Style::NonNilCheck 224s when allowing semantic changes 224s does not blow up when autocorrecting implicit receiver 224s does not register an offense for `!x` 224s registers an offense for `not x.nil?` 224s does not blow up with ternary operators 224s does not register an offense for `x.nil?` 224s corrects code that would not be modified if IncludeSemanticChanges were false 224s registers an offense for unless x.nil? 224s autocorrects by changing `x != nil` to `x` 224s registers an offense for `!x.nil?` 224s when not allowing semantic changes 224s does not register an offense if last expression in predicate 224s does not register an offense if last expression in class predicate 224s does not register an offense for != 0 224s does not register an offense if only expression in class predicate 224s does not register an offense with implicit receiver 224s does not register an offense for not x.nil? 224s registers an offense for != nil 224s does not register an offense for !x.nil? 224s registers an offense but does not correct when the code was not modified 224s does not register an offense if only expression in predicate 224s when `EnforcedStyle: comparison` of `Style/NilComparison` cop 224s `IncludeSemanticChanges: false` 224s does not register an offense for `foo != nil` 224s `IncludeSemanticChanges: true` 224s registers an offense for `foo != nil` 224s 224s RuboCop::Cop::Style::NilLambda 224s block lambda 224s registers an offense when returning nil with `next` 224s registers an offense when returning nil with `break` 224s registers an offense when returning nil with `return` 224s properly corrects single line 224s does not register an offense when doing more than returning nil 224s registers an offense when returning nil implicitly 224s does not remove block params or change spacing 224s does not register an offense when not returning nil 224s Proc.new 224s does not register an offense when not returning nil 224s registers an offense when returning nil with `break` 224s properly corrects single line 224s registers an offense when returning nil with `return` 224s registers an offense when returning nil with `next` 224s registers an offense when returning nil implicitly 224s does not remove block params or change spacing 224s does not register an offense when doing more than returning nil 224s proc 224s registers an offense when returning nil with `return` 224s properly corrects single line 224s does not remove block params or change spacing 224s registers an offense when returning nil implicitly 224s does not register an offense when doing more than returning nil 224s does not register an offense when not returning nil 224s registers an offense when returning nil with `next` 224s registers an offense when returning nil with `break` 224s stabby lambda 224s registers an offense when returning nil with `next` 224s does not register an offense when not returning nil 224s properly corrects multiline 224s does not register an offense when doing more than returning nil 224s registers an offense when returning nil implicitly 224s registers an offense when returning nil with `return` 224s registers an offense when returning nil with `break` 224s 224s RuboCop::Cop::Layout::IndentationConsistency 224s with unless 224s registers an offense and corrects bad indentation in an unless body 224s accepts an empty unless 224s with top-level code 224s registers and corrects an offense when using access modifier and indented method definition at the top level 224s accepts when using access modifier at the top level 224s accepts an empty expression string interpolation 224s with if statement 224s registers an offense and corrects bad indentation in an if body 224s accepts if/elsif/else/end laid out as a table 224s accepts an empty if 224s accepts if/elsif/else/end with fullwidth characters 224s accepts an if in assignment with end aligned with if 224s accepts an if/else branches with rescue clauses 224s accepts an if/else in assignment with end aligned with variable 224s registers an offense and corrects bad indentation in an else body 224s accepts an if/else in assignment on next line with end aligned with if 224s accepts if/then/else/end laid out as another table 224s registers an offense and corrects bad indentation in an elsif body 224s accepts a one line if statement 224s accepts an if/else in assignment with end aligned with if 224s accepts an if/else in assignment with end aligned with variable and chaining with a block after the end 224s accepts an if/else in assignment with end aligned with variable and chaining after the end 224s accepts a correctly aligned if/elsif/else/end 224s accepts an if in assignment with end aligned with variable 224s with module 224s registers an offense and corrects bad indentation of private methods 224s accepts an empty module body 224s registers an offense and corrects bad indentation in a module body 224s even when there are no public methods 224s registers an offense and corrects bad indentation of private methods 224s with def/defs 224s registers an offense and corrects bad indentation in a defs body 224s registers an offense and corrects bad indentation in a def body 224s accepts an empty defs body 224s accepts an empty def body 224s with for 224s registers an offense and corrects bad indentation in a for body 224s accepts an empty for 224s with case 224s accepts indented when/else plus indented body 224s registers an offense and corrects bad indentation in a case/when body 224s registers an offense and corrects bad indentation in a case/else body 224s accepts case/when/else with then beginning a line 224s accepts case/when/else laid out as a table 224s accepts correctly indented case/when/else 224s with class 224s with indented_internal_methods style configured 224s accepts different indentation in different visibility sections 224s accepts different indentation in different visibility sections when using `Struct.new` 224s with normal style configured 224s accepts indented public, protected, and private 224s registers an offense and corrects bad indentation in def but not for outdented public, protected, and private 224s registers an offense and corrects bad indentation in a class body 224s accepts an empty class body 224s with block 224s does not autocorrect an offense within another offense 224s accepts a correctly indented block body 224s accepts an empty block body 224s registers an offense and correct bad indentation in a do/end body 224s registers an offense and corrects bad indentation in a {} body 224s with while/until 224s registers an offense and corrects bad indentation in an until body 224s registers an offense and corrects bad indentation in a while body 224s registers an offense and corrects bad indentation in begin/end/while 224s accepts an empty while 224s 224s RuboCop::Cop::Layout::FirstMethodArgumentLineBreak 224s registers an offense and corrects hash arg spanning multiple lines 224s registers an offense and corrects hash arg without a line break before the first pair 224s ignores arguments listed on a single line 224s ignores arguments without parens 224s ignores kwargs listed on a single line when the arguments are used in `super` 224s ignores methods without arguments 224s args listed on the first line 224s registers an offense and corrects using safe navigation operator 224s registers an offense and corrects 224s registers an offense and corrects using `super` 224s 224s RuboCop::CLI --disable-uncorrectable 224s --disable-uncorrectable 224s does not disable anything for cops that support autocorrect 224s if a one-line disable statement doesn't fit 224s adds before-and-after disable statement 224s and the offense is inside a heredoc 225s adds before-and-after disable statement around the heredoc 225s if one one-line disable statement fits 225s adds it 225s adds it when the cop supports autocorrect but does not correct the offense 225s but there are more offenses on the line and they don't all fit 225s adds both one-line and before-and-after disable statements 225s and there are two offenses of the same kind on one line 225s adds a single one-line disable statement 225s when exist offense for Layout/SpaceInsideArrayLiteralBrackets 225s when `EnforcedStyle: space` 226s does not disable anything for cops that support autocorrect 226s when `EnforcedStyle: no_space` 226s does not disable anything for cops that support autocorrect 226s 226s RuboCop::Cop::Style::HashTransformKeys 226s when using Ruby 2.6 or newer 226s does not flag `_.to_h{...}` when both key & value are transformed 226s flags _.to_h{...} when transform_keys could be used 226s does not flag `_.to_h{...}` when its receiver is `zip` 226s does not flag `_.to_h{...}` when its receiver is `each_with_index` 226s does not flag `_.to_h{...}` when its receiver is `with_index` 226s does not flag `_.to_h{...}` when its receiver is an array literal 226s does not flag _.to_h {...} when key block argument is unused 226s below Ruby 2.6 226s does not flag _.to_h{...} 226s below Ruby 2.5 226s does not flag even if transform_keys could be used 226s when using Ruby 2.5 or newer 226s does not flag `each_with_object` when its receiver is `zip` 226s correctly autocorrects Hash[_.map{...}] 226s correctly autocorrects _.map{...}.to_h without block 226s does not flag `Hash[_.map{...}]` when its receiver is `zip` 226s does not flag `each_with_object` when its argument is used in the key 226s does not flag each_with_object when key transformation uses value 226s does not flag each_with_object when its argument is not modified 226s flags _.map{...}.to_h when transform_keys could be used when line break before `to_h` 226s does not flag `Hash[_.map{...}]` when its receiver is `with_index` 226s flags _.map {...}.to_h when transform_keys could be used when wrapped in another block 226s correctly autocorrects _.map{...}.to_h with block 226s does not flag `_.map{...}.to_h` when its receiver is `with_index` 226s does not flag _.map{...}.to_h when both key & value are transformed 226s does not flag `Hash[_.map{...}]` when its receiver is `each_with_index` 226s does not flag `_.map{...}.to_h` when its receiver is `each_with_index` 226s does not flag each_with_object when both key & value are transformed 226s does not flag each_with_object when no transformation occurs 226s does not flag `each_with_object` when its receiver is `each_with_index` 226s does not flag key transformation when receiver is array literal 226s does not flag `Hash[_.map{...}]` when its receiver is an array literal 226s flags _.map{...}.to_h when transform_keys could be used 226s does not flag `each_with_object` when its receiver is `with_index` 226s does not flag `_.map{...}.to_h` when its receiver is `zip` 226s flags Hash[_.map{...}] when transform_keys could be used 226s does not flag key transformation in the absence of to_h 226s does not flag Hash[_.map{...}] when both key & value are transformed 226s does not flag each_with_object when its receiver is array literal 226s does not flag _.map {...}.to_h when key block argument is unused 226s with inline block 226s flags each_with_object when transform_keys could be used 226s with safe navigation operator 226s flags each_with_object when transform_keys could be used 226s with multiline block 226s flags each_with_object when transform_keys could be used 226s 226s RuboCop::Cop::Style::RandomWithOffset 226s does not register an offense when using offset - rand(erange) with a non-integer range value 226s registers an offense when using rand(int) - offset 226s registers an offense when using ::Kernel.rand 226s registers an offense when using offset + Random.rand(int) 226s registers an offense when using rand(erange).succ 226s does not register an offense when using range with triple dots 226s registers an offense when using ::Random.rand(int).pred 226s registers an offense when using rand(irange).succ 226s registers an offense when using rand(irange) - offset 226s registers an offense when using Random.rand(int).succ 226s registers an offense when using Kernel.rand 226s registers an offense when using rand(erange) - offset 226s registers an offense when using rand(int) + offset 226s registers an offense when using rand(erange) + offset 226s registers an offense when using offset + rand(int) 226s registers an offense when using offset - rand(int) 226s does not register an offense when using rand(erange).pred with a non-integer range value 226s registers an offense when using Random.rand 226s registers an offense when using rand(int).pred 226s registers an offense when using ::Random.rand 226s registers an offense when using offset - rand(irange) 226s registers an offense when using offset - rand(erange) 226s registers an offense when using rand(int).succ 226s registers an offense when using offset - ::Random.rand(int) 226s does not register an offense when using rand(irange).succ with a non-integer range value 226s registers an offense when using rand(int).next 226s registers an offense when using rand(irange) + offset 226s does not register an offense when using rand(irange) + offset with a non-integer range value 226s does not register an offense when using range with double dots 226s 226s RuboCop::Cop::Style::BeginBlock 226s reports an offense for a BEGIN block 226s 226s RuboCop::Runner 226s #run with cops autocorrecting each-other 226s with two conflicting cops 226s if there are multiple offenses in an inspected file 226s aborts because of an infinite loop 226s if there is an offense in an inspected file 226s aborts because of an infinite loop 226s with two pairs of conflicting cops 226s with display options 226s --display-only-correctable 226s ommits uncorrectable `Layout/LineLength` 226s returns false 226s --display-only-safe-correctable 226s ommits unsafe correctable `Style/FrozenStringLiteral` 226s returns false 226s with three cop cycle 226s if there is an offense in an inspected file 226s aborts because of an infinite loop 226s if there is an offense in an inspected file 226s aborts because of an infinite loop 226s #run when interrupted 226s with SIGINT 227s returns false 227s #run 227s if a cop crashes 227s does not call ResultCache#save 227s if there are no offenses in inspected files 227s returns true 227s if there is an offense in an inspected file 227s sends the offense to a formatter 227s returns false 227s if -s/--stdin is used with an offense 227s returns false 227s sends the offense to a formatter 227s 227s RuboCop::Cop::Style::IpAddresses 227s does not register an offense on an empty string 227s IPv4 227s does not register an offense for an invalid address 227s does not register an offense for an address inside larger text 227s registers an offense for a valid address 227s with allowed addresses 227s does not register an offense for a allowed addresses 227s does not register an offense if the case differs 227s IPv6 227s registers an offense for a shortened address 227s registers an offense for the loopback address 227s does not register an offense for an invalid address 227s registers an offense for a very short address 227s registers an offense for an address with 0s collapsed 227s registers an offense for a valid address 227s the unspecified address :: (shortform of 0:0:0:0:0:0:0:0) 227s does not register an offense 227s when it is removed from the allowed addresses 227s registers an offense 227s 227s RuboCop::Cop::Style::EachWithObject 227s correctly autocorrects with return value only 227s correctly autocorrects 227s ignores inject and reduce passed in symbol 227s finds inject and reduce with passed in and returned hash 227s does not blow up for reduce with no arguments 227s ignores inject and reduce with condition as body 227s ignores inject and reduce with empty body 227s ignores inject/reduce with assignment to accumulator param in block 227s ignores inject and reduce with passed in, but not returned hash 227s Ruby 2.7 227s finds inject and reduce with passed in and returned hash and numblock 227s when a simple literal is passed as initial value 227s ignores inject/reduce 227s 227s RuboCop::Cop::Layout::BlockEndNewline 227s registers an offense and corrects when a multiline block ends with a method call with hash arguments 227s accepts a one-liner 227s registers an offense and corrects when multiline block end is not on its own line 227s registers an offense and corrects when `}` of multiline block without processing is not on its own line 227s registers an offense and corrects when multiline block `}` is not on its own line 227s registers an offense and corrects when multiline block `}` is not on its own line and using multiple heredoc arguments 227s registers an offense and corrects when multiline block `}` is not on its own line and using heredoc argument with method chain 227s registers an offense and corrects when multiline block `}` is not on its own line and using multiple heredoc argument method chain 227s registers an offense and corrects when multiline block `}` is not on its own line and using heredoc argument 227s registers an offense and corrects when multiline block `}` is not on its own line and using method chain 227s registers an offense and corrects when a multiline block ends with a hash 227s accepts multiline blocks with newlines before the end 227s Ruby 2.7 227s registers an offense and corrects when multiline block `}` is not on its own line and using method chain 227s registers an offense and corrects when multiline block `}` is not on its own line and using heredoc argument 227s 227s RuboCop::Cop::Style::CombinableLoops 227s when for loop 227s registers an offense when looping over the same data as previous loop 227s does not register an offense when each branch contains the same single loop over the same collection 227s does not register an offense when the same loop method is used over different collections 227s does not register an offense when the same loops are interleaved with some code 227s when looping method 227s does not register an offense when the same loop method is used over different collections 227s does not register an offense when the same loops are interleaved with some code 227s does not register an offense for when the same method with different arguments 227s does not register an offense when different loop methods are used over the same collection 227s registers an offense when looping over the same data as previous loop 227s does not register an offense when each branch contains the same single loop over the same collection 227s does not register an offense for when the same method with different arguments and safe navigation 227s Ruby 2.7 227s registers an offense when looping over the same data as previous loop in numblocks 227s 227s RuboCop::Formatter::PacmanFormatter 227s #step 227s character is Pacman 227s removes the first • and puts a ᗧ 227s character is ghost 227s removes the first • and puts a ghosts 227s character is a Pacdot 227s leaves the progress_line as it is 227s character is normal dot 227s removes the first • and puts a . 227s #next_step 227s when no offenses are detected 227s calls the step function with a dot 227s when a offense is detected in a file 227s calls the step function with a dot 227s #update_progress_line 227s when total_files less than columns in the terminal 227s updates the progress_line properly 227s when total_files is greater than columns in the terminal 227s updates the progress_line properly 227s when need to change the line 227s updates the progress_line properly 227s 227s RuboCop::StringInterpreter 227s .interpret 227s handles extended unicode 227s handles hex 227s handles octal 227s handles unicode 227s behaves like simple escape 227s handles \\v 227s behaves like simple escape 227s handles \\a 227s behaves like simple escape 227s handles \\f 227s behaves like simple escape 227s handles \\r 227s behaves like simple escape 227s handles \\b 227s behaves like simple escape 227s handles \\s 227s behaves like simple escape 227s handles \\t 227s behaves like simple escape 227s handles \\e 227s behaves like simple escape 227s handles \\n 227s 227s RuboCop::Cop::Layout::MultilineBlockLayout 227s autocorrects nested parens correctly 227s registers an offense and corrects a do/end block with a mult-line body 227s registers an offense and corrects a line-break within arguments 227s registers an offense and corrects for missing newline in {} block w/o params 227s registers an offense and corrects for missing newline before opening parenthesis `(` for block body 227s does not register offenses when there is a newline for {} block 227s does not register offenses when there is a newline for do/end block 227s considers the extra space required to join the lines together 227s registers an offense and corrects for missing newline in do/end block with params 227s doesn't move end keyword in a way which causes infinite loop in combination with Style/BlockEndNewLine 227s does not register an offense for one-line {} blocks 227s registers an offense and corrects a line break within destructured arguments 227s does not error out when the block is empty 227s registers an offense and corrects for missing newline in {} block with params 227s does not register offenses when there are too many parameters to fit on one line 227s registers offenses and corrects for lambdas 227s registers an offense for missing newline in do/end block w/o params 227s does not register an offense for one-line do/end blocks 227s registers an offense and corrects line-break before arguments 227s autocorrects in more complex case with lambda and assignment, and aligns the next line two spaces out from the start of the block 227s registers offenses and corrects for new lambda literal syntax 227s registers an offense and corrects line-break before arguments with empty block 227s registers an offense and corrects line-break within arguments 227s does not remove a trailing comma when only one argument is present 227s registers offenses when there are not too many parameters to fit on one line 227s Ruby 2.7 227s registers an offense and corrects for missing newline in do/end block with params 227s registers an offense and corrects for missing newline in {} block w/o params 227s 227s RuboCop::Cop::Style::ClassAndModuleChildren 227s nested style 227s accepts nested children 227s accepts cbase module name 227s preserves comments 227s registers an offense for not nested classes when namespace is defined as a module 227s registers an offense for not nested classes 227s accepts :: in parent class on inheritance 227s registers an offense for partially nested classes 227s registers an offense for not nested modules 227s registers an offense for not nested classes when namespace is defined as a class 227s accepts cbase class name 227s registers an offense for not nested classes with explicit superclass 227s registers an offense for partially nested modules 227s compact style 227s registers and offense for deeply nested children 227s registers an offense for modules with partially nested children 227s accepts nesting for classes/modules with more than one child 227s correctly indents heavily nested children 227s accepts class/module with single method 227s registers a offense for modules with nested children 227s registers a offense for classes with nested one-liner children 227s accepts compact style for classes/modules 227s registers an offense for classes with partially nested children 227s registers a offense for classes with nested children 227s preserves comments between classes 227s accepts nesting for classes with an explicit superclass 227s 227s RuboCop::Cop::Layout::CaseIndentation 227s with EnforcedStyle: case 227s with IndentOneStep: false 227s `case` ... `in` 227s accepts an `in` clause that's equally indented with `case` 227s accepts correctly indented whens in complex combinations 227s doesn't get confused by strings with `case` in them 227s registers an offense and corrects an `in` clause that is indented deeper than `case` 227s doesn't get confused by symbols named `case` or `in` 227s regarding assignment where the right hand side is a `case` 227s registers an offense and corrects assignment indented some other way 227s accepts a correctly indented assignment 227s registers an offense and corrects assignment indented as `end` 227s registers an offense and corrects correct + opposite style 227s with everything on a single line 227s does not register an offense 227s `case` ... `when` 227s registers an offense and corrects a `when` clause that is indented deeper than `case` 227s accepts a `when` clause that's equally indented with `case` 227s doesn't get confused by strings with `case` in them 227s doesn't get confused by symbols named `case` or `when` 227s accepts correctly indented whens in complex combinations 227s regarding assignment where the right hand side is a `case` 227s registers an offense and corrects assignment indented as end 227s registers an offense and corrects assignment indented some other way 227s registers an offense and corrects correct + opposite style 227s accepts a correctly indented assignment 227s with everything on a single line 227s does not register an offense 227s with IndentOneStep: true 227s `case` ... `in` 227s accepts an `in` clause that's 2 spaces deeper than `case` 227s registers an offense and corrects an `in` clause that is equally indented with `case` 227s when indentation width is overridden for this cop only 227s respects cop-specific IndentationWidth 227s regarding assignment where the right hand side is a `case` 227s registers an offense and corrects an assignment indented some other way 227s accepts a correctly indented assignment 227s with everything on a single line 228s does not register an offense 228s `case` ... `when` 228s accepts a `when` clause that's 2 spaces deeper than `case` 228s registers an offense and corrects a `when` clause that is equally indented with `case` 228s regarding assignment where the right hand side is a `case` 228s accepts a correctly indented assignment 228s registers an offense and corrects an assignment indented some other way 228s when indentation width is overridden for this cop only 228s respects cop-specific IndentationWidth 228s with everything on a single line 228s does not register an offense 228s with EnforcedStyle: end 228s with IndentOneStep: false 228s `case` ... `when` 228s regarding assignment where the right hand side is a `case` 228s registers an offense and corrects an assignment indented some other way 228s accepts a correctly indented assignment 228s `when` and `end` same line 228s does not register an offense 228s with everything on a single line 228s does not register an offense 228s `else` and `end` same line 228s does not register an offense 228s `case` ... `in` 228s with everything on a single line 228s does not register an offense 228s `in` and `end` same line 228s does not register an offense 228s regarding assignment where the right hand side is a `case` 228s accepts a correctly indented assignment 228s registers an offense and corrects an assignment indented some other way 228s with IndentOneStep: true 228s `case` ... `when` 228s regarding assignment where the right hand side is a `case` 228s registers an offense and corrects an assignment indented some other way 228s registers an offense and corrects an assignment indented as `case` 228s accepts a correctly indented assignment 228s with everything on a single line 228s does not register an offense 228s `case` ... `in` 228s regarding assignment where the right hand side is a `case` 228s registers an offense and corrects an assignment indented some other way 228s accepts a correctly indented assignment 228s registers an offense and corrects an assignment indented as `case` 228s with everything on a single line 228s does not register an offense 228s when `when` is on the same line as `case` 228s registers an offense but does not autocorrect 228s 228s RuboCop::Cop::Style::YodaCondition 228s enforce yoda 228s registers an offense for number on right of comparison 228s accepts assignment 228s accepts arrays of numbers on both sides 228s registers an offense for number on right 228s accepts accessor and variable on right in boolean expression 228s accepts numbers on both sides 228s accepts subtraction on right of comparison 228s registers an offense for boolean literal on right 228s accepts global variable on right 228s accepts class variable on right 228s accepts string literal on right of case equality check 228s registers an offense for nil on right 228s accepts method call on receiver on right 228s accepts instance variable on right 228s registers an offense for string literal on right 228s accepts string literal on left 228s accepts number on left of <=> 228s accepts variable on right after assignment 228s accepts safe navigation on right 228s accepts negation 228s within an if or ternary statement 228s registers an offense number on right of comparison in if condition 228s registers an offense for number on right in modifier if 228s registers an offense number on right in if condition 228s registers an offense for number on right of <= in ternary condition 228s registers an offense for nil on right in ternary condition 228s registers an offense for number on right of >= in ternary condition 228s with EnforcedStyle: require_for_equality_operators_only 228s registers an offense for negated equality check 228s accepts number on right of comparison 228s accepts mixed order in comparisons 228s accepts nil on right of comparison 228s registers an offense for equality check 228s enforce not yoda 228s registers an offense for nil on left 228s accepts assignment 228s registers an offense number on left of comparison 228s accepts number on both sides 228s accepts __FILE__ on left in negated program name check 228s accepts safe navigation on left 228s accepts subtraction expression on left of comparison 228s accepts array of numbers on both sides 228s accepts __FILE__ on left in program name check 228s accepts number on left of <=> 228s registers an offense for string literal on left 228s registers an offense number on left 228s accepts string literal on right 228s accepts accessor and variable on left in boolean expression 228s accepts global variable on left 228s accepts string literal on left of case equality check 228s accepts class variable on left 228s accepts negation 228s accepts interpolated string on left 228s accepts instance variable on left 228s accepts variable on left after assign 228s accepts interpolated regex on left 228s accepts method call on receiver on left 228s registers an offense for boolean literal on left 228s within an if or ternary statement 228s registers an offense for number on left in if condition 228s registers an offense for number on left in modifier if 228s registers an offense for number on left of comparison in if condition 228s registers an offense for number on left of <= in ternary condition 228s registers an offense for number on left of >= in ternary condition 228s registers an offense for nil on left in ternary condition 228s with EnforcedStyle: forbid_for_equality_operators_only 228s accepts nil on left of comparison 228s registers an offense for equality check 228s registers an offense for negated equality check 228s accepts mixed order in comparisons 228s accepts number on left of comparison 228s 228s RuboCop::Cop::Lint::RedundantRequireStatement 228s registers an offense when using requiring `enumerator` 228s registers an offense when using requiring `enumerator` with modifier form 228s registers an offense when using requiring `enumerator` in condition 228s target ruby version >= 2.2 228s registers an offense when using requiring `rational`, `complex` 228s target ruby version < 3.1 228s does not register an offense and corrects when using requiring `fiber` 228s target ruby version >= 3.1 228s registers an offense and corrects when using requiring `fiber` or already redundant features 228s target ruby version >= 3.2 228s registers an offense and corrects when using requiring `set` 228s target ruby version <= 2.1 228s does not register an offense when using requiring `rational`, `complex` 228s target ruby version >= 2.5 228s register an offense and corrects when using requiring `pp` or already redundant features 228s target ruby version <= 2.4 228s does not register an offense when using requiring `pp` 228s target ruby version <= 2.0 228s does not register an offense when using requiring `thread` 228s target ruby version >= 2.7 228s registers an offense when using requiring `ruby2_keywords` or already redundant features 228s target ruby version >= 2.1 228s register an offense and corrects when using requiring `thread` or already redundant features 228s target ruby version <= 2.6 228s does not register an offense when using requiring `ruby2_keywords` 228s 228s RuboCop::Cop::Security::YAMLLoad 228s registers an offense and corrects a fully qualified ::YAML.load 228s registers an offense and corrects load with a literal string 228s does not register an offense for YAML.load under a different namespace 228s does not register an offense for YAML.dump 228s Ruby >= 3.1 228s does not register an offense and corrects a fully qualified `::YAML.load` 228s does not register an offense and corrects load with a literal string 228s 228s RuboCop::Cop::Lint::SelfAssignment 228s registers an offense when using class var self-assignment 228s does not register an offense when using shorthand-or var assignment 228s does not register an offense when using constant var or-assignment for constant from another scope 228s does not register an offense when using multiple var assignment 228s registers an offense when using shorthand-and var self-assignment 228s registers an offense when using local var self-assignment 228s registers an offense when using shorthand-or var self-assignment 228s registers an offense when using multiple var self-assignment through array 228s does not register an offense when using instance var assignment 228s registers an offense when using instance var self-assignment 228s does not register an offense when using multiple var assignment through method call 228s does not register an offense when using class var assignment 228s does not register an offense when using constant var assignment for constant from another scope 228s does not register an offense when using multiple var assignment through splat 228s registers an offense when using constant var self-assignment 228s does not register an offense when using global var assignment 228s registers an offense when using global var self-assignment 228s does not register an offense when using local var assignment 228s registers an offense when using multiple var self-assignment 228s does not register an offense when using shorthand-and var assignment 228s 228s RuboCop::Cop::Layout::IndentationWidth 228s with Width set to 4 228s registers and corrects offense for bad indentation 228s with if statement 228s registers an offense for bad indentation of an if body 228s for a file with byte order mark 228s accepts correctly indented method definition 228s with ignored patterns set 228s accepts unindented lines for those keywords 228s with Width set to 2 228s with if statement 228s indents parenthesized expressions 228s accepts if/then/else/end laid out as another table 228s registers an offense for bad indentation of an if body 228s accepts `ensure` after an empty body 228s accepts a correctly aligned if/elsif/else/end as a method argument 228s accepts `rescue`/`ensure` after an empty body 229s registers an offense for bad indentation of an elsif body 229s handles lines with only whitespace 229s registers an offense for bad indentation of an else body when if body contains no code 229s registers offense for bad indentation of modifier if in else 229s accepts `rescue` after an empty def 229s accepts a one line if statement 229s accepts indentation after if on new line after assignment 229s registers and corrects on offense for bad indentation 229s registers an offense for bad indentation of an else body when if and elsif body contains no code 229s accepts if/elsif/else/end laid out as a table 229s does not correct in scopes that contain block comments 229s registers offense for bad indentation of ternary inside else 229s registers an offense for bad indentation of an else body 229s leaves rescue ; end unchanged 229s accepts a correctly aligned if/elsif/else/end 229s accepts `ensure` after an empty def 229s does not indent heredoc strings 229s does not raise any error with empty braces 229s accepts `rescue` after an empty body 229s accepts an if/else branches with rescue clauses 229s accepts an empty if 229s accepts `rescue`/`ensure` after an empty def 229s leaves block unchanged if block end is not on its own line 229s with assignment 229s when alignment style is variable 229s and end is aligned randomly 229s registers an offense for an if 229s registers an offense for an until 229s registers an offense for a while 229s and end is aligned with variable 229s accepts an if with end aligned with setter 229s accepts an if/else with chaining with a block after the end 229s accepts an if/else with chaining after the end 229s accepts an if with end aligned with variable 229s accepts an if/else 229s accepts an if with end aligned with element assignment 229s and end is aligned with keyword 229s registers an offense for an if with element assignment 229s registers an offense for a while 229s registers an offense for an if with setter 229s registers an offense for an if 229s accepts an if/else in assignment on next line 229s registers an offense for an until 229s when alignment style is keyword 229s and end is aligned with keyword 229s accepts an if in assignment 229s accepts a while in assignment 229s accepts an until in assignment 229s accepts an if/else in assignment on next line 229s accepts an if/else in assignment 229s and end is aligned with variable 229s registers and corrects bad indentation 229s registers an offense for a while 229s registers an offense for an if 229s when alignment style is start_of_line 229s and end is aligned randomly 229s registers an offense for an if 229s registers an offense for an until 229s registers an offense for a while 229s and end is aligned with variable 229s accepts an if/else 229s accepts an if with end aligned with element assignment 229s accepts an if with end aligned with setter 229s accepts an if/else with chaining with a block after the end 229s accepts an if with end aligned with variable 229s accepts an if/else with chaining after the end 229s and end is aligned with keyword 229s registers an offense for an if with element assignment 229s registers an offense for an if 229s registers an offense for a while 229s registers an offense for an if with setter 229s accepts an if/else in assignment on next line 229s registers an offense for an until 229s with for 229s accepts an empty for 229s registers an offense for bad indentation of a for body 229s with case match 229s registers an offense for bad indentation in a case/in body 229s accepts correctly indented case/in/else 229s accepts indented in/else plus indented body 229s accepts aligned values in `in` clause 229s accepts case/in/else with then beginning a line 229s registers an offense for bad indentation in a case/else body 229s accepts case/in/else laid out as a table 229s accepts aligned value in `in` clause and `else` is empty 229s with module 229s leaves body unchanged if the first body line is on the same line with module keyword 229s when consistency style is normal 229s accepts an empty module body 229s registers an offense for bad indentation of a module body 229s when consistency style is indented_internal_methods 229s registers an offense for bad indentation of a module body 229s accepts normal non-indented internal methods of module functions 229s with case 229s accepts correctly indented case/when/else 229s accepts indented when/else plus indented body 229s accepts case/when/else with then beginning a line 229s registers an offense for bad indentation in a case/when body 229s accepts case/when/else laid out as a table 229s accepts aligned values in when clause 229s registers an offense for bad indentation in a case/else body 229s with block 229s accepts a correctly indented block body 229s registers an offense for bad indentation of a do/end body 229s does not register an offense for good indentation of `do` ... `ensure` ... `end` block 229s registers an offense for bad indentation of a {} body 229s accepts an empty block body 229s registers an offense for bad indentation of `do` ... `ensure` ... `end` block 229s accepts badly indented code if block end is not on separate line 229s when consistency style is indented_internal_methods 229s registers an offense for bad indentation in a do/end body 229s when using safe navigation operator 229s registers an offense for an if with setter 229s registers an offense for bad indentation of a {} body 229s Ruby 2.7 229s registers an offense for bad indentation of a {} body 229s registers an offense for bad indentation of a do-end body 229s with begin/rescue/else/ensure/end 229s registers an offense for bad indentation of bodies 229s with unless 229s accepts an empty unless 229s registers an offense for bad indentation of an unless body 229s with def/defs 229s when end is aligned with def 229s accepts an empty def body 229s accepts an empty defs body 229s with an assignment 229s registers an offense for bad indentation of a def body 229s registers an offense for bad indentation of a defs body 229s when modifier and def are on the same line 229s registers an offense for bad indentation of a defs body 229s registers an offense for bad indentation of a def body 229s accepts a correctly aligned body 229s when end is aligned with start of line 229s registers an offense for bad indentation of a def body 229s accepts an empty defs body 229s with an assignment 229s registers an offense for bad indentation of a defs body 229s accepts an empty def body 229s when multiple modifiers and def are on the same line 229s registers an offense for bad indentation of a defs body 229s accepts a correctly aligned body 229s registers an offense for bad indentation of a def body 229s when multiple modifiers are used in a block anda method call is made at end of the block 229s registers an offense for bad indentation of a def 229s registers an offense for bad indentation of a def body 229s accepts a correctly aligned body 229s when modifier and def are on the same line 229s registers an offense for bad indentation of a defs body 229s registers an offense for bad indentation of a def body 229s accepts a correctly aligned body 229s with def/rescue/end 229s registers an offense for bad indentation of bodies 229s registers an offense for bad indent of defs bodies with a modifier 229s with class 229s leaves body unchanged if the first body line is on the same line with an opening of singleton class 229s accepts an empty class body 229s registers an offense for bad indentation of a class body 229s leaves body unchanged if the first body line is on the same line with class keyword 229s when consistency style is indented_internal_methods 229s registers an offense for normal non-indented internal methods indentation when defined in a singleton class 229s registers an offense for normal non-indented internal methods indentation 229s when consistency style is outdent 229s accepts access modifier is outdent 229s with access modifier 229s registers an offense and corrects for bad modifier indentation before good method definition 229s registers an offense for bad indentation of sections 229s when consistency style is normal 229s registers offenses for indented_internal_methods indentation 229s accepts indented public, protected, and private 229s with while/until 229s accepts an empty while 229s registers an offense for bad indentation of an until body 229s registers an offense for bad indentation of a while body 229s registers an offense for bad indentation of begin/end/while 229s 229s RuboCop::Cop::Style::ConstantVisibility 229s does not register an offense in the top level scope 229s does not register an offense when passing a string to the visibility declaration 229s registers an offense for module definitions 229s when defining a constant in a class 229s with a multi-statement body 229s registers an offense when not using a visibility declaration 229s does not register an offense when using a visibility declaration 229s registers an offense when there is no matching visibility declaration 229s with a single-statement body 229s registers an offense when not using a visibility declaration 229s when defining a constant in a module 229s registers an offense when not using a visibility declaration 229s does not register an offense when using a visibility declaration 229s IgnoreModules 229s registers an offense for constants 229s does not register an offense for class definitions 229s 229s RuboCop::Cop::VariableForce::Variable 229s .new 229s when non variable declaration node is passed 229s raises error 229s #referenced? 229s when the variable is not assigned 229s is expected to be falsey 229s and the variable is referenced 229s is expected to be truthy 229s when the variable has an assignment 229s and the variable is referenced 229s is expected to be truthy 229s and the variable is not yet referenced 229s is expected to be falsey 229s 229s RuboCop::Cop::Lint::DuplicateHashKey 229s behaves like duplicated literal key 229s registers an offense for duplicated `false` hash keys 229s behaves like duplicated non literal key 229s does not register an offense for duplicated `%r{abx#{foo}}ixo` hash keys 229s behaves like duplicated non literal key 229s does not register an offense for duplicated `(x == false)` hash keys 229s behaves like duplicated non literal key 229s does not register an offense for duplicated `some_method_call` hash keys 229s behaves like duplicated literal key 229s registers an offense for duplicated `{ :a => 1, :b => 2 }` hash keys 229s behaves like duplicated literal key 229s registers an offense for duplicated `(false <=> true)` hash keys 229s behaves like duplicated literal key 229s registers an offense for duplicated `%r{abx}ixo` hash keys 229s behaves like duplicated literal key 229s registers an offense for duplicated `[1, 2, 3]` hash keys 229s when there are two duplicated keys in a hash 229s registers two offenses 229s behaves like duplicated literal key 229s registers an offense for duplicated `/./` hash keys 229s behaves like duplicated literal key 229s registers an offense for duplicated `'str'` hash keys 229s behaves like duplicated literal key 229s registers an offense for duplicated `"#{2}"` hash keys 229s behaves like duplicated non literal key 229s does not register an offense for duplicated `"#{some_method_call}"` hash keys 229s behaves like duplicated non literal key 229s does not register an offense for duplicated `{ :sym => some_method_call }` hash keys 229s behaves like duplicated literal key 229s registers an offense for duplicated `(false && true)` hash keys 229s behaves like duplicated literal key 229s registers an offense for duplicated `(1)` hash keys 229s When there is no duplicated key in the hash 229s does not register an offense 229s behaves like duplicated literal key 229s registers an offense for duplicated `!true` hash keys 229s behaves like duplicated literal key 229s registers an offense for duplicated `{ a: 1, b: 2 }` hash keys 229s When a key is duplicated three times in a hash literal 229s registers two offenses 229s behaves like duplicated literal key 229s registers an offense for duplicated `1` hash keys 229s behaves like duplicated literal key 229s registers an offense for duplicated `1.0` hash keys 229s target ruby version >= 2.6 229s behaves like duplicated literal key 229s registers an offense for duplicated `(42..)` hash keys 229s behaves like duplicated non literal key 229s does not register an offense for duplicated `(x or false)` hash keys 229s behaves like duplicated non literal key 229s does not register an offense for duplicated `(x && false)` hash keys 229s when there is a duplicated key in the hash literal 229s registers an offense 229s behaves like duplicated non literal key 229s does not register an offense for duplicated `{ some_method_call => :sym }` hash keys 229s behaves like duplicated non literal key 229s does not register an offense for duplicated `some_method_call(x, y)` hash keys 229s behaves like duplicated non literal key 229s does not register an offense for duplicated `[some_method_call]` hash keys 229s behaves like duplicated non literal key 229s does not register an offense for duplicated `/.#{some_method_call}/` hash keys 229s behaves like duplicated literal key 229s registers an offense for duplicated `nil` hash keys 229s behaves like duplicated literal key 229s registers an offense for duplicated `(false or true)` hash keys 229s 229s RuboCop::Cop::Lint::OrAssignmentToConstant 229s does not register an offense with or-assignment to a global variable 229s does not register an offense with or-assignment to a class variable 229s does not register an offense with or-assignment to a local variable 229s does not register an offense with or-assignment to an attribute 229s does not register an offense with or-assignment to an instance variable 229s does not register an offense with plain assignment to a constant 229s registers an offense with or-assignment to a constant 229s 229s RuboCop::Cop::Style::EvenOdd 229s converts x % 2 == 0 to #even? 229s converts (x % 2) != 0 to #odd? 229s accepts x % 2 == 2 229s accepts x % 3 == 0 229s converts (x.y % 2) != 1 to #even? 229s converts (x._(y)) % 2 != 1 to even? 229s converts (x % 2) == 1 to #odd? 229s converts (x._(y) % 2) != 1 to even? 229s converts x % 2 != 0 to #odd? 229s converts x % 2 == 1 to #odd? 229s converts 1 % 2 != 1 to even? 229s accepts x % 3 != 0 229s converts x._(y) % 2 != 1 to even? 229s converts (x(y) % 2) != 1 to #even? 229s converts (y % 2) != 1 to #even? 229s converts complex examples 229s converts (x % 2) == 0 to #even? 229s converts x % 2 != 1 to #even? 229s 229s RuboCop::Cop::Layout::SpaceAfterNot 229s accepts space after not keyword 229s registers an offense and corrects a single space after ! 229s registers an offense and corrects multiple spaces after ! 229s accepts no space after ! 229s registers an offense and corrects space after ! with the negated receiver wrapped in parentheses 229s 229s RuboCop::Cop::Lint::RescueType 230s accepts rescuing nothing 230s accepts rescuing nothing within a method definition 230s accepts rescue modifier 230s accepts rescuing a single exception 230s behaves like offenses 230s begin rescue 230s rescuing from 0 before another exception 230s registers an offense and autocorrects 230s rescuing from 0 after another exception 230s registers an offense and autocorrects 230s rescuing from 0 230s registers an offense and autocorrects 230s begin rescue ensure 230s rescuing from 0 230s registers an offense and autocorrects 230s def rescue 230s rescuing from 0 230s registers an offense and autocorrects 230s def rescue ensure 230s rescuing from 0 230s registers an offense and autocorrects 230s behaves like offenses 230s def rescue 230s rescuing from nil 230s registers an offense and autocorrects 230s begin rescue ensure 230s rescuing from nil 230s registers an offense and autocorrects 230s def rescue ensure 230s rescuing from nil 230s registers an offense and autocorrects 230s begin rescue 230s rescuing from nil 230s registers an offense and autocorrects 230s rescuing from nil after another exception 230s registers an offense and autocorrects 230s rescuing from nil before another exception 230s registers an offense and autocorrects 230s behaves like offenses 230s def rescue 230s rescuing from "#{string}" 230s registers an offense and autocorrects 230s begin rescue 230s rescuing from "#{string}" 230s registers an offense and autocorrects 230s rescuing from "#{string}" before another exception 230s registers an offense and autocorrects 230s rescuing from "#{string}" after another exception 230s registers an offense and autocorrects 230s begin rescue ensure 230s rescuing from "#{string}" 230s registers an offense and autocorrects 230s def rescue ensure 230s rescuing from "#{string}" 230s registers an offense and autocorrects 230s behaves like offenses 230s begin rescue ensure 230s rescuing from 0.0 230s registers an offense and autocorrects 230s begin rescue 230s rescuing from 0.0 before another exception 230s registers an offense and autocorrects 230s rescuing from 0.0 after another exception 230s registers an offense and autocorrects 230s rescuing from 0.0 230s registers an offense and autocorrects 230s def rescue ensure 230s rescuing from 0.0 230s registers an offense and autocorrects 230s def rescue 230s rescuing from 0.0 230s registers an offense and autocorrects 230s behaves like offenses 230s def rescue ensure 230s rescuing from [] 230s registers an offense and autocorrects 230s begin rescue 230s rescuing from [] after another exception 230s registers an offense and autocorrects 230s rescuing from [] 230s registers an offense and autocorrects 230s rescuing from [] before another exception 230s registers an offense and autocorrects 230s begin rescue ensure 230s rescuing from [] 230s registers an offense and autocorrects 230s def rescue 230s rescuing from [] 230s registers an offense and autocorrects 230s behaves like offenses 230s begin rescue ensure 230s rescuing from {} 230s registers an offense and autocorrects 230s def rescue 230s rescuing from {} 230s registers an offense and autocorrects 230s begin rescue 230s rescuing from {} before another exception 230s registers an offense and autocorrects 230s rescuing from {} after another exception 230s registers an offense and autocorrects 230s rescuing from {} 230s registers an offense and autocorrects 230s def rescue ensure 230s rescuing from {} 230s registers an offense and autocorrects 230s behaves like offenses 230s def rescue ensure 230s rescuing from 'string' 230s registers an offense and autocorrects 230s begin rescue ensure 230s rescuing from 'string' 230s registers an offense and autocorrects 230s begin rescue 230s rescuing from 'string' before another exception 230s registers an offense and autocorrects 230s rescuing from 'string' after another exception 230s registers an offense and autocorrects 230s rescuing from 'string' 230s registers an offense and autocorrects 230s def rescue 230s rescuing from 'string' 230s registers an offense and autocorrects 230s behaves like offenses 230s begin rescue 230s rescuing from :symbol before another exception 230s registers an offense and autocorrects 230s rescuing from :symbol after another exception 230s registers an offense and autocorrects 230s rescuing from :symbol 230s registers an offense and autocorrects 230s def rescue ensure 230s rescuing from :symbol 230s registers an offense and autocorrects 230s begin rescue ensure 230s rescuing from :symbol 230s registers an offense and autocorrects 230s def rescue 230s rescuing from :symbol 230s registers an offense and autocorrects 230s 230s RuboCop::Cop::Layout::HeredocArgumentClosingParenthesis 230s correct cases 230s accepts correct case with other param before 230s accepts simple correct case 230s accepts when there is an argument between a heredoc argument and the closing paretheses 230s accepts method chain with heredoc argument correct case 230s accepts double correct case nested 230s accepts hash correct case 230s accepts double correct case 230s accepts method with heredoc argument of proc correct case 230s accepts double correct case new line 230s accepts correct case with other param after 230s invocation after the HEREDOC 230s ignores random call 230s ignores random call after 230s ignores tr 230s incorrect cases 230s incorrect case in array with double heredoc and spaced out comma 230s detects 230s incorrect case with other param before constructor and raise call 230s detects 230s simple incorrect case comma with spaces 230s detects 230s simple incorrect case comma with spaces and comma in heredoc 230s detects 230s complex chained incorrect case with multiple calls 230s detects and fixes the first 230s incorrect case nested method call with comma 230s detects 230s simple incorrect case 230s detects 230s simple incorrect case hash 230s detects 230s incorrect case with other param after 230s detects 230s nested incorrect case 230s detects 230s incorrect case with other param before constructor 230s detects 230s simple incorrect case with call after 230s detects 230s double incorrect case new line chained calls 230s detects 230s simple incorrect case squiggles 230s detects 230s incorrect case with other param before 230s detects 230s incorrect case in array with spaced out comma 230s detects 230s incorrect case in array with nested calls and double heredoc and spaced out comma 230s detects 230s double incorrect case 230s detects 230s complex incorrect case with multiple calls 230s detects and fixes the second 230s detects and fixes the first 230s simple incorrect case comma 230s detects 230s simple incorrect case with call after trailing comma 230s detects 230s double case new line 230s detects and fixes 230s 230s RuboCop::Cop::Style::ClassMethodsDefinitions 230s when EnforcedStyle is def_self 230s does not register an offense when defining class methods with `def self.method` 230s registers and corrects an offense when defining class methods with `class << self` with inline comment 230s correctly handles class << self containing multiple methods 230s does not register an offense when class << self does not contain methods 230s does not register an offense when `class << self` contains non public methods 230s removes empty class << self when correcting 230s registers and corrects an offense when defining class methods with `class << self` with comment only body 230s does not register an offense when defining singleton methods using `self << object` 230s correctly handles def self.x within class << self 230s does not register an offense when class << self contains only class methods 230s registers an offense and corrects when defining class methods with `class << self` 230s registers an offense and corrects when defining class methods with `class << self` and there is no blank line between method definition and attribute accessor 230s correctly handles methods with annotation comments 230s when EnforcedStyle is self_class 230s registers an offense when defining class methods with `def self.method` 230s does not register an offense when defining singleton methods not on self 230s does not register an offense when defining class methods with `class << self` 230s 230s RuboCop::Cop::Style::PercentQLiterals 230s when EnforcedStyle is upper_case_q 230s without interpolation 230s registers offense for %q 230s accepts double quotes 230s accepts single quotes 230s accepts %Q 230s with special characters 230s accepts %Q 230s accepts %q 230s with interpolation 230s accepts %q 230s accepts single quotes 230s accepts %Q 230s accepts double quotes 230s when EnforcedStyle is lower_case_q 230s with interpolation 230s accepts double quotes 230s accepts %Q 230s accepts single quotes 230s accepts %q 230s without interpolation 230s accepts single quotes 230s accepts double quotes 230s accepts %q 230s registers offense for %Q 230s with special characters 230s accepts %Q 230s accepts %q 230s 230s Changelog 230s merges correctly 230s parses correctly 230s Changelog::Entry 230s #ref_id 230s when there is no issue referenced in the body 230s is expected to eq "x" 230s when there is no body 230s is expected to eq "x" 230s when there is an issue referenced with [Fix #x] the body 230s is expected to eq "123" 230s when there is an issue referenced with [Fixes #x] the body 230s is expected to eq "123" 230s #content 230s when there is an issue referenced 230s generates correct content 230s when there is no issue referenced 230s generates correct content 230s #body 230s when there is no issue referenced in the body 230s is expected to eq "Fix something" 230s when there is an issue referenced with [Fixes #x] the body 230s is expected to eq "Fix something" 230s when there is an issue referenced with [Fix #x] the body 230s is expected to eq "Fix something" 230s when there is no body 230s is expected to eq "" 230s 230s RuboCop::Cop::Naming::PredicateName 230s with permitted predicate names 230s accepts method name which is in permitted list 230s with restricted prefixes 230s registers an offense when method name starts with "has" 230s accepts method name that is an assignment 230s accepts method name when corrected name is invalid identifier 230s accepts method name that starts with unknown prefix 230s registers an offense when method name starts with "is" 230s without restricted prefixes 230s accepts method name when corrected name is invalid identifier 230s registers an offense when method name starts with "has" 230s registers an offense when method name starts with "is" 230s accepts method name that starts with unknown prefix 230s without method definition macros 230s accepts method name when corrected name is invalid identifier 230s does not register any offenses when using an internal affair macro 230s registers an offense when using `define_method` 230s with method definition macros 230s accepts method name when corrected name is invalid identifier 230s registers an offense when using an internal affair macro 230s registers an offense when using `define_method` 230s 230s RuboCop::Cop::InternalAffairs::MethodNameEqual 230s registers an offense when using `#method == :do_something` 230s does not register an offense when using `#method?` 230s registers an offense when using `#method == other_node.do_something` 230s 230s RuboCop::Cop::Style::WordArray 230s with a treacherous WordRegex configuration 230s doesn't break when words contain delimiters 230s doesn't break when words contain whitespace 230s when PreferredDelimiters is specified 230s autocorrects an array with delimiters 230s with a WordRegex configuration which accepts almost anything 230s uses %w for strings which only appear to have an escape 230s uses %W when autocorrecting strings with non-printable chars 230s when EnforcedStyle is array 230s autocorrects a %W() array which uses escapes 230s autocorrects multiline %w() array 230s does not register an offense for arrays of single quoted strings 230s doesn't fail with `encoding: binary 230s autocorrects a %W() array which uses string with hyphen 230s autocorrects a %w() array which uses single quotes 230s does not register an offense for arrays of strings with hyphens 230s does not register an offense for arrays of double quoted strings 230s doesn't fail on strings which are not valid UTF-8 230s registers an offense for a %w() array 230s does not register an offense for arrays of strings with spaces 230s registers an offense for an empty %w() array 230s autocorrects a %w() array which uses string with hyphen 230s autocorrects a %W() array which uses string interpolation 230s with non-default MinSize 230s does not autocorrect arrays of one symbol if MinSize > 1 230s when the WordRegex configuration is not a Regexp 230s still parses the code without raising an error 230s when EnforcedStyle is percent 230s registers an offense for arrays of single quoted strings 230s detects when the cop must be disabled to avoid offenses 230s autocorrects an array with one element 230s doesn't fail in wacky ways when multiple cop instances are used 230s uses %W when autocorrecting strings with embedded newlines and tabs 230s registers an offense for strings with newline and tab escapes 230s registers an offense in a non-ambiguous block context 230s autocorrects an array of words in multiple lines 230s detects right value of MinSize to use for --auto-gen-config 230s does not register an offense for array containing non-string 230s autocorrects an array of words 230s does not register an offense for array of non-words 230s does not register an offense for a %w() array containing non word characters 230s registers an offense for arrays with character constants 230s does not register an offense on non-word strings 230s does not register an offense for array with empty strings 230s registers an offense for an array with comments outside of it 230s autocorrects an array of words and character constants 230s does not register offense for array with allowed number of strings 230s does not register an offense for an array with comments in it 230s does not register an offense for array starting with %w 230s registers an offense for a %w() array containing spaces 230s registers an offense for arrays of strings containing hyphens 230s registers an offense for arrays of double quoted strings 230s keeps the line breaks in place after autocorrect 230s corrects properly when there is an extra trailing comma 230s autocorrects an array of words using partial newlines 230s when the default external encoding is US-ASCII 230s registers an offense for arrays of unicode word characters 230s when the default external encoding is UTF-8 230s registers an offense for arrays of unicode word characters 230s with a custom WordRegex configuration 230s registers an offense for arrays of email addresses 230s 230s RuboCop::Formatter::ClangStyleFormatter 230s #report_file 230s displays text containing the offending source line 230s when the offending source spans multiple lines 230s displays the first line with ellipses 230s when the offense is automatically corrected 230s prints [Corrected] along with message 230s when the offense is correctable 230s prints message as-is 230s when the source line is blank 230s does not display offending source line 230s when the source contains multibyte characters 230s displays text containing the offending source line 230s when the offense is not corrected 230s prints message as-is 230s 230s RuboCop::Cop::Style::Copyright 230s does not register an offense when the notice is present 230s does not register an offense when the notice is in a block comment 230s does not register an offense when the notice is not the first comment 230s when the copyright notice is missing and the source code file starts with shebang and an encoding comment 230s adds an offense 230s when the copyright notice is missing and the source code file starts with an encoding comment 230s adds an offense 230s when the copyright notice is missing 230s fails to autocorrect when the AutocorrectNotice does not match the Notice pattern 230s fails to autocorrect if no AutocorrectNotice is given 230s adds an offense 230s when the source code file is empty 230s adds an offense 230s when the copyright notice comes after any code 230s adds an offense 230s when the copyright notice is missing and the source code file starts with a shebang 230s adds an offense 230s 230s RuboCop::Cop::Team 230s #inspect_file 230s returns offenses 230s when Parser reports non-fatal warning for the file 231s returns Parser warning offenses 231s returns offenses from cops 231s when a cop has no interest in the file 231s returns all offenses except the ones of the cop 231s when autocorrection is enabled and file encoding is mismatch 231s no error occurs 231s when autocorrection is enabled 231s still returns offenses 231s does autocorrection 231s when Cop#on_* raises an error 232s records Team#errors 232s when done twice 232s allows cops to get ready 232s when a correction raises an error 232s records Team#errors 232s #external_dependency_checksum 232s does not error with no cops 232s when multiple cops join 232s returns string 232s when a cop joins 232s returns string 232s when cop with different checksum joins 232s has a different checksum for the whole team 232s when incompatible cops are correcting together 232s autocorrects without SyntaxError 232s #cops 232s returns cop instances 232s when only some cop classes are passed to .new 233s returns only instances of the classes 233s when some classes are disabled with config 233s does not return instances of the classes 233s .new 233s accepts cops directly classes 233s calls mobilize when passed classes 233s #debug? 233s when { debug: true } is passed to .new 233s is expected to be truthy 233s when the option argument of .new is omitted 233s is expected to be falsey 233s #forces 233s returns force instances 233s when a cop joined a force 233s returns the force 233s when no cops joined force 233s returns nothing 233s when multiple cops joined a same force 233s returns only one force instance 233s #autocorrect? 233s when the option argument of .new is omitted 234s is expected to be falsey 234s when { autocorrect: true } is passed to .new 234s is expected to be truthy 234s 234s RuboCop::Cop::VariableForce 234s #process_node 234s when processing a regex with regopt 234s does not raise an error 234s when processing a regexp with a line break at the start of capture parenthesis 234s does not raise an error 234s when processing lvar node 234s when the variable is not yet declared 234s does not raise error 234s when processing an empty regex 234s does not raise an error 234s 234s RuboCop::Cop::Style::EmptyHeredoc 234s does not register an offense when using not empty heredoc 234s registers an offense when using empty `<<-EOS` heredoc 234s registers an offense when using empty `< regexp 234s with escaped delimiters outside a character-class 234s does not register an offense 234s without escapes 234s does not register an offense 234s with escaped delimiters inside a character-class 234s does not register an offense 234s with escaped delimiters and regexp options 234s does not register an offense 234s with a single-line %r!! regexp 234s with escaped delimiters outside a character-class 234s does not register an offense 234s with escaped delimiters and regexp options 234s does not register an offense 234s with escaped delimiters inside a character-class 234s does not register an offense 234s without escapes 234s does not register an offense 234s with a single-line %r{} regexp 234s without escapes 234s does not register an offense 234s with an escaped { or } inside a character class 234s does not register an offense 234s with redundantly-escaped slashes 234s registers an offense and corrects 234s with an escaped { or } outside a character class 234s does not register an offense 234s with a single-line %r^^ regexp 234s with escaped delimiters inside a character-class 234s does not register an offense 234s with escaped delimiters outside a character-class 234s does not register an offense 234s without escapes 234s does not register an offense 234s with escaped delimiters and regexp options 234s does not register an offense 234s with a multi-line %r// regexp 234s without escapes 234s does not register an offense 234s with escaped slashes 234s does not register an offense 234s with a single-line `//` regexp 234s with an escaped '}' outside a character class 234s does not register an offense 234s with an escaped '{' inside a character class 234s registers an offense and corrects 234s with an escaped 'T' outside a character class 234s does not register an offense 234s with an escaped 'q' inside a character class 234s does not register an offense 234s with an uppercase metacharacter inside a character class 234s does not register an offense 234s with an escaped 'q' outside a character class 234s does not register an offense 234s with an escaped 'O' outside a character class 234s does not register an offense 234s with an escaped 'I' inside a character class 234s does not register an offense 234s with an escaped character class and following escaped char 234s does not register an offense 234s with an escaped 'p{alpha}' outside a character class 234s does not register an offense 234s with an escaped ' 234s ' outside a character class 234s does not register an offense 234s with an escaped 'R' inside a character class 234s does not register an offense 234s with an escaped 'X' outside a character class 234s does not register an offense 234s with a backreference 234s does not register an offense 234s with an escaped '$' inside a character class 234s registers an offense and corrects 234s with an escaped 'r' outside a character class 234s does not register an offense 234s with an escaped 'Z' outside a character class 234s does not register an offense 234s with an escaped 'x41' inside a character class 234s does not register an offense 234s with an escaped '?' inside a character class 234s registers an offense and corrects 234s with an escaped 'Q' outside a character class 234s does not register an offense 234s with an escaped '^' outside a character class 234s does not register an offense 234s with a POSIX character class then disallowed escape inside a character class 234s registers an offense and corrects 234s with an escaped 'm' outside a character class 234s does not register an offense 234s with a line continuation within a character class 234s does not register an offense 234s with an escaped 't' outside a character class 234s does not register an offense 234s with an escaped 'Y' inside a character class 234s does not register an offense 234s with an escaped '-' outside a character class 234s registers an offense and corrects 234s with an escaped interpolation inside a character class 234s does not register an offense 234s with an escaped interpolation outside a character class 234s does not register an offense 234s with an escaped ')' inside a character class 234s registers an offense and corrects 234s with an interpolation followed by redundant escapes 234s registers offenses and corrects 234s with an escaped 'o' inside a character class 234s does not register an offense 234s with an escaped 'R' outside a character class 234s does not register an offense 234s with an escaped 'z' outside a character class 234s does not register an offense 234s with an escaped 'n101' outside a character class 234s does not register an offense 234s with an escaped 'N' outside a character class 234s does not register an offense 234s with multiple escaped metachars inside a character class 234s registers offenses and corrects 234s with an escaped 'o' outside a character class 234s does not register an offense 234s with an escaped 'K' inside a character class 234s does not register an offense 234s with an escaped 'L' inside a character class 234s does not register an offense 234s with an escaped 'v' inside a character class 234s does not register an offense 234s with an escaped 'J' outside a character class 234s does not register an offense 234s with an escaped 'm' inside a character class 234s does not register an offense 234s with an escaped 'M-a' outside a character class 234s does not register an offense 234s with an escaped 'T' inside a character class 234s does not register an offense 234s with a line continuation 234s does not register an offense 234s with an escaped '#' outside a character class 234s does not register an offense 234s with an escaped 'C-c' inside a character class 234s does not register an offense 234s with an escaped 'X' inside a character class 234s does not register an offense 234s with an escaped 'h' outside a character class 234s does not register an offense 234s with an escaped ' ' outside a character class 234s does not register an offense 234s with an uppercase metacharacter outside a character class 234s does not register an offense 234s with escaped slashes 234s does not register an offense 234s with an escaped 'J' inside a character class 234s does not register an offense 234s with an escaped 'V' inside a character class 234s does not register an offense 234s with an escaped '*' inside a character class 234s registers an offense and corrects 234s with an escaped 'H' outside a character class 234s does not register an offense 234s with an escaped '\' outside a character class 234s does not register an offense 234s with an escaped 'h' inside a character class 234s does not register an offense 234s with an escaped 'E' outside a character class 234s does not register an offense 234s with an escaped '+' inside a character class inside a group 234s registers an offense and corrects 234s with an escaped 'W' inside a character class 234s does not register an offense 234s with an escaped 'G' outside a character class 234s does not register an offense 234s with an escaped 'v' outside a character class 234s does not register an offense 234s with an escaped '?' outside a character class 234s does not register an offense 234s with an escaped '#' inside a character class 234s does not register an offense 234s with an escaped '.' inside a character class 234s registers an offense and corrects 234s with an escaped 'F' inside a character class 234s does not register an offense 234s with an escaped '(' outside a character class 234s does not register an offense 234s with an escaped 'd' inside a character class 234s does not register an offense 234s with an escaped 'cc' outside a character class 234s does not register an offense 234s with an escaped 'B' outside a character class 234s does not register an offense 234s with an escaped 'i' outside a character class 234s does not register an offense 234s with an escaped '^' inside a character class 234s does not register an offense 234s with an escaped 'S' outside a character class 234s does not register an offense 234s with an escaped 'W' outside a character class 234s does not register an offense 234s with an escaped 'u{0041}' outside a character class 234s does not register an offense 234s with an escaped 'V' outside a character class 234s does not register an offense 234s with an escaped 'd' outside a character class 234s does not register an offense 234s with an escaped 'L' outside a character class 234s does not register an offense 234s with an escaped 'M-a' inside a character class 234s does not register an offense 234s with an escaped ' ' inside a character class 234s does not register an offense 234s with an escaped 'p{alpha}' inside a character class 234s does not register an offense 234s with a nested character class then allowed escape 234s does not register an offense 234s with an escaped 's' inside a character class 234s does not register an offense 234s with an escaped '(' inside a character class 234s registers an offense and corrects 234s with an escaped 'a' inside a character class 234s does not register an offense 234s with an escaped 'b' inside a character class 234s does not register an offense 234s with an escaped 'P{alpha}' inside a character class 234s does not register an offense 234s with an escaped '|' inside a character class 234s registers an offense and corrects 234s with an escaped 'H' inside a character class 234s does not register an offense 234s with an escaped 'u0041' inside a character class 234s does not register an offense 234s with an escaped 'u0041' outside a character class 234s does not register an offense 234s with an escaped 'i' inside a character class 234s does not register an offense 234s with an escaped '\' inside a character class 234s does not register an offense 234s with an escaped 'z' inside a character class 234s does not register an offense 234s with an escaped 'A' outside a character class 234s does not register an offense 234s with an escaped 'j' inside a character class 234s does not register an offense 234s with an escaped ']' outside a character class 234s does not register an offense 234s with an escaped '+' outside a character class 234s does not register an offense 234s with an escaped '{' outside a character class 234s does not register an offense 234s with an escaped 'u{0041}' inside a character class 234s does not register an offense 234s with an escaped 'w' inside a character class 234s does not register an offense 234s with an escaped 'y' outside a character class 234s does not register an offense 234s with an escaped '.' outside a character class 234s does not register an offense 234s with an escaped '$' outside a character class 234s does not register an offense 234s with regexp options and a redundant escape 234s registers offenses and corrects 234s with an escaped 't' inside a character class 234s does not register an offense 234s with an escaped 'f' outside a character class 234s does not register an offense 234s with an escaped 'F' outside a character class 234s does not register an offense 234s with an escaped 'x41' outside a character class 234s does not register an offense 234s with an escaped 'f' inside a character class 234s does not register an offense 234s with an escaped ')' outside a character class 234s does not register an offense 234s with an escaped 'A' inside a character class 234s does not register an offense 234s with an escaped 'U' outside a character class 234s does not register an offense 234s with an escaped '*' outside a character class 234s does not register an offense 234s with an escaped 'P{alpha}' outside a character class 234s does not register an offense 234s with an escaped 'Q' inside a character class 234s does not register an offense 234s with an escaped 'I' outside a character class 234s does not register an offense 234s with an escaped 'a' outside a character class 234s does not register an offense 234s with an escaped 'E' inside a character class 234s does not register an offense 234s with an escaped 'w' outside a character class 234s does not register an offense 234s with an escaped 'l' outside a character class 234s does not register an offense 234s with an escaped 'j' outside a character class 234s does not register an offense 234s with a character class and following escaped char 234s does not register an offense 234s with an escape inside an interpolated string 234s does not register an offense 234s with an escaped '+' inside a character class 234s registers an offense and corrects 234s with an escaped 's' outside a character class 234s does not register an offense 234s with an escaped '[' outside a character class 234s does not register an offense 234s with an escaped 'cc' inside a character class 234s does not register an offense 234s with an escaped '[' inside a character class 234s does not register an offense 234s with an escaped 'Y' outside a character class 234s does not register an offense 234s with a nested character class containing redundant escape 234s registers an offense and corrects 234s with an escaped '}' inside a character class 234s registers an offense and corrects 234s with a POSIX character class then allowed escape inside a character class 234s does not register an offense 234s with an escaped 'n101' inside a character class 234s does not register an offense 234s with an escaped 'K' outside a character class 234s does not register an offense 234s with an escaped '|' outside a character class 234s does not register an offense 234s with an escaped . inside a character class beginning with : 234s registers an offense and corrects 234s with an escaped 'b' outside a character class 234s does not register an offense 234s with an interpolated unnecessary-escape regexp 234s registers an offense and corrects 234s with an escaped 'y' inside a character class 234s does not register an offense 234s with an escaped '-' character being the first character inside a character class 234s registers an offense and corrects 234s without escapes 234s does not register an offense 234s with an escaped '-' character being the last character inside a character class 234s registers an offense and corrects 234s with an escaped '-' inside a character class 234s registers an offense and corrects 234s with an escaped 'U' inside a character class 234s does not register an offense 234s with an escaped 'S' inside a character class 234s does not register an offense 234s with an escaped 'O' inside a character class 234s does not register an offense 234s with an escaped 'C-c' outside a character class 234s does not register an offense 234s with an escaped 'l' inside a character class 234s does not register an offense 234s with an escaped 'D' inside a character class 234s does not register an offense 234s with an escaped 'Z' inside a character class 234s does not register an offense 234s with an escaped 'e' inside a character class 234s does not register an offense 234s with an invalid g escape 234s does not register an offense 234s with an escaped 'G' inside a character class 234s does not register an offense 234s with an escaped 'B' inside a character class 234s does not register an offense 234s with an escaped 'D' outside a character class 234s does not register an offense 234s with an escaped 'r' inside a character class 234s does not register an offense 234s with an escaped 'N' inside a character class 234s does not register an offense 234s with an escaped ']' inside a character class 234s does not register an offense 234s with a free-spaced mode regex 234s with a commented redundant escape on a single line 234s does not register an offense 234s with a commented [ and ] 234s does not register an offense 234s with redundant escape preceded by an escaped comment 234s registers offenses and corrects 234s with a commented redundant escape 234s does not register an offense 234s with an escaped 'e' outside a character class 234s does not register an offense 234s with a single-line %r// regexp 234s with escaped slashes 234s does not register an offense 234s without escapes 234s does not register an offense 234s with a single-line %r__ regexp 234s with escaped delimiters outside a character-class 234s does not register an offense 234s with escaped delimiters inside a character-class 234s does not register an offense 234s with escaped delimiters and regexp options 234s does not register an offense 234s without escapes 234s does not register an offense 234s 234s RuboCop::Cop::Style::TrivialAccessors 234s accepts reader using top level 234s accepts reader with different ivar name 234s accepts non-trivial writer 234s registers an offense on one-liner writer 234s accepts blocks 234s flags a reader inside a class, inside an instance_eval call 234s registers an offense on one-liner reader 234s accepts non-trivial reader 234s registers an offense on class writer 234s accepts splats 234s accepts writer using top level 234s accepts writer in a module 234s registers an offense on class reader 234s registers an offense on reader with braces 234s registers an offense on reader with `private` 234s accepts reader nested within an instance_eval call 234s accepts an initialize method looking like a writer 234s registers an offense on instance writer 235s accepts writer with different ivar name 235s registers an offense on instance reader 235s accepts expressions within writer 235s does not register an offense on DSL-style writer 235s accepts writer nested within a module 235s registers an offense on writer without braces 235s accepts writer nested within an instance_eval call 235s accepts expressions within reader 235s accepts reader nested within a module 235s disallow predicates 235s does not accept predicate-like reader 235s ignore class methods 235s accepts class reader 235s accepts class writer 235s with allowed methods 235s accepts allowed writer 235s accepts allowed reader 235s with AllowPredicates: false 235s accepts allowed predicate 235s with DSL denied 235s registers an offense on DSL-style writer 235s exact name match disabled 235s registers an offense when names mismatch in reader 235s registers an offense when names mismatch in writer 235s allow predicates 235s accepts predicate-like reader 235s 235s RuboCop::Cop::Style::ColonMethodCall 235s registers an offense for instance method call with arg 235s registers an offense for class method call with arg 235s registers an offense for instance method call 235s does not register an offense when for constructor methods 235s does not register an offense for Java static types 235s does not register an offense for nested class 235s does not register an offense for op methods 235s does not register an offense for Java package namespaces 235s does not register an offense for constant access 235s registers an offense for class method call 235s 235s RuboCop::Cop::Style::SoleNestedConditional 235s does not register an offense when nested conditional has an `else` branch 235s registers an offense and corrects when using nested `if` within `if foo = bar` 235s registers an offense and corrects when using `unless` and method arguments with parentheses in the outer condition and nested modifier condition 235s registers an offense and corrects when using `unless` and `||` and parens in the outer condition and nested modifier condition 235s registers an offense and corrects when using nested `unless` modifier with a single expression condition 235s registers an offense and corrects when `if` foo do_something end `if` bar 235s does not register an offense when using nested modifier on value assigned in multiple conditions 235s registers an offense and corrects when `unless` foo && bar do_something end `if` baz 235s registers an offense and corrects when using nested `if` within `if` 235s registers an offense and corrects when using `unless` and multiple method arguments with parenthesesin the outer condition and nested modifier condition 235s registers an offense and corrects when using nested `unless` modifier conditional 235s registers an offense and corrects for multiple nested conditionals 235s registers an offense and corrects when `unless` foo do_something end `if` bar 235s registers an offense and corrects when `if` foo do_something end `unless` bar 235s registers an offense and corrects when `if` foo && bar do_something end `if` baz 235s registers an offense and corrects when using `unless` and method arguments without parentheses in the outer condition and nested modifier condition 235s registers an offense and corrects when using nested `if` within `unless foo == bar` 235s registers an offense and corrects when using nested `unless` within `if` 235s registers an offense and corrects when using nested `unless` within `unless` 235s registers an offense and corrects when using `unless` and `&&` without parens in the outer condition and nested modifier condition 235s registers an offense and corrects when using nested conditional and branch contains a comment 235s does not register an offense when using nested conditional is not the whole body 235s registers an offense and corrects when using nested `unless` modifier multiple conditional 235s registers an offense and corrects when nested `||` operator modifier condition 235s registers an offense and corrects when nested `||` operator condition 235s does not register an offense when using nested modifier on value assigned in single condition 235s registers an offense and corrects when `if` foo do_something end `unless` bar && baz 235s registers an offense and corrects when using guard conditional with outer comment 235s registers an offense and corrects for multiple nested conditionals with using method call outer condition by omitting parentheses 235s does not register an offense for nested conditionals when outer conditional has an `else` branch 235s does not register an offense when using nested conditional within `elsif` 235s registers an offense and corrects when using `||` in the outer condition 235s registers an offense and corrects when using `||` in the outer condition and nested modifier condition 235s does not register an offense when using nested ternary within conditional 235s registers an offense and corrects when using nested `if` modifier conditional 235s does not register an offense when no nested conditionals 235s registers an offense and corrects when using nested `if` within `unless` 235s registers an offense and corrects when `if` foo do_something end `if` bar && baz 235s registers an offense and corrects when there are outer and inline comments 235s registers an offense and corrects when `if` foo && bar do_something end `unless` baz 235s registers an offense and corrects when using `unless` and `||` without parens in the outer condition and nested modifier condition 235s when AllowModifier is true 235s does not register an offense when using nested modifier conditional 235s when the inner condition has a send node with parens 235s in guard style 235s registers an offense and corrects 235s in modifier style 235s registers an offense and corrects 235s when the inner condition has a send node without parens 235s in guard style 235s registers an offense and corrects 235s in modifier style 235s registers an offense and corrects 235s with a `csend` node 235s registers an offense and corrects 235s with a block 235s registers an offense and corrects 235s when disabling `Style/IfUnlessModifier` 235s registers an offense and corrects when there are outer and inline comments 235s registers an offense and corrects when using nested conditional and branch contains a comment 235s 235s RuboCop::Cop::Style::EmptyCaseCondition 235s given a case statement with an empty case 235s with a when branch including comma-delimited alternatives 235s behaves like detect/correct empty case, accept non-empty case 235s accepts the source with case 235s registers an offense and autocorrects 235s when used as an argument of a method with comment 235s behaves like detect/correct empty case, accept non-empty case 235s registers an offense and autocorrects 235s accepts the source with case 235s with multiple when branches and an else 235s behaves like detect/correct empty case, accept non-empty case 235s registers an offense and autocorrects 235s accepts the source with case 235s with a single when branch and an else 235s behaves like detect/correct empty case, accept non-empty case 235s accepts the source with case 235s registers an offense and autocorrects 235s with multiple when branches and no else 235s behaves like detect/correct empty case, accept non-empty case 235s accepts the source with case 235s registers an offense and autocorrects 235s with a single when branch and no else 235s behaves like detect/correct empty case, accept non-empty case 235s accepts the source with case 235s registers an offense and autocorrects 235s when using `when ... then` in `case` in a method call 235s behaves like detect/correct empty case, accept non-empty case 235s registers an offense and autocorrects 235s accepts the source with case 235s with multiple when branches and an `else` with code comments 235s behaves like detect/correct empty case, accept non-empty case 235s registers an offense and autocorrects 235s accepts the source with case 235s when using `return ... if` in `when` clause and assigning the return value of `case` 235s does not register an offense 235s when using `return ... if` in `else` clause and assigning the return value of `case` 235s does not register an offense 235s with when branches using then 235s behaves like detect/correct empty case, accept non-empty case 235s registers an offense and autocorrects 235s accepts the source with case 235s when using `return` in `else` clause and assigning the return value of `case` 235s does not register an offense 235s when using `when ... then` in `case` in `return` 235s behaves like detect/correct empty case, accept non-empty case 235s accepts the source with case 235s registers an offense and autocorrects 235s with first when branch including comma-delimited alternatives 235s behaves like detect/correct empty case, accept non-empty case 235s accepts the source with case 235s registers an offense and autocorrects 235s when used as an argument of a method without comment 235s behaves like detect/correct empty case, accept non-empty case 235s registers an offense and autocorrects 235s accepts the source with case 235s when using `return` in `when` clause and assigning the return value of `case` 235s does not register an offense 235s 235s RuboCop::Cop::Style::InlineComment 235s registers an offense for a trailing inline comment 235s does not register an offense for special rubocop inline comments 235s does not register an offense for a standalone comment 235s 235s RuboCop::Cop::Style::ClassEqualityComparison 235s registers an offense and corrects when comparing class using `eql?` for equality 235s registers an offense and corrects when comparing double quoted class name for equality 235s registers an offense and corrects when comparing `Module#name` for equality 235s registers an offense and corrects when comparing class using `equal?` for equality 235s registers an offense and corrects when comparing single quoted class name for equality 235s does not register an offense when using `instance_of?` 235s registers an offense and corrects when comparing class using `==` for equality 235s with instance variable comparison in module 235s registers and corrects an offense 235s with String comparison in module 235s registers and corrects an offense 235s when AllowedMethods is enabled 235s does not register an offense when comparing class for equality 235s when AllowedPatterns is enabled 235s does not register an offense when comparing class for equality 235s 235s RuboCop::Cop::Style::MultilineBlockChain 235s accepts a chain of calls followed by a multi-line block 235s accepts a multi-line block chained with calls on one line 235s accepts a chain of blocks spanning one line 235s with multi-line block chaining 235s registers an offense for a chain where the second block is single-line 235s registers two offenses for a chain of three blocks 235s accepts a chain where the first block is single-line 235s registers an offense for a simple case 235s registers an offense for a slightly more complicated case 235s Ruby 2.7 235s registers an offense for a slightly more complicated case 235s 235s RuboCop::Cop::Lint::UselessTimes 235s registers an offense and corrects with 0.times with block arg 235s does not register an offense for an integer > 1 235s registers an offense and corrects with 1.times with block arg 235s registers an offense and corrects with 0.times 235s registers an offense and corrects when there is a blank line in the method definition 235s registers an offense and corrects with 1.times 235s registers an offense and corrects when 1.times with empty block argument 235s registers an offense and corrects with negative times with block arg 235s registers an offense and corrects with 1.times with method chain 235s registers an offense and corrects with negative times 235s short-form method 235s registers an offense and corrects with negative times 235s registers an offense and corrects with 1.times 235s does not adjust surrounding space 235s does not register an offense for an integer > 1 235s registers an offense and corrects with 0.times 235s multiline block 235s does not try to correct a block if the block arg is changed 235s correctly handles a multiline block with 1.times 235s does not try to correct a block if the block arg is changed in parallel assignment 235s corrects a block that changes another lvar 235s within indentation 235s corrects properly when removing multiline 235s corrects properly when removing single line 235s corrects properly when replacing 235s inline `Integer#times` calls 235s does not try to correct `1.times` 235s does not try to correct `0.times` 235s 235s RuboCop::Cop::Force 235s .force_name 235s returns the class name without namespace 235s #run_hook 235s invokes a hook in all cops 235s 235s RuboCop::Formatter::TextUtil 235s pluralize 235s will pluralize quantities greater than 1 235s will pluralize negative quantities less than -1 235s will pluralize -1 235s will pluralize fractions 235s will not change 0 to no 235s will change 0 to no when configured 235s will not pluralize 1 235s 235s RuboCop::Cop::Style::RedundantInterpolation 235s registers an offense for "#{number}" 235s registers an offense for "#{$1}" 235s registers an offense for "%Q(#{1 + 1})" 235s accepts strings with characters after the interpolation 235s accepts strings implicitly concatenated with a later string 235s registers an offense for "#{1 + 1}" 235s registers an offense for "#{$var}" 235s registers an offense for "#{do_something 42}" 235s registers an offense for "#{foo.do_something 42}" 235s accepts strings implicitly concatenated with an earlier string 235s registers an offense for "#@@var" 235s registers an offense for "%|#{1 + 1}|" 235s registers an offense for "#$var" 235s accepts strings that are part of a %W() 235s registers an offense for ["#{@var}"] 235s registers an offense for "#{$+}" 235s accepts strings with characters before the interpolation 235s registers an offense for "#$+" 235s registers an offense for "#@var" 235s registers an offense for "#{var}" 235s registers an offense for "#{@@var}" 235s registers an offense for "#{@var}" 235s registers an offense for "#$1" 235s registers an offense for "#{1 + 1; 2 + 2}" 235s registers an offense for "#{do_something(42)}" 235s 235s RuboCop::Cop::InternalAffairs::OffenseLocationKeyword 235s does not register an offense when the `loc` is on a different node 235s does not register an offense when the `loc` is on a child node 235s when `node.loc.selector` is passed 235s registers an offense if message argument is passed 235s registers an offense 235s 235s RuboCop::Options 235s options precedence 235s RUBOCOP_OPTS environment variable 235s has lower precedence then command line options 235s has higher precedence then options from .rubocop file 235s .rubocop file 235s has lower precedence then command line options 235s has lower precedence then options from RUBOCOP_OPTS env variable 235s .rubocop directory 235s is ignored and command line options are used 235s option 235s --display-only-correctable 235s fails if given with an autocorrect argument 235s fails if given with --display-only-failed 235s --auto-gen-only-exclude 235s fails if given without --auto-gen-config 235s --autocorrect-all 235s sets some autocorrect options 235s --display-only-failed 235s works if given with --format junit 235s fails if given without --format junit 235s --fail-level 235s accepts severity initial letters 235s accepts full severity names 235s accepts the "fake" severities A/autocorrect 235s incompatible cli options 235s rejects using -v with -V 235s rejects using -V with --show-cops 235s rejects using -v with --show-cops 235s mentions all incompatible options when more than two are used 235s --cache 235s fails if no argument is given 235s accepts false as argument 235s fails if unrecognized argument is given 235s accepts true as argument 235s --no-parallel 235s disables parallel from file 235s --autocorrect 235s Specify only --autocorrect 235s sets some autocorrect options 235s Specify --autocorrect and --autocorrect-all 235s emits a warning and sets some autocorrect options 235s --raise-cop-error 235s raises cop errors 235s deprecated options 235s --safe-auto-correct 235s emits a warning and sets the correct options instead 235s --auto-correct-all 235s emits a warning and sets the correct options instead 235s --auto-correct 235s emits a warning and sets the correct options instead 235s -s/--stdin 235s fails if no paths are given 235s fails if more than one path is given 235s succeeds with exactly one path 235s --exclude-limit 235s fails if given last without argument 235s fails if given alone without argument 235s fails if given without --auto-gen-config 235s fails if given first without argument 235s --regenerate-todo 235s when todo options are overridden after --regenerate-todo 235s is expected to eq {:auto_gen_config=>true, :exclude_limit=>"50", :offense_counts=>false, :regenerate_todo=>true} 235s when disabled options are overridden to be enabled 235s is expected to eq {:auto_gen_config=>true, :exclude_limit=>"100", :offense_counts=>true, :regenerate_todo=>true} 235s when no other options are given 235s is expected to eq {:auto_gen_config=>true, :exclude_limit=>"100", :offense_counts=>false, :regenerate_todo=>true} 235s when todo options are overridden before --regenerate-todo 235s is expected to eq {:auto_gen_config=>true, :exclude_limit=>"50", :offense_counts=>false, :regenerate_todo=>true} 235s --auto-gen-config 235s accepts other options 235s -h/--help 235s shows help text 235s exits cleanly 235s lists all builtin formatters 235s --require 235s requires the passed path 235s --parallel 235s combined with --auto-gen-config 235s ignores --parallel 235s combined with --cache false 235s ignores --parallel 235s combined with an autocorrect argument 235s combined with --autocorrect-all 235s allows --parallel 235s combined with --fix-layout 235s allows --parallel 235s combined with --autocorrect 235s allows --parallel 235s combined with two incompatible arguments 235s ignores --parallel and lists both incompatible arguments 235s combined with --fail-fast 235s ignores --parallel 235s --disable-uncorrectable 235s fails if given without an autocorrect argument 235s accepts together with an unsafe autocorrect argument 235s accepts together with a safe autocorrect argument 235s --fix-layout 235s sets some autocorrect options 235s --cache-root 235s accepts a path as argument 235s fails if also `--cache false` is given 235s fails if no argument is given 235s --display-only-fail-level-offenses 236s fails if given with an autocorrect argument 236s 236s RuboCop::Cop::Migration::DepartmentName 236s when a disable comment contains a plain comment 236s accepts 236s when a disable comment contains an unexpected character for department name 236s accepts 236s when only department name has given 236s does not register an offense 236s when todo/enable comments have cop names without departments 236s registers offenses and corrects when using a legacy cop name 236s registers offenses and corrects when there is space around `:` 236s registers offenses and corrects 236s when an unexpected disable comment format 236s does not register an offense 236s when a disable comment has cop names with departments 236s accepts 236s 236s RuboCop::Cop::Style::RedundantSelfAssignmentBranch 236s registers and corrects an offense when self-assigning redundant else branch and empty else branch 236s registers and corrects an offense when self-assigning redundant if ternary branch 236s does not register an offense when multi assignment 236s does not register an offense when lhs is not variable 236s does not register an offense when self-assigning redundant else ternary branch for ivar 236s registers and corrects an offense when self-assigning redundant else branch 236s registers and corrects an offense when self-assigning redundant if branch 236s does not register an offense when self-assigning redundant else branch and multiline else branch 236s does not register an offense when self-assigning redundant else ternary branch for gvar 236s does not register an offense when self-assigning redundant else branch and multiline if branch 236s registers and corrects an offense when self-assigning redundant else branch and empty if branch 236s does not register an offense when using `elsif` and self-assigning the value of `elsif` branch 236s does not register an offense when using `elsif` and self-assigning the value of `else` branch 236s does not register an offense when self-assigning redundant else ternary branch for cvar 236s does not register an offense when not self-assigning redundant branches 236s does not register an offense when using only if branch 236s registers and corrects an offense when self-assigning redundant else ternary branch 236s does not register an offense when using `elsif` and self-assigning the value of `then` branch 236s 236s RuboCop::Cop::Style::IfWithSemicolon 236s accepts without `else` branch 236s registers an offense and corrects for one line if/;/end 236s can handle modifier conditionals 236s when elsif is present 236s accepts with `else` branch 236s accepts without `else` branch 236s accepts second elsif block 236s 236s RuboCop::Cop::Style::NumericLiterals 236s accepts long numbers with underscore 236s autocorrects numeric literal with exponent and dot 236s autocorrects numeric literal with exponent (large E) and dot 236s autocorrects negative numbers 236s autocorrects numbers with spaces between leading minus and numbers 236s ignores non-decimal literals 236s registers an offense for a long undelimited integer 236s accepts short numbers without underscore 236s accepts integers with less than three places at the end 236s registers an offense for a float with a long undelimited integer part 236s does not count a leading minus sign as a digit 236s accepts a short integer without underscore 236s registers an offense for an integer with misplaced underscore 236s autocorrects negative floating-point numbers 236s handles numeric literal with exponent 236s for --auto-gen-config 236s when the number is only digits 236s detects right value of MinDigits based on the longest number 236s sets the right value if one is disabled inline 236s with separators 236s does not disable the cop if the line is disabled 236s disables the cop 236s AllowedPatterns 236s does not register an offense for numbers that exactly match the pattern 236s registers an offense for numbers that do not exactly match the pattern 236s corrects by inserting underscores every 3 digits 236s AllowedPatterns with repetition 236s does not register an offense for numbers that match the pattern 236s strict 236s registers an offense for an integer with misplaced underscore 236s when `'3000'` is specified for `AllowedNumbers` 236s registers an offense 236s does not register an offense 236s when `3000` is specified for `AllowedNumbers` 236s registers an offense 236s does not register an offense 236s 236s RuboCop::ConfigObsoletion::RenamedCop 236s #message 236s when the cop has changed names but in the same department 236s is expected to start with "The `Style/MyCop` cop has been renamed to `Style/NewCop`" 236s when the cop has changed names but in a new department 236s is expected to start with "The `Style/MyCop` cop has been renamed to `Layout/NewCop`" 236s when the cop has been moved to a new department 236s is expected to start with "The `Style/MyCop` cop has been moved to `Layout/MyCop`" 236s 236s RuboCop::Cop::Layout::SpaceInsidePercentLiteralDelimiters 236s accepts other percent literals 236s accepts execute-string literals 236s for i type and ["(", ")"] delimiters 236s accepts literals with escaped spaces 236s accepts multi-line literals 236s registers an offense for unnecessary spaces 236s registers an offense for spaces after first delimiter 236s accepts multi-line literals within a method 236s accepts literals without additional spaces 236s registers an offense for spaces before final delimiter 236s registers an offense for literals with escaped and other spaces 236s accepts spaces between entries 236s accepts newlines and additional following alignment spaces 236s with newline in blank percent literals 236s registers and corrects an offense 236s with spaces in blank percent literals 236s registers and corrects an offense 236s with space in blank percent literals 236s registers and corrects an offense 236s for w type and ["{", "}"] delimiters 236s accepts literals with escaped spaces 236s registers an offense for unnecessary spaces 236s accepts spaces between entries 236s registers an offense for literals with escaped and other spaces 236s accepts multi-line literals within a method 236s registers an offense for spaces before final delimiter 236s accepts multi-line literals 236s accepts literals without additional spaces 236s registers an offense for spaces after first delimiter 236s accepts newlines and additional following alignment spaces 236s with spaces in blank percent literals 236s registers and corrects an offense 236s with space in blank percent literals 236s registers and corrects an offense 236s with newline in blank percent literals 236s registers and corrects an offense 236s for w type and ["(", ")"] delimiters 236s accepts multi-line literals 236s registers an offense for spaces before final delimiter 236s accepts multi-line literals within a method 236s accepts literals without additional spaces 236s registers an offense for spaces after first delimiter 236s accepts literals with escaped spaces 236s registers an offense for unnecessary spaces 236s accepts newlines and additional following alignment spaces 236s registers an offense for literals with escaped and other spaces 236s accepts spaces between entries 236s with spaces in blank percent literals 236s registers and corrects an offense 236s with space in blank percent literals 236s registers and corrects an offense 236s with newline in blank percent literals 236s registers and corrects an offense 236s for w type and ["[", "]"] delimiters 236s accepts multi-line literals within a method 236s registers an offense for spaces before final delimiter 236s registers an offense for literals with escaped and other spaces 236s accepts literals with escaped spaces 236s accepts spaces between entries 236s accepts multi-line literals 236s registers an offense for unnecessary spaces 236s registers an offense for spaces after first delimiter 236s accepts literals without additional spaces 236s accepts newlines and additional following alignment spaces 236s with spaces in blank percent literals 236s registers and corrects an offense 236s with space in blank percent literals 236s registers and corrects an offense 236s with newline in blank percent literals 236s registers and corrects an offense 236s for I type and ["!", "!"] delimiters 236s accepts spaces between entries 236s accepts newlines and additional following alignment spaces 236s accepts literals without additional spaces 236s registers an offense for unnecessary spaces 236s registers an offense for literals with escaped and other spaces 236s accepts multi-line literals within a method 236s accepts literals with escaped spaces 236s registers an offense for spaces after first delimiter 236s accepts multi-line literals 236s registers an offense for spaces before final delimiter 236s with spaces in blank percent literals 236s registers and corrects an offense 236s with space in blank percent literals 236s registers and corrects an offense 236s with newline in blank percent literals 236s registers and corrects an offense 236s for w type and ["!", "!"] delimiters 236s registers an offense for literals with escaped and other spaces 236s accepts literals with escaped spaces 236s accepts newlines and additional following alignment spaces 236s accepts multi-line literals within a method 236s accepts spaces between entries 236s registers an offense for spaces before final delimiter 236s registers an offense for spaces after first delimiter 236s accepts literals without additional spaces 236s accepts multi-line literals 236s registers an offense for unnecessary spaces 236s with newline in blank percent literals 236s registers and corrects an offense 236s with spaces in blank percent literals 236s registers and corrects an offense 236s with space in blank percent literals 236s registers and corrects an offense 236s for i type and ["!", "!"] delimiters 236s accepts newlines and additional following alignment spaces 236s accepts spaces between entries 236s registers an offense for literals with escaped and other spaces 236s accepts multi-line literals 236s accepts multi-line literals within a method 236s registers an offense for spaces after first delimiter 236s accepts literals without additional spaces 236s accepts literals with escaped spaces 236s registers an offense for unnecessary spaces 236s registers an offense for spaces before final delimiter 236s with spaces in blank percent literals 236s registers and corrects an offense 236s with space in blank percent literals 236s registers and corrects an offense 236s with newline in blank percent literals 236s registers and corrects an offense 236s for W type and ["!", "!"] delimiters 236s accepts newlines and additional following alignment spaces 236s accepts multi-line literals 236s accepts multi-line literals within a method 236s accepts spaces between entries 236s registers an offense for literals with escaped and other spaces 236s registers an offense for spaces before final delimiter 236s accepts literals without additional spaces 236s registers an offense for spaces after first delimiter 236s registers an offense for unnecessary spaces 236s accepts literals with escaped spaces 236s with spaces in blank percent literals 236s registers and corrects an offense 236s with space in blank percent literals 236s registers and corrects an offense 236s with newline in blank percent literals 236s registers and corrects an offense 236s for W type and ["{", "}"] delimiters 236s registers an offense for spaces after first delimiter 236s accepts newlines and additional following alignment spaces 236s accepts literals with escaped spaces 236s accepts spaces between entries 236s accepts multi-line literals within a method 236s registers an offense for literals with escaped and other spaces 236s accepts multi-line literals 236s accepts literals without additional spaces 236s registers an offense for unnecessary spaces 236s registers an offense for spaces before final delimiter 236s with newline in blank percent literals 236s registers and corrects an offense 236s with spaces in blank percent literals 236s registers and corrects an offense 236s with space in blank percent literals 236s registers and corrects an offense 236s for x type and ["[", "]"] delimiters 236s accepts literals without additional spaces 236s accepts newlines and additional following alignment spaces 236s registers an offense for literals with escaped and other spaces 236s accepts spaces between entries 236s accepts multi-line literals within a method 236s registers an offense for spaces after first delimiter 236s registers an offense for spaces before final delimiter 236s accepts literals with escaped spaces 236s registers an offense for unnecessary spaces 236s accepts multi-line literals 236s with newline in blank percent literals 236s registers and corrects an offense 236s with space in blank percent literals 236s registers and corrects an offense 236s with spaces in blank percent literals 236s registers and corrects an offense 236s for i type and ["[", "]"] delimiters 236s registers an offense for literals with escaped and other spaces 236s accepts multi-line literals 236s accepts spaces between entries 236s accepts literals without additional spaces 236s accepts newlines and additional following alignment spaces 236s registers an offense for spaces before final delimiter 236s accepts multi-line literals within a method 236s registers an offense for unnecessary spaces 236s accepts literals with escaped spaces 236s registers an offense for spaces after first delimiter 236s with newline in blank percent literals 236s registers and corrects an offense 236s with space in blank percent literals 236s registers and corrects an offense 236s with spaces in blank percent literals 236s registers and corrects an offense 236s for x type and ["(", ")"] delimiters 236s registers an offense for unnecessary spaces 236s accepts newlines and additional following alignment spaces 236s registers an offense for spaces before final delimiter 236s registers an offense for literals with escaped and other spaces 236s accepts literals without additional spaces 236s accepts multi-line literals within a method 236s accepts multi-line literals 236s registers an offense for spaces after first delimiter 236s accepts literals with escaped spaces 236s accepts spaces between entries 236s with spaces in blank percent literals 236s registers and corrects an offense 236s with newline in blank percent literals 236s registers and corrects an offense 236s with space in blank percent literals 236s registers and corrects an offense 236s for I type and ["[", "]"] delimiters 236s accepts literals with escaped spaces 236s registers an offense for spaces before final delimiter 236s registers an offense for literals with escaped and other spaces 236s accepts newlines and additional following alignment spaces 236s accepts spaces between entries 236s registers an offense for spaces after first delimiter 236s accepts literals without additional spaces 236s registers an offense for unnecessary spaces 236s accepts multi-line literals within a method 236s accepts multi-line literals 236s with spaces in blank percent literals 236s registers and corrects an offense 236s with newline in blank percent literals 236s registers and corrects an offense 236s with space in blank percent literals 236s registers and corrects an offense 236s for x type and ["{", "}"] delimiters 236s accepts literals with escaped spaces 236s registers an offense for spaces before final delimiter 236s accepts newlines and additional following alignment spaces 236s registers an offense for unnecessary spaces 236s registers an offense for spaces after first delimiter 236s accepts spaces between entries 236s registers an offense for literals with escaped and other spaces 236s accepts multi-line literals 236s accepts literals without additional spaces 236s accepts multi-line literals within a method 236s with newline in blank percent literals 236s registers and corrects an offense 236s with space in blank percent literals 236s registers and corrects an offense 236s with spaces in blank percent literals 236s registers and corrects an offense 236s for I type and ["{", "}"] delimiters 236s accepts literals without additional spaces 236s accepts newlines and additional following alignment spaces 236s registers an offense for literals with escaped and other spaces 236s accepts multi-line literals 236s registers an offense for unnecessary spaces 236s registers an offense for spaces before final delimiter 236s registers an offense for spaces after first delimiter 236s accepts multi-line literals within a method 236s accepts spaces between entries 236s accepts literals with escaped spaces 236s with spaces in blank percent literals 236s registers and corrects an offense 236s with newline in blank percent literals 236s registers and corrects an offense 236s with space in blank percent literals 236s registers and corrects an offense 236s for W type and ["[", "]"] delimiters 236s registers an offense for spaces after first delimiter 236s accepts spaces between entries 236s accepts multi-line literals within a method 236s registers an offense for literals with escaped and other spaces 236s registers an offense for spaces before final delimiter 236s accepts multi-line literals 236s accepts literals without additional spaces 236s registers an offense for unnecessary spaces 236s accepts newlines and additional following alignment spaces 236s accepts literals with escaped spaces 236s with space in blank percent literals 236s registers and corrects an offense 236s with newline in blank percent literals 236s registers and corrects an offense 236s with spaces in blank percent literals 236s registers and corrects an offense 236s for W type and ["(", ")"] delimiters 236s accepts spaces between entries 236s registers an offense for spaces after first delimiter 236s accepts newlines and additional following alignment spaces 236s accepts multi-line literals within a method 236s accepts literals without additional spaces 236s registers an offense for literals with escaped and other spaces 236s accepts literals with escaped spaces 236s accepts multi-line literals 236s registers an offense for spaces before final delimiter 236s registers an offense for unnecessary spaces 236s with newline in blank percent literals 236s registers and corrects an offense 236s with spaces in blank percent literals 236s registers and corrects an offense 236s with space in blank percent literals 236s registers and corrects an offense 236s for I type and ["(", ")"] delimiters 236s accepts newlines and additional following alignment spaces 236s registers an offense for spaces before final delimiter 236s registers an offense for literals with escaped and other spaces 236s accepts literals with escaped spaces 236s registers an offense for spaces after first delimiter 236s accepts multi-line literals 236s accepts multi-line literals within a method 236s accepts spaces between entries 236s registers an offense for unnecessary spaces 236s accepts literals without additional spaces 236s with spaces in blank percent literals 236s registers and corrects an offense 236s with newline in blank percent literals 236s registers and corrects an offense 236s with space in blank percent literals 236s registers and corrects an offense 236s for i type and ["{", "}"] delimiters 236s accepts multi-line literals within a method 236s accepts newlines and additional following alignment spaces 236s registers an offense for unnecessary spaces 236s registers an offense for spaces after first delimiter 236s accepts literals without additional spaces 236s registers an offense for literals with escaped and other spaces 236s accepts literals with escaped spaces 236s registers an offense for spaces before final delimiter 236s accepts spaces between entries 236s accepts multi-line literals 236s with newline in blank percent literals 236s registers and corrects an offense 236s with spaces in blank percent literals 236s registers and corrects an offense 236s with space in blank percent literals 236s registers and corrects an offense 236s for x type and ["!", "!"] delimiters 236s accepts multi-line literals 236s accepts literals without additional spaces 236s accepts newlines and additional following alignment spaces 236s registers an offense for unnecessary spaces 236s registers an offense for spaces before final delimiter 236s accepts spaces between entries 236s registers an offense for spaces after first delimiter 236s accepts literals with escaped spaces 236s accepts multi-line literals within a method 236s registers an offense for literals with escaped and other spaces 236s with space in blank percent literals 236s registers and corrects an offense 236s with newline in blank percent literals 236s registers and corrects an offense 236s with spaces in blank percent literals 236s registers and corrects an offense 236s 236s RuboCop::Cop::Layout::ConditionPosition 237s registers an offense and corrects for condition on the next line 237s registers an offense and corrects for condition on the next line 237s accepts condition on the same line 237s accepts condition on a different line for modifiers 237s accepts condition on the same line 237s accepts condition on a different line for modifiers 237s registers an offense and corrects for condition on the next line 237s accepts condition on the same line 237s registers an offense and corrects for condition on the next line 237s registers an offense and corrects for elsif condition on the next line 237s accepts ternary ops 237s accepts condition on a different line for modifiers 237s accepts condition on the same line 237s accepts condition on a different line for modifiers 237s 237s RuboCop::Cop::Style::MapToHash 237s >= Ruby 2.6 237s when chained further 237s registers an offense and corrects 237s for `collect.to_h` with block arity 1 237s registers an offense and corrects 237s when the receiver is an hash 237s registers an offense and corrects 237s for `map.to_h` with block arity 2 237s registers an offense and corrects 237s when the receiver is an array 237s registers an offense and corrects 237s when the receiver is an array 237s registers an offense and corrects 237s for `collect.to_h` with block arity 2 237s registers an offense and corrects 237s `collect` without `to_h` 237s does not register an offense 237s `map.to_h` with a block on `to_h` 237s registers an offense but does not correct 237s when the receiver is an hash 237s registers an offense and corrects 237s `map` without `to_h` 237s does not register an offense 237s `map` and `collect.to_h` with newlines 237s registers an offense and corrects with newline removal 237s for `map.to_h` with block arity 1 237s registers an offense and corrects 237s `map` and `map.to_h` with newlines 237s registers an offense and corrects with newline removal 237s `collect.to_h` with a block on `to_h` 237s registers an offense but does not correct 237s when chained further 237s registers an offense and corrects 237s 237s RuboCop::Cop::Lint::NextWithoutAccumulator 237s behaves like reduce/inject 237s given a reduce block 237s accepts next within a nested block 237s registers an offense for a bare next 237s accepts next with a value 237s Ruby 2.7 237s registers an offense for a bare next 237s given an unrelated block 237s accepts a bare next 237s accepts next with a value 237s behaves like reduce/inject 237s given a inject block 237s accepts next within a nested block 237s registers an offense for a bare next 237s accepts next with a value 237s Ruby 2.7 237s registers an offense for a bare next 237s 237s RuboCop::Formatter::JSONFormatter 237s #finished 237s outputs #output_hash as JSON 237s sets inspected file count in summary 237s #file_finished 237s adds detected offense count in summary 237s adds value of #hash_for_file to #output_hash[:files] 237s #started 237s sets target file count in summary 237s #hash_for_offense 237s sets Offense#message value for :message key 237s sets Offense#corrected? value for :corrected key 237s sets value of #hash_for_location for :location key 237s sets Offense#severity value for :severity key 237s sets Offense#cop_name value for :cop_name key 237s sets Offense#correctable? value for :correctable key 237s #hash_for_location 237s sets line value for :line key 237s sets length value for :length key 237s sets column value for :column key 237s when the location is pseudo 237s returns a valid hash 237s #hash_for_file 237s sets relative file path for :path key 237s sets an array of #hash_for_offense values for :offenses key 237s 237s RuboCop::Cop::Style::HashExcept 237s does not register an offense when using `Hash#except` 237s does not register an offense when not using key block argument` 237s does not register an offense when using `reject` and `include?` 237s does not register an offense when using `select` and comparing with `:key == lvar` 237s does not register an offense when using `reject` and comparing with `lvar != :key` 237s does not register an offense when using `select` and comparing with `lvar == :key` 237s does not register an offense when using `reject` and comparing with `:key != lvar` 237s does not register an offense when not using block` 237s Ruby 3.0 or higher 237s does not register an offense when using `keep_if` and comparing with `lvar != :sym` 237s does not register an offense when using `delete_if` and comparing with `lvar == :sym` 237s does not register an offense when comparing with hash value 237s does not register an offense when using `reject` and other than comparison by string and symbol using `==` 237s registers and corrects an offense when using `reject` and other than comparison by string and symbol using `eql?` 237s registers and corrects an offense when using `select` and comparing with `lvar != :sym` 237s registers and corrects an offense when using `reject` and comparing with `:sym == lvar` 237s registers and corrects an offense when using `reject` and comparing with `lvar == :sym` 237s registers and corrects an offense when using `filter` and comparing with `lvar != :sym` 237s registers and corrects an offense when using `reject` and comparing with `lvar == 'str'` 237s registers and corrects an offense when using `select` and comparing with `:sym != lvar` 237s using `exclude?` 237s does not register offenses when using `reject` and calling `!exclude?` method with symbol array 237s using `in?` 237s does not register offenses when using `reject` and calling `key.in?` method with symbol array 237s using `include?` 237s registers and corrects an offense when using `reject` and calling `include?` method with variable 237s does not register an offense when using `reject` and calling `include?` method with symbol array and second block value 237s registers and corrects an offense when using `filter` and calling `!include?` method with symbol array 237s registers and corrects an offense when using `reject` and calling `include?` method with dynamic string array 237s registers and corrects an offense when using `reject` and calling `include?` method with symbol array 237s registers and corrects an offense when using `reject` and calling `include?` method with method call 237s registers and corrects an offense when using `select` and calling `!include?` method with symbol array 237s registers and corrects an offense when using `reject` and calling `include?` method with dynamic symbol array 237s when `AllCops/ActiveSupportExtensionsEnabled: true` 237s does not register an offense when using `delete_if` and comparing with `lvar == :sym` 237s registers and corrects an offense when using `reject` and other than comparison by string and symbol using `eql?` 237s does not register an offense when using `reject` and other than comparison by string and symbol using `==` 237s registers and corrects an offense when using `reject` and comparing with `lvar == :sym` 237s registers and corrects an offense when using `select` and comparing with `:sym != lvar` 237s does not register an offense when using `keep_if` and comparing with `lvar != :sym` 237s registers and corrects an offense when using `filter` and comparing with `lvar != :sym` 237s registers and corrects an offense when using `reject` and comparing with `lvar == 'str'` 237s registers and corrects an offense when using `reject` and comparing with `:sym == lvar` 237s does not register an offense when comparing with hash value 237s registers and corrects an offense when using `select` and comparing with `lvar != :sym` 237s using `include?` 237s registers and corrects an offense when using `reject` and calling `include?` method with dynamic symbol array 237s registers and corrects an offense when using `filter` and calling `!include?` method with symbol array 237s registers and corrects an offense when using `reject` and calling `include?` method with symbol array 237s registers and corrects an offense when using `reject` and calling `include?` method with variable 237s registers and corrects an offense when using `reject` and calling `include?` method with method call 237s registers and corrects an offense when using `select` and calling `!include?` method with symbol array 237s registers and corrects an offense when using `reject` and calling `include?` method with dynamic string array 237s using `in?` 237s registers and corrects an offense when using `reject` and calling `key.in?` method with method call 237s registers and corrects an offense when using `reject` and calling `key.in?` method with symbol array 237s registers and corrects an offense when using `reject` and calling `key.in?` method with dynamic string array 237s registers and corrects an offense when using `filter` and calling `!key.in?` method with symbol array 237s registers and corrects an offense when using `reject` and calling `key.in?` method with variable 237s registers and corrects an offense when using `select` and calling `!key.in?` method with symbol array 237s does not register an offense when using `reject` and calling `in?` method with symbol array and second block value 237s registers and corrects an offense when using `reject` and calling `key.in?` method with dynamic symbol array 237s using `exclude?` 237s registers and corrects an offense when using `reject` and calling `!exclude?` method with variable 237s registers and corrects an offense when using `reject` and calling `!exclude?` method with method call 237s registers and corrects an offense when using `filter` and calling `exclude?` method with symbol array 237s registers and corrects an offense when using `reject` and calling `!exclude?` method with symbol array 237s registers and corrects an offense when using `select` and calling `exclude?` method with symbol array 237s does not register an offense when using `reject` and calling `exclude?` method with symbol array and second block value 237s registers and corrects an offense when using `reject` and calling `!exclude?` method with dynamic string array 237s registers and corrects an offense when using `reject` and calling `!exclude?` method with dynamic symbol array 237s Ruby 2.7 or lower 237s does not register an offense when using `reject` and comparing with `lvar == :key` 237s does not register an offense when using `select` and comparing with `lvar != :key` 237s does not register an offense when using `select` and comparing with `:key != lvar` 237s does not register an offense when using `reject` and comparing with `:key == lvar` 237s 237s RuboCop::Cop::Style::StderrPuts 237s registers no offense when using `$stderr.puts` with no arguments 237s registers an offense when using `$stderr.puts('hello')` 237s registers no offense when using `STDERR.puts` with no arguments 237s registers an offense when using `::STDERR.puts('hello')` 237s registers an offense when using `STDERR.puts('hello')` 237s 237s RuboCop::Cop::Style::FormatStringToken 237s ignores regexp 237s ignores time format (when used as argument to strftime) 237s ignores xstr 237s ignores time format (when used as argument to strptime) 237s ignores time format and unrelated `format` method using 237s ignores http links 237s handles dstrs 237s ignores `%r` regexp 237s works inside hashes 237s ignores placeholder arguments 237s ignores percent escapes 237s supports flags and modifiers 237s ignores time format when it is stored in a variable 237s ignores __FILE__ 237s behaves like enforced styles for format string tokens 237s when enforced style is template 237s does not register offenses for annotated style 237s detects when the cop must be disabled to avoid offenses 237s #correctable_sequence? 237s configures the enforced style to template after inspecting "%{a}" 237s supports dynamic string with interpolation 237s behaves like maximum allowed unannotated 237s when MaxUnannotatedPlaceholdersAllowed is 2 237s does not register offenses for single unannotated 237s does not register offenses for dual unannotated 237s when MaxUnannotatedPlaceholdersAllowed is 1 237s does not register offenses for single unannotated 237s does not register offenses for dual unannotated 237s when enforced style is annotated 237s supports dynamic string with interpolation 237s registers offenses for template style 237s detects when the cop must be disabled to avoid offenses 237s #correctable_sequence? 237s sets the enforced style to annotated after inspecting "%s" 237s behaves like maximum allowed unannotated 237s when MaxUnannotatedPlaceholdersAllowed is 2 237s does not register offenses for single unannotated 237s does not register offenses for dual unannotated 237s when MaxUnannotatedPlaceholdersAllowed is 1 237s registers offense for dual unannotated 237s does not register offenses for single unannotated 237s when enforced style is unannotated 237s #correctable_sequence? 237s behaves like enforced styles for format string tokens 237s when enforced style is annotated 237s supports dynamic string with interpolation 237s #correctable_sequence? 237s sets the enforced style to annotated after inspecting "%s" 237s registers offenses for template style 237s detects when the cop must be disabled to avoid offenses 237s behaves like maximum allowed unannotated 237s when MaxUnannotatedPlaceholdersAllowed is 2 237s does not register offenses for dual unannotated 237s does not register offenses for single unannotated 237s when MaxUnannotatedPlaceholdersAllowed is 1 237s does not register offenses for single unannotated 237s registers offense for dual unannotated 237s when enforced style is template 237s #correctable_sequence? 237s detects when the cop must be disabled to avoid offenses 237s does not register offenses for annotated style 237s configures the enforced style to template after inspecting "%{a}" 237s supports dynamic string with interpolation 237s behaves like maximum allowed unannotated 237s when MaxUnannotatedPlaceholdersAllowed is 2 237s does not register offenses for single unannotated 237s does not register offenses for dual unannotated 237s when MaxUnannotatedPlaceholdersAllowed is 1 237s does not register offenses for dual unannotated 237s does not register offenses for single unannotated 237s when enforced style is unannotated 237s #correctable_sequence? 237s behaves like enforced styles for format string tokens 237s when enforced style is annotated 237s sets the enforced style to annotated after inspecting "%s" 237s registers offenses for template style 237s #correctable_sequence? 237s supports dynamic string with interpolation 237s detects when the cop must be disabled to avoid offenses 237s behaves like maximum allowed unannotated 237s when MaxUnannotatedPlaceholdersAllowed is 2 237s does not register offenses for single unannotated 237s does not register offenses for dual unannotated 237s when MaxUnannotatedPlaceholdersAllowed is 1 237s registers offense for dual unannotated 237s does not register offenses for single unannotated 237s when enforced style is unannotated 237s #correctable_sequence? 237s when enforced style is template 237s #correctable_sequence? 237s detects when the cop must be disabled to avoid offenses 237s registers offenses for annotated style 237s supports dynamic string with interpolation 237s configures the enforced style to template after inspecting "%{a}" 237s behaves like maximum allowed unannotated 237s when MaxUnannotatedPlaceholdersAllowed is 1 237s does not register offenses for single unannotated 237s registers offense for dual unannotated 237s when MaxUnannotatedPlaceholdersAllowed is 2 237s does not register offenses for single unannotated 237s does not register offenses for dual unannotated 237s behaves like enforced styles for format string tokens 237s when enforced style is annotated 237s #correctable_sequence? 237s registers offenses for template style 237s sets the enforced style to annotated after inspecting "%s" 237s detects when the cop must be disabled to avoid offenses 237s supports dynamic string with interpolation 237s behaves like maximum allowed unannotated 237s when MaxUnannotatedPlaceholdersAllowed is 1 237s does not register offenses for single unannotated 237s registers offense for dual unannotated 237s when MaxUnannotatedPlaceholdersAllowed is 2 237s does not register offenses for dual unannotated 237s does not register offenses for single unannotated 237s when enforced style is unannotated 237s #correctable_sequence? 237s when enforced style is template 237s configures the enforced style to template after inspecting "%{a}" 237s does not register offenses for annotated style 237s supports dynamic string with interpolation 237s detects when the cop must be disabled to avoid offenses 237s #correctable_sequence? 237s behaves like maximum allowed unannotated 237s when MaxUnannotatedPlaceholdersAllowed is 2 237s does not register offenses for dual unannotated 237s does not register offenses for single unannotated 237s when MaxUnannotatedPlaceholdersAllowed is 1 237s does not register offenses for single unannotated 237s does not register offenses for dual unannotated 237s behaves like enforced styles for format string tokens 237s when enforced style is annotated 237s detects when the cop must be disabled to avoid offenses 237s registers offenses for template style 237s #correctable_sequence? 237s supports dynamic string with interpolation 237s sets the enforced style to annotated after inspecting "%s" 237s behaves like maximum allowed unannotated 237s when MaxUnannotatedPlaceholdersAllowed is 1 237s does not register offenses for single unannotated 237s registers offense for dual unannotated 237s when MaxUnannotatedPlaceholdersAllowed is 2 237s does not register offenses for dual unannotated 237s does not register offenses for single unannotated 237s when enforced style is unannotated 237s #correctable_sequence? 237s when enforced style is template 237s configures the enforced style to template after inspecting "%{a}" 237s detects when the cop must be disabled to avoid offenses 237s #correctable_sequence? 237s supports dynamic string with interpolation 237s does not register offenses for annotated style 237s behaves like maximum allowed unannotated 237s when MaxUnannotatedPlaceholdersAllowed is 1 237s does not register offenses for dual unannotated 237s does not register offenses for single unannotated 237s when MaxUnannotatedPlaceholdersAllowed is 2 237s does not register offenses for dual unannotated 237s does not register offenses for single unannotated 237s behaves like enforced styles for format string tokens 237s when enforced style is unannotated 237s #correctable_sequence? 237s when enforced style is annotated 237s #correctable_sequence? 237s detects when the cop must be disabled to avoid offenses 237s registers offenses for template style 237s supports dynamic string with interpolation 237s sets the enforced style to annotated after inspecting "%s" 237s behaves like maximum allowed unannotated 237s when MaxUnannotatedPlaceholdersAllowed is 1 237s does not register offenses for single unannotated 237s registers offense for dual unannotated 237s when MaxUnannotatedPlaceholdersAllowed is 2 237s does not register offenses for single unannotated 237s does not register offenses for dual unannotated 237s when enforced style is template 237s does not register offenses for annotated style 237s detects when the cop must be disabled to avoid offenses 237s #correctable_sequence? 237s supports dynamic string with interpolation 237s configures the enforced style to template after inspecting "%{a}" 237s behaves like maximum allowed unannotated 237s when MaxUnannotatedPlaceholdersAllowed is 1 237s does not register offenses for dual unannotated 237s does not register offenses for single unannotated 237s when MaxUnannotatedPlaceholdersAllowed is 2 237s does not register offenses for dual unannotated 237s does not register offenses for single unannotated 237s behaves like enforced styles for format string tokens 237s when enforced style is template 237s detects when the cop must be disabled to avoid offenses 237s configures the enforced style to template after inspecting "%{a}" 237s does not register offenses for annotated style 237s supports dynamic string with interpolation 237s #correctable_sequence? 237s behaves like maximum allowed unannotated 237s when MaxUnannotatedPlaceholdersAllowed is 2 237s does not register offenses for dual unannotated 237s does not register offenses for single unannotated 237s when MaxUnannotatedPlaceholdersAllowed is 1 237s does not register offenses for single unannotated 237s does not register offenses for dual unannotated 237s when enforced style is annotated 237s sets the enforced style to annotated after inspecting "%s" 237s #correctable_sequence? 237s registers offenses for template style 237s supports dynamic string with interpolation 237s detects when the cop must be disabled to avoid offenses 237s behaves like maximum allowed unannotated 237s when MaxUnannotatedPlaceholdersAllowed is 2 237s does not register offenses for single unannotated 237s does not register offenses for dual unannotated 237s when MaxUnannotatedPlaceholdersAllowed is 1 237s does not register offenses for single unannotated 237s registers offense for dual unannotated 237s when enforced style is unannotated 237s #correctable_sequence? 237s behaves like enforced styles for format string tokens 237s when enforced style is template 237s #correctable_sequence? 237s does not register offenses for annotated style 237s detects when the cop must be disabled to avoid offenses 237s supports dynamic string with interpolation 237s configures the enforced style to template after inspecting "%{a}" 237s behaves like maximum allowed unannotated 237s when MaxUnannotatedPlaceholdersAllowed is 2 237s does not register offenses for single unannotated 237s does not register offenses for dual unannotated 237s when MaxUnannotatedPlaceholdersAllowed is 1 237s does not register offenses for single unannotated 237s does not register offenses for dual unannotated 237s when enforced style is annotated 237s supports dynamic string with interpolation 237s sets the enforced style to annotated after inspecting "%s" 237s detects when the cop must be disabled to avoid offenses 237s registers offenses for template style 237s #correctable_sequence? 237s behaves like maximum allowed unannotated 237s when MaxUnannotatedPlaceholdersAllowed is 2 237s does not register offenses for single unannotated 237s does not register offenses for dual unannotated 237s when MaxUnannotatedPlaceholdersAllowed is 1 237s does not register offenses for single unannotated 237s registers offense for dual unannotated 237s when enforced style is unannotated 237s #correctable_sequence? 237s behaves like enforced styles for format string tokens 237s when enforced style is unannotated 237s #correctable_sequence? 237s when enforced style is annotated 237s #correctable_sequence? 237s supports dynamic string with interpolation 237s sets the enforced style to annotated after inspecting "%s" 237s registers offenses for template style 237s detects when the cop must be disabled to avoid offenses 237s behaves like maximum allowed unannotated 237s when MaxUnannotatedPlaceholdersAllowed is 1 237s does not register offenses for single unannotated 237s registers offense for dual unannotated 237s when MaxUnannotatedPlaceholdersAllowed is 2 237s does not register offenses for single unannotated 237s does not register offenses for dual unannotated 237s when enforced style is template 237s does not register offenses for annotated style 237s supports dynamic string with interpolation 237s #correctable_sequence? 237s configures the enforced style to template after inspecting "%{a}" 237s detects when the cop must be disabled to avoid offenses 237s behaves like maximum allowed unannotated 237s when MaxUnannotatedPlaceholdersAllowed is 2 237s does not register offenses for single unannotated 237s does not register offenses for dual unannotated 237s when MaxUnannotatedPlaceholdersAllowed is 1 237s does not register offenses for dual unannotated 237s does not register offenses for single unannotated 237s behaves like enforced styles for format string tokens 237s when enforced style is template 237s supports dynamic string with interpolation 237s detects when the cop must be disabled to avoid offenses 237s #correctable_sequence? 237s does not register offenses for annotated style 237s configures the enforced style to template after inspecting "%{a}" 237s behaves like maximum allowed unannotated 237s when MaxUnannotatedPlaceholdersAllowed is 1 237s does not register offenses for dual unannotated 237s does not register offenses for single unannotated 237s when MaxUnannotatedPlaceholdersAllowed is 2 237s does not register offenses for single unannotated 237s does not register offenses for dual unannotated 237s when enforced style is unannotated 237s #correctable_sequence? 237s when enforced style is annotated 237s supports dynamic string with interpolation 237s sets the enforced style to annotated after inspecting "%s" 237s detects when the cop must be disabled to avoid offenses 237s registers offenses for template style 237s #correctable_sequence? 237s behaves like maximum allowed unannotated 237s when MaxUnannotatedPlaceholdersAllowed is 2 237s does not register offenses for single unannotated 237s does not register offenses for dual unannotated 237s when MaxUnannotatedPlaceholdersAllowed is 1 237s registers offense for dual unannotated 237s does not register offenses for single unannotated 237s behaves like enforced styles for format string tokens 237s when enforced style is annotated 237s #correctable_sequence? 237s registers offenses for template style 237s detects when the cop must be disabled to avoid offenses 237s supports dynamic string with interpolation 237s sets the enforced style to annotated after inspecting "%s" 237s behaves like maximum allowed unannotated 237s when MaxUnannotatedPlaceholdersAllowed is 2 237s does not register offenses for dual unannotated 237s does not register offenses for single unannotated 237s when MaxUnannotatedPlaceholdersAllowed is 1 237s registers offense for dual unannotated 237s does not register offenses for single unannotated 237s when enforced style is unannotated 237s #correctable_sequence? 237s when enforced style is template 237s does not register offenses for annotated style 237s supports dynamic string with interpolation 237s #correctable_sequence? 237s detects when the cop must be disabled to avoid offenses 238s configures the enforced style to template after inspecting "%{a}" 238s behaves like maximum allowed unannotated 238s when MaxUnannotatedPlaceholdersAllowed is 2 238s does not register offenses for single unannotated 238s does not register offenses for dual unannotated 238s when MaxUnannotatedPlaceholdersAllowed is 1 238s does not register offenses for single unannotated 238s does not register offenses for dual unannotated 238s behaves like enforced styles for format string tokens 238s when enforced style is unannotated 238s #correctable_sequence? 238s when enforced style is template 238s detects when the cop must be disabled to avoid offenses 238s does not register offenses for annotated style 238s supports dynamic string with interpolation 238s #correctable_sequence? 238s configures the enforced style to template after inspecting "%{a}" 238s behaves like maximum allowed unannotated 238s when MaxUnannotatedPlaceholdersAllowed is 2 238s does not register offenses for single unannotated 238s does not register offenses for dual unannotated 238s when MaxUnannotatedPlaceholdersAllowed is 1 238s does not register offenses for dual unannotated 238s does not register offenses for single unannotated 238s when enforced style is annotated 238s #correctable_sequence? 238s registers offenses for template style 238s detects when the cop must be disabled to avoid offenses 238s supports dynamic string with interpolation 238s sets the enforced style to annotated after inspecting "%s" 238s behaves like maximum allowed unannotated 238s when MaxUnannotatedPlaceholdersAllowed is 1 238s does not register offenses for single unannotated 238s registers offense for dual unannotated 238s when MaxUnannotatedPlaceholdersAllowed is 2 238s does not register offenses for single unannotated 238s does not register offenses for dual unannotated 238s behaves like enforced styles for format string tokens 238s when enforced style is template 238s detects when the cop must be disabled to avoid offenses 238s supports dynamic string with interpolation 238s does not register offenses for annotated style 238s configures the enforced style to template after inspecting "%{a}" 238s #correctable_sequence? 238s behaves like maximum allowed unannotated 238s when MaxUnannotatedPlaceholdersAllowed is 2 238s does not register offenses for single unannotated 238s does not register offenses for dual unannotated 238s when MaxUnannotatedPlaceholdersAllowed is 1 238s does not register offenses for dual unannotated 238s does not register offenses for single unannotated 238s when enforced style is unannotated 238s #correctable_sequence? 238s when enforced style is annotated 238s detects when the cop must be disabled to avoid offenses 238s registers offenses for template style 238s supports dynamic string with interpolation 238s sets the enforced style to annotated after inspecting "%s" 238s #correctable_sequence? 238s behaves like maximum allowed unannotated 238s when MaxUnannotatedPlaceholdersAllowed is 2 238s does not register offenses for single unannotated 238s does not register offenses for dual unannotated 238s when MaxUnannotatedPlaceholdersAllowed is 1 238s does not register offenses for single unannotated 238s registers offense for dual unannotated 238s behaves like enforced styles for format string tokens 238s when enforced style is annotated 238s supports dynamic string with interpolation 238s detects when the cop must be disabled to avoid offenses 238s registers offenses for template style 238s sets the enforced style to annotated after inspecting "%s" 238s #correctable_sequence? 238s behaves like maximum allowed unannotated 238s when MaxUnannotatedPlaceholdersAllowed is 1 238s registers offense for dual unannotated 238s does not register offenses for single unannotated 238s when MaxUnannotatedPlaceholdersAllowed is 2 238s does not register offenses for dual unannotated 238s does not register offenses for single unannotated 238s when enforced style is template 238s #correctable_sequence? 238s configures the enforced style to template after inspecting "%{a}" 238s does not register offenses for annotated style 238s detects when the cop must be disabled to avoid offenses 238s supports dynamic string with interpolation 238s behaves like maximum allowed unannotated 238s when MaxUnannotatedPlaceholdersAllowed is 1 238s does not register offenses for single unannotated 238s does not register offenses for dual unannotated 238s when MaxUnannotatedPlaceholdersAllowed is 2 238s does not register offenses for dual unannotated 238s does not register offenses for single unannotated 238s when enforced style is unannotated 238s #correctable_sequence? 238s when enforced style is template 238s gives a helpful error message 238s behaves like enforced styles for format string tokens 238s when enforced style is annotated 238s supports dynamic string with interpolation 238s #correctable_sequence? 238s sets the enforced style to annotated after inspecting "%s" 238s detects when the cop must be disabled to avoid offenses 238s registers offenses for template style 238s behaves like maximum allowed unannotated 238s when MaxUnannotatedPlaceholdersAllowed is 1 238s does not register offenses for single unannotated 238s registers offense for dual unannotated 238s when MaxUnannotatedPlaceholdersAllowed is 2 238s does not register offenses for single unannotated 238s does not register offenses for dual unannotated 238s when enforced style is unannotated 238s #correctable_sequence? 238s when enforced style is template 238s configures the enforced style to template after inspecting "%{a}" 238s detects when the cop must be disabled to avoid offenses 238s supports dynamic string with interpolation 238s does not register offenses for annotated style 238s #correctable_sequence? 238s behaves like maximum allowed unannotated 238s when MaxUnannotatedPlaceholdersAllowed is 2 238s does not register offenses for single unannotated 238s does not register offenses for dual unannotated 238s when MaxUnannotatedPlaceholdersAllowed is 1 238s does not register offenses for single unannotated 238s does not register offenses for dual unannotated 238s behaves like enforced styles for format string tokens 238s when enforced style is unannotated 238s #correctable_sequence? 238s when enforced style is annotated 238s registers offenses for template style 238s supports dynamic string with interpolation 238s sets the enforced style to annotated after inspecting "%s" 238s #correctable_sequence? 238s detects when the cop must be disabled to avoid offenses 238s behaves like maximum allowed unannotated 238s when MaxUnannotatedPlaceholdersAllowed is 1 238s registers offense for dual unannotated 238s does not register offenses for single unannotated 238s when MaxUnannotatedPlaceholdersAllowed is 2 238s does not register offenses for single unannotated 238s does not register offenses for dual unannotated 238s when enforced style is template 238s #correctable_sequence? 238s detects when the cop must be disabled to avoid offenses 238s supports dynamic string with interpolation 238s does not register offenses for annotated style 238s configures the enforced style to template after inspecting "%{a}" 238s behaves like maximum allowed unannotated 238s when MaxUnannotatedPlaceholdersAllowed is 1 238s does not register offenses for dual unannotated 238s does not register offenses for single unannotated 238s when MaxUnannotatedPlaceholdersAllowed is 2 238s does not register offenses for dual unannotated 238s does not register offenses for single unannotated 238s behaves like enforced styles for format string tokens 238s when enforced style is unannotated 238s #correctable_sequence? 238s when enforced style is annotated 238s detects when the cop must be disabled to avoid offenses 238s #correctable_sequence? 238s registers offenses for template style 238s sets the enforced style to annotated after inspecting "%s" 238s supports dynamic string with interpolation 238s behaves like maximum allowed unannotated 238s when MaxUnannotatedPlaceholdersAllowed is 2 238s does not register offenses for dual unannotated 238s does not register offenses for single unannotated 238s when MaxUnannotatedPlaceholdersAllowed is 1 238s registers offense for dual unannotated 238s does not register offenses for single unannotated 238s when enforced style is template 238s supports dynamic string with interpolation 238s does not register offenses for annotated style 238s detects when the cop must be disabled to avoid offenses 238s #correctable_sequence? 238s configures the enforced style to template after inspecting "%{a}" 238s behaves like maximum allowed unannotated 238s when MaxUnannotatedPlaceholdersAllowed is 2 238s does not register offenses for single unannotated 238s does not register offenses for dual unannotated 238s when MaxUnannotatedPlaceholdersAllowed is 1 238s does not register offenses for single unannotated 238s does not register offenses for dual unannotated 238s when enforced style is annotated 238s gives a helpful error message 238s when AllowedMethods is disabled 238s registers an offense 238s when AllowedMethods is enabled 238s does not register an offense for value in nested structure 238s does not register an offense 238s registers an offense for different method call within ignored method 238s when AllowedPatterns is disabled 238s registers an offense 238s when AllowedPatterns is enabled 238s does not register an offense 238s does not register an offense for value in nested structure 238s registers an offense for different method call within ignored method 238s when enforced style is unannotated 238s gives a helpful error message 238s behaves like enforced styles for format string tokens 238s when enforced style is unannotated 238s #correctable_sequence? 238s when enforced style is annotated 238s sets the enforced style to annotated after inspecting "%s" 238s detects when the cop must be disabled to avoid offenses 238s registers offenses for template style 238s #correctable_sequence? 238s supports dynamic string with interpolation 238s behaves like maximum allowed unannotated 238s when MaxUnannotatedPlaceholdersAllowed is 2 238s does not register offenses for single unannotated 238s does not register offenses for dual unannotated 238s when MaxUnannotatedPlaceholdersAllowed is 1 238s does not register offenses for single unannotated 238s registers offense for dual unannotated 238s when enforced style is template 238s does not register offenses for annotated style 238s configures the enforced style to template after inspecting "%{a}" 238s #correctable_sequence? 238s detects when the cop must be disabled to avoid offenses 238s supports dynamic string with interpolation 238s behaves like maximum allowed unannotated 238s when MaxUnannotatedPlaceholdersAllowed is 1 238s does not register offenses for single unannotated 238s does not register offenses for dual unannotated 238s when MaxUnannotatedPlaceholdersAllowed is 2 238s does not register offenses for dual unannotated 238s does not register offenses for single unannotated 238s 238s RuboCop::Cop::Lint::StructNewOverride 238s registers an offense using `Struct.new(string, ...symbols)` 238s registers an offense using `::Struct.new(symbol)` 238s registers an offense using `Struct.new(...)` with a block 238s registers an offense using `Struct.new(...)` with multiple overrides 238s does not register an offense with no overrides 238s registers an offense using `Struct.new(symbol, string)` 238s registers an offense using `Struct.new(...)` with an option argument 238s does not register an offense with an override within a given block 238s registers an offense using `Struct.new(...symbols)` 238s registers an offense using `Struct.new(symbol)` 238s 238s RuboCop::Cop::Style::Sample 238s Ruby >= 2.6 238s behaves like accepts 238s accepts shuffle[3..] 238s behaves like accepts 238s accepts shuffle[3...] 238s behaves like accepts 238s accepts shuffle.map { |e| e } 238s behaves like accepts 238s accepts shuffle.at(foo) 238s behaves like accepts 238s accepts shuffle.slice(foo, bar) 238s behaves like offense 238s registers an offense for shuffle(random: Random.new).first 238s behaves like accepts 238s accepts shuffle[foo..bar] 238s behaves like accepts 238s accepts shuffle.slice(2) 238s behaves like accepts 238s accepts shuffle.slice(foo..3) 238s behaves like accepts 238s accepts shuffle.at(2) 238s behaves like accepts 238s accepts shuffle[foo] 238s behaves like offense 238s registers an offense for shuffle.slice(0) 238s behaves like accepts 238s accepts shuffle.join([5, 6, 7]) 238s behaves like accepts 238s accepts shuffle.slice(-4..-3) 238s behaves like offense 238s registers an offense for shuffle[-1] 238s behaves like offense 238s registers an offense for shuffle(random: Random.new)[0..3] 238s behaves like offense 238s registers an offense for shuffle.last 238s behaves like offense 238s registers an offense for shuffle.first(2) 238s behaves like accepts 238s accepts shuffle(random: Random.new)[2, 3] 238s behaves like offense 238s registers an offense for shuffle[0, 3] 238s behaves like offense 238s registers an offense for shuffle.slice(0..3) 238s behaves like accepts 238s accepts shuffle.slice(foo, 3) 238s behaves like accepts 238s accepts shuffle.slice(3, 3) 238s behaves like accepts 238s accepts shuffle.slice(foo..bar) 238s behaves like accepts 238s accepts shuffle.slice(2..-3) 238s behaves like accepts 238s accepts shuffle 238s behaves like offense 238s registers an offense for shuffle.slice(0...3) 238s behaves like accepts 238s accepts shuffle[2] 238s behaves like offense 238s registers an offense for shuffle.first 238s behaves like offense 238s registers an offense for shuffle.slice(-1) 238s behaves like accepts 238s accepts sample 238s behaves like accepts 238s accepts shuffle(random: Random.new).find(&:odd?) 238s behaves like accepts 238s accepts shuffle.slice(foo) 238s behaves like offense 238s registers an offense for shuffle(random: foo).last(bar) 238s behaves like accepts 238s accepts shuffle[2..3] 238s behaves like accepts 238s accepts shuffle[foo, bar] 238s behaves like offense 238s registers an offense for shuffle(random: Random.new).first(2) 238s behaves like accepts 238s accepts shuffle[3, 3] 238s behaves like offense 238s registers an offense for shuffle.at(0) 238s behaves like accepts 238s accepts shuffle[foo..3] 238s behaves like offense 238s registers an offense for shuffle[0...3] 238s behaves like offense 238s registers an offense for shuffle.last(bar) 238s behaves like accepts 238s accepts shuffle(random: Random.new) 238s behaves like offense 238s registers an offense for shuffle[0] 238s Ruby >= 2.7 238s behaves like offense 238s registers an offense for shuffle[...3] 238s behaves like accepts 238s accepts shuffle.slice(2..3) 238s behaves like accepts 238s accepts shuffle[foo, 3] 238s behaves like offense 238s registers an offense for shuffle.slice(0, 3) 238s behaves like offense 238s registers an offense for shuffle.first(foo) 238s behaves like accepts 238s accepts shuffle[-4..-3] 238s behaves like offense 238s registers an offense for shuffle.at(-1) 238s behaves like offense 238s registers an offense for shuffle[0..3] 238s behaves like accepts 238s accepts shuffle[2..-3] 238s behaves like offense 238s registers an offense for shuffle.last(3) 238s behaves like accepts 238s accepts shuffle(random: Random.new)[2] 238s 238s RuboCop::Cop::Style::TrailingMethodEndStatement 238s register offense with trailing end on 3 line method 238s autocorrects all trailing ends for larger example 238s does not register on single line no op 238s register offense with trailing end on 2 line method 238s register offense with trailing end on method with comment 238s does not register on single line method 238s register offense with trailing end inside class 238s register offense with trailing end on method with block 238s when Ruby 3.0 or higher 238s does not register an offense when endless method definition signature and body are on different lines 238s does not register an offense when using endless method definition 238s 238s RuboCop::ConfigRegeneration 238s #options 238s it parses options from the generation comment 238s is expected to eq {:auto_gen_config=>true, :auto_gen_only_exclude=>true, :auto_gen_timestamp=>false, :exclude_limit=>"100", :offense_counts=>false} 238s when there is a blank todo file 238s is expected to eq {:auto_gen_config=>true} 238s when no todo file exists 238s is expected to eq {:auto_gen_config=>true} 238s when the todo file is malformed 238s is expected to eq {:auto_gen_config=>true} 238s 238s RuboCop::Cop::Lint::AmbiguousOperatorPrecedence 238s registers an offense for expressions containing booleans and operators 238s registers an offense when the entire expression is wrapped in parentheses 238s corrects a super long expression in precedence order 238s registers an offense when an expression with mixed boolean operators has no parens 238s corrects a super long expression in reverse precedence order 238s allows an operator with `or` 238s does not register an offense when expressions are wrapped in parentheses by precedence 238s does not register an offense when there is only one operator in the expression 238s does not register an offense when boolean expressions are wrapped in parens 238s does not register an offense when all operators in the expression have the same precedence 238s registers an offense when an expression with mixed precedence has no parens 238s allows an operator with `and` 238s does not register an offense when expressions are wrapped in parentheses by reverse precedence 238s 238s RuboCop::Cop::Lint::EnsureReturn 238s registers an offense and corrects for return in ensure 238s registers an offense when returning multiple values in `ensure` 238s registers an offense and corrects for return with argument in ensure 238s does not check when ensure block has no body 238s does not register an offense for return outside ensure 238s 238s RuboCop::Cop::Style::SymbolArray 238s with non-default MinSize 238s does not autocorrect array of one symbol if MinSize > 1 238s when EnforcedStyle is brackets 238s registers an offense for empty array starting with %i 238s registers an offense for array starting with %i 238s autocorrects multiline %i array 238s autocorrects an array has interpolations 238s autocorrects an array starting with %i 238s does not register an offense for arrays of symbols 238s when EnforcedStyle is percent 238s autocorrects arrays of symbols with embedded newlines and tabs 238s does not register an offense for array with non-syms 238s detects right value for MinSize to use for --auto-gen-config 238s does not register an offense if symbol contains whitespace 238s registers an offense for arrays of symbols 238s does not register an offense for array starting with %i 238s registers an offense in a non-ambiguous block context 238s detects when the cop must be disabled to avoid offenses 238s autocorrects arrays of one symbol 238s uses %I when appropriate 238s doesn't break when a symbol contains ) 238s autocorrects arrays of symbols with new line 238s when PreferredDelimiters is specified 238s autocorrects an array in multiple lines 238s autocorrects an array with delimiters 238s autocorrects an array using partial newlines 238s 238s RuboCop::Cop::Layout::EmptyLinesAroundClassBody 238s when EnforcedStyle is empty_lines_except_namespace 238s when only child is class 238s registers offenses for namespaced class body not ending with a blank 238s registers offense for namespace body starting with a blank 238s autocorrects beginning and end 238s requires no empty lines for namespace 238s registers offense for namespace body ending with a blank 238s registers offenses for namespaced class body not starting with a blank 238s when only child is module 238s registers offense for namespace body starting with a blank 238s requires no empty lines for namespace 238s registers offense for namespace body ending with a blank 238s when has multiple child classes 238s registers offenses for namespace body starting and ending without a blank 238s requires empty lines for namespace 238s when EnforcedStyle is empty_lines 238s accepts singleton classes with an empty body 238s accepts classes with an empty body 238s registers an offense for singleton class body not starting or ending with a blank 238s registers an offense for class body not starting or ending with a blank 238s does not register offenses when specifying a superclass that breaks the line 238s does not register offenses 238s when EnforcedStyle is ending_only 238s registers an offense for an empty line at the end of a class 238s ignores empty lines at the beginning of a class 238s when EnforcedStyle is beginning_only 238s registers an offense for an empty line at the end of a class 238s ignores empty lines at the beginning of a class 238s when EnforcedStyle is empty_lines_special 238s class with constant and child class 238s registers and autocorrects the offenses 238s when first child is NOT a method 238s 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 238s source without blank lines 238s registers an offense for class not ending with a blank line 238s source with blank lines 238s registers an offense for class beginning with a blank line 238s when class has a namespace 238s 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 238s source with constants 238s registers and autocorrects the offenses 238s source with blank lines 238s registers and autocorrects the offenses 238s source without blank lines 238s registers and autocorrects the offenses 238s source with comment before method definition 238s registers an offense for class beginning with a blank line 238s when first child is a method 238s requires blank line at the beginning and ending of class body 238s when class has a namespace 238s requires no empty lines for namespace but requires blank line at the beginning and ending of class body 238s source without blank lines 238s registers and autocorrects the offenses 238s source with blank lines 238s autocorrects the offenses 238s source without blank lines 238s registers an offense for class not beginning and ending with a blank line 238s when namespace has multiple children 238s requires empty lines for namespace 238s class with empty body 238s with empty line 238s does NOT register offenses 238s without empty line 238s does NOT register offenses 238s class with only constants 238s registers and autocorrects the offenses 238s when first child is an access modifier 238s with blank lines at the beginning and ending of class body 238s registers no offense 238s with no blank lines at the beginning and ending of class body 238s registers and corrects an offense 238s when EnforcedStyle is no_empty_lines 238s registers an offense for class body starting with a blank 238s autocorrects singleton class body containing only a blank 238s registers an offense for singleton class body ending with a blank 238s registers an offense for class body ending with a blank 238s 238s RuboCop::Cop::Lint::DeprecatedOpenSSLConstant 238s registers an offense with cipher constant and one argument and corrects 238s registers an offense with cipher constant and no arguments and corrects 238s registers an offense with cipher constant and no arguments and corrects 238s does not register an offense with cipher constant and argument is a constant 238s does not register an offense when using ::Digest class methods with an algorithm string and value 238s registers an offense when using ::Digest class methods on an algorithm constant and corrects 238s registers an offense with AES + blocksize constant and corrects 238s does not register an offense with cipher constant and argument is a variable 238s registers an offense with cipher constant and two arguments and corrects 238s registers an offense with cipher constant and no arguments and corrects 238s does not register an offense with cipher constant and send argument is a method 238s does not register an offense when building digest using an algorithm string 238s registers an offense when building an instance using an digest constant and corrects 238s registers an offense with cipher constant and double quoted string argument and corrects 239s does not register an offense when building digest using an algorithm string and nested digest constants 239s registers an offense with cipher constant and no arguments and corrects 239s registers an offense with cipher constant and `cbc` argument and corrects 239s registers an offense when using an digest constant with chained methods and corrects 239s registers an offense with AES + blocksize constant and mode argument and corrects 239s does not register an offense when using cipher with a string 239s when used in a block 239s registers an offense when using ::Digest class methods on an algorithm constant and corrects 239s 239s RuboCop::Cop::Style::MissingElse 239s EmptyElse enabled and set to warn on empty 239s given an unless-statement 239s with a completely empty else-clause 239s doesn't register an offense 239s with an else-clause with side-effects 239s doesn't register an offense 239s with no else-clause 239s registers an offense 239s with an else-clause containing only the literal nil 239s doesn't register an offense 239s given a case statement 239s with a completely empty else-clause 239s doesn't register an offense 239s with an else-clause containing only the literal nil 239s doesn't register an offense 239s with no else-clause 239s registers an offense 239s with an else-clause with side-effects 239s doesn't register an offense 239s given an if-statement 239s with an else-clause containing only the literal nil 239s doesn't register an offense 239s with a completely empty else-clause 239s doesn't register an offense 239s with no else-clause 239s registers an offense 239s with an else-clause with side-effects 239s doesn't register an offense 239s >= Ruby 2.7 239s does not register an offense 239s UnlessElse disabled 239s given an unless-statement 239s with no else-clause 239s registers an offense 239s with a completely empty else-clause 239s doesn't register an offense 239s with an else-clause containing only the literal nil 239s doesn't register an offense 239s with an else-clause with side-effects 239s doesn't register an offense 239s given a case statement 239s with an else-clause with side-effects 239s doesn't register an offense 239s with an else-clause containing only the literal nil 239s doesn't register an offense 239s with a completely empty else-clause 239s doesn't register an offense 239s with no else-clause 239s registers an offense 239s >= Ruby 2.7 239s does not register an offense 239s given an if-statement 239s with no else-clause 239s registers an offense 239s with an else-clause containing only the literal nil 239s doesn't register an offense 239s with an else-clause with side-effects 239s doesn't register an offense 239s with a completely empty else-clause 239s doesn't register an offense 239s EmptyElse enabled and set to warn on nil 239s given a case statement 239s with an else-clause containing only the literal nil 239s doesn't register an offense 239s with no else-clause 239s registers an offense 239s with a completely empty else-clause 239s doesn't register an offense 239s with an else-clause with side-effects 239s doesn't register an offense 239s given an if-statement 239s with a completely empty else-clause 239s doesn't register an offense 239s with an else-clause containing only the literal nil 239s doesn't register an offense 239s with no else-clause 239s registers an offense 239s with an else-clause with side-effects 239s doesn't register an offense 239s >= Ruby 2.7 239s does not register an offense 239s given an unless-statement 239s with no else-clause 239s registers an offense 239s with a completely empty else-clause 239s doesn't register an offense 239s with an else-clause with side-effects 239s doesn't register an offense 239s with an else-clause containing only the literal nil 239s doesn't register an offense 239s configured to warn only on empty if 239s >= Ruby 2.7 239s does not register an offense 239s given an if-statement 239s with no else-clause 239s registers an offense 239s with an else-clause with side-effects 239s doesn't register an offense 239s with a completely empty else-clause 239s doesn't register an offense 239s with an else-clause containing only the literal nil 239s doesn't register an offense 239s given a case statement 239s with a completely empty else-clause 239s doesn't register an offense 239s with an else-clause containing only the literal nil 239s doesn't register an offense 239s with no else-clause 239s doesn't register an offense 239s with an else-clause with side-effects 239s doesn't register an offense 239s given an unless-statement 239s with an else-clause containing only the literal nil 239s doesn't register an offense 239s with an else-clause with side-effects 239s doesn't register an offense 239s with a completely empty else-clause 239s doesn't register an offense 239s with no else-clause 239s registers an offense 239s configured to warn only on empty case 239s given a case statement 239s with no else-clause 239s registers an offense 239s with an else-clause with side-effects 239s doesn't register an offense 239s with a completely empty else-clause 239s doesn't register an offense 239s with an else-clause containing only the literal nil 239s doesn't register an offense 239s given an if-statement 239s with a completely empty else-clause 239s doesn't register an offense 239s with no else-clause 239s doesn't register an offense 239s with an else-clause containing only the literal nil 239s doesn't register an offense 239s with an else-clause with side-effects 239s doesn't register an offense 239s given an unless-statement 239s with an else-clause with side-effects 239s doesn't register an offense 239s with an else-clause containing only the literal nil 239s doesn't register an offense 239s with no else-clause 239s doesn't register an offense 239s with a completely empty else-clause 239s doesn't register an offense 239s >= Ruby 2.7 239s does not register an offense 239s UnlessElse enabled 239s given an if-statement 239s with no else-clause 239s registers an offense 239s with an else-clause with side-effects 239s doesn't register an offense 239s with a completely empty else-clause 239s doesn't register an offense 239s with an else-clause containing only the literal nil 239s doesn't register an offense 239s given an unless-statement 239s with no else-clause 239s doesn't register an offense 239s with an else-clause with side-effects 239s doesn't register an offense 239s with an else-clause containing only the literal nil 239s doesn't register an offense 239s with a completely empty else-clause 239s doesn't register an offense 239s given a case statement 239s with an else-clause containing only the literal nil 239s doesn't register an offense 239s with a completely empty else-clause 239s doesn't register an offense 239s with an else-clause with side-effects 239s doesn't register an offense 239s with no else-clause 239s registers an offense 239s >= Ruby 2.7 239s does not register an offense 239s 239s RuboCop::Cop::Layout::SpaceAroundMethodCallOperator 239s does not register an offense when no method call operator 239s does not register an offense when using `__ENCODING__` 239s safe navigation operator 239s registers an offense and corrects when space around intermediate method call operator 239s registers an offense and corrects when spaces around method call 239s registers an offense and corrects when spaces after method call 239s registers an offense and corrects when space before method call 239s registers an offense and corrects when space before last method call operator 239s registers an offense and corrects when spaces before method call 239s registers an offense and corrects when space after last method call operator 239s does not register an offense when no space around any `.` operators 239s registers an offense and corrects when space after method call 239s registers an offense and corrects when space before first method call operator 239s does not register an offense when no space around method call 239s registers an offense and corrects when space around multiple method call operator 239s registers an offense and corrects when space after first method call operator 239s when multi line method call 239s registers an offense and corrects when space before method call 239s registers an offense and corrects when space before method call in suffix chaining 239s does not register an offense when no space after the `&.` 239s dot operator 239s does not register an offense when no space around method call 239s registers an offense and corrects when space before first method call operator 239s registers an offense and corrects when spaces after method call 239s registers an offense and corrects when spaces around method call 239s registers an offense and corrects when spaces after `Proc#call` shorthand call 239s does not register an offense when no space around any `.` operators 239s registers an offense and corrects when space around multiple method call operator 239s registers an offense and corrects when space before last method call operator 239s registers an offense and corrects when space around intermediate method call operator 239s registers an offense and corrects when space before method call 239s registers an offense and corrects when spaces before method call 239s registers an offense and corrects when space after last method call operator 239s registers an offense and corrects when space after first method call operator 239s registers an offense and corrects when space after method call 239s when there is a space between `.` operator and a comment 239s registers an offense when there is a space before `.` 239s does not register an offense when there is not a space before `.` 239s when multi line method call 239s does not register an offense when no space after the `.` 239s registers an offense and corrects when space before method call in suffix chaining 239s registers an offense and corrects when space before method call 239s :: operator 239s registers an offense and corrects when space after last method call operator 239s registers an offense and corrects when space around multiple method call operator 239s does not register an offense when no space around method call 239s does not register an offense if no space before `::` operator with inheritance 239s does not register an offense if no space before `::` operator with assignment 239s registers an offense and corrects when space after method call 239s registers an offense and corrects when space around intermediate method call operator 239s registers an offense and corrects when multiple spaces with assignment 239s does not register an offense if no space with conditionals 239s does not register an offense when no space around any `.` operators 239s registers an offense and corrects when space after first operator with assignment 239s registers an offense and corrects when spaces after method call 239s when multi line method call 239s registers an offense and corrects when space before method call 239s does not register an offense when no space after the `::` 239s 239s RuboCop::Cop::Style::SingleArgumentDig 239s when without a receiver 239s does not register an offense 239s dig over literal 239s with multiple arguments 239s does not register an offense 239s when using dig with splat operator 239s does not register an offense 239s with single argument 239s registers an offense and corrects unsuitable use of dig 239s >= Ruby 2.7 239s when using dig with arguments forwarding 239s does not register an offense 239s dig over a variable as caller 239s with multiple arguments 239s does not register an offense 239s when using multiple `dig` in a method chain 239s registers and corrects an offense 239s when using dig with splat operator 239s does not register an offense 239s with single argument 239s registers an offense and corrects unsuitable use of dig 239s 239s RuboCop::Cop::Style::RedundantSort 239s registers an offense when [-1] is called on sort_by 239s does not register an offense when first is used before sort 239s does not register an offense when sort_by is used without first 239s does not register an offense when first has an argument 239s registers an offense when first is called on sort_by with line breaks and `and` operator 239s does not register an offense when sort has an argument 239s registers an offense with `sort_by { a || b }` 239s registers an offense when [0] is called on sort_by 239s registers an offense when at(0) is called on sort_by 239s registers an offense when first is called on sort_by with line breaks and `||` operator 239s registers an offense when at(-1) is called with sort 239s registers an offense when last is called on sort_by no block 239s registers an offense when [](0) is called on sort 239s registers an offense when first is called on sort_by with line breaks and `or` operator 239s does not register an offense for sort!.first 239s registers an offense when first is called on sort_by no block 239s registers an offense when first is called on sort_by with line breaks and `&&` operator 239s registers an offense when slice(0) is called on sort_by 239s registers an offense when slice(0) is called on sort 239s registers an offense when [](-1) is called on sort_by 239s does not register an offense when sort_by is not given a block 239s registers an offense when first is called on sort_by with line breaks 239s registers an offense when last is called with sort 239s registers an offense when last is called on sort_by 239s registers an offense when first is called with sort 239s registers an offense when [-1] is called on sort 239s registers an offense when slice(-1) is called on sort_by 239s registers an offense when [0] is called on sort 239s does not register an offense for sort_by!(&:something).last 239s does not register an offense when first is used without sort_by 239s registers an offense when last is called on sort with comparator 239s registers an offense when first is called on sort_by 239s when not taking first or last element 239s does not register an offense when at(-2) is called on sort_by 239s does not register an offense when [-1] is called on sort with an argument 239s does not register an offense when [1] is called on sort 239s >= Ruby 2.7 239s when using numbered parameter 239s registers an offense and corrects when last is called on sort with comparator 239s registers an offense and corrects when at(0) is called on sort_by 239s registers an offense and corrects when first is called on sort_by 239s 239s RuboCop::Ext::RegexpNode 239s #parsed_tree 239s with an extended mode regexp with comment 239s returns the expected tree 239s with a regexp containing interpolation 239s returns the expected blanked tree 239s with a regexp with subexpressions 239s has location information 239s with a regexp containing a multi-line interpolation 239s returns the expected blanked tree 239s with a regexp not containing interpolation 239s returns the expected tree 239s #each_capture 239s when called with a `named: false` 239s is expected to match [(be an instance of Regexp::Expression::Group::Capture)] 239s when called without argument 239s is expected to match [(be an instance of Regexp::Expression::Group::Capture), (be an instance of Regexp::Expression::Group::Named)] 239s when called with a `named: true` 239s is expected to match [(be an instance of Regexp::Expression::Group::Named)] 239s 239s RuboCop::Cop::Metrics::Utils::AbcSizeCalculator 239s #calculate 239s elsif vs else if 239s elsif 239s is expected to eq "<0, 5, 3>" 239s else if 239s is expected to eq "<0, 5, 4>" 239s with &.foo 239s is expected to eq "<0, 4, 2>" 239s with repeated lvar receivers 239s is expected to eq "<3, 5, 3>" 239s multiple assignment 239s is expected to eq "<3, 1, 0>" 239s assignment with ternary operator 239s is expected to eq "<2, 6, 2>" 239s with unused assignments 239s is expected to eq "<2, 1, 0>" 239s with []= 239s is expected to eq "<2, 1, 0>" 239s with &&= 239s is expected to eq "<2, 0, 1>" 239s with a yield 239s is expected to eq "<0, 1, 0>" 239s with += 239s is expected to eq "<2, 0, 0>" 239s if and arithmetic operations 239s is expected to eq "<2, 8, 4>" 239s multiple assignment with method setters 239s is expected to eq "<3, 5, 0>" 239s with a known iterating block 239s is expected to eq "<2, 4, 2>" 239s same with extra condition 239s is expected to eq "<2, 9, 5>" 239s with .foo = 239s is expected to eq "<1, 2, 0>" 239s with a for 239s is expected to eq "<2, 1, 1>" 239s when counting repeated calls 239s is expected to eq "<1, 4, 0>" 239s with ||= on a constant 239s is expected to eq "<1, 0, 1>" 239s multiple calls with return 239s is expected to eq "<0, 3, 0>" 239s method with arguments 239s is expected to eq "<4, 0, 0>" 239s with += for setters 239s is expected to eq "<1, 2, 0>" 239s with a block 239s is expected to eq "<2, 3, 0>" 239s with ||= 239s is expected to eq "<2, 0, 1>" 239s equivalent to multiple assignment with method setters 239s is expected to eq "<3, 5, 0>" 239s when discounting repeated calls 239s when root receiver is self/nil 239s is expected to eq "<2, 9, 1>" 239s when root receiver is a var 239s is expected to eq "<3, 9, 0>" 239s when some calls have arguments 239s is expected to eq "<1, 7, 0>" 239s same but with 7 arguments 239s is expected to eq "<9, 3, 0>" 239s 239s RuboCop::Cop::Layout::SpaceAfterColon 239s accepts colons in strings 239s registers an offense and corrects colon without space after it 239s registers an offense and corrects a keyword optional argument without a space 239s accepts hashes with a space after colons 239s accepts colon in ternary followed by space 239s accepts if 239s accepts colons denoting required keyword argument 239s accepts required keyword arguments 239s accepts hash rockets 239s accepts colons in symbols 239s Ruby >= 3.1 239s does not register an offense colon without space after it when using hash value omission 239s accepts colons denoting hash value omission argument 239s 239s RuboCop::Cop::Lint::MissingCopEnableDirective 239s when the maximum range size is infinite 239s does not register an offense when the disable cop is re-enabled 239s registers an offense when a cop is disabled and never re-enabled 239s does not register an offense when the disable department is re-enabled 239s registers an offense when a department is disabled and never re-enabled 239s when the maximum range size is finite 239s does not register an offense when the disable department is re-enabled within the limit 239s registers an offense when a department is disabled and never re-enabled 239s registers an offense when a department is disabled for too many lines 239s registers an offense when a cop is disabled and never re-enabled 239s does not register an offense when the disable cop is re-enabled within the limit 239s registers an offense when a cop is disabled for too many lines 239s when the cop is disabled in the config 239s reports no offense when re-disabling it until EOF 239s 239s RuboCop::TargetFinder 239s #find(..., :only_recognized_file_types) 239s returns absolute paths 239s does not find hidden files 239s when some paths are specified in the configuration Exclude and they are explicitly passed as arguments 239s when it's forced to adhere file exclusion configuration 239s excludes them 239s normally 239s does not exclude them 239s when input is passed on stdin 239s includes the file 239s when a file with a ruby filename is passed 239s picks all the ruby files 239s when a hidden directory path is passed 239s finds files under the specified directory 239s when a directory path is passed 239s finds files under the specified directory 239s when a hidden directory path is passed 239s finds files under the specified directory 239s when some non-known Ruby files are specified in the configuration Include and they are not explicitly passed as arguments 239s includes them 239s when a pattern is passed 239s finds files which match the pattern 239s when same paths are passed 239s does not return duplicated file paths 239s when no argument is passed 239s finds files under the current directory 239s when files with a ruby extension are passed 239s picks all the ruby files 239s when local AllCops/Include lists two patterns 239s picks two files 239s when a subdirectory AllCops/Include only lists one pattern 239s picks two files 239s when some non-known Ruby files are specified in the configuration Include and they are explicitly passed as arguments 239s includes them 239s when a non-ruby file is passed 239s doesn't pick the file 239s when files with ruby interpreters are passed 239s picks all the ruby files 239s #target_files_in_dir 239s picks ruby executable files with no extension 239s does not pick files specified to be excluded in config 239s picks files with extension .rb 239s does not pick directories 239s picks files specified to be included in config 239s does not pick files with no extension and no ruby shebang 239s when an exception is raised while reading file 239s and debug mode is enabled 239s outputs error message 239s and debug mode is disabled 239s outputs nothing 239s w/ --fail-fast option 239s works with the expected number of .rb files 239s #find_files 239s can exclude symlinks as well as directories 239s works also if a folder is named "**" 239s works also if a folder is named "," 239s prevents infinite loops when traversing symlinks 239s resolves symlinks when looking for excluded directories 239s does not search excluded top level directories 239s works also if a folder is named "{}" 239s #find(..., :all_file_types) 239s returns absolute paths 239s does not find hidden files 239s when files with ruby interpreters are passed 239s picks all the ruby files 239s when some non-known Ruby files are specified in the configuration Include and they are not explicitly passed as arguments 239s includes them 239s when a non-ruby file is passed 239s picks the file 239s when a file with a ruby filename is passed 239s picks all the ruby files 239s when some non-known Ruby files are specified in the configuration Include and they are explicitly passed as arguments 239s includes them 239s when some paths are specified in the configuration Exclude and they are explicitly passed as arguments 239s when it's forced to adhere file exclusion configuration 239s excludes them 239s normally 239s does not exclude them 239s when input is passed on stdin 239s includes the file 239s when same paths are passed 239s does not return duplicated file paths 239s when files with a ruby extension are passed 239s picks all the ruby files 239s when local AllCops/Include lists two patterns 239s picks all the ruby files 239s when a subdirectory AllCops/Include only lists one pattern 239s picks all the ruby files 239s when a directory path is passed 239s finds files under the specified directory 239s when a pattern is passed 239s finds files which match the pattern 239s when no argument is passed 239s finds files under the current directory 239s when a hidden directory path is passed 239s finds files under the specified directory 239s 239s RuboCop::Cop::Lint::CircularArgumentReference 239s circular argument references in keyword arguments 239s when the keyword argument is not circular, but calls a method of some other object with the same name 239s does not register an offense 239s when the keyword argument is not circular, but calls a method of its own class with a self specification 239s does not register an offense 239s when there are multiple offensive keyword arguments 239s registers an offense 239s when the keyword argument is not circular 239s does not register an offense 239s when the keyword argument is not circular, and calls a method 239s does not register an offense 239s when there is one circular argument reference 239s registers an offense 239s circular argument references in ordinal arguments 239s when the method contains a circular argument reference 240s registers an offense 240s when the seemingly-circular default value is a method call 240s does not register an offense 240s when the method does not contain a circular argument reference 240s does not register an offense 240s 240s RuboCop::Cop::Layout::MultilineArrayBraceLayout 240s ignores empty arrays 240s ignores implicit arrays 240s ignores single-line arrays 240s behaves like multiline literal brace layout trailing comma 240s same_line style 240s opening brace on same line as first element 240s last element has a trailing comma 240s autocorrects closing brace on different line as last element 240s symmetrical style 240s opening brace on same line as first element 240s last element has a trailing comma 240s autocorrects closing brace on different line from last element 240s behaves like multiline literal brace layout method argument 240s when arguments to a method 240s and a comment after the last element 240s detects closing brace on separate line from last element 240s but no comment after the last element 240s autocorrects the closing brace 240s when comment present before closing brace 240s corrects closing brace without crashing 240s behaves like multiline literal brace layout 240s same_line style 240s opening brace on separate line from first element 240s detects closing brace on different line from last element 240s allows closing brace on same line as last multiline element 240s allows closing brace on same line as last element 240s opening brace on same line as first element 240s allows closing brace on same line as multi-line element 240s detects closing brace on different line from multiline element 240s autocorrects closing brace on different line as last element 240s allows closing brace on same line from last element 240s with a chained call on the closing brace 240s and a comment after the last element 240s detects closing brace on separate line from last elementbut does not autocorrect the closing brace 240s but no comment after the last element 240s autocorrects the closing brace 240s new_line style 240s opening brace on separate line from first element 240s detects closing brace on same line as last element 240s allows closing brace on separate line from last multiline element 240s allows closing brace on separate line from last element 240s opening brace on same line as first element 240s detects closing brace on same line as last multiline element 240s allows closing brace on different line from last element 240s allows closing brace on different line from multi-line element 240s autocorrects closing brace on same line as last element 240s heredoc 240s ignores heredocs that could share a last line 240s detects heredoc structures that are safe to add to 240s symmetrical style 240s opening brace on same line as first element 240s allows closing brace on same line as last element 240s detects closing brace on different line from last element 240s allows closing brace on same line as last multiline element 240s autocorrects closing brace on different line from last element 240s with a chained call on the closing brace 240s and a comment after the last element 240s detects closing brace on separate line from last elementbut does not autocorrect the closing brace 240s but no comment after the last element 240s autocorrects the closing brace 240s opening brace on separate line from first element 240s detects closing brace on same line as last element 240s allows closing brace on separate line from last element 240s allows closing brace on separate line from last multiline element 240s 240s RuboCop::Cop::InternalAffairs::SingleLineComparison 240s registers and corrects an offense when comparing `last_line` with `first_line` 240s registers and corrects an offense when negative comparing `last_line` with `first_line` 240s registers and corrects an offense when comparing `first_line` with `last_line` 240s does not register an offense when comparing the same line 240s does not register an offense when the receivers are not a match 240s registers and corrects an offense when comparing `source_range.first_line` with `source_range.last_line` 240s registers and corrects an offense when comparing `source_range.last_line` with `source_range.first_line` 240s registers and corrects an offense when comparing `loc.first_line` with `loc.last_line` 240s registers and corrects an offense when comparing `loc.line` with `loc.last_line` 240s registers and corrects an offense when comparing `loc.last_line` with `loc.first_line` 240s registers and corrects an offense when comparing `loc.last_line` with `loc.line` 240s registers and corrects an offense when negative comparing `first_line` with `last_line` 240s 240s RuboCop::Cop::Style::ConditionalAssignment 240s allows method calls in conditionals 240s registers an offense in an if else if the assignment is already at the line length limit 240s allows if elsif else with the same assignment only in elsif else 240s allows assignment using different operators in if elsif else 240s registers an offense for assignment in if elsif else 240s allows aref assignment with different indices in if..else 240s registers an offense for assignment in if elsif elsif else 240s allows if elsif else with the same assignment only in if else 240s registers an offense for assignment in if then elsif then else 240s allows assignment using different operators in if else 240s doesn't crash when assignment statement uses chars which have special meaning in a regex 240s allows assignment using different (method) operators in if..else 240s registers an offense for assignment in unless else 240s counts array assignment when determining multiple assignment 240s registers an offense for assignment in case when then else 240s registers an offense for assignment in case with when else 240s allows if elsif else with the same assignment only in if elsif 240s doesn't crash with empty braces 240s allows modifier if 240s allows method calls in if else 240s autocorrects assignment in if else when the assignment spans multiple lines 240s allows assignment of different variables in if else 240s registers an offense for assignment in ternary operation using strings 240s allows if else without variable assignment 240s allows assignment to the result of a ternary operation 240s allows assignment of different variables in case when else 240s allows different assignment types in case with when else 240s allows assignment in multiple branches when it is wrapped in a modifier 240s allows modifier if inside of if else 240s behaves like all assignment types 240s for a constant lval 240s registers an offense for assignment using <<= in ternary 240s for a instance variable lval 240s registers an offense for assignment using <<= in ternary 240s for a local variable lval 240s registers an offense for assignment using <<= in ternary 240s for a global variable lval 240s registers an offense for assignment using <<= in ternary 240s for a class variable lval 240s registers an offense for assignment using <<= in ternary 240s with end alignment to keyword 240s for a local variable lval 240s registers an offense for assignment using <<= in if else 240s registers an offense for assignment using <<= in case when 240s for a class variable lval 240s registers an offense for assignment using <<= in if else 240s registers an offense for assignment using <<= in case when 240s for a global variable lval 240s registers an offense for assignment using <<= in if else 240s registers an offense for assignment using <<= in case when 240s for a instance variable lval 240s registers an offense for assignment using <<= in case when 240s registers an offense for assignment using <<= in if else 240s for a constant lval 240s registers an offense for assignment using <<= in if else 240s registers an offense for assignment using <<= in case when 240s with end alignment to start_of_line 240s for a local variable lval 240s registers an offense for assignment using <<= in if else 240s registers an offense for assignment using <<= in case when 240s for a class variable lval 240s registers an offense for assignment using <<= in if else 240s registers an offense for assignment using <<= in case when 240s for a constant lval 240s registers an offense for assignment using <<= in case when 240s registers an offense for assignment using <<= in if else 240s for a instance variable lval 240s registers an offense for assignment using <<= in case when 240s registers an offense for assignment using <<= in if else 240s for a global variable lval 240s registers an offense for assignment using <<= in case when 240s registers an offense for assignment using <<= in if else 240s behaves like all assignment types 240s with end alignment to start_of_line 240s for a instance variable lval 240s registers an offense for assignment using ^= in if else 240s registers an offense for assignment using ^= in case when 240s for a class variable lval 240s registers an offense for assignment using ^= in case when 240s registers an offense for assignment using ^= in if else 240s for a global variable lval 240s registers an offense for assignment using ^= in if else 240s registers an offense for assignment using ^= in case when 240s for a local variable lval 240s registers an offense for assignment using ^= in case when 240s registers an offense for assignment using ^= in if else 240s for a constant lval 240s registers an offense for assignment using ^= in case when 240s registers an offense for assignment using ^= in if else 240s for a global variable lval 240s registers an offense for assignment using ^= in ternary 240s with end alignment to keyword 240s for a constant lval 240s registers an offense for assignment using ^= in if else 240s registers an offense for assignment using ^= in case when 240s for a global variable lval 240s registers an offense for assignment using ^= in if else 240s registers an offense for assignment using ^= in case when 240s for a local variable lval 240s registers an offense for assignment using ^= in if else 240s registers an offense for assignment using ^= in case when 240s for a instance variable lval 240s registers an offense for assignment using ^= in if else 240s registers an offense for assignment using ^= in case when 240s for a class variable lval 240s registers an offense for assignment using ^= in if else 240s registers an offense for assignment using ^= in case when 240s for a constant lval 240s registers an offense for assignment using ^= in ternary 240s for a class variable lval 240s registers an offense for assignment using ^= in ternary 240s for a instance variable lval 240s registers an offense for assignment using ^= in ternary 240s for a local variable lval 240s registers an offense for assignment using ^= in ternary 240s EndAlignment configured to start_of_line 240s autocorrect 240s uses proper end alignment in unless 240s uses proper end alignment in if 240s uses proper end alignment in case 240s behaves like all variable types 240s allows assignment to the return of if else 240s registers an offense assigning any variable type in if else 240s allows assignment to the return of case when 240s allows assignment to the return of a ternary 240s registers an offense assigning any variable type in case when 240s registers an offense assigning any variable type in ternary 240s for if elsif else if else 240s autocorrects the inner offense first 240s autocorrects the outer offense later 240s behaves like all assignment types 240s with end alignment to start_of_line 240s for a local variable lval 240s registers an offense for assignment using &= in case when 240s registers an offense for assignment using &= in if else 240s for a global variable lval 240s registers an offense for assignment using &= in case when 240s registers an offense for assignment using &= in if else 240s for a class variable lval 240s registers an offense for assignment using &= in if else 240s registers an offense for assignment using &= in case when 240s for a instance variable lval 240s registers an offense for assignment using &= in case when 240s registers an offense for assignment using &= in if else 240s for a constant lval 240s registers an offense for assignment using &= in if else 240s registers an offense for assignment using &= in case when 240s for a local variable lval 240s registers an offense for assignment using &= in ternary 240s for a constant lval 240s registers an offense for assignment using &= in ternary 240s for a global variable lval 240s registers an offense for assignment using &= in ternary 240s for a class variable lval 240s registers an offense for assignment using &= in ternary 240s for a instance variable lval 240s registers an offense for assignment using &= in ternary 240s with end alignment to keyword 240s for a constant lval 240s registers an offense for assignment using &= in if else 240s registers an offense for assignment using &= in case when 240s for a global variable lval 240s registers an offense for assignment using &= in case when 240s registers an offense for assignment using &= in if else 240s for a local variable lval 240s registers an offense for assignment using &= in if else 240s registers an offense for assignment using &= in case when 240s for a class variable lval 240s registers an offense for assignment using &= in case when 240s registers an offense for assignment using &= in if else 240s for a instance variable lval 240s registers an offense for assignment using &= in if else 240s registers an offense for assignment using &= in case when 240s behaves like comparison methods 240s registers an offense for comparison methods in ternary operations 240s with end alignment to keyword 240s corrects comparison methods in unless else 240s corrects comparison methods in if elsif else 240s corrects comparison methods in case when 240s >= Ruby 2.7 240s corrects comparison methods in case in 240s with end alignment to start_of_line 240s corrects comparison methods in if elsif else 240s corrects comparison methods in case when 240s corrects comparison methods in unless else 240s >= Ruby 2.7 240s corrects comparison methods in case in 240s behaves like all assignment types 240s with end alignment to start_of_line 240s for a instance variable lval 240s registers an offense for assignment using &&= in case when 240s registers an offense for assignment using &&= in if else 240s for a local variable lval 240s registers an offense for assignment using &&= in if else 240s registers an offense for assignment using &&= in case when 240s for a constant lval 240s registers an offense for assignment using &&= in if else 240s registers an offense for assignment using &&= in case when 240s for a class variable lval 240s registers an offense for assignment using &&= in case when 240s registers an offense for assignment using &&= in if else 240s for a global variable lval 240s registers an offense for assignment using &&= in case when 240s registers an offense for assignment using &&= in if else 240s for a instance variable lval 240s registers an offense for assignment using &&= in ternary 240s for a global variable lval 240s registers an offense for assignment using &&= in ternary 240s for a class variable lval 240s registers an offense for assignment using &&= in ternary 240s for a local variable lval 240s registers an offense for assignment using &&= in ternary 240s for a constant lval 240s registers an offense for assignment using &&= in ternary 240s with end alignment to keyword 240s for a class variable lval 240s registers an offense for assignment using &&= in case when 240s registers an offense for assignment using &&= in if else 240s for a instance variable lval 240s registers an offense for assignment using &&= in case when 240s registers an offense for assignment using &&= in if else 240s for a constant lval 240s registers an offense for assignment using &&= in if else 240s registers an offense for assignment using &&= in case when 240s for a local variable lval 240s registers an offense for assignment using &&= in if else 240s registers an offense for assignment using &&= in case when 240s for a global variable lval 240s registers an offense for assignment using &&= in if else 240s registers an offense for assignment using &&= in case when 240s correction would exceed max line length 240s allows assignment to the same variable in if else if the correction would create a line longer than the configured LineLength 240s allows assignment to the same variable in if else if the correction would cause the condition to exceed the configured LineLength 240s allows assignment to the same variable in case when else if the correction would create a line longer than the configured LineLength 240s behaves like comparison methods 240s registers an offense for comparison methods in ternary operations 240s with end alignment to start_of_line 240s corrects comparison methods in if elsif else 240s corrects comparison methods in case when 240s corrects comparison methods in unless else 240s >= Ruby 2.7 240s corrects comparison methods in case in 240s with end alignment to keyword 240s corrects comparison methods in case when 240s corrects comparison methods in if elsif else 240s corrects comparison methods in unless else 240s >= Ruby 2.7 240s corrects comparison methods in case in 240s behaves like all variable types 240s registers an offense assigning any variable type in ternary 240s allows assignment to the return of case when 240s registers an offense assigning any variable type in case when 240s registers an offense assigning any variable type in if else 240s allows assignment to the return of a ternary 240s allows assignment to the return of if else 240s behaves like comparison methods 240s registers an offense for comparison methods in ternary operations 240s with end alignment to start_of_line 240s corrects comparison methods in case when 240s corrects comparison methods in unless else 240s corrects comparison methods in if elsif else 240s >= Ruby 2.7 240s corrects comparison methods in case in 240s with end alignment to keyword 240s corrects comparison methods in case when 240s corrects comparison methods in unless else 240s corrects comparison methods in if elsif else 240s >= Ruby 2.7 240s corrects comparison methods in case in 240s behaves like comparison methods 240s registers an offense for comparison methods in ternary operations 240s with end alignment to start_of_line 240s corrects comparison methods in if elsif else 240s corrects comparison methods in case when 240s corrects comparison methods in unless else 240s >= Ruby 2.7 240s corrects comparison methods in case in 240s with end alignment to keyword 240s corrects comparison methods in case when 240s corrects comparison methods in if elsif else 240s corrects comparison methods in unless else 240s >= Ruby 2.7 240s corrects comparison methods in case in 240s behaves like comparison methods 240s registers an offense for comparison methods in ternary operations 240s with end alignment to keyword 240s corrects comparison methods in case when 240s corrects comparison methods in if elsif else 240s corrects comparison methods in unless else 240s >= Ruby 2.7 240s corrects comparison methods in case in 240s with end alignment to start_of_line 240s corrects comparison methods in case when 240s corrects comparison methods in if elsif else 240s corrects comparison methods in unless else 240s >= Ruby 2.7 240s corrects comparison methods in case in 240s behaves like all assignment types 240s with end alignment to keyword 240s for a global variable lval 240s registers an offense for assignment using << in case when 240s registers an offense for assignment using << in if else 240s for a constant lval 240s registers an offense for assignment using << in case when 240s registers an offense for assignment using << in if else 240s for a class variable lval 240s registers an offense for assignment using << in case when 240s registers an offense for assignment using << in if else 240s for a local variable lval 240s registers an offense for assignment using << in case when 240s registers an offense for assignment using << in if else 240s for a instance variable lval 240s registers an offense for assignment using << in if else 240s registers an offense for assignment using << in case when 240s with end alignment to start_of_line 240s for a class variable lval 240s registers an offense for assignment using << in case when 240s registers an offense for assignment using << in if else 240s for a global variable lval 240s registers an offense for assignment using << in case when 240s registers an offense for assignment using << in if else 240s for a constant lval 240s registers an offense for assignment using << in case when 240s registers an offense for assignment using << in if else 240s for a local variable lval 241s registers an offense for assignment using << in if else 241s registers an offense for assignment using << in case when 241s for a instance variable lval 241s registers an offense for assignment using << in if else 241s registers an offense for assignment using << in case when 241s for a constant lval 241s registers an offense for assignment using << in ternary 241s for a instance variable lval 241s registers an offense for assignment using << in ternary 241s for a global variable lval 241s registers an offense for assignment using << in ternary 241s for a class variable lval 241s registers an offense for assignment using << in ternary 241s for a local variable lval 241s registers an offense for assignment using << in ternary 241s empty branch 241s allows assignment in if without an else 241s allows an empty if statement 241s allows an empty when branch with an else 241s allows if elsif without else 241s allows case with an empty else 241s allows an empty elsif statement 241s allows assignment in unless without an else 241s allows assignment in case when without an else 241s behaves like all assignment types 241s for a global variable lval 241s registers an offense for assignment using **= in ternary 241s for a local variable lval 241s registers an offense for assignment using **= in ternary 241s with end alignment to start_of_line 241s for a constant lval 241s registers an offense for assignment using **= in case when 241s registers an offense for assignment using **= in if else 241s for a global variable lval 241s registers an offense for assignment using **= in case when 241s registers an offense for assignment using **= in if else 241s for a class variable lval 241s registers an offense for assignment using **= in if else 241s registers an offense for assignment using **= in case when 241s for a instance variable lval 241s registers an offense for assignment using **= in if else 241s registers an offense for assignment using **= in case when 241s for a local variable lval 241s registers an offense for assignment using **= in if else 241s registers an offense for assignment using **= in case when 241s with end alignment to keyword 241s for a constant lval 241s registers an offense for assignment using **= in case when 241s registers an offense for assignment using **= in if else 241s for a instance variable lval 241s registers an offense for assignment using **= in case when 241s registers an offense for assignment using **= in if else 241s for a class variable lval 241s registers an offense for assignment using **= in if else 241s registers an offense for assignment using **= in case when 241s for a local variable lval 241s registers an offense for assignment using **= in case when 241s registers an offense for assignment using **= in if else 241s for a global variable lval 241s registers an offense for assignment using **= in case when 241s registers an offense for assignment using **= in if else 241s for a class variable lval 241s registers an offense for assignment using **= in ternary 241s for a constant lval 241s registers an offense for assignment using **= in ternary 241s for a instance variable lval 241s registers an offense for assignment using **= in ternary 241s behaves like comparison methods 241s registers an offense for comparison methods in ternary operations 241s with end alignment to keyword 241s corrects comparison methods in unless else 241s corrects comparison methods in case when 241s corrects comparison methods in if elsif else 241s >= Ruby 2.7 241s corrects comparison methods in case in 241s with end alignment to start_of_line 241s corrects comparison methods in if elsif else 241s corrects comparison methods in case when 241s corrects comparison methods in unless else 241s >= Ruby 2.7 241s corrects comparison methods in case in 241s behaves like all assignment types 241s for a instance variable lval 241s registers an offense for assignment using ||= in ternary 241s with end alignment to start_of_line 241s for a instance variable lval 241s registers an offense for assignment using ||= in if else 241s registers an offense for assignment using ||= in case when 241s for a local variable lval 241s registers an offense for assignment using ||= in if else 241s registers an offense for assignment using ||= in case when 241s for a constant lval 241s registers an offense for assignment using ||= in case when 241s registers an offense for assignment using ||= in if else 241s for a class variable lval 241s registers an offense for assignment using ||= in case when 241s registers an offense for assignment using ||= in if else 241s for a global variable lval 241s registers an offense for assignment using ||= in if else 241s registers an offense for assignment using ||= in case when 241s for a local variable lval 241s registers an offense for assignment using ||= in ternary 241s for a global variable lval 241s registers an offense for assignment using ||= in ternary 241s for a class variable lval 241s registers an offense for assignment using ||= in ternary 241s for a constant lval 241s registers an offense for assignment using ||= in ternary 241s with end alignment to keyword 241s for a instance variable lval 241s registers an offense for assignment using ||= in case when 241s registers an offense for assignment using ||= in if else 241s for a global variable lval 241s registers an offense for assignment using ||= in if else 241s registers an offense for assignment using ||= in case when 241s for a class variable lval 241s registers an offense for assignment using ||= in case when 241s registers an offense for assignment using ||= in if else 241s for a local variable lval 241s registers an offense for assignment using ||= in if else 241s registers an offense for assignment using ||= in case when 241s for a constant lval 241s registers an offense for assignment using ||= in case when 241s registers an offense for assignment using ||= in if else 241s behaves like comparison methods 241s registers an offense for comparison methods in ternary operations 241s with end alignment to keyword 241s corrects comparison methods in case when 241s corrects comparison methods in if elsif else 241s corrects comparison methods in unless else 241s >= Ruby 2.7 241s corrects comparison methods in case in 241s with end alignment to start_of_line 241s corrects comparison methods in unless else 241s corrects comparison methods in if elsif else 241s corrects comparison methods in case when 241s >= Ruby 2.7 241s corrects comparison methods in case in 241s behaves like all assignment types 241s for a local variable lval 241s registers an offense for assignment using /= in ternary 241s for a global variable lval 241s registers an offense for assignment using /= in ternary 241s for a class variable lval 241s registers an offense for assignment using /= in ternary 241s with end alignment to start_of_line 241s for a constant lval 241s registers an offense for assignment using /= in case when 241s registers an offense for assignment using /= in if else 241s for a class variable lval 241s registers an offense for assignment using /= in if else 241s registers an offense for assignment using /= in case when 241s for a local variable lval 241s registers an offense for assignment using /= in case when 241s registers an offense for assignment using /= in if else 241s for a instance variable lval 241s registers an offense for assignment using /= in if else 241s registers an offense for assignment using /= in case when 241s for a global variable lval 241s registers an offense for assignment using /= in case when 241s registers an offense for assignment using /= in if else 241s for a constant lval 241s registers an offense for assignment using /= in ternary 241s with end alignment to keyword 241s for a local variable lval 241s registers an offense for assignment using /= in if else 241s registers an offense for assignment using /= in case when 241s for a instance variable lval 241s registers an offense for assignment using /= in if else 241s registers an offense for assignment using /= in case when 241s for a class variable lval 241s registers an offense for assignment using /= in if else 241s registers an offense for assignment using /= in case when 241s for a global variable lval 241s registers an offense for assignment using /= in if else 241s registers an offense for assignment using /= in case when 241s for a constant lval 241s registers an offense for assignment using /= in case when 241s registers an offense for assignment using /= in if else 241s for a instance variable lval 241s registers an offense for assignment using /= in ternary 241s behaves like all assignment types 241s for a constant lval 241s registers an offense for assignment using *= in ternary 241s with end alignment to keyword 241s for a global variable lval 241s registers an offense for assignment using *= in case when 241s registers an offense for assignment using *= in if else 241s for a instance variable lval 241s registers an offense for assignment using *= in case when 241s registers an offense for assignment using *= in if else 241s for a class variable lval 241s registers an offense for assignment using *= in if else 241s registers an offense for assignment using *= in case when 241s for a local variable lval 241s registers an offense for assignment using *= in if else 241s registers an offense for assignment using *= in case when 241s for a constant lval 241s registers an offense for assignment using *= in if else 241s registers an offense for assignment using *= in case when 241s for a global variable lval 241s registers an offense for assignment using *= in ternary 241s for a class variable lval 241s registers an offense for assignment using *= in ternary 241s with end alignment to start_of_line 241s for a instance variable lval 241s registers an offense for assignment using *= in case when 241s registers an offense for assignment using *= in if else 241s for a global variable lval 241s registers an offense for assignment using *= in if else 241s registers an offense for assignment using *= in case when 241s for a constant lval 241s registers an offense for assignment using *= in if else 241s registers an offense for assignment using *= in case when 241s for a local variable lval 241s registers an offense for assignment using *= in case when 241s registers an offense for assignment using *= in if else 241s for a class variable lval 241s registers an offense for assignment using *= in if else 241s registers an offense for assignment using *= in case when 241s for a local variable lval 241s registers an offense for assignment using *= in ternary 241s for a instance variable lval 241s registers an offense for assignment using *= in ternary 241s behaves like all assignment types 241s with end alignment to keyword 241s for a class variable lval 241s registers an offense for assignment using = in if else 241s registers an offense for assignment using = in case when 241s for a constant lval 241s registers an offense for assignment using = in if else 241s registers an offense for assignment using = in case when 241s for a instance variable lval 241s registers an offense for assignment using = in case when 241s registers an offense for assignment using = in if else 241s for a local variable lval 241s registers an offense for assignment using = in if else 241s registers an offense for assignment using = in case when 241s for a global variable lval 241s registers an offense for assignment using = in case when 241s registers an offense for assignment using = in if else 241s for a class variable lval 241s registers an offense for assignment using = in ternary 241s for a constant lval 241s registers an offense for assignment using = in ternary 241s for a local variable lval 241s registers an offense for assignment using = in ternary 241s for a instance variable lval 241s registers an offense for assignment using = in ternary 241s for a global variable lval 241s registers an offense for assignment using = in ternary 241s with end alignment to start_of_line 241s for a global variable lval 241s registers an offense for assignment using = in if else 241s registers an offense for assignment using = in case when 241s for a class variable lval 241s registers an offense for assignment using = in case when 241s registers an offense for assignment using = in if else 241s for a local variable lval 241s registers an offense for assignment using = in case when 241s registers an offense for assignment using = in if else 241s for a constant lval 241s registers an offense for assignment using = in case when 241s registers an offense for assignment using = in if else 241s for a instance variable lval 241s registers an offense for assignment using = in if else 241s registers an offense for assignment using = in case when 241s behaves like all assignment types 241s for a local variable lval 241s registers an offense for assignment using |= in ternary 241s for a instance variable lval 241s registers an offense for assignment using |= in ternary 241s for a global variable lval 241s registers an offense for assignment using |= in ternary 241s with end alignment to keyword 241s for a instance variable lval 241s registers an offense for assignment using |= in case when 241s registers an offense for assignment using |= in if else 241s for a constant lval 241s registers an offense for assignment using |= in if else 241s registers an offense for assignment using |= in case when 241s for a global variable lval 241s registers an offense for assignment using |= in if else 241s registers an offense for assignment using |= in case when 241s for a class variable lval 241s registers an offense for assignment using |= in if else 241s registers an offense for assignment using |= in case when 241s for a local variable lval 241s registers an offense for assignment using |= in if else 241s registers an offense for assignment using |= in case when 241s with end alignment to start_of_line 241s for a global variable lval 241s registers an offense for assignment using |= in if else 241s registers an offense for assignment using |= in case when 241s for a instance variable lval 241s registers an offense for assignment using |= in case when 241s registers an offense for assignment using |= in if else 241s for a class variable lval 241s registers an offense for assignment using |= in case when 241s registers an offense for assignment using |= in if else 241s for a local variable lval 241s registers an offense for assignment using |= in if else 241s registers an offense for assignment using |= in case when 241s for a constant lval 241s registers an offense for assignment using |= in if else 241s registers an offense for assignment using |= in case when 241s for a constant lval 241s registers an offense for assignment using |= in ternary 241s for a class variable lval 241s registers an offense for assignment using |= in ternary 241s behaves like all variable types 241s registers an offense assigning any variable type in if else 241s registers an offense assigning any variable type in ternary 241s registers an offense assigning any variable type in case when 241s allows assignment to the return of a ternary 241s allows assignment to the return of if else 241s allows assignment to the return of case when 241s behaves like all assignment types 241s for a instance variable lval 241s registers an offense for assignment using >>= in ternary 241s for a constant lval 241s registers an offense for assignment using >>= in ternary 241s for a class variable lval 241s registers an offense for assignment using >>= in ternary 241s with end alignment to keyword 241s for a constant lval 241s registers an offense for assignment using >>= in if else 241s registers an offense for assignment using >>= in case when 241s for a global variable lval 241s registers an offense for assignment using >>= in case when 241s registers an offense for assignment using >>= in if else 241s for a local variable lval 241s registers an offense for assignment using >>= in if else 241s registers an offense for assignment using >>= in case when 241s for a instance variable lval 241s registers an offense for assignment using >>= in if else 241s registers an offense for assignment using >>= in case when 241s for a class variable lval 241s registers an offense for assignment using >>= in case when 241s registers an offense for assignment using >>= in if else 241s for a global variable lval 241s registers an offense for assignment using >>= in ternary 241s with end alignment to start_of_line 241s for a local variable lval 241s registers an offense for assignment using >>= in case when 241s registers an offense for assignment using >>= in if else 241s for a instance variable lval 241s registers an offense for assignment using >>= in case when 241s registers an offense for assignment using >>= in if else 241s for a global variable lval 241s registers an offense for assignment using >>= in if else 241s registers an offense for assignment using >>= in case when 241s for a constant lval 241s registers an offense for assignment using >>= in case when 241s registers an offense for assignment using >>= in if else 241s for a class variable lval 241s registers an offense for assignment using >>= in case when 241s registers an offense for assignment using >>= in if else 241s for a local variable lval 241s registers an offense for assignment using >>= in ternary 241s behaves like all variable types 241s allows assignment to the return of case when 241s registers an offense assigning any variable type in if else 241s registers an offense assigning any variable type in case when 241s registers an offense assigning any variable type in ternary 241s allows assignment to the return of a ternary 241s allows assignment to the return of if else 241s IncludeTernaryExpressions false 241s allows assignment in ternary operation 241s behaves like all assignment types 241s with end alignment to keyword 241s for a local variable lval 241s registers an offense for assignment using -= in if else 241s registers an offense for assignment using -= in case when 241s for a global variable lval 241s registers an offense for assignment using -= in if else 241s registers an offense for assignment using -= in case when 241s for a constant lval 241s registers an offense for assignment using -= in if else 241s registers an offense for assignment using -= in case when 241s for a class variable lval 241s registers an offense for assignment using -= in if else 241s registers an offense for assignment using -= in case when 241s for a instance variable lval 241s registers an offense for assignment using -= in case when 241s registers an offense for assignment using -= in if else 241s for a global variable lval 241s registers an offense for assignment using -= in ternary 241s for a instance variable lval 241s registers an offense for assignment using -= in ternary 241s for a class variable lval 241s registers an offense for assignment using -= in ternary 241s for a constant lval 241s registers an offense for assignment using -= in ternary 241s for a local variable lval 241s registers an offense for assignment using -= in ternary 241s with end alignment to start_of_line 241s for a class variable lval 241s registers an offense for assignment using -= in if else 241s registers an offense for assignment using -= in case when 241s for a local variable lval 241s registers an offense for assignment using -= in case when 242s registers an offense for assignment using -= in if else 242s for a global variable lval 242s registers an offense for assignment using -= in case when 242s registers an offense for assignment using -= in if else 242s for a constant lval 242s registers an offense for assignment using -= in if else 242s registers an offense for assignment using -= in case when 242s for a instance variable lval 242s registers an offense for assignment using -= in if else 242s registers an offense for assignment using -= in case when 242s behaves like all variable types 242s allows assignment to the return of if else 242s allows assignment to the return of a ternary 242s registers an offense assigning any variable type in case when 242s allows assignment to the return of case when 242s registers an offense assigning any variable type in if else 242s registers an offense assigning any variable type in ternary 242s with nested conditionals 242s eventually autocorrects all branches 242s does not consider branches of nested ifs 242s behaves like all assignment types 242s for a local variable lval 242s registers an offense for assignment using += in ternary 242s for a global variable lval 242s registers an offense for assignment using += in ternary 242s for a instance variable lval 242s registers an offense for assignment using += in ternary 242s for a class variable lval 242s registers an offense for assignment using += in ternary 242s with end alignment to keyword 242s for a constant lval 242s registers an offense for assignment using += in case when 242s registers an offense for assignment using += in if else 242s for a class variable lval 242s registers an offense for assignment using += in if else 242s registers an offense for assignment using += in case when 242s for a local variable lval 242s registers an offense for assignment using += in case when 242s registers an offense for assignment using += in if else 242s for a global variable lval 242s registers an offense for assignment using += in case when 242s registers an offense for assignment using += in if else 242s for a instance variable lval 242s registers an offense for assignment using += in if else 242s registers an offense for assignment using += in case when 242s for a constant lval 242s registers an offense for assignment using += in ternary 242s with end alignment to start_of_line 242s for a local variable lval 242s registers an offense for assignment using += in if else 242s registers an offense for assignment using += in case when 242s for a global variable lval 242s registers an offense for assignment using += in if else 242s registers an offense for assignment using += in case when 242s for a instance variable lval 242s registers an offense for assignment using += in case when 242s registers an offense for assignment using += in if else 242s for a constant lval 242s registers an offense for assignment using += in case when 242s registers an offense for assignment using += in if else 242s for a class variable lval 242s registers an offense for assignment using += in case when 242s registers an offense for assignment using += in if else 242s behaves like comparison methods 242s registers an offense for comparison methods in ternary operations 242s with end alignment to start_of_line 242s corrects comparison methods in unless else 242s corrects comparison methods in case when 242s corrects comparison methods in if elsif else 242s >= Ruby 2.7 242s corrects comparison methods in case in 242s with end alignment to keyword 242s corrects comparison methods in if elsif else 242s corrects comparison methods in case when 242s corrects comparison methods in unless else 242s >= Ruby 2.7 242s corrects comparison methods in case in 242s configured to check conditions with multiple statements 242s registers an offense for multiple assignment when an earlier assignment is is protected by a modifier 242s allows assignment in multiple branches when it is wrapped in a modifier 242s autocorrect 242s corrects multiple assignment in if else 242s corrects assignment in an if statement that is nested in unless else 242s corrects multiple assignment in case when 242s corrects multiple assignment in if elsif else 242s corrects multiple assignment in case when with multiple whens 242s corrects multiple assignment in unless else 242s corrects multiple assignment in if elsif else with multiple elsifs 242s assignment as the last statement 242s registers offense for multiple assignments in case when with only one when 242s registers an offense in if elsif else with some branches only containing variable assignment and others containing more than variable assignment 242s registers an offense in if elsif else with more than variable assignment 242s registers an offense for multiple assignment in if elsif else 242s register an offense for multiple assignment in if else 242s registers offense for multiple assignment in unless else 242s registers offense for multiple assignment in if elsif elsif else 242s registers an offense in unless else with more than variable assignment 242s registers an offense in case when else with more than variable assignment 242s registers an offense in if else with more than variable assignment 242s registers offense for multiple assignments in case when with multiple whens 242s behaves like allows out of order multiple assignment in if elsif else 242s allows out of order multiple assignment in if elsif else 242s multiple assignment in only one branch 242s registers an offense when multiple assignment is in elsif 242s registers an offense when multiple assignment is in if 242s registers an offense when multiple assignment is in else 242s behaves like else followed by new conditional without else 242s allows if elsif else unless 242s behaves like all variable types 242s registers an offense assigning any variable type in case when 242s registers an offense assigning any variable type in if else 242s registers an offense assigning any variable type in ternary 242s allows assignment to the return of a ternary 242s allows assignment to the return of if else 242s allows assignment to the return of case when 242s behaves like else followed by new conditional without else 242s allows if elsif else if 242s behaves like comparison methods 242s registers an offense for comparison methods in ternary operations 242s with end alignment to start_of_line 242s corrects comparison methods in case when 242s corrects comparison methods in if elsif else 242s corrects comparison methods in unless else 242s >= Ruby 2.7 242s corrects comparison methods in case in 242s with end alignment to keyword 242s corrects comparison methods in if elsif else 242s corrects comparison methods in case when 242s corrects comparison methods in unless else 242s >= Ruby 2.7 242s corrects comparison methods in case in 242s behaves like all assignment types 242s with end alignment to keyword 242s for a instance variable lval 242s registers an offense for assignment using %= in if else 242s registers an offense for assignment using %= in case when 242s for a class variable lval 242s registers an offense for assignment using %= in case when 242s registers an offense for assignment using %= in if else 242s for a local variable lval 242s registers an offense for assignment using %= in if else 242s registers an offense for assignment using %= in case when 242s for a constant lval 242s registers an offense for assignment using %= in if else 242s registers an offense for assignment using %= in case when 242s for a global variable lval 242s registers an offense for assignment using %= in if else 242s registers an offense for assignment using %= in case when 242s for a constant lval 242s registers an offense for assignment using %= in ternary 242s with end alignment to start_of_line 242s for a class variable lval 242s registers an offense for assignment using %= in case when 242s registers an offense for assignment using %= in if else 242s for a global variable lval 242s registers an offense for assignment using %= in if else 242s registers an offense for assignment using %= in case when 242s for a constant lval 242s registers an offense for assignment using %= in case when 242s registers an offense for assignment using %= in if else 242s for a instance variable lval 242s registers an offense for assignment using %= in case when 242s registers an offense for assignment using %= in if else 242s for a local variable lval 242s registers an offense for assignment using %= in case when 242s registers an offense for assignment using %= in if else 242s for a class variable lval 242s registers an offense for assignment using %= in ternary 242s for a instance variable lval 242s registers an offense for assignment using %= in ternary 242s for a global variable lval 242s registers an offense for assignment using %= in ternary 242s for a local variable lval 242s registers an offense for assignment using %= in ternary 242s behaves like comparison methods 242s registers an offense for comparison methods in ternary operations 242s with end alignment to keyword 242s corrects comparison methods in unless else 242s corrects comparison methods in if elsif else 242s corrects comparison methods in case when 242s >= Ruby 2.7 242s corrects comparison methods in case in 242s with end alignment to start_of_line 242s corrects comparison methods in case when 242s corrects comparison methods in unless else 242s corrects comparison methods in if elsif else 242s >= Ruby 2.7 242s corrects comparison methods in case in 242s assignment as the last statement 242s allows more than variable assignment in if elsif else 242s allows multiple assignment in if elsif elsif else 242s allows multiple assignment in if else 242s allows variable assignment in unless else with more than variable assignment 242s allows multiple assignment in case statements when the last assignment is the same and the earlier assignments do not appear in all branches 242s allows variable assignment in case when else with more than variable assignment 242s allows multiple assignments in case when with only one when 242s allows multiple assignment in unless else 242s allows assignment in if elsif else with some branches only containing variable assignment and others containing more than variable assignment 242s allows multiple assignment in if elsif else when the last assignment is the same and the earlier assignments do not appear in all branches 242s allows more than variable assignment in if else 242s allows multiple assignment in if elsif else 242s allows multiple assignment in case when else when the last assignment is the same and the earlier assignments do not appear in all branches 242s allows multiple assignments in case when with multiple whens 242s allows multiple assignments in case when if there are uniq variables in the when branches 242s multiple assignment in only one branch 242s does not register an offense when multiple assignment is in else 242s allows multiple assignment is in if 242s allows multiple assignment is in elsif 242s behaves like allows out of order multiple assignment in if elsif else 242s allows out of order multiple assignment in if elsif else 242s autocorrect 242s preserves comments during correction in if else 242s corrects assignment to unbracketed array in if else 242s preserves comments during correction in case when else 242s corrects =~ in ternary operations 242s assignment from a method 242s corrects case when 242s corrects if else 242s corrects unless else 242s self.attribute= assignment 242s corrects if..else 242s with different receivers 242s doesn't register an offense 242s multiple assignment 242s does not register an offense in if else 242s does not register an offense in case when 242s aref assignment 242s corrects if..else 242s with different indices 242s doesn't register an offense 242s constant assignment 242s corrects if..else with top-level constant 242s corrects if..else with namespaced constant 242s behaves like all variable types 242s registers an offense assigning any variable type in ternary 242s registers an offense assigning any variable type in if else 242s registers an offense assigning any variable type in case when 242s allows assignment to the return of if else 242s allows assignment to the return of a ternary 242s allows assignment to the return of case when 242s 242s RuboCop::Cop::Layout::InitialIndentation 242s accepts unindented method definition 242s accepts empty file 242s registers an offense and corrects indented assignment disregarding comment 242s registers an offense for indented method definition 242s accepts unindented comment + assignment 242s for a file with byte order mark 242s accepts unindented method call 242s registers an offense and corrects indented method call after comment 242s registers an offense and corrects indented method call 242s 242s RuboCop::Cop::Style::RescueStandardError 242s explicit 242s accepts rescue modifier 242s when rescuing in a method definition 242s accepts rescuing StandardError with other errors 242s accepts rescuing StandardError by itself 242s accepts rescuing StandardError by itself, assigned to a variable 242s accepts rescuing a single error other than StandardError 242s accepts rescuing StandardError with other errors, assigned to a variable 242s accepts rescuing a single error other than StandardError, assigned to a variable 242s when rescue is called without an error class 242s registers an offense 242s when the error is assigned to a variable 242s registers an offense 242s when rescuing in a begin block 242s accepts rescuing StandardError with other errors 242s accepts rescuing StandardError by itself 242s accepts rescuing a single error other than StandardErrorassigned to a variable 242s accepts rescuing StandardError with other errors, assigned to a variable 242s accepts rescuing a single error other than StandardError 242s accepts rescuing StandardError by itself, assigned to a variable 242s when calling rescue without an error class 242s registers an offense 242s when the error is assigned to a variable 242s registers an offense 242s implicit 242s accepts rescue modifier 242s when rescuing in a method definition 242s accepts rescuing no error class, assigned to a variable 242s accepts rescuing a single error other than StandardError 242s accepts rescuing StandardError with other errors, assigned to a variable 242s accepts rescuing a single error other than StandardError, assigned to a variable 242s accepts rescuing StandardError with other errors 242s accepts rescuing no error class 242s when rescuing StandardError by itself 242s registers an offense 242s when the error is assigned to a variable 242s registers an offense 242s when rescuing in a begin block 242s accepts rescuing StandardError with other errors, assigned to a variable 242s accepts rescuing StandardError with other errors 242s accepts rescuing no error class, assigned to a variable 242s accepts rescuing no error class 242s accepts rescuing a single error class other than StandardError, assigned to a variable 242s accepts rescuing ::StandardError with other errors 242s accepts rescuing a single error class other than StandardError 242s when rescuing StandardError by itself 242s registers an offense 242s with ::StandardError 242s registers an offense 242s when the error is assigned to a variable 242s registers an offense 242s with ::StandardError 242s registers an offense 242s 242s RuboCop::Cop::Style::MinMax 242s with an array literal containing calls to `#min` and `#max` 242s when the expression is used in a parallel assignment 242s does not register an offense if the receiver is implicit 242s registers an offense if the receivers match 242s does not register an offense if the receivers do not match 242s does not register an offense if there are additional elements 242s when the expression is used as a return value 242s does not register an offense if the receivers do not match 242s registers an offense if the receivers match 242s does not register an offense if the receiver is implicit 242s does not register an offense if there are additional elements 242s when the expression stands alone 242s does not register an offense if the receivers do not match 242s does not register an offense if there are additional elements 242s registers an offense if the receivers match 242s does not register an offense if the receiver is implicit 242s 242s RuboCop::Formatter::TapFormatter 242s #file_finished 242s when no offenses are detected 242s prints "ok" 242s when any offenses are detected 242s prints "not ok" 242s #finished 242s when no offenses are detected 242s does not report offenses 242s when any offenses are detected 242s reports all detected offenses for all failed files 242s #report_file 242s when the source contains multibyte characters 242s displays text containing the offending source line 242s 242s RuboCop::Cop::Layout::EndOfLine 242s when EnforcedStyle is native 242s registers an offense for an incorrect EOL 242s when EnforcedStyle is crlf 242s registers an offense for CR+LF 242s does not register offense for no CR at end of file 242s accepts an empty file 242s does not register offenses after __END__ 242s and there are many lines ending with LF 242s can inspect non-UTF-8 encoded source with proper encoding comment 242s registers only one offense 242s and the default external encoding is US_ASCII 242s can inspect non-UTF-8 encoded source with proper encoding comment 242s does not crash on UTF-8 encoded non-ascii characters 242s when EnforcedStyle is lf 242s registers an offense for CR at end of file 242s registers an offense for CR+LF 242s does not register offenses after __END__ 242s accepts an empty file 242s and there are many lines ending with CR+LF 242s can inspect non-UTF-8 encoded source with proper encoding comment 242s registers only one offense 242s and the default external encoding is US_ASCII 242s does not crash on UTF-8 encoded non-ascii characters 242s can inspect non-UTF-8 encoded source with proper encoding comment 242s 242s RuboCop::Cop::Lint::SafeNavigationChain 242s TargetRubyVersion >= 2.3 242s accepts usages of safe navigation with `to_d` method 242s accepts usages of safe navigation with `nil?` method 242s accepts usages of method chain with safe navigation only 242s registers an offense for ordinary method call exists after safe navigation method call with an argument 242s registers an offense for safe navigation on the right-hand side of the `*` 242s accepts usages of safe navigation with self assignment method 242s accepts usages of method chain with safe navigation only with argument 242s accepts usages of safe navigation at last only with argument 242s accepts usages of safe navigation with === operator 242s accepts usages of safe navigation at last only 242s accepts usages of ordinary method chain with argument 242s accepts usages of safe navigation with == operator 242s registers an offense for ordinary method chain exists after safe navigation method call with a block 242s accepts usages of safe navigation with || operator 242s accepts usages of safe navigation with `try` method 242s registers an offense for safe navigation on the right-hand side of the `+` 242s registers an offense for safe navigation with >= operator 243s registers an offense for ordinary method chain exists after safe navigation method call with a block-pass 243s registers an offense for safe navigation with > operator 243s accepts usages of safe navigation with & operator 243s registers an offense for safe navigation with [] operator 243s registers an offense for safe navigation with []= operator 243s accepts usages of safe navigation with && operator 243s registers an offense for safe navigation on the right-hand side of the `/` 243s accepts usages of safe navigation with `-@` method 243s registers an offense for safe navigation with + operator 243s accepts usages of safe navigation with assignment method 243s registers an offense for ordinary method chain exists after safe navigation method call 243s registers an offense for safe navigation with <= operator 243s accepts usages of safe navigation with | operator 243s registers an offense for ordinary method call exists after safe navigation method call 243s accepts usages of ordinary method chain 243s accepts usages of safe navigation with `present?` method 243s accepts usages of safe navigation with `in?` method 243s registers an offense for ordinary method chain exists after safe navigation method call with an argument 243s accepts usages of safe navigation with `blank?` method 243s registers an offense for safe navigation with < operator 243s accepts usages of safe navigation with `+@` method 243s registers an offense for safe navigation on the right-hand side of the `-` 243s proper highlighting 243s when in a method 243s when in a begin 243s when there are methods before 243s when there are methods after 243s when used with a modifier if 243s >= Ruby 2.7 243s registers an offense for ordinary method chain exists after safe navigation method call with a block using numbered parameter 243s 243s RuboCop::Cop::Style::RedundantSelf 243s reports an offense a self receiver of .call 243s does not report an offense when receiver and multiple assigned lvalue have the same name 243s does not report an offense when self receiver in a method argument and lvalue have the same name 243s accepts a self receiver with the square bracket operator 243s does not report an offense when lvasgn name is used in `until` 243s accepts a self receiver used to distinguish from constant 243s accepts a self receiver on an lvalue of mlhs arguments 243s accepts a self receiver used to distinguish from argument of block 243s accepts a self receiver of methods also defined on `Kernel` 243s does not report an offense when masgn name is used in `while` 243s reports an offense when a different lvasgn name is used in `if` 243s does not report an offense when lvasgn name is used in `unless` 243s does not report an offense when masgn name is used in `unless` 243s accepts a self receiver on an lvalue of an or-assignment 243s reports an offense a self receiver on an rvalue 243s does not report an offense when receiver and lvalue have the same name 243s does not report an offense when masgn name is used in `until` 243s does not report an offense when masgn name is used in `if` 243s accepts a self receiver on an lvalue of an assignment 243s accepts when nested receiver and lvalue have the name name 243s accepts a self receiver for methods named like ruby keywords 243s accepts a self receiver with the double less-than operator 243s accepts a self receiver on an lvalue of a plus-assignment 243s reports an offense when a different masgn name is used in `if` 243s does not report an offense when self receiver in a method argument and multiple assigned lvalue have the same name 243s does not report an offense when lvasgn name is used in `while` 243s does not report an offense when lvasgn name is used in `if` 243s accepts a self receiver on an lvalue of an and-assignment 243s accepts a self receiver of .() 243s accepts a self receiver on an lvalue of a parallel assignment 243s does not report an offense when lvasgn name is nested below `if` 243s class methods 243s accepts a self receiver used to distinguish from local variable 243s accepts a self receiver used to distinguish from argument 243s accepts a self receiver used to distinguish from blockarg 243s accepts a self receiver used to distinguish from optional argument 243s Ruby 2.7 243s registers offense for self usage in numblocks 243s instance methods 243s accepts a self receiver used to distinguish from blockarg 243s accepts a self receiver used to distinguish from an argument when an inner method is defined 243s accepts a self receiver used to distinguish from argument 243s accepts a self receiver used to distinguish from optional argument 243s accepts a self receiver used to distinguish from an argument 243s accepts a self receiver used to distinguish from local variable 243s with ruby >= 2.7 243s with pattern matching 243s accepts a self receiver in a `if-guard` 243s accepts a self receiver on a `hash-pattern` 243s accepts a self receiver on a `array-pattern` 243s accepts a self receiver on an `match-var` 243s registers an offense when using self with a different match var 243s accepts a self receiver with a `match-alt` 243s registers an offense when using a self receiver with a pin 243s accepts a self receiver in a conditional pattern 243s accepts a self receiver in a nested pattern` 243s 243s RuboCop::Cop::Gemspec::DuplicatedAssignment 243s does not register an offense when using `spec.add_dependency` twice 243s registers an offense when using `name=` twice with `cbase` 243s registers an offense when using `name=` twice 243s registers an offense when using `version=` twice 243s does not register an offense when `name=` method call is not block value 243s registers an offense when using `required_ruby_version=` twice 243s does not register an offense when using `<<` twice 243s 243s RuboCop::Formatter::Colorizable 243s #white 243s invokes #colorize(string, white 243s #black 243s invokes #colorize(string, black 243s #colorize 243s when the global Rainbow.enabled is true 243s and the formatter's output is a tty 243s colorizes the passed string 243s and the formatter's output is not a tty 243s does nothing 243s and output is not a tty, but --color option was provided 243s colorizes the passed string 243s when the global Rainbow.enabled is false 243s and the formatter's output is a tty 243s does nothing 243s and the formatter's output is not a tty 243s does nothing 243s #yellow 243s invokes #colorize(string, yellow 243s #cyan 243s invokes #colorize(string, cyan 243s #magenta 243s invokes #colorize(string, magenta 243s #red 243s invokes #colorize(string, red 243s #green 243s invokes #colorize(string, green 243s #blue 243s invokes #colorize(string, blue 243s 243s RuboCop::Cop::Style::TrailingUnderscoreVariable 243s configured to allow named underscore variables 243s does not register an offense for a named splat underscore as the last variable 243s registers an offense for splat underscore as the last variable 243s does not register an offense for named variables that start with an underscore 243s registers an offense when multiple underscores are used as the last variables of parallel assignment 243s does not register an offense for an underscore preceded by a splat variable anywhere in the argument chain 243s registers an offense when the last variable of parallel assignment is an underscore 243s does not register an offense for multiple underscores preceded by a splat variable 243s registers an offense when underscore is the only variable in parallel assignment 243s registers an offense for nested assignments with trailing underscores 243s does not register an offense for a named variable preceded by a names splat underscore variable 243s does not register an offense for underscores at the beginning 243s does not register an offense for multiple underscore variables preceded by a named splat underscore variable 243s does not register an offense for complex nested assignments without trailing underscores 243s does not register an offense for multiple named underscores preceded by a splat variable 243s does not register an offense for an underscore variable preceded by a named splat underscore variable 243s registers an offense for multiple underscore variables preceded by a splat underscore variable 243s does not register an offense for an underscore preceded by a splat variable 243s registers an offense for complex nested assignments with trailing underscores 243s does not register an offense for nested assignments without trailing underscores 243s does not register an offense when there are no underscores 243s does not register an offense for an underscore preceded by a splat variable and another underscore 243s registers an offense for an underscore as the last param when there is also an underscore as the first param 243s does not register an offense for a named underscore variable preceded by a splat variable 243s registers an offense when underscore is the second to last variable and blank is the last variable 243s autocorrect 243s with parentheses 243s leaves parentheses but removes trailing underscores and commas 243s removes assignment part when every assignment is to `_` 243s leaves parentheses but removes trailing underscores 243s removes assignment part when it is the only variable 243s configured to not allow named underscore variables 243s does not register an offense for complex nested assignments without trailing underscores 243s registers an offense for nested assignments with trailing underscores 243s does not register an offense when there are no underscores 243s does not register an offense for underscores at the beginning 243s does not register an offense for an underscore preceded by a splat variable and another underscore 243s does not register an offense for a named underscore variable preceded by a splat variable 243s registers an offense for multiple underscore variables preceded by a splat underscore variable 243s registers an offense when underscore is the second to last variable and blank is the last variable 243s does not register an offense for a named underscore preceded by a splat variable 243s registers an offense for an underscore preceded by a named splat underscore 243s registers an offense for an underscore variable preceded by a named splat underscore variable 243s registers an offense when underscore is the only variable in parallel assignment 243s registers an offense for multiple underscore variables preceded by a named splat underscore variable 243s registers an offense for named variables that start with an underscore 243s registers an offense for a named splat underscore as the last variable 243s does not register an offense for a named variable preceded by a names splat underscore variable 243s registers an offense for an underscore as the last param when there is also an underscore as the first param 243s does not register an offense for multiple named underscores preceded by a splat variable 243s registers an offense when the last variable of parallel assignment is an underscore 243s does not register an offense for nested assignments without trailing underscores 243s does not register an offense for an underscore preceded by a splat variable 243s registers an offense for splat underscore as the last variable 243s registers an offense for complex nested assignments with trailing underscores 243s does not register an offense for an underscore preceded by a splat variable anywhere in the argument chain 243s registers an offense when multiple underscores are used as the last variables of parallel assignment 243s does not register an offense for multiple underscores preceded by a splat variable 243s autocorrect 243s with parentheses 243s leaves parentheses but removes trailing underscores 243s removes assignment part when every assignment is to `_` 243s removes assignment part when it is the only variable 243s leaves parentheses but removes trailing underscores and commas 243s 243s RuboCop::Cop::Style::NestedModifier 243s autocorrects unless + unless 243s registers one offense for more than two modifiers 243s adds parentheses to method arguments when needed in autocorrection 243s adds parentheses when needed in autocorrection 243s autocorrects unless + if 243s autocorrects if + unless 243s autocorrects if + if 243s autocorrects unless with a comparison operator + if 243s does not add redundant parentheses in autocorrection 243s until 243s behaves like not correctable 243s does not autocorrect when until is the outer modifier 243s does not autocorrect when until is the inner modifier 243s while 243s behaves like not correctable 243s does not autocorrect when while is the inner modifier 243s does not autocorrect when while is the outer modifier 243s 243s RuboCop::Cop::Naming::BlockForwarding 243s when `EnforcedStyle: explicit 243s Ruby >= 3.1 243s does not register an offense when using explicit block forwarding without method body 243s registers and corrects and corrects an offense when using anonymous block forwarding without method body 243s registers and corrects an offense when using `yield` in method body 243s does not register an offense when using explicit block forwarding 243s registers and corrects an offense when using symbol proc argument in method body 243s registers and corrects an offense when using anonymous block forwarding in singleton method 243s does not register an offense when assigning the block arg 243s does not register an offense when defining without block argument method 243s registers and corrects an offense when using anonymous block forwarding 243s when `BlockForwardingName: block` is already in use 243s registers and no corrects an offense when using anonymous block forwarding 243s when `BlockForwardingName: proc 243s registers and corrects an offense when using anonymous block forwarding 243s when `EnforcedStyle: anonymous 243s Ruby >= 3.1 243s registers and corrects an offense when using explicit block forwarding in singleton method 243s registers and corrects an only explicit block forwarding when using multiple proc arguments 243s does not register an offense when using anonymous block forwarding without method body 243s registers and corrects an offense when using explicit block forwarding without method definition parentheses 243s does not register an offense when using block argument as a variable 243s does not register an offense when defining kwoptarg with block args method 243s registers and corrects an offense when using `yield` in method body 243s does not register an offense when defining no arguments method 243s registers and corrects an offense when using symbol proc argument in method body 243s does not register an offense when defining without block argument method 243s does not register an offense when assigning the block arg 243s does not register an offense when defining kwarg with block args method 243s registers and corrects an offense when using explicit block forwarding without method body 243s does not register an offense when using anonymous block forwarding 243s registers and corrects an offense when using explicit block forwarding 243s Ruby < 3.0 243s does not register an offense when not using anonymous block forwarding 243s 243s RuboCop::Cop::Metrics::BlockNesting 243s accepts `Max` levels of nesting 243s accepts if/elsif 243s nested `while` 243s registers an offense 243s nested `rescue` 243s registers an offense 243s nested `for` 243s registers an offense 243s when CountBlocks is true 243s nested inline block 243s registers an offense 243s nested multiline block 243s registers an offense 243s nested `until` 243s registers an offense 243s nested `case` 243s registers an offense 243s `Max + 2` levels of `if` nesting 243s registers an offense 243s Multiple nested `ifs` at same level 243s registers 2 offenses 243s nested modifier `while` 243s registers an offense 243s when CountBlocks is false 243s accepts nested multiline blocks 243s accepts nested inline blocks 243s nested modifier `until` 243s registers an offense 243s `Max + 1` levels of `if` nesting 243s registers an offense 243s 243s RuboCop::Cop::Style::FileWrite 243s registers an offense for and corrects `File.open(filename, 'wb').write(content)` 243s registers an offense for and corrects the `File.open` with inline write block (mode 'w+') 243s registers an offense for and corrects `::File.open(filename, 'w').write(content)` 243s registers an offense for and corrects the `File.open` with multiline write block (mode 'wb') 243s registers an offense for and corrects `::File.open(filename, 'wt').write(content)` 243s registers an offense for and corrects `File.open(filename, 'wt').write(content)` 243s registers an offense for and corrects the `File.open` with inline write block (mode 'w') 243s does not register an offense for the `File.open` with multiline write block when not writing to the block variable 243s registers an offense for and corrects `::File.open(filename, 'w+b').write(content)` 243s registers an offense for and corrects the `File.open` with multiline write block (mode 'w') 243s registers an offense for and corrects the `File.open` with multiline write block (mode 'w+b') with heredoc 243s registers an offense for and corrects `::File.open(filename, 'wb').write(content)` 243s registers an offense for and corrects `File.open(filename, 'w+').write(content)` 243s registers an offense for and corrects `File.open(filename, 'w+t').write(content)` 243s registers an offense for and corrects the `File.open` with inline write block (mode 'wt') 243s registers an offense for and corrects the `File.open` with multiline write block (mode 'wb') with heredoc 243s registers an offense for and corrects the `File.open` with multiline write block (mode 'wt') with heredoc 243s registers an offense for and corrects the `File.open` with multiline write block (mode 'w+b') 243s does not register an offense when a splat argument is passed to `f.write` 243s registers an offense for and corrects the `File.open` with multiline write block (mode 'w+t') 243s registers an offense for and corrects `::File.open(filename, 'w+').write(content)` 243s registers an offense for and corrects the `File.open` with inline write block (mode 'w+b') 243s registers an offense for and corrects `::File.open(filename, 'w+t').write(content)` 243s registers an offense for and corrects the `File.open` with multiline write block (mode 'w+') with heredoc 243s registers an offense for and corrects `File.open(filename, 'w').write(content)` 243s registers an offense for and corrects the `File.open` with multiline write block (mode 'wt') 243s registers an offense for and corrects the `File.open` with multiline write block (mode 'w') with heredoc 243s registers an offense for and corrects the `File.open` with inline write block (mode 'w+t') 243s registers an offense for and corrects the `File.open` with multiline write block (mode 'w+') 243s registers an offense for and corrects `File.open(filename, 'w+b').write(content)` 243s registers an offense for and corrects the `File.open` with inline write block (mode 'wb') 243s registers an offense for and corrects the `File.open` with multiline write block (mode 'w+t') with heredoc 243s 243s RuboCop::Cop::Layout::SpaceInsideParens 243s when EnforcedStyle is no_space 243s accepts parentheses with no spaces 243s accepts parentheses in block parameter list 243s registers an offense for spaces inside parens 243s accepts parentheses with comment and line break 243s accepts parentheses with line break 243s registers an offense for space around heredoc start 243s when EnforcedStyle is space 243s accepts parentheses with spaces 243s registers an offense for space inside empty parens 243s accepts parentheses with comment and line break 243s registers an offense for no spaces inside parens 243s accepts empty parentheses without spaces 243s accepts parentheses with line break 243s registers an offense for no space around heredoc start 243s registers an offense in block parameter list with no spaces 243s when EnforcedStyle is compact 243s accepts three consecutive right parentheses 243s accepts parentheses with spaces 243s accepts two consecutive right parentheses 243s registers multiple offense for a missing and extra space between consecutive brackets 243s accepts two consecutive left parentheses 243s accepts parentheses with comment and line break 243s accepts parentheses with line break 243s accepts three consecutive left parentheses 243s registers an offense in block parameter list with no spaces 243s registers an offense for space between consecutive brackets 243s registers an offense for no space around heredoc start 243s registers an offense for space inside empty parens 243s registers an offense for no spaces inside parens 243s accepts empty parentheses without spaces 243s 243s RuboCop::Cop::Lint::EmptyConditionalBody 243s registers an offense for missing `unless` body 243s registers an offense for missing `unless` and `else` body 243s registers an offense for missing `elsif` body 243s registers an offense for missing `if` body with `else` 243s registers an offense for missing `elsif` body that is not the one with a comment 243s registers an offense for missing `if` body with `elsif` 243s registers an offense for missing `unless` body with `else` 243s registers an offense for missing `if` and `else` body 243s registers an offense for missing `if` body 243s registers an offense for missing all branches of `if` and multiple `elsif` body 243s registers an offense for missing `if` body with present `else` body 243s does not register an offense for missing `elsif` body with a comment 243s registers an offense for missing `if` and `elsif` body 243s autocorrects properly when the if is assigned to a variable 243s does not register an offense for missing `if` body with a comment 243s registers an offense for missing all branches of `if` and `elsif` body 243s registers an offense for missing second `elsif` body without an inline comment 243s does not register an offense for missing `elsif` body with an inline comment 243s registers an offense for missing `if` and `else` body with some indentation 243s does not register an offense for missing `unless` body with a comment 243s when AllowComments is false 243s registers an offense for missing `if` body with a comment 243s registers an offense for missing `unless` body with a comment 243s registers an offense for missing `elsif` body with a comment 243s 243s RuboCop::Formatter::EmacsStyleFormatter 243s #finished 243s does not report summary 243s #file_finished 243s displays parsable text 243s when the offense is automatically corrected 243s prints [Corrected] along with message 243s when the offense message contains a newline 243s strips newlines out of the error message 243s when the offense is marked as todo 243s prints [Todo] along with message 243s 243s RuboCop::Cop::Style::NestedParenthesizedCalls 243s on a nested, parenthesized method call 243s doesn't register an offense 243s on a method call with no arguments 243s doesn't register an offense 243s on a call to a setter method 243s doesn't register an offense 243s on a deeply nested argument 243s doesn't register an offense 243s on an aref, nested in a parenthesized method call 243s doesn't register an offense 243s on a non-parenthesized method call 243s doesn't register an offense 243s backslash newline in method call 243s registers an offense 243s on a non-parenthesized call nested in a parenthesized one 243s with multiple arguments to the nested call 243s registers an offense 243s with a single argument to the nested call 243s registers an offense 243s when using safe navigation operator 243s registers an offense 243s on a call with no arguments, nested in a parenthesized one 243s doesn't register an offense 243s on a permitted method 243s doesn't register an offense 243s 243s RuboCop::Formatter::OffenseCountFormatter 243s #report_summary 243s when an offense is detected 243s shows the cop and the offense count 243s #file_finished 243s when any offenses are detected 243s increments the count for the cop in offense_counts 243s when no offenses are detected 243s does not add to offense_counts 243s #finished 243s when output tty is true 244s has a progress bar 244s when there are many offenses 244s when --display-style-guide was not given 244s sorts by offense count first and then by cop name 244s when --display-style-guide was given 244s shows links and sorts by offense count first and then by cop name 244s 244s RuboCop::Cop::Naming::RescuedExceptionsVariableName 244s with default config 244s with implicit rescue 244s without `Exception` variable 244s does not register an offense 244s with `Exception` variable 244s does not register an offense when using `_e` 244s does not register an offense when using `e` 244s registers an offense when using `_exc` 244s registers an offense when using `exc` 244s with explicit rescue 244s with splat operator as `Exception` list 244s registers an offense with unexpected variable name 244s does not register an offense with expected variable name 244s does not register an offense without variable name 244s with lower letters class name 244s does not register an offense 244s with `Exception` variable 244s registers an offense when using `exc` and renames its usage 244s does not register an offense when using `_e` 244s registers offenses when using `foo` and `bar` in multiple rescues 244s registers an offense when using `exc` 244s registers an offense when using `_exc` 244s does not register an offense when using _e followed by e 244s does not register an offense when using `e` 244s with method as `Exception` 244s does not register an offense without variable name 244s registers an offense with unexpected variable name 244s does not register an offense with expected variable name 244s shadowing an external variable 244s does not register an offense 244s without `Exception` variable 244s does not register an offense 244s with multiple branches 244s registers and corrects each offense 244s when the variable is reassigned using multiple assignment 244s only corrects uses of the exception 244s when the variable is reassigned 244s only corrects the exception variable 244s only corrects uses of the exception 244s with variable being referenced 244s renames the variable references when autocorrecting 244s with nested rescues 244s handles it 244s with the `PreferredName` setup 244s does not register an offense when using `_exception` 244s registers an offense when using `e` 244s registers an offense when using `_e` 244s registers offenses when using `foo` and `bar` in multiple rescues 244s does not register an offense when using `exception` 244s 244s RuboCop::Cop::Style::MethodCallWithoutArgsParentheses 244s registers an offense for parens in method call without args 244s autocorrects calls that could be empty literals 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 parens after not 244s accepts special lambda call syntax 244s accepts parentheses for methods starting with an upcase letter 244s registers an offense for `obj.method &&= func()` 244s when AllowedMethods is enabled 244s ignores method listed in AllowedMethods 244s when AllowedPatterns is enabled 244s ignores method listed in AllowedMethods 244s method call as argument 244s registers an empty parens offense for multiple assignment 244s accepts without parens 244s registers an offense with empty parens 244s assignment to a variable with the same name 244s accepts parens in parallel assignment 244s accepts parens in local variable assignment 244s accepts parens in shorthand assignment 244s accepts parens in default argument assignment 244s accepts parens in complex assignment 244s 244s RuboCop::Cop::Style::NumericPredicate 244s when configured to enforce numeric comparison methods 244s allows checking if a number is not zero 244s registers an offense for checking if a number is zero 244s registers an offense for checking if a number is positive 244s registers an offense for checking if a number is negative 244s when there are allowed methods 244s in block 244s ignored method 244s with a string 244s allows checking if a number is negative 244s allows checking if a number is positive 244s with a regex 244s allows checking if a number is positive 244s allows checking if a number is negative 244s not ignored method 244s registers an offense for checking if a number is positive 244s registers an offense for checking if a number is negative 244s simple method call 244s `EnforcedStyle` is `comparison` 244s allows checking if a number is zero 244s `EnforcedStyle` is `predicate` 244s allows checking if a number is zero 244s in argument 244s not ignored method 244s when checking if a number is positive 244s when target ruby version is 2.3 or higher 244s registers an offense 244s when target ruby version is 2.2 or lower 244s does not register an offense 244s when checking if a number is negative 244s when target ruby version is 2.3 or higher 244s registers an offense 244s when target ruby version is 2.2 or lower 244s does not register an offense 244s ignored method 244s with a string 244s allows checking if a number is positive 244s allows checking if a number is negative 244s with a regex 244s allows checking if a number is negative 244s allows checking if a number is positive 244s when configured to enforce numeric predicate methods 244s when checking if a number is negative 244s when target ruby version is 2.3 or higher 244s registers an offense 244s registers an offense in yoda condition 244s with a complex expression 244s registers an offense in yoda condition 244s registers an offense 244s when target ruby version is 2.2 or lower 244s does not register an offense 244s when checking if a number is zero 244s registers an offense 244s allows comparing against a global variable 244s registers an offense with a complex expression 244s when comparing against a method argument variable 244s registers an offense 244s registers an offense with complex expression 244s when checking if a number is positive 244s when target ruby version is 2.2 or lower 244s does not register an offense 244s when target ruby version is 2.3 or higher 244s registers an offense 244s registers an offense in yoda condition 244s with a complex expression 244s registers an offense in yoda condition 244s registers an offense 244s with checking if a number is not zero 244s allows comparing against a complex expression 244s allows comparing against a global variable 244s allows comparing against a variable 244s 244s RuboCop::Cop::Style::IfUnlessModifierOfIfUnless 244s provides a good error message 244s ternary with modifier 244s registers an offense and corrects 244s `unless` / `else` with modifier 244s registers an offense and corrects 244s conditional with modifier in body 244s accepts 244s nested conditionals 244s accepts 244s conditional with modifier 244s registers an offense and corrects 244s 244s RuboCop::Cop::Lint::ShadowedException 244s modifier rescue 244s accepts rescue in its modifier form 244s single rescue 244s registers an offense rescuing Exception with any other error or exception 244s accepts rescuing a single exception that has an else 244s registers an offense for the same exception multiple times 244s accepts rescuing multiple custom exceptions 244s accepts rescuing a single exception that is assigned to a variable 244s accepts rescuing a single exception 244s rescue a exception without causing constant name deprecation warning 244s accepts rescuing a single exception that has an ensure 244s accepts rescuing a custom exception and a standard exception 244s accepts rescuing a single custom exception 244s accepts rescue containing multiple same error code exceptions 244s registers an offense rescuing exceptions that are ancestors of each other 244s accepts splat arguments passed to rescue 244s accepts an empty rescue 244s accepts rescuing a multiple exceptions that are not ancestors that have an else 244s when there are multiple levels of exceptions in the same rescue 244s registers an offense for two exceptions 244s registers an offense for more than two exceptions 244s multiple rescues 244s accepts rescuing a known exception before an unknown exceptions 244s accepts rescuing exceptions in order of level with multiple exceptions in a group 244s registers an offense for two exceptions when there are multiple levels of exceptions in the same rescue 244s accepts rescuing exceptions in order of level 244s registers an offense rescuing out of order exceptions when there is an ensure 244s accepts many (>= 7) rescue groups 244s registers an offense when a higher level exception is rescued before a lower level exception 244s accepts rescuing a known exception between unknown exceptions 244s accepts rescuing custom exceptions in multiple rescue groups 244s accepts rescuing a known exception after an unknown exceptions 244s registers an offense rescuing Exception before an unknown exceptions 244s accepts rescuing exceptions in order of level with multiple exceptions in a group with custom exceptions 244s registers an offense when a higher level exception is rescued before a lower level exception when there are multiple exceptions rescued in a group 244s ignores expressions of non-const 244s last rescue does not specify exception class 244s highlights range ending at rescue keyword 244s splat arguments 244s does not register an offense for splat arguments rescued after rescuing a known exception 244s registers an offense for splat arguments rescued after rescuing Exception 244s accepts splat arguments passed to multiple rescues 244s exceptions from different ancestry chains 244s accepts rescuing exceptions in one order 244s accepts rescuing exceptions in another order 244s 244s RuboCop::Cop::Style::MultilineTernaryOperator 244s registers an offense and corrects when condition is multiline 244s registers offense and corrects when the if branch and the else branch are on a separate line from the condition 244s register an offense and corrects when returning a multiline ternary operator expression with `return` 244s register an offense and corrects when returning a multiline ternary operator expression with method call 244s register an offense and corrects when returning a multiline ternary operator expression with `next` 244s register an offense and corrects when returning a multiline ternary operator expression with `break` 244s registers an offense and corrects when condition is multiline and using assignment method 244s registers an offense and corrects when the false branch is on a separate line 244s registers an offense and corrects when the false branch is on a separate line and assigning a return value 244s accepts a single line ternary operator expression 244s registers an offense and corrects when condition is multiline and using hash key assignment 244s registers an offense and corrects when everything is on a separate line 244s 244s RuboCop::Cop::Style::NegatedUnless 244s does not blow up for empty unless condition 244s does not blow up on a negated ternary operator 244s does not blow up for ternary ops 244s does not blow up for empty if condition 244s with “both” style 244s accepts an unless where only part of the condition is negated 244s autocorrects by replacing parenthesized unless not with if 244s accepts an unless where the condition is doubly negated 244s registers an offense for unless with "not" condition 244s accepts an unless/else with negative condition 244s registers an offense for unless with exclamation point condition 244s with “postfix” style 244s registers an offense for postfix 244s does not register an offense for prefix 244s with “prefix” style 244s registers an offense for prefix 244s does not register an offense for postfix 244s 244s RuboCop::Cop::Lint::Void 244s registers an offense for void op >= if not on last line 244s registers an offense for void var VAR if not on last line 244s accepts void unary op ~ by itself without a begin block 244s registers an offense for void `self` if not on last line 244s accepts void op == by itself without a begin block 244s registers two offenses for void literals in `#tap` method 244s accepts void op <= if on last line 244s registers an offense for void lit {} if not on last line 244s registers an offense for void sign op + if not on last line 244s registers an offense for void literal in a method definition 244s accepts void unary op ~ if on last line 244s registers an offense for void op % if not on last line 244s accepts void unary op - if on last line 244s registers an offense for void var $var if not on last line 244s registers an offense for void op - if not on last line 244s registers an offense for void lit [1] if not on last line 244s registers an offense for void lit 2.0 if not on last line 244s registers two offenses for void literals in a `for` 244s accepts void op > by itself without a begin block 244s accepts void unary op - by itself without a begin block 244s accepts void op != by itself without a begin block 244s accepts void unary op + by itself without a begin block 244s registers two offenses for void literals in a setter method 244s accepts void op <= by itself without a begin block 244s accepts void op + by itself without a begin block 244s registers an offense for void op * if not on last line 244s accepts backtick commands 244s accepts void op >= if on last line 244s accepts void op * by itself without a begin block 244s accepts void op <=> if on last line 244s registers an offense for void `defined?` if not on last line 244s accepts void op % by itself without a begin block 244s handles explicit begin blocks 244s accepts void unary op ! by itself without a begin block 244s registers two offenses for void literals in a `#each` method 244s accepts void op < by itself without a begin block 244s accepts void op % if on last line 244s registers two offenses for void literals in an initialize method 244s registers an offense for void op != if not on last line 244s accepts method with irange block 244s registers an offense for void op + if not on last line 244s registers an offense for void lit 1 if not on last line 244s registers an offense for void var var if not on last line 244s accepts void op != if on last line 244s registers an offense for void op > if not on last line 244s registers an offense for void op / if not on last line 244s accepts void op >= by itself without a begin block 244s accepts short call syntax 244s registers an offense for void unary op ! if not on last line 244s accepts empty block 244s accepts void op > if on last line 244s registers an offense for void op < if not on last line 244s accepts void op * if on last line 244s registers an offense for void op === if not on last line 244s registers an offense for void op <= if not on last line 244s accepts percent-x commands 244s accepts void op / by itself without a begin block 244s registers an offense for void lit /test/ if not on last line 244s accepts void unary op + if on last line 244s accepts void op - by itself without a begin block 244s handles `#each` block with single expression 244s accepts void op <=> by itself without a begin block 244s registers an offense for void lit :test if not on last line 244s accepts void unary op ! if on last line 244s registers an offense for void unary op ~ if not on last line 244s accepts void op / if on last line 244s accepts void op == if on last line 244s registers an offense for void var @var if not on last line 244s registers an offense for void var @@var if not on last line 244s registers an offense for void op <=> if not on last line 244s accepts method with erange block 244s registers an offense for void op == if not on last line 244s accepts void op - if on last line 244s accepts void op === by itself without a begin block 244s accepts void op + if on last line 244s accepts void op === if on last line 244s registers an offense for void sign op - if not on last line 244s accepts void op < if on last line 244s Ruby 2.7 244s registers two offenses for void literals in `#tap` method 244s when checking for methods with no side effects 244s registers an offense for chained methods 244s registers an offense if not on last line 244s when not checking for methods with no side effects 244s does not register an offense for void nonmutating methods 244s 244s RuboCop::Cop::Layout::SpaceInsideArrayLiteralBrackets 244s does not register offense for any kind of reference brackets 244s with space inside empty braces allowed 244s accepts empty brackets with space inside 244s registers an offense and corrects empty brackets with more than one space inside 244s registers an offense and corrects empty brackets with no space inside 244s with space inside empty brackets not allowed 244s registers an offense and corrects empty brackets with multiple spaces inside 244s registers an offense and corrects multiline spaces 244s registers an offense and corrects empty brackets with 1 space inside 244s accepts empty brackets with no space inside 244s when EnforcedStyle is no_space 244s registers an offense and corrects 2 arrays on one line 244s does not register offense for valid multiline array 244s registers an offense and corrects array brackets with trailing whitespace 244s does not register offense for array when brackets get own line 244s registers an offense and corrects multiline array on end bracket with trailing method 244s registers an offense and corrects an array when two on one line 244s registers an offense and corrects array brackets with leading whitespace 244s accepts square brackets as method name 244s registers an offense and corrects multiline array on end bracket 244s does not register offense when 2 arrays on one line 244s accepts square brackets called with method call syntax 244s does not register offense when bottom bracket gets its own line indented with tabs 244s does not register offense when bottom bracket gets its own line & has trailing method 244s does not register offense for arrays with no spaces 244s does not register offense for valid 2-dimensional array 244s does not register offense when contains an array literal as an argument after a heredoc is started 244s does not register offense for arrays using ref brackets 244s accepts space inside array brackets if with comment 244s accepts a multiline array with whitespace before end bracket 244s registers an offense and corrects an array literal as an argument with trailing whitespace after a heredoc is started 244s does not register offense for indented array when bottom bracket gets its own line & is misaligned 244s when EnforcedStyle is space 244s does not register offense for valid 2-dimensional array 244s behaves like space inside arrays 244s registers an offense and corrects array brackets with no leading whitespace 244s accepts square brackets as method name 244s registers an offense and corrects array brackets with no trailing whitespace 244s does not register offense when bottom bracket gets its own line & has trailing method 244s registers an offense and corrects an array missing whitespace when there is more than one array on a line 244s accepts square brackets called with method call syntax 244s registers an offense and corrects multiline array on end bracket 244s does not register offense for indented array when bottom bracket gets its own line & is misaligned 244s register an offense and corrects when 2 arrays are on one line 244s does not register offense for array when brackets get their own line 244s does not register offense for arrays with spaces 244s accepts space inside array brackets with comment 244s registers an offense and corrects multiline array on end bracket with trailing method 244s does not register offense for arrays using ref brackets 244s does not register offense for valid multiline array 244s does not register offense when 2 arrays on one line 244s when EnforcedStyle is compact 244s does not register offense for valid 4-dimensional array 244s does not register offense for valid 3-dimensional array 244s registers an offense and corrects 3-dimensional array with extra spaces 244s accepts multiline array 244s registers an offense and corrects 2-dimensional array with extra spaces 244s does not register offense for valid 2-dimensional array 245s registers an offense and corrects space between 2 opening brackets 245s registers an offense and corrects space between 2 closing brackets 245s multiline, 2-dimensional array with newlines 245s registers an offense and corrects at the beginning of array 245s registers an offense and corrects at the end of array 245s multiline, 2-dimensional array with spaces 245s registers an offense and corrects at the beginning of array 245s registers an offense and corrects at the end of array 245s behaves like space inside arrays 245s registers an offense and corrects multiline array on end bracket with trailing method 245s does not register offense for indented array when bottom bracket gets its own line & is misaligned 245s does not register offense for arrays with spaces 245s accepts space inside array brackets with comment 245s does not register offense when 2 arrays on one line 245s does not register offense for valid multiline array 245s registers an offense and corrects multiline array on end bracket 245s register an offense and corrects when 2 arrays are on one line 245s does not register offense when bottom bracket gets its own line & has trailing method 245s does not register offense for arrays using ref brackets 245s registers an offense and corrects array brackets with no trailing whitespace 245s accepts square brackets as method name 245s registers an offense and corrects array brackets with no leading whitespace 245s does not register offense for array when brackets get their own line 245s registers an offense and corrects an array missing whitespace when there is more than one array on a line 245s accepts square brackets called with method call syntax 245s 245s RuboCop::Cop::Style::NestedTernaryOperator 245s can handle multiple nested ternaries 245s accepts a non-nested ternary operator within an if 245s registers an offense and corrects for a nested ternary operator expression 245s registers an offense and corrects for a nested ternary operator expression with block 245s registers an offense and corrects for a nested ternary operator expression with no parentheses on the outside 245s 245s RuboCop::Cop::Style::Alias 245s when EnforcedStyle is prefer_alias 245s does not register an offense for alias_method with non-literal method call argument 245s does not register an offense for alias_method in a block 245s does not register an offense for alias_method in self.method def 245s registers an offense for alias_method in a class block 245s registers an offense for alias with symbol args 245s does not register an offense for alias with bareword args 245s does not register an offense for alias_method with explicit receiver 245s does not register an offense for alias in an instance_eval block 245s does not register an offense for alias_method in a method def 245s registers an offense for alias_method at the top level 245s registers an offense for alias_method in a module block 245s does not register an offense for alias_method with non-literal constant argument 245s when EnforcedStyle is prefer_alias_method 245s registers an offense for alias with bareword args 245s does not register an offense for alias with gvars 245s registers an offense for alias with symbol args 245s does not register an offense for alias in an instance_eval block 245s does not register an offense for alias_method 245s 245s RuboCop::Formatter::SimpleTextFormatter 245s #report_summary 245s when a offense detected and a offense autocorrectable 245s handles pluralization correctly 245s when 2 offenses detected and 2 offenses autocorrectable 245s handles pluralization correctly 245s when no files inspected 245s handles pluralization correctly 245s when an offense is corrected 245s prints about correction 245s when 2 offenses are corrected 245s handles pluralization correctly 245s when 2 offenses detected 245s handles pluralization correctly 245s when a file inspected and no offenses detected 245s handles pluralization correctly 245s when a offense detected 245s handles pluralization correctly 245s when 2 offenses are corrected and 2 offenses autocorrectable 245s handles pluralization correctly 245s #report_file 245s behaves like report for severity 245s when the offense is automatically corrected 245s prints [Corrected] along with message 245s when the offense is not corrected 245s prints message as-is 245s when the offense is marked as todo 245s prints [Todo] along with message 245s when the offense is correctable 245s prints message as-is 245s the file is outside of the current working directory 245s prints as absolute path 245s the file is under the current working directory 245s prints as relative path 245s behaves like report for severity 245s when the offense is not corrected 245s prints message as-is 245s the file is outside of the current working directory 245s prints as absolute path 245s when the offense is marked as todo 245s prints [Todo] along with message 245s when the offense is correctable 245s prints message as-is 245s when the offense is automatically corrected 245s prints [Corrected] along with message 245s the file is under the current working directory 245s prints as relative path 245s behaves like report for severity 245s when the offense is marked as todo 245s prints [Todo] along with message 245s when the offense is automatically corrected 245s prints [Corrected] along with message 245s the file is outside of the current working directory 245s prints as absolute path 245s the file is under the current working directory 245s prints as relative path 245s when the offense is not corrected 245s prints message as-is 245s when the offense is correctable 245s prints message as-is 245s behaves like report for severity 245s when the offense is automatically corrected 245s prints [Corrected] along with message 245s when the offense is not corrected 245s prints message as-is 245s the file is under the current working directory 245s prints as relative path 245s when the offense is marked as todo 245s prints [Todo] along with message 245s when the offense is correctable 245s prints message as-is 245s the file is outside of the current working directory 245s prints as absolute path 245s behaves like report for severity 245s when the offense is marked as todo 245s prints [Todo] along with message 245s the file is outside of the current working directory 245s prints as absolute path 245s when the offense is automatically corrected 245s prints [Corrected] along with message 245s when the offense is not corrected 245s prints message as-is 245s the file is under the current working directory 245s prints as relative path 245s when the offense is correctable 245s prints message as-is 245s behaves like report for severity 245s the file is under the current working directory 245s prints as relative path 245s when the offense is marked as todo 245s prints [Todo] along with message 245s when the offense is not corrected 245s prints message as-is 245s the file is outside of the current working directory 245s prints as absolute path 245s when the offense is automatically corrected 245s prints [Corrected] along with message 245s when the offense is correctable 245s prints message as-is 245s 245s RuboCop::Cop::Layout::SpaceAfterSemicolon 245s registers an offense and corrects semicolon without space after it 245s does not crash if semicolon is the last character of the file 245s inside block braces 245s when EnforcedStyle for SpaceInsideBlockBraces is space 245s registers an offense and corrects no space between a semicolon and a closing brace 245s behaves like common behavior 245s accepts a space between a semicolon and a closing brace 245s when EnforcedStyle for SpaceInsideBlockBraces is no_space 245s accepts no space between a semicolon and a closing brace 245s behaves like common behavior 245s accepts a space between a semicolon and a closing brace 245s 245s RuboCop::Cop::AlignmentCorrector 245s #correct 245s within string literals 245s does not insert whitespace 245s simple indentation 245s with a positive column delta 245s indents 245s with a negative column delta 245s outdents 245s with large column deltas 245s with plain heredoc (<<) 245s behaves like heredoc indenter 245s does not change indentation of here doc bodies and end markers 245s with heredoc in backticks (<<``) 245s behaves like heredoc indenter 245s does not change indentation of here doc bodies and end markers 245s with single-line here docs 245s does not indent body and end marker 245s 245s RuboCop::Cop::Layout::LineContinuationLeadingSpace 245s EnforcedStyle: trailing 245s puts the offense message in correct position also on indented line 245s marks the correct range when string is a positional method argument 245s registers offenses when 2nd and 3rd line has leading spaces 245s registers offense in the right location when 1st line is not the string 245s registers an offense when 2nd line has multiple leading spaces 245s registers an offense when 2nd line has one leading space 245s marks the correct range when string is a block method argument 245s interpolated strings 245s registers offenses when 2nd line has leading spaces and 2nd line is interpolated 245s registers an offense for incorrectly formatted multiline interpolated string 245s registers no offense on doubly interpolated string alone 245s registers offenses when 2nd line has leading spaces and 1st line is interpolated 245s registers no offense for correctly formatted multiline interpolation 245s registers no offense for correctly formatted multiline interpolated string 245s registers no offense on interpolated string alone 245s EnforcedStyle: leading 245s registers an offense when 1st line has one trailing space 245s registers offenses when 1st and 2nd line has trailing spaces 245s registers an offense when 1st line has multiple trailing spaces 245s marks the correct range when string is a positional method argument 245s registers offense in the right location when 1st line is not the string 245s puts the offense message in correct position also on indented line 245s marks the correct range when string is a block method argument 245s interpolated strings 245s registers no offense for correctly formatted multiline interpolation 245s registers an offense for incorrectly formatted multiline interpolated string 245s registers offenses when 1st line has leading spaces and 1st line is interpolated 245s registers offenses when 1st line has trailing spaces and 2nd line is interpolated 245s registers no offense for correctly formatted multiline interpolated string 245s registers no offense on interpolated string alone 245s registers no offense on doubly interpolated string alone 245s 245s RuboCop::Cop::Style::SafeNavigation 245s allows a method call as a parameter when the parameter is safe guarded with an object check 245s allows method calls that do not get called using . safe guarded by an object check 245s allows for empty if blocks with comments 245s allows method call that is used in a regex comparison safe guarded by an object check 245s allows a method call safeguarded with a negative check for the object when using `unless` 245s allows an object check before a method call that is used in a spaceship comparison 245s allows an object check before a negated method call with a safe navigation 245s allows an object check before a method chain that is used in a comparison 245s allows an object check before a negated predicate 245s allows object checks in the condition of an elsif statement and a method call on that object in the body 245s allows a method call safeguarded with a negative check for the object when using `if` 245s allows an object check before a negated predicate method chain 245s allows method call that is used in a negated regex comparison safe guarded by an object check 245s allows an object check before a long chain with a block 245s allows an object check before a nil check on a short chain 245s allows calls on nil 245s allows an object check before a method call that is used in a negated regex comparison 245s allows an object check before a method chain longer than 2 methods 245s does not move comments that are inside an inner block 245s allows a method call safeguarded when using `unless nil?` 245s allows calls using safe navigation 245s allows an object check before a method call that is used in a comparison 245s allows an object check before hash access 245s allows calls to methods not safeguarded by respond_to 245s allows chained method calls during arithmetic operations safe guarded by an object check 245s allows an object check before a method call that is used in a regex comparison 245s allows an object check before a nil check on a long chain 245s allows method call that is used in a comparison safe guarded by an object check 245s allows a method chain that is used in a comparison safe guarded by an object check 245s allows chained method calls during assignment safe guardedby an object check 245s allows method call that is used in a spaceship comparison safe guarded by an object check 245s allows an object check before a blank check 245s allows an object check before a method call that is used with `empty?` 245s behaves like all variable types 245s if expression 245s registers an offense for a single method call with a block inside of an unless negative check for the object 245s registers an offense for a single method call with params inside of a check for the object 245s registers an offense for a single method call with params and a block inside of an unless negative check for the object 245s registers an offense for a single method call inside of an unless nil check for the object 245s only moves comments that fall within the expression 245s registers an offense for a single method call inside of a non-nil check for the object 245s registers an offense for a single method call inside of a check for the object 245s registers an offense for a single method call with a block inside of a check for the object 245s registers an offense for a single method call with params inside of a non-nil check for the object 245s registers an offense for a single method call with params and a block inside of an unless nil check for the object 245s registers an offense for a single method call with params inside of an unless negative check for the object 245s registers an offense for a single method call with params and a block inside of a non-nil check for the object 245s registers an offense for a single method call with a block inside of a non-nil check for the object 245s registers an offense for a single method call with params and a block inside of a check for the object 245s registers an offense for a single method call with a block inside of an unless nil check for the object 245s registers an offense for a single method call with params inside of an unless nil check for the object 245s does not lose comments within if expression 245s registers an offense for a single method call inside of an unless negative check for the object 245s allows a single method call inside of a check for the object with an else 245s ternary expression 245s allows ternary expression 245s object check before method call 245s allows a nil object check followed by a method call with params and a block 245s allows a non object check followed by a method call with params 245s allows a non object check followed by a method call with a block 245s allows a nil object check followed by a method call 245s allows a nil object check followed by a method call with params 245s allows a non object check followed by a method call with params and a block 245s allows a non object check followed by a method call 245s allows a nil object check followed by a method call with a block 245s ConvertCodeThatCanStartToReturnNil true 245s registers an offense for a non-nil object check followed by a method call with params 245s registers an offense for an object check followed by a method call with params 245s registers an offense for a check for the object followed by a method call in the condition for an if expression 245s registers an offense for an object check followed by a method call with a block 245s corrects an object check followed by a method call and another check 245s registers an offense for a non-nil object check followed by a method call with params and a block 245s registers an offense for a non-nil object check followed by a method call 245s registers an offense for an object check followed by a method call 245s registers an offense for a non-nil object check followed by a method call with a block 245s registers an offense for an object check followed by a method call with params and a block 245s method chaining 245s registers an offense for an object check followed by chained method calls with blocks 245s MaxChainLength: 1 245s registers an offense for an object check followed by 1 chained method calls 245s allows an object check followed by 2 chained method calls 245s MaxChainLength: 3 245s allows an object check followed by 4 chained method calls 245s registers an offense for an object check followed by 3 chained method calls 245s with Lint/SafeNavigationChain disabled 245s allows an object check followed by chained method calls with blocks 245s allows an object check followed by chained method calls 245s ConvertCodeThatCanStartToReturnNil false 245s allows a non-nil object check followed by a method call with params 245s allows a non-nil object check followed by a method call with a block 245s allows a non-nil object check followed by a method call with params and a block 245s allows a non-nil object check followed by a method call 245s registers an offense for an object check followed by a method call with a block 245s registers an offense for an object check followed by a method calls that nil responds to 245s registers an offense for a check for the object followed by a method call in the condition for an if expression 245s registers an offense for an object check followed by a method call with params 245s registers an offense for an object check followed by a method call with params and a block 245s registers an offense for an object check followed by a method call 245s method chaining 245s corrects an object check followed by a chained method call with a block 245s corrects an object check followed by a chained method call with a symbol proc 245s corrects an object check followed by a chained method call with params 245s corrects an object check followed by a chained method call 245s modifier if 245s registers an offense when safe guard check and safe navigation method call are connected with `&&` condition 245s registers an offense for a method call with params safeguarded with a check for the object 245s registers an offense for a method call with params safeguarded with a negative check for the object 245s registers an offense for an object check followed by a method call with a comment at EOL 245s registers an offense for a method call safeguarded with a check for the object 245s registers an offense for a method call on an accessor safeguarded by a check for the accessed variable 245s registers an offense for a method call that nil responds to safe guarded by an object check 245s registers an offense for a method call with a block safeguarded with a check for the object 245s registers an offense for a method call with params and a block safeguarded with a negative check for the object 245s registers an offense for a method call with params and a block safeguarded with a nil check for the object 245s registers an offense for a method call safeguarded with a negative check for the object 245s registers an offense for a method call safeguarded with a nil check for the object 245s registers an offense for a method call with params safeguarded with a nil check for the object 245s registers an offense for a method call with params safeguarded with a negative nil check for the object 245s registers an offense for a method call with a block safeguarded with a negative nil check for the object 245s registers an offense for a chained method call safeguarded with a negative nil check for the object 245s registers an offense for a method call with params and a block safeguarded with a negative nil check for the object 245s registers an offense for a method call safeguarded with a negative nil check for the object 245s registers an offense for a method call with params and a block safeguarded with a check for the object 245s registers an offense for a chained method call safeguarded with an unless nil check for the object 245s registers an offense for a chained method call safeguarded with a check for the object 245s registers an offense for a method call with a block safeguarded with a nil check for the object 245s registers an offense for a method call with a block safeguarded with a negative check for the object 245s behaves like safe guarding logical break keywords 245s allows a method call being passed to return safe guarded by an object check 245s behaves like safe guarding logical break keywords 245s allows a method call being passed to yield safe guarded by an object check 245s behaves like safe guarding logical break keywords 245s allows a method call being passed to fail safe guarded by an object check 245s behaves like safe guarding logical break keywords 245s allows a method call being passed to break safe guarded by an object check 245s behaves like safe guarding logical break keywords 245s allows a method call being passed to raise safe guarded by an object check 245s behaves like safe guarding logical break keywords 245s allows a method call being passed to next safe guarded by an object check 245s behaves like safe guarding logical break keywords 245s allows a method call being passed to throw safe guarded by an object check 245s behaves like all variable types 245s modifier if 245s registers an offense for a chained method call safeguarded with a check for the object 245s registers an offense when safe guard check and safe navigation method call are connected with `&&` condition 245s registers an offense for a method call with params safeguarded with a negative check for the object 245s registers an offense for a method call safeguarded with a negative nil check for the object 245s registers an offense for a method call with params safeguarded with a negative nil check for the object 245s registers an offense for a method call safeguarded with a negative check for the object 245s registers an offense for a method call with params and a block safeguarded with a check for the object 245s registers an offense for a method call that nil responds to safe guarded by an object check 245s registers an offense for a method call safeguarded with a nil check for the object 245s registers an offense for a method call with params and a block safeguarded with a nil check for the object 245s registers an offense for a chained method call safeguarded with a negative nil check for the object 245s registers an offense for a method call safeguarded with a check for the object 245s registers an offense for a method call with a block safeguarded with a negative nil check for the object 245s registers an offense for a method call with a block safeguarded with a check for the object 245s registers an offense for a method call on an accessor safeguarded by a check for the accessed variable 245s registers an offense for a chained method call safeguarded with an unless nil check for the object 245s registers an offense for a method call with params and a block safeguarded with a negative check for the object 245s registers an offense for an object check followed by a method call with a comment at EOL 245s registers an offense for a method call with a block safeguarded with a nil check for the object 245s registers an offense for a method call with params safeguarded with a nil check for the object 245s registers an offense for a method call with params safeguarded with a check for the object 245s registers an offense for a method call with a block safeguarded with a negative check for the object 245s registers an offense for a method call with params and a block safeguarded with a negative nil check for the object 245s behaves like safe guarding logical break keywords 245s allows a method call being passed to yield safe guarded by an object check 245s behaves like safe guarding logical break keywords 245s allows a method call being passed to return safe guarded by an object check 245s behaves like safe guarding logical break keywords 245s allows a method call being passed to break safe guarded by an object check 245s behaves like safe guarding logical break keywords 245s allows a method call being passed to throw safe guarded by an object check 245s behaves like safe guarding logical break keywords 245s allows a method call being passed to raise safe guarded by an object check 245s behaves like safe guarding logical break keywords 245s allows a method call being passed to fail safe guarded by an object check 245s behaves like safe guarding logical break keywords 245s allows a method call being passed to next safe guarded by an object check 245s object check before method call 245s allows a non object check followed by a method call with params and a block 245s allows a nil object check followed by a method call with params 245s allows a nil object check followed by a method call with a block 245s allows a non object check followed by a method call 245s allows a non object check followed by a method call with params 245s allows a non object check followed by a method call with a block 245s allows a nil object check followed by a method call with params and a block 245s allows a nil object check followed by a method call 245s ConvertCodeThatCanStartToReturnNil true 245s registers an offense for a non-nil object check followed by a method call with params and a block 245s corrects an object check followed by a method call and another check 245s registers an offense for a non-nil object check followed by a method call with params 245s registers an offense for a non-nil object check followed by a method call 245s registers an offense for a non-nil object check followed by a method call with a block 245s registers an offense for a check for the object followed by a method call in the condition for an if expression 245s registers an offense for an object check followed by a method call with a block 245s registers an offense for an object check followed by a method call 245s registers an offense for an object check followed by a method call with params and a block 245s registers an offense for an object check followed by a method call with params 245s method chaining 245s registers an offense for an object check followed by chained method calls with blocks 245s MaxChainLength: 3 245s registers an offense for an object check followed by 3 chained method calls 245s allows an object check followed by 4 chained method calls 245s with Lint/SafeNavigationChain disabled 245s allows an object check followed by chained method calls with blocks 245s allows an object check followed by chained method calls 245s MaxChainLength: 1 245s registers an offense for an object check followed by 1 chained method calls 245s allows an object check followed by 2 chained method calls 245s ConvertCodeThatCanStartToReturnNil false 245s registers an offense for an object check followed by a method call 245s registers an offense for an object check followed by a method calls that nil responds to 245s allows a non-nil object check followed by a method call with a block 245s allows a non-nil object check followed by a method call with params 245s allows a non-nil object check followed by a method call with params and a block 245s allows a non-nil object check followed by a method call 245s registers an offense for a check for the object followed by a method call in the condition for an if expression 245s registers an offense for an object check followed by a method call with params 245s registers an offense for an object check followed by a method call with params and a block 245s registers an offense for an object check followed by a method call with a block 245s method chaining 245s corrects an object check followed by a chained method call with a symbol proc 245s corrects an object check followed by a chained method call with a block 245s corrects an object check followed by a chained method call 245s corrects an object check followed by a chained method call with params 245s if expression 245s allows a single method call inside of a check for the object with an else 246s only moves comments that fall within the expression 246s registers an offense for a single method call with params and a block inside of a non-nil check for the object 246s registers an offense for a single method call inside of a non-nil check for the object 246s registers an offense for a single method call with a block inside of a non-nil check for the object 246s registers an offense for a single method call with params and a block inside of an unless nil check for the object 246s registers an offense for a single method call with params and a block inside of a check for the object 246s registers an offense for a single method call with a block inside of an unless negative check for the object 246s registers an offense for a single method call with params and a block inside of an unless negative check for the object 246s registers an offense for a single method call with params inside of a check for the object 246s registers an offense for a single method call with a block inside of an unless nil check for the object 246s registers an offense for a single method call with params inside of an unless negative check for the object 246s registers an offense for a single method call with params inside of an unless nil check for the object 246s registers an offense for a single method call inside of an unless nil check for the object 246s registers an offense for a single method call with a block inside of a check for the object 246s does not lose comments within if expression 246s registers an offense for a single method call with params inside of a non-nil check for the object 246s registers an offense for a single method call inside of a check for the object 246s registers an offense for a single method call inside of an unless negative check for the object 246s ternary expression 246s allows ternary expression 246s behaves like all variable types 246s modifier if 246s registers an offense for a method call with params and a block safeguarded with a negative nil check for the object 246s registers an offense for a method call with a block safeguarded with a negative nil check for the object 246s registers an offense for a chained method call safeguarded with an unless nil check for the object 246s registers an offense for a method call safeguarded with a check for the object 246s registers an offense for a method call that nil responds to safe guarded by an object check 246s registers an offense for a method call with params and a block safeguarded with a check for the object 246s registers an offense for a method call with params safeguarded with a check for the object 246s registers an offense for a method call with params and a block safeguarded with a nil check for the object 246s registers an offense for a method call on an accessor safeguarded by a check for the accessed variable 246s registers an offense for a method call with params safeguarded with a nil check for the object 246s registers an offense for a method call safeguarded with a nil check for the object 246s registers an offense for a method call with params safeguarded with a negative nil check for the object 246s registers an offense for a method call with params and a block safeguarded with a negative check for the object 246s registers an offense for a chained method call safeguarded with a negative nil check for the object 246s registers an offense for a chained method call safeguarded with a check for the object 246s registers an offense for an object check followed by a method call with a comment at EOL 246s registers an offense for a method call with params safeguarded with a negative check for the object 246s registers an offense when safe guard check and safe navigation method call are connected with `&&` condition 246s registers an offense for a method call safeguarded with a negative nil check for the object 246s registers an offense for a method call with a block safeguarded with a negative check for the object 246s registers an offense for a method call with a block safeguarded with a check for the object 246s registers an offense for a method call safeguarded with a negative check for the object 246s registers an offense for a method call with a block safeguarded with a nil check for the object 246s behaves like safe guarding logical break keywords 246s allows a method call being passed to break safe guarded by an object check 246s behaves like safe guarding logical break keywords 246s allows a method call being passed to throw safe guarded by an object check 246s behaves like safe guarding logical break keywords 246s allows a method call being passed to next safe guarded by an object check 246s behaves like safe guarding logical break keywords 246s allows a method call being passed to raise safe guarded by an object check 246s behaves like safe guarding logical break keywords 246s allows a method call being passed to yield safe guarded by an object check 246s behaves like safe guarding logical break keywords 246s allows a method call being passed to return safe guarded by an object check 246s behaves like safe guarding logical break keywords 246s allows a method call being passed to fail safe guarded by an object check 246s if expression 246s registers an offense for a single method call with params inside of a non-nil check for the object 246s allows a single method call inside of a check for the object with an else 246s registers an offense for a single method call with params and a block inside of an unless nil check for the object 246s only moves comments that fall within the expression 246s does not lose comments within if expression 246s registers an offense for a single method call inside of a non-nil check for the object 246s registers an offense for a single method call with a block inside of a check for the object 246s registers an offense for a single method call with a block inside of an unless nil check for the object 246s registers an offense for a single method call inside of an unless nil check for the object 246s registers an offense for a single method call with params and a block inside of a non-nil check for the object 246s registers an offense for a single method call with params inside of an unless nil check for the object 246s registers an offense for a single method call inside of an unless negative check for the object 246s registers an offense for a single method call with params inside of a check for the object 246s registers an offense for a single method call inside of a check for the object 246s registers an offense for a single method call with params inside of an unless negative check for the object 246s registers an offense for a single method call with params and a block inside of an unless negative check for the object 246s registers an offense for a single method call with params and a block inside of a check for the object 246s registers an offense for a single method call with a block inside of an unless negative check for the object 246s registers an offense for a single method call with a block inside of a non-nil check for the object 246s ternary expression 246s allows ternary expression 246s object check before method call 246s allows a non object check followed by a method call with a block 246s allows a non object check followed by a method call with params and a block 246s allows a non object check followed by a method call with params 246s allows a nil object check followed by a method call with params and a block 246s allows a nil object check followed by a method call with params 246s allows a nil object check followed by a method call with a block 246s allows a nil object check followed by a method call 246s allows a non object check followed by a method call 246s ConvertCodeThatCanStartToReturnNil false 246s allows a non-nil object check followed by a method call with params 246s registers an offense for an object check followed by a method call with params 246s registers an offense for an object check followed by a method call with a block 246s registers an offense for an object check followed by a method calls that nil responds to 246s registers an offense for an object check followed by a method call with params and a block 246s registers an offense for an object check followed by a method call 246s allows a non-nil object check followed by a method call with a block 246s allows a non-nil object check followed by a method call 246s allows a non-nil object check followed by a method call with params and a block 246s registers an offense for a check for the object followed by a method call in the condition for an if expression 246s method chaining 246s corrects an object check followed by a chained method call 246s corrects an object check followed by a chained method call with a symbol proc 246s corrects an object check followed by a chained method call with a block 246s corrects an object check followed by a chained method call with params 246s ConvertCodeThatCanStartToReturnNil true 246s registers an offense for a non-nil object check followed by a method call with params 246s registers an offense for an object check followed by a method call 246s registers an offense for a check for the object followed by a method call in the condition for an if expression 246s registers an offense for an object check followed by a method call with params 246s registers an offense for an object check followed by a method call with params and a block 246s corrects an object check followed by a method call and another check 246s registers an offense for a non-nil object check followed by a method call with a block 246s registers an offense for a non-nil object check followed by a method call 246s registers an offense for an object check followed by a method call with a block 246s registers an offense for a non-nil object check followed by a method call with params and a block 246s method chaining 246s registers an offense for an object check followed by chained method calls with blocks 246s with Lint/SafeNavigationChain disabled 246s allows an object check followed by chained method calls 246s allows an object check followed by chained method calls with blocks 246s MaxChainLength: 3 246s allows an object check followed by 4 chained method calls 246s registers an offense for an object check followed by 3 chained method calls 246s MaxChainLength: 1 246s registers an offense for an object check followed by 1 chained method calls 246s allows an object check followed by 2 chained method calls 246s behaves like all variable types 246s modifier if 246s registers an offense for a chained method call safeguarded with a check for the object 246s registers an offense for a method call with params and a block safeguarded with a nil check for the object 246s registers an offense for a method call that nil responds to safe guarded by an object check 246s registers an offense for a method call safeguarded with a check for the object 246s registers an offense for a method call with params safeguarded with a negative nil check for the object 246s registers an offense for a method call with params safeguarded with a nil check for the object 246s registers an offense for a method call with a block safeguarded with a negative nil check for the object 246s registers an offense for a method call with a block safeguarded with a nil check for the object 246s registers an offense for a method call safeguarded with a nil check for the object 246s registers an offense for a method call with params and a block safeguarded with a negative nil check for the object 246s registers an offense for an object check followed by a method call with a comment at EOL 246s registers an offense for a method call safeguarded with a negative nil check for the object 246s registers an offense for a chained method call safeguarded with a negative nil check for the object 246s registers an offense when safe guard check and safe navigation method call are connected with `&&` condition 246s registers an offense for a method call with params and a block safeguarded with a negative check for the object 246s registers an offense for a method call on an accessor safeguarded by a check for the accessed variable 246s registers an offense for a method call with a block safeguarded with a check for the object 246s registers an offense for a method call safeguarded with a negative check for the object 246s registers an offense for a method call with params safeguarded with a check for the object 246s registers an offense for a chained method call safeguarded with an unless nil check for the object 246s registers an offense for a method call with a block safeguarded with a negative check for the object 246s registers an offense for a method call with params safeguarded with a negative check for the object 246s registers an offense for a method call with params and a block safeguarded with a check for the object 246s behaves like safe guarding logical break keywords 246s allows a method call being passed to break safe guarded by an object check 246s behaves like safe guarding logical break keywords 246s allows a method call being passed to yield safe guarded by an object check 246s behaves like safe guarding logical break keywords 246s allows a method call being passed to return safe guarded by an object check 246s behaves like safe guarding logical break keywords 246s allows a method call being passed to raise safe guarded by an object check 246s behaves like safe guarding logical break keywords 246s allows a method call being passed to throw safe guarded by an object check 246s behaves like safe guarding logical break keywords 246s allows a method call being passed to fail safe guarded by an object check 246s behaves like safe guarding logical break keywords 246s allows a method call being passed to next safe guarded by an object check 246s if expression 246s registers an offense for a single method call with a block inside of an unless negative check for the object 246s does not lose comments within if expression 246s registers an offense for a single method call with params inside of a check for the object 246s registers an offense for a single method call with params and a block inside of a non-nil check for the object 246s registers an offense for a single method call with params and a block inside of an unless nil check for the object 246s registers an offense for a single method call with params inside of an unless negative check for the object 246s registers an offense for a single method call inside of a check for the object 246s registers an offense for a single method call with a block inside of a non-nil check for the object 246s registers an offense for a single method call with a block inside of a check for the object 246s registers an offense for a single method call with params inside of an unless nil check for the object 246s registers an offense for a single method call with a block inside of an unless nil check for the object 246s registers an offense for a single method call with params and a block inside of a check for the object 246s registers an offense for a single method call inside of an unless nil check for the object 246s registers an offense for a single method call with params inside of a non-nil check for the object 246s registers an offense for a single method call inside of a non-nil check for the object 246s allows a single method call inside of a check for the object with an else 246s only moves comments that fall within the expression 246s registers an offense for a single method call inside of an unless negative check for the object 246s registers an offense for a single method call with params and a block inside of an unless negative check for the object 246s ternary expression 246s allows ternary expression 246s object check before method call 246s allows a non object check followed by a method call 246s allows a non object check followed by a method call with a block 246s allows a nil object check followed by a method call 246s allows a non object check followed by a method call with params and a block 246s allows a nil object check followed by a method call with a block 246s allows a nil object check followed by a method call with params 246s allows a nil object check followed by a method call with params and a block 246s allows a non object check followed by a method call with params 246s ConvertCodeThatCanStartToReturnNil false 246s registers an offense for a check for the object followed by a method call in the condition for an if expression 246s registers an offense for an object check followed by a method call 246s allows a non-nil object check followed by a method call 246s registers an offense for an object check followed by a method call with params and a block 246s allows a non-nil object check followed by a method call with params and a block 246s registers an offense for an object check followed by a method calls that nil responds to 246s registers an offense for an object check followed by a method call with a block 246s registers an offense for an object check followed by a method call with params 246s allows a non-nil object check followed by a method call with a block 246s allows a non-nil object check followed by a method call with params 246s method chaining 246s corrects an object check followed by a chained method call with a block 246s corrects an object check followed by a chained method call with params 246s corrects an object check followed by a chained method call with a symbol proc 246s corrects an object check followed by a chained method call 246s ConvertCodeThatCanStartToReturnNil true 246s registers an offense for an object check followed by a method call with params 246s registers an offense for a non-nil object check followed by a method call 246s registers an offense for an object check followed by a method call with params and a block 246s registers an offense for an object check followed by a method call with a block 246s registers an offense for a non-nil object check followed by a method call with params and a block 246s registers an offense for a check for the object followed by a method call in the condition for an if expression 246s registers an offense for a non-nil object check followed by a method call with params 246s registers an offense for an object check followed by a method call 246s corrects an object check followed by a method call and another check 246s registers an offense for a non-nil object check followed by a method call with a block 246s method chaining 246s registers an offense for an object check followed by chained method calls with blocks 246s with Lint/SafeNavigationChain disabled 246s allows an object check followed by chained method calls with blocks 246s allows an object check followed by chained method calls 246s MaxChainLength: 3 246s registers an offense for an object check followed by 3 chained method calls 246s allows an object check followed by 4 chained method calls 246s MaxChainLength: 1 246s registers an offense for an object check followed by 1 chained method calls 246s allows an object check followed by 2 chained method calls 246s respond_to? 246s allows method calls safeguarded by a respond_to check on adifferent variable but the same method 246s allows enumerable accessor method calls safeguarded by a respond_to check 246s allows method calls safeguarded by a respond_to check on adifferent variable and method 246s allows method calls safeguarded by a respond_to check to a different method 246s allows method calls safeguarded by a respond_to check 246s when Ruby <= 2.2 246s does not register an offense when a method call that nil responds to safe guarded by an object check 246s behaves like all variable types 246s if expression 246s registers an offense for a single method call inside of a non-nil check for the object 246s registers an offense for a single method call inside of a check for the object 246s registers an offense for a single method call inside of an unless negative check for the object 246s allows a single method call inside of a check for the object with an else 246s registers an offense for a single method call inside of an unless nil check for the object 246s registers an offense for a single method call with params inside of a check for the object 246s registers an offense for a single method call with params and a block inside of an unless nil check for the object 246s registers an offense for a single method call with a block inside of a non-nil check for the object 246s registers an offense for a single method call with params and a block inside of a non-nil check for the object 246s registers an offense for a single method call with a block inside of an unless nil check for the object 246s registers an offense for a single method call with params and a block inside of an unless negative check for the object 246s only moves comments that fall within the expression 246s registers an offense for a single method call with params inside of a non-nil check for the object 246s registers an offense for a single method call with a block inside of an unless negative check for the object 246s does not lose comments within if expression 246s registers an offense for a single method call with params inside of an unless nil check for the object 246s registers an offense for a single method call with params and a block inside of a check for the object 246s registers an offense for a single method call with a block inside of a check for the object 246s registers an offense for a single method call with params inside of an unless negative check for the object 246s ternary expression 246s allows ternary expression 246s modifier if 246s registers an offense for a method call with params safeguarded with a check for the object 246s registers an offense for a method call safeguarded with a negative nil check for the object 246s registers an offense for a chained method call safeguarded with a negative nil check for the object 246s registers an offense for a method call safeguarded with a nil check for the object 246s registers an offense for a method call with a block safeguarded with a negative nil check for the object 246s registers an offense for a method call with params safeguarded with a negative nil check for the object 246s registers an offense for a method call that nil responds to safe guarded by an object check 246s registers an offense for a chained method call safeguarded with an unless nil check for the object 246s registers an offense for a method call safeguarded with a negative check for the object 246s registers an offense for a method call with a block safeguarded with a nil check for the object 246s registers an offense for a method call with params safeguarded with a nil check for the object 246s registers an offense for a method call with params and a block safeguarded with a negative nil check for the object 246s registers an offense for a method call with params and a block safeguarded with a nil check for the object 246s registers an offense for a method call with a block safeguarded with a check for the object 246s registers an offense for a method call safeguarded with a check for the object 246s registers an offense for a method call with a block safeguarded with a negative check for the object 246s registers an offense for an object check followed by a method call with a comment at EOL 246s registers an offense for a chained method call safeguarded with a check for the object 246s registers an offense for a method call on an accessor safeguarded by a check for the accessed variable 246s registers an offense for a method call with params and a block safeguarded with a check for the object 246s registers an offense when safe guard check and safe navigation method call are connected with `&&` condition 246s registers an offense for a method call with params and a block safeguarded with a negative check for the object 246s registers an offense for a method call with params safeguarded with a negative check for the object 246s behaves like safe guarding logical break keywords 246s allows a method call being passed to throw safe guarded by an object check 246s behaves like safe guarding logical break keywords 246s allows a method call being passed to return safe guarded by an object check 246s behaves like safe guarding logical break keywords 246s allows a method call being passed to break safe guarded by an object check 246s behaves like safe guarding logical break keywords 246s allows a method call being passed to raise safe guarded by an object check 246s behaves like safe guarding logical break keywords 246s allows a method call being passed to yield safe guarded by an object check 246s behaves like safe guarding logical break keywords 246s allows a method call being passed to fail safe guarded by an object check 246s behaves like safe guarding logical break keywords 246s allows a method call being passed to next safe guarded by an object check 246s object check before method call 246s allows a non object check followed by a method call with params 246s allows a nil object check followed by a method call with params 246s allows a non object check followed by a method call with a block 246s allows a nil object check followed by a method call with params and a block 246s allows a non object check followed by a method call 246s allows a nil object check followed by a method call 246s allows a nil object check followed by a method call with a block 246s allows a non object check followed by a method call with params and a block 246s ConvertCodeThatCanStartToReturnNil true 246s registers an offense for a non-nil object check followed by a method call 246s registers an offense for an object check followed by a method call with a block 246s registers an offense for a non-nil object check followed by a method call with a block 246s registers an offense for a non-nil object check followed by a method call with params 246s corrects an object check followed by a method call and another check 246s registers an offense for an object check followed by a method call with params 246s registers an offense for an object check followed by a method call 246s registers an offense for a non-nil object check followed by a method call with params and a block 246s registers an offense for a check for the object followed by a method call in the condition for an if expression 246s registers an offense for an object check followed by a method call with params and a block 246s method chaining 246s registers an offense for an object check followed by chained method calls with blocks 246s MaxChainLength: 1 246s allows an object check followed by 2 chained method calls 246s registers an offense for an object check followed by 1 chained method calls 246s MaxChainLength: 3 246s registers an offense for an object check followed by 3 chained method calls 246s allows an object check followed by 4 chained method calls 246s with Lint/SafeNavigationChain disabled 246s allows an object check followed by chained method calls with blocks 246s allows an object check followed by chained method calls 246s ConvertCodeThatCanStartToReturnNil false 246s registers an offense for a check for the object followed by a method call in the condition for an if expression 246s registers an offense for an object check followed by a method call with params 246s registers an offense for an object check followed by a method call 246s allows a non-nil object check followed by a method call with params 246s allows a non-nil object check followed by a method call 246s registers an offense for an object check followed by a method call with params and a block 246s allows a non-nil object check followed by a method call with params and a block 246s allows a non-nil object check followed by a method call with a block 246s registers an offense for an object check followed by a method call with a block 246s registers an offense for an object check followed by a method calls that nil responds to 246s method chaining 246s corrects an object check followed by a chained method call with a block 246s corrects an object check followed by a chained method call 246s corrects an object check followed by a chained method call with params 246s corrects an object check followed by a chained method call with a symbol proc 246s behaves like all variable types 246s object check before method call 246s allows a nil object check followed by a method call 246s allows a nil object check followed by a method call with a block 246s allows a non object check followed by a method call 246s allows a nil object check followed by a method call with params and a block 246s allows a non object check followed by a method call with params 246s allows a nil object check followed by a method call with params 246s allows a non object check followed by a method call with params and a block 247s allows a non object check followed by a method call with a block 247s ConvertCodeThatCanStartToReturnNil false 247s registers an offense for an object check followed by a method calls that nil responds to 247s registers an offense for an object check followed by a method call with a block 247s allows a non-nil object check followed by a method call with params 247s allows a non-nil object check followed by a method call with a block 247s allows a non-nil object check followed by a method call with params and a block 247s registers an offense for an object check followed by a method call with params and a block 247s allows a non-nil object check followed by a method call 247s registers an offense for an object check followed by a method call with params 247s registers an offense for a check for the object followed by a method call in the condition for an if expression 247s registers an offense for an object check followed by a method call 247s method chaining 247s corrects an object check followed by a chained method call with a symbol proc 247s corrects an object check followed by a chained method call with a block 247s corrects an object check followed by a chained method call 247s corrects an object check followed by a chained method call with params 247s ConvertCodeThatCanStartToReturnNil true 247s registers an offense for a non-nil object check followed by a method call 247s registers an offense for a check for the object followed by a method call in the condition for an if expression 247s registers an offense for a non-nil object check followed by a method call with params 247s registers an offense for an object check followed by a method call with params and a block 247s registers an offense for an object check followed by a method call 247s registers an offense for an object check followed by a method call with params 247s registers an offense for a non-nil object check followed by a method call with params and a block 247s registers an offense for a non-nil object check followed by a method call with a block 247s corrects an object check followed by a method call and another check 247s registers an offense for an object check followed by a method call with a block 247s method chaining 247s registers an offense for an object check followed by chained method calls with blocks 247s MaxChainLength: 1 247s registers an offense for an object check followed by 1 chained method calls 247s allows an object check followed by 2 chained method calls 247s with Lint/SafeNavigationChain disabled 247s allows an object check followed by chained method calls 247s allows an object check followed by chained method calls with blocks 247s MaxChainLength: 3 247s allows an object check followed by 4 chained method calls 247s registers an offense for an object check followed by 3 chained method calls 247s if expression 247s does not lose comments within if expression 247s registers an offense for a single method call inside of a check for the object 247s registers an offense for a single method call with params and a block inside of an unless negative check for the object 247s registers an offense for a single method call with params inside of an unless negative check for the object 247s allows a single method call inside of a check for the object with an else 247s registers an offense for a single method call with a block inside of a non-nil check for the object 247s registers an offense for a single method call with params inside of a check for the object 247s registers an offense for a single method call with params and a block inside of an unless nil check for the object 247s registers an offense for a single method call inside of an unless negative check for the object 247s registers an offense for a single method call inside of an unless nil check for the object 247s registers an offense for a single method call with params inside of a non-nil check for the object 247s only moves comments that fall within the expression 247s registers an offense for a single method call inside of a non-nil check for the object 247s registers an offense for a single method call with params inside of an unless nil check for the object 247s registers an offense for a single method call with a block inside of a check for the object 247s registers an offense for a single method call with a block inside of an unless nil check for the object 247s registers an offense for a single method call with a block inside of an unless negative check for the object 247s registers an offense for a single method call with params and a block inside of a non-nil check for the object 247s registers an offense for a single method call with params and a block inside of a check for the object 247s ternary expression 247s allows ternary expression 247s modifier if 247s registers an offense when safe guard check and safe navigation method call are connected with `&&` condition 247s registers an offense for a chained method call safeguarded with a negative nil check for the object 247s registers an offense for a method call with params safeguarded with a negative nil check for the object 247s registers an offense for a method call with a block safeguarded with a check for the object 247s registers an offense for a method call safeguarded with a negative nil check for the object 247s registers an offense for a method call with a block safeguarded with a negative nil check for the object 247s registers an offense for a method call on an accessor safeguarded by a check for the accessed variable 247s registers an offense for a method call with params and a block safeguarded with a negative nil check for the object 247s registers an offense for a method call with a block safeguarded with a nil check for the object 247s registers an offense for a method call with params and a block safeguarded with a nil check for the object 247s registers an offense for a chained method call safeguarded with an unless nil check for the object 247s registers an offense for a method call with params and a block safeguarded with a negative check for the object 247s registers an offense for a method call with a block safeguarded with a negative check for the object 247s registers an offense for an object check followed by a method call with a comment at EOL 247s registers an offense for a method call safeguarded with a negative check for the object 247s registers an offense for a method call safeguarded with a nil check for the object 247s registers an offense for a method call safeguarded with a check for the object 247s registers an offense for a chained method call safeguarded with a check for the object 247s registers an offense for a method call with params safeguarded with a check for the object 247s registers an offense for a method call with params safeguarded with a nil check for the object 247s registers an offense for a method call that nil responds to safe guarded by an object check 247s registers an offense for a method call with params and a block safeguarded with a check for the object 247s registers an offense for a method call with params safeguarded with a negative check for the object 247s behaves like safe guarding logical break keywords 247s allows a method call being passed to raise safe guarded by an object check 247s behaves like safe guarding logical break keywords 247s allows a method call being passed to next safe guarded by an object check 247s behaves like safe guarding logical break keywords 247s allows a method call being passed to return safe guarded by an object check 247s behaves like safe guarding logical break keywords 247s allows a method call being passed to fail safe guarded by an object check 247s behaves like safe guarding logical break keywords 247s allows a method call being passed to yield safe guarded by an object check 247s behaves like safe guarding logical break keywords 247s allows a method call being passed to break safe guarded by an object check 247s behaves like safe guarding logical break keywords 247s allows a method call being passed to throw safe guarded by an object check 247s 247s RuboCop::Cop::Style::StabbyLambdaParentheses 247s require_parentheses 247s does not register an offense for a stabby lambda with parentheses 247s registers an offense for a stabby lambda without parentheses 247s behaves like common 247s does not check a method call named lambda 247s does not check the old lambda syntax 247s does not check a stabby lambda without arguments 247s require_no_parentheses 247s registers an offense for a stabby lambda with parentheses 247s behaves like common 247s does not check a method call named lambda 247s does not check the old lambda syntax 247s does not check a stabby lambda without arguments 247s 247s RuboCop::Cop::RangeHelp 247s source indicated by #range_by_whole_lines 247s when part of a single line is selected 247s with include_final_newline 247s is expected to eq "puts 'example'\n" 247s without include_final_newline 247s is expected to eq "puts 'example'" 247s with parts of four lines 247s without include_final_newline 247s is expected to eq "puts 'example'\nputs 'another example'\n\nsomething_else" 247s with include_final_newline 247s is expected to eq "puts 'example'\nputs 'another example'\n\nsomething_else\n" 247s with a whole line except newline selected 247s with include_final_newline 247s is expected to eq "puts 'example'\n" 247s without include_final_newline 247s is expected to eq "puts 'example'" 247s with parts of two lines 247s without include_final_newline 247s is expected to eq "puts 'example'\nputs 'another example'" 247s with include_final_newline 247s is expected to eq "puts 'example'\nputs 'another example'\n" 247s when source doesn't end with a newline 247s without include_final_newline 247s is expected to eq "newline_at_end" 247s with include_final_newline 247s is expected to eq "newline_at_end" 247s is expected to eq 30 247s with beginning of one line 247s without include_final_newline 247s is expected to eq "puts 'another example'" 247s with include_final_newline 247s is expected to eq "puts 'another example'\n" 247s with end of one line 247s with include_final_newline 247s is expected to eq "puts 'example'\n" 247s without include_final_newline 247s is expected to eq "puts 'example'" 247s with a whole line plus beginning of next line 247s without include_final_newline 247s is expected to eq "puts 'example'\nputs 'another example'" 247s with include_final_newline 247s is expected to eq "puts 'example'\nputs 'another example'\n" 247s source indicated by #range_with_surrounding_space 247s when passing range as a kwarg 247s behaves like works with various `side`s 247s when side is :left 247s is expected to eq " a(2)" 247s when side is :both 247s is expected to eq " a(2) " 247s when side is :right 247s is expected to eq "a(2) " 247s when passing range as a positional argument 247s behaves like works with various `side`s 247s when side is :both 247s is expected to eq " a(2) " 247s when side is :left 247s is expected to eq " a(2)" 247s when side is :right 247s is expected to eq "a(2) " 247s source indicated by #range_with_surrounding_comma 247s when side is :left 247s is expected to eq ",Error" 247s when side is :both 247s is expected to eq ",Error," 247s when side is :right 247s is expected to eq "Error," 247s #range_with_comments_and_lines 247s returns a range that includes related comments and whole lines 247s 247s RuboCop::Cop::Style::IfWithBooleanLiteralBranches 247s when double negative is used in condition 247s registers and corrects an offense when using `if !!condition` with opposite boolean literal branches 247s registers and corrects an offense when using `if !!condition` with boolean literal branches 247s when condition is a comparison method 247s does not register an offense when using a branch that is not boolean literal 247s registers and corrects an offense when using `if foo == bar` with opposite boolean literal branches 247s registers and corrects an offense when using `if foo == bar` with boolean literal branches 247s does not register an offense when using a branch that is not boolean literal 247s registers and corrects an offense when using opposite ternary operator with boolean literal branches 247s registers and corrects an offense when using `unless foo == bar` with boolean literal branches 247s registers and corrects an offense when using `unless foo == bar` with boolean literal branches 247s registers and corrects an offense when using `unless foo == bar` with opposite boolean literal branches 247s registers and corrects an offense when using `if foo == bar` with opposite boolean literal branches 247s registers and corrects an offense when using `unless foo == bar` with opposite boolean literal branches 247s registers and corrects an offense when using `unless foo == bar` with boolean literal branches 247s registers and corrects an offense when using opposite ternary operator with boolean literal branches 247s registers and corrects an offense when using opposite ternary operator with boolean literal branches 247s registers and corrects an offense when using `if foo == bar` with boolean literal branches 247s registers and corrects an offense when using ternary operator with boolean literal branches 247s does not register an offense when using a branch that is not boolean literal 247s registers and corrects an offense when using ternary operator with boolean literal branches 247s registers and corrects an offense when using opposite ternary operator with boolean literal branches 247s registers and corrects an offense when using `if foo == bar` with opposite boolean literal branches 247s registers and corrects an offense when using `if` with boolean literal branches directly under `def` 247s registers and corrects an offense when using ternary operator with boolean literal branches 247s registers and corrects an offense when using `if` with boolean literal branches directly under `def` 247s registers and corrects an offense when using `unless foo == bar` with opposite boolean literal branches 247s does not register an offense when using a branch that is not boolean literal 247s registers and corrects an offense when using `if` with boolean literal branches directly under `def` 247s registers and corrects an offense when using `if foo == bar` with boolean literal branches 247s registers and corrects an offense when using `unless foo == bar` with boolean literal branches 247s registers and corrects an offense when using `if foo == bar` with boolean literal branches 247s registers and corrects an offense when using `unless foo == bar` with boolean literal branches 247s registers and corrects an offense when using `if foo == bar` with opposite boolean literal branches 247s registers and corrects an offense when using opposite ternary operator with boolean literal branches 247s registers and corrects an offense when using `if foo == bar` with boolean literal branches 247s registers and corrects an offense when using opposite ternary operator with boolean literal branches 247s registers and corrects an offense when using `unless foo == bar` with boolean literal branches 247s registers and corrects an offense when using `unless foo == bar` with opposite boolean literal branches 247s does not register an offense when using a branch that is not boolean literal 247s registers and corrects an offense when using `unless foo == bar` with opposite boolean literal branches 247s registers and corrects an offense when using `if` with boolean literal branches directly under `def` 247s registers and corrects an offense when using `if foo == bar` with opposite boolean literal branches 247s registers and corrects an offense when using `unless foo == bar` with opposite boolean literal branches 247s registers and corrects an offense when using `if foo == bar` with opposite boolean literal branches 247s does not register an offense when using a branch that is not boolean literal 247s registers and corrects an offense when using ternary operator with boolean literal branches 247s registers and corrects an offense when using `unless foo == bar` with boolean literal branches 247s registers and corrects an offense when using `if` with boolean literal branches directly under `def` 247s registers and corrects an offense when using `if foo == bar` with boolean literal branches 247s registers and corrects an offense when using ternary operator with boolean literal branches 247s registers and corrects an offense when using `if foo == bar` with opposite boolean literal branches 247s registers and corrects an offense when using ternary operator with boolean literal branches 247s does not register an offense when using a branch that is not boolean literal 247s registers and corrects an offense when using `if` with boolean literal branches directly under `def` 247s registers and corrects an offense when using ternary operator with boolean literal branches 247s registers and corrects an offense when using opposite ternary operator with boolean literal branches 247s registers and corrects an offense when using `unless foo == bar` with opposite boolean literal branches 247s registers and corrects an offense when using `if foo == bar` with boolean literal branches 247s registers and corrects an offense when using `if` with boolean literal branches directly under `def` 247s when using `elsif` with boolean literal branches 247s does not register an offense when using multiple `elsif` with boolean literal branches 247s registers and corrects an offense when using single `elsif` with boolean literal branches 247s when complex condition 247s register and corrects an offense when using `if (foo? || bar) && baz?` with boolean literal branches 247s registers and corrects an offense when using `if foo? || (bar && baz)?` with boolean literal branches 247s does not register an offense when using `if (foo? && bar) || baz?` with boolean literal branches 247s registers and corrects an offense when using `if foo? && bar && baz?` with boolean literal branches 247s does not register an offense when using `if foo? && (bar || baz)?` with boolean literal branches 247s registers and corrects an offense when using `if foo? || bar && baz?` with boolean literal branches 247s does not register an offense when using `if foo? || bar || baz?` with boolean literal branches 247s does not register an offense when using `if foo? && bar || baz?` with boolean literal branches 247s when condition is a logical operator and operands do not known whether to return boolean value 247s does not register an offense when using `if foo || bar` with opposite boolean literal branches 247s does not register an offense when using `unless foo || bar` with opposite boolean literal branches 247s does not register an offense when using `unless foo || bar` with boolean literal branches 247s does not register an offense when using `if foo && bar` with boolean literal branches 247s does not register an offense when using `if foo || bar` with boolean literal branches 247s does not register an offense when using `unless foo && bar` with opposite boolean literal branches 247s does not register an offense when using `if foo && bar` with opposite boolean literal branches 247s does not register an offense when using `unless foo && bar` with boolean literal branches 247s when condition is a method that does not known whether to return boolean value 247s does not register an offense when using `if condition` with boolean literal branches 247s does not register an offense when using `if condition` with opposite boolean literal branches 247s does not register an offense when using `unless condition` with opposite boolean literal branches 247s does not register an offense when using `unless condition` with boolean literal branches 247s when `AllowedMethods: nonzero?` 247s does not register an offense when using `nonzero?` 247s when condition is a logical operator and all operands are predicate methods 247s registers and corrects an offense when using `if foo? && bar?` with opposite boolean literal branches 247s registers and corrects an offense when using `if foo? && bar? && baz?` with boolean literal branches 247s registers and corrects an offense when using `unless foo? || bar?` with opposite boolean literal branches 247s registers and corrects an offense when using `unless foo? || bar?` with boolean literal branches 247s registers and corrects an offense when using `if foo? && bar? || baz?` with boolean literal branches 247s registers and corrects an offense when using `if foo? && bar?` with boolean literal branches 247s when condition is a predicate method 247s registers and corrects an offense when using `unless foo.do_something?` with boolean literal branches 247s registers and corrects an offense when using `elsif foo.do_something?` with boolean literal branches 247s registers and corrects an offense when using `elsif foo.do_something?` with opposite boolean literal branches 247s registers and corrects an offense when using `if foo.do_something?` with boolean literal branches 247s registers and corrects an offense when using `unless foo.do_something?` with opposite boolean literal branches 247s registers and corrects an offense when using `if foo.do_something?` with opposite boolean literal branches 247s 247s RuboCop::Cop::Style::ColonMethodDefinition 247s accepts a class method defined using . 247s using the class name 247s registers an offense for a class method defined using :: 247s using self 247s registers an offense for a class method defined using :: 247s 247s RuboCop::Cop::InternalAffairs::RedundantDescribedClassAsSubject 247s registers an offense when using `subject(:cop)` and `:config` is not specified in `describe` 247s registers an offense when using `subject(:cop)` with no argument `described_class.new` and `:config` is specified 247s does not register an offense when using `subject(:cop)` with multiple arguments to `described_class.new` 247s registers an offense when using `subject(:cop)` and `:config` is already specified in `describe` 247s 247s RuboCop::Cop::Corrector 247s #rewrite 247s accepts a node instead of a range 247s allows removal of characters preceding range 247s raises a useful error if not given a node or a range 247s allows removal of characters from range beginning 247s allows insertion after a source range 247s allows removal of a range 247s allows insertion before and after a source range 247s allows replacement of a range 247s allows removal of characters from range ending 247s allows insertion before a source range 247s when range is from incorrect source 247s raises exception from remove_trailing 247s raises exception from remove_leading 247s raises exception from remove_preceding 247s raises exception from insert_after 247s raises exception from remove 247s raises exception from replace 247s raises exception from insert_before 247s 247s RuboCop::Cop::Layout::SpaceBeforeBrackets 247s does not register an offense when using array literal argument without parentheses 247s does not register an offense when assigning an array 247s does not register an offense when using percent array literal argument without parentheses 247s when referencing 247s does not register an offense when array literal argument is enclosed in parentheses 247s registers an offense and corrects when using space between gvar receiver and left brackets 247s does not register an offense when using multiple arguments 247s does not register an offense when not using space between variable receiver and left brackets 247s does not register an offense when without receiver 247s registers an offense and corrects when using space between lvar receiver and left brackets 247s does not register an offense when call desugared `Hash#[]` to cvar receiver 247s does not register an offense when not using space between method call and left brackets 247s registers an offense and corrects when using space between cvar receiver and left brackets 247s does not register an offense when it is used as a method argument 247s does not register an offense when using space between method call and left brackets 247s does not register an offense when call desugared `Hash#[]` to lvar receiver 247s does not register an offense when call desugared `Hash#[]` to ivar receiver 247s registers an offense and corrects when using space between ivar receiver and left brackets 247s when assigning 247s does not register an offense when space is used in left bracket 247s registers an offense and corrects when using space between receiver and left brackets 247s does not register an offense when multiple spaces are inserted inside the left bracket 247s does not register an offense when not using space between receiver and left brackets 247s 247s RuboCop::Cop::Lint::DisjunctiveAssignmentInConstructor 247s empty constructor 247s accepts 247s constructor does not have disjunctive assignment 247s accepts 247s constructor has disjunctive assignment 247s LHS is ivar 247s registers an offense and corrects 247s constructor calls super after assignment 247s registers an offense and corrects 247s constructor calls super before disjunctive assignment 247s accepts 247s constructor calls any method before disjunctive assignment 247s accepts 247s LHS is lvar 247s accepts 247s 247s RuboCop::Cop::Layout::FirstHashElementLineBreak 247s registers an offense and corrects elements listed on the first line 247s ignores implicit hashes in method calls without parens 247s ignores elements listed on a single line 247s ignores implicit hashes in method calls with parens 247s ignores implicit hashes in method calls that are improperly formatted 247s registers an offense and corrects single element multi-line hash 247s registers an offense and corrects hash nested in a method call 247s 247s RuboCop::Cop::Naming::HeredocDelimiterCase 247s when enforced style is uppercase 247s with a non-interpolated heredoc 247s when using double quoted delimiters 247s registers an offense and corrects with a lowercase delimiter 247s registers an offense and corrects with a camel case delimiter 247s does not register an offense with an uppercase delimiter 247s when using single quoted delimiters 247s registers an offense and corrects with a lowercase delimiter 247s registers an offense and corrects with a camel case delimiter 247s does not register an offense with an uppercase delimiter 247s when using non-word delimiters 247s does not register an offense 247s when using back tick delimiters 247s registers an offense and corrects with a camel case delimiter 247s registers an offense and corrects with a lowercase delimiter 247s does not register an offense with an uppercase delimiter 247s with a squiggly heredoc 247s registers an offense and corrects with a camel case delimiter 247s does not register an offense with an uppercase delimiter 247s registers an offense and corrects with a lowercase delimiter 247s with an interpolated heredoc 247s registers an offense and corrects with a lowercase delimiter 247s registers an offense with a camel case delimiter 247s does not register an offense with an uppercase delimiter 247s when enforced style is lowercase 247s with a squiggly heredoc 247s does not register an offense with a lowercase delimiter 247s registers an offense and corrects with a camel case delimiter 247s registers an offense and corrects with an uppercase delimiter 247s with a non-interpolated heredoc 247s registers an offense and corrects with an uppercase delimiter 247s registers an offense and corrects with a camel case delimiter 247s does not register an offense with a lowercase delimiter 247s with an interpolated heredoc 247s registers an offense and corrects with a camel case delimiter 247s does not register an offense with a lowercase delimiter 247s registers an offense and corrects with an uppercase delimiter 247s 247s RuboCop::Cop::Style::GuardClause 247s registers an error with return in the else branch 247s does not register an offense when assigning the result of a guard condition with `else` 247s registers an error with raise "error" in the if branch 247s registers an error with break in the else branch 247s does not report an offense if next is inside elsif 247s registers an error with return in the if branch 247s does not report an offense if next is inside if..elsif..else..end 247s doesn't register an error if condition has multiple lines 247s doesn't register an error if control flow expr has multiple lines 247s doesn't register an error if condition has multiple lines 247s registers an error if non-control-flow branch has multiple lines 247s does not report an offense if break is inside elsif 248s registers an offense when using `|| raise` in `then` branch 248s does not report an offense if return is inside elsif 248s registers an offense when using `and return` in `else` branch 248s doesn't register an error if control flow expr has multiple lines 248s registers an error with raise "error" in the else branch 248s doesn't report an offense if condition has multiple lines 248s does not report an offense if raise "error" is inside elsif 248s registers an error if non-control-flow branch has multiple lines 248s registers an error with next in the if branch 248s registers an error with next in the else branch 248s registers an error with break in the if branch 248s registers an offense when using `|| raise` in `else` branch 248s accepts a method which body is if / unless with else 248s does not report an offense if body is if..elsif..end 248s doesn't register an error if control flow expr has multiple lines 248s accepts a method with empty parentheses as its body 248s accepts a method which body does not end with if / unless 248s registers an error if non-control-flow branch has multiple lines 248s doesn't register an error if control flow expr has multiple lines 248s accepts a method whose body is a modifier if / unless 248s doesn't register an error if condition has multiple lines 248s doesn't register an error if condition has multiple lines 248s registers an error if non-control-flow branch has multiple lines 248s registers an offense when using `and return` in `then` branch 248s does not report an offense if raise "error" is inside if..elsif..else..end 248s does not report an offense if return is inside if..elsif..else..end 248s does not report an offense if break is inside if..elsif..else..end 248s AllowConsecutiveConditionals: true 248s reports an offense when allowed same depth multiple if statement andpreceding expression is not a conditional at the same depth 248s does not register an offense when allowed same depth multiple if statement andpreceding expression is not a conditional at the same depth 248s Invalid MinBodyLength 248s fails with an error 248s behaves like reports offense 248s reports an offense if method body is if / unless without else 248s reports an offense if method body ends with if / unless without else 248s behaves like reports offense 248s reports an offense if method body is if / unless without else 248s reports an offense if method body ends with if / unless without else 248s with Metrics/MaxLineLength enabled 248s when the correction is too long for a single line 248s with a nested `begin` node 248s does registers an offense 248s with a trivial body 248s does not register an offense 248s with a nested `if` node 248s does registers an offense 248s MinBodyLength: 4 248s accepts a method whose body has 3 lines 248s with Metrics/MaxLineLength disabled 248s registers an offense with modifier example code regardless of length 248s method in module 248s registers an offense for instance method 248s registers an offense for singleton methods 248s MinBodyLength: 1 248s reports an offense for if whose body has 1 line 248s AllowConsecutiveConditionals: false 248s reports an offense when not allowed same depth multiple if statement andpreceding expression is a conditional at the same depth 248s 248s RuboCop::Cop::InternalAffairs::NodeTypePredicate 248s does not register an offense for a predicate node type check 248s comparison node type check 248s registers an offense and autocorrects 248s 248s RuboCop::Cop::Badge 248s can be converted to a string with the Department/CopName format 248s exposes department name 248s compares by value 248s exposes cop name 248s #qualified? 248s says `CopName` is not qualified 248s says `Department/CopName` is qualified 248s says `Deep/Department/CopName` is qualified 248s .parse 248s parses identifier 248s parses identifier 248s parses identifier 248s parses identifier 248s parses identifier 248s parses identifier 248s #camel_case 248s converts "lint" to CamelCase 248s converts "foo_bar" to CamelCase 248s converts "rspec" to CamelCase 248s .new 248s assigns department 248s assigns name 248s assigns department 248s assigns department 248s assigns name 248s assigns name 248s assigns name 248s assigns department 248s .for 248s parses cop class name 248s parses cop class name 248s parses cop class name 248s parses cop class name 248s parses cop class name 248s 248s RuboCop::Cop::Style::DefWithParentheses 248s accepts empty parentheses in one liners 248s reports an offense for def with empty parens 248s accepts def with arg and parens 248s reports an offense for class def with empty parens 248s accepts def without arguments 248s Ruby >= 3.0 248s reports an offense for endless method definition with empty parens 248s 248s RuboCop::Cop::Layout::AccessModifierIndentation 248s when EnforcedStyle is set to outdent 248s registers an offense and corrects private indented to method depth in singleton class 248s registers an offense and corrects private indented to method depth in class defined with Class.new 248s accepts private with argument indented to method depth in class defined with Class.new 248s accepts private def indented to method depth in module defined with Module.new 248s accepts private with argument indented to method depth in singleton class 248s registers an offense and corrects misaligned access modifiers in nested classes 248s accepts private indented to the containing class indent level 248s registers offense and corrects private indented to method depth in a class 248s registers an offense and corrects private indented to method depth in module defined with Module.new 248s accepts private with argument indented to method depth in a module 248s accepts private def indented to method depth in class defined with Class.new 248s accepts private def indented to method depth in a class 248s accepts protected indented to the containing class indent level 248s accepts private with argument indented to method depth in module defined with Module.new 248s accepts module fn def indented to method depth in a module 248s accepts module fn with argument indented to method depth in a module 248s registers an offense and corrects module_function indented to method depth in a module 248s registers an offense and corrects private indented to method depth in a module 248s accepts private def indented to method depth in a module 248s accepts private def indented to method depth in singleton class 248s accepts private with argument indented to method depth in a class 248s when EnforcedStyle is set to indent 248s registers an offense and corrects access modifiers in arbitrary blocks 248s accepts properly indented private in module defined with Module.new 248s registers an offense and corrects correct + opposite alignment 248s accepts properly indented protected 248s registers an offense and corrects misaligned private 248s registers an offense and corrects misaligned protected 248s registers an offense and corrects misaligned module_function in module 248s registers an offense and corrects misaligned access modifiers in nested classes 248s accepts properly indented private 248s registers an offense and corrects misaligned private in module 248s accepts indented access modifiers with arguments in nested classes 248s registers an offense and corrects opposite + correct alignment 248s registers an offense and corrects misaligned private in class defined with Class.new 248s accepts an empty class 248s registers an offense and corrects misaligned private in module defined with Module.new 248s accepts methods with a body 248s registers an offense and corrects misaligned private in a singleton class 248s when 4 spaces per indent level are used 248s accepts properly indented private 248s when indentation width is overridden for this cop only 248s accepts properly indented private 248s 248s RuboCop::Cop::Layout::SpaceBeforeBlockBraces 248s with space before empty braces allowed 248s accepts empty braces with outer space 248s registers an offense and corrects empty braces 248s when EnforcedStyle is space 248s registers an offense and corrects left brace without outer space 248s registers an offense and corrects opposite + correct style 248s registers an offense and corrects multiline block where the left brace has no outer space 248s accepts braces surrounded by spaces 248s Ruby 2.7 248s registers an offense and corrects opposite + correct style 248s registers an offense and corrects multiline block where the left brace has no outer space 248s with invalid value for EnforcedStyleForEmptyBraces 248s fails with an error 248s when EnforcedStyle is no_space 248s registers an offense and corrects correct + opposite style 248s accepts left brace without outer space 248s registers an offense and corrects braces surrounded by spaces 248s with `EnforcedStyle` of `Style/BlockDelimiters` 248s accepts left brace without outer space 248s Ruby 2.7 248s registers an offense and corrects correct + opposite style 248s with space before empty braces not allowed 248s accepts empty braces without outer space 248s registers an offense and corrects empty braces 248s 248s RuboCop::Cop::Layout::TrailingWhitespace 248s accepts a line without trailing whitespace 248s registers an offense for a line ending with tab 248s registers an offense for a tab in a heredoc 248s is not fooled by heredoc containing __END__ within a doc comment 248s is not fooled by heredoc containing __END__ 248s registers an offense for a line ending with space 248s registers an offense for a blank line with space 248s is not fooled by __END__ within a documentation comment 248s registers offenses before __END__ but not after 248s registers an offense for trailing whitespace in a heredoc string 248s autocorrects unwanted space 248s when `AllowInHeredoc` is set to false 248s does not correct trailing whitespace in a static heredoc string 248s corrects a whitespace line in a heredoc string that is longer than the indentation 248s corrects safely trailing whitespace in a heredoc string 248s corrects by removing trailing whitespace used for indentation in a heredoc string 248s when `AllowInHeredoc` is set to true 248s registers an offense for trailing whitespace at the heredoc begin 248s accepts trailing whitespace in a heredoc string 248s 248s RuboCop::Cop::Lint::DuplicateRequire 248s registers and corrects an offense when duplicate requires are interleaved with some other code 248s registers and corrects an offense when duplicate `require` is detected 248s registers and corrects an offense for multiple duplicate requires 248s registers and corrects an offense when duplicate `require` through `Kernel` is detected 248s does not register an offense when there are no duplicate `require`s 248s does not register an offense when using single `require` 248s does not register an offense when calling user-defined `require` method 248s does not register an offense when same feature argument but different require method 248s registers and corrects an offense when duplicate `require_relative` is detected 248s registers and corrects an offense for duplicate non top-level requires 248s 248s RuboCop::Cop::Lint::PercentStringArray 248s with invalid byte sequence in UTF-8 248s add an offense and corrects when tokens contain quotes 248s accepts if tokens contain invalid byte sequence only 248s with binary encoded source 248s accepts if tokens contain no quotes 248s adds an offense and corrects when tokens contain quotes 248s detecting quotes or commas in a %w/%W string 248s accepts likely false positive %w(#{a} b) 248s accepts likely false positive %W(#{a} b) 248s adds an offense and corrects when one token is quoted but there are no commas 248s adds an offense and corrects when one token is quoted but there are no commas 248s accepts likely false positive :"#{a}" 248s accepts likely false positive :"#{a}" 248s accepts likely false positive %W(' ") 248s accepts tokens without quotes or commas 248s adds an offense and corrects when tokens contain both types of quotes 248s accepts likely false positive %W(' " ! = # ,) 248s adds an offense and corrects when there are no quotes but one comma 248s accepts tokens without quotes or commas 248s accepts likely false positive %w(' " ! = # ,) 248s accepts likely false positive %w(' ") 248s adds an offense and corrects when there are no quotes but one comma 248s adds an offense and corrects when tokens contain quotes and are comma separated 248s adds an offense and corrects when tokens contain both types of quotes 248s adds an offense and corrects when tokens contain quotes and are comma separated 248s 248s RuboCop::Cop::Lint::DeprecatedConstants 248s registers and corrects an offense when using `FALSE` 248s registers and corrects an offense when using deprecated methods that have no alternative 248s registers and corrects an offense when using `NIL` 248s does not register an offense when not using deprecated constant 248s registers and corrects an offense when using deprecated methods that have no deprecated version 248s does not register an offense when using `__ENCODING__ 248s registers and corrects an offense when using `::Triple::Nested::Constant` 248s registers and corrects an offense when using `::FALSE` 248s registers and corrects an offense when using `TRUE` 248s registers and corrects an offense when using `::TRUE` 248s registers and corrects an offense when using `::NIL` 248s Ruby >= 2.6 248s registers and corrects an offense when using `Net::HTTPServerException` 248s Ruby <= 2.7 248s does not register an offense when using `Random::DEFAULT` 248s Ruby >= 3.0 248s registers and corrects an offense when using `Random::DEFAULT` 248s registers and corrects an offense when using `::Random::DEFAULT` 248s Ruby <= 2.5 248s does not register an offense when using `Net::HTTPServerException` 248s 248s RuboCop::Cop::Style::MultilineWhenThen 248s doesn't register an offense for multiline when statement without then 248s does not register an offense for hash when statement with then 248s does not register an offense when line break for multiple candidate values of `when` 248s doesn't register an offense when `then` required for a body of `when` is used 248s autocorrects when the body of `when` branch starts with `then` 248s doesn't register an offense for empty when statement without then 248s doesn't register an offense for singleline when statement with then 248s registers an offense for empty when statement with then 248s registers an offense when one line for multiple candidate values of `when` 248s registers an offense for multiline (one line in a body) when statement with then 248s does not register an offense for array when statement with then 248s registers an offense for multiline (two lines in a body) when statement with then 248s doesn't register an offense for multiline when statementwith then followed by other lines 248s 248s RuboCop::Cop::Bundler::DuplicatedGem 248s when investigating Ruby files 248s does not register any offenses 248s when investigating Gemfiles 248s does not register an offense when gem is duplicated within `if-elsif` statement 248s does not register an offense when gem is duplicated within `case` statement 248s does not register an offense when gem is duplicated within `if-else` statement 248s registers an offense when gem from default group is conditionally duplicated 248s and a duplicated gem is in a git/path/group/platforms block 248s registers an offense 248s and the file is empty 248s does not register any offenses 248s and no duplicate gems are present 248s does not register any offenses 248s and a gem is duplicated in default group 248s registers an offense 248s 248s RuboCop::Cop::Style::MapCompactWithConditionalBlock 248s With multiline block 248s does not register offenses if there are multiple guard clauses 248s registers an offense and corrects to `select` with guard clause of `if` and `next` has a value and return nil 248s registers an offense and corrects to `reject` with guard clause of `unless` and `next` has a value 248s registers an offense and corrects to `reject` with `if` condition 248s registers an offense and corrects to `select` with multi-line `if` condition 248s registers an offense and corrects to `select` with guard clause of `if` and `next` has a value 248s registers an offense and corrects to `reject` with guard clause of `unless` 248s registers an offense and corrects to `select` if condition has not else branch 248s registers an offense and corrects to `select` with modifier form of `if` condition 248s registers an offense and corrects to `reject` with guard clause of `unless` and `next` explicitly nil 248s registers an offense and corrects to `select` with guard clause of `if` 248s registers an offense and corrects to `reject` with modifier form of `unless` condition 248s registers an offense and corrects to `reject` with `unless` condition 248s registers an offense and corrects to `select` with `if` condition 248s registers an offense and corrects to `select` if `next value` in if_branch and `nil` in else_branch 248s registers an offense and corrects to `select` with ternary expression 248s does not register offenses if condition has elsif branch 248s registers an offense and corrects to `reject` with ternary expression 248s registers an offense and corrects to `reject` if `next value` in else_branch and `nil` in if_branch 248s does not register offenses if `compact` is not chained to `map` 248s registers an offense and corrects to `select` with guard clause of `if` and next explicitly nil 248s registers an offense and corrects to `reject` with guard clause of `unless` and `next` has a value and return nil 248s does not register offenses if return value is not same as block argument 248s With single line block 248s registers an offense and corrects to `select` with ternary expression 248s registers an offense and corrects to `select` with modifier form of `if` condition 248s registers an offense and corrects to `reject` with ternary expression 248s registers an offense and corrects to `reject` with modifier form of `unless` condition 248s does not register offenses if `compact` is not chained to `map` 248s 248s RuboCop::Cop::Layout::EmptyLineAfterMultilineCondition 248s registers an offense when no new line after `rescue` with multiline exceptions 248s registers an offense when no new line after `elsif` with multiline condition 248s does not register an offense when new line after `rescue` with multiline exceptions 248s does not register an offense for `when` with singleline condition 248s does not register an offense when new line after modifier `while` with multiline condition 248s does not register an offense when new line after `elsif` with multiline condition 248s registers an offense when no new line after `while` with multiline condition 248s registers an offense when no new line after `if` with multiline condition 248s registers an offense when no new line after modifier `if` with multiline condition 248s does not register an offense when new line after `if` with multiline condition 248s does not register an offense for `if` with single line condition 248s does not register an offense when new line after `while` with multiline condition 248s registers an offense when no new line after `when` with multiline condition 248s does not register an offense for `rescue` with singleline exceptions 248s registers an offense when no new line after `until` with multiline condition 248s registers an offense when no new line after modifier `while` with multiline condition 248s does not register an offense when `if` at the top level 248s does not register an offense when modifier `while` with multiline conditionis the last child of its parent 248s does not register an offense when new line after `when` with multiline condition 248s does not register an offense when modifier `if` with multiline conditionis the last child of its parent 248s does not register an offense when new line after modifier `if` with multiline condition 248s does not register an offense for `while` with single line condition 248s 248s RuboCop::Cop::Style::ZeroLengthPredicate 248s when name of the variable is `size` or `length` 248s accepts equality check 248s accepts comparison 248s accepts inequality check 248s with hashes 248s registers an offense for `hash.size == 0` 248s registers an offense for `0 != hash.size` 248s registers an offense for `hash.size != 0` 248s registers an offense for `0 == hash.size 248s when inspecting a File::Stat object 248s does not register an offense with ::File 248s does not register an offense 248s when inspecting a Tempfile object 248s does not register an offense with top-level ::Tempfile 248s does not register an offense 248s when inspecting a StringIO object 248s when initialized with a string 248s does not register an offense with top-level ::StringIO 248s does not register an offense 248s when initialized without arguments 248s does not register an offense with top-level ::StringIO 248s does not register an offense 248s with strings 248s registers an offense for `0 != string.size` 248s registers an offense for `string.size == 0` 248s registers an offense for `string.size != 0` 248s registers an offense for `0 == string.size` 248s with collection variables 248s registers an offense for `collection.size != 0` 248s registers an offense for `collection.size == 0` 248s registers an offense for `0 == collection.size` 248s registers an offense for `0 != collection.size` 248s with arrays 248s registers an offense for `1 > array.size` 248s registers an offense for `0 != array.size` 248s registers an offense for `0 == array.length` 248s registers an offense for `1 > array.length` 248s registers an offense for `0 != array.length` 248s registers an offense for `array.size > 0` 248s registers an offense for `0 == array.size` 248s registers an offense for `array.length != 0` 248s registers an offense for `0 < array.size` 248s registers an offense for `array.size != 0` 248s registers an offense for `array.size == 0` 248s registers an offense for `array.size < 1` 248s registers an offense for `array.length > 0` 248s registers an offense for `array.length == 0` 248s registers an offense for `0 < array.length 248s registers an offense for `array.length < 1` 248s 248s RuboCop::Cop::Lint::UnderscorePrefixedVariableName 248s in a method calling `binding` with arguments 248s when an underscore-prefixed argument is not used 248s does not register an offense 248s when an underscore-prefixed argument is used explicitly 248s registers an offense 248s when an underscore-prefixed variable is reassigned 248s does not register an offense 248s when an underscore-prefixed block argument is used 248s registers an offense 248s registers an offense 248s when non-underscore-prefixed variable is used 248s does not register an offense 248s in a method calling `binding` without arguments 248s when an underscore-prefixed argument is used explicitly 248s registers an offense 248s when an underscore-prefixed argument is not used explicitly 248s does not register an offense 248s when an underscore-prefixed method argument is used 248s registers an offense 248s when an underscore-prefixed variable is captured by a block 248s accepts 248s when an underscore-prefixed variable in top-level scope is used 248s registers an offense 248s when an underscore-prefixed keyword block argument is used 248s registers an offense 248s when AllowKeywordBlockArguments is set 248s does not register an offense 248s in a method calling `super` without arguments 248s when an underscore-prefixed argument is not used explicitly 248s does not register an offense 248s when an underscore-prefixed argument is used explicitly 248s registers an offense 248s in a method calling `super` with arguments 248s when an underscore-prefixed argument is used explicitly 248s registers an offense 248s when an underscore-prefixed argument is not used 248s does not register an offense 248s when an underscore-prefixed variable is used 248s registers an offense 248s when an underscore-prefixed named capture variable is used 248s registers an offense 248s 248s RuboCop::Cop::Metrics::AbcSize 248s when Max is 2 249s accepts two assignments 249s when Max is 0 249s registers an offense for complex content including A, B, and C scores 249s accepts an empty `define_method` 249s treats safe navigation method calls like regular method calls + a condition 249s registers an offense for an assignment of an element 249s registers an offense for an if modifier 249s registers an offense for an assignment of a local variable 249s accepts an empty method 249s registers an offense for a `define_method` 249s when method is in list of allowed methods 249s when AllowedPatterns is enabled 249s does not register an offense when defining a class method 249s does not register an offense when using `define_method` 249s does not register an offense when defining an instance method 249s when AllowedMethods is enabled 249s does not register an offense when defining a class method 249s does not register an offense when defining an instance method 249s does not register an offense when using `define_method` 249s when CountRepeatedAttributes is `false` 249s does not count repeated attributes 249s when CountRepeatedAttributes is `true` 249s counts repeated attributes 249s Ruby 2.7 249s registers an offense for a `define_method` with numblock 249s when Max is 10.3 249s reports size and max as <10, 10, 40> 42.43/10.3 249s when Max is 2.3 249s accepts a total score of 2.24 249s when Max is 100.321 249s reports size and max as <100, 100, 400> 424.3/100.3 249s when Max is 1000.3 249s reports size and max as <1000, 1000, 4000> 4243/1000 249s when Max is 1.3 249s reports size and max as <1, 1, 4> 4.24/1.3 249s 249s RuboCop::Cop::Lint::RegexpAsCondition 249s does not register an offense for a regexp literal with `=~` operator 249s registers an offense and corrects for a regexp literal in `if` condition 249s does not register an offense for a regexp literal outside conditions 249s 249s RuboCop::Cop::Style::SignalException 249s when enforced style is `fail` 249s registers an offense for raise in begin section 249s registers an offense for `raise` with `Kernel` as explicit receiver 249s accepts `raise` with explicit receiver 249s registers an offense for raise in rescue section 249s registers an offense for raise in def body 249s when enforced style is `semantic` 249s registers an offense for raise in begin section 249s registers an offense for `raise` and `fail` with `::Kernel` as explicit receiver 249s accepts `raise` and `fail` with explicit receiver 249s registers an offense for fail in def rescue section 249s registers an offense for fail in rescue section 249s registers an offense for raise not in a begin/rescue/end 249s registers one offense for each raise 249s accepts raise in def rescue section 249s accepts raise in def with multiple rescues 249s registers only offense for one raise that should be fail 249s registers an offense for raise in def body 249s registers an offense for `raise` and `fail` with `Kernel` as explicit receiver 249s is not confused by nested begin/rescue 249s registers an offense for fail in second rescue 249s accepts raise in rescue section 249s when enforced style is `raise` 249s registers an offense for fail in rescue section 249s registers an offense for fail in begin section 249s accepts `fail` if a custom `fail` singleton method is defined 249s registers an offense for fail in def body 249s accepts `fail` with explicit receiver 249s accepts `fail` if a custom `fail` instance method is defined 249s registers an offense for `fail` with `Kernel` as explicit receiver 249s 249s RuboCop::Cop::Layout::ElseAlignment 249s accepts a ternary if 249s with begin/rescue/else/ensure/end 249s registers an offense for misaligned else 249s accepts a correctly aligned else 249s ensure/rescue/else in Block Argument 249s accepts a correctly aligned else 249s accepts a correctly aligned else with assignment 249s registers an offense for misaligned else 249s with def/rescue/else/end 249s registers an offense for misaligned else 249s accepts a correctly aligned else 249s with def/rescue/else/ensure/end 249s accepts a correctly aligned else 249s registers an offense for misaligned else 249s with def/defs 249s accepts an empty defs body 249s accepts an empty def body 249s when modifier and def are on the same line 249s accepts a correctly aligned body 249s registers an offense for else not aligned with private 249s with case 249s registers an offense for misaligned else 249s accepts correctly aligned case/when/else 249s accepts else aligned with when but not with case 249s accepts case without else 249s >= Ruby 2.7 249s with case match 249s accepts case match without else 249s accepts correctly aligned empty else 249s accepts correctly aligned case/when/else 249s registers an offense for misaligned else 249s with if statement 249s accepts indentation after else when if is on new line after assignment 249s registers an offense for misaligned elsif 249s accepts an if/else branches with rescue clauses 249s registers an offense for misaligned else 249s accepts a one line if statement 249s accepts a correctly aligned if/elsif/else/end 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 end aligned with setter 249s accepts an if/else with chaining with a block after the end 249s accepts an if with end aligned with element assignment 249s accepts an if/else with chaining after the end 249s accepts an if-elsif-else with end aligned with setter 249s and end is aligned with keyword 249s registers an offense for an if with element assignment 249s registers offenses for an if with setter 249s registers an offense for an if 249s when alignment style is keyword by choice 249s and end is aligned with keyword 249s accepts an if in assignment 249s accepts an if/else in assignment on next line 249s accepts an until in assignment 249s accepts an if/else in assignment 249s accepts a while in assignment 249s and end is aligned with variable 249s registers an offense for an if 249s for a file with byte order mark 249s accepts a correctly aligned if/elsif/else/end 249s with unless 249s accepts a correctly aligned else in an otherwise empty unless 249s registers an offense for misaligned else 249s accepts an empty unless 249s 249s RuboCop::Cop::Style::RegexpLiteral 249s when PercentLiteralDelimiters is configured with brackets 249s respects the configuration when autocorrecting 249s when PercentLiteralDelimiters is configured with slashes 249s respects the configuration when autocorrecting 249s when EnforcedStyle is set to mixed 249s a multi-line %r regex without slashes 249s is accepted 249s a multi-line %r regex with slashes 249s is accepted 249s a single-line `//` regex without slashes 249s is accepted 249s a single-line %r regex without slashes 249s registers an offense 249s a multi-line `//` regex without slashes 249s registers an offense 249s a single-line %r regex with slashes 249s is accepted 249s when configured to allow inner slashes 249s registers an offense 249s a multi-line `//` regex with slashes 249s registers an offense 249s a single-line `//` regex with slashes 249s registers an offense 249s when configured to allow inner slashes 249s is accepted 249s when regex contains slashes in interpolation 249s ignores the slashes that do not belong // regex 249s when EnforcedStyle is set to slashes 249s a single-line %r regex without slashes 249s registers an offense 249s a single-line `//` regex without slashes 249s is accepted 249s a multi-line `//` regex with slashes 249s registers an offense 249s when configured to allow inner slashes 249s is accepted 249s a multi-line `//` regex without slashes 249s is accepted 249s a multi-line %r regex without slashes 249s registers an offense 249s a single-line `//` regex with slashes and interpolation 249s registers an offense 249s when configured to allow inner slashes 249s is accepted 249s a single-line %r regex with slashes 249s is accepted 249s when configured to allow inner slashes 249s registers an offense 249s a single-line `%r//` regex with slashes 249s is accepted 249s when configured to allow inner slashes 249s preserves slashes after autocorrection 249s a multi-line %r regex with slashes 249s is accepted 249s when configured to allow inner slashes 250s registers an offense 250s a single-line `//` regex with slashes 250s registers an offense 250s when configured to allow inner slashes 250s is accepted 250s when `EnforcedStyle: require_parentheses` of `Style/MethodCallWithArgsParentheses` cop 250s when using `%r` regexp with `EnforcedStyle: slashes` 250s does not register an offense when using a regexp starts with a blank as a safe navigation method argument 250s does not register an offense when using a regexp starts with a blank as a method argument 250s registers an offense when not used as a method argument 250s registers an offense when used as a safe navigation method argument 250s registers an offense when used as a method argument 250s registers an offense when using a regexp starts with a blank 250s when using `%r` regexp with `EnforcedStyle: mixed` 250s registers an offense when used as a safe navigation method argument 250s registers an offense when used as a method argument 250s does not register an offense when using a regexp starts with a blank as a safe navigation method argument 250s registers an offense when using a regexp starts with a blank 250s registers an offense when not used as a method argument 250s does not register an offense when using a regexp starts with a blank as a method argument 250s when `EnforcedStyle: omit_parentheses` of `Style/MethodCallWithArgsParentheses` cop 250s when using `%r` regexp with `EnforcedStyle: mixed` 250s does not register an offense when used as a method argument 250s does not register an offense when used as a safe navigation method argument 250s registers an offense when not used as a method argument 250s when using `%r` regexp with `EnforcedStyle: slashes` 250s registers an offense when not used as a method argument 250s does not register an offense when used as a method argument 250s does not register an offense when used as a safe navigation method argument 250s %r regex with other delimiters than curly braces 250s registers an offense 250s when EnforcedStyle is set to percent_r 250s a single-line `//` regex with slashes 250s registers an offense 250s a multi-line %r regex with slashes 250s is accepted 250s a multi-line %r regex without slashes 250s is accepted 250s a multi-line `//` regex with slashes 250s registers an offense 250s a multi-line `//` regex without slashes 250s registers an offense 250s a single-line `//` regex without slashes 250s registers an offense 250s a single-line %r regex without slashes 250s is accepted 250s a single-line %r regex with slashes 250s is accepted 250s 250s RuboCop::Cop::Lint::EmptyClass 250s registers an offense for empty class metaclass 250s does not register an offense when metaclass is not empty 250s does not register an offense when empty has a parent 250s registers an offense for empty class 250s registers an offense when empty metaclass contains only comments 250s does not register an offense when class is not empty 250s registers an offense for empty object metaclass 250s when AllowComments is true 250s does not register an offense when empty class contains only comments 250s does not register an offense when empty metaclass contains only comments 250s 250s RuboCop::Cop::Layout::MultilineMethodCallIndentation 250s when EnforcedStyle is indented 250s accepts indented methods in for body 250s accepts indented methods in until body 250s registers an offense for a 2 space indentation of while condition 250s registers an offense for a 2 space indentation of if condition 250s accepts even indentation of consecutive lines in typical RSpec code 250s accepts alignment of method with assignment and operator-like method 250s registers an offense and corrects correct + unrecognized style 250s accepts indentation of assignment to obj.a with newline after = 250s registers an offense and corrects extra indentation of 3rd line in typical RSpec code 250s registers an offense and corrects wrong indentation of for expression 250s accepts indentation of assignment to a with newline after = 250s registers an offense and corrects the emacs ruby-mode 1.1 indentation of an expression in an array 250s accepts an expression where the first method spans multiple lines 250s registers an offense for a 2 space indentation of until condition 250s accepts special indentation of return unless condition 250s accepts double indentation of while condition 250s accepts indented methods inside and outside a block 250s accepts no extra indentation of third line 250s accepts any indentation of method parameters 250s registers an offense and corrects 0 space indentation inside square brackets 250s accepts any indentation of parameters to #[] 250s doesn't fail on unary operators 250s accepts indentation of assignment to a with rhs on same line 250s accepts indented methods in while body 250s accepts double indentation of if condition 250s accepts normal indentation inside grouped expression 250s accepts special indentation of return if condition 250s accepts indented methods in unless body 250s accepts indentation of assignment to a[:key] with rhs on same line 250s registers an offense and corrects no indentation of second line 250s accepts indented methods in if body 250s registers an offense and corrects proc call without a selector 250s registers an offense and corrects aligned methods in if condition 250s registers an offense and corrects extra indentation of third line 250s registers an offense for a 2 space indentation of unless condition 250s accepts alignment inside a grouped expression 250s accepts indented methods in ordinary statement 250s registers an offense and corrects 1 space indentation of 3rd line 250s registers an offense and corrects one space indentation of 2nd line 250s accepts double indentation of unless condition 250s accepts indentation relative to first receiver 250s registers an offense and corrects 3 spaces indentation of 2nd line 250s accepts correctly indented methods in operation 250s accepts indentation of assignment to a[:key] with newline after = 250s accepts special indentation of for expression 250s accepts indented methods in LHS of []= assignment 250s registers an offense and corrects aligned operators in assignment 250s accepts double indentation of until condition 250s doesn't crash on unaligned multiline lambdas 250s accepts normal indentation of method parameters 250s accepts indentation of assignment to obj.a[:key] with newline after = 250s accepts indented methods in if condition 250s when indentation width is overridden for this cop 250s registers an offense for a 4 space indentation of until condition 250s accepts indented methods in if condition 250s accepts indented methods in if body 250s accepts correctly indented methods in operation 250s registers an offense for a 4 space indentation of unless condition 250s registers an offense for a 4 space indentation of if condition 250s accepts indentation of if condition which is offset by a single normal indentation step 250s accepts indentation of unless condition which is offset by a single normal indentation step 250s accepts indentation of while condition which is offset by a single normal indentation step 250s accepts indented methods 250s accepts indentation of assignment 250s accepts indented methods in until body 250s registers an offense for a 4 space indentation of while condition 250s accepts indented methods in unless body 250s accepts indentation of until condition which is offset by a single normal indentation step 250s accepts indented methods in while body 250s for possible semantic alignment 250s accepts indented methods 250s when EnforcedStyle is aligned 250s accepts aligned method in return 250s accepts correctly aligned methods in operands 250s registers an offense and corrects misaligned methods in until condition 250s accepts no extra indentation of third line 250s accepts aligned methods in if + assignment 250s accepts indented methods in LHS of []= assignment 250s accepts indented methods in ordinary statement 250s accepts an expression where the first method spans multiple lines 250s doesn't crash on unaligned multiline lambdas 250s accepts aligned method in assignment + block + assignment 250s accepts aligned methods in assignment 250s accepts any indentation of parameters to #[] 250s accepts aligned methods in a begin..end block 250s registers an offense and corrects misaligned method in []= call 250s accepts aligned methods in constant assignment 250s registers an offense and corrects proc call without a selector 250s accepts indented methods in for body 250s does not check binary operations when string wrapped with + 250s accepts indentation relative to first receiver 250s registers an offense and corrects the emacs ruby-mode 1.1 indentation of an expression in an array 250s registers an offense and corrects misaligned methods in local variable assignment 250s accepts aligned methods in if condition 250s registers an offense and corrects one space indentation of 2nd line 250s registers an offense and corrects misaligned methods in if condition 250s registers an offense and corrects one space indentation of 3rd line 250s registers an offense and corrects misaligned methods in unless condition 250s accepts aligned methods in operator assignment 250s registers an offense and corrects no indentation of second line 250s accepts correctly aligned methods in assignment 250s registers an offense and corrects 3 spaces indentation of 2nd line 250s registers an offense and corrects misaligned methods in while condition 250s registers an offense and corrects extra indentation of third line 250s registers an offense and corrects extra indentation of 3rd line in typical RSpec code 250s does not check binary operations when string wrapped with backslash 250s accepts alignment of method with assignment and operator-like method 250s registers an offense and corrects unaligned methods in assignment 250s accepts indented and aligned methods in binary operation 250s doesn't fail on unary operators 250s accepts indented methods inside and outside a block 250s accepts alignment inside a grouped expression 250s accepts indented method when there is nothing to align with 250s accepts even indentation of consecutive lines in typical RSpec code 250s for semantic alignment 250s accepts key access to hash 250s accepts 3 aligned methods 250s accepts aligned method even when an aref is first in the chain 250s registers an offense and corrects unaligned method in block body 250s accepts method being aligned with method in assignment 250s accepts aligned method even when an aref is in the chain 250s registers an offense and corrects unaligned methods 250s accepts methods being aligned with method that is an argument 250s accepts method being aligned with method 250s accepts nested method calls 250s doesn't fail on a chain of aref calls 250s accepts methods being aligned with method that is an argument in assignment 250s accepts aligned method with blocks in operation assignment 250s >= Ruby 2.7 250s accepts methods being aligned with method that is an argumentwhen using numbered parameter 250s when EnforcedStyle is indented_relative_to_receiver 250s accepts an expression where the first method spans multiple lines 250s registers an offense and corrects one space indentation of 2nd line 250s accepts alignment of method with assignment and operator-like method 250s doesn't crash on unaligned multiline lambdas 250s accepts indented methods in LHS of []= assignment 250s accepts indented methods inside and outside a block 250s registers an offense and corrects extra indentation of 3rd line in typical RSpec code 250s does not register an offense when multiline method chain has expected indent width and the method is preceded by splat 250s accepts indented methods in for body 250s does not register an offense when multiline method chain has expected indent width and the method is preceded by double splat 250s doesn't fail on unary operators 250s registers an offense and corrects the emacs ruby-mode 1.1 indentation of an expression in an array 250s registers an offense and corrects extra indentation of 3rd line 250s accepts any indentation of parameters to #[] 250s accepts indentation relative to first receiver 250s registers an offense and corrects 3 spaces indentation of second line 250s accepts indentation of consecutive lines in typical RSpec code 250s accepts correctly indented methods in operation 250s registers an offense and corrects proc call without a selector 250s accepts alignment inside a grouped expression 250s registers an offense and corrects no indentation of second line 250s accepts indented methods in ordinary statement 250s accepts no extra indentation of third line 250s for possible semantic alignment 250s accepts indented methods 250s 250s RuboCop::Cop::InternalAffairs::CreateEmptyFile 250s registers an offense when using `create_file(path, '') 250s does not register an offense when using `receiver.create_file(path, '')` 250s registers an offense when using `create_file(path, "") 250s does not register an offense when using `create_file(path, 'hello')` 250s does not register an offense when using `create_file(path)` 250s does not register an offense when using `create_file(path, ['foo', 'bar'])` 250s 250s RuboCop::Cop::Layout::EmptyComment 250s does not register an offense when using comment text with leading and trailing blank lines 250s registers an offense and corrects using an empty comment next to code 250s register offenses and correct multiple empty comments next to code 250s does not register an offense when using comment text 250s register offenses and correct multiple aligned empty comments next to code 250s registers an offense and corrects an empty comment without space next to code 250s registers an offense and corrects using single line empty comment 250s registers an offense and corrects using multiline empty comments 250s allow border comment (default) 250s does not register an offense when using border comment 250s disallow border comment 250s registers an offense and corrects using single line empty comment 250s registers an offense and corrects using border comment 250s disallow margin comment 250s registers an offense and corrects using margin comment 250s allow margin comment (default) 250s does not register an offense when using margin comment 250s 250s RuboCop::Cop::Lint::BinaryOperatorWithIdenticalOperands 250s does not register an offense for `*` with duplicate operands 250s registers an offense for `<=` with duplicate operands 250s registers an offense for `=~` with duplicate operands 250s registers an offense for `/` with duplicate operands 250s registers an offense for `^` with duplicate operands 250s does not register an offense when using arithmetic operator with numerics 250s does not crash on operator without any argument 250s registers an offense for `===` with duplicate operands 250s does not register an offense for `>>` with duplicate operands 250s does not register an offense for `**` with duplicate operands 250s registers an offense for `|` with duplicate operands 250s registers an offense for `||` with duplicate operands 250s does not register an offense when using binary operator with different operands 250s registers an offense for `<=>` with duplicate operands 250s registers an offense for `&&` with duplicate operands 250s does not register an offense for `+` with duplicate operands 250s registers an offense for `>` with duplicate operands 250s registers an offense for `<` with duplicate operands 250s registers an offense for `>=` with duplicate operands 250s registers an offense for `!=` with duplicate operands 250s does not register an offense for `<<` with duplicate operands 250s registers an offense for `-` with duplicate operands 250s registers an offense for `==` with duplicate operands 250s registers an offense for `%` with duplicate operands 250s 250s RuboCop::Cop::Lint::HeredocMethodCallPosition 250s incorrect cases 250s chained case no parens 250s detects 250s chained case with multiple line args 250s detects 250s simple incorrect case with paren 250s detects 250s simple incorrect case 250s detects 250s with trailing comma in method call 250s detects 250s chained case without args 250s detects 250s chained case with parens 250s detects 250s correct cases 250s accepts chained correct case 250s ignores if no call 250s accepts simple correct case 250s 250s RuboCop::Cop::Style::RedundantRegexpCharacterClass 250s with a character class containing a single negated unicode character property 250s registers an offense and corrects 250s with a character class containing a single character inside a group 250s registers an offense and corrects 250s with a character class containing a single unicode character property 250s registers an offense and corrects 250s with a character class containing an interpolation 250s does not register an offense 250s with an array index inside an interpolation 250s does not register an offense 250s with consecutive escaped square brackets inside a character class 250s does not register an offense 250s with a character class containing a single range 250s does not register an offense 250s with a character class containing a single character before `+` quantifier 250s registers an offense and corrects 250s with a character class containing an escaped-b 250s does not register an offense 250s with a negated character class with a single element 250s does not register an offense 250s with a character class containing a single unicode code-point 250s registers an offense and corrects 250s with a character class containing two characters 250s does not register an offense 250s with a redundant character class after an interpolation 250s registers an offense and corrects 250s with a character class with first element an escaped ] 250s does not register an offense 250s with a character class containing a space meta-character 250s registers an offense and corrects 250s with %r{} regexp 250s with a character class containing a single character inside a group 250s registers an offense and corrects 250s with multiple character classes containing single characters 250s registers an offense and corrects 250s with a character class containing a single character 250s registers an offense and corrects 250s with a character class containing a single character before `{n,m}` quantifier 250s registers an offense and corrects 250s with a character class containing a single character before `+` quantifier 250s registers an offense and corrects 250s with multiple character classes containing single characters 250s registers an offense and corrects 250s with an interpolated unnecessary-character-class regexp 250s registers an offense and corrects 250s with a character class containing multiple unicode code-points 250s does not register an offense and corrects 250s with a character class containing an unescaped-# 250s registers an offense and corrects 250s with a character class containing a negated posix bracket expression 250s does not register an offense 250s with a multi-line interpolation 250s ignores offenses in the interpolated expression 250s with a character class containing a single character before `{n,m}` quantifier 250s registers an offense and corrects 250s with a character class containing set intersection 250s does not register an offense 250s with a character class containing a space 250s with an unnecessary-character-class after a comment 250s registers an offense and corrects 250s when not using free-spaced mode 251s registers an offense and corrects 251s when using free-spaced mode 251s with a commented single-element character class 251s does not register an offense 251s with a single space character class 251s does not register an offense with /ix 251s does not register an offense with /iux 251s does not register an offense with only /x 251s with a character class containing an escaped-# 251s registers an offense and corrects 251s with a character class containing a posix bracket expression 251s does not register an offense 251s with a character class containing an escaped [ 251s registers an offense and corrects 251s with consecutive escaped square brackets 251s does not register an offense 251s with a character class containing an escaped ] 251s registers an offense and corrects 251s with a character class containing a character requiring escape outside 251s does not register an offense 251s with escaped square brackets surrounding a single character 251s does not register an offense 251s with a character class containing a single character 251s registers an offense and corrects 251s with a regexp containing invalid g escape 251s registers an offense and corrects 251s with a character class containing an escaped-0 251s does not register an offense (FAILED - 1) 251s with a character class containing a negated-space meta-character 251s registers an offense and corrects 251s with a character class containing escaped character requiring escape outside 251s registers an offense and corrects 251s 251s RuboCop::Cop::Style::HashSyntax 251s configured to enforce ruby19 style 251s with SpaceAroundOperators disabled 251s autocorrects even if there is no space around => 251s configured to use hash rockets when symbol values are found 251s registers an offense when any element has a symbol value in method calls 251s accepts hash in ruby19 style with no symbol values 251s accepts ruby19 syntax when no elements have symbol values 251s accepts ruby19 syntax when no elements have symbol values in method calls 251s accepts both hash rockets and ruby19 syntax in the same code 251s registers an offense when using hash rockets and no elements have a symbol value 251s autocorrects to hash rockets when all elements have symbol value 251s accepts an empty hash 251s registers an offense when any element uses a symbol for the value 251s registers an offense for hashes with elements on multiple lines 251s with SpaceAroundOperators enabled 251s registers an offense when symbol keys have strings in them 251s accepts an empty hash 251s registers an offense for mixed syntax when new is possible 251s accepts hash rockets when symbol keys end with = 251s autocorrects even if it interferes with SpaceAroundOperators 251s accepts new syntax in method calls 251s registers offense for hash rocket syntax when new is possible 251s preserves quotes during autocorrection 251s registers an offense for hash rockets in method calls 251s registers offense when keys start with an uppercase letter 251s autocorrects a missing space when hash is used as argument 251s accepts new syntax in a hash literal 251s accepts hash rockets when keys have different types 251s accepts hash rockets when symbol characters are not supported 251s ruby < 2.2 251s accepts hash rockets when symbol keys have string in them 251s if PreferHashRocketsForNonAlnumEndingSymbols is true 251s accepts hash rockets when symbols end with ? 251s accepts hash rockets when symbols end with ! 251s if PreferHashRocketsForNonAlnumEndingSymbols is false 251s registers an offense for hash rockets when symbols end with ? 251s registers an offense for hash rockets when symbols end with ! 251s when using a return value uses `return` 251s registers an offense and corrects when not enclosed in parentheses 251s registers an offense and corrects when enclosed in parentheses 251s configured to enforce no mixed keys 251s accepts new syntax in a hash literal 251s accepts hash rockets when keys have whitespaces in them 251s accepts hash rockets when keys have different types 251s registers an offense for mixed syntax when new is possible 251s accepts new hash style 251s accepts new syntax in method calls 251s accepts hash rockets when keys have special symbols in them 251s registers an offense when keys have different types and styles 251s autocorrects mixed key hashes 251s registers an offense when keys have whitespaces and mix styles 251s registers an offense when keys have special symbols and mix styles 251s accepts the hash rocket syntax when new is possible 251s accepts old hash rockets style 251s accepts hash rockets in method calls 251s registers an offense when keys start with a digit and mix styles 251s accepts hash rockets when keys start with a digit 251s accepts an empty hash 251s configured to disallow mixing of implicit and explicit hash literal value 251s Ruby >= 3.1 251s registers an offense when some hash values are omitted but they can all be omitted 251s registers an offense when some hash values are omitted but they cannot all be omitted 251s does not register an offense when all hash values are omitted 251s does not register an offense when all hash values are present, but no values can be omitted 251s does not register an offense when all hash values are present, but only some values can be omitted 251s registers an offense when all hash values are present, but can all be omitted 251s Ruby <= 3.0 251s does not register an offense when all hash key and hash values are the same 251s configured to enforce ruby 1.9 style with no mixed keys 251s UseHashRocketsWithSymbolValues disabled 251s accepts new syntax when keys are interpolated string 251s registers an offense when keys have special symbols in them 251s accepts an empty hash 251s accepts hash rockets when keys have different types 251s registers an offense when keys have different types and styles 251s registers an offense when keys have whitespaces in them 251s registers offense for hash rocket syntax when new is possible 251s accepts new syntax in method calls 251s accepts new syntax in a hash literal 251s registers an offense for mixed syntax when new is possible 251s registers an offense when keys start with a digit 251s registers an offense for hash rockets in method calls 251s ruby < 2.2 251s registers an offense when keys have special symbols and mix styles 251s accepts hash rockets when keys start with a digit 251s registers an offense when keys have whitespaces and mix styles 251s accepts hash rockets when keys have whitespaces in them 251s accepts hash rockets when keys have special symbols in them 251s registers an offense when keys start with a digit and mix styles 251s UseHashRocketsWithSymbolValues enabled 251s accepts an empty hash 251s accepts new syntax in a hash literal 251s accepts new syntax when keys are interpolated string 251s autocorrects to hash rockets when all elements have symbol value 251s registers an offense for hash rockets in method calls 251s registers an offense for mixed syntax when new is possible 251s registers an offense when keys have whitespaces in them 251s registers offense for hash rocket syntax when new is possible 251s registers an offense when keys have different types and styles 251s registers an offense when any element uses a symbol for the value 251s registers an offense when keys have special symbols in them 251s accepts new syntax in method calls 251s accepts hash rockets when keys have different types 251s registers an offense when keys start with a digit 251s registers an offense when any element has a symbol value in method calls 251s ruby < 2.2 251s accepts hash rockets when keys start with a digit 251s registers an offense when keys have whitespaces and mix styles 251s accepts hash rockets when keys have special symbols in them 251s accepts hash rockets when keys have whitespaces in them 251s registers an offense when keys start with a digit and mix styles 251s registers an offense when keys have special symbols and mix styles 251s configured to enforce shorthand syntax style 251s Ruby <= 3.0 251s does not register an offense when hash key and hash value are the same 251s Ruby >= 3.1 251s does not register an offense when lvar hash key and hash value are the same 251s does not register an offense when hash key and hash value are not the same 251s does not register an offense when without parentheses call expr follows 251s does not register an offense when one line `until` condition follows (without parentheses) 251s does not register an offense when call expr with argument and a block follows 251s does not register an offense when with parentheses call expr follows assignment expr 251s does not register an offense when `return` with one line `if` condition follows (without parentheses) 251s does not register an offense when hash key and hash value are the same but the value ends `!` 251s does not register an offense when method call hash key and hash value are the same 251s does not register an offense when hash key and hash value are partially the same 251s registers and corrects an offense when hash key and hash value are partially the same 251s registers an offense when one line `if` condition follows (with parentheses) 251s registers an offense when one line `until` condition follows (with parentheses) 251s registers and corrects an offense when hash key and hash value (lvar) are the same 251s does not register an offense when one line `if` condition follows (without parentheses) 251s registers and corrects an offense when hash key and hash value are the same and it in the method bodyand an expression follows 251s does not register an offense when with parentheses call expr follows 251s does not register an offense when hash values are omitted 251s does not register an offense when hash key and hash value are the same but the value ends `?` 251s registers and corrects an offense when `Hash[foo: foo]` and an expression follows 251s registers and corrects an offense when `Hash[foo: foo]` 251s does not register an offense when call expr without arguments and with a block follows 251s registers an offense when hash key and hash value are not the same and method with `[]` is called 251s does not register an offense when without parentheses call expr follows after nested method call 251s registers and corrects an offense when hash key and hash value are the same 251s does not register an offense when symbol hash key and hash value (lvar) are not the same 251s does not register an offense when symbol hash key and string hash value are the same 251s does not register an offense when hash pattern matching 251s registers and corrects an offense when hash key and hash value are the same and it in the method body 251s when hash roket syntax 251s does not register an offense 251s configured to enforce explicit hash value syntax style 251s Ruby >= 3.1 251s does not register an offense when hash key and hash value are not the same 251s registers and corrects an offense when hash key and hash value are partially the same 251s does not register an offense when hash key and hash value are the same 251s registers and corrects an offense when hash values are omitted 251s Ruby <= 3.0 251s does not register an offense when hash key and hash value are the same 251s configured to accept both shorthand and explicit use of hash literal value 251s Ruby >= 3.1 251s does not register an offense when hash key and hash value are partially the same 251s does not register an offense when hash key and hash value are not the same 251s does not register an offense when hash key and hash value are the same 251s does not register an offense when hash values are omitted 251s Ruby <= 3.0 251s does not register an offense when hash key and hash value are the same 251s configured to enforce hash rockets style 251s registers an offense for 1.9 style in method calls 251s registers an offense for mixed syntax 251s registers offense for Ruby 1.9 style 251s accepts hash rockets in a hash literal 251s accepts hash rockets in method calls 251s accepts an empty hash 251s UseHashRocketsWithSymbolValues has no impact 251s does not register an offense when there is a symbol value 251s 251s RuboCop::Cop::Lint::FloatComparison 251s registers an offense when comparing with float 251s registers an offense when comparing with arightmetic operator on floats 251s does not register an offense when comparing with float using epsilon 251s registers an offense when comparing with method on float receiver 251s registers an offense when comparing with float method that can return numeric and returns float 251s does not register an offense when comparing with float method that can return numeric and returns integer 251s registers an offense when comparing with float returning method 251s 251s RuboCop::Cop::Bundler::OrderedGems 251s When gems have an inline comment, and not sorted 251s registers an offense 251s When gem groups is separated by multiline comment 251s with TreatCommentsAsGroupSeparators: false 251s registers an offense 251s with TreatCommentsAsGroupSeparators: true 251s accepts 251s When a gem declaration takes several lines 251s registers an offense 251s When a gem that starts with a capital letter is not sorted 251s registers an offense 251s When there are duplicated gems in group 251s registers an offense 251s When a gem is sorted but not so when disregarding _- 251s by default 251s registers an offense 251s when ConsiderPunctuation is true 251s does not register an offense 251s When a gem that starts with a capital letter is sorted 251s does not register an offense 251s When the gemfile is empty 251s does not register any offenses 251s When each individual group of line is sorted 251s does not register any offenses 251s When gems are asciibetically sorted irrespective of _ 251s does not register an offense 251s When gems are alphabetically sorted 251s does not register any offenses 251s When gems are not alphabetically sorted 251s registers an offense 251s when a gem is referenced from a variable 251s ignores the line 251s resets the sorting to a new block 251s When each individual group of line is not sorted 251s registers some offenses 251s 251s RuboCop::Cop::Style::ConditionalAssignment 251s SingleLineConditionsOnly true 251s registers an offense for assignment using []= 251s registers an offense for assignment using a method that ends with an equal sign 251s registers an offense for assignment to an if then else 251s corrects assignment when without `else` branch 251s corrects assignment to a namespaced constant 251s registers an offense for assignment to case when then else 251s allows a method call in the subject of a ternary operator 251s behaves like all variable types 251s registers an offense assigning any variable type to unless else 251s registers an offense assigning any variable type to if elsif else 251s allows assignment to if without else 251s registers an offense for assigning any variable type to case when 251s registers an offense assigning any variable type to if else 251s registers an offense assigning any variable type to ternary 251s does not crash for rescue assignment 251s registers an offense assigning any variable type to if elsewith multiple assignment 251s >= Ruby 2.7 251s registers an offense for assigning any variable type to case in 251s behaves like all assignment types 251s allows any assignment to if without else 251s registers an offense any assignment to if else 251s registers an offense any assignment to case when 251s does not crash when used inside rescue 251s registers an offense for any assignment to unless else 251s registers an offense for any assignment to ternary 251s behaves like multiline all assignment types allow 251s any assignment to a multiline case when 251s any assignment to a multiline unless else 251s any assignment to a multiline if else 251s behaves like all variable types 251s registers an offense for assigning any variable type to case when 251s allows assignment to if without else 251s does not crash for rescue assignment 251s registers an offense assigning any variable type to unless else 251s registers an offense assigning any variable type to if elsewith multiple assignment 251s registers an offense assigning any variable type to if else 251s registers an offense assigning any variable type to ternary 251s registers an offense assigning any variable type to if elsif else 251s >= Ruby 2.7 251s registers an offense for assigning any variable type to case in 251s behaves like multiline all variable types allow 251s assigning any variable type to a multiline if elsif else 251s assigning any variable type to an if else with multiline in one branch 251s assigning any variable type to a multiline if else 251s assigning any variable type to a multiline unless else 251s assigning any variable type to a multiline case when 251s behaves like multiline all variable types allow 251s assigning any variable type to a multiline unless else 251s assigning any variable type to an if else with multiline in one branch 251s assigning any variable type to a multiline case when 251s assigning any variable type to a multiline if else 251s assigning any variable type to a multiline if elsif else 251s behaves like multiline all variable types allow 251s assigning any variable type to a multiline if else 251s assigning any variable type to a multiline if elsif else 251s assigning any variable type to a multiline case when 251s assigning any variable type to an if else with multiline in one branch 251s assigning any variable type to a multiline unless else 251s behaves like multiline all assignment types allow 251s any assignment to a multiline if else 251s any assignment to a multiline case when 251s any assignment to a multiline unless else 251s behaves like multiline all variable types allow 251s assigning any variable type to a multiline if else 251s assigning any variable type to a multiline if elsif else 251s assigning any variable type to a multiline case when 251s assigning any variable type to an if else with multiline in one branch 251s assigning any variable type to a multiline unless else 251s behaves like all assignment types 251s allows any assignment to if without else 251s registers an offense for any assignment to unless else 251s registers an offense any assignment to if else 251s registers an offense for any assignment to ternary 251s does not crash when used inside rescue 251s registers an offense any assignment to case when 251s behaves like all assignment types 251s allows any assignment to if without else 251s registers an offense any assignment to case when 251s registers an offense any assignment to if else 251s registers an offense for any assignment to ternary 251s does not crash when used inside rescue 251s registers an offense for any assignment to unless else 251s behaves like multiline all assignment types allow 251s any assignment to a multiline unless else 251s any assignment to a multiline if else 251s any assignment to a multiline case when 251s behaves like all assignment types 251s registers an offense for any assignment to ternary 251s registers an offense any assignment to case when 251s registers an offense any assignment to if else 251s does not crash when used inside rescue 251s registers an offense for any assignment to unless else 251s allows any assignment to if without else 251s behaves like all assignment types 251s registers an offense any assignment to case when 251s registers an offense for any assignment to ternary 251s does not crash when used inside rescue 251s registers an offense any assignment to if else 251s registers an offense for any assignment to unless else 251s allows any assignment to if without else 251s behaves like single line condition autocorrect 251s corrects assignment to an if elsif else condition 251s corrects assignment to a ternary operator 251s corrects assignment to an if elsif else with multiple elsifs 251s corrects assignment to an if else condition 251s corrects assignment to an unless else condition 251s corrects assignment to a case when else condition 251s corrects assignment to a case when else with multiple whens 251s behaves like multiline all assignment types allow 251s any assignment to a multiline case when 251s any assignment to a multiline if else 251s any assignment to a multiline unless else 251s behaves like all assignment types 251s does not crash when used inside rescue 251s registers an offense any assignment to case when 251s registers an offense for any assignment to unless else 251s allows any assignment to if without else 251s registers an offense any assignment to if else 251s registers an offense for any assignment to ternary 251s behaves like multiline all assignment types allow 251s any assignment to a multiline case when 251s any assignment to a multiline if else 251s any assignment to a multiline unless else 251s behaves like multiline all assignment types allow 251s any assignment to a multiline unless else 252s any assignment to a multiline if else 252s any assignment to a multiline case when 252s behaves like multiline all variable types allow 252s assigning any variable type to a multiline case when 252s assigning any variable type to a multiline unless else 252s assigning any variable type to a multiline if elsif else 252s assigning any variable type to a multiline if else 252s assigning any variable type to an if else with multiline in one branch 252s behaves like all variable types 252s registers an offense for assigning any variable type to case when 252s allows assignment to if without else 252s registers an offense assigning any variable type to unless else 252s registers an offense assigning any variable type to if elsif else 252s does not crash for rescue assignment 252s registers an offense assigning any variable type to if elsewith multiple assignment 252s registers an offense assigning any variable type to ternary 252s registers an offense assigning any variable type to if else 252s >= Ruby 2.7 252s registers an offense for assigning any variable type to case in 252s behaves like multiline all assignment types allow 252s any assignment to a multiline unless else 252s any assignment to a multiline case when 252s any assignment to a multiline if else 252s behaves like multiline all assignment types allow 252s any assignment to a multiline unless else 252s any assignment to a multiline if else 252s any assignment to a multiline case when 252s behaves like all assignment types 252s allows any assignment to if without else 252s does not crash when used inside rescue 252s registers an offense for any assignment to ternary 252s registers an offense any assignment to case when 252s registers an offense any assignment to if else 252s registers an offense for any assignment to unless else 252s behaves like multiline all assignment types allow 252s any assignment to a multiline unless else 252s any assignment to a multiline if else 252s any assignment to a multiline case when 252s behaves like multiline all assignment types allow 252s any assignment to a multiline if else 252s any assignment to a multiline unless else 252s any assignment to a multiline case when 252s behaves like all assignment types 252s does not crash when used inside rescue 252s allows any assignment to if without else 252s registers an offense any assignment to if else 252s registers an offense for any assignment to ternary 252s registers an offense any assignment to case when 252s registers an offense for any assignment to unless else 252s behaves like multiline all assignment types allow 252s any assignment to a multiline unless else 252s any assignment to a multiline case when 252s any assignment to a multiline if else 252s behaves like multiline all assignment types allow 252s any assignment to a multiline case when 252s any assignment to a multiline if else 252s any assignment to a multiline unless else 252s behaves like all assignment types 252s registers an offense for any assignment to ternary 252s allows any assignment to if without else 252s registers an offense any assignment to if else 252s registers an offense for any assignment to unless else 252s registers an offense any assignment to case when 252s does not crash when used inside rescue 252s behaves like all assignment types 252s does not crash when used inside rescue 252s registers an offense for any assignment to unless else 252s registers an offense any assignment to case when 252s allows any assignment to if without else 252s registers an offense for any assignment to ternary 252s registers an offense any assignment to if else 252s behaves like all assignment types 252s registers an offense for any assignment to ternary 252s registers an offense any assignment to if else 252s registers an offense for any assignment to unless else 252s registers an offense any assignment to case when 252s allows any assignment to if without else 252s does not crash when used inside rescue 252s behaves like all variable types 252s does not crash for rescue assignment 252s registers an offense assigning any variable type to if else 252s registers an offense assigning any variable type to if elsewith multiple assignment 252s registers an offense assigning any variable type to if elsif else 252s registers an offense assigning any variable type to ternary 252s registers an offense for assigning any variable type to case when 252s registers an offense assigning any variable type to unless else 252s allows assignment to if without else 252s >= Ruby 2.7 252s registers an offense for assigning any variable type to case in 252s behaves like multiline all assignment types allow 252s any assignment to a multiline case when 252s any assignment to a multiline if else 252s any assignment to a multiline unless else 252s behaves like multiline all assignment types allow 252s any assignment to a multiline if else 252s any assignment to a multiline unless else 252s any assignment to a multiline case when 252s behaves like all variable types 252s registers an offense assigning any variable type to if elsewith multiple assignment 252s registers an offense for assigning any variable type to case when 252s registers an offense assigning any variable type to if elsif else 252s registers an offense assigning any variable type to unless else 252s does not crash for rescue assignment 252s registers an offense assigning any variable type to if else 252s allows assignment to if without else 252s registers an offense assigning any variable type to ternary 252s >= Ruby 2.7 252s registers an offense for assigning any variable type to case in 252s behaves like multiline all assignment types allow 252s any assignment to a multiline if else 252s any assignment to a multiline unless else 252s any assignment to a multiline case when 252s behaves like all assignment types 252s does not crash when used inside rescue 252s registers an offense any assignment to case when 252s registers an offense for any assignment to unless else 252s allows any assignment to if without else 252s registers an offense any assignment to if else 252s registers an offense for any assignment to ternary 252s behaves like all assignment types 252s allows any assignment to if without else 252s registers an offense for any assignment to unless else 252s does not crash when used inside rescue 252s registers an offense any assignment to if else 252s registers an offense any assignment to case when 252s registers an offense for any assignment to ternary 252s behaves like all assignment types 252s registers an offense any assignment to if else 252s registers an offense any assignment to case when 252s allows any assignment to if without else 252s registers an offense for any assignment to ternary 252s does not crash when used inside rescue 252s registers an offense for any assignment to unless else 252s behaves like multiline all assignment types allow 252s any assignment to a multiline if else 252s any assignment to a multiline case when 252s any assignment to a multiline unless else 252s behaves like all variable types 252s registers an offense assigning any variable type to if else 252s does not crash for rescue assignment 252s registers an offense assigning any variable type to if elsif else 252s registers an offense for assigning any variable type to case when 252s registers an offense assigning any variable type to ternary 252s registers an offense assigning any variable type to if elsewith multiple assignment 252s allows assignment to if without else 252s registers an offense assigning any variable type to unless else 252s >= Ruby 2.7 252s registers an offense for assigning any variable type to case in 252s behaves like multiline all assignment types allow 252s any assignment to a multiline unless else 252s any assignment to a multiline if else 252s any assignment to a multiline case when 252s behaves like all assignment types 252s registers an offense for any assignment to unless else 252s does not crash when used inside rescue 252s registers an offense any assignment to if else 252s registers an offense any assignment to case when 252s registers an offense for any assignment to ternary 252s allows any assignment to if without else 252s behaves like all assignment types 252s does not crash when used inside rescue 252s allows any assignment to if without else 252s registers an offense any assignment to case when 252s registers an offense for any assignment to unless else 252s registers an offense for any assignment to ternary 252s registers an offense any assignment to if else 252s behaves like multiline all assignment types allow 252s any assignment to a multiline case when 252s any assignment to a multiline if else 252s any assignment to a multiline unless else 252s behaves like all variable types 252s registers an offense assigning any variable type to if elsif else 252s registers an offense assigning any variable type to ternary 252s allows assignment to if without else 252s registers an offense assigning any variable type to unless else 252s does not crash for rescue assignment 252s registers an offense assigning any variable type to if elsewith multiple assignment 252s registers an offense assigning any variable type to if else 252s registers an offense for assigning any variable type to case when 252s >= Ruby 2.7 252s registers an offense for assigning any variable type to case in 252s behaves like multiline all assignment types allow 252s any assignment to a multiline if else 252s any assignment to a multiline case when 252s any assignment to a multiline unless else 252s behaves like all assignment types 252s registers an offense any assignment to case when 252s does not crash when used inside rescue 252s registers an offense for any assignment to ternary 252s registers an offense for any assignment to unless else 252s registers an offense any assignment to if else 252s allows any assignment to if without else 252s behaves like all assignment types 252s registers an offense any assignment to if else 252s does not crash when used inside rescue 252s allows any assignment to if without else 252s registers an offense for any assignment to ternary 252s registers an offense for any assignment to unless else 252s registers an offense any assignment to case when 252s behaves like multiline all variable types allow 252s assigning any variable type to a multiline if elsif else 252s assigning any variable type to a multiline if else 252s assigning any variable type to a multiline unless else 252s assigning any variable type to an if else with multiline in one branch 252s assigning any variable type to a multiline case when 252s behaves like all assignment types 252s registers an offense for any assignment to unless else 252s registers an offense any assignment to case when 252s does not crash when used inside rescue 252s registers an offense any assignment to if else 252s allows any assignment to if without else 252s registers an offense for any assignment to ternary 252s for loop 252s ignores pseudo assignments in a for loop 252s behaves like multiline all variable types allow 252s assigning any variable type to a multiline unless else 252s assigning any variable type to a multiline if else 252s assigning any variable type to a multiline if elsif else 252s assigning any variable type to an if else with multiline in one branch 252s assigning any variable type to a multiline case when 252s SingleLineConditionsOnly false 252s corrects assignment to a case when else condition 252s corrects assignment to a multiline if else condition 252s corrects assignment to an unless else condition 252s corrects assignment to a case when else with multiple whens 252s corrects assignment to an if elsif else with multiple elsifs 252s corrects assignment to a multiline if elsif else condition 252s behaves like all variable types 252s allows assignment to if without else 252s registers an offense for assigning any variable type to case when 252s registers an offense assigning any variable type to if elsif else 252s registers an offense assigning any variable type to if elsewith multiple assignment 252s registers an offense assigning any variable type to if else 252s registers an offense assigning any variable type to ternary 252s registers an offense assigning any variable type to unless else 252s does not crash for rescue assignment 252s >= Ruby 2.7 252s registers an offense for assigning any variable type to case in 252s behaves like all assignment types 252s registers an offense any assignment to if else 252s allows any assignment to if without else 252s registers an offense for any assignment to ternary 252s does not crash when used inside rescue 252s registers an offense for any assignment to unless else 252s registers an offense any assignment to case when 252s behaves like all assignment types 252s registers an offense any assignment to case when 252s allows any assignment to if without else 252s registers an offense any assignment to if else 252s registers an offense for any assignment to unless else 252s registers an offense for any assignment to ternary 252s does not crash when used inside rescue 252s behaves like all variable types 252s registers an offense assigning any variable type to if else 252s registers an offense assigning any variable type to if elsewith multiple assignment 252s registers an offense for assigning any variable type to case when 252s does not crash for rescue assignment 252s registers an offense assigning any variable type to if elsif else 252s registers an offense assigning any variable type to unless else 252s allows assignment to if without else 252s registers an offense assigning any variable type to ternary 252s >= Ruby 2.7 252s registers an offense for assigning any variable type to case in 252s behaves like all assignment types 252s registers an offense for any assignment to unless else 252s registers an offense any assignment to if else 252s registers an offense any assignment to case when 252s does not crash when used inside rescue 252s allows any assignment to if without else 252s registers an offense for any assignment to ternary 252s behaves like multiline all assignment types offense 252s any assignment to a multiline if else 252s any assignment to a multiline case when 252s any assignment to a multiline unless else 252s behaves like all assignment types 252s registers an offense for any assignment to unless else 252s registers an offense any assignment to case when 252s registers an offense any assignment to if else 252s allows any assignment to if without else 252s registers an offense for any assignment to ternary 252s does not crash when used inside rescue 252s behaves like multiline all assignment types offense 252s any assignment to a multiline if else 252s any assignment to a multiline case when 252s any assignment to a multiline unless else 252s behaves like all variable types 252s registers an offense assigning any variable type to if else 252s does not crash for rescue assignment 252s registers an offense assigning any variable type to ternary 252s registers an offense assigning any variable type to unless else 252s registers an offense assigning any variable type to if elsif else 252s allows assignment to if without else 252s registers an offense assigning any variable type to if elsewith multiple assignment 252s registers an offense for assigning any variable type to case when 252s >= Ruby 2.7 252s registers an offense for assigning any variable type to case in 252s behaves like multiline all assignment types offense 252s any assignment to a multiline unless else 252s any assignment to a multiline if else 252s any assignment to a multiline case when 252s behaves like single line condition autocorrect 252s corrects assignment to a case when else with multiple whens 252s corrects assignment to a ternary operator 252s corrects assignment to an if else condition 252s corrects assignment to an unless else condition 252s corrects assignment to an if elsif else condition 252s corrects assignment to a case when else condition 252s corrects assignment to an if elsif else with multiple elsifs 252s behaves like all assignment types 252s registers an offense any assignment to case when 252s allows any assignment to if without else 252s registers an offense for any assignment to unless else 252s registers an offense for any assignment to ternary 252s does not crash when used inside rescue 252s registers an offense any assignment to if else 252s behaves like multiline all assignment types offense 252s any assignment to a multiline unless else 252s any assignment to a multiline if else 252s any assignment to a multiline case when 252s behaves like all assignment types 252s registers an offense any assignment to if else 252s registers an offense for any assignment to ternary 253s registers an offense for any assignment to unless else 253s allows any assignment to if without else 253s does not crash when used inside rescue 253s registers an offense any assignment to case when 253s behaves like multiline all assignment types offense 253s any assignment to a multiline unless else 253s any assignment to a multiline if else 253s any assignment to a multiline case when 253s behaves like multiline all assignment types offense 253s any assignment to a multiline unless else 253s any assignment to a multiline if else 253s any assignment to a multiline case when 253s behaves like multiline all variable types offense 253s assigning any variable type to a multiline if elsif else 253s assigning any variable type to an if else with multiline in one branch 253s assigning any variable type to a multiline unless else 253s assigning any variable type to a multiline case when 253s assigning any variable type to a multiline if else 253s behaves like all assignment types 253s registers an offense for any assignment to unless else 253s does not crash when used inside rescue 253s registers an offense any assignment to case when 253s registers an offense for any assignment to ternary 253s registers an offense any assignment to if else 253s allows any assignment to if without else 253s behaves like multiline all assignment types offense 253s any assignment to a multiline unless else 253s any assignment to a multiline if else 253s any assignment to a multiline case when 253s behaves like multiline all variable types offense 253s assigning any variable type to a multiline case when 253s assigning any variable type to a multiline if else 253s assigning any variable type to an if else with multiline in one branch 253s assigning any variable type to a multiline unless else 253s assigning any variable type to a multiline if elsif else 253s behaves like multiline all variable types offense 253s assigning any variable type to a multiline if else 253s assigning any variable type to an if else with multiline in one branch 253s assigning any variable type to a multiline unless else 253s assigning any variable type to a multiline case when 253s assigning any variable type to a multiline if elsif else 253s behaves like all variable types 253s allows assignment to if without else 253s registers an offense assigning any variable type to unless else 253s registers an offense assigning any variable type to if else 253s registers an offense for assigning any variable type to case when 253s registers an offense assigning any variable type to ternary 253s does not crash for rescue assignment 253s registers an offense assigning any variable type to if elsif else 253s registers an offense assigning any variable type to if elsewith multiple assignment 253s >= Ruby 2.7 253s registers an offense for assigning any variable type to case in 253s behaves like all assignment types 253s does not crash when used inside rescue 253s registers an offense any assignment to if else 253s registers an offense for any assignment to unless else 253s allows any assignment to if without else 253s registers an offense any assignment to case when 253s registers an offense for any assignment to ternary 253s behaves like all assignment types 253s registers an offense for any assignment to ternary 253s registers an offense for any assignment to unless else 253s allows any assignment to if without else 253s registers an offense any assignment to if else 253s registers an offense any assignment to case when 253s does not crash when used inside rescue 253s behaves like multiline all assignment types offense 253s any assignment to a multiline unless else 253s any assignment to a multiline case when 253s any assignment to a multiline if else 253s behaves like multiline all assignment types offense 253s any assignment to a multiline unless else 253s any assignment to a multiline if else 253s any assignment to a multiline case when 253s behaves like multiline all assignment types offense 253s any assignment to a multiline unless else 253s any assignment to a multiline if else 253s any assignment to a multiline case when 253s behaves like all assignment types 253s registers an offense for any assignment to unless else 253s registers an offense any assignment to case when 253s registers an offense any assignment to if else 253s allows any assignment to if without else 253s registers an offense for any assignment to ternary 253s does not crash when used inside rescue 253s behaves like multiline all variable types offense 253s assigning any variable type to a multiline if else 253s assigning any variable type to a multiline unless else 253s assigning any variable type to a multiline if elsif else 253s assigning any variable type to a multiline case when 253s assigning any variable type to an if else with multiline in one branch 253s behaves like multiline all assignment types offense 253s any assignment to a multiline unless else 253s any assignment to a multiline if else 253s any assignment to a multiline case when 253s behaves like all assignment types 253s does not crash when used inside rescue 253s allows any assignment to if without else 253s registers an offense any assignment to if else 253s registers an offense for any assignment to ternary 253s registers an offense any assignment to case when 253s registers an offense for any assignment to unless else 253s behaves like multiline all variable types offense 253s assigning any variable type to a multiline if elsif else 253s assigning any variable type to an if else with multiline in one branch 253s assigning any variable type to a multiline if else 253s assigning any variable type to a multiline case when 253s assigning any variable type to a multiline unless else 253s behaves like multiline all assignment types offense 253s any assignment to a multiline case when 253s any assignment to a multiline unless else 253s any assignment to a multiline if else 253s behaves like all assignment types 253s registers an offense any assignment to case when 253s does not crash when used inside rescue 253s registers an offense any assignment to if else 253s registers an offense for any assignment to unless else 253s registers an offense for any assignment to ternary 253s allows any assignment to if without else 253s behaves like multiline all assignment types offense 253s any assignment to a multiline case when 253s any assignment to a multiline unless else 253s any assignment to a multiline if else 253s behaves like multiline all assignment types offense 253s any assignment to a multiline unless else 253s any assignment to a multiline if else 253s any assignment to a multiline case when 253s behaves like all variable types 253s registers an offense assigning any variable type to unless else 253s registers an offense for assigning any variable type to case when 253s registers an offense assigning any variable type to if elsif else 253s registers an offense assigning any variable type to ternary 253s registers an offense assigning any variable type to if elsewith multiple assignment 253s registers an offense assigning any variable type to if else 253s does not crash for rescue assignment 253s allows assignment to if without else 253s >= Ruby 2.7 253s registers an offense for assigning any variable type to case in 253s behaves like all assignment types 253s registers an offense any assignment to case when 253s registers an offense for any assignment to unless else 253s registers an offense any assignment to if else 253s allows any assignment to if without else 253s registers an offense for any assignment to ternary 253s does not crash when used inside rescue 253s behaves like all assignment types 253s registers an offense any assignment to case when 253s registers an offense for any assignment to ternary 253s registers an offense for any assignment to unless else 253s registers an offense any assignment to if else 253s allows any assignment to if without else 253s does not crash when used inside rescue 253s behaves like all variable types 253s does not crash for rescue assignment 253s registers an offense assigning any variable type to if elsewith multiple assignment 253s registers an offense assigning any variable type to unless else 253s registers an offense for assigning any variable type to case when 253s registers an offense assigning any variable type to if elsif else 253s registers an offense assigning any variable type to if else 253s registers an offense assigning any variable type to ternary 253s allows assignment to if without else 253s >= Ruby 2.7 253s registers an offense for assigning any variable type to case in 253s behaves like all assignment types 253s registers an offense for any assignment to ternary 253s registers an offense for any assignment to unless else 253s does not crash when used inside rescue 253s registers an offense any assignment to case when 253s allows any assignment to if without else 253s registers an offense any assignment to if else 253s behaves like multiline all variable types offense 253s assigning any variable type to a multiline unless else 253s assigning any variable type to a multiline if else 253s assigning any variable type to a multiline case when 253s assigning any variable type to an if else with multiline in one branch 253s assigning any variable type to a multiline if elsif else 253s behaves like all assignment types 253s registers an offense any assignment to case when 253s registers an offense for any assignment to unless else 253s allows any assignment to if without else 253s does not crash when used inside rescue 253s registers an offense any assignment to if else 253s registers an offense for any assignment to ternary 253s behaves like all assignment types 253s registers an offense for any assignment to unless else 253s registers an offense for any assignment to ternary 253s registers an offense any assignment to case when 253s registers an offense any assignment to if else 253s allows any assignment to if without else 253s does not crash when used inside rescue 253s behaves like multiline all variable types offense 253s assigning any variable type to a multiline unless else 253s assigning any variable type to a multiline if else 253s assigning any variable type to a multiline case when 253s assigning any variable type to a multiline if elsif else 253s assigning any variable type to an if else with multiline in one branch 253s behaves like all assignment types 253s allows any assignment to if without else 253s registers an offense any assignment to if else 253s does not crash when used inside rescue 253s registers an offense for any assignment to ternary 253s registers an offense any assignment to case when 253s registers an offense for any assignment to unless else 253s behaves like multiline all assignment types offense 253s any assignment to a multiline if else 253s any assignment to a multiline case when 253s any assignment to a multiline unless else 253s behaves like multiline all assignment types offense 253s any assignment to a multiline case when 253s any assignment to a multiline if else 253s any assignment to a multiline unless else 253s behaves like multiline all assignment types offense 253s any assignment to a multiline case when 253s any assignment to a multiline unless else 253s any assignment to a multiline if else 253s behaves like all assignment types 253s registers an offense any assignment to if else 253s registers an offense any assignment to case when 253s allows any assignment to if without else 253s does not crash when used inside rescue 253s registers an offense for any assignment to ternary 253s registers an offense for any assignment to unless else 253s behaves like all variable types 253s registers an offense assigning any variable type to if elsif else 253s does not crash for rescue assignment 253s allows assignment to if without else 253s registers an offense assigning any variable type to ternary 253s registers an offense assigning any variable type to if else 253s registers an offense for assigning any variable type to case when 253s registers an offense assigning any variable type to unless else 253s registers an offense assigning any variable type to if elsewith multiple assignment 253s >= Ruby 2.7 253s registers an offense for assigning any variable type to case in 253s behaves like multiline all assignment types offense 253s any assignment to a multiline case when 253s any assignment to a multiline if else 253s any assignment to a multiline unless else 253s behaves like multiline all assignment types offense 253s any assignment to a multiline case when 253s any assignment to a multiline if else 253s any assignment to a multiline unless else 253s IncludeTernaryExpressions false 253s allows assigning any variable type to ternary 253s 253s RuboCop::Cop::Layout::LineLength 253s highlights excessive characters 253s registers an offense for a line that's 81 characters wide 253s accepts the first line if it is a shebang line 253s accepts a line that's 80 characters wide 253s registers an offense for long line before __END__ but not after 253s autocorrection 253s no breakable collections 253s adds an offense and does not autocorrect it 253s long blocks 253s braces 253s adds an offense and does correct it 253s Ruby 2.7 253s adds an offense for {} block does correct it 253s adds an offense for do-end block and does correct it 253s no spaces 253s adds an offense and does correct it 253s do/end 253s adds an offense for block with arguments and does correct it 253s adds an offense for block without arguments and does correct it 253s lambda syntax 253s when argument is enclosed in parentheses 253s registers an offense and corrects 253s when argument is not enclosed in parentheses 253s registers an offense and corrects 253s let block 253s adds an offense and does correct it 253s method call 253s when over limit 253s adds an offense and autocorrects it 253s when two method calls 253s adds an offense only to outer and autocorrects it 253s with a heredoc argument 253s does not break up the line when parentheses are omitted 253s does not break up the line when a heredoc is used as the first element of an array 253s does not break up the line 253s and the heredoc is after the line should split 253s can break up the line before the heredoc argument 253s and other arguments before the heredoc 253s can break up the line before the heredoc argument 253s with a hash with a too long first item 253s when parenthesized 253s corrects 253s when not parenthesized 253s when there are multiple elements 253s moves the 2nd element to a new line 253s when there is only one element 253s does not autocorrect 253s when on multiple lines 253s does not correct 253s when the hash is parenthesized 253s corrects 253s with long argument list 253s registers an offense and autocorrects it 253s when two together 253s does not add any offenses 253s when call with hash on same line 253s adds an offense only to outer and autocorrects it 253s when nested method calls allows outer to get broken up first 253s adds offense and does not autocorrect 253s when unparenthesized 253s when there is one argument 253s does not autocorrect 253s when there are multiple arguments 253s splits the line after the first element 253s when under limit 253s does not add any offenses 253s array 253s when has inside array 253s adds an offense only to outer and autocorrects it 253s when over limit 253s adds an offense and autocorrects it 253s when two arrays on two lines allows outer to get broken first 253s adds an offense only to inner and does not autocorrect it 253s when already on two lines 253s does not add any offenses 253s when under limit 253s does not add any offenses 253s comments 253s when over limit with semicolon 253s adds offense and does not autocorrect 253s semicolon 253s semicolon inside string literal 253s adds offense and autocorrects elsewhere 253s when over limit and many semicolons at the end 253s adds offense and does not autocorrectbefore the hash 253s when over limit and semicolon at end of line 253s adds offense and autocorrects it by breaking the first semicolonbefore the hash 253s when over limit and many spaces around semicolon 253s adds offense and autocorrects it by breaking the semicolonbefore the hash 253s when over limit and many semicolons 253s adds offense and autocorrects it by breaking the semicolonbefore the hash 253s when over limit 253s adds offense and autocorrects it by breaking the semicolonbefore the hash 253s semicolons inside string literal 253s adds offense and autocorrects elsewhere 253s when over limit and one semicolon at the end 253s adds offense and does not autocorrectbefore the hash 253s when under limit 254s does not add any offenses 254s multiple assignment 254s when over limit at right hand side 254s registers and corrects an offense 254s HEREDOC 254s when over limit with semicolon 254s adds offense and does not autocorrect 254s hash 254s when under limit 254s does not add any offenses 254s when over limit rocket symbol 254s adds an offense and autocorrects it 254s when over limit and keys already on multiple lines 254s adds an offense and does not autocorrect 254s when over limit 254s adds an offense and autocorrects it 254s when over limit and already on multiple lines long key 254s adds an offense and does not autocorrect 254s when over limit because of a comment 254s adds an offense and does not autocorrect 254s when over limit rocket 254s adds an offense and autocorrects it 254s when hash in method call 254s adds an offense only to outer and autocorrects it 254s when nested hashes on same line 254s adds an offense only to outer and autocorrects it 254s method definition 254s when under limit 254s does not add any offenses 254s when over limit 254s adds an offense and autocorrects it 254s when AllowURI option is enabled 254s and the URL does not have a http(s) scheme 254s rejects the line 254s and the scheme has been configured 254s does not register an offense 254s and the excessive characters include part of a URL in double quotes 254s does not include the quote as part of the offense 254s and the URL fits within the max allowed characters 254s registers an offense for the line 254s and an error other than URI::InvalidURIError is raised while validating a URI-ish string 254s does not crash 254s and the URI is an argument 254s does not register an offense 254s and the excessive characters include part of a URL and another word 254s registers an offense for the line 254s and the excessive characters include part of a URL in braces and another word 254s registers an offense for the line 254s and the excessive characters include a complete URL 254s registers an offense for the line 254s and all the excessive characters are part of a URL 254s accepts the line 254s and the URL is wrapped in single quotes 254s accepts the line 254s and the URL is wrapped in double quotes 254s accepts the line 254s and the URL is wrapped in braces 254s accepts the line 254s and the URL is wrapped in braces with title 254s accepts the line 254s and the URI is assigned 254s does not register an offense 254s and the excessive characters include part of a URL and trailing whitespace 254s registers an offense for the line 254s when AllowURI option is disabled 254s and all the excessive characters are part of a URL 254s registers an offense for the line 254s when IgnoreCopDirectives is disabled 254s and the source is too long and has a trailing cop directive 254s highlights the excess source and cop directive 254s and the source is acceptable length 254s with a trailing RuboCop directive 254s registers an offense for the line 254s with an inline comment 254s highlights the excess comment 254s affecting by IndentationWidth from Layout\Tab 254s without AllowURI option 254s behaves like with tabs indentation 254s accepts a line that's including 1 tab with size 2 and 28 other characters 254s registers an offense for a line that's including 2 tab with size 2 and 28 other characters 254s with AllowURI option 254s accepts a line that's including URI 254s accepts a line that's including URI in quotes with text 254s accepts a line that's including URI with text 254s accepts a line that's including URI and exceeds by 1 char 254s behaves like with tabs indentation 254s accepts a line that's including 1 tab with size 2 and 28 other characters 254s registers an offense for a line that's including 2 tab with size 2 and 28 other characters 254s when line is indented with tabs 254s accepts a short line 254s registers an offense for a long line 254s when AllowHeredoc option is enabled 254s accepts long lines in heredocs 254s and only certain heredoc delimiters are permitted 254s rejects long lines in heredocs with not permitted delimiters 254s when the source has no AST 254s does not crash 254s when IgnoreCopDirectives is enabled 254s and the Rubocop directive is excessively long 254s accepts the line 254s and the Rubocop directive causes an excessive line length 254s accepts the line 254s and has explanatory text 254s does not register an offense 254s and the source is too long 254s highlights only the non-directive part 254s and the source contains non-directive #s as non-comment 254s registers an offense for the line 254s and the source contains non-directive # as comment 254s highlights only the non-directive part 254s when AllowedPatterns option is set 254s only registers an offense for lines not matching the pattern 254s 254s RuboCop::Cop::Lint::PercentSymbolArray 254s detecting colons or commas in a %i/%I string 254s registers an offense and corrects when symbols contain colons and are comma separated 254s accepts likely false positive $, 254s accepts tokens without colons or commas 254s registers an offense and corrects when one symbol has a colon but there are no commas 254s registers an offense and corrects when there are no colons but one comma 254s registers an offense and corrects when there are no colons but one comma 254s registers an offense and corrects when symbols contain colons and are comma separated 254s accepts likely false positive $, 254s registers an offense and corrects when one symbol has a colon but there are no commas 254s accepts tokens without colons or commas 254s with binary encoded source 254s accepts if tokens contain no quotes 254s registers an offense and corrects when tokens contain quotes 254s 254s RuboCop::Cop::Lint::DuplicateMethods 254s doesn't register an offense for alias for gvar in module 254s registers an offense for duplicate nested method in class_eval block 254s does not register an offense for same method name defined in different methods 254s registers an offense for duplicate private methods in dynamic class 254s registers an offense when class << exp is used 254s recognizes difference between instance and class methods in class_eval block 254s registers an offense for duplicate class methods with `<<` and named receiver in class 254s accepts for attr_writer and getter in class_eval block 254s registers an offense for duplicate private methods in dynamic module 254s registers an offense for duplicate private self methods in class_eval block 254s registers an offense for duplicate nested method in self method of class 254s accepts for attr_reader and setter in module 254s does not register an offense for same method name defined in different methods 254s registers offenses for duplicate assignable attr in dynamic class 254s registers an offense when class << exp is used 254s only registers an offense for the second instance of a duplicate instance method in separate files 254s understands class << self 254s doesn't register an offense for different private methods in class 254s registers an offense for duplicate attr_writer in module 254s registers an offense for duplicate attr in class 254s registers an offense for duplicate attr_reader in module 254s doesn't register an offense for alias for gvar in class_eval block 254s registers offenses for duplicate assignable attr in class 254s doesn't register an offense for non-duplicate alias in dynamic class 254s understands class << self 254s doesn't register an offense for non-duplicate alias in class 254s understands class << A 254s registers an offense for duplicate class methods in dynamic module 254s registers an offense for duplicate attr_reader in class_eval block 254s registers an offense for duplicate alias in class_eval block 254s registers an offense for a duplicate instance method in separate module blocks 254s registers an offense for duplicate nested method in class 254s doesn't register an offense for different private methods in class_eval block 254s registers offenses for duplicate attr_accessor in module 254s doesn't register an offense for different private methods in module 254s accepts for non-duplicate alias_method in class 254s registers an offense for duplicate nested method in module 254s does not register an offense for same method name defined in different self methods 254s registers an offense for duplicate protected methods in class_eval block 254s accepts for attr_writer and getter in class 254s accepts for non-duplicate alias_method in class_eval block 254s registers an offense for duplicate alias_method in module 254s registers an offense for duplicate private self methods in dynamic module 254s does not register for the same method in different scopes within `class << self` 254s understands nested modules 254s doesn't register an offense for non-duplicate method in class 254s registers offenses for duplicate attr_accessor in class_eval block 254s only registers an offense for the second instance of a duplicate instance method in separate files 254s registers an offense for duplicate attr_reader in dynamic class 254s understands nested modules 254s registers an offense for duplicate class methods with named receiver in class 254s ignores Class.new blocks which are assigned to local variables 254s registers an offense for duplicate nested method in self method of module 254s does not register an offense for same method name defined in different self methods 254s properly registers and offense when deeply nested 254s only registers an offense for the second instance of a duplicate instance method in separate files 254s registers an offense for duplicate private self methods in class 254s recognizes difference between instance and class methods in dynamic module 254s accepts for attr_writer and getter in module 254s registers an offense for duplicate protected methods in module 254s does not register an offense for same method name defined in different self methods 254s doesn't register an offense for different private methods in dynamic class 254s understands class << self 254s recognizes difference between instance and class methods in dynamic class 254s only registers an offense for the second instance of a duplicate instance method in separate files 254s accepts for non-duplicate alias_method in dynamic module 254s registers an offense for duplicate attr_writer in dynamic module 254s registers an offense for duplicate private methods in module 254s doesn't register an offense for non-duplicate method in dynamic class 254s registers an offense for duplicate private methods in class_eval block 254s does not register an offense for same method name defined in different methods 254s accepts for attr_reader and setter in dynamic module 254s understands nested modules 254s doesn't register an offense for alias for gvar in dynamic module 254s does not register an offense for same method name defined in different methods 254s registers an offense for duplicate attr_reader in dynamic module 254s registers an offense for duplicate class methods with `self` and named receiver in module 254s doesn't register offense for non-duplicate class methods in class 254s registers an offense when class << exp is used 254s does not register an offense for same method name defined in different methods 254s registers offenses for duplicate assignable attr in module 254s doesn't register an offense for non-duplicate alias in dynamic module 254s doesn't register offense for non-duplicate class methods in class_eval block 254s registers an offense for duplicate private self methods in module 254s registers an offense for duplicate class methods in class 254s recognizes difference between instance and class methods in class 254s understands nested modules 254s registers offenses for duplicate attr_accessor in class 254s registers an offense when class << exp is used 254s accepts for non-duplicate alias_method in dynamic class 254s accepts for attr_writer and getter in dynamic module 254s doesn't register an offense for alias for gvar in dynamic class 254s registers an offense for a duplicate class method in separate dynamic module blocks 254s accepts for attr_reader and setter in class_eval block 254s doesn't register an offense for non-duplicate alias in module 254s registers an offense for duplicate attr_writer in dynamic class 254s registers an offense for a duplicate instance method in separate dynamic class blocks 254s understands class << self 254s registers an offense for duplicate alias in module 254s registers an offense for a duplicate class method in separate class blocks 254s registers an offense for duplicate alias_method in dynamic module 254s does not register an offense for same method name defined in different self methods 254s registers 2 offenses for pair of duplicate methods in dynamic class 254s registers an offense for duplicate nested method in self method of class_eval block 254s does not register an offense for same method name defined in different self methods 254s registers an offense for duplicate attr_writer in class_eval block 254s understands class << self 254s registers 2 offenses for pair of duplicate methods in class_eval block 254s registers an offense for duplicate nested method in self method of dynamic class 254s registers an offense for duplicate nested method in dynamic class 254s registers an offense for duplicate protected methods in dynamic module 254s understands nested modules 254s doesn't register an offense for different private methods in dynamic module 254s registers an offense for duplicate alias in dynamic class 254s registers an offense for duplicate private methods in class 254s registers an offense for duplicate attr in class_eval block 254s registers an offense for duplicate nested method in dynamic module 254s doesn't register an offense for non-duplicate method in dynamic module 254s registers an offense for a duplicate class method in separate class_eval block blocks 254s registers an offense for duplicate nested method in self method of dynamic module 254s registers an offense for duplicate class methods in dynamic class 254s registers an offense for duplicate class methods with `self` and named receiver in class 254s accepts for non-duplicate alias_method in module 254s registers an offense for duplicate alias in dynamic module 254s accepts for attr_reader and setter in class 254s registers an offense when class << exp is used 254s recognizes difference between instance and class methods in module 254s accepts for attr_reader and setter in dynamic class 254s registers an offense for a duplicate instance method in separate dynamic module blocks 254s doesn't register offense for non-duplicate class methods in dynamic class 254s registers an offense for duplicate method in dynamic class 254s registers an offense for a duplicate class method in separate dynamic class blocks 254s registers 2 offenses for pair of duplicate methods in class 254s registers offenses for duplicate attr_accessor in dynamic class 254s registers an offense for duplicate class methods with `<<` and named receiver in module 254s registers an offense for duplicate protected methods in dynamic class 254s registers an offense for duplicate method in class_eval block 254s doesn't register an offense for non-duplicate method in class_eval block 254s registers an offense for duplicate private self methods in dynamic class 254s registers an offense for duplicate class methods in module 254s registers an offense for duplicate method in module 254s ignores method definitions in RSpec `describe` blocks 254s registers an offense for a duplicate instance method in separate class blocks 254s registers an offense for duplicate alias_method in class_eval block 254s registers 2 offenses for pair of duplicate methods in module 254s handles class_eval with implicit receiver 254s registers an offense for duplicate alias_method in dynamic class 254s registers an offense for duplicate class methods with named receiver in module 254s registers an offense for duplicate attr_writer in class 254s registers an offense for a duplicate class method in separate module blocks 254s registers an offense for duplicate attr in dynamic module 254s doesn't register an offense for non-duplicate alias in class_eval block 254s doesn't register an offense for non-duplicate method in module 254s registers offenses for duplicate attr_accessor in dynamic module 254s registers an offense for duplicate protected methods in class 254s registers an offense for duplicate alias_method in class 254s registers 2 offenses for pair of duplicate methods in dynamic module 254s registers an offense for duplicate attr in dynamic class 254s doesn't register offense for non-duplicate class methods in module 254s registers an offense for duplicate method in class 254s registers an offense for duplicate attr_reader in class 254s registers an offense for duplicate attr in module 254s doesn't register offense for non-duplicate class methods in dynamic module 254s doesn't register an offense for alias for gvar in class 254s registers an offense for a duplicate instance method in separate class_eval block blocks 254s registers an offense for duplicate alias in class 254s only registers an offense for the second instance of a duplicate instance method in separate files 254s accepts for attr_writer and getter in dynamic class 254s registers offenses for duplicate assignable attr in dynamic module 254s registers an offense for duplicate methods at top level 254s registers an offense for duplicate class methods in class_eval block 254s registers offenses for duplicate assignable attr in class_eval block 254s registers an offense for duplicate method in dynamic module 254s when path is not in the project root 254s adds a message with absolute path 254s when path is in the project root 254s adds a message with relative path 254s 254s RuboCop::Cop::Style::RedundantFreeze 254s allows .freeze on method call 254s behaves like mutable objects 254s allows ::ENV['foo'] with freeze 254s when the receiver is a string literal 254s Ruby 2.7 or lower 254s when the frozen string literal comment is true 254s behaves like immutable objects 254s registers an offense for frozen "#{a}" 254s when the frozen string literal comment is false 254s behaves like mutable objects 254s allows "#{a}" with freeze 254s when the frozen string literal comment is missing 254s behaves like mutable objects 254s allows "#{a}" with freeze 254s Ruby 3.0 or higher 254s when the frozen string literal comment is missing 254s behaves like mutable objects 254s allows "#{a}" with freeze 254s when the frozen string literal comment is true 254s behaves like mutable objects 254s allows "#{a}" with freeze 254s when the frozen string literal comment is false 254s behaves like mutable objects 254s allows "#{a}" with freeze 254s Regexp and Range literals 254s Ruby 2.7 or lower 254s behaves like mutable objects 254s allows (1...5) with freeze 254s behaves like mutable objects 254s allows (1..5) with freeze 254s behaves like mutable objects 254s allows /./ with freeze 254s Ruby 3.0 or higher 254s behaves like immutable objects 254s registers an offense for frozen /./ 254s behaves like immutable objects 254s registers an offense for frozen (1..5) 254s behaves like immutable objects 254s registers an offense for frozen (1...5) 254s behaves like mutable objects 254s allows ('a' + 'b') with freeze 254s behaves like immutable objects 254s registers an offense for frozen (2 > 1) 254s behaves like immutable objects 254s registers an offense for frozen :sym 254s behaves like immutable objects 254s registers an offense for frozen :"" 254s behaves like mutable objects 254s allows [1, 2, 3] with freeze 254s behaves like mutable objects 254s allows (a + b) with freeze 254s behaves like immutable objects 254s registers an offense for frozen [1, 2, 3].size 254s behaves like mutable objects 254s allows 'str' with freeze 254s behaves like immutable objects 254s registers an offense for frozen 'foo'.count 254s behaves like mutable objects 254s allows ([42] * 42) with freeze 254s behaves like mutable objects 254s allows ENV['foo'] with freeze 254s behaves like immutable objects 254s registers an offense for frozen 1.5 254s behaves like immutable objects 254s registers an offense for frozen (a > b) 254s behaves like mutable objects 254s allows ('a' * 20) with freeze 254s behaves like immutable objects 254s registers an offense for frozen ('a' > 'b') 254s behaves like immutable objects 254s registers an offense for frozen (1 + 2) 254s behaves like immutable objects 254s registers an offense for frozen 1 254s behaves like mutable objects 254s allows { a: 1, b: 2 } with freeze 254s behaves like mutable objects 254s allows "top#{1 + 2}" with freeze 254s 254s RuboCop::Cop::Style::RedundantArgument 254s registers an offense and corrects when method called without parenthesis on literals 254s does not register an offense when method called with no arguments 254s registers an offense and corrects when method called without parenthesis on variable 254s registers an offense and corrects when method called on literals 254s registers an offense and corrects when method called on variable 254s does not register an offense when method called with more than one arguments 254s does not register an offense when method called with different argument 254s works with double-quoted strings when configuration is single-quotes 254s does not register an offense when method called with no receiver 254s non-builtin method 254s does not register an offense with other argument 254s registers an offense and corrects with configured argument 254s 254s RuboCop::Cop::Layout::ClosingHeredocIndentation 254s accepts correctly indented closing heredoc when heredoc contents is after closing heredoc 254s accepts correctly indented closing heredoc 254s does not register an offense for correctly indented empty heredocs 254s accepts correctly indented closing heredoc when heredoc contents with blank line 254s accepts correctly indented closing heredoc when aligned at the beginning of method definition 254s does not register an offense for a << heredoc 254s accepts correctly indented closing heredoc when aligned at the beginning of method definition and using `strip_indent` 254s registers an offense for incorrectly indented empty heredocs 254s accepts correctly indented closing heredoc when heredoc contents is before closing heredoc 254s accepts correctly indented closing heredoc when aligned at the beginning of method definition and content is empty 254s registers an offense for bad indentation of a closing heredoc 254s 254s RuboCop::Cop::Layout::MultilineMethodParameterLineBreaks 254s when two parameters are on next line 254s does not add any offenses 254s when there are multiple parameters on the first line 254s registers an offense and corrects starting from the 2nd argument 254s when there are no parameters 254s does not add any offenses 254s when many parameters including hash are on multiple lines, three on same line 254s registers an offense and corrects 254s when parameter's default value starts on same line but ends on different line 254s registers an offense and corrects 254s when many parameter are on multiple lines, two on same line 254s registers an offense and corrects 254s when one parameter on same line 254s does not add any offenses 254s when many parameters are on multiple lines, three on same line 254s registers an offense and corrects 254s when second parameter starts on same line as end of first 255s registers an offense and corrects 255s 255s RuboCop::Cop::Style::TrailingBodyOnClass 255s accepts regular class 255s registers an offense when body trails after class definition 255s registers offense with multi-line class 255s accepts class inheritance 255s autocorrects with comment after body 255s when class is not on first line of processed_source 255s autocorrect offense 255s 255s RuboCop::Cop::Style::HashTransformValues 255s when using Ruby 2.6 or newer 255s does not flag `_.to_h{...}` when its receiver is `with_index` 255s register and corrects an offense _.to_h{...} when value is a hash literal and is enclosed in braces 255s does not flag `_.to_h{...}` when its receiver is `zip` 255s register and corrects an offense _.to_h{...} when value is a hash literal and is not enclosed in braces 255s does not flag `_.to_h{...}` when both key & value are transformed 255s does not flag `_.to_h{...}` when its receiver is an array literal 255s does not flag `_.to_h{...}` when its receiver is `each_with_index` 255s flags _.to_h{...} when transform_values could be used 255s does not flag _.to_h {...} when value block argument is unused 255s when using Ruby 2.4 or newer 255s does not flag `each_with_object` when its receiver is `with_index` 255s does not flag `_.map{...}.to_h` when its receiver is `zip` 255s does not flag `each_with_object` when its receiver is `each_with_index` 255s does not flag each_with_object when value transformation uses key 255s does not flag `_.map{...}.to_h` when its receiver is `each_with_index` 255s does not flag each_with_object when both key & value are transformed 255s does not flag `each_with_object` when its receiver is `zip` 255s does not flag `each_with_object` when its argument is used in the value 255s flags Hash[_.map{...}] when transform_values could be used 255s does not flag `_.map{...}.to_h` when its receiver is `with_index` 255s does not flag _.map {...}.to_h when value block argument is unused 255s does not flag value transformation when receiver is array literal 255s does not flag _.map{...}.to_h when both key & value are transformed 255s does not flag `Hash[_.map{...}]` when its receiver is `each_with_index` 255s does not flag each_with_object when receiver is array literal 255s flags _.map {...}.to_h when transform_values could be used 255s does not flag each_with_object when no transformation occurs 255s correctly autocorrects _.map{...}.to_h with block 255s does not flag `Hash[_.map{...}]` when its receiver is `zip` 255s does not flag each_with_object when its argument is not modified 255s does not flag Hash[_.map{...}] when both key & value are transformed 255s does not flag value transformation in the absence of to_h 255s does not flag `Hash[_.map{...}]` when its receiver is `with_index` 255s does not flag `Hash[_.map{...}]` when its receiver is an array literal 255s flags _.map {...}.to_h when transform_values could be used when wrapped in another block 255s flags _.map {...}.to_h when transform_values could be used when line break before `to_h` 255s with safe navigation operator 255s flags each_with_object when transform_values could be used 255s with multiline block 255s flags each_with_object when transform_values could be used 255s with inline block 255s flags each_with_object when transform_values could be used 255s below Ruby 2.4 255s does not flag even if transform_values could be used 255s below Ruby 2.6 255s does not flag _.to_h{...} 255s 255s RuboCop::Cop::Style::CollectionCompact 255s registers an offense and corrects when using `reject` and receiver is a variable 255s registers an offense and corrects when using `select/select!` to reject nils 255s does not register an offense when using `reject` to not to rejecting nils 255s does not register an offense when using `compact/compact!` 255s registers an offense and corrects when using `reject` on hash to reject nils 255s registers an offense and corrects when using `reject` on array to reject nils 255s registers an offense and corrects when using `reject` with block pass arg and no parentheses 255s registers an offense and corrects when using `reject` with block pass arg on array to reject nils 255s Ruby <= 3.0 255s does not register an offense and corrects when using `lazy.reject` on array to reject nils 255s does not register an offense and corrects when using `to_enum.reject` on array to reject nils 255s Ruby >= 3.1 255s registers an offense and corrects when using `lazy.reject` on array to reject nils 255s registers an offense and corrects when using `to_enum.reject` on array to reject nils 255s when without receiver 255s does not register an offense and corrects when using `select/select!` to reject nils 255s does not register an offense and corrects when using `reject` on array to reject nils 255s 255s RuboCop::Cop::Style::NumberedParameters 255s >= Ruby 2.7 255s EnforcedStyle: disallow 255s does an offense when using numbered parameters even with single-line blocks 255s EnforcedStyle: allow_single_line 255s registers an offense when using numbered parameters with multi-line blocks 255s does not register an offense when using numbered parameters with single-line blocks 255s 255s RuboCop::Cop::Gemspec::DeprecatedAttributeAssignment 255s behaves like deprecated attributes 255s does not register an offense when using `rubygems_version =` and receiver is not `Gem::Specification.new` block variable 255s registers and corrects an offense when using `s.rubygems_version =` 255s registers and corrects an offense when using `spec.rubygems_version =` 255s does not register an offense when using `s.rubygems_version =` outside `Gem::Specification.new` 255s behaves like deprecated attributes 255s registers and corrects an offense when using `spec.rubygems_version =` 255s does not register an offense when using `rubygems_version =` and receiver is not `Gem::Specification.new` block variable 255s does not register an offense when using `s.rubygems_version =` outside `Gem::Specification.new` 255s registers and corrects an offense when using `s.rubygems_version =` 255s behaves like deprecated attributes 255s registers and corrects an offense when using `spec.rubygems_version =` 255s registers and corrects an offense when using `s.rubygems_version =` 255s does not register an offense when using `s.rubygems_version =` outside `Gem::Specification.new` 255s does not register an offense when using `rubygems_version =` and receiver is not `Gem::Specification.new` block variable 255s behaves like deprecated attributes 255s does not register an offense when using `s.rubygems_version =` outside `Gem::Specification.new` 255s registers and corrects an offense when using `s.rubygems_version =` 255s registers and corrects an offense when using `spec.rubygems_version =` 255s does not register an offense when using `rubygems_version =` and receiver is not `Gem::Specification.new` block variable 255s behaves like deprecated attributes with addition 255s registers and corrects an offense when using `s.rubygems_version +=` 255s registers and corrects an offense when using `spec.rubygems_version +=` 255s 255s RuboCop::Cop::Style::PercentLiteralDelimiters 255s `%r` interpolated regular expression 255s registers an offense for other delimiters when containing preferred delimiter characters in interpolation 255s does not register an offense for preferred delimiters 255s does not register an offense for other delimiters when containing preferred delimiter characters 255s registers an offense for a regular expression with option 255s registers an offense for other delimiters 255s `%i` symbol array 255s does not register an offense for preferred delimiters 255s does not register an offense for non-preferred delimiters enclosing escaped delimiters 255s registers an offense for other delimiters 255s `%w` string array 255s does not register an offense for preferred delimiters with a pairing delimiters 255s does not register an offense for preferred delimiters with only a closing delimiter 255s registers an offense for other delimiters 255s does not register an offense for other delimiters when containing preferred delimiter characters 255s does not register an offense for preferred delimiters 255s does not register an offense for preferred delimiters with not a pairing delimiter 255s autocorrect 255s preserves irregular indentation when correcting a multiline array 255s fixes a string array in a scope 255s preserves indentation when correcting a multiline array 255s preserves line breaks when fixing a multiline array 255s behaves like escape characters 255s corrects %i with \t in it 255s corrects %i with \n in it 255s behaves like escape characters 255s corrects %q with \t in it 255s corrects %q with \n in it 255s behaves like escape characters 255s corrects %r with \t in it 255s corrects %r with \n in it 255s behaves like escape characters 255s corrects %w with \t in it 255s corrects %w with \n in it 255s behaves like escape characters 255s corrects %s with \n in it 255s corrects %s with \t in it 255s behaves like escape characters 255s corrects % with \n in it 255s corrects % with \t in it 255s behaves like escape characters 255s corrects %x with \t in it 255s corrects %x with \n in it 255s behaves like escape characters 255s corrects %Q with \t in it 255s corrects %Q with \n in it 255s behaves like escape characters 255s corrects %W with \t in it 255s corrects %W with \n in it 255s `%x` interpolated system call 255s does not register an offense for other delimiters when containing preferred delimiter characters 255s registers an offense for other delimiters when containing preferred delimiter characters in interpolation 255s registers an offense for other delimiters 255s does not register an offense for preferred delimiters 255s `%Q` interpolated string 255s registers an offense for other delimiters when containing preferred delimiter characters in interpolation 255s registers an offense for other delimiters 255s does not register an offense for other delimiters when containing preferred delimiter characters 255s does not register an offense for preferred delimiters 255s `%I` interpolated symbol array 255s registers an offense for other delimiters when containing preferred delimiter characters in interpolation 255s registers an offense for other delimiters 255s does not register an offense for preferred delimiters 255s `%W` interpolated string array 255s does not register an offense for other delimiters when containing preferred delimiter characters 255s registers an offense for other delimiters when containing preferred delimiter characters in interpolation 255s does not register an offense for preferred delimiters 255s registers an offense for other delimiters 255s `default` override 255s allows all preferred delimiters to be set with one key 255s allows individual preferred delimiters to override `default` 255s `%s` symbol 255s does not register an offense for preferred delimiters 255s registers an offense for other delimiters 255s invalid cop config 255s raises an error when invalid configuration is specified 255s `%q` string 255s does not register an offense for preferred delimiters 255s does not register an offense for other delimiters when containing preferred delimiter characters 255s registers an offense for other delimiters 255s `%` interpolated string 255s does not register an offense for preferred delimiters 255s registers an offense for other delimiters 255s registers an offense for other delimiters when containing preferred delimiter characters in interpolation 255s registers an offense when the source contains invalid characters 255s does not register an offense for other delimiters when containing preferred delimiter characters 255s registers an offense for a string with no content 255s 255s RuboCop::Cop::Style::CaseLikeIf 255s does not register an offense when using `match?` without a receiver 255s registers an offense and corrects when using `==` with constant 255s registers an offense and corrects when target is a method call 255s registers an offense and corrects when using `=~` 255s does not register an offense when an object overrides `equal?` with no arity 255s does not register an offense when using ternary operator 255s registers an offense and corrects when using `match?` with non regexp in other branches except first 255s does not register an offense when only `if-else` 255s registers an offense and corrects when using `||` within conditions 255s does not register an offense when one of the branches contains `==` with class reference 255s registers an offense and corrects when using `is_a?` 255s does not register an offense when using `==` with method call with arguments 255s does not register an offense when one of `||` subconditions is not convertible 255s does not register an offense when using `==` with constant containing 1 letter in name 255s does not register an offense when using `include?` without a receiver 255s does not register an offense when using `==` with class reference 255s does not register an offense when not all conditions contain target 255s registers an offense and corrects when using `==` with literal 255s does not register an offense when using `match?` in first branch with non regexp 255s does not register an offense when only single `if` 255s does not register an offense when using `equal?` without a receiver 255s does not register an offense when using modifier `if` 255s does not register an offense when using `unless` 255s registers an offense and corrects when using nested conditions with `||` 255s does not register an offense when using `=~` in first branch with non regexp 255s does not register an offense when using `cover?` without a receiver 255s does not register an offense when using `match?` with non regexp 255s registers an offense and corrects when using `include?` with range 255s registers an offense and corrects when using `match?` with regexp 255s registers an offense and corrects when using `===` 255s when using regexp with named captures 255s registers and corrects an offense with =~ and regexp on rhs 255s does not register an offense with =~ and regexp on lhs 255s registers and corrects an offense with match? and regexp on lhs 255s does not register an offense with match and regexp on lhs 255s registers and corrects an offense with match? and regexp on rhs 255s does not register an offense with match and regexp on rhs 255s 255s RuboCop::Cop::Style::Dir 255s when using `#dirname` and `#realpath` 255s registers an offense with ::File 255s registers an offense 255s when using `#expand_path` and `#dirname` 255s registers an offense with ::File 255s registers an offense 255s 255s RuboCop::TargetRuby 255s when TargetRubyVersion is not set 255s when .ruby-version is present 255s does not read .tool-versions, Gemfile.lock or gems.locked 255s when the MRI version contains multiple digits 255s reads it to determine the target ruby version 255s when .ruby-version contains a Rbx version 255s uses the default target ruby version 255s when .ruby-version contains a version prefixed by "ruby-" 255s correctly determines the target ruby version 255s when .ruby-version contains an MRI version 255s reads it to determine the target ruby version 255s when .ruby-version contains a JRuby version 255s uses the default target ruby version 255s when .ruby-version contains "system" version 255s uses the default target ruby version 255s when .ruby-version is in a parent directory 255s reads it to determine the target ruby version 255s when .tool-versions is present 255s when .tool-versions does not contain a ruby version 255s uses the default ruby version 255s when .tool-versions contains a ruby version 255s reads it to determine the target ruby version 255s does not read Gemfile.lock, gems.locked 255s when .ruby-version is not in a parent directory 255s when Gemfile.lock is in a parent directory 255s does 255s when gems.locked is in a parent directory 255s does 255s when .ruby-version is not present 255s when bundler lock files are not present 255s uses the default target ruby version 255s and Gemfile.lock exists 255s uses MRI Ruby version when it has multiple digits 255s uses the default Ruby when rbx is in Gemfile.lock 255s uses MRI Ruby version when it is present in Gemfile.lock 255s uses the default Ruby when jruby is in Gemfile.lock 255s uses the default Ruby when Ruby is not in Gemfile.lock 255s and gems.locked exists 255s uses the default Ruby when rbx is in gems.locked 255s uses the default Ruby when Ruby is not in gems.locked 255s uses the default Ruby when jruby is in gems.locked 255s uses MRI Ruby version when it has multiple digits 255s uses MRI Ruby version when it is present in gems.locked 255s gemspec file 255s when file contains `required_ruby_version` as a string 255s sets target_ruby from approximate version 255s sets target_ruby from inclusive range 255s sets target_ruby from exclusive range 255s when file contains `required_ruby_version` as a requirement 255s sets first known ruby version that satisfies requirement 255s sets target_ruby from required_ruby_version from inclusive requirement range 255s when file contains `required_ruby_version` as an array 255s sets target_ruby from required_ruby_version with many requirements 255s sets target_ruby to the minimal version satisfying the requirements 255s when file does not contain `required_ruby_version` 255s sets default target_ruby 255s when TargetRubyVersion is set 255s does not read Gemfile.lock or gems.locked 255s uses TargetRubyVersion 255s does not read .ruby-version 255s 255s RuboCop::Cop::InternalAffairs::InheritDeprecatedCopClass 255s does not register an offense when using `Base` 255s registers an offense when using `Cop` 255s does not register an offense when not inherited super class 255s registers an offense when using `RuboCop::Cop::Cop` 255s 255s RuboCop::Cop::Style::TrailingCommaInArguments 255s with single line list of values 255s when EnforcedStyleForMultiline is no_comma 255s registers an offense for trailing comma in a method call 255s registers an offense for trailing comma preceded by whitespace in a method call 255s accepts heredoc without trailing comma 255s accepts method call without parameters 255s accepts chained single-line method calls 255s accepts method call without trailing comma 255s accepts method call without trailing comma with single element hash parameters at the end 255s accepts method call without trailing comma when a line break before a method call 255s registers an offense for trailing comma in a method call with hash parameters at the end 255s when using safe navigation operator 255s registers an offense for trailing comma in a method call 255s registers an offense for trailing comma in a method call with hash parameters at the end 255s when EnforcedStyleForMultiline is consistent_comma 255s accepts method call without trailing comma when a line break before a method call 255s accepts chained single-line method calls 255s accepts method call without trailing comma with single element hash parameters at the end 255s accepts method call without parameters 255s accepts method call without trailing comma 255s registers an offense for trailing comma in a method call with hash parameters at the end 255s accepts heredoc without trailing comma 255s registers an offense for trailing comma preceded by whitespace in a method call 255s registers an offense for trailing comma in a method call 255s when using safe navigation operator 255s registers an offense for trailing comma in a method call with hash parameters at the end 255s registers an offense for trailing comma in a method call 255s when EnforcedStyleForMultiline is comma 255s registers an offense for trailing comma in a method call 255s registers an offense for trailing comma preceded by whitespace in a method call 255s accepts method call without trailing comma when a line break before a method call 255s registers an offense for trailing comma in a method call with hash parameters at the end 255s accepts chained single-line method calls 255s accepts method call without trailing comma 255s accepts method call without trailing comma with single element hash parameters at the end 255s accepts heredoc without trailing comma 255s accepts method call without parameters 255s when using safe navigation operator 255s registers an offense for trailing comma in a method call with hash parameters at the end 255s registers an offense for trailing comma in a method call 255s with multi-line list of values 255s when EnforcedStyleForMultiline is comma 255s accepts a multiline call with a single argument and trailing comma 255s accepts missing comma after heredoc with comments 255s accepts no trailing comma in a method call with a multiline braceless hash at the end with more than one parameter on a line 255s accepts trailing comma in a method call with hash parameters at the end 255s accepts an empty hash being passed as a method argument 255s registers an offense for no trailing comma in a method call with hash parameters at the end 255s accepts a method call with two parameters on the same line 255s does not break when a safe method call is chained on the offending more complex one 255s accepts a trailing comma in a method call with single line hashes 255s does not break when a safe method call is chained on the offending simple one 255s does not break when a method call is chained on the offending one 255s when closing bracket is on same line as last value 255s accepts a method call with Hash as last parameter split on multiple lines 255s when EnforcedStyleForMultiline is no_comma 255s accepts comma inside a heredoc in brackets 255s accepts comma inside a modified heredoc parameter 255s accepts comma inside a heredoc with method and comments inside 255s accepts comma inside a heredoc with comments inside 255s accepts a method call with hash parameters at the end and no trailing comma 255s registers an offense for trailing comma in a method call with hash parameters at the end 255s accepts comma inside a heredoc parameter at the end 255s autocorrects unwanted comma after modified heredoc parameter 255s when there is string interpolation inside heredoc parameter 255s accepts comma inside a heredoc parameter 255s accepts comma inside a heredoc parameter when on a single line 255s autocorrects unwanted comma inside string interpolation 255s when EnforcedStyleForMultiline is consistent_comma 255s accepts no trailing comma in a method call with a block parameter at the end 255s accepts a multiline call with a single argument and trailing comma 255s accepts a multiline call with arguments on a single line and trailing comma 255s accepts a trailing comma in a method call with a single hash parameter 255s accepts a multiline call with single argument on multiple lines 255s accepts a trailing comma in a method call with a single hash parameter to a receiver object 255s registers an offense for no trailing comma in a method call withtwo parameters on the same line 255s accepts trailing comma in a method call with hash parameters at the end 255s accepts a trailing comma in a method call with single line hashes 255s autocorrects missing comma after a heredoc 255s registers an offense for no trailing comma in a method call with hash parameters at the end 255s when closing bracket is on same line as last value 255s registers an offense for a method call, with a Hash as the last parameter, split on multiple lines 255s with a single argument of anonymous function spanning multiple lines 255s when EnforcedStyleForMultiline is consistent_comma 255s accepts a single argument with no trailing comma 255s with a single argument spanning multiple lines 255s when EnforcedStyleForMultiline is consistent_comma 255s accepts a single argument with no trailing comma 255s 255s RuboCop::Cop::Security::MarshalLoad 255s registers an offense for using Marshal.restore 255s allows using dangerous Marshal methods for deep cloning 255s does not register an offense Marshal methods under another namespace 255s does not register an offense for Marshal.dump 255s registers an offense for using Marshal.load 255s 255s RuboCop::Cop::Lint::FloatOutOfRange 255s does not register an offense for respectably sized floats 255s does not register an offense for 0.0 255s does not register an offense for tiny little itty bitty floats 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::Lint::UnusedBlockArgument 255s when IgnoreEmptyBlocks config parameter is set 255s accepts an empty block with a single unused parameter 256s accepts an empty block with multiple unused parameters 256s registers an offense for a non-empty block with an unused parameter 256s registers an offense for a non-empty block with multiple unused args 256s inspection 256s when a block takes multiple arguments 256s and a splat argument is unused 256s registers an offense and preserves splat 256s and arguments are swap-assigned 256s accepts 256s and all arguments are used 256s accepts 256s and all the arguments are unused 256s registers offenses and suggests omitting them 256s and unused arguments span multiple lines 256s registers offenses and suggests omitting them 256s and an argument is unused 256s registers an offense 256s and one argument is assigned to another, whilst other's value is not used 256s registers an offense 256s and an argument with default value is unused 256s registers an offense and preserves default value 256s with an empty block 256s when not configured to ignore empty blocks 256s registers an offense 256s when configured to ignore empty blocks 256s does not register an offense 256s in a method calling `binding` with arguments 256s when a method argument is unused 256s registers an offense 256s when a block takes single argument 256s and the argument is unused 256s registers an offense and suggests omitting that 256s and the method call is `define_method` 256s registers an offense 256s in a method calling `binding` without arguments 256s accepts all arguments 256s inside a method definition 256s registers offenses 256s when a method argument is not used 256s does not care 256s when a lambda block takes arguments 256s and all the arguments are unused 256s registers offenses and suggests using a proc 256s and an argument is unused 256s registers an offense 256s when an optional keyword argument is unused 256s when the method call is not `define_method` 256s registers an offense 256s when AllowUnusedKeywordArguments set 256s does not care 256s when the method call is `define_method` 256s registers an offense 256s when AllowUnusedKeywordArguments set 256s does not care 256s when a block have a block local variable 256s and the variable is used 256s does not register offense 256s and the variable is unused 256s registers an offense 256s when an underscore-prefixed block argument is not used 256s accepts 256s when a variable is not used 256s does not care 256s 256s RuboCop::Cop::Style::FetchEnvVar 256s registers an offense with using an `ENV` at multiple `if` condition in the body 256s registers an offense when using `ENV && x` that is different from `if` condition in the body 256s registers an offense when using `ENV || x` that is different from `if` condition in the body 256s registers an offense when using an `ENV` at `if` condition in the body 256s when using `fetch` instead of `[]` 256s registers no offenses 256s when it is used in a conditional expression 256s registers an offense with `case` 256s registers no offenses when using the same `ENV` var as `if` condition in the body 256s registers an offense with using an `ENV` var as `if` condition in the body with assignment method 256s registers no offenses when using the same `ENV` var as `if` condition in the body with predicate method 256s registers no offenses with ternary operator 256s registers no offenses with `if` 256s registers no offenses when using the same `ENV` var as `if` condition in the body with operator 256s registers no offenses with `unless` 256s registers an offense when using an `ENV` var that is different from `if` condition in the body 256s registers no offenses when using the same `ENV` var as `if` condition in the body with other conditions 256s registers no offenses when using the same `ENV` var as `if` condition in the body with assignment method 256s when it is evaluated with no default values 256s registers an offense 256s when it is a hash key 256s registers an offense 256s when it is compared `==` with other object 256s does not register an offense 256s when the env val is excluded from the inspection by the config 256s registers no offenses 256s when `ENV[]` is the right end of `||` chains 256s registers an offense 256s with negation 256s registers no offenses 256s when it receives a message with safe navigation 256s registers no offenses 256s when it is an array element 256s registers an offense 256s when it is compared `!=` with other object 256s does not register an offense 256s when it is used in an interpolation 256s registers an offense 256s when it receives a message 256s registers no offenses 256s when the node is a assigned by `||=` 256s registers an offense 256s when the node is a receiver of `&&=` 256s does not register an offense 256s when it is an argument of a method 256s registers an offense 256s when it is a hash value 256s registers an offense 256s when it is assigned to a variable 256s registers an offense when using single assignment 256s registers an offense when using multiple assignment 256s when `ENV[]` is the LHS of `||` 256s registers no offenses 256s when the node is a receiver of `||=` 256s does not register an offense 256s when the node is a assigned by `&&=` 256s registers an offense 256s 256s RuboCop::Cop::Lint::DeprecatedClassMethods 256s prefer `Addrinfo#getnameinfo` over `Socket.gethostbyaddr` 256s does not register an offense for method `gethostbyaddr` on other receivers 256s registers an offense for ::Socket.gethostbyaddr 256s registers an offense for Socket.gethostbyaddr 256s prefer `Addrinfo#getaddrinfo` over `Socket.gethostbyname` 256s does not register an offense for method `gethostbyname` on other receivers 256s registers an offense for Socket.gethostbyname 256s registers an offense for ::Socket.gethostbyname 256s when using `ENV.dup` 256s does not register an offense for method calls to `ENV` other than `dup` 256s registers an offense 256s when using `ENV.clone` 256s registers an offense 256s does not register an offense for method calls to `ENV` other than `clone` 256s prefer `File.exist?` over `File.exists?` 256s does not register an offense for File.exist? 256s registers an offense and corrects File.exists? 256s registers an offense and corrects ::File.exists? 256s when using `ENV.freeze` 256s registers an offense 256s does not register an offense for method calls to `ENV` other than `freeze` 256s prefer `Dir.exist?` over `Dir.exists?` 256s registers an offense and corrects Dir.exists? 256s registers an offense and corrects ::Dir.exists? 256s does not register an offense for Dir.exist? 256s does not register an offense for offensive method `exists?`on other receivers 256s prefer `block_given?` over `iterator?` 256s does not register an offense for offensive method `iterator?`on other receivers 256s registers an offense and corrects iterator? 256s does not register an offense for block_given? 256s 256s RuboCop::Cop::Style::RedundantReturn 256s does not blow up on empty method body 256s reports an offense for def with only a return 256s does not blow up on empty if body 256s reports an offense for def ending with return with splat argument 256s reports an offense for defs ending with return 256s accepts return in a non-final position 256s autocorrects by removing redundant returns 256s reports an offense for def ending with return 256s reports an offense for defs with only a return 256s when rescue and return blocks present 256s registers an offense and autocorrects when rescue has else clause 256s registers an offense and autocorrects when inside function or rescue block 256s when return is inside a when-branch 256s registers an offense and autocorrects 256s when return has no arguments 256s behaves like common behavior 256s registers an offense for return() and autocorrects replacing return() with nil 256s behaves like common behavior 256s registers an offense for return and autocorrects replacing return with nil 256s when return is inside begin-end body 256s registers an offense and autocorrects 256s when return is inside an if-branch 256s registers an offense and autocorrects 256s when multi-value returns are allowed 256s accepts defs ending with return 256s accepts defs with only a return 256s accepts def with only a return 256s accepts def ending with return 256s when multi-value returns are not allowed 256s reports an offense for defs with only a return 256s autocorrects by removing return when using an explicit hash 256s reports an offense for def ending with return 256s autocorrects by making an implicit hash explicit 256s reports an offense for defs ending with return 256s reports an offense when multiple return values have a parenthesized return value 256s reports an offense for def with only a return 256s when case nodes are empty 256s accepts empty when nodes 256s 256s RuboCop::Cop::Naming::VariableNumber 256s when AllowedIdentifiers is set 256s does not register an offense for a symbol that is allowed 256s does not register an offense for a class variable name that is allowed 256s does not register an offense for a global variable name that is allowed 256s does not register an offense for a instance variable name that is allowed 256s does not register an offense for a method name that is allowed 256s does not register an offense for a local variable name that is allowed 256s when AllowedPatterns is set 256s registers an offense for a global variable name that does not match an allowed pattern 256s registers an offense for a instance variable name that does not match an allowed pattern 256s does not register an offense for a global variable name that matches an allowed pattern 256s registers an offense for a local variable name that does not match an allowed pattern 256s does not register an offense for a local variable name that matches an allowed pattern 256s registers an offense for a symbol that does not match an allowed pattern 256s registers an offense for a method name that does not match an allowed pattern 256s registers an offense for a class variable name that does not match an allowed pattern 256s does not register an offense for a instance variable name that matches an allowed pattern 256s does not register an offense for a method name that matches an allowed pattern 256s does not register an offense for a symbol that matches an allowed pattern 256s does not register an offense for a class variable name that matches an allowed pattern 256s when configured for normal 256s registers an offense for snake case numbering in symbol 256s registers an offense for snake case numbering in method camel case parameter 256s registers an offense for snake case numbering in method parameter 256s does not register an offense for normal case numbering in symbol 256s registers an offense for snake case numbering in method name 256s registers an offense for snake case numbering in a global variable name 256s behaves like offense 256s registers an offense for @local_1 in normalcase 256s behaves like accepts 256s accepts user_1_id in normalcase 256s behaves like offense 256s registers an offense for sha_256 in normalcase 256s behaves like offense 256s registers an offense for _myLocal_1 in normalcase 256s behaves like accepts 256s accepts @__foo__ in normalcase 256s behaves like accepts 256s accepts @foo in normalcase 256s behaves like offense 256s registers an offense for myAttribute_1 in normalcase 256s behaves like offense 256s registers an offense for local_1 in normalcase 256s behaves like accepts 256s accepts user1_id in normalcase 256s behaves like accepts 256s accepts foo10_bar in normalcase 256s behaves like accepts 256s accepts local_ in normalcase 256s behaves like accepts 256s accepts snake_case in normalcase 256s behaves like accepts 256s accepts target_u2f_device in normalcase 256s behaves like accepts integer symbols 256s accepts integer symbol 256s accepts integer symbol array literal 256s behaves like offense 256s registers an offense for @myAttribute_1 in normalcase 256s behaves like accepts 256s accepts _ in normalcase 256s behaves like accepts 256s accepts emparejó in normalcase 256s behaves like accepts 256s accepts _1 in normalcase 256s behaves like accepts 256s accepts sha256 in normalcase 256s behaves like offense 256s registers an offense for local_FOO_1 in normalcase 256s behaves like offense_array 256s registers an offense for ["a_1", "a2"] in normalcase 256s behaves like accepts 256s accepts _foo in normalcase 256s behaves like offense 256s registers an offense for localFOO_1 in normalcase 256s behaves like accepts 256s accepts local1 in normalcase 256s behaves like offense 256s registers an offense for @@local_1 in normalcase 256s behaves like accepts 256s accepts localFOO1 in normalcase 256s when configured for snake_case 256s registers an offense for normal case numbering in method camel case parameter 256s registers an offense for normal case numbering in method name 256s registers an offense for normal case numbering in symbol 256s registers an offense for normal case numbering in method parameter 256s does not register an offense for snake case numbering in symbol 256s registers an offense for normal case numbering in a global variable name 256s behaves like accepts 256s accepts local_123 in snake_case 256s behaves like accepts 256s accepts local_ in snake_case 256s behaves like offense 256s registers an offense for _unused1 in snake_case 256s behaves like offense 256s registers an offense for aB1 in snake_case 256s behaves like accepts 256s accepts emparejó in snake_case 256s behaves like accepts 256s accepts _foo in snake_case 256s behaves like accepts 256s accepts _1 in snake_case 256s behaves like accepts 256s accepts a_1_b_1 in snake_case 256s behaves like offense 256s registers an offense for camelCase1 in snake_case 256s behaves like offense_array 256s registers an offense for ["a1", "a_2"] in snake_case 256s behaves like accepts 256s accepts aB_1 in snake_case 256s behaves like accepts 256s accepts a_1_b in snake_case 256s behaves like accepts integer symbols 256s accepts integer symbol array literal 256s accepts integer symbol 256s behaves like offense 256s registers an offense for @@local1 in snake_case 256s behaves like accepts 256s accepts @foo in snake_case 256s behaves like accepts 256s accepts local_12 in snake_case 256s behaves like accepts 256s accepts local_1 in snake_case 256s behaves like offense 256s registers an offense for local1 in snake_case 256s behaves like accepts 256s accepts @__foo__ in snake_case 256s behaves like offense 256s registers an offense for @local1 in snake_case 256s behaves like accepts 256s accepts _ in snake_case 256s behaves like offense 256s registers an offense for @camelCase1 in snake_case 256s when CheckSymbols is false 256s does not register an offense for snake case numbering in symbol 256s when CheckMethodNames is false 256s does not register an offense for snake case numbering in method name 256s when configured for non integer 256s registers an offense for snake case numbering in symbol 256s registers an offense for snake case numbering in method parameter 256s registers an offense for normal case numbering in symbol 256s registers an offense for snake case numbering in method name 256s registers an offense for snake case numbering in method camel case parameter 256s registers an offense for normal case numbering in method name 256s registers an offense for normal case numbering in method parameter 256s registers an offense for normal case numbering in method camel case parameter 257s behaves like offense 257s registers an offense for local_1 in non_integer 257s behaves like offense 257s registers an offense for @local1 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 _1 in non_integer 257s behaves like accepts 257s accepts local_ in non_integer 257s behaves like offense_array 257s registers an offense for ["a_1", "aone"] in non_integer 257s behaves like accepts integer symbols 257s accepts integer symbol array literal 257s accepts integer symbol 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 @local_1 in non_integer 257s behaves like accepts 257s accepts _ in non_integer 257s behaves like offense 257s registers an offense for _myLocal_1 in non_integer 257s behaves like accepts 257s accepts localone in non_integer 257s behaves like accepts 257s accepts fooBar 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 257s registers an offense for local1 in non_integer 257s behaves like accepts 257s accepts _foo in non_integer 257s behaves like offense 257s registers an offense for _myLocal1 in non_integer 257s behaves like accepts 257s accepts local_one in non_integer 257s behaves like offense 257s registers an offense for myAttribute1 in non_integer 257s 257s RuboCop::Cop::Layout::BlockAlignment 257s accepts end aligned with a method call 257s accepts end aligned with an op-asgn (+=, -=) 257s does not raise an error for nested block in a method call 257s accepts end aligned with an instance variable 257s accepts end aligned with an or-asgn (||=) 257s accepts end aligned with the block when the block is a method argument 257s accepts end aligned with an and-asgn (&&=) 257s accepts end aligned with a class variable 257s accepts end aligned with a mass assignment 257s registers an offense for mismatched block end with a class variable 257s registers an offense for mismatched block end with a mass assignment 257s accepts end aligned with a variable 257s accepts end aligned with a constant 257s registers an offense for mismatched block end with an or-asgn (||=) 257s registers an offense for mismatched block end with a global variable 257s registers an offense for mismatched end not aligned with the block that is an argument 257s accepts end aligned with a call chain left hand side 257s accepts end aligned with a global variable 257s registers an offense for mismatched block end with an instance variable 257s registers an offense for mismatched end with a method call with arguments 257s registers an offense for mismatched block end with an and-asgn (&&=) 257s accepts end aligned with a method call with arguments 257s registers an offense for mismatched block end with an op-asgn (+=, -=) 257s accepts a block end that does not begin its line 257s registers an offense for mismatched block end with a constant 257s registers an offense for mismatched block end with a method call 257s registers an offense for mismatched block end with a variable 257s and the block is an operand 257s accepts end aligned with a variable 257s Ruby 2.7 257s registers an offense for mismatched block end with a mass assignment 257s accepts end aligned with a call chain left hand side 257s when the block has arguments 257s registers an offense for mismatched block end 257s on a splatted method call 257s aligns end with the splat operator 257s registers an offense and corrects misaligned end braces 257s on a logically negated method call 257s aligns end with the ! operator 257s registers an offense and corrects 257s when the block is terminated by } 257s mentions } (not end) in the message 257s when the block is defined on the next line 257s registers an offenses for mismatched end alignment 257s accepts end aligned with the block expression 257s on an arithmetically negated method call 257s registers an offense and corrects 257s aligns end with the - operator 257s when the block has no arguments 257s registers an offense for mismatched block end 257s when configured to align with do 257s allows when do aligned 257s errors when start_of_line aligned 257s when the method part is a call chain that spans several lines 257s accepts end indented as the start of the block 257s accepts two kinds of end alignment 257s registers offenses for misaligned ends 257s accepts pretty alignment style 257s when configured to align with start_of_line 257s errors when do aligned 257s allows when start_of_line aligned 257s when the block is a logical operand 257s accepts a correctly aligned block end 257s when variables of a mass assignment spans several lines 257s accepts end aligned with the variables 257s registers an offense for end aligned with the block 257s on a bit-flipped method call 257s registers an offense and corrects misaligned end brace 257s aligns end with the ~ operator 257s when there is an assignment chain 257s registers an offense for an end aligned with the 2nd variable 257s accepts end aligned with the first variable 257s when multiple similar-looking blocks have misaligned ends 257s registers an offense for each of them 257s 257s RuboCop::Cop::Lint::AmbiguousBlockAssociation 257s behaves like accepts 257s does not register an offense 257s behaves like accepts 257s does not register an offense 257s without parentheses 257s with receiver 257s registers an offense 257s when using safe navigation operator 257s registers an offense 257s as a hash key 257s registers an offense 257s with assignment 257s registers an offense 257s without receiver 257s registers an offense 257s rspec expect {}.to change {} 257s registers an offense 257s behaves like accepts 257s does not register an offense 257s behaves like accepts 257s does not register an offense 257s behaves like accepts 257s does not register an offense 257s behaves like accepts 257s does not register an offense 257s behaves like accepts 257s does not register an offense 257s when AllowedMethods is enabled 257s registers an offense for other methods 257s does not register an offense for an allowed method 257s behaves like accepts 257s does not register an offense 257s behaves like accepts 257s does not register an offense 257s behaves like accepts 257s does not register an offense 257s behaves like accepts 257s does not register an offense 257s behaves like accepts 257s does not register an offense 257s behaves like accepts 257s does not register an offense 257s behaves like accepts 257s does not register an offense 257s behaves like accepts 257s does not register an offense 257s when AllowedPatterns is enabled 257s registers an offense for other methods 257s does not register an offense for an allowed method 257s behaves like accepts 257s does not register an offense 257s behaves like accepts 257s does not register an offense 257s behaves like accepts 257s does not register an offense 257s behaves like accepts 257s does not register an offense 257s behaves like accepts 257s does not register an offense 257s behaves like accepts 257s does not register an offense 257s behaves like accepts 257s does not register an offense 257s 257s RuboCop::Cop::Style::TrailingCommaInHashLiteral 257s with single line list of values 257s when EnforcedStyleForMultiline is consistent_comma 257s accepts literal without trailing comma 257s accepts empty literal 257s registers an offense for trailing comma in a literal 257s accepts single element literal without trailing comma 257s when EnforcedStyleForMultiline is comma 257s registers an offense for trailing comma in a literal 257s accepts literal without trailing comma 257s accepts single element literal without trailing comma 257s accepts empty literal 257s when EnforcedStyleForMultiline is no_comma 257s accepts literal without trailing comma 257s accepts empty literal 257s accepts single element literal without trailing comma 257s registers an offense for trailing comma in a literal 257s with multi-line list of values 257s when EnforcedStyleForMultiline is no_comma 257s accepts literal with no trailing comma 257s accepts comma in comment after last value item 257s accepts comma inside a heredoc parameters at the end 257s registers an offense for trailing comma in literal 257s when EnforcedStyleForMultiline is consistent_comma 257s accepts trailing comma 257s accepts a multiline hash with pairs on a single line andtrailing comma 257s accepts trailing comma after a heredoc 257s registers an offense for no trailing comma 257s accepts a multiline hash with a single pair and trailing comma 257s when closing bracket is on same line as last value 257s registers an offense for literal with no trailing comma 257s when EnforcedStyleForMultiline is comma 257s accepts trailing comma 257s accepts a multiline hash with a single pair and trailing comma 257s accepts trailing comma after a heredoc 257s registers an offense for no trailing comma 257s registers an offense for trailing comma in a comment 257s when closing bracket is on same line as last value 257s accepts literal with no trailing comma 257s 257s RuboCop::Cop::Style::RescueModifier 257s handles modifier rescue in normal rescue 257s registers an offense for modifier rescue around parallel assignment 257s does not register an offense for nested normal rescue 257s does not register an offense for normal rescue with ensure 257s handles more complex expression with modifier rescue 257s does not register an offense for normal rescue 257s handles modifier rescue in a method 257s handles parentheses around a rescue modifier 257s registers an offense for modifier rescue 257s when a singleton method has implicit begin 257s accepts normal rescue 257s handles modifier rescue in body of implicit begin 257s autocorrect 257s corrects doubled rescue modifiers 257s corrects complex rescue modifier 257s when an instance method has implicit begin 257s accepts normal rescue 257s handles modifier rescue in body of implicit begin 257s excluded file 257s processes excluded files with issue 257s 257s RuboCop::Cop::Style::LineEndConcatenation 257s accepts string concat at line end for special strings like __FILE__ 257s registers an offense for dynamic string concat with << at line end 257s registers an offense for dynamic string concat at line end 257s autocorrects only the lines that should be autocorrected 257s autocorrects a + with \ to just \ 257s accepts string concat at line end when followed by comment 257s registers offenses only for the appropriate lines in chained concats 257s accepts string concat at line end when % literals are involved 257s accepts string concat at line end when followed by a comment line 257s registers multiple offenses when there are chained << methods 257s registers multiple offenses when there are chained concatenationscombined with << calls 257s accepts string concat on the same line 257s registers an offense for string concat with << at line end 257s accepts string concat with a return value of method on a string 257s registers an offense for string concat at line end 257s registers an offense for string concat with << and \ at line ends 257s registers multiple offenses when there are chained concatenations 257s autocorrects a + with trailing whitespace to \ 257s accepts string concat with a return value of method on an interpolated string 257s 257s RuboCop::Cop::Lint::RescueException 257s registers an offense for rescue with Exception => e 257s registers an offense for rescue from Exception 257s does not register an offense for rescue with no class 257s registers an offense for rescue with ::Exception 257s does not crash when the namespace of a rescued class is in a local variable 257s registers an offense for rescue with StandardError, Exception 257s does not register an offense for rescue with a module prefix 257s does not register an offense for rescue with other classes 257s does not register an offense for rescue with other class 257s does not crash when the splat operator is used in a rescue 257s does not register an offense for rescue with no class and => e 257s 257s RuboCop::Cop::Style::StringChars 257s does not register an offense when using `split(/ /)` 257s registers and corrects an offense when using `split` without parentheses 257s does not register an offense when using `chars` 257s registers and corrects an offense when using `split('')` 257s does not register an offense when using `split` 257s registers and corrects an offense when using `split("")` 257s registers and corrects an offense when using `split(//)` 257s 257s RuboCop::Cop::Lint::RedundantSafeNavigation 257s does not register an offense when using `&.` outside of conditions 257s does not register an offense when using `&.` with non-allowed method in condition 257s registers an offense and corrects when `&.` is used inside `unless` condition 257s registers an offense and corrects when `&.` is used inside `#{loop_type}` condition 257s registers an offense and corrects when `&.` is used inside `if` condition 257s registers an offense and corrects when `&.` is used inside complex condition 257s does not register an offense when using `&.respond_to?` with `nil` specific method as argument in condition 257s registers an offense and corrects when `&.` is used inside `#{loop_type}` condition 257s 257s RuboCop::Cop::Layout::MultilineMethodDefinitionBraceLayout 257s ignores defs without params 257s ignores implicit defs 257s ignores single-line defs 257s symmetrical style 257s opening brace on separate line from first element 257s allows closing brace on separate line from last multiline element 257s allows closing brace on separate line from last element 257s detects closing brace on same line as last element 257s opening brace on same line as first element 257s allows closing brace on same line as last element 257s allows closing brace on same line as last multiline element 257s detects closing brace on different line from last element 257s autocorrects closing brace on different line from last element 257s same_line style 257s opening brace on separate line from first element 257s detects closing brace on different line from last element 257s allows closing brace on same line as last element 257s allows closing brace on same line as last multiline element 257s opening brace on same line as first element 257s allows closing brace on same line as multi-line element 257s allows closing brace on same line from last element 257s detects closing brace on different line from multiline element 257s autocorrects closing brace on different line as last element 257s heredoc 257s detects heredoc structures that are safe to add to 257s ignores heredocs that could share a last line 257s new_line style 257s opening brace on same line as first element 257s allows closing brace on different line from multi-line element 257s detects closing brace on same line as last multiline element 257s autocorrects closing brace on same line as last element 257s allows closing brace on different line from last element 257s opening brace on separate line from first element 257s allows closing brace on separate line from last multiline element 257s allows closing brace on separate line from last element 257s detects closing brace on same line as last element 257s 257s RuboCop::Cop::Lint::EmptyExpression 257s when used in a condition 257s registers an offense inside `case` 257s registers an offense inside `elsif` 257s registers an offense in the return value of a ternary operator 257s registers an offense inside `when` 257s registers an offense inside `if` 257s registers an offense in the condition of a ternary operator 257s when used as a return value 257s registers an offense in the return value of a condition 257s registers an offense in the return value of a case statement 257s registers an offense in the return value of a method 257s when used as a standalone expression 257s registers an offense 257s with nested empty expressions 257s registers an offense 257s when used as an assignment 257s registers an offense for the assigned value 257s 257s RuboCop::Cop::Style::RedundantParentheses 257s accepts parentheses when they touch the preceding keyword 257s accepts parentheses around an erange 257s registers an offense for parens around a literal hash value 257s registers an offense and corrects when method arguments are unnecessarily parenthesized 257s accepts parentheses when enclosed in parentheses at `while-post` 257s accepts parentheses around an irange 257s registers an offense for parens around a literal in array and following newline 257s registers an offense for parens around a negative exponent 257s accepts parentheses when enclosed in parentheses at `until-post` 257s registers an offense for parens around last expressions in block body 257s registers an offense for parens around a receiver of a method call with an argument 257s registers an offense for parens around last expressions in method body 257s accepts parentheses inside an erange 257s registers an offense for parens around method body 257s accepts parentheses in super call with hash 257s accepts parentheses when they touch the following keyword 257s accepts parentheses in yield call with hash 257s registers an offense and corrects for a parenthesized item in a hash where the comma is on a line with the closing parens 257s registers an offense for parens around a float exponentiation base 257s registers an offense for parens around a literal hash value and following newline 257s accepts parentheses around the error passed to rescue 257s registers an offense for parens around a positive exponent 257s accepts parentheses inside an irange 257s registers an offense and corrects an array of multiple heredocs 257s registers an offense for parens around a literal in array 257s registers an offense when there is space around the parentheses 257s accepts parentheses around operator keywords 257s registers an offense for parens around a block body 257s accepts parentheses around a constant passed to when 257s registers an offense for parens around an integer exponentiation base 257s accepts parentheses around a method call with unparenthesized arguments 257s registers an offense for parens around a variable after semicolon 257s registers an offense for parens around an interpolated expression 257s behaves like redundant 257s registers an offense for parentheses around a method call 257s behaves like plausible 257s accepts parentheses when arguments are unparenthesized 257s behaves like redundant 257s registers an offense for parentheses around a method call 257s ternaries 257s when Style/TernaryParentheses is not enabled 257s registers an offense for parens around constant ternary condition 257s when Style/TernaryParentheses has EnforcedStyle: require_parentheses 257s behaves like plausible 257s accepts parentheses when arguments are unparenthesized 257s when Style/TernaryParentheses has EnforcedStyle: require_parentheses_when_complex 257s behaves like plausible 257s accepts parentheses when arguments are unparenthesized 257s when Style/TernaryParentheses has EnforcedStyle: require_no_parentheses 257s registers an offense for parens around ternary condition 257s behaves like redundant 257s registers an offense for parentheses around a constant 257s behaves like redundant 257s registers an offense for parentheses around a keyword 257s behaves like keyword with arguments 257s behaves like redundant 257s registers an offense for parentheses around a keyword 257s behaves like redundant 257s registers an offense for parentheses around a keyword 257s behaves like redundant 257s registers an offense for parentheses around a keyword 257s behaves like plausible 257s accepts parentheses when arguments are unparenthesized 257s behaves like redundant 257s registers an offense for parentheses around a literal 257s behaves like keyword with return value 257s behaves like redundant 257s registers an offense for parentheses around a keyword 257s behaves like redundant 257s registers an offense for parentheses around a keyword 257s behaves like plausible 257s accepts parentheses when arguments are unparenthesized 257s behaves like redundant 257s registers an offense for parentheses around a keyword 257s behaves like redundant 257s registers an offense for parentheses around a literal 257s behaves like redundant 257s registers an offense for parentheses around a keyword 257s behaves like redundant 257s registers an offense for parentheses around a literal 257s behaves like redundant 257s registers an offense for parentheses around a variable 257s behaves like redundant 257s registers an offense for parentheses around a literal 257s behaves like redundant 257s registers an offense for parentheses around a keyword 257s behaves like redundant 257s registers an offense for parentheses around a variable 257s behaves like plausible 257s accepts parentheses when arguments are unparenthesized 257s when a hash literal is the second argument in a method call 257s registers an offense 257s when the first argument in a method call begins with a hash literal 257s accepts parentheses if the argument list is not parenthesized 257s registers an offense if the argument list is parenthesized 257s behaves like plausible 257s accepts parentheses when arguments are unparenthesized 257s when parentheses are used like method argument parentheses 257s accepts parens around the arg 257s behaves like redundant 257s registers an offense for parentheses around a literal 257s behaves like redundant 257s registers an offense for parentheses around a method call 257s behaves like redundant 257s registers an offense for parentheses around an unary operation 257s literals in an array 257s when there is a comma on the same line as the closing parentheses 257s registers an offense and corrects when there is no subsequent item 257s registers an offense and corrects when there is a trailing comma 257s registers an offense and corrects when there is assignment 257s registers an offense and corrects when there is a subsequent item 257s behaves like redundant 257s registers an offense for parentheses around an unary operation 257s behaves like plausible 257s accepts parentheses when arguments are unparenthesized 257s behaves like redundant 257s registers an offense for parentheses around a method call 257s behaves like plausible 257s accepts parentheses when arguments are unparenthesized 257s behaves like redundant 257s registers an offense for parentheses around a keyword 257s behaves like redundant 257s registers an offense for parentheses around a method call 257s behaves like plausible 257s accepts parentheses when arguments are unparenthesized 257s behaves like keyword with arguments 257s behaves like redundant 258s registers an offense for parentheses around a keyword 258s behaves like redundant 258s registers an offense for parentheses around a keyword 258s behaves like plausible 258s accepts parentheses when arguments are unparenthesized 258s behaves like redundant 258s registers an offense for parentheses around a keyword 258s behaves like redundant 258s registers an offense for parentheses around a variable 258s behaves like plausible 258s accepts parentheses when arguments are unparenthesized 258s behaves like redundant 258s registers an offense for parentheses around a literal 258s behaves like plausible 258s accepts parentheses when arguments are unparenthesized 258s behaves like keyword with return value 258s behaves like redundant 258s registers an offense for parentheses around a keyword 258s behaves like plausible 258s accepts parentheses when arguments are unparenthesized 258s behaves like redundant 258s registers an offense for parentheses around a keyword 258s behaves like redundant 258s registers an offense for parentheses around a keyword 258s behaves like redundant 258s registers an offense for parentheses around a literal 258s behaves like redundant 258s registers an offense for parentheses around a keyword 258s behaves like plausible 258s accepts parentheses when arguments are unparenthesized 258s behaves like redundant 258s registers an offense for parentheses around a literal 258s behaves like redundant 258s registers an offense for parentheses around a literal 258s behaves like redundant 258s registers an offense for parentheses around a literal 258s behaves like redundant 258s registers an offense for parentheses around an unary operation 258s behaves like plausible 258s accepts parentheses when arguments are unparenthesized 258s behaves like redundant 258s registers an offense for parentheses around a method call 258s behaves like redundant 258s registers an offense for parentheses around a method call 258s behaves like redundant 258s registers an offense for parentheses around a method call 258s behaves like plausible 258s accepts parentheses when arguments are unparenthesized 258s behaves like keyword with return value 258s behaves like plausible 258s accepts parentheses when arguments are unparenthesized 258s behaves like redundant 258s registers an offense for parentheses around a keyword 258s behaves like redundant 258s registers an offense for parentheses around a keyword 258s behaves like redundant 258s registers an offense for parentheses around a keyword 258s behaves like redundant 258s registers an offense for parentheses around an unary operation 258s behaves like redundant 258s registers an offense for parentheses around a keyword 258s when a non-parenthesized call has an arg and a block 258s accepts parens around the arg 258s pin operator 258s behaves like allowed parentheses 258s accepts parentheses on a method call on a local variable 258s behaves like allowed parentheses 258s accepts parentheses on an int literal 258s behaves like allowed parentheses 258s accepts parentheses on a function call with no arguments 258s behaves like allowed parentheses 258s accepts parentheses on an expression 258s behaves like redundant parentheses 258s registers an offense and corrects a local variable 258s behaves like allowed parentheses 258s accepts parentheses on a function call with arguments 258s behaves like allowed parentheses 258s accepts parentheses on a hash literal 258s behaves like allowed parentheses 258s accepts parentheses on a method call on a class variable 258s behaves like redundant parentheses 258s registers an offense and corrects an instance variable 258s behaves like allowed parentheses 258s accepts parentheses on an array literal 258s behaves like allowed parentheses 258s accepts parentheses on a range literal 258s behaves like allowed parentheses 258s accepts parentheses on a method call on a global variable 258s behaves like allowed parentheses 258s accepts parentheses on a method call on an instance variable 258s behaves like redundant parentheses 258s registers an offense and corrects a class variable 258s behaves like redundant parentheses 258s registers an offense and corrects a global variable 258s behaves like plausible 258s accepts parentheses when arguments are unparenthesized 258s behaves like plausible 258s accepts parentheses when arguments are unparenthesized 258s behaves like plausible 258s accepts parentheses when arguments are unparenthesized 258s behaves like redundant 258s registers an offense for parentheses around a literal 258s behaves like redundant 258s registers an offense for parentheses around a literal 258s behaves like redundant 258s registers an offense for parentheses around a keyword 258s behaves like redundant 258s registers an offense for parentheses around a literal 258s behaves like plausible 258s accepts parentheses when arguments are unparenthesized 258s behaves like plausible 258s accepts parentheses when arguments are unparenthesized 258s behaves like redundant 258s registers an offense for parentheses around a literal 258s behaves like plausible 258s accepts parentheses when arguments are unparenthesized 258s behaves like redundant 258s registers an offense for parentheses around a method call 258s behaves like redundant 258s registers an offense for parentheses around a literal 258s behaves like plausible 258s accepts parentheses when arguments are unparenthesized 258s behaves like redundant 258s registers an offense for parentheses around a literal 258s 258s RuboCop::Cop::Cop 258s keeps track of offenses 258s will report registered offenses 258s will set custom severity if present 258s will warn if custom severity is invalid 258s will set default severity 258s initially has 0 offenses 258s #safe_autocorrect? 258s when autocorrection of the cop is declared unsafe 258s is expected to equal false 258s when safety is undeclared 258s is expected to equal true 258s when cop is declared unsafe 258s is expected to equal false 258s with no submodule 258s has right name 258s has right department 258s #autocorrect? 258s when the option is not given 258s is expected to equal false 258s when the option is given 258s is expected to equal true 258s when cop does not support autocorrection 258s is expected to equal false 258s when disable_uncorrectable is enabled 258s is expected to equal true 258s when the cop is set to not autocorrect 258s is expected to equal false 258s .qualified_cop_name 258s returns the given cop name if it already has a namespace even when the cop exists in multiple namespaces 258s returns the cop name in a different namespace if the provided namespace is incorrect 258s returns the given cop name if it is not found in any namespace 258s adds namespace if the cop name is found in exactly one namespace 258s returns the given cop name if it already has a namespace 258s raises an error if the cop name is in more than one namespace 258s with style cops 258s has right name 258s has right department 258s with lint cops 258s has right department 258s has right name 258s setting of Offense#corrected attribute 258s when cop does not support autocorrection 258s is not specified (set to nil) 258s when autocorrect is requested 258s is not specified (set to nil) 258s when disable_uncorrectable is enabled 258s is set to true 258s when cop supports autocorrection 258s when autocorrection is not needed 258s is set to false 258s when offense was corrected 258s is set to true 258s when offense was not corrected because of an error 258s is set to false 258s .documentation_url 258s for a custom cop class 258s is expected to be nil 258s for a builtin cop class 258s is expected to eq "https://docs.rubocop.org/rubocop/cops_layout.html#layoutblockendnewline" 258s when disabled by a comment 258s ignore_disable_comments is true 258s will not set offense as disabled 258s ignore_disable_comments is false 258s will set offense as disabled 258s #relevant_file? 258s when the file doesn't match the Include configuration 258s is expected to equal false 258s when the file matches the Include configuration 258s is expected to equal true 258s when the file is an anonymous source 258s is expected to equal true 258s Registry 258s #with_department 258s has at least one cop per department 258s returns 0 for an invalid type 258s has each cop in exactly one type 258s #departments 258s is expected to include :Style 258s has departments 258s is expected to include :Lint 258s contains every value only once 258s for a cop with a name 258s registers offense with its name 258s 258s RuboCop::Cop::Style::GlobalVars 258s does not register an offense for built-in variable $-l 258s does not register an offense for built-in variable $LOAD_PATH 258s does not register an offense for built-in variable $OFS 258s does not register an offense for built-in variable $' 258s does not register an offense for built-in variable $: 258s does not register an offense for built-in variable $CHILD_STATUS 258s does not register an offense for built-in variable $LAST_PAREN_MATCH 258s does not register an offense for built-in variable $FIELD_SEPARATOR 258s does not register an offense for built-in variable $CLASSPATH 258s does not register an offense for built-in variable $SAFE 258s does not register an offense for built-in variable $LAST_MATCH_INFO 258s does not register an offense for built-in variable $; 258s does not register an offense for built-in variable $-F 258s does not register an offense for built-in variable $\ 258s does not register an offense for built-in variable $0 258s does not register an offense for built-in variable $> 258s does not register an offense for built-in variable $-d 258s does not register an offense for built-in variable $PROGRAM_NAME 258s does not register an offense for built-in variable $_ 258s does not register an offense for built-in variable $ORS 258s does not register an offense for built-in variable $-p 258s does not register an offense for built-in variable $PID 258s does not register an offense for built-in variable $~ 258s does not register an offense for built-in variable $` 258s does not register an offense for built-in variable $-i 258s does not register an offense for built-in variable $, 258s does not register an offense for built-in variable $< 258s does not register an offense for built-in variable $POSTMATCH 258s does not register an offense for built-in variable $stderr 258s does not register an offense for built-in variable $VERBOSE 258s does not register an offense for built-in variable $FS 258s does not register an offense for built-in variable $$ 258s does not register an offense for built-in variable $PREMATCH 258s does not register an offense for built-in variable $ENV_JAVA 258s does not register an offense for built-in variable $-I 258s does not register an offense for built-in variable $-v 258s does not register an offense for built-in variable $ERROR_POSITION 258s does not register an offense for built-in variable $INPUT_RECORD_SEPARATOR 258s does not register an offense for built-in variable $PROCESS_ID 258s does not register an offense for built-in variable $+ 258s does not register an offense for built-in variable $ERROR_INFO 258s does not register an offense for built-in variable $" 258s does not register an offense for built-in variable $. 258s does not register an offense for built-in variable $FILENAME 258s does not register an offense for built-in variable $NR 258s does not register an offense for built-in variable $OUTPUT_FIELD_SEPARATOR 258s does not register an offense for built-in variable $? 258s does not register an offense for built-in variable $DEFAULT_INPUT 258s does not register an offense for built-in variable $-0 258s does not register an offense for built-in variable $MATCH 258s does not register an offense for built-in variable $DEBUG 258s does not register an offense for built-in variable $-w 258s does not register an offense for built-in variable $ARGV 258s does not register an offense for built-in variable $OUTPUT_RECORD_SEPARATOR 258s does not register an offense for built-in variable $* 258s does not register an offense for built-in variable $LAST_READ_LINE 258s does not register an offense for built-in variable $! 258s does not register an offense for built-in variable $@ 258s does not register an offense for built-in variable $JRUBY_REVISION 258s does not register an offense for built-in variable $INPUT_LINE_NUMBER 258s allows user permitted variables 258s does not register an offense for built-in variable $-a 258s does not register an offense for built-in variable $IGNORECASE 258s does not register an offense for built-in variable $JRUBY_VERSION 258s does not register an offense for backrefs like $1 258s does not register an offense for built-in variable $= 258s does not register an offense for built-in variable $LOADED_FEATURES 258s does not register an offense for built-in variable $stdout 258s does not register an offense for built-in variable $/ 258s does not register an offense for built-in variable $& 258s does not register an offense for built-in variable $RS 258s registers an offense for $custom 258s does not register an offense for built-in variable $DEFAULT_OUTPUT 258s does not register an offense for built-in variable $stdin 258s 258s RuboCop::Cop::Lint::InterpolationCheck 258s registers an offense and corrects when including interpolation and double quoted string in single quoted string 258s registers an offense for interpolation in double + single quoted split string 258s does not register an offense for an escaped interpolation 258s does not register an offense for interpolation in nested strings 258s registers an offense and corrects for interpolation in single quoted string 258s does not register an offense for interpolation in a regexp 258s does not crash for \xff 258s registers an offense for interpolation in single quoted split string 258s does not register an offense for properly interpolation strings 258s does not register an offense for escaped crab claws in dstr 258s does not register offense for strings in %w() 258s 258s RuboCop::Cop::Style::SelectByRegexp 258s with select 258s does not register an offense when the block param is a method argument 258s does not register an offense when there is no block 258s does not register an offense when the receiver is `to_hash` 258s does not register an offense when the receiver is `ENV` 258s does not register an offense when the block does not match a regexp 258s does not register an offense when the receiver is a hash literal 258s registers an offense if `to_h` is in the receiver chain but not the actual receiver 258s does not register an offense when the receiver is `to_h` 258s does not register an offense when the receiver is `Hash[]` 258s does not register an offense when the receiver is `Hash.new` 258s does not register an offense when given a proc 258s registers an offense and corrects when there is no explicit regexp 258s registers an offense and corrects when the receiver is an array 258s registers an offense and corrects for `blockvar =~ lvar` 258s registers an offense and corrects for `lvar =~ blockvar` 258s registers an offense and corrects for `regexp =~ blockvar` 258s registers an offense and corrects when the receiver is a set 258s does not register an offense when the block uses an external variable in a regexp match 258s registers an offense and corrects for `Regexp#match?` 258s registers an offense and corrects for `blockvar =~ regexp` 258s does not register an offense when the block arity is not 1 258s registers an offense and corrects for `match?` 258s registers an offense and corrects without a receiver 258s registers an offense and corrects when the receiver is a range 258s registers an offense and corrects with a multiline block 258s does not register an offense when the block has multiple expressions 258s with `numblock`s 258s does not register an offense when the param is a method argument 258s registers an offense and corrects for `blockvar =~ regexp` 258s registers an offense and corrects for `Regexp#match?` 258s does not register an offense when using `match?` without a receiver 258s registers an offense and corrects for `regexp =~ blockvar` 258s registers an offense and corrects for `match?` 258s does not register an offense if there is more than one numbered param 258s with reject 258s registers an offense and corrects when the receiver is a set 258s registers an offense and corrects when the receiver is an array 258s registers an offense and corrects for `match?` 258s does not register an offense when the block does not match a regexp 258s registers an offense if `to_h` is in the receiver chain but not the actual receiver 258s does not register an offense when the block uses an external variable in a regexp match 258s registers an offense and corrects with a multiline block 258s does not register an offense when there is no block 258s does not register an offense when the receiver is `to_h` 258s registers an offense and corrects for `Regexp#match?` 258s does not register an offense when the receiver is a hash literal 258s does not register an offense when the block arity is not 1 258s does not register an offense when the receiver is `Hash.new` 258s does not register an offense when the receiver is `ENV` 258s registers an offense and corrects without a receiver 258s registers an offense and corrects when there is no explicit regexp 258s registers an offense and corrects for `blockvar =~ lvar` 258s registers an offense and corrects for `regexp =~ blockvar` 258s does not register an offense when the receiver is `Hash[]` 258s does not register an offense when the block param is a method argument 258s registers an offense and corrects when the receiver is a range 258s does not register an offense when the receiver is `to_hash` 258s registers an offense and corrects for `blockvar =~ regexp` 258s does not register an offense when the block has multiple expressions 258s registers an offense and corrects for `lvar =~ blockvar` 258s does not register an offense when given a proc 258s with `numblock`s 258s does not register an offense when the param is a method argument 258s registers an offense and corrects for `regexp =~ blockvar` 258s does not register an offense when using `match?` without a receiver 258s registers an offense and corrects for `blockvar =~ regexp` 258s does not register an offense if there is more than one numbered param 258s registers an offense and corrects for `match?` 258s registers an offense and corrects for `Regexp#match?` 258s with find_all 258s does not register an offense when the block arity is not 1 258s does not register an offense when the receiver is `to_hash` 258s registers an offense and corrects for `blockvar =~ lvar` 258s does not register an offense when the receiver is `Hash[]` 258s registers an offense and corrects when there is no explicit regexp 258s registers an offense and corrects for `Regexp#match?` 258s registers an offense and corrects for `match?` 258s registers an offense and corrects for `blockvar =~ regexp` 258s registers an offense if `to_h` is in the receiver chain but not the actual receiver 258s does not register an offense when there is no block 258s does not register an offense when the block uses an external variable in a regexp match 258s registers an offense and corrects for `lvar =~ blockvar` 258s registers an offense and corrects for `regexp =~ blockvar` 258s registers an offense and corrects when the receiver is an array 258s registers an offense and corrects when the receiver is a range 258s does not register an offense when the receiver is `Hash.new` 258s registers an offense and corrects when the receiver is a set 258s registers an offense and corrects without a receiver 258s does not register an offense when the receiver is `to_h` 258s registers an offense and corrects with a multiline block 258s does not register an offense when the receiver is `ENV` 258s does not register an offense when the block param is a method argument 258s does not register an offense when the receiver is a hash literal 258s does not register an offense when the block does not match a regexp 258s does not register an offense when given a proc 258s does not register an offense when the block has multiple expressions 258s with `numblock`s 258s does not register an offense when the param is a method argument 258s registers an offense and corrects for `regexp =~ blockvar` 258s registers an offense and corrects for `match?` 258s registers an offense and corrects for `blockvar =~ regexp` 258s does not register an offense if there is more than one numbered param 258s registers an offense and corrects for `Regexp#match?` 258s does not register an offense when using `match?` without a receiver 258s 258s RuboCop::Cop::InternalAffairs::MethodNameEndWith 258s registers offense if there is potentially usage of `bang_method?` 258s registers offense if there is potentially usage of `predicate_method?` 258s does not register offense if argument for end_with? is some other string 258s registers an offense if there is potentially usage of `assignment_method?` 258s registers offense if there is potentially usage of `bang_method?` with safe navigation operator 258s registers an offense if `method_name` is a variable and there is potentially usage of `assignment_method?` 258s Ruby >= 2.7 258s registers offense if argument for Symbol#end_with? is '!' 258s registers an offense if method_name is symbol 258s registers offense if argument for Symbol#end_with? is '?' with safe navigation operator 258s registers offense if argument for Symbol#end_with? is '!' with safe navigation operator 258s registers an offense if method_name is symbol with safe navigation operator 258s registers offense if argument for Symbol#end_with? is '?' 258s does not register offense if argument for Symbol#end_with? is some other string 258s 258s RuboCop::Cop::Naming::BinaryOperatorParameterName 258s registers an offense and corrects for `#+` when argument is not named other 258s does not register an offense for [] 258s does not register an offense for the match operator 258s does not register an offense for []= 258s registers an offense and corrects when argument is referenced in method body 258s registers an offense and corrects for `#eql?` when argument is not named other 259s does not register an offense for << 259s does not register an offense for === 259s registers an offense and corrects when assigned to argument in method body 259s does not register an offense for arg named _other 259s registers an offense and corrects for `#equal?` when argument is not named other 259s does not register an offense for non binary operators 259s does not register an offense for multibyte character method name 259s does not register an offense for arg named other 259s works properly even if the argument not surrounded with braces 259s 259s RuboCop::Cop::Lint::UnreachableCode 259s registers an offense for `break` in all `if` branches with other expressions 259s registers an offense for `next` in `begin` 259s accepts `raise` is in all `if` branches 259s registers an offense for `throw` in all `if` branches with other expressions 259s accepts `redo` is in `else` branch only 259s accepts `break` is in `if` branch only 259s accepts `fail` is in all `if` branches 259s registers an offense for `abort` in all `if` branches 259s registers an offense for `return` in all `if` branches with other expressions 259s accepts `exit` as the final expression 259s accepts `fail` is not in `elsif` branch 259s registers an offense for `throw` in all `if` and `elsif` branches 259s registers an offense for `next` in all `case` branches 259s accepts `exit!` is in all `if` branches 259s accepts `redo` is not in `elsif` branch 259s accepts `break` as the final expression 259s accepts `exit!` is in `if`, and without `else` 259s accepts `break` is in `case` branch without else 259s registers an offense for `retry` in all `if` branches 259s accepts `raise` is not in `elsif` branch 259s accepts `return` is in `if`, and without `else` 259s registers an offense for `raise` in `begin` 259s accepts `abort` is in `case` branch without else 259s accepts `return` is in `else` branch only 259s accepts `abort` as the final expression 259s registers an offense for `exit` before other statements 259s registers an offense for `next` in all `if` branches 259s registers an offense for `break` in all `if` and `elsif` branches 259s accepts `break` is in `else` branch only 259s registers an offense for `abort` before other statements 259s registers an offense for `raise` in all `case` branches 259s accepts `break` is in all `if` branches 259s registers an offense for `retry` before other statements 259s registers an offense for `next` in all `if` and `elsif` branches 259s registers an offense for `fail` in all `if` and `elsif` branches 259s registers an offense for `exit` in all `if` branches 259s accepts `exit` is not in `elsif` branch 259s registers an offense for `break` in all `if` branches 259s accepts `return` is in `case` branch without else 259s accepts `fail` is in `else` branch only 259s accepts `fail` is in `if` branch only 259s accepts `exit` is in all `if` branches 259s accepts `redo` is in `if`, and without `else` 259s accepts code with conditional `retry` 259s accepts code with conditional `break` 259s registers an offense for `fail` before other statements 259s registers an offense for `retry` in all `if` branches with other expressions 259s accepts `retry` is in `if`, and without `else` 259s registers an offense for `raise` in all `if` branches 259s accepts `exit!` is not in `elsif` branch 259s accepts `fail` is in `if`, and without `else` 259s accepts code with conditional `abort` 259s accepts `abort` is in all `if` branches 259s registers an offense for `throw` in `begin` 259s accepts `next` is in `if`, and without `else` 259s registers an offense for `redo` in all `case` branches 259s accepts `next` is in `else` branch only 259s accepts `abort` is in `else` branch only 259s registers an offense for `break` before other statements 259s accepts `retry` is in `case` branch without else 259s registers an offense for `next` in all `if` branches with other expressions 259s accepts `throw` is not in `elsif` branch 259s registers an offense for `throw` in all `if` branches 259s registers an offense for `exit!` in all `if` and `elsif` branches 259s registers an offense for `throw` in all `case` branches 259s accepts `throw` is in `else` branch only 259s registers an offense for `redo` in all `if` branches 259s registers an offense for `exit` in all `if` and `elsif` branches 259s registers an offense for `exit!` in all `case` branches 259s accepts `throw` is in `case` branch without else 259s accepts `throw` is in all `if` branches 259s registers an offense for `exit` in all `case` branches 259s accepts `exit!` as the final expression 259s accepts code with conditional `exit!` 259s accepts code with conditional `fail` 259s accepts `redo` as the final expression 259s accepts code with conditional `return` 259s accepts `exit!` is in `case` branch without else 259s accepts code with conditional `redo` 259s registers an offense for `raise` in all `if` branches with other expressions 259s accepts `exit!` is in `if` branch only 259s accepts `break` is not in `elsif` branch 259s accepts `abort` is in `if` branch only 259s registers an offense for `break` in all `case` branches 259s registers an offense for `exit` in all `if` branches with other expressions 259s registers an offense for `retry` in `begin` 259s registers an offense for `fail` in all `if` branches 259s accepts `redo` is in `case` branch without else 259s registers an offense for `return` in all `if` branches 259s registers an offense for `exit!` in `begin` 259s accepts `raise` is in `if` branch only 259s accepts `abort` is in `if`, and without `else` 259s accepts `retry` is in `else` branch only 259s registers an offense for `raise` before other statements 259s accepts `retry` is in all `if` branches 259s accepts `raise` is in `if`, and without `else` 259s registers an offense for `redo` in `begin` 259s accepts `throw` is in `if` branch only 259s accepts `exit` is in `else` branch only 259s accepts `raise` as the final expression 259s registers an offense for `throw` before other statements 259s accepts `return` as the final expression 259s registers an offense for `abort` in all `case` branches 259s accepts `return` is not in `elsif` branch 259s registers an offense for `raise` in all `if` and `elsif` branches 259s accepts `retry` is not in `elsif` branch 259s registers an offense for `return` before other statements 259s accepts `fail` is in `case` branch without else 259s accepts code with conditional `raise` 259s registers an offense for `next` before other statements 259s accepts `redo` is in `if` branch only 259s accepts code with conditional `exit` 259s accepts code with conditional `next` 259s accepts `raise` is in `case` branch without else 259s registers an offense for `fail` in `begin` 259s registers an offense for `break` in `begin` 259s accepts `abort` is not in `elsif` branch 259s registers an offense for `return` in all `if` and `elsif` branches 259s accepts `exit!` is in `else` branch only 259s registers an offense for `redo` in all `if` and `elsif` branches 259s accepts `next` as the final expression 259s accepts `exit` is in `if` branch only 259s registers an offense for `retry` in all `case` branches 259s accepts `exit` is in `if`, and without `else` 259s registers an offense for `redo` in all `if` branches with other expressions 259s registers an offense for `exit!` in all `if` branches 259s registers an offense for `return` in all `case` branches 259s registers an offense for `abort` in all `if` and `elsif` branches 259s registers an offense for `retry` in all `if` and `elsif` branches 259s accepts `return` is in all `if` branches 259s accepts `raise` is in `else` branch only 259s registers an offense for `abort` in `begin` 259s registers an offense for `return` in `begin` 259s accepts `throw` as the final expression 259s accepts `return` is in `if` branch only 259s accepts `redo` is in all `if` branches 259s registers an offense for `abort` in all `if` branches with other expressions 259s accepts `next` is in all `if` branches 259s registers an offense for `exit!` before other statements 259s accepts `fail` as the final expression 259s accepts `exit` is in `case` branch without else 259s registers an offense for `exit` in `begin` 259s registers an offense for `redo` before other statements 259s registers an offense for `fail` in all `case` branches 259s accepts `retry` is in `if` branch only 259s accepts code with conditional `throw` 259s registers an offense for `fail` in all `if` branches with other expressions 259s registers an offense for `exit!` in all `if` branches with other expressions 259s accepts `break` is in `if`, and without `else` 259s accepts `next` is not in `elsif` branch 259s accepts `next` is in `if` branch only 259s accepts `retry` as the final expression 259s accepts `throw` is in `if`, and without `else` 259s accepts `next` is in `case` branch without else 259s 259s RuboCop::Cop::Lint::EachWithObjectArgument 259s accepts a variable argument 259s accepts two arguments 259s registers an offense for float argument 259s registers an offense for fixnum argument 259s accepts a string argument 259s registers an offense for bignum argument 259s when using safe navigation operator 259s registers an offense for fixnum argument 259s 259s RuboCop::Cop::Layout::SpaceBeforeSemicolon 259s registers an offense and corrects more than one space before a semicolon 259s does not register an offense for no space before semicolons 259s registers an offense and corrects space before semicolon 259s heredocs 259s registers an offense and corrects 259s inside block braces 259s when EnforcedStyle for SpaceInsideBlockBraces is space 259s accepts a space between an opening brace and a semicolon 259s behaves like common behavior 259s accepts no space between an opening brace and a semicolon 259s when EnforcedStyle for SpaceInsideBlockBraces is no_space 259s registers an offense and corrects a space between an opening brace and a semicolon 259s behaves like common behavior 259s accepts no space between an opening brace and a semicolon 259s 259s RuboCop::Cop::Style::IfUnlessModifier 259s accepts if-end followed by a chained call using `.` 259s adds parens in autocorrect when if-end used with `&&` operator 259s accepts if-end when used as LHS of binary arithmetic 259s adds parens in autocorrect when if-end used with `||` operator 259s accepts if-end followed by a chained call using `&.` 259s accepts code with EOL comment since user might want to keep it 259s accepts if-else-end 259s accepts if/elsif 259s when if-end condition is assigned to a variable 259s with variable being on the previous line 259s when it is short enough to fit on a single line 259s corrects it to the single-line form 259s when it is not short enough to fit on a single line 259s accepts it in the multiline form 259s with variable being on the same line 259s when it is short enough to fit on a single line 259s corrects it to the single-line form 259s when it is not short enough to fit on a single line 259s accepts it in the multiline form 259s multiline if that fits on one line 259s registers an offense 259s and has two statements separated by semicolon 259s accepts 259s modifier if that does not fit on one line 259s when Layout/LineLength is enabled 259s corrects it to normal form 259s IgnoreCopDirectives 259s and the long line is too long because IgnoreCopDirectives is false 259s registers an offense 259s and the long line is allowed because IgnoreCopDirectives is true 259s accepts 259s when using a method with heredoc argument 259s accepts 259s and the long line is allowed because AllowURI is true 259s accepts 259s when variable assignment is used in the branch body of if modifier 259s registers an offense 259s and the long line is too long because AllowURI is false 259s registers an offense 259s when Layout/LineLength is disabled in configuration 259s accepts 259s when Layout/LineLength is disabled with enable/disable comments 259s accepts 259s when Layout/LineLength is disabled with an EOL comment 259s accepts 259s if-end with conditional as body 259s accepts 259s multiline if that fits on one line with comment near end 259s accepts 259s when if-end condition has some code after the end keyword 259s when it is not short enough to fit on a single line 259s accepts it in the multiline form 259s when it is short enough to fit on a single line 259s corrects it to the single-line form 259s with a named regexp capture on the LHS 259s does not register an offense 259s if-end is argument to a non-parenthesized method call 259s adds parentheses so as not to change meaning 259s modifier if that does not fit on one line, but is not the only statement on the line 259s accepts 259s multiline if that fits on one line with comment on first line 259s registers an offense and preserves comment 259s when Layout/LineLength is disabled 259s registers an offense even for a long modifier statement 259s with implicit match conditional 259s when a multiline if doesn't fit on one line 259s accepts 259s when a multiline if fits on one line 259s registers an offense 259s when if-end condition is an element of an array 259s when short enough to fit on a single line 259s corrects it to the single-line form 259s when not short enough to fit on a single line 259s accepts it in the multiline form 259s if-end is argument to a parenthesized method call 259s adds parentheses because otherwise it would cause SyntaxError 259s when if-end condition is a value in a hash 259s when it is short enough to fit on a single line 259s corrects it to the single-line form 259s when it is not short enough to fit on a single line 259s accepts it in the multiline form 259s multiline unless that fits on one line 259s registers an offense 259s when if-end condition has a first line comment 259s when it is not short enough to fit on a single line 259s accepts it in the multiline form 259s when it is short enough to fit on a single line 259s corrects it to the single-line form 259s behaves like condition modifier cop 259s for a multiline 'if' 259s handles one-line usage 259s corrects it when assignment is in body 259s accepts an empty body 259s handles inline comments during autocorrection 259s doesn't break when used as RHS of instance var assignment 259s accepts it if single line would not fit on one line 259s doesn't break when used as RHS of constant assignment 259s corrects it if result fits in one line 259s doesn't break when used as RHS of binary arithmetic 259s doesn't break when used as RHS of local var assignment 259s doesn't break when used as RHS of class var assignment 259s accepts it when condition has local variable assignment 259s accepts it if body spans more than one line 259s accepts multiline condition in modifier form 259s registers an offense 259s when there is a comment on the first line and some code after the end keyword 259s does not register an offense 259s when Layout/LineLength is disabled 259s registers an offense even for a long modifier statement 259s short multiline if near an else etc 259s registers an offense 259s unless-end with conditional as body 259s accepts 259s with tabs used for indentation 259s with Layout/IndentationStyle: IndentationWidth config 259s behaves like with tabs indentation 259s it doesn't fit on one line 259s doesn't register an offense 259s it fits on one line 259s registers an offense 259s with Layout/IndentationWidth: Width config 259s behaves like with tabs indentation 259s it doesn't fit on one line 259s doesn't register an offense 259s it fits on one line 259s registers an offense 259s behaves like condition modifier cop 259s for a multiline 'unless' 259s doesn't break when used as RHS of instance var assignment 259s corrects it when assignment is in body 259s corrects it if result fits in one line 259s handles inline comments during autocorrection 259s accepts it if body spans more than one line 259s doesn't break when used as RHS of binary arithmetic 259s handles one-line usage 259s doesn't break when used as RHS of constant assignment 259s doesn't break when used as RHS of local var assignment 259s accepts an empty body 259s doesn't break when used as RHS of class var assignment 259s accepts it when condition has local variable assignment 259s accepts it if single line would not fit on one line 259s when there is a comment on the first line and some code after the end keyword 259s does not register an offense 259s accepts multiline condition in modifier form 259s registers an offense 259s when Layout/LineLength is disabled 259s registers an offense even for a long modifier statement 259s 259s RuboCop::Cop::Lint::AmbiguousOperator 259s with `-` unary operator in the first argument 259s with parentheses around the operator 259s does not register an offense 259s without parentheses 259s without whitespaces on the right of the operator 259s registers an offense and corrects 259s with a whitespace on the right of the operator 259s does not register an offense 259s when using safe navigation operator with a unary operator 259s does not register an offense 259s with a keyword splat operator in the first argument 259s without parentheses 259s without whitespaces on the right of the operator 259s registers an offense and corrects 259s with a whitespace on the right of the operator 259s does not register an offense 259s with parentheses around the keyword splat operator 259s does not register an offense 259s with `+` unary operator in the first argument 259s without parentheses 259s without whitespaces on the right of the operator when a method with no arguments is used in advance 259s registers an offense and corrects 259s without whitespaces on the right of the operator 259s registers an offense and corrects 259s with a whitespace on the right of the operator 259s does not register an offense 259s with parentheses around the operator 259s does not register an offense 259s with a splat operator in the first argument 259s without parentheses 259s with a whitespace on the right of the operator 259s does not register an offense 259s without whitespaces on the right of the operator 259s registers an offense and corrects 259s with parentheses around the splatted argument 259s does not register an offense 259s with a block ampersand in the first argument 259s without parentheses 259s without whitespaces on the right of the operator 259s registers an offense and corrects 259s with a whitespace on the right of the operator 259s does not register an offense 259s with parentheses around the block argument 259s does not register an offense 259s 259s RuboCop::Cop::Lint::ScriptPermission 259s with file permission 0644 259s registers an offense for script permission 259s if autocorrection is off 259s leaves the file intact 259s with file permission 0755 259s accepts without shebang line 259s accepts with blank 259s accepts with shebang line 259s with stdin 259s skips investigation 259s 259s RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier 259s Ruby 2.7 259s registers an offense for missing around line before public 259s registers an offense for missing around line before private 259s ignores module_function with numblock argument 259s registers an offense for missing around line before protected 259s ignores private with numblock argument 259s registers an offense for missing around line before module_function 259s ignores protected with numblock argument 259s ignores public with numblock argument 259s EnforcedStyle is `only_before` 259s accepts blank line after module_function 259s accepts missing blank line after protected 259s registers an offense for blank line after private 259s does not register an offense when `end` immediately after private 259s registers an offense for missing blank line before module_function 259s does not register an offense when `end` immediately after protected 259s registers an offense for missing blank line before public 259s registers an offense for blank line after protected 259s registers an offense for missing blank line before private 259s accepts missing blank line after private 259s accepts blank line after public 259s registers an offense for missing blank line before protected 259s EnforcedStyle is `around` 260s autocorrects blank line after #{access_modifier} with comment 260s ignores public deep inside a method call 260s ignores comment line before private 260s accepts missing blank line when at the beginning of class 260s requires blank line after, but not before, module_function when at the beginning of class/module 260s accepts missing blank line when at the beginning of file and preceded by a comment 260s accepts missing blank line when at the beginning of filewhen specifying a superclass that breaks the line 260s ignores an accessor with the same name as public above a method definition 260s accepts missing blank line when specifying a superclass that breaks the line 260s requires blank line when next line started with end 260s accepts only using access modifier 260s ignores an accessor with the same name as protected above a method definition 260s ignores an accessor with the same name as module_function above a method definition 260s requires blank line when next line started with end 260s ignores comment line before module_function 260s ignores protected inside a method call 260s accepts missing blank line when specifying a superclass that breaks the line 260s ignores module_function deep inside a method call 260s requires blank line before public 260s recognizes blank lines with DOS style line endings 260s requires blank line when next line started with end 260s requires blank line after private 260s ignores private inside a method call 260s accepts missing blank line when specifying `self` that breaks the line 260s accepts missing blank line when at the beginning of module 260s accepts missing blank line when at the beginning of file and preceded by a comment 260s accepts missing blank line when at the beginning of sclass 260s ignores protected with a right-hand-side condition 260s accepts missing blank line when at the end of specifying `self` 260s accepts missing blank line when at the end of specifying a superclass 260s requires blank line after, but not before, protected when at the beginning of class/module 260s accepts missing blank line when at the beginning of sclass 260s recognizes blank lines with DOS style line endings 260s accepts missing blank line when at the beginning of module 260s accepts missing blank line when at the beginning of module 260s accepts missing blank line when at the beginning of class 260s accepts missing blank line when at the end of specifying `self` 260s ignores private deep inside a method call 260s accepts missing blank line when at the beginning of class 260s accepts missing blank line when at the beginning of sclass 260s ignores private with a right-hand-side condition 260s ignores module_function with a right-hand-side condition 260s accepts missing blank line when specifying `self` that breaks the line 260s ignores an accessor with the same name as private above a method definition 260s accepts missing blank line when specifying `self` that breaks the line 260s accepts missing blank line when at the beginning of filewhen specifying a superclass that breaks the line 260s recognizes blank lines with DOS style line endings 260s ignores module_function inside a method call 260s accepts missing blank line when at the end of specifying a superclass 260s accepts missing blank line when specifying a superclass that breaks the line 260s accepts missing blank line when at the end of specifying a superclass 260s ignores comment line before public 260s requires blank line after module_function 260s accepts missing blank line when at the end of block 260s requires blank line after, but not before, public when at the beginning of class/module 260s ignores protected with block argument 260s accepts missing blank line when at the beginning of file and preceded by a comment 260s requires blank line when next line started with end 260s accepts missing blank line when at the end of block 260s accepts missing blank line when at the beginning of file and preceded by a comment 260s accepts missing blank line when at the end of specifying `self` 260s accepts missing blank line when at the beginning of filewhen specifying a superclass that breaks the line 260s requires blank line after protected 260s requires blank line before module_function 260s ignores comment line before protected 260s requires blank line after, but not before, private when at the beginning of class/module 260s accepts missing blank line when at the beginning of filewhen specifying a superclass that breaks the line 260s accepts missing blank line when at the beginning of module 260s requires blank line after public 260s autocorrects blank line after #{access_modifier} with comment 260s accepts missing blank line when specifying a superclass that breaks the line 260s accepts missing blank line when specifying `self` that breaks the line 260s ignores private with block argument 260s accepts missing blank line when at the end of specifying `self` 260s accepts only using access modifier 260s ignores module_function with block argument 260s accepts missing blank line when at the end of block 260s ignores protected deep inside a method call 260s requires blank line before private 260s recognizes blank lines with DOS style line endings 260s requires blank line before protected 260s ignores public with a right-hand-side condition 260s autocorrects blank line after #{access_modifier} with comment 260s accepts missing blank line when at the beginning of class 260s ignores public with block argument 260s accepts missing blank line when at the beginning of sclass 260s accepts missing blank line when at the end of block 260s ignores public inside a method call 260s accepts missing blank line when at the end of specifying a superclass 260s accepts only using access modifier 260s autocorrects blank line after #{access_modifier} with comment 260s accepts only using access modifier 260s at the beginning of block 260s for blocks defined with do 260s accepts missing blank line 260s requires blank line after, but not before, module_function 260s accepts missing blank line with arguments 260s for blocks defined with {} 260s accepts missing blank line 260s accepts missing blank line with arguments 260s at the beginning of block 260s for blocks defined with {} 260s accepts missing blank line with arguments 260s accepts missing blank line 260s for blocks defined with do 260s accepts missing blank line 260s accepts missing blank line with arguments 260s requires blank line after, but not before, public 260s at the beginning of block 260s for blocks defined with do 260s accepts missing blank line with arguments 260s accepts missing blank line 260s requires blank line after, but not before, protected 260s for blocks defined with {} 260s accepts missing blank line with arguments 260s accepts missing blank line 260s at the beginning of block 260s for blocks defined with do 260s accepts missing blank line 260s requires blank line after, but not before, private 260s accepts missing blank line with arguments 260s for blocks defined with {} 260s accepts missing blank line with arguments 260s accepts missing blank line 260s 260s RuboCop::Cop::Layout::FirstParameterIndentation 260s consistent style 260s invalid indentation on multi-line defs 260s normal arguments 260s registers an offense and corrects incorrectly indented first element 260s hash arguments static method def 260s registers an offense and corrects incorrectly indented first element 260s hash arguments 260s registers an offense and corrects incorrectly indented first element 260s single line method defs 260s ignores with hash args 260s ignores 260s no paren method defs 260s ignores 260s ignores with hash args 260s valid indentation on static multi-line defs 260s accepts correctly indented first element hash 260s accepts correctly indented first element 260s valid indentation on multi-line defs 260s accepts correctly indented first element 260s accepts correctly indented first element hash 260s align_parentheses style 260s no paren method defs 260s ignores with hash args 260s ignores 260s invalid indentation on multi-line defs 260s normal arguments 260s registers an offense and corrects incorrectly indented first element 260s hash arguments 260s registers an offense and corrects incorrectly indented first element 260s hash arguments static def 260s registers an offense and corrects incorrectly indented first element 260s valid indentation on multi-line defs 260s accepts correctly indented first element 260s accepts correctly indented first element hash 260s single line method defs 260s ignores 260s ignores with hash args 260s 260s RuboCop::Cop::Naming::MethodName 260s accepts for non-ascii characters 260s when configured for camelCase 260s accepts operator definitions 260s registers an offense for mixed snake case and camel case 260s accepts class emitter method in a class 260s accepts camel case in singleton method name 260s registers an offense for capitalized camel case 260s registers an offense for mixed snake case and camel case in attr. 260s accepts camel case names in attr. 260s registers an offense for mixed snake case and camel case in attr. 260s registers an offense for camel case methods names in attr. 260s registers an offense for capitalized camel case name in attr. 260s accepts class emitter method in a class, even when it is defined inside another method 260s registers an offense for snake case in names 260s accepts camel case in instance method name 260s accepts class emitter method in a module, even when it is defined inside another method 260s registers an offense for singleton upper case method without corresponding class 260s accepts one line methods 260s accepts unary operator definitions 260s registers an offense for correct + opposite 260s accepts class emitter method in a module 260s registers an offense for singleton snake_case method within class 260s registers an offense for snake case name in attr. 260s when specifying `AllowedPatterns` 260s does not register an offense for snake case method name in attr. 260s does not register an offense for camel case method name matching `AllowedPatterns` 260s does not register an offense for camel case method name in attr. 260s does not register an offense for snake case method name matching `AllowedPatterns` 260s when configured for snake_case 260s registers an offense for mixed snake case and camel case 260s registers an offense for camel case method names in attr. 260s accepts class emitter method in a module 260s accepts snake case in attr. 260s registers an offense for capitalized camel case name in attr. 260s accepts operator definitions 260s accepts snake case in names 260s registers an offense for mixed snake case and camel case in attr. 260s accepts class emitter method in a module, even when it is defined inside another method 260s registers an offense for camel case methods names in attr. 260s accepts class emitter method in a class, even when it is defined inside another method 260s registers an offense for singleton camelCase method within class 260s registers an offense for mixed snake case and camel case in attr. 260s accepts unary operator definitions 260s registers an offense for opposite + correct 260s registers an offense for camel case in singleton method name 260s registers an offense for capitalized camel case 260s accepts one line methods 260s registers an offense for camel case in instance method name 260s registers an offense for singleton upper case method without corresponding class 260s accepts class emitter method in a class 260s when specifying `AllowedPatterns` 260s does not register an offense for snake case method name in attr. 260s does not register an offense for snake case method name matching `AllowedPatterns` 260s does not register an offense for camel case method name in attr. 260s does not register an offense for camel case method name matching `AllowedPatterns` 260s 260s RuboCop::PathUtil 260s #relative_path 260s builds paths relative to PWD by default as a stop-gap 260s supports custom base paths 260s #match_path? 260s matches strings to the full path 260s does not match file in a subdirectory 260s does not match dir/** for file in hidden dir 260s matches dir/** for hidden file 260s matches glob expressions 260s does not match invalid UTF-8 paths 260s matches regexps 260s #absolute? 260s returns a falsey value for a path beginning with a directory name 260s returns a truthy value for a path beginning with slash 260s 260s RuboCop::Cop::Style::UnlessLogicalOperators 260s EnforcedStyle is `forbid_logical_operators` 260s does not register an offense when using if 260s registers an offense when using only `||` 260s registers an offense when using only `&&` 260s registers an offense when using only `and` 260s registers an offense when using `&&` followed by || 260s does not register an offense when not used in unless 260s does not register an offense when not using logical operator 260s registers an offense when using only `or` 260s EnforcedStyle is `forbid_mixed_logical_operators` 260s does not register an offense when using `&&` operator and invoked method name includes "and" in the conditional branch 260s registers an offense when using `&&` and `or` 260s does not register an offense when using `||` operator and invoked method name includes "or" in the conditional branch 260s does not register an offense when using only `||`s 260s registers an offense when using `||` and `or` 260s does not register an offense when using only `and`s 260s does not register an offense when not using logical operator 260s registers an offense when using `&&` and `and` 260s registers an offense when using `||` and `and` 260s does not register an offense when using only `&&`s 260s registers an offense when using `&&` and `||` 260s does not register an offense when using if 260s registers an offense when using parentheses 260s does not register an offense when using only `or`s 260s does not register an offense when not used in unless 260s 260s RuboCop::Cop::Lint::DuplicateElsifCondition 260s registers multiple offenses for multiple repeated elsif conditions 260s registers an offense for subsequent repeated elsif conditions 260s registers an offense for repeated elsif conditions 260s does not register an offense for non-repeated elsif conditions 260s does not register an offense for partially repeated elsif conditions 260s 260s RuboCop::Cop::Style::RedundantAssignment 260s does not register an offense when ensure block present 260s accepts empty when nodes 260s accepts empty if body 260s accepts empty method body 260s reports an offense for def ending with assignment and returning 260s when rescue blocks present 260s registers an offense and autocorrects when inside function or rescue block 260s when inside begin-end body 260s registers an offense and autocorrects 260s when inside a when-branch 260s registers an offense and autocorrects 260s when inside an if-branch 260s registers an offense and autocorrects 260s 260s RuboCop::Cop::Layout::EmptyLineAfterGuardClause 260s accepts a guard clause that is after multiline heredoc 260s registers an offense and corrects a `raise` guard clause not followed by empty line when `unless` condition is after heredoc 260s registers an offense and corrects when using `and return` before guard condition 260s registers an offense and corrects `next` guard clause not followed by empty line 260s registers an offense and corrects only the last guard clause 260s registers an offense and corrects a method starting with end_ 260s registers an offense and corrects using heredoc with `and return` before guard condition 260s accepts a guard clause inside oneliner block 260s registers an offense and corrects a guard clause is before `begin` 260s registers and corrects when using guard clause is after `rubocop:enable` comment 260s accepts multiple guard clauses 260s accepts a guard clause when the next line is `else` 260s accepts modifier if 260s registers an offense when the clause ends with a semicolon but the next clause is on the next line 260s accepts using guard clause is after `raise` 260s accepts a guard clause followed by empty line when guard clause including heredoc 260s registers an offense and corrects when using `or return` before guard condition 260s registers an offense and corrects a guard clause not followed by empty line 260s accepts a guard clause when the next line is `rescue`-`else` 260s does not register an offense when there are multiple clauses on the same line 260s registers and corrects when using guard clause is after `rubocop:disable` comment 260s registers an offense and corrects a guard clause that is a ternary operator 260s accepts a guard clause when the next line is `elsif` 260s registers an offense and corrects a `raise` guard clause not followed by empty line when guard clause is after method call with argument 260s registers an offense and corrects a guard clause not followed by empty line when guard clause including heredoc 260s registers an offense and corrects a next guard clause not followed by empty line when guard clause is after heredoc including string interpolation 260s registers an offense and corrects a `raise` guard clause not followed by empty line when `if` condition is after heredoc 260s accepts a guard clause when the next line is `ensure` 261s accepts a guard clause that is after a multiline heredoc nested argument call 261s registers no offenses using heredoc with `and return` before guard condition with empty line 261s accepts a guard clause after a single line heredoc 261s accepts a guard clause followed by end 261s accepts a guard clause when the next line is `rescue` 261s accepts using guard clause is after `rubocop:enable` comment 261s accepts a guard clause that is after a multiline heredoc with chained calls 261s does not register an offense when the clause is not followed by other code 261s accepts a modifier if when the next line is `end` 261s accepts a `raise` guard clause not followed by empty line when guard clause is after condition without method invocation 261s does not register an offense when the clause ends with a semicolon but is followed by a newline 261s 261s RuboCop::Cop::Style::EmptyElse 261s when `AllowComments: true` 261s given an unless-statement 261s with comment and empty else-clause 261s doesn't register an offense 261s with not comment and nil else-clause 261s registers an offense 261s with not comment and empty else-clause 261s registers an offense 261s with comment and nil else-clause 261s doesn't register an offense 261s given an if-statement 261s with comment and nil else-clause 261s doesn't register an offense 261s with not comment and nil else-clause 261s registers an offense 261s with comment and empty else-clause 261s doesn't register an offense 261s with not comment and empty else-clause 261s registers an offense 261s given a case statement 261s with not comment and empty else-clause 261s registers an offense 261s with comment and nil else-clause 261s doesn't register an offense 261s with not comment and nil else-clause 261s registers an offense 261s with comment and empty else-clause 261s doesn't register an offense 261s with nested if and case statement 261s behaves like autocorrect 261s MissingElse is case 261s does not autocorrect 261s MissingElse is both 261s does not autocorrect 261s MissingElse is if 261s does autocorrection 261s MissingElse is disabled 261s does autocorrection 261s configured to warn on empty else and nil in else 261s given an unless-statement 261s with an else-clause containing only the literal nil 261s behaves like autocorrect 261s MissingElse is if 261s does not autocorrect 261s MissingElse is case 261s does autocorrection 261s MissingElse is both 261s does not autocorrect 261s MissingElse is disabled 261s does autocorrection 261s with a completely empty else-clause 261s behaves like autocorrect 261s MissingElse is disabled 261s does autocorrection 261s MissingElse is if 261s does not autocorrect 261s MissingElse is both 261s does not autocorrect 261s MissingElse is case 261s does autocorrection 261s with an else-clause with side-effects 261s doesn't register an offense 261s with no else-clause 261s doesn't register an offense 261s given an if-statement 261s with an else-clause with side-effects 261s doesn't register an offense 261s with no else-clause 261s doesn't register an offense 261s with an else-clause containing only the literal nil 261s with one elsif 261s behaves like autocorrect 261s MissingElse is both 261s does not autocorrect 261s MissingElse is if 261s does not autocorrect 261s MissingElse is disabled 261s does autocorrection 261s MissingElse is case 261s does autocorrection 261s with multiple elsifs 261s behaves like autocorrect 261s MissingElse is both 261s does not autocorrect 261s MissingElse is case 261s does autocorrection 261s MissingElse is if 261s does not autocorrect 261s MissingElse is disabled 261s does autocorrection 261s with a completely empty else-clause 261s behaves like autocorrect 261s MissingElse is disabled 261s does autocorrection 261s MissingElse is if 261s does not autocorrect 261s MissingElse is both 261s does not autocorrect 261s MissingElse is case 261s does autocorrection 261s given a case statement 261s with no else-clause 261s doesn't register an offense 261s with a completely empty else-clause 261s behaves like autocorrect 261s MissingElse is case 261s does not autocorrect 261s MissingElse is disabled 261s does autocorrection 261s MissingElse is both 261s does not autocorrect 261s MissingElse is if 261s does autocorrection 261s with an else-clause containing only the literal nil 261s behaves like autocorrect 261s MissingElse is if 261s does autocorrection 261s MissingElse is disabled 261s does autocorrection 261s MissingElse is both 261s does not autocorrect 261s MissingElse is case 261s does not autocorrect 261s with an else-clause with side-effects 261s doesn't register an offense 261s configured to warn on nil in else 261s given a case statement 261s with no else-clause 261s doesn't register an offense 261s with a completely empty else-clause 261s doesn't register an offense 261s with an else-clause with side-effects 261s doesn't register an offense 261s with an else-clause containing only the literal nil 261s using semicolons 261s behaves like autocorrect 261s MissingElse is case 261s does not autocorrect 261s MissingElse is both 261s does not autocorrect 261s MissingElse is disabled 261s does autocorrection 261s MissingElse is if 261s does autocorrection 261s when the result is assigned to a variable 261s behaves like autocorrect 261s MissingElse is case 261s does not autocorrect 261s MissingElse is disabled 261s does autocorrection 261s MissingElse is if 261s does autocorrection 261s MissingElse is both 261s does not autocorrect 261s given an if-statement 261s with an else-clause with side-effects 261s doesn't register an offense 261s with an else-clause containing only the literal nil 261s when the result is assigned to a variable 261s behaves like autocorrect 261s MissingElse is disabled 261s does autocorrection 261s MissingElse is case 261s does autocorrection 261s MissingElse is if 261s does not autocorrect 261s MissingElse is both 261s does not autocorrect 261s when standalone 261s behaves like autocorrect 261s MissingElse is both 261s does not autocorrect 261s MissingElse is if 261s does not autocorrect 261s MissingElse is disabled 261s does autocorrection 261s MissingElse is case 261s does autocorrection 261s with an else-clause containing only the literal nil using semicolons 261s with multiple elsifs 261s behaves like autocorrect 261s MissingElse is both 261s does not autocorrect 261s MissingElse is if 261s does not autocorrect 261s MissingElse is disabled 261s does autocorrection 261s MissingElse is case 261s does autocorrection 261s with one elsif 261s behaves like autocorrect 261s MissingElse is case 261s does autocorrection 261s MissingElse is if 261s does not autocorrect 261s MissingElse is both 261s does not autocorrect 261s MissingElse is disabled 261s does autocorrection 261s with a completely empty else-clause 261s doesn't register an offense 261s with no else-clause 261s doesn't register an offense 261s given an unless-statement 261s with an else-clause containing only the literal nil 261s behaves like autocorrect 261s MissingElse is both 261s does not autocorrect 261s MissingElse is case 261s does autocorrection 261s MissingElse is disabled 261s does autocorrection 261s MissingElse is if 261s does not autocorrect 261s with an else-clause with side-effects 261s doesn't register an offense 261s with a completely empty else-clause 261s doesn't register an offense 261s with no else-clause 261s doesn't register an offense 261s configured to warn on empty else 261s given an unless-statement 261s with no else-clause 261s doesn't register an offense 261s with an else-clause containing only the literal nil 261s doesn't register an offense 261s with a completely empty else-clause 261s behaves like autocorrect 261s MissingElse is if 261s does not autocorrect 261s MissingElse is both 261s does not autocorrect 261s MissingElse is case 261s does autocorrection 261s MissingElse is disabled 261s does autocorrection 261s with an else-clause with side-effects 261s doesn't register an offense 261s given a case statement 261s with no else-clause 261s doesn't register an offense 261s with an else-clause with side-effects 261s doesn't register an offense 261s with a completely empty else-clause 261s behaves like autocorrect 261s MissingElse is both 261s does not autocorrect 261s MissingElse is case 261s does not autocorrect 261s MissingElse is if 261s does autocorrection 261s MissingElse is disabled 261s does autocorrection 261s with an else-clause containing only the literal nil 261s doesn't register an offense 261s given an if-statement 261s in an if-statement 261s behaves like autocorrect 261s MissingElse is both 261s does not autocorrect 261s MissingElse is disabled 261s does autocorrection 261s MissingElse is if 261s does not autocorrect 261s MissingElse is case 261s does autocorrection 261s with a completely empty else-clause 261s not using semicolons 261s behaves like autocorrect 261s MissingElse is case 261s does autocorrection 261s MissingElse is if 261s does not autocorrect 261s MissingElse is both 261s does not autocorrect 261s MissingElse is disabled 261s does autocorrection 261s using semicolons 261s behaves like autocorrect 261s MissingElse is if 261s does not autocorrect 261s MissingElse is case 261s does autocorrection 261s MissingElse is disabled 261s does autocorrection 261s MissingElse is both 261s does not autocorrect 261s with an empty comment 261s does not autocorrect 261s with no else-clause 261s doesn't register an offense 261s with an else-clause with side-effects 261s doesn't register an offense 261s with an else-clause containing only the literal nil 261s doesn't register an offense 261s 261s RuboCop::Cop::Lint::SuppressedException 261s with AllowComments set to true 261s registers an offense for empty rescue on single line with a comment after it 261s does not register an offense for empty rescue with comment 261s Ruby 2.5 or higher 261s when empty rescue for `do` block 261s does not register an offense for empty rescue with comment 261s registers an offense for empty rescue without comment 261s Ruby 2.7 or higher 261s when empty rescue for `do` block with a numbered parameter 261s registers an offense for empty rescue without comment 261s does not register an offense for empty rescue with comment 261s when empty rescue for `defs` 261s registers an offense for empty rescue without comment 261s does not register an offense for empty rescue with comment 261s when empty rescue for `def` 261s does not register an offense for empty rescue with comment 261s registers an offense for empty rescue without comment 261s with AllowComments set to false 261s does not register an offense for rescue with body 261s registers an offense for empty rescue block 261s when empty rescue for `def` 261s registers an offense for empty rescue with comment 261s registers an offense for empty rescue without comment 261s with AllowNil set to true 261s does not register an offense for rescue block with nil 261s does not register an offense for inline nil rescue 261s with AllowNil set to false 261s registers an offense for rescue block with nil 261s registers an offense for inline nil rescue 261s when empty rescue for defs 261s registers an offense for empty rescue without comment 261s registers an offense for empty rescue with comment 261s Ruby 2.5 or higher 261s when empty rescue for `do` block 261s registers an offense for empty rescue without comment 261s registers an offense for empty rescue with comment 261s 261s RuboCop::Cop::Style::MultilineIfModifier 261s unless guard clause 261s registers an offense 261s allows a one liner 261s registers an offense when indented 261s allows a multiline condition 261s if guard clause 261s registers an offense when indented 261s allows a one liner 261s allows a multiline condition 261s registers an offense 261s 261s RuboCop::Cop::Style::BlockComments 261s autocorrects an empty block comment by removing it 261s registers an offense for block comments 261s autocorrects a block comment into a regular comment (without trailingnewline) 261s autocorrects a block comment into a regular comment 261s accepts regular comments 261s 261s RuboCop::Cop::Style::SingleLineMethods 261s accepts a multi-line method 261s does not crash on an method with a capitalized name 261s autocorrects def with semicolon before end 261s registers an offense for a single-line method 261s autocorrects def with argument and no parentheses 261s autocorrects def with semicolon after method name 261s registers an offense for a single-line method and method body is enclosed in parentheses 261s autocorrects def with argument in parentheses 261s autocorrects defs with parentheses after method name 261s when `Style/EndlessMethod` is enabled 261s with `allow_always` style 261s behaves like convert to endless method 261s does not to an endless class method definition when using `return` 261s corrects to multiline method definition when defining setter method 261s retains comments 261s corrects to an endless class method definition when using > 261s corrects to an endless class method definition 261s does not to an endless class method definition when using `next` 261s does not add parens if they are already present 261s corrects to an endless class method definition when using <= 261s corrects to an endless class method definition when using === 261s corrects to an endless method definition 261s corrects to an endless class method definition when using >= 261s corrects to a normal method if the method body contains multiple statements 261s corrects to an endless class method definition when using == 261s corrects to an endless class method definition when using < 261s corrects to an endless method definition when single line method call with parentheses 261s does not to an endless class method definition when using `break` 261s corrects to an endless method definition when method body is a literal 261s handles arguments properly 261s corrects to an endless method definition when single line method call without parentheses 261s corrects to an endless class method definition when using != 261s with AllowIfMethodIsEmpty: false 261s does not turn a method with no body into an endless method 261s with AllowIfMethodIsEmpty: true 261s does not correct 261s with `disallow` style 261s corrects to an normal method 261s prior to ruby 3.0 261s corrects to a multiline method 261s with `allow_single_line` style 261s behaves like convert to endless method 261s corrects to an endless class method definition when using === 261s corrects to an endless class method definition when using < 261s does not to an endless class method definition when using `return` 261s corrects to an endless method definition when method body is a literal 261s corrects to an endless class method definition when using <= 261s does not to an endless class method definition when using `break` 261s corrects to an endless method definition when single line method call without parentheses 261s corrects to a normal method if the method body contains multiple statements 261s corrects to an endless class method definition when using == 261s corrects to an endless class method definition when using >= 261s does not add parens if they are already present 261s does not to an endless class method definition when using `next` 261s corrects to an endless class method definition 261s corrects to an endless method definition 261s corrects to multiline method definition when defining setter method 261s corrects to an endless class method definition when using > 261s handles arguments properly 261s corrects to an endless method definition when single line method call with parentheses 261s retains comments 261s corrects to an endless class method definition when using != 261s with AllowIfMethodIsEmpty: false 261s does not turn a method with no body into an endless method 261s with AllowIfMethodIsEmpty: true 261s does not correct 261s when `Style/EndlessMethod` is disabled 261s corrects to an normal method 261s when AllowIfMethodIsEmpty is disabled 261s registers an offense for an empty method 261s endless methods 261s does not register an offense 261s when AllowIfMethodIsEmpty is enabled 261s accepts a single-line empty method 261s 261s RuboCop::Cop::Style::ArrayCoercion 261s does not register an offense when converting variable into other named array variable with check 261s registers an offense and corrects when splatting variable into array 261s does not register an offense when splatting multiple variables into array 261s registers an offense and corrects when converting variable into array with check 261s does not register an offense when splat is not in array 261s 261s RuboCop::Cop::Layout::FirstHashElementIndentation 261s when hash is operand 261s accepts correctly indented first pair 261s registers an offense and corrects incorrectly indented } 261s registers an offense and corrects incorrectly indented first pair 261s when hash is right hand side in assignment 261s accepts an empty hash 261s accepts single line hash 261s registers an offense and corrects incorrectly indented first pair 261s accepts correctly indented first pair 261s accepts a first pair on the same line as the left brace 261s accepts several pairs per line 261s when indentation width is overridden for this cop 261s registers an offense and corrects incorrectly indented first pair 261s accepts correctly indented first pair 261s when EnforcedStyle is align_braces 261s 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 261s accepts single line hash 261s accepts correctly indented first pair 261s accepts an empty hash 261s accepts a first pair on the same line as the left brace 261s registers an offense for incorrectly indented hash that is the value of a single pair hash 261s accepts several pairs per line 261s registers an offense and corrects incorrectly indented } 261s when 'consistent' style is used 261s registers an offense and corrects incorrect indentation 261s when 'special_inside_parentheses' style is used 261s registers an offense and corrects incorrect indentation 261s when the HashAlignment style is separator for => 261s registers an offense and corrects incorrectly indented first pair with => 261s accepts correctly indented first pair 262s registers an offense and corrects incorrectly indented } 262s when hash is argument to setter 262s registers an offense and corrects incorrectly indented first pair 262s accepts correctly indented first pair 262s when the HashAlignment style is separator for : 262s accepts correctly indented first pair 262s registers an offense and corrects incorrectly indented first pair with : 262s registers an offense and corrects incorrectly indented } 262s when hash is method argument 262s and arguments are surrounded by parentheses 262s and EnforcedStyle is consistent 262s registers an offense and corrects incorrect indentation 262s accepts normal indentation for second argument 262s 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 262s accepts normal indentation for first argument 262s 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 262s registers an offense for incorrectly indented hash that is the value of a single pair hash 262s accepts indent based on the left brace when the outer hash key and the left brace is not on the same line 262s and EnforcedStyle is special_inside_parentheses 262s accepts normal indentation for hash within hash 262s accepts indent based on the preceding left parenthesiswhen the right brace and its following pair is on the same line 262s 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 262s registers an offense and corrects 'align_braces' indentation 262s registers an offense and corrects 'consistent' indentation 262s accepts indent based on the left brace when the outer hash key and the left brace is not on the same line 262s accepts special indentation for first argument 262s registers an offense for incorrectly indented hash that is the value of a single pair hash 262s accepts special indentation for second argument 262s when using safe navigation operator 262s registers an offense and corrects 'consistent' indentation 262s and argument are not surrounded by parentheses 262s registers an offense for incorrectly indented multi-line hash with braces 262s accepts a correctly indented multi-line hash with braces 262s accepts braceless hash 262s 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 262s accepts indent based on the left brace when the outer hash key and the left brace is not on the same line 262s accepts single line hash with braces 262s 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 262s 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 262s 262s RuboCop::Cop::Style::EmptyLiteral 262s Empty Hash 262s does not register an offense for Hash.new(3) 262s registers an offense for Hash.new() 262s does not register an offense for ::Hash.new(3) 262s does not register an offense for ::Hash.new { block } 262s autocorrects Hash.new to {} and wraps it in parentheses when it is the only argument to super 262s autocorrects Hash.new in block 262s registers an offense for Hash.new 262s does not register an offense for Hash.new { block } 262s registers an offense for ::Hash.new 262s autocorrects Hash.new to {} as the first parameter to a method 262s autocorrects Hash.new to {} and wraps all arguments in parentheses when it is the first argument to super 262s autocorrects Hash.new to {} as the only parameter to a method 262s autocorrects Hash.new to {} in various contexts 262s Ruby 2.7 262s does not register an offense for ::Hash.new { _1[_2] = [] } 262s does not register an offense for Hash.new { _1[_2] = [] } 262s Empty String 262s registers an offense for ::String.new 262s does not register an offense for ::String.new("top") 262s does not register an offense for String.new("top") 262s registers an offense for String.new() 262s registers an offense for String.new 262s when double-quoted string literals are preferred 262s registers an offense for String.new 262s registers an offense for ::String.new 262s when frozen string literals is enabled 262s does not register an offense for String.new 262s when Style/FrozenStringLiteral is enabled 262s and there is a frozen_string_literal: false comment 262s registers an offense and corrects 262s and there is no magic comment 262s does not register an offense 262s Empty Array 262s does not register an offense for ::Array.new with block 262s registers an offense for ::Array.new 262s does not register Array.new with block in other block 262s registers an offense for Array.new() 262s registers an offense for Array.new 262s does not register an offense for Array.new(3) 262s does not register an offense Array.new with block 262s autocorrects Array.new in block in block 262s 262s RuboCop::Cop::Metrics::CyclomaticComplexity 262s when AllowedPatterns is enabled 262s does not register an offense when using `define_method` 262s does not register an offense when defining a class method 262s does not register an offense when defining an instance method 262s when AllowedMethods is enabled 262s does not register an offense when defining a class method 262s does not register an offense when defining an instance method 262s does not register an offense when using `define_method` 262s when Max is 2 262s counts stupid nested if and else blocks 262s when Max is 1 262s registers an offense for a case/when block 262s registers an offense for an elsif block 262s registers an offense for a for block 262s registers an offense for && 262s accepts an empty method 262s registers an offense for a ternary operator 262s registers an offense for or 262s counts enumerating methods with blocks as +1 262s accepts a method with no decision points 262s accepts an empty `define_method` 262s registers an offense for a rescue block 262s registers an offense for &&= 262s registers an offense for an if modifier 262s counts enumerating methods with block-pass as +1 262s registers an offense for and 262s registers an offense for a `define_method` 262s registers an offense for an until block 262s counts only a single method 262s accepts complex code outside of methods 262s does not count blocks in general 262s registers an offense for ||= 262s registers an offense for an unless modifier 262s registers an offense for a while block 262s registers an offense for || 262s deals with nested if blocks containing && and || 262s registers an offense for &. 262s counts repeated &. on same untouched local variable as 1 262s Ruby 2.7 262s counts enumerating methods with numblocks as +1 262s 262s RuboCop::Cop::Layout::LeadingCommentSpace 262s does not register an offense for more than one # 262s accepts =begin/=end comments 262s registers an offense and corrects comment without leading space 262s does not register an offense for only #s 262s registers an offense and corrects #! after the first line 262s does not register an offense for #! on first line 262s accepts sprockets directives 262s does not register an offense for more than one space 262s does not register an offense for # followed by no text 262s file named config.ru 262s registers an offense and corrects for #\ after the first line 262s does not register an offense for #\ on first line 262s file not named config.ru 262s registers an offense and corrects #\ after the first line 262s registers an offense and corrects #\ on first line 262s RDoc syntax 262s does not register an offense when using `#++` or `#--` 262s registers an offense when starting `:` 262s Gemfile Ruby comment 262s when config option is disabled 262s registers an offense when using ruby config as comment 262s when config option is enabled 262s file named Gemfile 262s does not register an offense when using ruby config as comment 262s file not named Gemfile 262s registers an offense when using ruby config as comment 262s Doxygen style 262s when config option is enabled 262s does not register offense when using Doxygen style 262s when config option is disabled 262s registers an offense and corrects using Doxygen style 262s 262s RuboCop::Cop::Style::EmptyLambdaParameter 262s accepts a keyword lambda 262s registers an offense for an empty block parameter with a lambda 262s does not crash on a super 262s 262s RuboCop::Cop::Generator::RequireFileInjector 262s when using an unknown department 262s inserts a `require_relative` statement to the bottom of the file 262s when a cop of style department already exists 262s injects a `require_relative` statement on the end of style department 262s when a `require` entry already exists 262s does not write to any file 262s when a `require_relative` entry does not exist from before 262s injects a `require_relative` statement on the right line in the root file 262s 262s RuboCop::Cop::Lint::NoReturnInBeginEndBlocks 262s accepts a block with no return when using /= 262s accepts a block with no return when using = 262s accepts a block with no return when using += 262s rejects a return statement inside a block when using += 262s rejects a return statement inside a block when using = 262s accepts a block with no return when using -= 262s rejects a return statement inside a block when using /= 262s accepts a block with no return when using *= 262s rejects a return statement inside a block when using **= 262s rejects a return statement inside a block when using ||= 262s rejects a return statement inside a block when using *= 262s rejects a return statement inside a block when using -= 262s accepts a block with no return when using ||= 262s accepts a block with no return when using **= 262s 262s RuboCop::Cop::Bundler::GemVersion 262s when EnforcedStyle is set to forbidden 262s does not flag gems without a specified version 262s does not flag gems included in AllowedGems metadata 262s flags gems that specify a gem version 262s when EnforcedStyle is set to required (default) 262s does not flag gems included in AllowedGems metadata 262s flags gems that do not specify a version 262s does not flag gems with a specified version 262s 262s RuboCop::Cop::Style::HashLikeCase 262s MinBranchesCount: 2 262s does not register an offense when using `case-when` with non-literal bodies 262s does not register an offense when using `case-when` with literals of different types as conditions 262s does not register an offense when using `case-when` with literal bodies of different types 262s registers an offense when using `case-when` with symbol conditions and literal bodies of the same type 262s registers an offense when using `case-when` with string conditions and literal bodies of the same type 262s does not register an offense when `case` has an `else` branch 262s does not register an offense when using `case-when` with non-literals in conditions 262s MinBranchesCount: 3 262s does not register an offense when branches count is less than required 262s 262s RuboCop::CLI --auto-gen-config 262s --auto-gen-config 262s overwrites an existing todo file 262s generates EnforcedStyle parameter if it solves all offenses 263s does not include a timestamp when --no-auto-gen-timestamp is used 263s can generate a todo list 263s generates Exclude if no EnforcedStyle solves all offenses 264s generates Exclude instead of Max when --auto-gen-only-exclude is used 264s generates a todo list that removes the reports 264s honors rubocop:disable comments 264s can be called when there are no files to inspection 264s can generate Exclude properties with a given limit 265s includes --auto-gen-only-exclude in the command comment when given 265s does not include offense counts when --no-offense-counts is used 265s does not generate configuration for the Syntax cop 265s when --no-exclude-limit is given 265s always prefers Exclude to Enabled 265s when existing config file has a YAML document start header 266s inserts `inherit_from` key after hearder 266s when working with a cop who do not support autocorrection 266s can generate a todo list 266s when --config is used 266s can generate a todo list 266s can generate a todo list if default .rubocop.yml exists 266s when .rubocop.yml inherits from two other files 266s bases other cops' configuration on the code base's current maximum line length 266s when .rubocop.yml inherits from another file 267s bases other cops' configuration on the code base's current maximum line length 267s when .rubocop.yml inherits from another file and .rubocop_todo.yml 267s bases other cops' configuration on the code base's current maximum line length 267s when hash value omission enabled 267s generates Exclude if it solves all offenses 267s with Layout/LineLength:Max overridden 267s when .rubocop.yml has Layout/LineLength disabled 267s skips the cop from both phases of the run 267s when .rubocop.yml has Layout/LineLength:Max more than code base max 267s bases other cops' configuration on the overridden LineLength:Max 267s when .rubocop.yml has Layout/LineLength:Max less than code base max 268s bases other cops' configuration on the overridden LineLength:Max 268s when inheriting from a URL 268s when there is a single entry 268s can generate a todo list 268s when there are multiple entries 268s can generate a todo list 268s when .rubocop.yml does not exist 268s bases other cops' configuration on the code base's current maximum line length 268s when .rubocop.yml is empty 269s bases other cops' configuration on the code base's current maximum line length 269s for existing configuration with Exclude 269s leaves out Excludes that appear in .rubocop.yml but are merged for the cop 269s generates Excludes that appear in .rubocop.yml 270s leaves out Excludes that appear in .rubocop.yml but are merged globally 270s console output 270s displays report summary but no offenses 270s when working in a subdirectory 270s can generate a todo list 270s when cop is not safe to autocorrect 270s can generate a todo list, with the appropriate flag 270s when duplicated default configuration parameter 271s parameters are displayed without duplication 271s when .rubocop.yml inherits only from .rubocop_todo.yml in an array 271s bases other cops' configuration on the code base's current maximum line length 271s when different styles appear in different files 271s generates Exclude list if --exclude-limit is not exceeded 271s disables cop if --exclude-limit is exceeded 271s when .rubocop.yml doesn't inherit 271s bases other cops' configuration on the code base's current maximum line length 271s when .rubocop.yml inherits only from .rubocop_todo.yml 272s bases other cops' configuration on the code base's current maximum line length 272s 272s RuboCop::Cop::Lint::EmptyInPattern 272s when a `in` body is present 272s accepts `case` with `in` ... `then` statements and else clause 272s accepts `case` with `in` bodies 272s accepts `case` with `in` ... `then` statements 272s accepts `case` with `in` bodies and `else` clause 272s when a `in` body is missing 272s registers an offense for missing `in` ... then `body` followed by `else` 272s registers an offense for missing `in` body with a comment followed by `else` 272s registers an offense for missing `in` body with a comment 272s registers an offense for missing `in` ... `then` body 272s registers an offense for missing `in` body followed by `else` 272s registers an offense for a missing `in` body 272s when `AllowComments: true` 272s registers an offense for empty `in` when comment is in another branch 272s accepts an empty `in` body with a comment 272s when `AllowComments: false` 272s registers an offense for empty `in` body with a comment 272s 272s RuboCop::Cop::Lint::IdentityComparison 272s does not register an offense when using `==` 272s does not register an offense when lhs is `object_id` without receiver 272s does not register an offense when using `==` for comparison between `object_id` and other 272s does not register an offense when a receiver that is not `object_id` uses `==` 272s does not register an offense when rhs is `object_id` without receiver 272s registers an offense and corrects when using `==` for comparison between `object_id`s 272s 272s RuboCop::Cop::Style::RedundantSelfAssignment 272s registers an offense and corrects when assigning to attribute of `self` 272s registers an offense and corrects when assigning to attribute of non `self` 272s does not register an offense when lhs and receiver are different 272s does not register an offense when assigning to attribute of `self` the result from other object 272s does not register an offense when there is no a receiver 272s when lhs and receiver are the same 272s registers an offense and corrects when assigning to local variable 272s registers an offense and corrects when assigning to class variable 272s registers an offense and corrects when assigning to global variable 272s registers an offense and corrects when assigning to instance variable 272s 272s RuboCop::Cop::Style::Send 272s with __send__ 272s and with a receiver 272s does not register an offense for an invocation without args 272s does not register an offense for an invocation with args 272s and without a receiver 272s does not register an offense for an invocation with args 272s does not register an offense for an invocation without args 272s with public_send 272s and without a receiver 272s does not register an offense for an invocation with args 272s does not register an offense for an invocation without args 272s and with a receiver 272s does not register an offense for an invocation without args 272s does not register an offense for an invocation with args 272s with send 272s and with a receiver 272s registers an offense for an invocation with args 272s does not register an offense for an invocation without args 272s when using safe navigation operator 272s registers an offense for an invocation with args 272s and without a receiver 272s does not register an offense for an invocation without args 272s registers an offense for an invocation with args 272s 272s RuboCop::Cop::Style::DoubleNegation 272s when `EnforcedStyle: allowed_in_returns` 272s does not register an offense for `!!` with array when return location and using `case`, `when`, and `else` 272s does not register an offense for `!!` when return location by `define_method` 272s registers an offense and corrects for `!!` with hash when not return locationand using `if`, `elsif`, and `else` 272s registers an offense and corrects for `!!` with array when not return locationand using `case`, `when`, and `else` 272s registers an offense and corrects for `!!` with single-line hash at return location 272s registers an offense and corrects for `!!` with array when not return locationand using `if`, `elsif`, and `else` 272s does not register an offense for `!!` with array when return location and using `if`, `elsif`, and `else` 272s does not register an offense for `!!` when return location and using `rescue` and `ensure` 272s registers an offense and corrects for `!!` with complex array at return location 272s registers an offense and corrects for `!!` when not return locationand using `if`, `elsif`, and `else` 272s does not register an offense for `!!` when return location and using `ensure` 272s registers an offense and corrects for `!!` with hash when not return locationand using `case`, `when`, and `else` 272s does not register an offense for `!!` with hash when return location and using `if`, `elsif`, and `else` 272s does not register an offense for `!!` when using `return` keyword 272s registers an offense and corrects for `!!` with multi-line hash at return location 272s registers an offense and corrects for `!!` with nested hash at return location 272s does not register an offense for `!!` when return location 272s does not register an offense for ! 272s does not register an offense for `!!` when return location and using `case`, `when`, and `else` 272s registers an offense and corrects for `!!` when not return location and using `unless` 272s does not register an offense for `!!` when return location and using `unless` 272s registers an offense and corrects for `!!` with multi-line array at return location 272s does not register an offense for `!!` when return location and using `rescue` 272s registers an offense and corrects for `!!` with nested array at return location 272s registers an offense and corrects for `!!` when not a return location 272s does not register an offense for `!!` when return location by `define_singleton_method` 272s does not register an offense for `!!` when return location and using `if`, `elsif`, and `else` 272s registers an offense and corrects for `!!` with single-line array at return location 272s does not register an offense for `!!` with hash when return location and using `case`, `when`, and `else` 272s registers an offense and corrects for `!!` 272s does not register an offense for `not not` 272s registers an offense and corrects for `!!` when not return locationand using `case`, `when`, and `else` 272s does not register an offense for `!!` when return location and using `rescue`, `else`, and `ensure` 272s Ruby >= 2.7 272s registers an offense and corrects for `!!` when not return locationand using `case`, `in`, and `else` 272s Ruby >= 2.7 272s does not register an offense for `!!` when return location and using `case`, `in`, and `else` 272s when `EnforcedStyle: forbidden` 272s registers an offense for `!!` when return location and using `rescue` 272s does not register an offense for `not not` 272s registers an offense and corrects for `!!` when not a return location 272s does not register an offense for ! 272s registers an offense for `!!` when return location and using `rescue`, `else`, and `ensure` 272s registers an offense for `!!` when return location and using `ensure` 272s registers an offense for `!!` when return location and using `rescue` and `ensure` 272s registers an offense and corrects for `!!` when return location 272s registers an offense and corrects for `!!` when using `return` keyword 272s registers an offense and corrects for `!!` 272s 272s RuboCop::Cop::Lint::RedundantStringCoercion 272s registers an offense and corrects `to_s` in interpolation 272s registers an offense and corrects an implicit receiver 272s accepts interpolation without #to_s 272s does not explode on empty interpolation 272s accepts #to_s with arguments in an interpolation 272s registers an offense and corrects `to_s` in an interpolation with several expressions 272s 272s RuboCop::Cop::Severity 272s is frozen 272s overrides #to_s 272s has a few required attributes 272s redefines == to compare severities 272s #level 272s error 272s is expected to eq 5 272s fatal 272s is expected to eq 6 272s refactor 272s is expected to eq 2 272s warning 272s is expected to eq 4 272s convention 272s is expected to eq 3 272s info 272s is expected to eq 1 272s Comparable 272s convention 272s is expected to be < warning 272s warning 272s is expected to be < error 272s refactor 272s is expected to be < convention 272s error 272s is expected to be < fatal 272s info 272s is expected to be < refactor 272s constructs from code 272s W 272s is expected to eq # 272s R 272s is expected to eq # 272s F 272s is expected to eq # 272s E 272s is expected to eq # 272s C 272s is expected to eq # 272s I 272s is expected to eq # 272s #code 272s info 272s is expected to eq "I" 272s warning 272s is expected to eq "W" 272s error 272s is expected to eq "E" 272s refactor 272s is expected to eq "R" 272s convention 272s is expected to eq "C" 272s fatal 272s is expected to eq "F" 272s 272s RuboCop::Cop::Layout::FirstArrayElementLineBreak 272s ignores properly formatted implicit arrays 272s ignores elements listed on a single line 272s array nested in a method call 272s registers an corrects the offense 272s elements listed on the first line 272s registers and corrects the offense 272s word arrays 272s registers and corrects the offense 272s send implicit arrays 272s registers and corrects the offense 272s masgn implicit arrays 272s registers and corrects the offense 272s 272s RuboCop::Cop::Style::RedundantInitialize 272s registers an offense for an `initialize` method with a default argument that does nothing 272s does not register an offense for an `initialize` method that calls another method 272s does not register an offense for an `initialize` method that calls `super` with no arguments 272s registers and corrects an offense for an `initialize` method with no arguments that calls `super` with no arguments 272s does not register an offense for an `initialize` method that calls another method after `super` 272s does not register an offense for an `initialize` method with a default keyword argument that calls `super` 272s does not register an offense for an empty `initialize` method with a argument forwarding` 272s does not register an offense for an empty `initialize` method with a splat` and super 272s does not register an offense for an `initialize` method that calls another method before `super` 272s does not register an offense for an empty method not named `initialize` 272s does not register an offense for an `initialize` method with a default argument that calls `super` 272s does not register an offense for a method not named `initialize` that only calls super 272s does not register an offense for an empty `initialize` method with a kwsplat` 272s registers and corrects an offense for an `initialize` method that only calls `super` 272s registers and corrects an offense for an `initialize` method with arguments that only calls `super` 272s registers and corrects an offense for an `initialize` method with arguments that only calls `super` with explicit args 272s does not register an offense for an empty `initialize` method with a splat` 272s does not register an offense for an `initialize` method with only a comment 272s registers and corrects an offense for an empty `initialize` method 272s registers an offense for an `initialize` method with a default keyword argument that does nothing 272s does not register an offense for an `initialize` method that calls `super` with a different argument list 272s when `AllowComments: false` 272s registers and corrects an offense for an `initialize` method with only a comment 272s 272s RuboCop::RemoteConfig 272s .file 272s downloads the file if cache lifetime has been reached 272s downloads the file if the file does not exist 272s does not download the file if cache lifetime has not been reached 272s when remote URL is configured with basic auth 272s downloads the file if cache lifetime has been reached 272s downloads the file if the file does not exist 272s does not download the file if cache lifetime has not been reached 272s when the remote URL responds with 500 272s raises error 272s when the remote URL responds with 404 272s raises error 272s when remote URL is configured with token auth 272s downloads the file if cache lifetime has been reached 272s downloads the file if the file does not exist 272s does not download the file if cache lifetime has not been reached 272s when the remote URL responds with 404 272s raises error 272s when the network is inaccessible 272s reuses the existing cached file 272s when the remote URL responds with 500 272s raises error 272s when the remote URL responds with redirect 272s follows the redirect and downloads the file 272s when the remote URL responds with not modified 272s reuses the existing cached file 272s .inherit_from_remote 272s when the remote includes file starting with `./` 272s returns remote includes URI 272s 272s RuboCop::Cop::Lint::EmptyBlock 272s does not register an offense when block is not empty 272s registers an offense for empty block within method call 272s does not register an offense on an empty lambda 272s does not register an offense for empty block with inline comments 272s registers an offense for an empty block given to a non-Kernel `proc` method 272s does not register an offense on an empty Proc.new 272s does not register an offense on an empty proc 272s does not register an offense for empty block with inner comments 272s does not register an offense on an empty stabby lambda 272s does not register an offense on an empty ::Proc.new 272s when AllowComments is false 272s registers an offense for empty block with inline comments 272s registers an offense for empty block with inner comments 272s when AllowEmptyLambdas is false 272s registers an offense for an empty stabby lambda 272s registers an offense on an empty Proc.new 272s registers an offense for an empty lambda 272s registers an offense on an empty ::Proc.new 272s registers an offense on an empty proc 272s 272s RuboCop::Cop::Lint::ImplicitStringConcatenation 272s on a single string literal 272s does not register an offense 272s on adjacent string literals on different lines 272s does not register an offense 272s when in a method call's argument list 272s notes that the strings could be separated by a comma instead 272s when the string literals contain newlines 272s does not register an offense for a single string 272s registers an offense 272s when inside an array 272s notes that the strings could be separated by a comma instead 272s on adjacent string literals on the same line 272s registers an offense 272s on a string with interpolations 272s does register an offense 272s 272s RuboCop::Formatter::FormatterSet 272s responds to all formatter API methods 272s add_formatter 272s adds a formatter to itself 272s adds a formatter with specified formatter type 272s can add multiple formatters by being invoked multiple times 272s when output path is specified 272s adds a formatter outputs to the specified file 272s when parent directories don't exist 272s creates them 272s when output path is omitted 272s adds a formatter outputs to $stdout 272s #builtin_formatter_class 272s returns class which matches passed alias name exactly 272s returns class which matches double character alias name 272s returns class which matches single character alias name 272s #custom_formatter_class 272s can handle top level namespaced constant name 272s can handle namespaced constant name 272s returns constant represented by the passed string 272s when non-existent constant name is passed 272s raises error 272s formatter API method 272s invokes the same method of all containing formatters 272s #close_output_files 272s closes all output files 272s does not close non file output 272s 272s RuboCop::Cop::InternalAffairs::ExampleHeredocDelimiter 272s when unexpected heredoc delimiter is used but heredoc body contains an expected delimiter line 272s does not register an offense 272s when unexpected heredoc delimiter is used at non RuboCop specific expectation 272s does not register an offense 272s when expected heredoc delimiter is used at RuboCop specific expectation 272s does not register an offense 272s when unexpected heredoc delimiter is used in multi-line heredoc 272s registers an offense 272s when unexpected heredoc delimiter is used in single-line heredoc 272s registers an offense 272s 272s RuboCop::Cop::Layout::RescueEnsureAlignment 272s accepts aligned rescue in do-end block with `.()` call 272s accepts aligned rescue in do-end block on and-assignment 272s accepts aligned rescue in do-end block on operation assignment 272s accepts aligned rescue in assigned do-end block starting on newline 272s accepts correctly aligned rescue 272s accepts correctly aligned rescue in assigned begin-end block 272s accepts aligned rescue in do-end block assigned to instance variable 272s accepts aligned rescue in do-end block assigned to global variable 272s accepts rescue and ensure on the same line 272s accepts the modifier form 272s accepts aligned rescue with do-end block that line break with leading dot for method calls 272s accepts correctly aligned ensure 272s accepts aligned rescue in do-end block 272s accepts correctly aligned rescue/ensure with def 272s accepts aligned rescue in do-end block assigned to class 272s accepts aligned rescue in do-end block in a method 272s accepts aligned rescue do-end block assigned to local variable 272s accepts end being misaligned 272s accepts correctly aligned rescue/ensure with def with no body 272s accepts aligned rescue in do-end block on multi-assignment 272s accepts aligned rescue in do-end block on or-assignment 272s accepts aligned rescue with do-end block that line break with trailing dot for method calls 272s accepts aligned rescue in do-end block assigned to class variable 272s allows inline expression before 272s rescue 272s registers an offense 272s ensure 272s registers an offense 272s rescue with module 272s registers an offense when rescue used with module 272s ensure with begin 272s registers an offense when ensure used with begin 272s rescue with do-end block 272s registers an offense 272s excluded file 272s processes excluded files with issue 272s rescue in do-end block on multi-assignment 272s registers an offense 272s rescue in do-end block on or-assignment 272s registers an offense 272s rescue in do-end block assigned to global variable 272s registers an offense 272s rescue with class 272s registers an offense when rescue used with class 272s allows inline access modifier 272s with public_class_method modifier 272s ensure with defs 272s correct alignment 272s registers an offense 272s rescue with def 272s registers an offense 272s correct alignment 272s ensure with def 272s correct alignment 272s registers an offense 272s rescue with defs 272s correct alignment 272s registers an offense 272s with private_class_method modifier 272s rescue with defs 272s correct alignment 272s registers an offense 272s ensure with defs 272s correct alignment 272s registers an offense 272s ensure with def 272s correct alignment 272s registers an offense 272s rescue with def 272s correct alignment 272s registers an offense 272s with private modifier 272s rescue with def 272s registers an offense 272s correct alignment 272s rescue with defs 272s registers an offense 272s correct alignment 272s ensure with defs 272s registers an offense 272s correct alignment 272s ensure with def 272s registers an offense 272s correct alignment 272s rescue in assigned do-end block starting on newline 272s registers an offense 272s ensure with class 272s registers an offense 272s rescue in do-end block assigned to local variable 272s registers an offense 272s ensure with def 272s registers an offense 272s rescue with defs 272s registers an offense 272s ensure with defs 272s registers an offense 272s rescue in do-end block on and-assignment 272s registers an offense 272s ensure with module 272s registers an offense when ensure used with module 272s rescue in do-end block assigned to class variable 272s registers an offense 272s rescue with begin 272s registers an offense 272s as RHS of assignment 272s when `EnforcedStyleAlignWith: begin` of `Layout/BeginEndAlignment` cop 272s accepts multi-line, aligned 272s registers an offense and corrects for incorrect alignment 272s accepts multi-line, indented 272s when `EnforcedStyleAlignWith: start_of_line` of `Layout/BeginEndAlignment` cop 272s accepts multi-line, aligned 272s registers an offense and corrects for incorrect alignment 272s accepts multi-line, indented 272s `Layout/BeginEndAlignment` cop is not enabled 272s registers an offense and corrects for incorrect alignment 272s accepts multi-line, indented 272s accepts multi-line, aligned 272s when using zsuper with block 272s registers and corrects an offense and corrects when incorrect alignment 272s does not register an offense when correct alignment 272s rescue in do-end block assigned to class 272s registers an offense 272s rescue in do-end block assigned to instance variable 272s registers an offense 272s rescue in do-end block on operation assignment 272s registers an offense 272s rescue with def 272s registers an offense 272s 272s RuboCop::Cop::Layout::EmptyLineAfterMagicComment 273s registers an offense for code that immediately follows comment 273s accepts a source file with only a magic comment 273s registers an offense for documentation immediately following comment 273s registers an offense when multiple magic comments without empty line 273s accepts magic comment with shareable_constant_value 273s accepts code that separates the comment from the code with a newline 273s accepts magic comment followed by encoding 273s registers an offense when code that immediately follows typed comment 273s accepts an empty source file 273s accepts magic comment with typed 273s registers offense when frozen_string_literal used with shareable_constant_value without empty line 273s 273s RuboCop::Cop::Layout::TrailingEmptyLines 273s when EnforcedStyle is final_blank_line 273s accepts final blank line 273s registers an offense for final newline 273s registers an offense for multiple blank lines in an empty file 273s autocorrects missing newline 273s registers an offense for no final newline 273s autocorrects missing blank line 273s registers an offense for multiple trailing blank lines 273s when EnforcedStyle is final_newline 273s registers an offense for no final newline after block comment 273s autocorrects even if some lines have space 273s registers an offense for multiple blank lines in an empty file 273s registers an offense for multiple trailing blank lines 273s registers an offense for no final newline after assignment 273s accepts an empty file 273s accepts final newline 273s accepts final blank lines if they come after __END__ in empty file 273s accepts final blank lines if they come after __END__ 273s 273s RuboCop::Cop::Style::SpecialGlobalVars 273s when style is use_perl_names 273s autocorrects #{$LOAD_PATH} to #$: 273s autocorrects $INPUT_RECORD_SEPARATOR to $/ 273s registers an offense for $LOADED_FEATURES 273s registers an offense for $PID 273s registers an offense for $PROCESS_ID 273s registers an offense for $PROGRAM_NAME 273s registers an offense for $LOAD_PATH 273s does not register an offense for backrefs like $1 273s when style is use_builtin_english_names 273s autocorrects non-preffered builtin names 273s does not register an offense for backrefs like $1 273s does not register an offenses for builtin names 273s does not register an offense for Perl names 273s generates correct auto-config when Perl variable names are used 273s generates correct auto-config when mixed styles are used 273s when style is use_english_names 273s when add require English is enabled 273s when English has not been required at top-level 273s adds require English for $$ in nested code 273s adds require English for twice `$*` in nested code 273s does not add for replacement outside of English lib 273s adds require English for $$ 273s when English is already required at top-level 273s leaves require English alone for $$ 273s moves require English above replacement 273s when add require English is disabled 273s registers an offense for $$ 273s autocorrects $/ to $INPUT_RECORD_SEPARATOR 273s generates correct auto-config when mixed styles are used 273s autocorrects #{$!} to #{$ERROR_INFO} 273s autocorrects #$: to #{$LOAD_PATH} 273s registers an offense for $" 273s generates correct auto-config when Perl variable names are used 273s is clear about variables from the English library vs those not 273s registers an offense for $0 273s registers an offense for $: 273s does not register an offense for backrefs like $1 273s 273s RuboCop::Cop::Style::TrailingBodyOnMethodDefinition 273s autocorrects body with method definition with args not in parens 273s accepts a method with multiple lines of body 273s accepts a method with one line of body 273s does not register offense with trailing body on method end 273s registers when body starts on def line & continues many more lines 273s removes semicolon from method definition but not body when autocorrecting 273s autocorrects with comment after body 273s registers when body starts on def line & continues one more line 273s registers an offense when body trails after method definition 273s Ruby 3.0 or higher 273s does not register offense when endless method definition body is after newline in opening parenthesis 273s when method is not on first line of processed_source 273s autocorrects offense 273s 273s RuboCop::Cop::Style::ExpandPathArguments 273s does not register an offense when using `File.expand_path("#{path_to_file}.png", __FILE__)` 273s registers an offense when using `Pathname(__FILE__).parent.expand_path` 273s registers an offense when using `File.expand_path('..', __FILE__)` 273s registers an offense when using `File.expand_path('.', __FILE__)` 273s registers an offense when using `File.expand_path('../../lib', __FILE__)` 273s does not register an offense when using `File.expand_path(__FILE__)` 273s does not register an offense when using `File.expand_path('..', __dir__)` 273s does not register an offense when using `Pathname(__dir__).expand_path` 273s registers an offense when using `File.expand_path('../..', __FILE__)` 273s registers an offense when using `File.expand_path('../../..', __FILE__)` 273s registers an offense when using `Pathname.new(__FILE__).parent.expand_path` 273s does not register an offense when using `File.expand_path(path, __FILE__)` 273s does not register an offense when using `File.expand_path(__dir__)` 273s registers an offense when using `::Pathname.new(__FILE__).parent.expand_path` 273s registers an offense when using `::File.expand_path('./../..', __FILE__)` 273s registers an offense when using `File.expand_path('./../..', __FILE__)` 273s 273s RuboCop::Cop::Lint::BooleanSymbol 273s does not register an offense when used inside percent-literal symbol array 273s registers an offense when using `:false` 273s does not register an offense when using `true` 273s does not register an offense when using regular symbol 273s does not register an offense when using `false` 273s registers an offense when using `:true` 273s when using the new hash syntax 273s registers an offense when using `false:` 273s registers an offense when using `true:` 273s registers an offense when using `key: :false` 273s 273s RuboCop::Cop::Lint::NumberConversion 273s IgnoredClasses 273s when using DateTime 273s when using Time 273s when using Time/DateTime with multiple method calls 273s registers an offense 273s when using `#to_r` for number literals 273s when using `#to_i` for number literals 273s when `#to_i` called on a hash value 273s when using `#to_c` for number literals 273s when using `#to_f` for number literals 273s when `#to_i` called on a variable 273s when using `#to_c` 273s when using `#to_f` 273s when `#to_i` called on a variable on a hash 273s when using `#to_i` 273s when `#to_i` called on a variable on a array 273s when using `#to_r` 273s does not register an offense 273s when using Float() 273s when `:to_f` is one of multiple method arguments 273s when using Integer() with integer 273s when using Complex() 273s when `#to_i` called without a receiver 273s AllowedPatterns 273s does not register an offense for an allowed method 273s registers an offense for other methods 273s AllowedMethods 273s registers an offense for other methods 273s does not register an offense for an allowed method 273s to_method in symbol form 273s does not register an offense when using `Float` constructor 273s registers offense and autocorrects 273s registers an offense when using nested number conversion methods 273s does not register an offense when using `Complex` constructor 273s registers offense with send 273s does not register an offense when using `Integer` constructor 273s registers offense and autocorrects without parentheses 273s registers offense with try 273s 273s RuboCop::Cop::Layout::SpaceBeforeComma 273s does not register an offense for no spaces before comma 273s handles more than one space before a comma 273s registers an offense and corrects block argument with space before comma 273s registers an offense and corrects method call arg with space before comma 273s registers an offense and corrects array index with space before comma 273s heredocs 273s registers an offense and corrects 273s 273s RuboCop::Cop::Style::For 273s when each is the enforced style 273s registers an offense for for 273s accepts multiline each 273s registers an offense for opposite + correct style 273s registers multiple offenses 273s accepts :for 273s accepts def for 273s autocorrect 273s corrects to `each` without parenthesize collection if non-operator method called 273s corrects an array with `+` operator 273s corrects an array with `||` operator 273s corrects an array with `&` operator 273s corrects an array with `*` operator 273s corrects an array with `&&` operator 273s changes for that does not have do or semicolon to each 273s corrects an array with `-` operator 273s corrects a tuple of items 273s corrects an array with `|` operator 273s with range 273s changes for that does not have do or semicolon to each 273s changes for to each 273s without parentheses 273s changes for to each 273s changes for that does not have do or semicolon to each 273s when for is the enforced style 273s accepts for 273s registers an offense for a tuple of items 273s registers multiple offenses 273s registers an offense for correct + opposite style 273s registers an offense for multiline each 273s registers an offense for each without an item and uses _ as the item 273s accepts single line each 273s when using safe navigation operator 273s does not break 273s Ruby 2.7 273s registers an offense for each without an item and uses _ as the item 273s 273s RuboCop::Cop::Layout::AssignmentIndentation 273s allows a properly indented rhs with fullwidth characters 273s registers an offense for incorrectly indented rhs when multiple assignment 273s registers an offense for incorrectly indented rhs whenmultiple assignment with line breaks on each line 273s allows a properly indented rhs 273s registers an offense for incorrectly indented rhs 273s ignores comparison operators 273s allows assignments that do not start on a newline 273s registers an offense for multi-lhs 273s when indentation width is overridden for this cop only 273s autocorrects indentation 273s allows a properly indented rhs 273s 273s RuboCop::Cop::Style::StructInheritance 273s registers an offense when extending instance of `Struct` when there is a comment before class declaration 273s registers an offense when extending instance of Struct without `do` ... `end` and class body is empty 273s accepts plain class 273s registers an offense when extending instance of Struct with do ... end 273s registers an offense when extending instance of ::Struct 273s registers an offense when extending instance of Struct without `do` ... `end` and class body is empty and single line definition 273s accepts assignment to Struct.new 273s registers an offense when extending instance of ::Struct with do ... end 273s accepts assignment to ::Struct.new 273s accepts extending DelegateClass 273s accepts assignment to block form of Struct.new 273s registers an offense when extending instance of Struct 273s 273s RuboCop::Cop::Style::SlicingWithRange 273s >= Ruby 2.6 273s reports no offense for other methods 273s reports an offense for slicing to ..-1 273s reports no offense for array with range inside 273s reports an offense for slicing from expression to ..-1 273s reports no offense for excluding end 273s >= Ruby 2.7 273s reports no offense for startless 273s <= Ruby 2.5 273s reports no offense for array slicing with -1 273s 273s RuboCop::Cop::Lint::RedundantDirGlobSort 273s does not register an offense when using `sort` without a receiver 273s does not register an offense when not using `sort` for `Dir` 273s when Ruby 2.7 or lower 273s does not register an offense and correction when using `Dir.glob.sort` 273s does not register an offense and correction when using `::Dir.glob.sort` 273s does not register an offense and correction when using `Dir[].sort.each do` 273s does not register an offense and correction when using `Dir[].sort.each(&do_something)` 273s when Ruby 3.0 or higher 273s does not register an offense when using `collection.sort` 273s does not register an offense when using `Dir[*path].sort` 273s registers an offense and correction when using `Dir[].sort.each(&do_something)` 273s registers an offense and correction when using `Dir.glob.sort` 273s does not register an offense when not using `sort` with `sort: false` option for `Dir` 273s registers an offense and correction when using `::Dir.glob.sort` 273s does not register an offense when using `Dir.glob('./b/*.txt', './a/*.txt').sort` 273s does not register an offense when using `Dir.glob(*path).sort` 273s registers an offense and correction when using `Dir[].sort.each do` 273s does not register an offense when using `Dir['./b/*.txt', './a/*.txt'].sort` 273s 273s RuboCop::Cop::Naming::MethodParameterName 273s registers offense when parameter ends in number 273s registers offense when parameter contains uppercase characters 273s does not register for method without parameters 273s can register multiple offenses in one method definition 273s does not register offense for valid keyword parameters 273s registers offense for offensive keyword parameters 273s does not register offense for valid parameter names on self.method 273s does not register offense for empty restarg 273s registers offense when parameter is less than minimum length 273s registers offense when parameter with prefix is less than minimum length 273s registers offense when parameter ends in number on class method 273s does not register offense for empty kwrestarg 273s does not register offense for valid default parameters 273s does not register offense for valid parameter names 273s registers offense for offensive default parameter 273s with AllowNamesEndingInNumbers 273s accept parameters that end in numbers 273s with ForbiddenNames 273s accepts parameter that uses a forbidden name's letters 273s registers offense for parameter listed as forbidden 273s when using argument forwarding 273s does not register an offense 273s with AllowedNames 273s accepts underscore param names 273s accepts param names prefixed with underscore 273s registers unlisted offensive names 273s accepts specified block param names 273s 273s RuboCop::Cop::Naming::AccessorMethodName 273s registers an offense for method get_something with no args 273s registers an offense for singleton method set_something with one args 273s accepts method set_something with kwrestarg 273s accepts method set_something with restarg 273s accepts method set_something with optarg 273s accepts singleton method set_something with no args 273s registers an offense for method set_something with one arg 273s accepts singleton method set_something with two args 273s accepts method set_something with kwarg 273s registers an offense for singleton method get_something with no args 273s accepts method set_something with blockarg 273s accepts method get_something with args 273s accepts method set_something with two args 273s accepts method set_something with no args 273s accepts method set_something with kwoptarg 273s accepts singleton method get_something with args 273s >= Ruby 2.7 273s accepts method set_something with arguments forwarding 273s 273s RuboCop::Cop::Lint::MixedRegexpCaptureTypes 273s registers an offense when both of named and numbered captures are used 273s does not register offense to a regexp with numbered capture only 273s does not register offense to a regexp with named capture only 273s does not register offense when using a Regexp cannot be processed by regexp_parser gem 273s does not register offense to a regexp with named capture and non-capturing group 273s when containing a non-regexp literal 273s does not register an offense when containing a gvar 273s does not register an offense when containing a cvar 273s does not register an offense when containing a ivar 273s does not register an offense when containing a constant 273s does not register an offense when containing a method 273s does not register an offense when containing a lvar 273s 273s RuboCop::Cop::Security::CompoundHash 273s registers an offense when using multiplication in the implementation of the hash method 273s registers an offense if .hash is called on any elements of a hashed array 273s registers an offense when using XOR operator in the implementation of the hash method 273s registers an offense when using multiplication assignment operator in the implementation of the hash method 273s registers an offense when using XOR assignment operator in the implementation of the hash method 273s registers an offense when using XOR operator in the implementation of the hash singleton method 273s registers an offense when using XOR operator in the implementation of the hash method, even if intermediate variable is used 273s registers an offense when using XOR operator in the implementation of a dynamic hash singleton method 273s registers an offense for complex usage 273s does not register an offense when delegating to Array#hash 273s registers an offense when using XOR involving super 273s does not register an offense when delegating to a single object 273s registers an offense when using addition in the implementation of the hash method 273s registers an offense when using bitshift and OR 273s registers an offense when using XOR and bitshifts 273s registers an offense when using XOR operator in the implementation of a dynamic hash method 273s registers an offense when using XOR operator in the implementation of the hash method, even without sub-calls to hash 273s registers an offense when delegating to Array#hash for a single value 273s registers an offense when using addition assignment operator in the implementation of the hash method 273s registers an offense when using XOR between an array hash and a class 273s 273s RuboCop::Server::Cache 273s .pid_running? 273s works properly when concurrency with server stopping and cleaning cache dir 273s .cache_path 273s when ERB pre-processing of the configuration file 273s when cache root path is not specified path 273s does not raise an error 273s when cache root path is specified path 273s is the specified path 273s when .rubocop.yml is empty 273s when cache root path is not specified path 273s does not raise an error 273s when cache root path is not specified as default 273s is the default path 273s when `XDG_CACHE_HOME` environment variable is set 273s when cache root path is specified path 273s contains the root from cache root path 273s when cache root path is not specified path 273s contains the root from `XDG_CACHE_HOME` 273s when `RUBOCOP_CACHE_ROOT` environment variable is set 273s when cache root path is not specified path 273s contains the root from `RUBOCOP_CACHE_ROOT` 273s when cache root path is not specified path and `XDG_CACHE_HOME` environment variable is specified 273s contains the root from `RUBOCOP_CACHE_ROOT` 273s when cache root path is specified path 273s contains the root from cache root path 273s when `CacheRootDirectory` configure value is set 273s when cache root path is not specified path 273s contains the root from `CacheRootDirectory` configure value 273s when cache root path is not specified path and `XDG_CACHE_HOME` environment variable is spacified 273s contains the root from `CacheRootDirectory` configure value 273s when cache root path is specified path 273s contains the root from cache root path 273s 273s RuboCop::FeatureLoader 273s .load 273s with unloadable namespaced feature 273s raises LoadError with preferred message 273s with dot-prefixed namespaced feature 273s loads it as namespaced feature 273s with namespaced feature 273s loads it as namespaced feature 273s with normally loadable feature 273s loads it normally 273s with dot-prefixed loadable feature 273s loads it as relative path 273s with unexpected LoadError from require 273s raises LoadError 273s 273s RuboCop::Formatter::HTMLFormatter 274s outputs the result in HTML 274s outputs the cached result in HTML 274s 274s RuboCop::Cop::Style::MultilineInPatternThen 274s >= Ruby 2.7 274s does not register an offense for array `when` statement with `then` 274s registers an offense when one line for multiple candidate values of `in` 274s registers an offense for multiline (one line in a body) `in` statement with `then` 274s doesn't register an offense for multiline `in` statement without `then` 274s does not register an offense for hash `in` statement with `then` 274s doesn't register an offense for multiline `in` statement with `then` followed by other lines 274s doesn't register an offense for singleline `in` statement with `then` 274s doesn't register an offense when `then` required for a body of `in` is used 274s registers an offense for multiline (two lines in a body) `in` statement with `then` 274s registers an offense for empty `in` statement with `then` 274s doesn't register an offense for empty `in` statement without `then` 274s does not register an offense when line break for multiple candidate values of `in` 274s autocorrects when the body of `in` branch starts with `then` 274s 274s RuboCop::Cop::Style::ExponentialNotation 274s EnforcedStyle is integral 274s registers no offense for negative exponent 274s registers an offense for mantissa divisible by 10 274s registers no offense for negative mantissa 274s registers no offense for a float smaller than 1 274s registers an offense for decimal mantissa 274s registers no offense for a regular float 274s registers no offense for an integral mantissa 274s EnforcedStyle is engineering 274s registers an offense for exponent equal to 4 274s registers an offense for exponent equal to -2 274s registers no offense for a float smaller than 1 274s registers no offense for a regular float 274s registers an offense for a mantissa greater than -0.1 274s registers no offense for a negative mantissa 274s registers an offense for mantissa smaller than 0.1 274s registers no offense for a mantissa equal to 1 274s registers an offense for mantissa smaller than -1000 274s registers no offense for a negative exponent 274s registers no offense for a large mantissa 274s EnforcedStyle is scientific 274s registers an offense for mantissa smaller than 1 274s registers no offense for a regular float 274s registers no offense for a negative exponent 274s registers an offense for mantissa greater than 10 274s registers no offense for a mantissa between 1 and 10 274s registers no offense for a mantissa equal to 1 274s registers an offense for mantissa equal to 10 274s registers no offense for a negative mantissa 274s registers no offense for a float smaller than 1 274s 274s RuboCop::Cop::Style::MultipleComparison 274s does not register an offense for comparing lvars 274s does not register an offense for a == b || b == a 274s registers an offense and corrects when `a` is compared three times 274s does not register an offense for Array#include? 274s does not register an offense for comparing multiple int literals 274s does not register an offense for comparing multiple literal strings 274s registers an offense and corrects when `a` is compared three times, once on the righthand side 274s registers an offense and corrects when `a` is compared three times on the right hand side 274s does not register an offense for comparing lvars when a string is on the lefthand side 274s does not register an offense for a duplicated condition 274s registers an offense and corrects when multiple comparison is not part of a conditional 274s does not register an offense when comparing two sides of the disjunction is unrelated 274s registers an offense and corrects when `a` is compared twice in `if` and `elsif` conditions 274s does not register an offense for comparing an lvar 274s registers an offense and corrects when `a` is compared twice 274s when `AllowMethodComparison: false` 274s registers an offense and corrects when using multiple method calls 274s when `AllowMethodComparison: true` 274s does not register an offense when using multiple method calls 274s 274s RuboCop::Cop::Style::MultilineIfThen 274s does not raise an error for an implicit match if 274s registers an offense for then in multiline unless 274s does not get confused by a postfix unless 274s does not raise an error for an implicit match unless 274s does not get confused by a nested postfix unless 274s does not get confused by a commented-out then 274s registers an offense for then in multiline elsif 274s accepts table style if/then/elsif/ends 274s does not get confused by a then in a when 274s does not get confused by empty elsif branch 274s registers an offense for then in multiline if 274s 274s RuboCop::Cop::Bundler::InsecureProtocolSource 274s does not register an offense when using `source 'https://rubygems.org'` 274s registers an offense when using `source :rubygems` 274s registers an offense when using `source :rubyforge` 274s registers an offense when using `source :gemcutter` 274s when `AllowHttpProtocol: true` 274s does not register an offense when using `source 'http://rubygems.org'` 274s when `AllowHttpProtocol: false` 274s registers an offense when using `source 'http://rubygems.org'` 274s 274s RuboCop::Cop::Style::AutoResourceCleanup 274s registers an offense for File.open without block 274s does not register an offense for File.open with immediate close 274s does not register an offense for File.open with block-pass 274s does not register an offense for File.open with block 274s 274s RuboCop::Cop::Lint::SendWithMixinArgument 274s does not register an offense when using `prepend` 274s registers an offense when using `send` with `extend` 274s does not register an offense when not using a mixin method 274s registers an offense when using `send` with `include` 274s registers an offense when using `send` with `prepend` 274s registers an offense when using `__send__` method 274s does not register an offense when using `include` 274s registers an offense when using `public_send` method 274s does not register an offense when using `extend` 274s when using namespace for module 274s registers an offense when using `send` with `include` 274s when specifying a mixin method as a string 274s registers an offense when using `send` with `extend` 274s registers an offense when using `send` with `prepend` 274s registers an offense when using `send` with `include` 274s 274s RuboCop::DirectiveComment 274s #line_number 274s returns line number for directive 274s #match_captures 274s when disable 274s is expected to eq ["disable", "all", nil, nil] 274s when enable 274s is expected to eq ["enable", "Foo/Bar", nil, "Foo/"] 274s when typo 274s is expected to be nil 274s when todo 274s is expected to eq ["todo", "all", nil, nil] 274s #in_directive_department? 274s when another department disabled 274s is expected to equal false 274s when cop department disabled 274s is expected to equal true 274s when cop disabled 274s is expected to equal false 274s #disabled? 274s when enable 274s is expected to equal false 274s when todo 274s is expected to equal true 274s when disable 274s is expected to equal true 274s .before_comment 274s when line has NO code 274s is expected to eq "" 274s when line has code 274s is expected to eq "def foo " 274s #match? 274s when disabled all cops 274s is expected to equal true 274s when cop names are same as in the comment 274s is expected to equal true 274s when cop names are superset of names 274s is expected to equal false 274s when cop names are same but in a different order 274s is expected to equal true 274s when cop names are subset of names 274s is expected to equal false 274s when there are no cop names 274s is expected to equal false 274s when cop names are same but have duplicated names 274s is expected to equal true 274s #single_line? 274s when does NOT relate to single line 274s is expected to equal false 274s when relates to single line 274s is expected to equal true 274s #overridden_by_department? 274s when cop is not overridden by it's department 274s is expected to equal false 274s when there are no departments 274s is expected to equal false 274s when cop is overridden by it's department 274s is expected to equal true 274s when there are no cops 274s is expected to equal false 274s #disabled_all? 274s when enabled all cops 274s is expected to equal false 274s when enabled specific cops 274s is expected to equal false 274s when disabled all cops 274s is expected to equal true 274s when disabled specific cops 274s is expected to equal false 274s #cop_names 274s when all cops mentioned 274s is expected to eq ["all_names"] 274s when couple departments specified 274s is expected to eq ["Foo/Bar", "Foo/Baz", "Baz/Bar"] 274s when only cop specified 274s is expected to eq ["Foo/Bar"] 274s when redundant directive cop department specified 274s is expected to eq ["Lint/One", "Lint/Two"] 274s when department and cops specified 274s is expected to eq ["Foo/Bar", "Foo/Baz", "Baz/Cop"] 274s when only department specified 274s is expected to eq ["Foo/Bar", "Foo/Baz"] 274s #enabled_all? 274s when disabled all cops 274s is expected to equal false 274s when enabled specific cops 274s is expected to equal false 274s when enabled all cops 274s is expected to equal true 274s when disabled specific cops 274s is expected to equal false 274s #department_names 274s when department and cops specified 274s is expected to eq ["Foo"] 274s when only cop specified 274s is expected to eq [] 274s when couple departments specified 274s is expected to eq ["Foo", "Baz"] 274s when all cops mentioned 274s is expected to eq [] 274s when only department specified 274s is expected to eq ["Foo"] 274s #enabled? 274s when disable 274s is expected to equal false 274s when todo 274s is expected to equal false 274s when enable 274s is expected to equal true 274s #directive_count 274s when few department used 274s is expected to eq 3 274s when cops and departments used 274s is expected to eq 4 274s when few cops used 274s is expected to eq 2 274s #all_cops? 274s when mentioned specific cops 274s is expected to equal false 274s when mentioned all 274s is expected to equal true 274s 274s RuboCop::Cop::Style::ArgumentsForwarding 274s TargetRubyVersion >= 3.1 274s registers an offense when using restarg, kwargs, and anonymous block arg 274s registers an offense when using restarg and anonymous block arg 274s TargetRubyVersion <= 2.6 274s does not register an offense when using restarg with block arg 274s TargetRubyVersion >= 2.7 274s does not register an offense when body of method definition is empty 274s does not register an offense when referencing the restarg outside forwarding method arguments 274s does not register an offense when the kwarg is overwritten 274s does not register an offense when the block arg is overwritten 274s registers an offense when passing restarg and block arg in defs 274s does not register an offense when using the restarg outside forwarding method arguments 274s does not register an offense when assigning the restarg outside forwarding method arguments 274s registers an offense when forwarding to a method in block 274s registers an offense when the parentheses of arguments are omitted 274s does not register an offense when different argument names are used 274s does not register an offense when the restarg is overwritten 274s registers an offense when using restarg and block arg 274s does not register an offense when different arguments are used 274s registers an offense when delegating 274s does not register an offense when using arguments forwarding 274s registers an offense when using restarg, kwargs and block arg 274s AllowOnlyRestArgument: false 274s registers an offense when using only kwrest arg 274s registers an offense when using only rest arg 274s AllowOnlyRestArgument: true 274s does not register an offense when using only kwrest arg 274s does not register an offense when using only rest arg 274s 274s RuboCop::Cop::Lint::InheritException 274s when class inherits from `Exception` 274s with enforced style set to `runtime_error` 274s registers an offense and corrects 274s when inheriting a standard lib exception class that is not a subclass of `StandardError` 274s does not register an offense 274s when creating a subclass using Class.new 274s registers an offense and corrects 274s with enforced style set to `standard_error` 274s registers an offense and corrects 274s when creating a subclass using Class.new 274s registers an offense and corrects 274s when inheriting a standard lib exception class that is not a subclass of `StandardError` 274s does not register an offense 274s 274s RuboCop::Cop::Utils::FormatString 274s finds the correct number of fields 274s #valid? 274s returns false when there are numbered and named formats 274s returns true when there are only named with escaped `%` formats 274s returns false when there are unnumbered and named formats 274s returns true when there are only named formats 274s returns true when there are only unnumbered formats 274s returns false when there are unnumbered and numbered formats 274s returns true when there are only numbered formats 274s #named_interpolation? 274s behaves like named format sequence 274s does not detect escaped named format sequence 274s detects named format sequence 274s behaves like named format sequence 274s detects named format sequence 274s does not detect escaped named format sequence 274s behaves like named format sequence 274s does not detect escaped named format sequence 274s detects named format sequence 274s behaves like named format sequence 274s detects named format sequence 274s does not detect escaped named format sequence 274s 274s RuboCop::Cop::Layout::ArgumentAlignment 274s aligned with first argument 274s accepts correctly aligned arguments with fullwidth characters 274s can handle a call with a block inside another call 274s doesn't get confused by extra comma at the end 274s registers an offense and corrects when missed indentation kwargs 274s doesn't get confused by regexen with embedded expressions 274s can handle a correctly aligned string literal as first argument 274s doesn't get confused by symbols with embedded expressions 274s accepts braceless hashes 274s registers an offense and corrects arguments with single indent 274s doesn't get confused by a line break inside a parameter 274s accepts calls that only span one line 274s can handle heredoc strings 274s can handle a call embedded in a string 274s registers an offense and corrects splat operator 274s can handle a method call within a method call 274s does not crash in autocorrect on dynamic string in parameter value 274s can handle parentheses used with no arguments 274s can handle other method calls without parentheses 274s can handle a ternary condition with a block reference 274s registers an offense and corrects multi-line outdented parameters 274s doesn't get confused by a symbol argument 274s can handle a string literal as other argument 274s can handle do-end 274s registers an offense and corrects multiline missed indentation 274s accepts correctly aligned arguments 274s accepts multiline []= method call 274s can handle a multiline hash as second parameter 274s registers an offense and correct multi-line parametersindented too far 274s registers an offense and corrects arguments with double indent 274s can handle method calls without parentheses 274s doesn't crash and burn when there are nested issues 274s accepts the first parameter being on a new row 274s when using safe navigation operator 274s registers an offense and corrects arguments with single indent 274s assigned methods 274s accepts the first parameter being on method row 274s accepts the first parameter being on a new row 274s aligned with fixed indentation 274s corrects indentation for kwargs starting on same line as other args 274s autocorrects when first line is indented 274s registers an offense and corrects when missed indentation kwargs 274s does not register an offense when using aligned braced hash as a argument 274s autocorrects by indenting when not indented 274s autocorrects by outdenting when indented too far 274s multi-line method calls 274s autocorrects relative to position of relevant method call 274s can handle existing indentation from multi-line method calls 274s does not err on method call without a method name 274s registers offenses and corrects double indentation from relevant method 274s assigned methods 274s with IndentationWidth:Width set to 4 275s autocorrects even when first argument is in wrong position 275s accepts the first parameter being on method row 275s accepts the first parameter being on a new row 275s with ArgumentAlignment:IndentationWidth set to 4 275s accepts the first parameter being on a new row 275s accepts the first parameter being on method row 275s 275s RuboCop::Cop::Style::ClassVars 275s registers an offense for class variable declaration 275s registers an offense for class variable set in class 275s does not register an offense for class variable usage 275s registers an offense for class variable set on class receiver 275s 275s RuboCop::Cop::Layout::IndentationStyle 275s when EnforcedStyle is spaces 275s registers and corrects an offense for a line indented with tab 275s registers and corrects an offense for a line indented with mixed whitespaces 275s accepts a line with tab in a string 275s registers offenses before __END__ but not after 275s accepts a line with a tab other than indentation 275s accepts a line which begins with tab in a string 275s accepts a line which begins with tab in a heredoc 275s accepts a line with a tab between string literals 275s accepts a line which begins with tab in a multiline heredoc 275s registers and corrects an offense for a line with tab in a string indented with tab 275s registers and corrects an offense for a line indented with multiple tabs 275s custom indentation width 275s uses the configured number of spaces to replace a tab 275s when EnforcedStyle is tabs 275s registers an offense for a line indented with mixed whitespace 275s registers and corrects an offense for a line indented with fractional number ofindentation groups by rounding down 275s accepts a line a tab other than indentation 275s accepts a line which begins with tab in a multiline heredoc 275s registers and corrects an offense for a line with tab in a string indented with space 275s accepts a line with tab in a string 275s accepts a line which begins with tab in a string 275s accepts a line which begins with tab in a heredoc 275s registers and corrects an offense for a line indented with multiple spaces 275s accepts a line with tabs between string literals 275s registers and corrects an offense for a line indented with space 275s registers offenses before __END__ but not after 275s custom indentation width 275s uses the configured number of spaces to replace with a tab 275s 275s RuboCop::Cop::Style::SymbolLiteral 275s accepts string syntax when symbol start with a digit 275s accepts string syntax when symbols have whitespaces in them 275s accepts string syntax when symbols have special chars in them 275s registers an offense for word-line symbols using string syntax 275s 275s RuboCop::Cop::Style::CharacterLiteral 275s registers an offense for literals like \n 275s autocorrects ?' to "'" 275s registers an offense for character literals 275s accepts ? in a %w literal 275s accepts literals like ?\C-\M-d 275s 275s RuboCop::Cop::Lint::ConstantOverwrittenInRescue 275s registers an offense when overriding an exception with an exception result 275s does not register an offense when not overriding an exception with an exception result 275s does not register an offense when using `=>` but correctly assigning to variables 275s 275s RuboCop::Cop::Style::NestedFileDirname 275s Ruby <= 3.0 275s does not register an offense when using `File.dirname(path)` nested two times 275s Ruby >= 3.1 275s registers and corrects an offense when using `File.dirname(path)` nested two times 275s does not register an offense when using non nested `File.dirname(path)` 275s does not register an offense when using `File.dirname(path, 2)` 275s registers and corrects an offense when using `File.dirname(path)` nested three times 275s 275s RuboCop::Cop::Style::RedundantPercentQ 275s accepts %q containing string interpolation 275s accepts %Q at the beginning of a double quoted string with interpolation 275s accepts %q at the beginning of a double quoted string with interpolation 275s accepts %Q at the beginning of a section of a double quoted string with interpolation 275s accepts a heredoc string that contains %q 275s accepts %q at the beginning of a section of a double quoted string with interpolation 275s with %q strings 275s accepts a string with single quotes and double quotes 275s registers an offense for no quotes 275s registers an offense for only single quotes 275s accepts a string with escaped backslash and non-backslash characters 275s registers an offense for only double quotes 275s registers an offense for a string containing escaped backslashes 275s autocorrects for strings that are concatenated with backslash 275s accepts a string with escaped non-backslash characters 275s accepts regular expressions starting with %q 275s with %Q strings 275s registers an offense for dynamic string without quotes 275s accepts a string with double quotes and an escaped special character 275s registers an offense for static string without quotes 275s accepts regular expressions starting with %Q 275s accepts a string with double quotes and an escaped normal character 275s accepts a string with single quotes and double quotes 275s accepts a dynamic %Q string with double quotes 275s registers an offense for static string with only double quotes 275s autocorrects for strings that are concatenated with backslash 275s 275s RuboCop::Cop::Style::MixinUsage 275s does not register an offense when using inside nested module 275s prepend 275s registers an offense when using outside class 275s does not register an offense when using inside class 275s include 275s registers an offense when using `include` in method definition outside class or module 275s does not register an offense when using inside block and `if` condition is after `include` 275s does not register an offense when using inside block 275s does not register an offense when using outside class 275s registers an offense when using only `include` statement 275s registers an offense when using outside class (used above) 275s does not register an offense when using inside class 275s registers an offense when using outside class (used below) 275s does not register an offense when using `include` in method definition inside module 275s doesn't register an offense when `include` call is a method argument 275s does not register an offense when using `include` in method definition inside class 275s Nested module 275s registers an offense when using outside class 275s Multiple definition classes in one 275s does not register an offense when using inside class 275s extend 275s registers an offense when using outside class 275s does not register an offense when using inside class 275s 275s RuboCop::Cop::Layout::EmptyLinesAroundExceptionHandlingKeywords 275s registers an offense for above rescue keyword with a blank 275s accepts empty lines around begin body 275s accepts empty method definition 275s with complex method definition - registers many offenses 275s registers an offense for rescue section ending with a blank 275s accepts `begin` and `rescue` are on the same line 275s accepts `def` and `rescue` are on the same line 275s accepts no empty line 275s with complex begin-end - registers many offenses 275s accepts `rescue` and `end` are on the same line 275s accepts empty begin 275s accepts last `rescue` and `end` are on the same line 275s registers an offense for rescue section starting with a blank 275s registers an offense for rescue section ending for method definition a blank 275s 275s RuboCop::Cop::Style::Next 275s allows empty blocks 275s handles `then` when autocorrecting 275s allows loops with conditions at the end with ternary op 275s does not blow up on empty body until block 275s does not blow up on empty body while block 275s does not crash with an empty body branch 275s allows super nodes 275s keeps comments when autocorrecting 275s handles nested autocorrections 275s doesn't reindent heredoc bodies when autocorrecting 275s does not blow up on empty body for block 275s does not crash with empty brackets 275s Invalid MinBodyLength 275s fails with an error 275s behaves like iterators 275s allows loops with conditional break 275s autocorrects a misaligned end 275s registers an offense for if inside of each_with_object 275s allows loops with if with else at the end 275s allows loops with if with else, nested in another condition 275s allows loops with conditional return 275s registers an offense for if inside of nested iterators 275s registers an offense for if inside of times 275s registers an offense for if inside of each 275s registers an offense for a condition at the end of an iterator when there is more in the iterator than the condition 275s allows loops with if being the entire body with else 275s registers an offense for if inside of select 275s registers an offense for if inside of loop 275s registers an offense for if inside of collect 275s registers an offense for if inside of reject 275s registers an offense for if inside of for 275s reports an offense for if whose body has 3 lines 275s registers an offense for if inside of reject! 275s registers an offense when line break before condition 275s registers an offense for if inside of downto 275s registers an offense for if inside of select! 275s registers an offense for if inside of map 275s registers an offense for if inside of nested iterators 275s EnforcedStyle: skip_modifier_ifs 275s allows modifier if 275s Ruby 2.7 275s registers an offense for if inside of downto numblock 275s EnforcedStyle: always 275s registers an offense for modifier if 275s behaves like iterators 275s allows loops with conditional break 275s allows loops with conditional return 275s registers an offense for a condition at the end of an iterator when there is more in the iterator than the condition 275s registers an offense for unless inside of reject 275s registers an offense for unless inside of nested iterators 275s registers an offense for unless inside of nested iterators 275s registers an offense for unless inside of each_with_object 275s registers an offense for unless inside of times 275s registers an offense for unless inside of map 275s allows loops with unless being the entire body with else 275s registers an offense for unless inside of collect 275s registers an offense for unless inside of for 275s allows loops with unless with else at the end 275s registers an offense for unless inside of select 275s registers an offense for unless inside of reject! 275s autocorrects a misaligned end 275s reports an offense for unless whose body has 3 lines 275s registers an offense for unless inside of loop 275s registers an offense for unless inside of each 275s allows loops with unless with else, nested in another condition 275s registers an offense for unless inside of select! 275s registers an offense for unless inside of downto 276s registers an offense when line break before condition 276s Ruby 2.7 276s registers an offense for unless inside of downto numblock 276s EnforcedStyle: always 276s registers an offense for modifier unless 276s EnforcedStyle: skip_modifier_ifs 276s allows modifier unless 276s MinBodyLength: 3 276s accepts if whose body has 1 line 276s 276s RuboCop::Cop::Lint::Debugger 276s does not register an offense for a save_and_open_page method 276s does not register an offense for a debugger method 276s does not register an offense for a binding method that is not disallowed 276s does not register an offense for a console method 276s does not register an offense for a pry method 276s does not register an offense for a save_and_open_screenshot method 276s does not register an offense for a debugger in comments 276s does not register an offense for a console in comments 276s does not register an offense for a irb in comments 276s does not register an offense for a remote_pry in comments 276s does not register an offense for a pry_remote in comments 276s does not register an offense for a byebug in comments 276s does not register an offense for a byebug method 276s does not register an offense for a save_and_open_page in comments 276s does not register an offense for a remote_byebug in comments 276s does not register an offense for a pry in comments 276s does not register an offense for a irb method 276s does not register an offense for a pry_remote method 276s does not register an offense for a remote_byebug method 276s does not register an offense for a remote_pry method 276s does not register an offense for a save_and_open_screenshot in comments 276s byebug 276s registers an offense for a byebug call 276s registers an offense for a Kernel.remote_byebug call 276s registers an offense for a byebug with an argument call 276s registers an offense for a Kernel.byebug call 276s registers an offense for a remote_byebug call 276s when a method group is disabled with nil 276s does not register an offense for a Pry debugger call 276s does register an offense for another group 276s debug.rb 276s registers an offense for a `b` binding call 276s registers an offense for a `break` binding call 276s registers an offense for a `binding.break` with `Kernel` call 276s registers an offense for a `binding.b` with `Kernel` call 276s when a method group is disabled with false 276s does register an offense for another group 276s does not register an offense for a Pry debugger call 276s web console 276s does not register an offense for `console` without a receiver 276s registers an offense for a `binding.console` call 276s built-in methods 276s registers an offense for a irb binding call 276s registers an offense for a binding.irb with Kernel call 276s RubyJard 276s registers an offense for a jard call 276s with the DebuggerMethods configuration 276s does not register an offense for a byebug call 276s registers an offense for a `custom_debugger` call 276s with a const chain and a method chain 276s registers an offense for a `Foo::Bar::Baz.debug.this.code` call 276s with a method chain 276s registers an offense for a `debugger.foo.bar` call 276s with a const chain 276s registers an offense for a `Foo::Bar::Baz.debug` call 276s nested custom configurations 276s registers an offense for a `custom_debugger call 276s rails 276s registers an offense for a debugger with ::Kernel call 276s registers an offense for a debugger call 276s registers an offense for a debugger with Kernel call 276s registers an offense for a debugger with an argument call 276s pry 276s registers an offense for a binding.pry with Kernel call 276s registers an offense for a Pry.rescue call 276s registers an offense for a pry binding with an argument call 276s registers an offense for a pry binding call 276s registers an offense for a remote_pry binding with an argument call 276s does not register an offense for a `pry` call without binding 276s registers an offense for a pry_remote binding with an argument call 276s registers an offense for a remote_pry binding call 276s registers an offense for a pry_remote binding call 276s does not register an offense for a `rescue` call without Pry 276s capybara 276s registers an offense for save_and_open_screenshot 276s registers an offense for save_and_open_page 276s with an argument 276s registers an offense for save_and_open_screenshot 276s registers an offense for save_and_open_page 276s 276s RuboCop::Cop::Style::RedundantCapitalW 276s registers no offense for %W with special characters 276s registers no offense for arrays with character constants 276s registers an offense for misused %W with different bracket 276s does not register an offense for array containing non-string 276s registers an offense for misused %W 276s does not register an offense for array with one element 276s registers no offense for %w without interpolation 276s registers no offense for %w with interpolation-like syntax 276s registers no offense for normal arrays of strings 276s does not register an offense for array of non-words 276s does not register an offense for array with empty strings 276s registers no offense for normal arrays of strings with interpolation 276s registers no offense for %W with interpolation 276s 276s RuboCop::Cop::Lint::UselessAssignment 276s when a variable is assigned while being passed to a method taking block 276s and the variable is not used 276s registers an offense 276s and the variable is used 276s accepts 276s when a variable is referenced in rhs of named capture expression 276s accepts 276s when a variable is assigned in loop body and referenced in post until condition 276s accepts 276s when a variable is reassigned with binary operator assignment and referenced 276s accepts 276s when a variable is assigned and referenced when defining a module 276s does not register an offense 276s when a variable is assigned and unreferenced in a singleton method defined with self keyword 276s registers an offense 276s when a referenced variable is reassigned in a block 276s accepts 276s when a variable is assigned in main body of begin with rescue but unreferenced 276s registers an offense 276s when a variable is assigned with ||= before the last expression of the scope 276s registers an offense 276s when a variable is reassigned with binary operator assignment while assigning to itself in rhs then referenced 276s registers an offense for the assignment in rhs 276s when a block argument is not used 276s accepts 276s when a variable is assigned and assigned again in a modifier condition 276s accepts without parentheses 276s accepts with parentheses 276s when a named capture is unreferenced in top level 276s registers an offense 276s when a variable is reassigned multiple times in rescue and referenced after the begin 276s registers an offense 276s when a variable is assigned on each side of && and referenced after the && 276s accepts 276s when a rescued error variable is wrongly tried to be referenced in another rescue body 276s registers an offense 276s when a variable is reassigned multiple times in main body of begin then referenced in ensure 276s accepts 276s when a referenced variable is reassigned but not re-referenced in a method defined in loop 276s registers an offense 276s when a variable is assigned with operator assignment in top level 276s registers an offense 276s when a keyword splat method argument is not used 276s accepts 276s when a variable is assigned in loop body and referenced in post while condition 276s accepts 276s when a variable is reassigned multiple times in ensure with rescue then referenced after the begin 276s registers an offense 276s when a block local variable is assigned and unreferenced 276s registers offenses for the assignment 276s when a variable is not used and the name starts with _ 276s accepts 276s when a variable is assigned in 2 identical if branches 276s doesn't think 1 of the 2 assignments is useless 276s when a splat method argument is not used 276s accepts 276s when a variable is assigned and unreferenced in a method 276s registers an offense 276s when a variable is assigned in loop body and unreferenced 276s registers an offense 276s when a variable is assigned in each branch of if and referenced after the branching 276s accepts 276s when there's an unreferenced reassignment in a if branch while the variable is referenced in a case branch in the paired else branch 276s registers an offense for the reassignment in the if branch 276s when a variable is reassigned while referencing itself in rhs and referenced 276s accepts 276s when a variable is assigned in each branch of if and referenced in the else branch 276s registers an offense for the assignment in the if branch 276s when a variable is assigned with ||= at the last expression of the scope 276s registers an offense 276s when a keyword splat method argument is used 276s accepts 276s when a named capture is unreferenced in other than top level 276s registers an offense 276s when a method argument is reassigned and zero arity super is called 276s accepts 276s when a variable is assigned at the end of rescue and would be referenced with retry 276s accepts 276s when a unreferenced variable is reassigned on the right side of && and referenced after the && 276s accepts 276s inside a `case-match` node 276s does not register an offense when the variable is used 276s when a variable is assigned and passed to a method followed by method taking block 276s accepts 276s when a variable is assigned in main body of begin, rescue and else and reassigned in ensure then referenced after the begin 276s registers offenses for each assignment before ensure 276s when a referenced variable is reassigned but not re-referenced 276s registers an offense for the non-re-referenced assignment 276s when a variable is assigned and unreferenced in a singleton class 276s registers an offense 276s when a variable is assigned multiple times but unreferenced 276s registers offenses for each assignment 276s when a variable is reassigned in single branch if and referenced in the branch 276s registers an offense for the unreferenced assignment 276s when a unreferenced variable is reassigned in same branch and referenced after the branching 276s registers an offense for the unreferenced assignment 276s when a variable is reassigned in single branch if and referenced after the branching 276s accepts 276s when a block method argument is not used 276s accepts 276s when a variable is reassigned multiple times in rescue with ensure then referenced after the begin 276s registers an offense 276s when there's an unreferenced assignment in top level if branch while the variable is referenced in the paired else branch 276s registers an offense for the assignment in the if branch 276s when a variable is assigned in begin and referenced outside 276s accepts 276s when a variable is assigned and unreferenced in a module 276s registers an offense 276s when a variable is assigned and unreferenced in a class 276s registers an offense 276s when a variable is reassigned at the end of loop body and would be referenced in next iteration 276s accepts 276s when a variable is reassigned with multiple assignment while referencing itself in rhs and referenced 276s accepts 276s when a variable is assigned in branch of modifier if that references the variable in its conditional clauseand unreferenced 276s registers an offense 276s when an anonymous keyword splat method argument is defined 276s accepts 276s when an unreferenced variable is reassigned in a block 276s accepts 276s when a variable is reassigned in a loop 276s while loop 276s accepts 276s for loop 276s accepts 276s post while loop 276s accepts 276s until loop 276s accepts 276s post until loop 276s accepts 276s when a unreferenced variable is reassigned on the left side of && and referenced after the && 276s registers an offense for the unreferenced assignment 276s similar name suggestion 276s when there's a similar method invocation with arguments 276s does not suggest any name 276s when there's a similar variable-like method invocation 276s suggests the method name 276s when there are only less similar names 276s does not suggest any name 276s when there's a similar name but it's in inner scope 276s does not suggest any name 276s when there's a similar variable 276s suggests the variable name 276s when there's a similar method invocation with explicit receiver 276s does not suggest any name 276s when a variable is assigned with operator assignment in rescue and would be referenced with retry 276s accepts 276s when a variable is reassigned with logical operator assignment and referenced 276s accepts 276s when an unreferenced variable is reassigned and re-referenced 276s registers an offense for the unreferenced assignment 276s when a block local variable is declared but not assigned 276s accepts 276s when a variable is reassigned in loop body but won't be referenced either next iteration or loop condition 276s registers an offense (PENDING: Requires an advanced logic that checks whether the return value of an operator assignment is used or not.) 276s when a variable is assigned and unreferenced in a class subclassing another class stored in local variable 276s registers an offense 276s when a variable is assigned with multiple assignment and unreferenced 276s registers an offense 276s when a named capture is referenced 276s accepts 276s when a variable is reassigned multiple times in main body of begin then referenced after the begin 276s accepts 276s when a method argument is not used 276s accepts 276s when a variable is reassigned multiple times in main body of begin then referenced in rescue 276s accepts 276s when an optional method argument is not used 276s accepts 276s when a setter is invoked with operator assignment in loop body 276s accepts 276s when a variable is shadowed by a block argument and unreferenced 276s registers an offense 276s when a variable is reassigned and unreferenced in a if branch while the variable is referenced in the paired else branch 276s registers an offense for the reassignment in the if branch 276s when a variable is reassigned at the end of loop body and would be referenced in loop condition 276s accepts 276s when a variable is assigned and unreferenced in a singleton method defined with variable name 276s registers an offense 276s when there's an unreferenced reassignment in a if branch while the variable is referenced in the paired elsif branch 276s registers an offense for the reassignment in the if branch 276s when a variable is assigned in single branch if and unreferenced 276s registers an offense 276s when a variable is assigned and unreferenced in top level 276s registers an offense 276s when there is only one AST node and it is unused variable 276s registers an offense 276s when a variable is assigned in main body of begin, rescue and else then referenced after the begin 276s accepts 276s when a local variable is unreferenced and zero arity super is called 276s registers an offense 276s when a variable that has same name as outer scope variable is not referenced in a method defined in loop 276s registers an offense 276s when an assignment in a if branch is referenced in another if branch 276s accepts 276s when a variable is assigned in branch of modifier if that references the variable in its conditional clauseand referenced after the branching 276s accepts 276s when a optional keyword method argument is not used 276s accepts 276s when a method argument is reassigned but not passed to super 276s registers an offense 276s when a variable is assigned first with ||= and referenced 276s accepts 276s 276s RuboCop::Cop::Lint::ParenthesesAsGroupedExpression 276s accepts a space inside opening paren followed by left paren 276s does not register an offense for expression followed by chained expression with safe navigation operator 276s does not register an offense for ternary operator 276s accepts a chain of method calls 276s registers an offense and corrects for method call with space before the parenthesis 276s accepts an operator call with argument in parentheses 276s does not register an offense for a call with multiple arguments 276s does not register an offense for math expression 276s accepts a method call without arguments 276s accepts a method call with arguments but no parentheses 276s registers an offense and corrects for predicate method call with space before the parenthesis 276s accepts method with parens as arg to method without 276s does not register an offense for expression followed by an operator 276s does not register an offense for expression followed by chained expression 276s does not register an offense when method argument parentheses are omitted and hash argument key is enclosed in parentheses 276s does not register an offense for math expression with `to_i` 276s does not register an offesne when heredoc has a space between the same string as the method name and `(` 276s when using safe navigation operator 276s registers an offense and corrects for method call with space before the parenthesis 276s 276s RuboCop::Cop::Style::SelfAssignment 276s registers an offense for non-shorthand assignment * and x 276s registers an offense for non-shorthand assignment ** and @@x 276s registers an offense for non-shorthand assignment & and @@x 276s registers an offense for non-shorthand assignment + and @x 276s registers an offense for non-shorthand assignment - and @x 276s registers an offense for non-shorthand assignment + and x 276s registers an offense for non-shorthand assignment / and x 276s registers an offense for non-shorthand assignment | and x 276s registers an offense for non-shorthand assignment & and @x 276s registers an offense for non-shorthand assignment * and @@x 276s registers an offense for non-shorthand assignment / and @x 276s registers an offense for non-shorthand assignment || and @x 276s registers an offense for non-shorthand assignment & and x 276s registers an offense for non-shorthand assignment + and @@x 276s registers an offense for non-shorthand assignment / and @@x 276s registers an offense for non-shorthand assignment || and @@x 276s registers an offense for non-shorthand assignment | and @x 276s registers an offense for non-shorthand assignment - and x 276s registers an offense for non-shorthand assignment && and @x 276s registers an offense for non-shorthand assignment ** and @x 276s registers an offense for non-shorthand assignment - and @@x 276s registers an offense for non-shorthand assignment | and @@x 276s registers an offense for non-shorthand assignment && and x 276s registers an offense for non-shorthand assignment ** and x 276s registers an offense for non-shorthand assignment && and @@x 276s registers an offense for non-shorthand assignment * and @x 276s registers an offense for non-shorthand assignment || and x 276s 276s RuboCop::Cop::Layout::ExtraSpacing 276s when AllowBeforeTrailingComments is 276s false 276s regsiters offense 276s does not trigger on only one space before comment 276s true 276s allows it 276s doesn't interfere with AllowForAlignment 276s being false 276s such as aligning tokens with empty line between 276s does not register an offense 276s such as lining up assignments with empty lines and comments in between 276s registers offense(s) 276s such as lining up assignments 276s registers offense(s) 276s such as lining up different kinds of assignments 276s registers offense(s) 276s such as aligning long assignment expressions that include line breaks 276s registers offense(s) 276s such as aligning trailing comments 276s does not register an offense 276s such as aligning with the same character 276s registers offense(s) 276s such as aligning = on lines where there are trailing comments 276s registers offense(s) 276s such as aligning comments on non-adjacent lines 276s registers offense(s) 276s being true 276s such as lining up assignments 276s allows it 276s such as lining up assignments with empty lines and comments in between 276s allows it 276s such as aligning long assignment expressions that include line breaks 276s allows it 276s such as aligning with the same character 276s allows it 276s such as aligning tokens with empty line between 276s allows it 276s such as aligning comments on non-adjacent lines 276s allows it 276s such as aligning trailing comments 276s allows it 276s such as aligning = on lines where there are trailing comments 276s allows it 276s such as lining up different kinds of assignments 276s allows it 276s when AllowForAlignment is true 276s ignores whitespace at the beginning of the line 276s registers an offense and corrects double extra spacing in variable assignment 276s registers an offense and corrects extra space before a float 276s ignores trailing whitespace 276s registers an offense and corrects extra spacing before a unary plus in an argument list 276s accepts space between key and value in a hash with hash rockets 276s ignores whitespace inside a string 276s accepts aligned values of an implicit hash literal 276s registers an offense and corrects alignment with token not preceded by space 276s registers an offense and corrects extra spacing in class inheritance 276s when spaces are present in a single-line hash literal 276s registers an offense and corrects hashes with symbol keys 276s registers an offense and corrects hashes with hash rockets 276s with extra spacing for alignment purposes 276s such as aligning long assignment expressions that include line breaks 276s allows it 276s such as aligning tokens with empty line between 276s allows it 276s such as aligning comments on non-adjacent lines 276s allows it 276s such as aligning with the same character 276s allows it 276s such as lining up assignments with empty lines and comments in between 276s allows it 276s such as aligning = on lines where there are trailing comments 276s allows it 276s such as aligning trailing comments 276s allows it 276s such as lining up assignments 276s allows it 276s such as lining up different kinds of assignments 276s allows it 276s when AllowForAlignment is false 276s ignores trailing whitespace 276s registers an offense and corrects extra spacing before a unary plus in an argument list 276s accepts space between key and value in a hash with hash rockets 276s ignores whitespace at the beginning of the line 276s registers an offense and corrects alignment with token not preceded by space 276s accepts aligned values of an implicit hash literal 276s registers an offense and corrects extra spacing in class inheritance 276s registers an offense and corrects double extra spacing in variable assignment 276s registers an offense and corrects extra space before a float 276s ignores whitespace inside a string 276s when spaces are present in a single-line hash literal 276s registers an offense and corrects hashes with hash rockets 276s registers an offense and corrects hashes with symbol keys 276s with extra spacing for alignment purposes 276s such as aligning trailing comments 276s registers offense(s) 276s such as aligning = on lines where there are trailing comments 276s registers offense(s) 276s such as aligning tokens with empty line between 276s registers offense(s) 276s such as aligning with the same character 276s registers offense(s) 276s such as lining up assignments 276s registers offense(s) 276s such as aligning comments on non-adjacent lines 276s registers offense(s) 276s such as aligning long assignment expressions that include line breaks 276s registers offense(s) 276s such as lining up different kinds of assignments 276s registers offense(s) 276s such as lining up assignments with empty lines and comments in between 276s registers offense(s) 276s when ForceEqualSignAlignment is true 276s register offenses and correct consecutive operator assignments which are not aligned 276s register offenses and correct consecutive attribute assignments which are not aligned 276s registers an offense and corrects consecutive aref assignments which are not aligned 276s does not register offenses for multiple complex nested assignments 276s register offenses and correct complex nested assignments 276s does not register an offense if assignments are aligned 276s does not register an offense when optarg equals is not aligned with assignment equals sign 276s aligns the first assignment with the following assignment 276s does not register alignment errors on outdented lines 276s does not register an offense if assignments are separated by blanks 276s registers an offense and corrects consecutive assignments that are not aligned 277s 277s RuboCop::Cop::Naming::InclusiveLanguage 277s comments 277s registers an offense in a single line comment 277s registers an offense in a block comment 277s when CheckComments is false 277s does not register an offense 277s strings 277s registers an offense in a heredoc 277s registers an offense for an interpolated string 277s registers an offense for a multiline string 277s does not register offenses and not raise `ArgumentError` for invalid byte sequence in UTF-8 277s when CheckStrings config is false 277s does not register offenses for strings 277s symbols 277s when CheckSymbols is true 277s registers an offense 277s when CheckSymbols is false 277s does not register an offense 277s variables 277s when CheckVariables config is true 277s registers offenses for class variables 277s registers offenses for global variables 277s registers offenses for instance variables 277s when CheckVariables config is false 277s does not register offenses for variables 277s filepath 277s one offense in filename 277s registers an offense 277s offense in directory name 277s registers an offense for a director 277s multiple offenses in filename 277s registers an offense with all problematic words 277s CheckFilepaths is false 277s does not register an offense 277s flagged term matching 277s registers an offense for a partial word match 277s registers an offense when using a flagged term with mixed case 277s registers an offense when using a flagged term 277s multiple offenses on a line 277s registers an offense for each word 277s disable default flagged term 277s ignores flagged terms that are set to nil 277s WholeWord: true 277s only flags when the term is a whole word 277s regex 277s registers an offense for a flagged term matched with a regexp 277s identifiers 277s when CheckIdentifiers config is true 277s registers an offense 277s when CheckIdentifiers config is false 277s does not register offenses for identifiers 277s suggestions 277s flagged term with three or more suggestions 277s includes all suggestions in the message 277s flagged term with two suggestions 277s includes both suggestions in the offense message 277s flagged term with one suggestion 277s includes the suggestion in the offense message 277s constants 277s when CheckConstants config is false 277s does not register offenses for constants 277s when CheckConstants config is true 277s registers offenses for constants 277s allowed use 277s does not register an offense for an allowed use 277s offense after an allowed use 277s registers an offense at the correct location 277s 277s RuboCop::Cop::Style::KeywordParametersOrder 277s registers an offense and corrects when multiple `kwoptarg` are before `kwarg` and argument parentheses omitted 277s registers an offense and corrects when multiple `kwoptarg`s are interleaved with `kwarg`sand last argument is `blockarg` and argument parentheses omitted 277s does not register an offense when there are no `kwoptarg`s before `kwarg`s 277s registers an offense and corrects when `kwoptarg` is before `kwarg` 277s registers an offense and corrects when multiple `kwoptarg`s are interleaved with `kwarg`sand last argument is `kwrestarg` and argument parentheses omitted 277s registers an offense and corrects when `kwoptarg` is before `kwarg` and argument parentheses omitted 277s registers an offense and corrects when multiple `kwoptarg`s are interleaved with `kwarg`s 277s when using block keyword parameters 277s registers an offense and corrects when `kwoptarg` is before `kwarg` 277s does not register an offense when there are no `kwoptarg`s before `kwarg`s 277s 277s RuboCop::Cop::Layout::RedundantLineBreak 277s when InspectBlocks is false 277s for an expression that does not fit on a single line 277s accepts a method call on a multiple lines 277s with a longer max line length 277s accepts a complex method call on a multiple lines 277s accepts an assignment containing a method definition 277s registers an offense for a method call with a do keyword that is just under the max line length 277s accepts an assignment containing a heredoc 277s accepts method call with a do keyword that would just surpass the max line length 277s accepts a method call followed by binary operations that are too long taken together 277s for a block 277s accepts when it is difficult to convert to single line 277s when Layout/SingleLineBlockChain is enabled 277s accepts a method call chained onto a single line block 277s for a block 277s accepts when the method call has parentheses 277s accepts when the method call has no arguments 277s when Layout/SingleLineBlockChain is disabled 277s accepts a multiline block without a chained method call 277s accepts a method call chained onto a multiline block 277s when Layout/SingleLineBlockChain is enabled 277s accepts a multiline block without a chained method call 277s when Layout/SingleLineBlockChain is disabled 277s reports an offense for a method call chained onto a single line block 277s for an expression that fits on a single line 277s registers an offense for a method call with a double quoted split string in parentheses 277s registers an offense for a method call with a double quoted split string without parentheses 277s accepts a method call with a block 277s registers an offense for a method call with a single quoted split string 277s accepts a binary expression containing an if expression 277s registers an offense for a method call on multiple lines inside a block 277s registers an offense for a method call on multiple lines with backslash 277s registers an offense for a method call with a double and single quoted split string 277s accepts an assignment containing a case expression 277s registers an offense for a method call with a split operation 277s accepts a method call on multiple lines if there are comments on them 277s registers an offense for a method call on multiple lines 277s accepts an assignment containing an if expression 277s accepts a method call on a single line 277s registers an offense for a method call as right hand side of an assignment 277s accepts an assignment containing a begin-end expression 277s method chains 277s properly corrects a method chain on multiple lines 277s registers an offense and corrects with a string argument on multiple lines 277s does not register an offense with a heredoc argument 277s registers an offense and corrects with a arguments on multiple lines 277s with LineLength Max 100 277s registers an offense for a method without parentheses on multiple lines 277s when InspectBlocks is true 277s when Layout/SingleLineBlockChain is disabled 277s reports an offense for a method call chained onto a single line block 277s for an expression that fits on a single line 277s accepts an assignment containing a begin-end expression 277s registers an offense for a method call with a split operation 277s registers an offense for a method call on multiple lines with backslash 277s registers an offense for a method call with a double quoted split string in parentheses 277s registers an offense for a method call with a double and single quoted split string 277s accepts an assignment containing a case expression 277s registers an offense for a method call with a single quoted split string 277s registers an offense for a method call as right hand side of an assignment 277s registers an offense for a method call on multiple lines inside a block 277s registers an offense for a method call on multiple lines 277s accepts a method call on multiple lines if there are comments on them 277s accepts a method call on a single line 277s accepts an assignment containing an if expression 277s accepts a binary expression containing an if expression 277s registers an offense for a method call with a double quoted split string without parentheses 277s accepts a method call with a block 277s method chains 277s registers an offense and corrects with a string argument on multiple lines 277s does not register an offense with a heredoc argument 277s registers an offense and corrects with a arguments on multiple lines 277s properly corrects a method chain on multiple lines 277s with LineLength Max 100 277s registers an offense for a method without parentheses on multiple lines 277s for a block 277s registers an offense when the method call has parentheses 277s registers an offense when the method call has no arguments 277s when Layout/SingleLineBlockChain is enabled 277s reports an offense for a multiline block without a chained method call 277s when Layout/SingleLineBlockChain is disabled 277s reports an offense for a method call chained onto a multiline block 277s reports an offense for a multiline block without a chained method call 277s for an expression that does not fit on a single line 277s accepts a method call on a multiple lines 277s with a longer max line length 277s accepts an assignment containing a heredoc 277s registers an offense for a method call with a do keyword that is just under the max line length 277s accepts a complex method call on a multiple lines 277s accepts method call with a do keyword that would just surpass the max line length 277s accepts a method call followed by binary operations that are too long taken together 277s accepts an assignment containing a method definition 277s for a block 277s accepts when it is difficult to convert to single line 277s when Layout/SingleLineBlockChain is enabled 277s accepts a method call chained onto a single line block 277s 277s RuboCop::Server::CLI 277s when using `--start-server` option 277s returns exit status 0 and display an information message 277s when using server option with `--cache-root path` option 277s returns exit status 0 and display an error message 277s when using server option with `--cache-root=path` option 277s returns exit status 0 and display an information message 277s when using `--server-status` option 277s returns exit status 0 and display an information message 277s when using `--server` option 277s returns exit status 0 and display an information message 277s when using exclusive `--start-server` option 277s returns exit status 2 and display an error message 277s when not using any server options and specifying `--server` in .rubocop file 278s returns exit status 0 and display an information message 278s when using exclusive `--server-status` option 278s returns exit status 2 and display an error message 278s when using `--restart-server` option 278s returns exit status 0 and display an information and a warning messages 278s when using exclusive `--restart-server` option 278s returns exit status 2 and display an error message 278s when not using any server options and specifying `--server` in `RUBOCOP_OPTS` environment variable 278s returns exit status 0 and display an information message 278s when using `--stop-server` option 278s returns exit status 0 and display a warning message 278s when using multiple server options 278s returns exit status 2 and display an error message 278s when using exclusive `--stop-server` option 279s returns exit status 2 and display an error message 279s when using `--no-server` option 279s returns exit status 0 279s when not using any server options 279s returns exit status 0 279s 279s RuboCop::Cop::Lint::UnexpectedBlockArity 279s registers multiple offenses 279s with a numblock 279s when using enough parameters, but not all explicitly 279s does not register an offense 279s when given two parameters 279s does not register an offense 279s with no receiver 279s does not register an offense 279s when given no parameters 279s registers an offense 279s when given three parameters 279s does not register an offense 279s when given one parameter 279s registers an offense 279s with a block 279s with a keyword splat 279s registers an offense 279s when given three parameters 279s does not register an offense 279s when given a splat parameter 279s does not register an offense 279s with shadow args 279s registers an offense 279s with no receiver 279s does not register an offense 279s when given no parameters 279s registers an offense 279s with optargs 279s with arity 1 279s registers an offense 279s with arity 2 279s does not register an offense 279s with keyword args 279s registers an offense 279s when destructuring 279s with arity 2 279s does not register an offense 279s with arity 1 279s registers an offense 279s when given two parameters 279s does not register an offense 279s when given one parameter 279s registers an offense 279s 279s RuboCop::Cop::Style::HashConversion 279s wraps complex statements in parens if needed 279s does not try to correct multi-argument Hash with odd number of arguments 279s reports different offense for hash argument Hash[] as a method argument without parentheses 279s reports an offense for single-argument Hash[] 279s reports different offense for hash argument Hash[] 279s reports different offense for multi-argument Hash[] 279s reports different offense for Hash[a || b] 279s reports different offense for empty Hash[] 279s registers and corrects an offense when using argumentless `zip` with parentheses in `Hash[]` 279s reports different offense for Hash[(a || b)] 279s reports different offense for Hash[(a && b)] 279s registers and corrects an offense when using multi-argument `Hash[]` as a method argument 279s registers and corrects an offense when using argumentless `zip` without parentheses in `Hash[]` 279s registers and corrects an offense when using `zip` with argument in `Hash[]` 279s reports different offense for Hash[a && b] 279s reports different offense for hash argument Hash[] as a method argument with parentheses 279s AllowSplatArgument: true 279s does not register an offense for unpacked array 279s AllowSplatArgument: false 279s reports uncorrectable offense for unpacked array 279s 279s RuboCop::Cop::Style::RedundantEach 279s does not register an offense when using `reverse_each(&:foo).each {...}` 279s registers an offense when using `each.each` 279s does not register an offense when using `each_with_index` 279s registers an offense when using `each.each_with_object` 279s registers an offense when using `reverse_each.each` 279s registers an offense when using `each.reverse_each` 279s does not register an offense when using `each_with_object` 279s does not register an offense when any method is used between methods with `each` in the method name 279s registers an offense when using `reverse_each.each_with_object` 279s does not register an offense when using `each` as enumerator 279s does not register an offense when using `each.with_object` 279s does not register an offense when using `each` with a symbol proc argument 279s does not register an offense when using `each.with_index` 279s does not register an offense when using `each {}.each_with_index {}` 279s does not register an offense when using `each_foo {}.each_with_object([]) {}` 279s registers an offense when using `each.each(&:foo)` 279s registers an offense when using `reverse_each.each_with_index` 279s does not register an offense when not chaining `each_` calls 279s does not register an offense when using `each_with_index.reverse_each` 279s registers an offense when using a method starting with `each_` with `each_with_index` 279s does not register an offense when using only single `each` 279s registers an offense when using a method starting with `each_` with `each_with_object` 279s does not register an offense when using `each_ancestor.each` 279s does not register an offense when using `each {}.reverse_each {}` 279s does not register an offense when using `reverse_each {}.each {}` 279s does not register an offense when using `each {}.each_with_object([]) {}` 279s does not register an offense when using `each` with a symbol proc for last argument 279s registers an offense when using `each.each_with_index` 279s 279s RuboCop::Cop::Style::DisableCopsWithinSourceCodeDirective 279s registers an offense for disabling all cops 279s registers an offense for disabled cop within source code 279s registers an offense for enabled cop within source code 279s with AllowedCops 279s when an mix of cops are disabled 279s registers an offense and corrects 279s when an non-allowed cop is disabled 279s registers an offense and corrects 279s when an allowed cop is disabled 279s does not register an offense 279s when using leading source comment 279s does not register an offense 279s 279s RuboCop::Cop::Style::CommandLiteral 279s when PercentLiteralDelimiters only has a default 279s respects the configuration when autocorrecting 279s %x commands with other delimiters than parentheses 279s registers an offense 279s heredoc commands 279s is ignored 279s when EnforcedStyle is set to mixed 279s a multi-line ` string with backticks 279s registers an offense without autocorrection 279s a single-line %x string without backticks 279s registers an offense and corrects to backticks 279s a multi-line %x string without backticks 279s is accepted 279s a single-line ` string with backticks 279s registers an offense without autocorrection 279s when configured to allow inner backticks 279s is accepted 279s a single-line ` string without backticks 279s is accepted 279s a multi-line %x string with backticks 279s is accepted 279s a single-line %x string with backticks 279s is accepted 279s when configured to allow inner backticks 279s registers an offense without autocorrection 279s a multi-line ` string without backticks 279s registers an offense and corrects to %x 279s when EnforcedStyle is set to backticks 279s a multi-line ` string with backticks 279s registers an offense without autocorrection 279s when configured to allow inner backticks 279s is accepted 279s a multi-line %x string with backticks 279s is accepted 279s when configured to allow inner backticks 279s registers an offense without autocorrection 279s a single-line %x string without backticks 279s registers an offense and corrects to backticks 279s a single-line ` string without backticks 279s is accepted 279s a single-line ` string with backticks 279s registers an offense without autocorrection 279s when configured to allow inner backticks 279s is accepted 279s a multi-line %x string without backticks 279s registers an offense and corrects to backticks 279s a single-line %x string with backticks 279s is accepted 279s when configured to allow inner backticks 279s registers an offense without autocorrection 279s a multi-line ` string without backticks 279s is accepted 279s when PercentLiteralDelimiters is configured and a default exists 279s ignores the default when autocorrecting 279s when EnforcedStyle is set to percent_x 279s a single-line ` string without backticks 279s registers an offense and corrects to %x 279s a single-line ` string with backticks 279s registers an offense without autocorrection 279s a multi-line ` string without backticks 279s registers an offense and corrects to %x 279s a multi-line %x string with backticks 279s is accepted 279s a multi-line ` string with backticks 279s registers an offense without autocorrection 279s a single-line %x string with backticks 279s is accepted 279s a single-line %x string without backticks 279s is accepted 279s a multi-line %x string without backticks 279s is accepted 279s when PercentLiteralDelimiters is configured with curly braces 279s respects the configuration when autocorrecting 279s 279s RuboCop::Cop::InternalAffairs::UndefinedConfig 279s ignores `cop_config` in non-cop classes 279s can handle an empty file 279s works with deeper nested cop names 279s registers an offense when the cop inherits `RuboCop::Cop::Base` 279s does not register an offense for implicit configuration keys 279s works when the base class is `Cop` instead of `Base` 279s registers an offense when the cop inherits `::RuboCop::Cop::Base` 279s does not register an offense if using `cop_config` outside of a cop class 279s registers an offense when the cop is not within the `RuboCop::Cop` namespace 279s registers an offense when the cop has no configuration at all 279s ignores `cop_config` in non-cop subclasses 279s registers an offense when the cop inherits `Cop::Base` 279s element lookup 279s does not register an offense for defined configuration keys 279s registers an offense for missing configuration keys 279s fetch 279s registers an offense for missing configuration keys 279s does not register an offense for defined configuration keys 279s with a default value 279s registers an offense for missing configuration keys 279s does not register an offense for defined configuration keys 279s 279s RuboCop::Cop::Layout::ArrayAlignment 279s when aligned with first parameter 279s autocorrects array within array with too much indentation 279s autocorrects misaligned array with the first element on a new row 279s does not register an offense or try to correct parallel assignment 279s registers an offense and corrects misaligned array elements 279s accepts several elements per line 279s accepts aligned array with fullwidth characters 279s autocorrects array within array with too little indentation 279s accepts single line array 279s accepts the first element being on a new row 279s accepts aligned array keys 279s does not indent heredoc strings when autocorrecting 279s when aligned with fixed indentation 279s autocorrects array within array with too little indentation 279s autocorrects array within array with too much indentation 279s accepts aligned array keys 279s accepts aligned array with fullwidth characters 279s does not register an offense or try to correct parallel assignment 279s does not indent heredoc strings when autocorrecting 279s accepts the first element being on a new row 279s registers an offense and corrects misaligned array elements 279s accepts single line array 279s accepts several elements per line 279s autocorrects misaligned array with the first element on a new row 279s 279s RuboCop::Cop::Lint::RaiseException 279s registers an offense and corrects for `fail` with `Exception.new` and message 279s does not register an offense for `raise` without arguments 279s registers an offense and corrects for `raise` with `::Exception` and message 279s registers an offense and corrects for `raise` with `Exception.new` and message 279s registers an offense and corrects for `raise` with `Exception.new(args*)` 279s registers an offense and corrects for `raise` with `Exception` and message 279s registers an offense and corrects for `raise` with `::Exception.new` 279s does not register an offense when raising Exception with explicit namespace 279s registers an offense and corrects for `fail` with `Exception` and message 279s registers an offense and corrects for `fail` with `Exception` 279s does not register an offense for `fail` without arguments 279s registers an offense and corrects for `raise` with `::Exception` 279s registers an offense and corrects for `raise` with `Exception` 279s when under namespace 279s does not register an offense when Exception without cbase specified 279s registers an offense and corrects when Exception with cbase specified 279s 279s RuboCop::Cop::Lint::RequireRangeParentheses 279s does not register an offense when using `42..nil` 279s does not register an offense when begin and end of the range are on the same line 279s registers an offense when the end of the range (`..`) is line break 279s registers an offense when the end of the range (`...`) is line break 279s does not register an offense when using `nil..42` 279s does not register an offense when the end of the range (`..`) is line break and is enclosed in parentheses 279s Ruby >= 2.7 279s does not register an offense when using beginless range only 279s Ruby >= 2.6 279s does not register an offense when using endless range only 279s 279s RuboCop::Cop::Style::DocumentationMethod 279s when declaring methods outside a class 279s when declaring methods in a module 279s with both public and private methods 279s when required for non-public methods 279s registers an offense 279s when the public method has no documentation 279s registers an offense 279s when the public method has documentation 279s does not register an offense 279s with documentation comment 279s when method is public 279s does not register an offense with `end` on the same line 279s does not register an offense 279s when method is module_function 279s does not register an offense for separate def 279s does not register an offense for inline def 279s without documentation comment 279s when method is public 279s registers an offense 279s registers an offense with `end` on the same line 279s when method is module_function 279s registers an offense for inline def 279s registers an offense for separate def 279s when method is private 279s does not register an offense with inline `private` 279s does not register an offense 279s does not register an offense with inline `private` and `end` 279s does not register an offense with `end` on the same line 279s when required for non-public methods 279s registers an offense with `end` on the same line 279s registers an offense with inline `private` 279s registers an offense with inline `private` and `end` 279s registers an offense 279s without documentation comment 279s when method is public 279s registers an offense 279s registers an offense with `end` on the same line 279s registers an offense when method is public, but there were private methods before 279s when method is protected 279s does not register an offense with inline `protected` 279s does not register an offense 279s when required for non-public methods 279s registers an offense 279s registers an offense with inline `protected` 279s when method is private 279s does not register an offense with inline `private` 279s does not register an offense with inline `private` and `end` 279s does not register an offense 279s does not register an offense with `end` on the same line 279s when required for non-public methods 279s registers an offense with `end` on the same line 279s registers an offense with inline `private` and `end` 279s registers an offense 279s registers an offense with inline `private` 279s when declaring methods in a class 279s with documentation comment 279s when method is public 279s does not register an offense 279s does not register an offense with `end` on the same line 279s without documentation comment 279s when method is public 279s registers an offense with `end` on the same line 279s registers an offense 279s when method is private 279s does not register an offense 279s does not register an offense with inline `private` 279s does not register an offense with `end` on the same line 279s does not register an offense with inline `private` and `end` 279s when required for non-public methods 279s registers an offense with inline `private` 279s registers an offense with `end` on the same line 279s registers an offense 279s registers an offense with inline `private` and `end` 279s with directive comment 279s registers an offense 279s with both public and private methods 279s when the public method has no documentation 279s registers an offense 279s when required for non-public methods 279s registers an offense 279s when the public method has documentation 279s does not register an offense 279s with annotation comment 279s registers an offense 279s when declaring methods for class instance 279s without documentation comment 279s registers an offense 280s registers an offense with `end` on the same line 280s with documentation comment 280s does not register an offense with `end` on the same line 280s does not register an offense 280s when method is private 280s does not register an offense with `end` on the same line 280s does not register an offense 280s does not register an offense with inline `private` and `end` 280s does not register an offense with inline `private` 280s when required for non-public methods 280s registers an offense with inline `private` and `end` 280s registers an offense with inline `private` 280s registers an offense with `end` on the same line 280s registers an offense 280s with both public and private methods 280s when required for non-public methods 280s registers an offense 280s when the public method has documentation 280s does not register an offense 280s when the public method has no documentation 280s registers an offense 280s with both public and private methods 280s when the public method has no documentation 280s registers an offense 280s when required for non-public methods 280s registers an offense 280s when the public method has documentation 280s does not register an offense 280s with documentation comment 280s does not register an offense 280s does not register an offense with `end` on the same line 280s 280s RuboCop::Cop::Style::StringHashKeys 280s does not register an offense when not using strings as keys 280s does not register an offense when string key is used in gsub! 280s registers an offense when using strings as keys mixed with other keys 280s registers an offense when using strings as keys 280s does not register an offense when string key is used in gsub 280s does not register an offense when string key is used in IO.popen 280s does not register an offense when string key is used in Open3.pipeline 280s autocorrects strings as keys into symbols with the correct syntax 280s does not register an offense when string key is used in Open3.capture3 280s 280s RuboCop::Cop::Style::BisectedAttrAccessor 280s registers an offense and corrects when both accessors of the name exists and accessor contains multiple names 280s registers an offense for accessors with the same visibility in different scopes 280s does not register an offense when using `attr_accessor` 280s registers an offense and corrects when both accessors of the name exists 280s registers and corrects in a module 280s registers an offense and corrects when both accessors are in the same visibility scope 280s does not register an offense when accessors are within different visibility scopes 280s registers an offense and corrects when attr and attr_writer exists 280s does not register an offense when only one accessor of the name exists 280s registers an offense and corrects properly when attr_writer is before attr_reader 280s registers an offense and corrects when within eigenclass 280s registers an offense and corrects when both accessors of the splat exists 280s multiple bisected accessors 280s when some attr names are bisected 280s registers and retains non-bisected attrs 280s when all attr names are bisected 280s registers and replaces with attr_accessor 280s 280s RuboCop::Cop::Style::InPatternThen 280s >= Ruby 2.7 280s registers an offense for `in b | c | d;` (alternative pattern) 280s registers an offense for `in b, c, d;` (array pattern) 280s registers an offense for `in b, c | d;` 280s accepts `;` separating statements in the body of `in` 280s registers an offense for `in b;` 280s when inspecting a case statement with an empty branch 280s does not register an offense 280s 280s RuboCop::Cop::Lint::ShadowingOuterLocalVariable 280s when a block local variable has same name as an outer scope variablewith same branches of same nested `if` condition node 280s registers an offense 280s when multiple block arguments have a same name starts with "_" 280s does not register an offense 280s when a block local variable has same name as an outer scope variable 280s registers an offense 280s when a block local variable has same name as an outer scope variablewith same branches of same `case` condition node 280s registers an offense 280s when a block local variable has same name as an outer scope variablewith different branches of same `if` condition node 280s does not register an offense 280s when a block argument has same name as an outer scope variable 280s registers an offense 280s when a block local variable has same name as an outer scope variablewith same branches of same `unless` condition node 280s registers an offense 280s when a block argument has same name "_" as outer scope variable "_" 280s does not register an offense 280s when the same variable name as a block variable is used in return value assignment of `if` 280s does not register an offense 280s when a block argument has different name with outer scope variables 280s does not register an offense 280s when an outer scope variable is referenced in a block 280s does not register an offense 280s 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 280s registers an offense 280s when an outer scope variable is reassigned in a block 280s does not register an offense 280s when a block local variable has same name as an outer scope variablewith different branches of same `unless` condition node 280s does not register an offense 280s when a method argument has same name as an outer scope variable 280s does not register an offense 280s when a block block argument has same name as an outer scope variable 280s registers an offense 280s when a block argument has a same name starts with "_" as an outer scope variable 280s does not register an offense 280s with Ractor.new 280s does not register an offense 280s when a splat block argument has same name as an outer scope variable 280s registers an offense 280s when a block local variable has same name as an outer scope variablewith different branches of same `case` condition node 280s does not register an offense 280s when a block local variable has same name as an outer scope variablewith same branches of same `if` condition node 280s registers an offense 280s when multiple block arguments have same name "_" 280s does not register an offense 280s 280s RuboCop::Cop::InternalAffairs::NodeDestructuring 280s registers an offense when destructuring using a splat 280s does not register an offense when receiver is named `array` 280s when destructuring using `node.children` 280s registers an offense when receiver is named `send_node` 280s registers an offense when receiver is named `node` 280s 280s RuboCop::Cop::VariableForce::Reference 280s .new 280s when non variable reference node is passed 280s raises error 280s 280s RuboCop::Cop::Style::FloatDivision 280s EnforcedStyle is fdiv 280s registers offense and corrects for left coerce 280s registers offense and corrects for both coerce 280s registers offense and corrects for right coerce 280s registers offense and corrects for left coerce with calculations 280s does not register offense on usage of fdiv 280s EnforcedStyle is left_coerce 280s registers offense and corrects for right coerce 280s registers offense and corrects for both coerce 280s registers offense and corrects for right coerce with calculations 280s does not register offense for left coerce 280s EnforcedStyle is right_coerce 280s registers offense and corrects for both coerce 280s does not register offense for right coerce 280s registers offense and corrects for left coerce 280s registers offense and corrects for left coerce with calculations 280s EnforcedStyle is single_coerce 280s does not register offense for right coerce only 280s registers offense and corrects for left coerce with calculations 280s does not register offense for left coerce only 280s registers offense and corrects for both coerce 280s 280s RuboCop::Cop::Lint::MultipleComparison 280s registers an offense for x >= y <= z 280s registers an offense for x > y < z 280s registers an offense for x <= y < z 280s registers an offense for x >= y < z 280s accepts to use `&` operator 280s registers an offense for x < y < z 280s registers an offense for x > y <= z 280s registers an offense for x >= y >= z 280s registers an offense for x <= y <= z 280s accepts to use `^` operator 280s registers an offense for x > y >= z 280s registers an offense for x < y >= z 280s registers an offense for x <= y >= z 280s registers an offense for x < y <= z 280s registers an offense for x <= y > z 280s registers an offense for x > y > z 280s registers an offense for x >= y > z 280s registers an offense for x < y > z 280s accepts to use one compare operator 280s accepts to use `|` operator 280s 280s RuboCop::Cop::Lint::AmbiguousRegexpLiteral 280s Ruby <= 2.7 280s with parentheses 280s accepts 280s with `match_with_lvasgn` node 280s with different parentheses 280s does not register an offense 280s without parentheses 280s registers an offense and corrects 280s with parentheses 280s does not register an offense 280s without parentheses 280s registers an offense and corrects when sending method to regexp with argument 280s registers an offense and corrects when single argument 280s registers an offense and corrects when sending method to regexp without argument 280s registers an offense and corrects when sending method inside parens without receiver takes a regexp argument 280s registers an offense and corrects when sending method chain to regexp 280s registers an offense and corrects when using nested method arguments without parentheses 280s registers an offense and corrects when using regexp without method call in a nested structure 280s registers an offense and corrects when nesting 280s registers an offense and corrects when using block argument 280s registers an offense and corrects when sending method without receiver takes a regexp argument 280s registers an offense and corrects when multiple arguments 280s Ruby >= 3.0 280s without parentheses 280s registers an offense and corrects when sending method inside parens without receiver takes a regexp argument 280s registers an offense and corrects when using regexp without method call in a nested structure 280s registers an offense and corrects when using nested method arguments without parentheses 280s registers an offense and corrects when sending method without receiver takes a regexp argument 280s registers an offense and corrects when sending method to regexp with argument 280s registers an offense and corrects when multiple arguments 280s registers an offense and corrects when sending method chain to regexp 280s registers an offense and corrects when single argument 280s registers an offense and corrects when using block argument 280s registers an offense and corrects when nesting 280s registers an offense and corrects when sending method to regexp without argument 280s with parentheses 280s accepts 280s with `match_with_lvasgn` node 280s with parentheses 280s does not register an offense 280s without parentheses 280s registers an offense and corrects 280s with different parentheses 280s does not register an offense 280s 280s RuboCop::Cop::Style::PerlBackrefs 280s autocorrects $POSTMATCH to Regexp.last_match.post_match 280s autocorrects $' to Regexp.last_match.post_match 280s autocorrects "#$1" to "#{Regexp.last_match(1)}" 280s autocorrects $` to Regexp.last_match.pre_match 280s autocorrects `#$1` to `#{Regexp.last_match(1)}` 280s autocorrects $9 to Regexp.last_match(9) 280s autocorrects $& to Regexp.last_match(0) 280s autocorrects $+ to Regexp.last_match(-1) 280s autocorrects /#$1/ to /#{Regexp.last_match(1)}/ 280s autocorrects $PREMATCH to Regexp.last_match.pre_match 280s autocorrects puts $1 to puts Regexp.last_match(1) 280s autocorrects $MATCH to Regexp.last_match(0) 280s autocorrects $LAST_PAREN_MATCH to Regexp.last_match(-1) 280s autocorrects $1 to ::Regexp.last_match(1) in namespace 280s 280s RuboCop::Cop::Gemspec::RubyVersionGlobalsUsage 280s registers an offense when using `::RUBY_VERSION` 280s does not register an offense when no `RUBY_VERSION` 280s registers an offense when using `RUBY_VERSION` 280s 280s RuboCop::Cop::Style::VariableInterpolation 280s registers an offense for interpolated global variables in regexp 280s registers an offense for interpolated class variables 280s registers an offense for interpolated global variables in string 280s does not register an offense for variables in expressions 280s registers an offense for interpolated instance variables 280s registers an offense for interpolated global variables in symbol 280s registers an offense for interpolated regexp back references 280s registers an offense for interpolated global variables in backticks 280s registers an offense for interpolated regexp nth back references 280s 280s RuboCop::Cop::Lint::UriEscapeUnescape 280s registers an offense when using `URI.escape('@?@!', '!?')` 280s registers an offense when using `::URI.encode('http://example.com)` 280s registers an offense when using `::URI.decode(enc_uri)` 280s registers an offense when using `::URI.escape('http://example.com')` 280s registers an offense when using `::URI.unescape(enc_uri)` 280s registers an offense when using `URI.escape('http://example.com')` 280s registers an offense when using `URI.decode(enc_uri)` 280s registers an offense when using `URI.encode('http://example.com')` 280s registers an offense when using `URI.unescape(enc_uri)` 280s 280s RuboCop::Cop::EnforceSuperclass 280s registers an offense for Class.new definition 280s registers an offense for models that subclass ActiveRecord::Base 280s registers an offense for model defined using top-level 280s registers an offense for models that subclass ::ActiveRecord::Base 280s registers an offense for single-line definitions 280s registers an offense for top-level constant ::Class.new definition 280s when MyModel subclasses ApplicationRecord 280s behaves like no offense 280s registers no offenses for `class MyModel < ::ApplicationRecord; end` 280s behaves like no offense 280s registers no offenses for `class MyModel < ApplicationRecord; end` 280s behaves like no offense 280s registers no offenses for `MyModel = ::Class.new(::ApplicationRecord) do 280s end 280s MyModel = ::Class.new(::ApplicationRecord) 280s ` 280s behaves like no offense 280s registers no offenses for `MyModel = Class.new(ApplicationRecord) do 280s end 280s MyModel = Class.new(ApplicationRecord) 280s ` 280s when ApplicationRecord subclasses ActiveRecord::Base 280s behaves like no offense 280s registers no offenses for `class ApplicationRecord < ActiveRecord::Base; end` 280s behaves like no offense 280s registers no offenses for `class ::ApplicationRecord < ActiveRecord::Base; end` 280s behaves like no offense 280s registers no offenses for `ApplicationRecord = Class.new(ActiveRecord::Base) do; end 280s ` 280s behaves like no offense 280s registers no offenses for `::ApplicationRecord = ::Class.new(::ActiveRecord::Base) 280s ` 280s behaves like no offense 280s registers no offenses for `::ApplicationRecord = Class.new(ActiveRecord::Base) do; end 280s ` 280s behaves like no offense 280s registers no offenses for `ApplicationRecord = Class.new(ActiveRecord::Base) 280s ` 280s behaves like no offense 280s registers no offenses for `::ApplicationRecord = ::Class.new(::ActiveRecord::Base) do; end 280s ` 280s behaves like no offense 280s registers no offenses for `ApplicationRecord = Class.new(::ActiveRecord::Base) do; end 280s ` 280s 280s RuboCop::Cop::Layout::SpaceAroundOperators 280s accepts an assignment with the same alignment margins 280s accepts exponent operator without spaces 280s accepts an operator called with method syntax 280s accepts exclamation point definition 280s accepts ::Kernel::raise 280s accepts a unary 280s accepts [arg] without space 280s accepts operator symbols 280s accepts scope operator 280s accepts argument default values without space 280s accepts unary operators without space 280s accepts splat operator 280s registers an offenses for exponent operator with spaces 280s accepts an assignment with a blank line 280s registers an offense and corrects singleton class operator` 280s accepts def of operator 280s accepts some operators that are exceptions & don't need spaces 280s accepts operators with spaces 280s accepts [] without space 280s accepts an operator at the end of a line 280s accepts ranges 280s accepts an assignment with spaces 280s accepts an assignment by `for` statement 280s accepts an operator at the beginning of a line 280s accepts the result of the ExtraSpacing Cop 280s accepts operator surrounded by tabs 280s accepts []= without space 280s accepts rational 280s registers an offense and corrects exclamation point negation 280s accepts an assignment followed by newline 280s extra space around operators 280s registers an offense and corrects binary operators that could be unary 280s registers an offense and corrects various assignments with too many spaces 280s registers an offense and corrects operators with too many spaces on the same line 280s does not register an offenses match operators between `+=` and `<<` 280s registers an offense and corrects inheritance < with too many spaces 280s registers an offense and corrects equality operators with too many spaces 280s registers an offense and corrects arguments to a method 280s registers an offense and corrects a hash rocket with too many spaces 280s registers an offense and corrects hash rocket with too many spaces at rescue 280s registers an offense and corrects ternary operator with too many spaces 280s registers an offense and corrects operators with too many spaces 280s registers an offense and corrects match operators with too many spaces 280s accepts for a hash rocket with an extra space for alignment on multiple line 280s does not register an offenses match operators between `<<` and `+=` 280s registers an offense and corrects `-` with too many spaces with negative lhs operand 280s registers an offense and corrects a setter call with too many spaces 280s registers an offense and corrects a hash rocket with an extra spaceon multiple line 280s registers an offense and corrects assignment with too many spaces on either side 280s behaves like modifier with extra space 280s registers an offense in presence of modifier unless statement 280s behaves like modifier with extra space 280s registers an offense in presence of modifier until statement 280s when does not allowed for alignment 280s registers an offense and corrects an extra space 280s behaves like modifier with extra space 280s registers an offense in presence of modifier while statement 280s behaves like modifier with extra space 280s registers an offense in presence of modifier if statement 280s when EnforcedStyleForExponentOperator is space 280s registers an offenses for exponent operator without spaces 280s >= Ruby 2.7 280s does not register an offenses for one-line pattern matching syntax (`in`) 280s when Layout/ExtraSpacing has `ForceEqualSignAlignment` configured to true 280s allows variables to be aligned 280s allows constants to be aligned 280s >= Ruby 3.0 280s registers an offenses for one-line pattern matching syntax (`=>`) 280s missing space around operators 280s registers an offense and corrects `-` without space with a negative lhs operand 280s registers an offense for binary operators that could be unary 280s registers an offense for assignment without space on both sides 280s registers an offense and corrects hash rocket without space at rescue 280s registers an offense and corrects a setter call without spaces 280s registers an offense for operators without spaces 280s registers an offense and corrects equality operators without space 280s registers an offense and corrects inheritance < without space 280s doesn't register an offense for operators with newline on right 280s registers an offense and corrects arguments to a method 280s registers an offense and corrects string concatenation without messing up new lines 280s registers an offense and corrects various assignments without space 280s registers an offense and corrects match operators without space 280s behaves like modifier with missing space 280s registers an offense in presence of modifier while statement 280s behaves like modifier with missing space 281s registers an offense in presence of modifier until statement 281s when a hash literal is on multiple lines 281s and Layout/HashAlignment:EnforcedHashRocketStyle is key 281s registers an offense and corrects a hash rocket without spaces 281s and Layout/HashAlignment:EnforcedHashRocketStyle is table 281s doesn't register an offense for a hash rocket without spaces 281s behaves like modifier with missing space 281s registers an offense in presence of modifier if statement 281s ternary operators 281s registers an offense and corrects operators with just a trailing space 281s registers an offense and corrects operators with just a leading space 281s registers an offense and corrects operators with no spaces 281s when a hash literal is on a single line 281s and Layout/HashAlignment:EnforcedHashRocketStyle is table 281s registers an offense and corrects a hash rocket without spaces 281s and Layout/HashAlignment:EnforcedHashRocketStyle is key 281s registers an offense and corrects a hash rocket without spaces 281s behaves like modifier with missing space 281s registers an offense in presence of modifier unless statement 281s 281s RuboCop::Cop::Lint::RequireRelativeSelfPath 281s does not register an offense when the filename is the same but the extension does not match 281s registers an offense when using `require_relative` with self file path argument (with ext) 281s does not register an offense when using `require_relative` without argument 281s registers an offense when using `require_relative` with self file path argument 281s does not register an offense when using a variable as an argument of `require_relative` 281s does not register an offense when using `require_relative` without self file path argument 281s 281s RuboCop::Cop::Layout::SpaceAfterComma 281s inside hash braces 281s when EnforcedStyle for SpaceInsideBlockBraces is no_space 281s accepts no space between a comma and a closing brace 281s behaves like common behavior 281s accepts a space between a comma and a closing brace 281s when EnforcedStyle for SpaceInsideBlockBraces is space 281s registers an offense for no space between a comma and a closing brace 281s behaves like common behavior 281s accepts a space between a comma and a closing brace 281s block argument commas without space 281s behaves like trailing comma 281s accepts the last comma 281s behaves like ends with an item 281s registers an offense and does autocorrection 281s method call arg commas without space 281s behaves like ends with an item 281s registers an offense and does autocorrection 281s array index commas without space 281s behaves like ends with an item 281s registers an offense and does autocorrection 281s behaves like trailing comma 281s accepts the last comma 281s 281s RuboCop::Cop::Lint::NestedPercentLiteral 281s registers no offense for percent modifier character in isolation 281s registers offense for nested percent literals 281s registers offense for multiply nested percent literals 281s registers no offense for percents in the middle of literals 281s registers offense for repeated nested percent literals 281s registers no offense for nestings under percent 281s registers no offense for array 281s registers no offense for empty array 281s when handling invalid UTF8 byte sequence 281s registers no offense for array 281s registers offense for nested percent literal 281s 281s RuboCop::Cop::Style::TrailingBodyOnModule 281s registers an offense when body trails after module definition 281s registers offense when module definition uses semicolon 281s registers offense with multi-line module 281s autocorrects with comment after body 281s autocorrects when there are multiple semicolons 281s accepts regular module 281s when module is not on first line of processed_source 281s autocorrects offense 281s 281s RuboCop::Cop::Style::MutableConstant 281s Strict: false 281s allows method call assignments 281s behaves like immutable objects 281s allows :sym to be ||= to a constant 281s allows :sym to be assigned to a constant 281s when assigning an array without brackets 281s adds brackets when autocorrecting 281s does not insert brackets for %w() arrays 281s behaves like immutable objects 281s allows ::ENV['foo'] to be assigned to a constant 281s allows ::ENV['foo'] to be ||= to a constant 281s behaves like immutable objects 281s allows 1.5 to be assigned to a constant 281s allows 1.5 to be ||= to a constant 281s behaves like mutable objects 281s when assigning with ||= 281s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 281s when assigning with = 281s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 281s behaves like immutable objects 281s allows ENV['foo'] to be ||= to a constant 281s allows ENV['foo'] to be assigned to a constant 281s behaves like immutable objects 281s allows FOO - BAR to be ||= to a constant 281s allows FOO - BAR to be assigned to a constant 281s behaves like immutable objects 281s allows 'foo' + 'bar' to be assigned to a constant 281s allows 'foo' + 'bar' to be ||= to a constant 281s behaves like immutable objects 281s allows 1 to be ||= to a constant 281s allows 1 to be assigned to a constant 281s behaves like mutable objects 281s when assigning with = 281s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 281s when assigning with ||= 281s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 281s behaves like immutable objects 281s allows FOO + BAR to be assigned to a constant 281s allows FOO + BAR to be ||= to a constant 281s behaves like mutable objects 281s when assigning with ||= 281s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 281s when assigning with = 281s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 281s behaves like string literal 281s Ruby 2.7 or lower 281s when the frozen string literal comment is false 281s behaves like mutable objects 281s when assigning with ||= 281s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 281s when assigning with = 281s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 281s when the frozen string literal comment is true 281s does not register an offense when using a multiline string 281s does not register an offense when using interpolated heredoc constant 281s behaves like immutable objects 281s allows "#{a}" to be ||= to a constant 281s allows "#{a}" to be assigned to a constant 281s behaves like immutable objects 281s allows <<~HERE 281s foo 281s bar 281s HERE 281s to be assigned to a constant 281s allows <<~HERE 281s foo 281s bar 281s HERE 281s to be ||= to a constant 281s when the frozen string literal comment is missing 281s behaves like mutable objects 281s when assigning with ||= 281s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 281s when assigning with = 281s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 281s Ruby 3.0 or higher 281s when the frozen string literal comment is missing 281s behaves like mutable objects 281s when assigning with = 281s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 281s when assigning with ||= 281s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 281s when the frozen string literal comment is true 281s registers an offense when using a multiline string with interpolation 281s registers an offense when using interpolated heredoc constant 281s does not register an offense when using a multiline string 281s behaves like immutable objects 281s allows <<~HERE 281s foo 281s bar 281s HERE 281s to be assigned to a constant 281s allows <<~HERE 281s foo 281s bar 281s HERE 281s to be ||= to a constant 281s behaves like mutable objects 281s when assigning with = 281s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 281s when assigning with ||= 281s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 281s when the frozen string literal comment is false 281s behaves like mutable objects 281s when assigning with ||= 281s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 281s when assigning with = 281s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 281s behaves like mutable objects 281s when assigning with ||= 281s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 281s when assigning with = 281s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 281s splat expansion 281s expansion of a range 281s registers an offense and corrects to use to_a.freeze 281s with parentheses 281s registers an offense and corrects to use to_a.freeze 281s Ruby 3.0 or higher 281s raises offense when shareable_constant_value is specified as an inline comment 281s raises offense only for shareable_constant_value as none when set in the order of: literal, none and experimental_everything 281s when assigning a range (irange) 281s does not register an offense when without parenthesis 281s does not register an offense when with parenthesis 281s when assigning a regexp 281s does not register an offense 281s when using shareable_constant_value 281s behaves like literals that are not frozen 281s behaves like immutable objects 281s allows ::ENV['foo'] to be assigned to a constant 281s allows ::ENV['foo'] to be ||= to a constant 281s behaves like immutable objects 281s allows FOO - BAR to be assigned to a constant 281s allows FOO - BAR to be ||= to a constant 281s behaves like immutable objects 281s allows :sym to be ||= to a constant 281s allows :sym to be assigned to a constant 281s behaves like immutable objects 281s allows 1 to be ||= to a constant 281s allows 1 to be assigned to a constant 281s behaves like mutable objects 281s when assigning with ||= 281s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 281s when assigning with = 281s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 281s behaves like immutable objects 281s allows ENV['foo'] to be ||= to a constant 281s allows ENV['foo'] to be assigned to a constant 281s behaves like mutable objects 281s when assigning with = 281s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 281s when assigning with ||= 281s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 281s behaves like mutable objects 281s when assigning with = 281s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 281s when assigning with ||= 281s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 281s behaves like mutable objects 281s when assigning with = 281s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 281s when assigning with ||= 281s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 281s behaves like mutable objects 281s when assigning with = 281s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 281s when assigning with ||= 281s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 281s behaves like immutable objects 281s allows 1.5 to be ||= to a constant 281s allows 1.5 to be assigned to a constant 281s behaves like immutable objects 281s allows 'foo' + 'bar' to be ||= to a constant 281s allows 'foo' + 'bar' to be assigned to a constant 281s behaves like immutable objects 281s allows FOO + BAR to be assigned to a constant 281s allows FOO + BAR to be ||= to a constant 281s behaves like literals that are frozen 281s behaves like immutable objects 281s allows :sym to be ||= to a constant 281s allows :sym to be assigned to a constant 281s behaves like immutable objects 281s allows FOO + BAR to be ||= to a constant 281s allows FOO + BAR to be assigned to a constant 281s behaves like immutable objects 281s allows ENV['foo'] to be assigned to a constant 281s allows ENV['foo'] to be ||= to a constant 281s behaves like immutable objects 281s allows 'str' to be assigned to a constant 281s allows 'str' to be ||= to a constant 281s behaves like immutable objects 281s allows [1, 2, 3] to be assigned to a constant 281s allows [1, 2, 3] to be ||= to a constant 281s behaves like immutable objects 281s allows %w(a b c) to be assigned to a constant 281s allows %w(a b c) to be ||= to a constant 281s behaves like immutable objects 281s allows 1 to be assigned to a constant 281s allows 1 to be ||= to a constant 281s behaves like immutable objects 281s allows ::ENV['foo'] to be assigned to a constant 281s allows ::ENV['foo'] to be ||= to a constant 281s behaves like immutable objects 281s allows "top#{1 + 2}" to be assigned to a constant 281s allows "top#{1 + 2}" to be ||= to a constant 281s behaves like immutable objects 281s allows 1.5 to be ||= to a constant 281s allows 1.5 to be assigned to a constant 281s behaves like immutable objects 281s allows 'foo' + 'bar' to be ||= to a constant 281s allows 'foo' + 'bar' to be assigned to a constant 281s behaves like immutable objects 281s allows { a: 1, b: 2 } to be assigned to a constant 281s allows { a: 1, b: 2 } to be ||= to a constant 281s behaves like immutable objects 281s allows FOO - BAR to be ||= to a constant 281s allows FOO - BAR to be assigned to a constant 281s behaves like literals that are frozen 281s behaves like immutable objects 281s allows :sym to be ||= to a constant 281s allows :sym to be assigned to a constant 281s behaves like immutable objects 281s allows { a: 1, b: 2 } to be ||= to a constant 281s allows { a: 1, b: 2 } to be assigned to a constant 281s behaves like immutable objects 281s allows FOO - BAR to be ||= to a constant 281s allows FOO - BAR to be assigned to a constant 281s behaves like immutable objects 281s allows "top#{1 + 2}" to be ||= to a constant 281s allows "top#{1 + 2}" to be assigned to a constant 281s behaves like immutable objects 281s allows ENV['foo'] to be assigned to a constant 281s allows ENV['foo'] to be ||= to a constant 281s behaves like immutable objects 281s allows 'str' to be ||= to a constant 281s allows 'str' to be assigned to a constant 281s behaves like immutable objects 281s allows [1, 2, 3] to be ||= to a constant 281s allows [1, 2, 3] to be assigned to a constant 281s behaves like immutable objects 281s allows ::ENV['foo'] to be ||= to a constant 281s allows ::ENV['foo'] to be assigned to a constant 281s behaves like immutable objects 281s allows 'foo' + 'bar' to be ||= to a constant 281s allows 'foo' + 'bar' to be assigned to a constant 281s behaves like immutable objects 281s allows 1.5 to be assigned to a constant 281s allows 1.5 to be ||= to a constant 281s behaves like immutable objects 281s allows FOO + BAR to be ||= to a constant 281s allows FOO + BAR to be assigned to a constant 281s behaves like immutable objects 281s allows 1 to be ||= to a constant 281s allows 1 to be assigned to a constant 281s behaves like immutable objects 281s allows %w(a b c) to be ||= to a constant 281s allows %w(a b c) to be assigned to a constant 281s behaves like literals that are frozen 281s behaves like immutable objects 281s allows ::ENV['foo'] to be ||= to a constant 281s allows ::ENV['foo'] to be assigned to a constant 281s behaves like immutable objects 281s allows ENV['foo'] to be assigned to a constant 281s allows ENV['foo'] to be ||= to a constant 281s behaves like immutable objects 281s allows 1 to be assigned to a constant 281s allows 1 to be ||= to a constant 281s behaves like immutable objects 281s allows FOO + BAR to be ||= to a constant 281s allows FOO + BAR to be assigned to a constant 281s behaves like immutable objects 281s allows "top#{1 + 2}" to be assigned to a constant 281s allows "top#{1 + 2}" to be ||= to a constant 281s behaves like immutable objects 281s allows 'str' to be ||= to a constant 281s allows 'str' to be assigned to a constant 281s behaves like immutable objects 281s allows :sym to be assigned to a constant 281s allows :sym to be ||= to a constant 281s behaves like immutable objects 281s allows FOO - BAR to be assigned to a constant 281s allows FOO - BAR to be ||= to a constant 281s behaves like immutable objects 281s allows %w(a b c) to be ||= to a constant 281s allows %w(a b c) to be assigned to a constant 281s behaves like immutable objects 281s allows { a: 1, b: 2 } to be ||= to a constant 281s allows { a: 1, b: 2 } to be assigned to a constant 281s behaves like immutable objects 281s allows 1.5 to be assigned to a constant 281s allows 1.5 to be ||= to a constant 281s behaves like immutable objects 281s allows [1, 2, 3] to be ||= to a constant 281s allows [1, 2, 3] to be assigned to a constant 281s behaves like immutable objects 281s allows 'foo' + 'bar' to be ||= to a constant 281s allows 'foo' + 'bar' to be assigned to a constant 281s when assigning a range (erange) 281s does not register an offense when with parenthesis 281s does not register an offense when without parenthesis 281s Ruby 2.7 or lower 281s when assigning a range (irange) without parenthesis 281s does not insert parenthesis to range enclosed in parentheses 281s adds parentheses when autocorrecting 281s when using shareable_constant_values 281s behaves like literals that are not frozen 281s behaves like mutable objects 281s when assigning with = 281s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 281s when assigning with ||= 281s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 281s behaves like immutable objects 281s allows 'foo' + 'bar' to be assigned to a constant 281s allows 'foo' + 'bar' to be ||= to a constant 281s behaves like immutable objects 281s allows :sym to be ||= to a constant 281s allows :sym to be assigned to a constant 281s behaves like immutable objects 281s allows FOO - BAR to be ||= to a constant 281s allows FOO - BAR to be assigned to a constant 281s behaves like immutable objects 281s allows ENV['foo'] to be ||= to a constant 281s allows ENV['foo'] to be assigned to a constant 281s behaves like mutable objects 281s when assigning with ||= 281s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 281s when assigning with = 281s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 281s behaves like immutable objects 281s allows ::ENV['foo'] to be ||= to a constant 281s allows ::ENV['foo'] to be assigned to a constant 281s behaves like mutable objects 281s when assigning with ||= 281s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 281s when assigning with = 281s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 281s behaves like immutable objects 281s allows FOO + BAR to be ||= to a constant 281s allows FOO + BAR to be assigned to a constant 281s behaves like mutable objects 281s when assigning with ||= 281s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 281s when assigning with = 281s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 281s behaves like mutable objects 281s when assigning with ||= 281s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 281s when assigning with = 281s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 281s behaves like immutable objects 281s allows 1 to be assigned to a constant 281s allows 1 to be ||= to a constant 281s behaves like immutable objects 281s allows 1.5 to be ||= to a constant 281s allows 1.5 to be assigned to a constant 281s behaves like literals that are not frozen 281s behaves like mutable objects 281s when assigning with ||= 281s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 281s when assigning with = 281s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 281s behaves like immutable objects 281s allows FOO - BAR to be ||= to a constant 281s allows FOO - BAR to be assigned to a constant 281s behaves like immutable objects 281s allows 1.5 to be ||= to a constant 281s allows 1.5 to be assigned to a constant 281s behaves like mutable objects 281s when assigning with ||= 281s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 281s when assigning with = 281s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 281s behaves like immutable objects 281s allows :sym to be ||= to a constant 281s allows :sym to be assigned to a constant 281s behaves like immutable objects 281s allows ::ENV['foo'] to be ||= to a constant 281s allows ::ENV['foo'] to be assigned to a constant 281s behaves like immutable objects 281s allows 'foo' + 'bar' to be ||= to a constant 281s allows 'foo' + 'bar' to be assigned to a constant 281s behaves like mutable objects 281s when assigning with = 281s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 281s when assigning with ||= 281s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 281s behaves like immutable objects 281s allows 1 to be ||= to a constant 281s allows 1 to be assigned to a constant 281s behaves like mutable objects 281s when assigning with = 281s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 281s when assigning with ||= 281s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 281s behaves like immutable objects 281s allows ENV['foo'] to be ||= to a constant 281s allows ENV['foo'] to be assigned to a constant 281s behaves like immutable objects 281s allows FOO + BAR to be ||= to a constant 281s allows FOO + BAR to be assigned to a constant 281s behaves like mutable objects 281s when assigning with ||= 281s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 281s when assigning with = 281s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 281s behaves like literals that are not frozen 281s behaves like immutable objects 281s allows 'foo' + 'bar' to be ||= to a constant 281s allows 'foo' + 'bar' to be assigned to a constant 281s behaves like immutable objects 281s allows 1.5 to be ||= to a constant 281s allows 1.5 to be assigned to a constant 281s behaves like mutable objects 281s when assigning with ||= 281s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 281s when assigning with = 281s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 281s behaves like immutable objects 281s allows :sym to be assigned to a constant 281s allows :sym to be ||= to a constant 281s behaves like immutable objects 281s allows ::ENV['foo'] to be assigned to a constant 281s allows ::ENV['foo'] to be ||= to a constant 281s behaves like mutable objects 281s when assigning with ||= 281s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 281s when assigning with = 281s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 281s behaves like mutable objects 281s when assigning with ||= 281s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 281s when assigning with = 281s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 281s behaves like immutable objects 281s allows ENV['foo'] to be assigned to a constant 281s allows ENV['foo'] to be ||= to a constant 281s behaves like immutable objects 281s allows FOO - BAR to be assigned to a constant 281s allows FOO - BAR to be ||= to a constant 281s behaves like immutable objects 281s allows FOO + BAR to be ||= to a constant 281s allows FOO + BAR to be assigned to a constant 281s behaves like mutable objects 281s when assigning with = 281s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 281s when assigning with ||= 281s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 281s behaves like mutable objects 281s when assigning with ||= 281s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 281s when assigning with = 281s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 281s behaves like immutable objects 281s allows 1 to be assigned to a constant 281s allows 1 to be ||= to a constant 281s behaves like literals that are not frozen 281s behaves like immutable objects 281s allows ::ENV['foo'] to be assigned to a constant 281s allows ::ENV['foo'] to be ||= to a constant 281s behaves like immutable objects 281s allows 1 to be assigned to a constant 281s allows 1 to be ||= to a constant 281s behaves like immutable objects 281s allows FOO + BAR to be ||= to a constant 281s allows FOO + BAR to be assigned to a constant 281s behaves like immutable objects 281s allows FOO - BAR to be ||= to a constant 281s allows FOO - BAR to be assigned to a constant 281s behaves like mutable objects 281s when assigning with ||= 281s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 281s when assigning with = 281s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 281s behaves like mutable objects 281s when assigning with = 281s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 281s when assigning with ||= 281s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 281s behaves like mutable objects 281s when assigning with = 281s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 281s when assigning with ||= 281s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 281s behaves like immutable objects 281s allows :sym to be assigned to a constant 281s allows :sym to be ||= to a constant 281s behaves like mutable objects 281s when assigning with = 281s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 281s when assigning with ||= 281s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 281s behaves like mutable objects 281s when assigning with ||= 281s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 281s when assigning with = 281s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 281s behaves like immutable objects 281s allows ENV['foo'] to be ||= to a constant 281s allows ENV['foo'] to be assigned to a constant 281s behaves like immutable objects 281s allows 1.5 to be assigned to a constant 281s allows 1.5 to be ||= to a constant 281s behaves like immutable objects 281s allows 'foo' + 'bar' to be assigned to a constant 281s allows 'foo' + 'bar' to be ||= to a constant 281s when assigning a range (erange) without parenthesis 281s does not insert parenthesis to range enclosed in parentheses 281s adds parentheses when autocorrecting 281s when assigning a regexp 281s registers an offense 281s behaves like mutable objects 281s when assigning with = 281s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 281s when assigning with ||= 282s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 282s Strict: true 282s freezes a heredoc 282s allows calls to freeze 282s behaves like immutable objects 282s allows 1.5 to be assigned to a constant 282s allows 1.5 to be ||= to a constant 282s operators that produce unfrozen objects 282s registers an offense when operating on multiple strings 282s registers an offense when operating on a constant and a string 282s behaves like mutable objects 282s when assigning with ||= 282s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 282s when assigning with = 282s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 282s splat expansion 282s expansion of a range 282s registers an offense and corrects to use to_a.freeze 282s with parentheses 282s registers an offense and corrects to use to_a.freeze 282s behaves like mutable objects 282s when assigning with ||= 282s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 282s when assigning with = 282s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 282s behaves like string literal 282s Ruby 3.0 or higher 282s when the frozen string literal comment is missing 282s behaves like mutable objects 282s when assigning with ||= 282s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 282s when assigning with = 282s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 282s when the frozen string literal comment is false 282s behaves like mutable objects 282s when assigning with ||= 282s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 282s when assigning with = 282s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 282s when the frozen string literal comment is true 282s registers an offense when using a multiline string with interpolation 282s does not register an offense when using a multiline string 282s registers an offense when using interpolated heredoc constant 282s behaves like mutable objects 282s when assigning with ||= 282s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 282s when assigning with = 282s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 282s behaves like immutable objects 282s allows <<~HERE 282s foo 282s bar 282s HERE 282s to be ||= to a constant 282s allows <<~HERE 282s foo 282s bar 282s HERE 282s to be assigned to a constant 282s Ruby 2.7 or lower 282s when the frozen string literal comment is false 282s behaves like mutable objects 282s when assigning with = 282s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 282s when assigning with ||= 282s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 282s when the frozen string literal comment is true 282s does not register an offense when using a multiline string 282s does not register an offense when using interpolated heredoc constant 282s behaves like immutable objects 282s allows <<~HERE 282s foo 282s bar 282s HERE 282s to be ||= to a constant 282s allows <<~HERE 282s foo 282s bar 282s HERE 282s to be assigned to a constant 282s behaves like immutable objects 282s allows "#{a}" to be assigned to a constant 282s allows "#{a}" to be ||= to a constant 282s when the frozen string literal comment is missing 282s behaves like mutable objects 282s when assigning with ||= 282s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 282s when assigning with = 282s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 282s behaves like mutable objects 282s when assigning with ||= 282s registers an offense for Something.new assigned to a constant and corrects by adding .freeze 282s when assigning with = 282s registers an offense for Something.new assigned to a constant and corrects by adding .freeze 282s when assigning with an operator 282s behaves like operator methods 282s registers an offense and corrects with parens and freeze 282s behaves like operator methods 282s registers an offense and corrects with parens and freeze 282s behaves like operator methods 282s registers an offense and corrects with parens and freeze 282s behaves like operator methods 282s registers an offense and corrects with parens and freeze 282s behaves like operator methods 282s registers an offense and corrects with parens and freeze 282s behaves like operator methods 282s registers an offense and corrects with parens and freeze 282s behaves like immutable objects 282s allows ::Namespace::OTHER_CONST to be ||= to a constant 282s allows ::Namespace::OTHER_CONST to be assigned to a constant 282s behaves like immutable objects 282s allows ::Struct.new to be ||= to a constant 282s allows ::Struct.new to be assigned to a constant 282s behaves like immutable objects 282s allows Struct.new to be ||= to a constant 282s allows Struct.new to be assigned to a constant 282s behaves like mutable objects 282s when assigning with ||= 282s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 282s when assigning with = 282s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 282s when assigning an array without brackets 282s adds brackets when autocorrecting 282s does not insert brackets for %w() arrays 282s behaves like immutable objects 282s allows OTHER_CONST to be assigned to a constant 282s allows OTHER_CONST to be ||= to a constant 282s behaves like immutable objects 282s allows ::OTHER_CONST to be assigned to a constant 282s allows ::OTHER_CONST to be ||= to a constant 282s behaves like immutable objects 282s allows ::ENV['foo'] to be assigned to a constant 282s allows ::ENV['foo'] to be ||= to a constant 282s methods and operators that produce frozen objects 282s accepts operating on a constant and an interger 282s accepts operating on multiple floats 282s accepts assigning to an environment variable with a fallback 282s accepts operating on a constant and a float 282s accepts operating on multiple integers 282s accepts comparison operators 282s accepts checking fixed size 282s behaves like immutable objects 282s allows Namespace::OTHER_CONST to be assigned to a constant 282s allows Namespace::OTHER_CONST to be ||= to a constant 282s behaves like mutable objects 282s when assigning with = 282s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 282s when assigning with ||= 282s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 282s behaves like mutable objects 282s when assigning with = 282s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 282s when assigning with ||= 282s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 282s behaves like immutable objects 282s allows 1 to be ||= to a constant 282s allows 1 to be assigned to a constant 282s behaves like immutable objects 282s allows :sym to be ||= to a constant 282s allows :sym to be assigned to a constant 282s behaves like immutable objects 282s allows ENV['foo'] to be ||= to a constant 282s allows ENV['foo'] to be assigned to a constant 282s when assigning with multiple operator calls 282s registers an offense and corrects with parens and freeze 282s behaves like immutable objects 282s allows Struct.new(:a, :b) to be assigned to a constant 282s allows Struct.new(:a, :b) to be ||= to a constant 282s behaves like immutable objects 282s allows Struct.new(:node) do 282s def assignment? 282s true 282s end 282s end 282s to be assigned to a constant 282s allows Struct.new(:node) do 282s def assignment? 282s true 282s end 282s end 282s to be ||= to a constant 282s 282s RuboCop::Cop::Layout::MultilineAssignmentLayout 282s new_line style 282s registers an offense when the rhs is on the same line in []= 282s registers an offense when the rhs is on the same line 282s ignores arrays 282s registers an offense when the rhs is on the same line in setters 282s allows multi-line assignments on separate lines 282s registers an offense for masgn with multi-line lhs 282s when supported types is block 282s allows multi-line assignments when using block definition on separate lines 282s registers an offense when multi-line assignments using block definition is on the same line 282s allows multi-line assignments when using shovel operator 282s allows multi-line block defines on separate lines 282s configured supported types 282s allows supported types to be configured 282s same_line style 282s allows multi-line assignments on the same line 282s registers an offense when the rhs is a different line in setters 282s registers an offense when the rhs is a different line 282s registers an offense when the rhs is a different line in []= 282s registers an offense for masgn with multi-line lhs 282s ignores arrays 282s configured supported types 282s allows supported types to be configured 282s when supported types is block 282s allows when multi-line assignments using block definition is on the same line 282s registers an offense when multi-line assignments using block definition on separate lines 282s allows multi-line block defines on separate lines 282s allows multi-line assignments when using shovel operator 282s 282s RuboCop::Cop::Lint::AssignmentInCondition 282s registers an offense for assignment after == in condition 282s registers an offense for clvar assignment in condition 282s accepts == in condition 282s registers an offense for = in condition inside a block 282s does not blow up for empty if condition 282s registers an offense for constant assignment in condition 282s registers an offense for ivar assignment in condition 282s registers an offense for collection element assignment in condition 282s registers an offense for gvar assignment in condition 282s accepts ||= in condition 282s accepts assignment in a block after || 282s registers an offense for assignment after ||= in condition 282s does not blow up for empty unless condition 282s registers an offense for assignment methods 282s registers an offense for lvar assignment in while condition 282s registers an offense for lvar assignment in until condition 282s registers an offense for lvar assignment in condition 282s accepts = in a block followed by method call 282s accepts = in a block that is called in a condition 282s safe assignment is allowed 282s accepts = in condition surrounded with braces 282s accepts []= in condition surrounded with braces 282s safe assignment is not allowed 282s does not accept []= in condition surrounded with braces 282s does not accept = in condition surrounded with braces 282s 282s RuboCop::Cop::Style::RedundantBegin 282s reports an offense for def with redundant begin block 282s does not register an offense when using `begin` with `rescue` 282s registers and corrects an offense when using `begin` with single statement for or assignment 282s doesn't modify spacing when autocorrecting 282s does not register an offense when using `begin` with `until` 282s autocorrects when there are trailing comments 282s reports an offense when assigning nested blocks which contain `begin` blocks 282s does not register an offense when using body of `begin` is empty 282s registers an offense and corrects when using `begin` without `rescue` or `ensure` 282s reports an offense when multi-line `begin` block has single statement and it is inside condition 282s registers and corrects an offense when using `begin` with single statement that called a block for or assignment 282s reports an offense when multi-line `begin` block has single statement with modifier condition 282s reports an offense for defs with redundant begin block 282s does not register an offense when using `begin` for method argument 282s does not register an offense when using `begin` with multiple statement for or assignment 282s accepts a def with required begin block 282s reports an offense for single line def with redundant begin block 282s accepts when one-liner `begin` block has multiple statements with modifier condition 282s does not register an offense when using `begin` with `ensure` 282s does not register an offense when using `begin` for assignment 282s does not register an offense when using `begin` for semantic operator conditions 282s does not register an offense when using `begin` with `while` 282s does not register an offense when using `begin` for logical operator conditions 282s registers and corrects an offense when using multi-line `if` in `begin` block 282s does not register an offense when using `begin` with no statements for or assignment 282s accepts a def with a begin block after a statement 282s accepts when multi-line `begin` block has multiple statements with modifier condition 282s does not register an offense when using `begin` for or assignment and method call 282s reports an offense when assigning nested `begin` blocks 282s reports an offense when one-liner `begin` block has single statement with modifier condition 282s accepts a defs with required begin block 282s registers and corrects an offense when using modifier `if` single statement in `begin` block 282s Ruby 2.7 282s reports an offense when assigning nested blocks which contain `begin` blocks 282s when using endless method definition 282s accepts when `begin` block has no statements 282s accepts when `begin` block has multiple statements 282s registers when `begin` block has a single statement 282s < Ruby 2.5 282s accepts a do-end block with a begin-end 282s >= ruby 2.5 282s accepts a block with a begin block after a statement 282s accepts super with block 282s accepts a stabby lambda with a begin-end 282s registers an offense for a do-end block with redundant begin-end 282s accepts a {} block with a begin-end 282s 282s RuboCop::Cop::InternalAffairs::CopDescription 282s The description starts with `This cop ...` 282s registers an offense if using an auxiliary verb 282s registers an offense if the description like `This cop is ...` 282s registers an offense and corrects if using just a verb 282s The description starts with a word such as verb 282s does not register if the description starts with non-verb word 282s does not register if the description like `Checks` 282s There is no description comment 282s does not register offense 282s 282s RuboCop::Cop::Style::EachForSimpleLoop 282s does not register offense for character range 282s does not register offense if range startpoint is not constant 282s does not register offense if range endpoint is not constant 282s when using an exclusive end range 282s autocorrects the range not starting with zero 282s does not register offense for range not starting with zero and using param 282s autocorrects the source with multiline block 282s autocorrects the source with inline block 282s with multiline block with parameters 282s autocorrects an offense 282s when using an inclusive end range 282s autocorrects the source with multiline block 282s autocorrects the range not starting with zero 282s does not register offense for range not starting with zero and using param 282s autocorrects the source with inline block 282s with inline block with parameters 282s autocorrects an offense 282s 282s RuboCop::Cop::Metrics::MethodLength 282s properly counts lines when method ends with block 282s does not count blank lines 282s does not count commented lines by default 282s is not fooled by one-liner methods, syntax #2 282s accepts a method with multiline arguments and less than 5 lines of body 282s is not fooled by one-liner methods, syntax #1 282s accepts a method with less than 5 lines 282s accepts empty methods 282s when using numbered parameter 282s when method is defined with `define_method` 282s registers an offense 282s when method is an instance method 282s registers an offense 282s when CountComments is enabled 282s also counts commented lines 282s when method is defined with `define_method` 282s registers an offense 282s when methods to allow are defined 282s AllowedPatterns is enabled 282s accepts the user_name method 282s raises offense for firstname 282s AllowedMethods is enabled 282s still rejects other methods with more than 5 lines 282s accepts the foo method with more than 5 lines 282s when method is defined on a singleton class 282s registers an offense 282s when method is a class method 282s registers an offense 282s when `CountAsOne` is not empty 282s folds array into one line 282s 282s RuboCop::Cop::Style::InverseMethods 282s allows comparing camel case constants on the right 282s registers an offense for !(foo != bar) 282s registers an offense for !(foo < bar) 282s registers an offense for not (foo < bar) 282s allows an inverse method when double negation is used 282s registers an offense for not (foo !~ bar) 282s allows an inverse method in a block with next 282s registers an offense for !foo.present? 282s registers an offense for !foo.blank? 282s registers an offense for !foo.any? 282s registers an offense for !foo.exclude? 282s allows an inverse method with a block when double negation is used 282s registers an offense for !(foo =~ bar) 282s registers an offense for !foo.odd? 282s registers an offense for not (foo =~ bar) 282s registers an offense for not (foo != bar) 282s registers an offense for calling !.none? with a symbol proc 282s registers an offense for !(foo !~ bar) 282s registers an offense for !(foo == bar) 282s registers an offense for not (foo == bar) 282s registers an offense for !foo.none? 282s registers an offense for calling !.any? inside parens 282s allows a method call without a not 282s registers an offense for !(foo > bar) 282s allows comparing camel case constants on the left 282s registers an offense for !foo.include? 282s registers an offense for !foo.even? 282s registers an offense for comparing snake case constants on the left 282s registers an offense for not (foo > bar) 282s registers an offense for calling !.none? with a block 282s registers an offense for comparing snake case constants on the right 282s behaves like all variable types 282s registers an offense for calling !@@foo.none? 282s registers an offense for calling not @@foo.none? 282s behaves like all variable types 282s registers an offense for calling !foo.none? 282s registers an offense for calling not foo.none? 282s behaves like all variable types 282s registers an offense for calling not foo.bar.none? 282s registers an offense for calling !foo.bar.none? 282s behaves like all variable types 282s registers an offense for calling !foo["bar"].none? 282s registers an offense for calling not foo["bar"].none? 282s behaves like all variable types 282s registers an offense for calling not $foo.none? 282s registers an offense for calling !$foo.none? 282s behaves like all variable types 282s registers an offense for calling not @foo.none? 282s registers an offense for calling !@foo.none? 282s behaves like all variable types 282s registers an offense for calling !FOO.none? 282s registers an offense for calling not FOO.none? 282s Ruby 2.7 282s registers an offense for calling !.none? with a numblock 282s behaves like all variable types 282s registers an offense for calling !FOO::BAR.none? 282s registers an offense for calling not FOO::BAR.none? 282s inverse blocks 282s corrects an inverted do end method call 282s registers a single offense for nested inverse method calls 282s corrects an inverted method call when using `BasicObject#!` with spaces before the method call 282s registers a single offense for nested inverse method calls 282s registers an offense for foo.reject { |e| !e } 282s corrects an inverted method call 282s registers an offense for an inverted equality block 282s registers an offense for a multiline method call where the last method is inverted 282s registers an offense for a multiline method call where the last method is inverted 282s corrects an inverted method call 282s registers an offense for foo.reject! { |e| !e } 282s registers an offense for foo.select { |e| !e } 282s corrects a complex inverted method call 282s corrects a complex inverted method call 282s registers an offense for a multiline inverted equality block 282s registers an offense for a multiline inverted equality block 282s registers an offense for an inverted equality block 282s corrects an inverted method call when using `BasicObject#!` 282s corrects an inverted method call when using `BasicObject#!` 282s registers an offense for a multiline method call where the last method is inverted 282s corrects an inverted method call when using `BasicObject#!` with spaces before the method call 282s corrects an inverted method call when using `BasicObject#!` with spaces before the method call 282s corrects an inverted do end method call 282s registers an offense for foo.select! { |e| !e } 282s corrects an inverted method call when using `BasicObject#!` 282s registers an offense for a multiline inverted equality block 282s registers an offense for an inverted equality block 282s corrects a complex inverted method call 282s corrects an inverted method call when using `BasicObject#!` 282s corrects a complex inverted method call 282s registers an offense for an inverted equality block 282s corrects an inverted do end method call 282s corrects an inverted do end method call 282s corrects an inverted method call when using `BasicObject#!` with spaces before the method call 282s corrects an inverted method call 282s corrects an inverted method call 282s registers a single offense for nested inverse method calls 282s registers an offense for a multiline inverted equality block 282s registers a single offense for nested inverse method calls 282s registers an offense for a multiline method call where the last method is inverted 282s 282s RuboCop::Cop::Style::LambdaCall 282s when style is set to call 282s registers an offense for correct + multiple opposite styles 282s registers an offense for x.() 283s registers an offense for correct + opposite 283s when style is set to braces 283s autocorrects x.call asdf, x123 to x.(asdf, x123) 283s autocorrects x.call to x.() 283s registers an offense for x.call() 283s registers an offense for opposite + correct 283s accepts a call without receiver 283s registers an offense for correct + multiple opposite styles 283s 283s RuboCop::Cop::Style::BlockDelimiters 283s EnforcedStyle: braces_for_chaining 283s allows do/end inside Hash[] 283s accepts a multi-line functional block with {} if it is an ignored method 283s accepts a single line block with braces 283s registers an offense for a single line block with do-end 283s accepts a multi-line block with do-end 283s allows chaining to } inside of Hash[] 283s accepts a multi-line functional block with {} if it is an ignored method by regex 283s registers an offense for multi-line chained do-end blocks 283s autocorrects do-end with `ensure` to {} if it is a functional block 283s allows when :[] is chained 283s disallows {} with no chain inside of Hash[] 283s accepts a multi-line block that needs braces to be valid ruby 283s autocorrects do-end with `rescue` to {} if it is a functional block 283s Ruby >= 2.7 283s accepts a multi-line numblock with do-end 283s accepts a single line numblock with braces 283s registers an offense for a single line numblock with do-end 283s accepts a multi-line numblock that needs braces to be valid ruby 283s with safe navigation 283s registers an offense for multi-line chained do-end blocks 283s when there are braces around a multi-line block 283s allows when the block is being chained 283s registers an offense when combined with attribute assignment 283s registers an offense in the simple case 283s allows when the block is being chained with attribute assignment 283s BracesRequiredMethods 283s BracesRequiredMethods methods 283s allows braces 283s registers an offense with do 283s other methods 283s autocorrects { and } to do and end 283s allows braces 283s EnforcedStyle: always_braces 283s accepts a multi-line block that needs braces to be valid ruby 283s autocorrects do-end with `ensure` to {} if it is a functional block 283s registers an offense for multi-lined do-end blocks when combined with attribute assignment 283s accepts a single line block with braces 283s does not autocorrect do-end if {} would change the meaning 283s accepts a multi-line functional block with do-end if it is an ignored method by regex 283s registers an offense for multi-line chained do-end blocks 283s registers an offense for a multi-line block with do-end 283s accepts a multi-line functional block with do-end if it is an ignored method 283s registers an offense for a single line block with do-end 283s autocorrects do-end with `rescue` to {} if it is a functional block 283s when there are braces around a multi-line block 283s allows when combined with attribute assignment 283s allows in the simple case 283s allows when the block is being chained 283s EnforcedStyle: line_count_based 283s accepts a multi-line block that needs braces to be valid ruby 283s registers an offense for a single line block with do-end 283s accepts a single line block with braces 283s does not autocorrect do-end if {} would change the meaning 283s does not autocorrect {} if do-end would change the meaning 283s autocorrects do-end for single line blocks to { and } 283s accepts a multi-line block with do-end 283s Ruby >= 2.7 283s accepts a single line numblock with braces 283s accepts a multi-line numblock that needs braces to be valid ruby 283s accepts a multi-line numblock with do-end 283s registers an offense for a single line numblock with do-end 283s when there are braces around a multi-line block 283s registers an offense in the simple case 283s registers an offense when there is a comment after the closing brace and block body is not empty 283s does not autocorrect {} if do-end would introduce a syntax error 283s registers an offense when there is a comment after the closing brace and block body is empty 283s registers an offense when there is a comment after the closing brace and using method chain 283s autocorrects adjacent curly braces correctly 283s can handle special method names such as []= and done? 283s accepts a multi-line functional block with {} if it is an ignored method by regex 283s accepts braces if do-end would change the meaning 283s registers an offense when combined with attribute assignment 283s autocorrects { and } to do and end 283s registers an offense for braces if do-end would not change the meaning 283s accepts a multi-line functional block with {} if it is an ignored method 283s registers an offense and keep chained block when there is a comment after the closing brace and block body is not empty 283s with a single line do-end block with an inline `rescue` 283s autocorrects properly 283s EnforcedStyle: semantic 283s autocorrects do-end with `ensure` to {} if it is a functional block 283s accepts a single line block with {} followed by a safe navigation method call 283s accepts a multi-line functional block with do-end if it is a known procedural method 283s autocorrects do-end to {} if it is a functional block and does not change the meaning 283s registers an offense for a multi-line block with do-end if the return value is assigned 283s registers an offense for a multi-line block with do-end if the return value is passed to a method 283s accepts a multi-line functional block with do-end if it is an ignored method 283s accepts a single line block with {} if used in an erange 283s accepts a single line block with {} if used in an irange 283s accepts a multi-line block with braces when passed to a known functional method 283s accepts a multi-line block with braces when passed to a method 283s accepts a multi-line block with braces if the return value is assigned 283s registers an offense for a multi-line block with do-end if the return value is attribute-assigned 283s allows {} if it is a known procedural method 283s autocorrects do-end to {} with appropriate spacing 283s accepts a single line block with {} if used in a logical and 283s accepts a multi-line functional block with do-end if it is an ignored method by regex 283s accepts a single line block with {} if used in an array 283s accepts a multi-line block with braces when chained 283s autocorrects do-end to {} if it is a functional block 283s registers an offense for a multi-line block with braces if the return value is not used 283s accepts a multi-line block with braces if it is the return value of its scope 283s allows {} if it is a known functional method 283s accepts a single line block with {} if used in an if statement 283s accepts a single line block with {} if used in a logical or 283s accepts a multi-line block with do-end if it is the return value of its scope 283s autocorrects do-end with `rescue` to {} if it is a functional block 283s with a procedural one-line block 283s with AllowBracesOnProceduralOneLiners true 283s accepts a single line procedural do-end block 283s accepts a single line procedural block with braces 283s with AllowBracesOnProceduralOneLiners false or unset 283s accepts a single line block with do-end if it is procedural 283s registers an offense for a single line procedural block 283s with a procedural multi-line block 283s autocorrects { and } to do and end with appropriate spacing 283s autocorrects { and } to do and end 283s 283s RuboCop::Cop::Layout::EmptyLineBetweenDefs 283s autocorrects when there are too many new lines 283s accepts a def that follows a line with code 283s treats lines with whitespaces as blank 283s accepts the first def without leading empty line in a class 283s registers an offense for adjacent one-liners by default 283s accepts a nested def 283s doesn't allow more than the required number of newlines 283s registers an offense for multiple one-liners on the same line 283s accepts a def that follows an empty line and then a comment 283s accepts a def that is the first of a module 283s finds offenses in inner classes 283s accepts a def that follows code and a comment 283s endless methods 283s between regular and endless methods 283s registers an offense and corrects 283s with AllowAdjacentOneLineDefs: false 283s registers an offense and corrects 283s between endless and regular methods 283s registers an offense and corrects 283s between endless class method and regular class methods 283s registers an offense and corrects 283s with AllowAdjacentOneLineDefs: true 283s does not register an offense 283s between endless class method and regular methods 283s registers an offense and corrects 283s class methods 283s adjacent class methods 283s registers an offense for missing blank line between methods 283s mixed instance and class methods 283s registers an offense for missing blank line between methods 283s when a maximum of empty lines is specified 283s finds no offense for no empty line 283s finds an offense for two empty lines 283s finds no offense for one empty line 283s when there are only comments between defs 283s registers an offense 283s when multiple lines between defs are allowed 283s treats lines with whitespaces as blank 283s registers an offense and corrects when there are too many new lines 283s when AllowAdjacentOneLineDefs is enabled 283s accepts adjacent one-liners 283s registers an offense for adjacent defs if some are multi-line 283s conditional method definitions 283s accepts defs inside a conditional without blank lines in between 283s registers an offense for consecutive defs inside a conditional 283s when empty lines between classes and modules together 283s registers offense when no empty lines between module and method definitions 283s EmptyLineBetweenClassDefs 283s registers offense when no empty lines between class and method definitions 283s when disabled 283s does not register offense 283s with AllowAdjacentOneLineDefs enabled 283s does not register offense 283s EmptyLineBetweenModuleDefs 283s registers offense when no empty lines between module and method definitions 283s when disabled 283s does not register offense 283s 283s RuboCop::Cop::InternalAffairs::RedundantMethodDispatchNode 283s does not register an offense when using `send_node.method_name` 283s registers an offense when using `node.send_node.method_name` 283s does not register an offense when using `node.method_name` 283s does not register an offense when using `node.send_node.arguments?` 283s registers an offense when using `node.send_node.receiver` 283s does not register an offense when using `node.receiver` 283s 283s RuboCop::Cop::Lint::SafeNavigationConsistency 283s registers an offense and corrects using unsafe navigation with both && and || 283s allows safe navigation when different variables are used 283s allows calls to methods that nil responds to 283s registers an offense and corrects using unsafe navigation with grouped conditions 283s registers an offense and corrects using safe navigation on the left of && 283s registers an offense and corrects when there is code before or after the condition 283s registers an offense and corrects unsafe navigation that appears before safe navigation 283s registers a single offense and corrects when safe navigation is used multiple times 283s allows || without safe navigation 283s registers an offense and corrects using unsafe navigation and the safe navigation appears in a group 283s registers an offense but does not correct non dot method calls 283s registers an offense and corrects using safe navigation on the right of && 283s registers and corrects multiple offenses 283s registers an offense and corrects assignment 283s registers an offense and corrects using safe navigation on the right of || 283s registers an offense and corrects using safe navigation in conditions on the right hand side 283s registers an offense and corrects using safe navigation inside of separated conditions 283s allows && without safe navigation 283s registers an offense and corrects using safe navigation on the left of || 283s 283s RuboCop::Cop::Style::FrozenStringLiteralComment 283s target_ruby_version < 2.3 283s accepts freezing a string with interpolation 283s accepts freezing a string 283s accepts calling << on a string 283s accepts calling << on a string with interpolation 283s always_true 283s registers an offense for not having a frozen string literal comment under an encoding comment and extra space 283s accepts a frozen string literal comment below shebang, an encoding comment, and extra space 283s registers an offense for arbitrary tokens below shebang and encoding comments 283s registers an offense for a disabled frozen string literal comment below shebang and encoding comments 283s registers an offense for arbitrary tokens below an encoding comment 283s accepts an emacs style combined magic comment 283s accepts a frozen string literal comment after other comments 283s registers an offense for a disabled frozen string literal above an empty line 283s accepts a frozen string literal below a shebang comment 283s accepts a frozen string literal below an encoding comment 283s accepts a frozen string literal comment under shebang with no other code 283s accepts a source with no tokens 283s registers an offense for a disabled frozen string literal comment after other comments 283s registers an offense for arbitrary tokens 283s registers an offense for arbitrary tokens below shebang, an encoding comment, and extra space 283s registers an offense for arbitrary tokens under shebang with no other code 283s registers an offense for a disabled frozen string literal 283s registers an offense for a disabled frozen string literal comment below shebang above an encoding comments 283s accepts an empty source 283s registers an offense for a disabled frozen string literal below an encoding comment 283s registers an offense for not having a frozen string literal comment under shebang with no other code 283s registers an offense for not having a frozen string literal comment on the top line 283s registers an offense for a disabled frozen string literal below a shebang comment 283s accepts a frozen string literal comment below shebang above an encoding comments 283s accepts a frozen string literal on the top line 283s registers an offense for an extra first empty line 283s registers an offense for arbitrary tokens below a shebang comment 283s registers an offense for not having a frozen string literal comment under a shebang and an encoding comment 283s registers an offense for a disabled frozen string literal comment below an encoding comment and extra space 283s registers an offense for a disabled frozen string literal comment below shebang, an encoding comment, and extra space 283s registers an offense for arbitrary tokens below an encoding comment and extra space 283s registers an offense for not having a frozen string literal comment under an encoding comment 283s registers an offense for arbitrary tokens above an empty line 283s accepts a frozen string literal comment below an encoding comment and extra space 283s registers an offense for a disabled frozen string literal comment under shebang with no other code 283s registers an offense for arbitrary tokens below shebang above an encoding comments 283s registers an offense for a disabled frozen string literal on the top line 283s registers an offense for not having a frozen string literal comment under a shebang, an encoding comment, and extra space 283s accepts a frozen string literal comment below shebang and encoding comments 283s registers an offense for having a frozen string literal comment under ruby code 283s always 283s accepts a disabled frozen string literal comment below shebang and encoding comments 283s accepts a frozen string literal comment after other comments 283s accepts a disabled frozen string literal below a shebang comment 283s accepts an empty source 283s accepts a frozen string literal comment below newline-separated magic comments 283s accepts an emacs style combined magic comment 283s registers an offense for not having a frozen string literal comment on the top line 283s accepts a frozen string literal comment below shebang and encoding comments 283s registers an offense for not having a frozen string literal comment under an encoding comment 283s accepts a disabled frozen string literal below an encoding comment 283s registers an offense for not having a frozen string literal comment under a shebang and an encoding comment 283s accepts a frozen string literal below a shebang comment 283s registers an offense for having a frozen string literal comment under ruby code 283s accepts a source with no tokens 283s accepts a disabled frozen string literal on the top line 283s accepts a frozen string literal on the top line 283s registers an offense for not having a frozen string literal comment under an encoding comment separated by a newline 283s accepts a frozen string literal below an encoding comment 283s registers an offense for not having a frozen string literal comment when there is only a shebang 283s registers an offense for an extra first empty line 283s registers an offense for arbitrary tokens 283s accepts a frozen string literal comment below shebang above an encoding comments 283s registers an offense with an empty line between magic comments and the code 283s registers an offense for not having a frozen string literal comment under a shebang 283s accepts a disabled frozen string literal comment below shebang above an encoding comments 283s never 283s registers an offense for having a frozen string literal comment after other comments 283s registers an offense for a frozen string literal comment below an encoding comment 283s registers an offense for a frozen string literal comment below a shebang comment 283s accepts a frozen string literal comment under ruby code 283s registers an offense for a disabled frozen string literal comment below shebang and encoding comments 283s accepts not having a frozen string literal comment on the top line 283s allows not having a frozen string literal comment under an encoding comment 283s accepts an empty source 283s registers an offense for a disabled frozen string literal comment on the top line 283s allows not having a frozen string literal comment under a shebang and an encoding comment 283s accepts not having not having a frozen string literal comment under a shebang 283s registers an offense for a disabled frozen string literal below a shebang comment 283s registers an offense for a frozen string literal comment on the top line 283s registers an offense for a disabled frozen string literal comment below shebang above an encoding comments 283s registers an offense for a disabled frozen string literal below an encoding comment 283s registers an offense for a frozen string literal comment below shebang above an encoding comments 283s registers an offense for a frozen string literal comment below shebang and encoding comments 283s accepts a source with no tokens 283s 283s RuboCop::Formatter::FuubarStyleFormatter 283s #progressbar_color 283s initially 283s is green 283s when a convention offense is detected in a file 283s is yellow 283s when convention and error offenses are detected in a file 283s is red 283s when no offenses are detected in a file 283s is still green 283s when an error offense is detected in a file 283s is red 283s and then a convention offense is detected in the next file 283s is still red 283s when a offense is detected in a file and autocorrected 283s is green 283s #with_color 283s when color is disabled 283s outputs nothing 283s when color is enabled 283s outputs coloring sequence code at the beginning and the end 283s 283s RuboCop::Cop::Lint::ToJSON 283s registers an offense and corrects using `#to_json` without arguments 283s does not register an offense when using `#to_json` with arguments 283s 283s RuboCop::Cop::Style::FileRead 283s registers an offense for and corrects the `File.open` with symbolic read proc (implicit text mode) 283s registers an offense for and corrects the `File.open` with multiline read block (mode 'r+b') 283s registers an offense for and corrects the `File.open` with inline read block (mode 'r+') 283s registers an offense for and corrects the `File.open` with inline read block (mode 'rt') 283s registers an offense for and corrects the `File.open` with symbolic read proc (mode 'r+b') 283s registers an offense for and corrects `File.open(filename, 'rt').read` 283s registers an offense for and corrects the `File.open` with inline read block (implicit text mode) 283s registers an offense for and corrects `File.open(filename, 'r').read` 283s registers an offense for and corrects the `File.open` with symbolic read proc (mode 'r') 283s registers an offense for and corrects the `File.open` with multiline read block (implicit text mode) 283s registers an offense for and corrects the `File.open` with multiline read block (mode 'r') 283s registers an offense for and corrects `File.open(filename, 'r+b').read` 283s registers an offense for and corrects the `File.open` with inline read block (mode 'r+b') 283s registers an offense for and corrects the `File.open` with multiline read block (mode 'r+t') 283s registers an offense for and corrects `::File.open(filename).read` 283s registers an offense for and corrects `File.open(filename, 'r+').read` 283s registers an offense for and corrects `File.open(filename).read` 283s registers an offense for and corrects the `File.open` with inline read block (mode 'r') 283s registers an offense for and corrects the `File.open` with symbolic read proc (mode 'r+t') 283s registers an offense for and corrects the `File.open` with inline read block (mode 'r+t') 283s does not register an offense when not reading from the block variable 283s registers an offense for and corrects `File.open(filename, 'r+t').read` 283s registers an offense for and corrects the `File.open` with multiline read block (mode 'rb') 283s registers an offense for and corrects the `File.open` with symbolic read proc (mode 'r+') 283s registers an offense for and corrects the `File.open` with multiline read block (mode 'r+') 283s registers an offense for and corrects the `File.open` with symbolic read proc (mode 'rb') 283s registers an offense for and corrects `File.open(filename, 'rb').read` 283s registers an offense for and corrects the `File.open` with multiline read block (mode 'rt') 283s registers an offense for and corrects the `File.open` with inline read block (mode 'rb') 283s registers an offense for and corrects the `File.open` with symbolic read proc (mode 'rt') 283s 283s RuboCop::Cop::Style::MethodDefParentheses 283s require_no_parentheses_except_multiline 283s behaves like endless methods 283s endless methods 283s accepts parens with `forward-arg` 284s accepts parens for method calls inside an endless method 284s accepts parens without args 284s accepts parens with args 284s when args are all on a single line 284s behaves like no parentheses 284s reports an offense for class def with parameters with parens 284s auto-removes the parens for defs 284s reports an offense for opposite + correct 284s accepts a def with parameters but no parens 284s reports an offense for def with parameters with parens 284s requires parens for forwarding 284s accepts a class def with parameters with parens 284s requires parens for anonymous block forwarding 284s accepts def with no args and no parens 284s reports an offense for def with no args and parens 284s when args span multiple lines 284s auto-adds required parens to argument lists on multiple lines 284s reports an offense for correct + opposite 284s require_no_parentheses 284s behaves like no parentheses 284s requires parens for forwarding 284s requires parens for anonymous block forwarding 284s accepts a def with parameters but no parens 284s accepts def with no args and no parens 284s reports an offense for def with no args and parens 284s reports an offense for opposite + correct 284s accepts a class def with parameters with parens 284s auto-removes the parens for defs 284s reports an offense for class def with parameters with parens 284s reports an offense for def with parameters with parens 284s behaves like endless methods 284s endless methods 284s accepts parens with args 284s accepts parens without args 284s accepts parens for method calls inside an endless method 284s accepts parens with `forward-arg` 284s require_parentheses 284s accepts def with no args and no parens 284s reports an offense for correct + opposite 284s auto-adds required parens to argument lists on multiple lines 284s auto-adds required parens for a defs after a passing method 284s auto-adds required parens for a defs 284s reports an offense for class def with parameters but no parens 284s reports an offense for def with parameters but no parens 284s behaves like endless methods 284s endless methods 284s accepts parens for method calls inside an endless method 284s accepts parens with args 284s accepts parens without args 284s accepts parens with `forward-arg` 284s 284s RuboCop::Cop::Layout::SpaceInsideRangeLiteral 284s registers an offense in multiline range literal with space in it 284s accepts no space inside .. literal 284s accepts complex range literal with space in it 284s registers an offense for space inside .. literal 284s accepts no space inside ... literal 284s accepts multiline range literal with no space in it 284s registers an offense for space inside ... literal 284s 284s RuboCop::Cop::AnnotationComment 284s #annotation? 284s when given a keyword followed by a space 284s is expected to equal true 284s when the keyword is not capitalized properly 284s is expected to equal true 284s when the keyword is multiple words 284s is expected to equal true 284s when annotated with a non keyword 284s is expected to be falsey 284s when it includes a keyword 284s is expected to be falsey 284s when given a keyword followed by a colon 284s is expected to equal true 284s when given as the first word of a sentence 284s is expected to be falsey 284s #correct? 284s when a colon is required 284s behaves like correct 284s is expected to be truthy 284s behaves like incorrect 284s is expected to be falsey 284s behaves like incorrect 284s is expected to be falsey 284s behaves like incorrect 284s is expected to be falsey 284s behaves like incorrect 284s is expected to be falsey 284s behaves like incorrect 284s is expected to be falsey 284s behaves like incorrect 284s is expected to be falsey 284s behaves like incorrect 284s is expected to be falsey 284s behaves like correct 284s is expected to be truthy 284s behaves like incorrect 284s is expected to be falsey 284s behaves like incorrect 284s is expected to be falsey 284s behaves like incorrect 284s is expected to be falsey 284s behaves like incorrect 284s is expected to be falsey 284s behaves like correct 284s is expected to be truthy 284s when there is duplication in the keywords 284s when the longer keyword is given first 284s behaves like correct 284s is expected to be truthy 284s behaves like correct 284s is expected to be truthy 284s behaves like incorrect 284s is expected to be falsey 284s behaves like incorrect 284s is expected to be falsey 284s when the shorter keyword is given first 284s behaves like correct 284s is expected to be truthy 284s behaves like incorrect 284s is expected to be falsey 284s behaves like correct 284s is expected to be truthy 284s behaves like incorrect 284s is expected to be falsey 284s when no colon is required 284s behaves like correct 284s is expected to be truthy 284s behaves like incorrect 284s is expected to be falsey 284s behaves like incorrect 284s is expected to be falsey 284s behaves like incorrect 284s is expected to be falsey 284s behaves like incorrect 284s is expected to be falsey 284s behaves like incorrect 284s is expected to be falsey 284s behaves like incorrect 284s is expected to be falsey 284s behaves like incorrect 284s is expected to be falsey 284s behaves like incorrect 284s is expected to be falsey 284s behaves like incorrect 284s is expected to be falsey 284s behaves like correct 284s is expected to be truthy 284s behaves like correct 284s is expected to be truthy 284s behaves like incorrect 284s is expected to be falsey 284s behaves like incorrect 284s is expected to be falsey 284s 284s RuboCop::Cop::Style::NegatedIfElseCondition 284s registers an offense and corrects when negating condition with `not` for ternary 284s does not register an offense when negating condition for `if-elsif` 284s works with comments when one branch is a begin and the other is not 284s does not register an offense when only part of the condition is negated 284s moves comments to correct branches during autocorrect 284s does not register an offense when both branches are empty 284s works with duplicate nodes 284s does not register an offense when `if` with negated condition has no `else` branch 284s does not register an offense when `if` with `!!` condition 284s registers an offense when using negated condition and `if` branch body is empty 284s does not register an offense when the `else` branch is empty 284s works with comments and multiple statements 284s registers an offense and corrects a multiline ternary 284s correctly moves comments at the end of branches 284s works with comments when neither branch is a begin node 284s registers an offense and corrects when negating condition with `!` for `if-else` 284s registers an offense and corrects when negating condition with `not` for `if-else` 284s registers an offense and corrects nested `if-else` with negated condition 284s behaves like negation method 284s registers an offense and corrects when negating condition with `!=` in parentheses for `if-else` 284s registers an offense and corrects when negating condition with `!=` for `if-else` 284s registers an offense and corrects when negating condition with `!=` in begin-end for ternary 284s registers an offense and corrects when negating condition with `!=` in parentheses for ternary 284s registers an offense and corrects when negating condition with `!=` in begin-end for `if-else` 284s registers an offense and corrects when negating condition with `!=` for ternary 284s behaves like negation method 284s registers an offense and corrects when negating condition with `!~` in parentheses for ternary 284s registers an offense and corrects when negating condition with `!~` in begin-end for ternary 284s registers an offense and corrects when negating condition with `!~` in parentheses for `if-else` 284s registers an offense and corrects when negating condition with `!~` for ternary 284s registers an offense and corrects when negating condition with `!~` for `if-else` 284s registers an offense and corrects when negating condition with `!~` in begin-end for `if-else` 284s 284s RuboCop::Cop::Naming::FileName 284s with camelCase file names ending in .rb 284s registers an offense 284s with snake_case file names with multiple extensions 284s does not register an offense 284s with snake_case names which use ? and ! 284s does not register an offense 284s with dotfiles 284s does not register an offense 284s with include acronym name 284s does not register an offense 284s with non-ascii characters in filename 284s does not register an offense 284s when the file is specified in AllCops/Include 284s with a non-snake_case file name 284s does not register an offense 284s with acronym class name 284s does not register an offense 284s with snake_case file names with non-rb extension 284s does not register an offense 284s with snake_case names which use + 284s does not register an offense 284s when CheckDefinitionPathHierarchy is false 284s with a non-matching module containing a matching struct 284s does not register an offense 284s in a non-matching directory, but with a matching class 284s does not register an offense 284s with a matching module containing a non-matching struct 284s does not register an offense 284s on a file with a non-matching struct 284s registers an offense 284s with a non-matching module containing a matching class 284s does not register an offense 284s on a file with a matching class 284s does not register an offense 284s on an empty file 284s registers an offense 284s with a matching module containing a non-matching class 284s does not register an offense 284s on a file with a non-matching class 284s registers an offense 284s on a file with a matching struct 284s does not register an offense 284s when ExpectMatchingDefinition is true 284s on a file which defines multiple classes 284s in a directory elsewhere which only matches the module name 284s does not register an offense 284s in a non-matching directory under lib 284s registers an offense 284s in a non-matching directory under test 284s registers an offense 284s in a directory with multiple instances of src 284s does not register an offense 284s in a matching directory under src 284s does not register an offense 284s in a matching directory under lib 284s does not register an offense 284s in a directory with multiple instances of test 284s does not register an offense 284s in a directory with multiple instances of lib 284s does not register an offense 284s in a directory elsewhere which does not match the module name 284s registers an offense 284s in a non-matching directory under src 284s registers an offense 284s in a directory with multiple instances of spec 284s does not register an offense 284s in a matching directory under spec 284s does not register an offense 284s in a matching directory under test 284s does not register an offense 284s in a non-matching directory under spec 284s registers an offense 284s on a file which defines a nested module 284s in a matching directory under src 284s does not register an offense 284s in a directory elsewhere which only matches the module name 284s does not register an offense 284s in a non-matching directory under lib 284s registers an offense 284s in a directory elsewhere which does not match the module name 284s registers an offense 284s in a directory with multiple instances of lib 284s does not register an offense 284s in a matching directory under lib 284s does not register an offense 284s in a matching directory under spec 284s does not register an offense 284s in a directory with multiple instances of src 284s does not register an offense 284s in a non-matching directory under src 284s registers an offense 284s in a non-matching directory under spec 284s registers an offense 284s in a matching directory under test 284s does not register an offense 284s in a non-matching directory under test 284s registers an offense 284s in a directory with multiple instances of spec 284s does not register an offense 284s in a directory with multiple instances of test 284s does not register an offense 284s on a file which defines a Struct with a block 284s in a matching directory under src 284s does not register an offense 284s in a directory elsewhere which only matches the module name 284s does not register an offense 284s in a directory with multiple instances of spec 284s does not register an offense 284s in a non-matching directory under test 284s registers an offense 284s in a directory with multiple instances of test 284s does not register an offense 284s in a non-matching directory under lib 284s registers an offense 284s in a directory elsewhere which does not match the module name 284s registers an offense 284s in a matching directory under lib 284s does not register an offense 284s in a directory with multiple instances of src 284s does not register an offense 284s in a directory with multiple instances of lib 284s does not register an offense 284s in a non-matching directory under src 284s registers an offense 284s in a non-matching directory under spec 284s registers an offense 284s in a matching directory under spec 284s does not register an offense 284s in a matching directory under test 284s does not register an offense 284s on a file which defines a Struct without a block 284s in a directory with multiple instances of spec 284s does not register an offense 284s in a directory elsewhere which only matches the module name 284s does not register an offense 284s in a matching directory under test 284s does not register an offense 284s in a directory with multiple instances of lib 284s does not register an offense 284s in a non-matching directory under test 284s registers an offense 284s in a directory with multiple instances of test 284s does not register an offense 284s in a non-matching directory under spec 284s registers an offense 284s in a non-matching directory under src 284s registers an offense 284s in a directory with multiple instances of src 284s does not register an offense 284s in a directory elsewhere which does not match the module name 284s registers an offense 284s in a matching directory under lib 284s does not register an offense 284s in a non-matching directory under lib 284s registers an offense 284s in a matching directory under spec 284s does not register an offense 284s in a matching directory under src 284s does not register an offense 284s on an empty file with a space in its filename 284s registers an offense 284s on a file which defines a nested class 284s in a matching directory under spec 284s does not register an offense 284s in a directory elsewhere which does not match the module name 284s registers an offense 284s in a matching directory under src 284s does not register an offense 284s in a matching directory under test 284s does not register an offense 284s in a non-matching directory under src 284s registers an offense 284s in a directory with multiple instances of test 284s does not register an offense 284s in a directory with multiple instances of lib 284s does not register an offense 284s in a non-matching directory under spec 284s registers an offense 284s in a directory elsewhere which only matches the module name 284s does not register an offense 284s in a directory with multiple instances of src 284s does not register an offense 284s in a non-matching directory under test 284s registers an offense 284s in a matching directory under lib 284s does not register an offense 284s in a non-matching directory under lib 284s registers an offense 284s in a directory with multiple instances of spec 284s does not register an offense 284s on an empty file 284s registers an offense 284s on a file which defines no class or module at all 284s under some other random directory 284s registers an offense 284s under spec 284s registers an offense 284s under lib 284s registers an offense 284s under test 284s registers an offense 284s under lib when not added to root 284s registers an offense 284s under src 284s registers an offense 284s on a file which uses Name::Spaced::Module syntax 284s in a matching directory under lib 284s does not register an offense 284s in a matching directory under test 284s does not register an offense 284s in a directory with multiple instances of lib 284s does not register an offense 284s in a non-matching directory under spec 284s registers an offense 284s in a non-matching directory under src 284s registers an offense 284s in a matching directory under spec 284s does not register an offense 284s in a directory elsewhere which only matches the module name 284s does not register an offense 284s in a directory elsewhere which does not match the module name 284s registers an offense 284s in a non-matching directory under lib 284s registers an offense 284s in a directory with multiple instances of spec 284s does not register an offense 284s in a non-matching directory under test 284s registers an offense 284s in a directory with multiple instances of test 284s does not register an offense 284s in a directory with multiple instances of src 284s does not register an offense 284s in a matching directory under src 284s does not register an offense 284s when Regex is set 284s with a matching name 284s does not register an offense 284s with a non-matching name 284s registers an offense 284s with snake_case file names without file extension 284s does not register an offense 284s with snake_case file names ending in .rb 284s does not register an offense 284s with camelCase file names without file extension 284s registers an offense 284s with non-snake-case file names with a shebang 284s does not register an offense 284s when IgnoreExecutableScripts is disabled 284s registers an offense 284s with acronym namespace 284s does not register an offense 284s 284s RuboCop::Cop::Lint::LambdaWithoutLiteralBlock 284s registers and corrects an offense when using lambda with `&proc {}` block argument 284s registers and corrects an offense when using lambda with a proc variable block argument 284s does not register an offense when using lambda with a literal block 284s registers and corrects an offense when using lambda with `&Proc.new {}` block argument 284s does not register an offense when using lambda with a symbol proc 284s does not register an offense when using `lambda.call` 284s 284s RuboCop::Cop::Naming::ConstantName 284s registers an offense for snake case in const name 284s does not check names if rhs is a method call with block 284s does not check names if rhs is a `Class.new` with conditional assign 284s allows screaming snake case in const name 284s does not check names if rhs is a method call 284s does not check if rhs is a non-offensive const assignment 284s allows screaming snake case in multiple const assignment 284s registers offenses for camel case in multiple const assignment 284s does not check if rhs is another constant 284s does not check names if rhs is a `Struct.new` 284s registers an offense for non-POSIX upper case in const name 284s registers an offense for camel case in const namewhen using frozen object assignment 284s registers an offense for camel case in const namewhen using frozen range assignment 284s does not check names if rhs is a method call with conditional assign 284s checks qualified const names 284s does not check names if rhs is a `Struct.new` with conditional assign 284s registers 1 offense if rhs is offending const assignment 284s does not check names if rhs is a `Class.new` 284s registers an offense for camel case in const name 284s allows screaming snake case with POSIX upper case characters 284s when a rhs is a conditional expression 284s when conditional branches contain only string values 284s registers an offense 284s when conditional branches contain a value other than a constant 284s does not check names 284s when conditional branches contain only constants 284s does not check names 284s 284s RuboCop::Cop::Naming::AsciiIdentifiers 284s when AsciiConstants is false 284s accepts constants with only ascii chars 284s does not get confused by a byte order mark 284s registers an offense for a variable name with mixed chars 284s registers an offense for a variable name with non-ascii chars 284s accepts identifiers with only ascii chars 284s does not get confused by an empty file 284s when AsciiConstants is true 284s does not get confused by a byte order mark 284s registers an offense for a variable name with non-ascii chars 284s registers an offense for a constant name with non-ascii chars 284s accepts identifiers with only ascii chars 284s does not get confused by an empty file 284s registers an offense for a variable name with mixed chars 284s 284s RuboCop::Cop::InternalAffairs::UselessMessageAssertion 284s does not register an offense for an assertion about the message 284s registers an offense for specs that assert using the MSG 284s registers an offense for specs that expect offense using the MSG 284s registers an offense for described_class::MSG in let 284s 284s RuboCop::Cop::Style::FormatString 284s when enforced style is percent 284s registers an offense for sprintf 284s registers an offense and corrects when using springf with second argument that uses an operator 284s accepts format without arguments 284s registers an offense for sprintf with 3 arguments 284s registers an offense for format with 3 arguments 284s accepts String#% 284s accepts sprintf without arguments 284s registers an offense for format with a hash argument 284s registers an offense for sprintf with a hash argument 284s accepts sprintf with 1 argument 284s registers an offense for format 284s accepts format with 1 argument 284s when enforced style is sprintf 284s registers an offense for a string followed by something 284s registers an offense for format 284s registers an offense for format with 2 arguments 284s registers an offense for variable argument and assignment but does not autocorrect 284s does not register an offense for ambiguous cases 284s does not register an offense for numbers 284s registers an offense for String#% with a hash argument 284s works if the first operand contains embedded expressions 284s registers an offense for variable argument but does not autocorrect 284s registers an offense for something followed by an array 284s when enforced style is format 284s registers an offense for variable argument but does not autocorrect 284s registers an offense for sprintf with 2 arguments 284s does not autocorrect String#% with variable argument and assignment 284s does not register an offense for ambiguous cases 284s works if the first operand contains embedded expressions 284s registers an offense for a string followed by something 284s registers an offense for something followed by a hash 284s does not register an offense for numbers 284s registers an offense for something followed by an array 284s registers an offense for sprintf 284s 284s RuboCop::Cop::Lint::UnifiedInteger 284s target ruby version < 2.4 284s when Bignum 284s when explicitly specified as toplevel constant 284s registers an offense 284s without any decorations 284s registers an offense and autocorrects 284s with MyNamespace 284s does not register an offense 284s when Integer 284s without any decorations 284s does not register an offense 284s when explicitly specified as toplevel constant 284s does not register an offense 284s with MyNamespace 284s does not register an offense 284s target ruby version >= 2.4 284s when Bignum 284s when explicitly specified as toplevel constant 284s registers an offense 284s without any decorations 284s registers an offense 284s with MyNamespace 284s does not register an offense 284s target ruby version >= 2.4 284s when Fixnum 284s without any decorations 284s registers an offense 284s when explicitly specified as toplevel constant 284s registers an offense 284s with MyNamespace 284s does not register an offense 284s target ruby version < 2.4 284s when Fixnum 284s with MyNamespace 284s does not register an offense 284s when explicitly specified as toplevel constant 284s registers an offense 284s without any decorations 284s registers an offense and autocorrects 284s 284s RuboCop::Cop::Lint::BigDecimalNew 284s does not register an offense when using `BigDecimal()` 284s registers an offense and corrects using `::BigDecimal.new()` 284s registers an offense and corrects using `BigDecimal.new()` 284s 284s RuboCop::Cop::Metrics::ClassLength 284s accepts a class with less than 5 lines 284s does not count blank lines 284s reports the correct beginning and end lines 284s accepts empty classes 284s accepts a class with 5 lines 284s rejects a class with more than 5 lines 284s when CountComments is enabled 284s also counts commented lines 284s registers an offense for a class that only contains comments 284s when `CountAsOne` is not empty 284s folds array into one line 284s when overlapping constant assignments 284s does not register an offense 284s when inspecting a class defined with Class.new 284s registers an offense 284s when CountComments is disabled 284s accepts classes that only contain comments 284s when inspecting a class defined with ::Class.new 284s registers an offense 284s when inspecting a class defined with Struct.new 284s registers an offense when inspecting or equals (`||=`) for constant 284s registers an offense 284s registers an offense when multiple assignments to constants 284s when using numbered parameter 284s when inspecting a class defined with Struct.new 284s registers an offense when multiple assignments to constants 284s registers an offense when inspecting or equals (`||=`) for constant 284s registers an offense 284s when inspecting a class defined with ::Class.new 284s registers an offense 284s when inspecting a class defined with Class.new 285s registers an offense 285s when a class has inner classes 285s rejects a class with 6 lines that belong to the class directly 285s does not count lines of inner classes 285s 285s RuboCop::Cop::Layout::SpaceInsideArrayPercentLiteral 285s accepts non array percent literals 285s for i type and ["!", "!"] delimiters 285s accepts multi-line literals 285s accepts literals with escaped spaces 285s registers an offense for multiple spaces between items 285s registers an offense for unnecessary spaces 285s accepts multi-line literals within a method 285s accepts literals without additional spaces 285s accepts literals with escaped and additional spaces 285s accepts newlines and additional following alignment spaces 285s for W type and ["{", "}"] delimiters 285s accepts literals with escaped spaces 285s accepts literals without additional spaces 285s accepts newlines and additional following alignment spaces 285s registers an offense for multiple spaces between items 285s accepts multi-line literals within a method 285s accepts literals with escaped and additional spaces 285s registers an offense for unnecessary spaces 285s accepts multi-line literals 285s for i type and ["(", ")"] delimiters 285s accepts literals without additional spaces 285s registers an offense for unnecessary spaces 285s accepts literals with escaped spaces 285s accepts literals with escaped and additional spaces 285s registers an offense for multiple spaces between items 285s accepts newlines and additional following alignment spaces 285s accepts multi-line literals 285s accepts multi-line literals within a method 285s for I type and ["(", ")"] delimiters 285s accepts literals with escaped and additional spaces 285s accepts multi-line literals 285s accepts multi-line literals within a method 285s accepts newlines and additional following alignment spaces 285s accepts literals with escaped spaces 285s registers an offense for unnecessary spaces 285s accepts literals without additional spaces 285s registers an offense for multiple spaces between items 285s for W type and ["!", "!"] delimiters 285s accepts multi-line literals 285s accepts literals with escaped spaces 285s accepts multi-line literals within a method 285s accepts literals without additional spaces 285s accepts newlines and additional following alignment spaces 285s accepts literals with escaped and additional spaces 285s registers an offense for unnecessary spaces 285s registers an offense for multiple spaces between items 285s for I type and ["!", "!"] delimiters 285s accepts multi-line literals within a method 285s accepts literals without additional spaces 285s accepts literals with escaped spaces 285s accepts multi-line literals 285s accepts literals with escaped and additional spaces 285s registers an offense for multiple spaces between items 285s registers an offense for unnecessary spaces 285s accepts newlines and additional following alignment spaces 285s for w type and ["(", ")"] delimiters 285s accepts literals with escaped and additional spaces 285s accepts multi-line literals within a method 285s accepts literals with escaped spaces 285s registers an offense for unnecessary spaces 285s accepts multi-line literals 285s accepts newlines and additional following alignment spaces 285s accepts literals without additional spaces 285s registers an offense for multiple spaces between items 285s for W type and ["[", "]"] delimiters 285s registers an offense for unnecessary spaces 285s accepts literals with escaped spaces 285s accepts multi-line literals within a method 285s accepts literals with escaped and additional spaces 285s accepts literals without additional spaces 285s accepts multi-line literals 285s accepts newlines and additional following alignment spaces 285s registers an offense for multiple spaces between items 285s for w type and ["{", "}"] delimiters 285s registers an offense for multiple spaces between items 285s accepts multi-line literals within a method 285s accepts multi-line literals 285s accepts literals without additional spaces 285s accepts literals with escaped spaces 285s accepts newlines and additional following alignment spaces 285s accepts literals with escaped and additional spaces 285s registers an offense for unnecessary spaces 285s for w type and ["!", "!"] delimiters 285s registers an offense for multiple spaces between items 285s accepts literals with escaped and additional spaces 285s accepts literals with escaped spaces 285s registers an offense for unnecessary spaces 285s accepts newlines and additional following alignment spaces 285s accepts literals without additional spaces 285s accepts multi-line literals within a method 285s accepts multi-line literals 285s for I type and ["[", "]"] delimiters 285s registers an offense for unnecessary spaces 285s accepts literals without additional spaces 285s accepts multi-line literals 285s registers an offense for multiple spaces between items 285s accepts literals with escaped spaces 285s accepts multi-line literals within a method 285s accepts literals with escaped and additional spaces 285s accepts newlines and additional following alignment spaces 285s for i type and ["{", "}"] delimiters 285s registers an offense for unnecessary spaces 285s accepts multi-line literals 285s accepts literals with escaped spaces 285s accepts literals without additional spaces 285s accepts literals with escaped and additional spaces 285s accepts multi-line literals within a method 285s registers an offense for multiple spaces between items 285s accepts newlines and additional following alignment spaces 285s for i type and ["[", "]"] delimiters 285s accepts newlines and additional following alignment spaces 285s registers an offense for unnecessary spaces 285s registers an offense for multiple spaces between items 285s accepts multi-line literals 285s accepts multi-line literals within a method 285s accepts literals with escaped and additional spaces 285s accepts literals without additional spaces 285s accepts literals with escaped spaces 285s for w type and ["[", "]"] delimiters 285s accepts multi-line literals within a method 285s registers an offense for multiple spaces between items 285s accepts literals with escaped and additional spaces 285s accepts newlines and additional following alignment spaces 285s accepts literals with escaped spaces 285s registers an offense for unnecessary spaces 285s accepts multi-line literals 285s accepts literals without additional spaces 285s for W type and ["(", ")"] delimiters 285s registers an offense for unnecessary spaces 285s accepts multi-line literals within a method 285s accepts literals with escaped and additional spaces 285s accepts multi-line literals 285s accepts literals with escaped spaces 285s registers an offense for multiple spaces between items 285s accepts literals without additional spaces 285s accepts newlines and additional following alignment spaces 285s for I type and ["{", "}"] delimiters 285s accepts multi-line literals 285s registers an offense for multiple spaces between items 285s accepts literals with escaped and additional spaces 285s accepts literals without additional spaces 285s accepts multi-line literals within a method 285s accepts newlines and additional following alignment spaces 285s accepts literals with escaped spaces 285s registers an offense for unnecessary spaces 285s 285s RuboCop::Cop::Layout::LineContinuationSpacing 285s EnforcedStyle: no_space 285s ignores empty code 285s registers no offense with zero spaces in front of backslash 285s registers an offense when one space in front of backslash 285s ignores when too much space in front of backslash after `__END__` 285s marks the offense correctly when offense is not in first line 285s ignores heredocs and comments 285s registers an offense when many spaces in front of backslash 285s EnforcedStyle: space 285s ignores heredocs and comments 285s ignores when too much space in front of backslash after `__END__` 285s registers an offense when no space in front of backslash 285s ignores empty code 285s registers an offense when too much space in front of backslash 285s marks the offense correctly when offense is not in first line 285s registers no offense with one space in front of backslash 285s 285s RuboCop::Cop::Lint::DuplicateCaseCondition 285s accepts non-redundant case expressions 285s registers an offense for repeated logical operator when expressions 285s registers multiple offenses for repeated multi-value conditionals 285s registers an offense for subsequent repeated case conditionals 285s accepts similar but not equivalent && expressions 285s accepts trivial case expressions 285s registers multiple offenses for multiple repeated case conditionals 285s accepts non-redundant case expressions with an else expression 285s registers an offense for repeated case conditionals 285s 285s RuboCop::Cop::Metrics::ModuleLength 285s does not count blank lines 285s accepts empty modules 285s accepts a module with 5 lines 285s reports the correct beginning and end lines 285s rejects a module with more than 5 lines 285s accepts a module with less than 5 lines 285s when inspecting a class defined with Module.new 285s registers an offense 285s when using numbered parameter 285s when inspecting a class defined with ::Module.new 285s registers an offense 285s when inspecting a class defined with Module.new 285s registers an offense 285s when CountComments is enabled 285s also counts commented lines 285s when a module has inner modules 285s rejects a module with 6 lines that belong to the module directly 285s does not count lines of inner modules 285s when `CountAsOne` is not empty 285s folds array into one line 285s when a module has inner classes 285s does not count lines of inner classes 285s rejects a module with 6 lines that belong to the module directly 285s when inspecting a class defined with ::Module.new 285s registers an offense 285s 285s RuboCop::Cop::Lint::ShadowedArgument 285s block argument shadowing 285s when multiple arguments are shadowed 285s and one of them shadowed within a lambda while another is shadowed outside 285s registers an offense 285s when a single argument is shadowed 285s registers an offense 285s and shadowed within a block 285s registers an offense without specifying where the reassignment took place 285s and the block is nested within a block 285s registers an offense without specifying where the reassignment took place 285s and the argument was used before shadowing 285s accepts 285s and the block is nested within a conditional 285s registers an offense without specifying where the reassignment took place 285s and the argument was used before shadowing 285s accepts 285s and the block occurs after the reassignment 285s registers an offense 285s and was used before shadowing 285s accepts 285s and the argument was not shadowed outside the block 285s accepts 285s when binding is used 285s registers an offense 285s when IgnoreImplicitReferences config option is set to true 285s accepts 285s when zsuper is used 285s accepts 285s and the argument is not used 285s accepts 285s and shadowed within a conditional 285s registers an offense without specifying where the reassignment took place 285s and the conditional occurs after the reassignment 285s registers an offense 285s and the conditional is nested within a lambda 285s registers an offense without specifying where the reassignment took place 285s and the argument was used before shadowing 285s accepts 285s and the argument was not shadowed outside the conditional 285s accepts 285s and the conditional is nested within a conditional 285s registers an offense without specifying where the reassignment took place 285s and the argument was used before shadowing 285s accepts 285s and was used before shadowing 285s accepts 285s when a block local variable is assigned but no argument is shadowed 285s accepts 285s method argument shadowing 285s when a single argument is shadowed 285s registers an offense 285s when argument was used in shorthand assignment 285s does not register an offense 285s when binding is used 285s registers an offense 285s when IgnoreImplicitReferences config option is set to true 285s accepts 285s when zsuper is used 285s registers an offense 285s when IgnoreImplicitReferences config option is set to true 285s accepts 285s when argument was shadowed by zsuper 285s does not register an offense 285s when argument was shadowed by zsuper 285s registers an offense 285s and shadowed within a block 285s registers an offense without specifying where the reassignment took place 285s and was used before shadowing 285s accepts 285s and the block is nested within a block 285s registers an offense without specifying where the reassignment took place 285s and the argument was used before shadowing 285s accepts 285s and the block occurs after the reassignment 285s registers an offense 285s and the block is nested within a conditional 285s registers an offense without specifying where the reassignment took place 285s and the argument was used before shadowing 285s accepts 285s and the argument was not shadowed outside the block 285s accepts 285s when reassigning to splat variable 285s does not register an offense 285s when a splat argument is shadowed 285s registers an offense 285s and shadowed within a conditional 285s registers an offense without specifying where the reassignment took place 285s and was used before shadowing 285s accepts 285s and the conditional is nested within a lambda 285s registers an offense without specifying where the reassignment took place 285s and the argument was used before shadowing 285s accepts 285s and the argument was not shadowed outside the conditional 285s accepts 285s and the conditional occurs after the reassignment 285s registers an offense 285s and the conditional is nested within a conditional 285s registers an offense without specifying where the reassignment took place 285s and the argument was used before shadowing 285s accepts 285s and the argument is not used 285s accepts 285s when multiple arguments are shadowed 285s and one of them shadowed within a lambda while another is shadowed outside 285s registers an offense 285s 285s RuboCop::Cop::Lint::UriRegexp 285s does not register an offense when using `regexp` with variable receiver 285s does not register an offense when using `regexp` without receiver 285s registers an offense and corrects using `URI.regexp` with argument 285s registers an offense and corrects using `::URI.regexp` without argument 285s registers an offense and corrects using `::URI.regexp` with argument 285s registers an offense and corrects using `URI.regexp` without argument 285s array argument 285s registers an offense and corrects using `URI.regexp` with literal arrays 285s registers an offense and corrects using `URI.regexp` with %w arrays 285s registers an offense and corrects using `URI.regexp` with %i arrays 285s 285s RuboCop::Cop::Style::TrailingCommaInArrayLiteral 285s with multi-line list of values 285s when EnforcedStyleForMultiline is comma 285s accepts trailing comma 285s accepts an empty array being passed as a method argument 285s accepts a multiline word array 285s registers an offense for a literal with two of the values on the same line and a trailing comma 285s accepts literal with two of the values on the same line 285s accepts a multiline array with a single item and trailing comma 285s when closing bracket is on same line as last value 285s accepts literal with no trailing comma 285s when EnforcedStyleForMultiline is no_comma 285s accepts HEREDOC with commas 285s accepts a literal with no trailing comma 285s registers an offense for trailing comma 285s autocorrects unwanted comma where HEREDOC has commas 285s when EnforcedStyleForMultiline is consistent_comma 285s accepts trailing comma 285s accepts a multiline array with items on a single line andtrailing comma 285s accepts two values on the same line 285s registers an offense for literal with two of the values on the same line and no trailing comma 285s accepts a multiline word array 285s accepts a multiline array with a single item and trailing comma 285s when closing bracket is on same line as last value 285s registers an offense for no trailing comma 285s with single line list of values 285s when EnforcedStyleForMultiline is comma 285s accepts rescue clause 285s accepts empty literal 285s accepts single element literal without trailing comma 285s accepts literal without trailing comma 285s registers an offense for trailing comma 285s when EnforcedStyleForMultiline is consistent_comma 285s accepts single element literal without trailing comma 285s accepts empty literal 285s accepts literal without trailing comma 285s registers an offense for trailing comma 285s accepts rescue clause 285s when EnforcedStyleForMultiline is no_comma 285s accepts rescue clause 285s registers an offense for trailing comma 285s accepts empty literal 285s accepts single element literal without trailing comma 285s accepts literal without trailing comma 285s 285s RuboCop::Cop::VisibilityHelp 285s #node_visibility 285s with inline private with symbol 285s is expected to eq :private 285s with visibility block private 285s is expected to eq :private 285s with visibility block private after public 285s is expected to eq :private 285s with inline public 285s is expected to eq :public 285s with inline private 285s is expected to eq :private 285s without visibility block 285s is expected to eq :public 285s with visibility block public 285s is expected to eq :public 285s 285s RuboCop::Cop::Style::EndBlock 285s does not report offenses for other blocks 285s reports an offense and corrects END block 285s 285s RuboCop::Cop::Layout::LeadingEmptyLines 285s accepts not having a blank line before a class 285s registers an offense and corrects a new line before code 285s registers an offense and corrects multiple new lines before a class 285s accepts not having a blank line before a comment 285s accepts not having a blank line before code 285s registers an offense and corrects a new line before a class 285s allows an empty input 285s allows blank lines without any comments or code 285s registers an offense and corrects a new line before a comment 285s autocorrect 285s in collaboration 285s does not invoke conflicts with other cops 285s 285s RuboCop::Cop::Layout::LineEndStringConcatenationIndentation 285s when EnforcedStyle is indented 285s registers an offense for aligned strings in an if/elsif/else statement 285s registers an offense for aligned strings in hash literal values 285s registers an offense for unaligned third part of string 285s registers an offense for aligned string 285s accepts indented strings in implicit return statement of a method definition after other statement 285s accepts indented strings in implicit return statement of a block 285s accepts a heredoc string with interpolation 285s accepts indented strings in ordinary statement 285s accepts a multiline string literal 285s accepts a heredoc string ... 285s accepts an empty heredoc string with interpolation 285s accepts string literal with line break concatenated with other string 285s accepts indented strings in implicit return statement of a singleton method definition 285s accepts indented strings in implicit return statement of a method definition 285s accepts single line string literal concatenation 285s accepts indented strings 285s for assignment with @x = 285s registers an offense for aligned strings 285s accepts indented strings 285s for assignment with x += 285s accepts indented strings 285s registers an offense for aligned strings 285s for assignment with x = 285s registers an offense for aligned strings 285s accepts indented strings 285s for assignment with $x = 285s accepts indented strings 285s registers an offense for aligned strings 285s for assignment with x ||= 285s registers an offense for aligned strings 285s accepts indented strings 285s when IndentationWidth is 1 285s accepts indented strings 285s for assignment with X = 285s accepts indented strings 285s registers an offense for aligned strings 285s when EnforcedStyle is aligned 285s registers an offense for third part of a string if it is aligned only with the first 285s accepts indented strings in implicit return statement of a method definition after other statement 285s registers an offense for unaligned strings in hash literal values 285s accepts indented strings in implicit return statement of a singleton method definition 285s accepts a heredoc string with interpolation 285s registers an offense for indented string 285s accepts aligned strings in method call 285s accepts string literal with line break concatenated with other string 285s accepts single line string literal concatenation 286s accepts indented strings in ordinary statement 286s registers an offense for aligned strings in an if/elsif/else statement 286s accepts a heredoc string ... 286s accepts indented strings in implicit return statement of a method definition 286s accepts a multiline string literal 286s accepts indented strings in implicit return statement of a block 286s accepts an empty heredoc string with interpolation 286s for assignment with @x = 286s accepts aligned strings 286s registers an offense for indented strings 286s for assignment with $x = 286s accepts aligned strings 286s registers an offense for indented strings 286s for assignment with X = 286s registers an offense for indented strings 286s accepts aligned strings 286s for assignment with x = 286s accepts aligned strings 286s registers an offense for indented strings 286s for assignment with x += 286s registers an offense for indented strings 286s accepts aligned strings 286s for assignment with x ||= 286s registers an offense for indented strings 286s accepts aligned strings 286s 286s RuboCop::Cop::Naming::MemoizedInstanceVariableName 286s does not register an offense when or-assignment-based memoization is used outside a method definition 286s EnforcedStyleForLeadingUnderscores: required 286s when defined?-based memoization is used 286s registers an offense when names match but missing a leading _ 286s registers an offense when it has leading `_` but names do not match 286s does not register an offense with a leading `_` for both names 286s with dynamically defined methods 286s when the variable name does not match the method name 286s registers an offense 286s when a singleton method is defined inside a module callback 286s when the method does not match 286s registers an offense 286s when the method matches 286s does not register an offense 286s when a method is defined inside a module callback 286s when the method matches 286s does not register an offense 286s when the method does not match 286s registers an offense 286s when the variable name matches the method name 286s does not register an offense 286s when or-assignment-based memoization is used 286s does not register an offense with a leading `_` for both names 286s registers an offense when it has leading `_` but names do not match 286s registers an offense when names match but missing a leading _ 286s with dynamically defined methods 286s when the variable name matches the method name 286s does not register an offense 286s when a singleton method is defined inside a module callback 286s when the method matches 286s does not register an offense 286s when the method does not match 286s registers an offense 286s when the variable name does not match the method name 286s registers an offense 286s when a method is defined inside a module callback 286s when the method does not match 286s registers an offense 286s when the method matches 286s does not register an offense 286s with default EnforcedStyleForLeadingUnderscores => disallowed 286s when or-assignment-based memoization is used 286s memoized variable does not match class method name 286s registers an offense 286s memoized variable does not match method name 286s registers an offense 286s memoized variable matches method name 286s does not register an offense 286s does not register an offense with a leading `_` for both names 286s does not register an offense when method has leading `_` 286s memoized variable matches method name for block 286s does not register an offense 286s memoized variable matches bang method name 286s does not register an offense 286s code follows memoized variable assignment 286s does not register an offense 286s instance variables in initialize methods 286s does not register an offense 286s memoized variable after other code 286s does not register an offense 286s memoized variable matches predicate method name 286s does not register an offense 286s memoized variable matches method name during assignment 286s does not register an offense 286s non-memoized variable does not match method name 286s does not register an offense 286s memoized variable does not match method name for block 286s registers an offense 286s with dynamically defined methods 286s when the variable name matches the method name 286s does not register an offense 286s when the variable name does not match the method name 286s registers an offense 286s when a method is defined inside a module callback 286s when the method does not match 286s registers an offense 286s when the method matches 286s does not register an offense 286s when a singleton method is defined inside a module callback 286s when the method does not match 286s registers an offense 286s when the method matches 286s does not register an offense 286s memoized variable does not match method name during assignment 286s registers an offense 286s memoized variable after other code does not match method name 286s registers an offense for a predicate method 286s registers an offense 286s registers an offense for a bang method 286s when defined?-based memoization is used 286s registers an offense when memoized variable does not match class method name 286s does not register an offense when there is no assignment 286s does not register an offense when some code before defined 286s registers an offense when memoized variable does not match method name 286s does not register an offense when some code after assignment 286s memoized variable matches method name 286s does not register an offense when memoized variable matches bang method name 286s does not register an offense 286s does not register an offense with a leading `_` for both names 286s does not register an offense when memoized variable matches predicate method name 286s does not register an offense when method has leading `_` 286s non-memoized variable does not match method name 286s does not register an offense 286s with dynamically defined methods 286s when the variable name matches the method name 286s does not register an offense 286s when the variable name does not match the method name 286s registers an offense 286s when a singleton method is defined inside a module callback 286s when the method does not match 286s registers an offense 286s when the method matches 286s does not register an offense 286s when a method is defined inside a module callback 286s when the method matches 286s does not register an offense 286s when the method does not match 286s registers an offense 286s EnforcedStyleForLeadingUnderscores: optional 286s when or-assignment-based memoization is used 286s memoized variable matches method name 286s does not register an offense with a leading underscore 286s does not register an offense without a leading underscore 286s does not register an offense with a leading `_` for both names 286s does not register an offense with a leading `_` for method name 286s when defined?-based memoization is used 286s memoized variable matches method name 286s does not register an offense with a leading `_` for method name 286s does not register an offense without a leading underscore 286s does not register an offense with a leading underscore 286s does not register an offense with a leading `_` for both names 286s 286s RuboCop::Cop::Style::StringMethods 286s registers an offense 286s when using safe navigation operator 286s registers an offense 286s 286s RuboCop::Formatter::FileListFormatter 286s #file_finished 286s displays parsable text 286s 286s RuboCop::Cop::Style::RedundantFileExtensionInRequire 286s registers an offense and corrects when requiring filename ending with `.rb` 286s does not register an offense when requiring variable as a filename 286s does not register an offense when requiring filename without an extension 286s does not register an offense when requiring filename ending with `.so` 286s 286s RuboCop::Cop::Lint::LiteralInInterpolation 286s accepts empty interpolation 286s accepts interpolation of irange where endpoints are not literals 286s handles backslash in single quotes when autocorrecting 286s accepts interpolation of xstr 286s handles double quotes in single quotes when autocorrecting 286s handles backslash in double quotes when autocorrecting 286s handles nested interpolations when autocorrecting 286s accepts interpolation of erange where endpoints are not literals 286s does not register an offense when space literal at the end of heredoc line 286s behaves like literal interpolation 286s registers an offense only for final %w[v1 v2] in interpolation 286s removes interpolation around %w[v1 v2] when there is more text 286s removes interpolation around multiple %w[v1 v2] 286s registers an offense for %w[v1 v2] in interpolation and removes interpolation around it 286s when there is non-literal and literal interpolation 286s when literal interpolation is before non-literal 286s only removes interpolation around literal 286s when literal interpolation is after non-literal 286s only removes interpolation around literal 286s behaves like literal interpolation 286s registers an offense only for final 1...2 in interpolation 286s registers an offense for 1...2 in interpolation and removes interpolation around it 286s removes interpolation around multiple 1...2 286s removes interpolation around 1...2 when there is more text 286s when there is non-literal and literal interpolation 286s when literal interpolation is after non-literal 286s only removes interpolation around literal 286s when literal interpolation is before non-literal 286s only removes interpolation around literal 286s behaves like literal interpolation 286s registers an offense for %w[v1] in interpolation and removes interpolation around it 286s registers an offense only for final %w[v1] in interpolation 286s removes interpolation around multiple %w[v1] 286s removes interpolation around %w[v1] when there is more text 286s when there is non-literal and literal interpolation 286s when literal interpolation is after non-literal 286s only removes interpolation around literal 286s when literal interpolation is before non-literal 286s only removes interpolation around literal 286s behaves like literal interpolation 286s registers an offense only for final :symbol in interpolation 286s removes interpolation around multiple :symbol 286s registers an offense for :symbol in interpolation and removes interpolation around it 286s removes interpolation around :symbol when there is more text 286s when there is non-literal and literal interpolation 286s when literal interpolation is after non-literal 286s only removes interpolation around literal 286s when literal interpolation is before non-literal 286s only removes interpolation around literal 286s behaves like literal interpolation 286s registers an offense only for final 1_123 in interpolation 286s removes interpolation around multiple 1_123 286s registers an offense for 1_123 in interpolation and removes interpolation around it 286s removes interpolation around 1_123 when there is more text 286s when there is non-literal and literal interpolation 286s when literal interpolation is before non-literal 286s only removes interpolation around literal 286s when literal interpolation is after non-literal 286s only removes interpolation around literal 286s behaves like literal interpolation 286s registers an offense only for final true in interpolation 286s removes interpolation around multiple true 286s registers an offense for true in interpolation and removes interpolation around it 286s removes interpolation around true when there is more text 286s when there is non-literal and literal interpolation 286s when literal interpolation is before non-literal 286s only removes interpolation around literal 286s when literal interpolation is after non-literal 286s only removes interpolation around literal 286s behaves like literal interpolation 286s removes interpolation around -1 when there is more text 286s registers an offense only for final -1 in interpolation 286s removes interpolation around multiple -1 286s registers an offense for -1 in interpolation and removes interpolation around it 286s when there is non-literal and literal interpolation 286s when literal interpolation is after non-literal 286s only removes interpolation around literal 286s when literal interpolation is before non-literal 286s only removes interpolation around literal 286s behaves like special keywords 286s registers an offense and autocorrects interpolation after __END__ 286s accepts strings like __END__ 286s behaves like literal interpolation 286s registers an offense only for final 0o377 in interpolation 286s removes interpolation around 0o377 when there is more text 286s removes interpolation around multiple 0o377 286s registers an offense for 0o377 in interpolation and removes interpolation around it 286s when there is non-literal and literal interpolation 286s when literal interpolation is after non-literal 286s only removes interpolation around literal 286s when literal interpolation is before non-literal 286s only removes interpolation around literal 286s behaves like literal interpolation 286s registers an offense for %w[] in interpolation and removes interpolation around it 286s removes interpolation around %w[] when there is more text 286s removes interpolation around multiple %w[] 286s registers an offense only for final %w[] in interpolation 286s when there is non-literal and literal interpolation 286s when literal interpolation is after non-literal 286s only removes interpolation around literal 286s when literal interpolation is before non-literal 286s only removes interpolation around literal 286s behaves like special keywords 286s accepts strings like __FILE__ 286s registers an offense and autocorrects interpolation after __FILE__ 286s behaves like literal interpolation 286s registers an offense only for final %i[s1 s2] in interpolation 286s registers an offense for %i[s1 s2] in interpolation and removes interpolation around it 286s removes interpolation around multiple %i[s1 s2] 286s removes interpolation around %i[s1 s2] when there is more text 286s when there is non-literal and literal interpolation 286s when literal interpolation is before non-literal 286s only removes interpolation around literal 286s when literal interpolation is after non-literal 286s only removes interpolation around literal 286s behaves like literal interpolation 286s removes interpolation around multiple nil 286s registers an offense only for final nil in interpolation 286s registers an offense for nil in interpolation and removes interpolation around it 286s removes interpolation around nil when there is more text 286s when there is non-literal and literal interpolation 286s when literal interpolation is after non-literal 286s only removes interpolation around literal 286s when literal interpolation is before non-literal 286s only removes interpolation around literal 286s behaves like special keywords 286s accepts strings like __ENCODING__ 286s registers an offense and autocorrects interpolation after __ENCODING__ 286s behaves like literal interpolation 286s removes interpolation around %i[ s1 s2 ] when there is more text 286s registers an offense only for final %i[ s1 s2 ] in interpolation 286s removes interpolation around multiple %i[ s1 s2 ] 286s registers an offense for %i[ s1 s2 ] in interpolation and removes interpolation around it 286s when there is non-literal and literal interpolation 286s when literal interpolation is before non-literal 286s only removes interpolation around literal 286s when literal interpolation is after non-literal 286s only removes interpolation around literal 286s behaves like literal interpolation 286s removes interpolation around ["a", "b"] when there is more text 286s removes interpolation around multiple ["a", "b"] 286s registers an offense only for final ["a", "b"] in interpolation 286s registers an offense for ["a", "b"] in interpolation and removes interpolation around it 286s when there is non-literal and literal interpolation 286s when literal interpolation is after non-literal 286s only removes interpolation around literal 286s when literal interpolation is before non-literal 286s only removes interpolation around literal 286s behaves like literal interpolation in words literal 286s removes interpolation of a string literal without space in %W[] 286s accepts interpolation of an array literal containing a string with space in %W[] 286s accepts interpolation of a symbol literal with space in %W[] 286s accepts interpolation of an array literal containing a symbol with space in %W[] 286s removes interpolation of an array containing a string literal without space in %W[] 286s removes interpolation of an array containing a symbol literal without space in %W[] 286s accepts interpolation of a string literal with space in %W[] 286s removes interpolation of a symbol literal without space in %W[] 286s behaves like literal interpolation 286s removes interpolation around multiple 1.2e-3 286s registers an offense for 1.2e-3 in interpolation and removes interpolation around it 286s removes interpolation around 1.2e-3 when there is more text 286s registers an offense only for final 1.2e-3 in interpolation 286s when there is non-literal and literal interpolation 286s when literal interpolation is after non-literal 286s only removes interpolation around literal 286s when literal interpolation is before non-literal 286s only removes interpolation around literal 286s behaves like literal interpolation 286s registers an offense only for final %I[s1 s2] in interpolation 286s removes interpolation around multiple %I[s1 s2] 286s removes interpolation around %I[s1 s2] when there is more text 286s registers an offense for %I[s1 s2] in interpolation and removes interpolation around it 286s when there is non-literal and literal interpolation 286s when literal interpolation is before non-literal 286s only removes interpolation around literal 286s when literal interpolation is after non-literal 286s only removes interpolation around literal 286s behaves like literal interpolation 286s registers an offense only for final {"a" => "b"} in interpolation 286s removes interpolation around multiple {"a" => "b"} 286s registers an offense for {"a" => "b"} in interpolation and removes interpolation around it 286s removes interpolation around {"a" => "b"} when there is more text 286s when there is non-literal and literal interpolation 286s when literal interpolation is after non-literal 286s only removes interpolation around literal 286s when literal interpolation is before non-literal 286s only removes interpolation around literal 286s behaves like literal interpolation 286s registers an offense for 0xaabb in interpolation and removes interpolation around it 286s registers an offense only for final 0xaabb in interpolation 286s removes interpolation around 0xaabb when there is more text 286s removes interpolation around multiple 0xaabb 286s when there is non-literal and literal interpolation 286s when literal interpolation is before non-literal 286s only removes interpolation around literal 286s when literal interpolation is after non-literal 286s only removes interpolation around literal 286s behaves like literal interpolation 286s registers an offense only for final 2.0 in interpolation 286s removes interpolation around 2.0 when there is more text 286s registers an offense for 2.0 in interpolation and removes interpolation around it 286s removes interpolation around multiple 2.0 286s when there is non-literal and literal interpolation 286s when literal interpolation is after non-literal 286s only removes interpolation around literal 286s when literal interpolation is before non-literal 286s only removes interpolation around literal 286s behaves like literal interpolation 286s removes interpolation around multiple %i[s1 s2] 286s registers an offense only for final %i[s1 s2] in interpolation 286s removes interpolation around %i[s1 s2] when there is more text 286s registers an offense for %i[s1 s2] in interpolation and removes interpolation around it 286s when there is non-literal and literal interpolation 286s when literal interpolation is before non-literal 286s only removes interpolation around literal 286s when literal interpolation is after non-literal 286s only removes interpolation around literal 286s behaves like literal interpolation 286s removes interpolation around 123_456_789_123_456_789 when there is more text 286s registers an offense for 123_456_789_123_456_789 in interpolation and removes interpolation around it 286s removes interpolation around multiple 123_456_789_123_456_789 286s registers an offense only for final 123_456_789_123_456_789 in interpolation 286s when there is non-literal and literal interpolation 286s when literal interpolation is after non-literal 286s only removes interpolation around literal 286s when literal interpolation is before non-literal 286s only removes interpolation around literal 286s behaves like literal interpolation 286s removes interpolation around multiple 1..2 286s registers an offense for 1..2 in interpolation and removes interpolation around it 286s registers an offense only for final 1..2 in interpolation 286s removes interpolation around 1..2 when there is more text 286s when there is non-literal and literal interpolation 286s when literal interpolation is before non-literal 286s only removes interpolation around literal 286s when literal interpolation is after non-literal 286s only removes interpolation around literal 286s behaves like non-special string literal interpolation 286s registers an offense for 'foo' and removes the interpolation and quotes around 'foo' 286s behaves like literal interpolation 286s removes interpolation around multiple :"symbol" 286s registers an offense only for final :"symbol" in interpolation 286s removes interpolation around :"symbol" when there is more text 286s registers an offense for :"symbol" in interpolation and removes interpolation around it 286s when there is non-literal and literal interpolation 286s when literal interpolation is after non-literal 286s only removes interpolation around literal 286s when literal interpolation is before non-literal 286s only removes interpolation around literal 286s behaves like literal interpolation 286s removes interpolation around multiple false 286s removes interpolation around false when there is more text 286s registers an offense for false in interpolation and removes interpolation around it 286s registers an offense only for final false in interpolation 286s when there is non-literal and literal interpolation 286s when literal interpolation is after non-literal 286s only removes interpolation around literal 286s when literal interpolation is before non-literal 286s only removes interpolation around literal 286s behaves like literal interpolation 286s registers an offense for 1 in interpolation and removes interpolation around it 286s registers an offense only for final 1 in interpolation 286s removes interpolation around 1 when there is more text 286s removes interpolation around multiple 1 286s when there is non-literal and literal interpolation 286s when literal interpolation is before non-literal 286s only removes interpolation around literal 286s when literal interpolation is after non-literal 286s only removes interpolation around literal 286s behaves like non-special string literal interpolation 286s registers an offense for "foo" and removes the interpolation and quotes around "foo" 286s in string-like contexts 286s removes interpolation in backticks 286s removes interpolation in symbols 286s removes interpolation in regular expressions 286s behaves like literal interpolation 286s registers an offense for [] in interpolation and removes interpolation around it 286s registers an offense only for final [] in interpolation 286s removes interpolation around multiple [] 286s removes interpolation around [] when there is more text 286s when there is non-literal and literal interpolation 286s when literal interpolation is after non-literal 286s only removes interpolation around literal 286s when literal interpolation is before non-literal 286s only removes interpolation around literal 286s behaves like literal interpolation in words literal 286s removes interpolation of a symbol literal without space in %I[] 286s removes interpolation of an array containing a symbol literal without space in %I[] 286s accepts interpolation of an array literal containing a string with space in %I[] 286s accepts interpolation of a string literal with space in %I[] 286s accepts interpolation of a symbol literal with space in %I[] 286s accepts interpolation of an array literal containing a symbol with space in %I[] 286s removes interpolation of a string literal without space in %I[] 286s removes interpolation of an array containing a string literal without space in %I[] 286s behaves like special keywords 286s registers an offense and autocorrects interpolation after __LINE__ 286s accepts strings like __LINE__ 286s 286s RuboCop::Cop::Style::ExplicitBlockArgument 286s registers an offense and corrects when `yield` inside block has no arguments 287s registers an offense and corrects when block just yields its arguments 287s does not register an offense when `yield` is not inside block 287s correctly corrects when using safe navigation method call 287s adds to the existing arguments when correcting 287s registers an offense and corrects when `yield` is inside block of `super` 287s correctly corrects when method already has an explicit block argument 287s does not register an offense when `yield` arguments is not a prefix of block arguments 287s does not register an offense when there is more than one block argument and not all are yielded 287s correctly corrects when the method call has a trailing comma in its argument list 287s registers an offense and corrects when multiple arguments are yielded 287s does not add extra parens to `super` when correcting 287s does not add extra parens when correcting 287s does not register an offense when arguments are yielded in a different order 287s does not register an offense when `yield` is the sole block body 287s does not register an offense when code is called outside of a method 287s registers an offense and corrects when method contains multiple `yield`s 287s 287s RuboCop::Cop::Lint::DuplicateRescueException 287s does not register an offense when there are no duplicate exceptions 287s registers an offense when duplicate exception exists within rescues with empty `rescue` branch 287s registers an offense when duplicate exception exists within rescues with `else` branch 287s registers an offense when multiple duplicate exceptions exist 287s registers an offense when duplicate exception exists 287s registers an offense when duplicate exception splat exists 287s 287s RuboCop::Cop::Style::EmptyBlockParameter 287s registers an offense for an empty block parameter with {} style 287s registers an offense for an empty block parameter with lambda 287s accepts a non-empty block parameter with {} style 287s accepts an empty block parameter with a lambda 287s registers an offense for an empty block parameter with do-end style 287s registers an offense for an empty block parameter with super 287s accepts a block that is do-end style without parameter 287s accepts a non-empty block parameter with do-end style 287s accepts a block that is {} style without parameter 287s 287s RuboCop::Cop::Style::RedundantSortBy 287s autocorrects array.sort_by { |y| y } 287s autocorrects array.sort_by { |x| x } 287s autocorrects array.sort_by do |x| x end 287s Ruby 2.7 287s autocorrects array.sort_by { |x| x } 287s 287s RuboCop::Cop::Style::Lambda 287s with enforced `literal` style 287s with a multiline lambda method call 287s with arguments 287s registers an offense 287s without arguments 287s registers an offense 287s with a single line lambda method call 287s without arguments 287s registers an offense 287s with arguments 287s registers an offense 287s with enforced `lambda` style 287s with a multiline lambda literal 287s without arguments 287s registers an offense 287s with arguments 287s registers an offense 287s with a single line lambda literal 287s without arguments 287s registers an offense 287s with arguments 287s registers an offense 287s without argument parens and spaces 287s registers an offense 287s when using safe navigation operator 287s does not break 287s with default `line_count_dependent` style 287s with a multiline lambda literal 287s without arguments 287s registers an offense 287s with arguments 287s registers an offense 287s with a single line lambda literal 287s does not register an offense 287s with a multiline braces lambda literal as a keyword argument 287s registers an offense 287s with a multiline do-end lambda literal as a keyword argument 287s registers an offense 287s with a single line lambda method call 287s without arguments 287s registers an offense 287s with arguments 287s registers an offense 287s with a multiline do-end lambda as a parenthesized kwarg 287s registers an offense 287s with a multiline lambda literal as an argument 287s registers an offense 287s >= Ruby 2.7 287s when using numbered parameter 287s with a single line lambda method call 287s registers an offense 287s with a multiline lambda method call 287s does not register an offense 287s with a single line lambda literal 287s does not register an offense 287s when calling a lambda method without a block 287s does not register an offense 287s with a multiline lambda method call 287s does not register an offense 287s unusual lack of spacing 287s with a multiline lambda literal 287s with no arguments and bad spacing 287s registers an offense 287s without parentheses 287s registers an offense 287s with no parentheses and many args 287s registers an offense 287s with no parentheses and bad spacing 287s registers an offense 287s with no arguments and no spacing 287s registers an offense 287s with empty arguments 287s registers an offense 287s without spacing after arguments 287s registers an offense 287s without spacing before arguments 287s registers an offense 287s without any spacing 287s registers an offense 287s 287s RuboCop::Cop::Lint::NonDeterministicRequireOrder 287s when requiring files 287s with sorted glob 287s does not register an offense 287s when Ruby 2.7 or lower 287s with unsorted glob 287s registers an offense and autocorrects to add .sort 287s with top-level ::Dir 287s registers an offense and corrects to add .sort 287s with require block passed as parameter 287s registers an offense an autocorrects to add sort 287s with unsorted index 287s registers an offense and autocorrects to add .sort when the block has `require_relative` 287s registers an offense with extra logic 287s registers an offense and autocorrects to add .sort when the block has `require` 287s registers an offense and autocorrects to add .sort when the numblock has `require` 287s with require block passed as parameter 287s registers an offense an autocorrects to add sort 287s with top-level ::Dir 287s registers an offense and corrects to add .sort 287s with require_relative block passed as parameter 287s registers an offense an autocorrects to add sort 287s with direct block glob 287s registers an offense and autocorrects to add .sort.each 287s with require_relative block passed as parameter 287s registers an offense and autocorrects to add sort 287s with require block passed as parameter 287s registers an offense and autocorrects to add sort 287s with top-level ::Dir 287s registers an offense and corrects to add .sort.each 287s with sorted index 287s does not register an offense 287s when Ruby 3.0 or higher 287s with direct block glob 287s does not register an offense 287s with require block passed as parameter 287s does not register an offense 287s with top-level ::Dir 287s does not register an offense 287s with `Dir[]` 287s does not register an offense 287s with top-level ::Dir 287s does not register an offense 287s with extra logic 287s does not register an offense 287s with require block passed as parameter 287s does not register an offense 287s with `Dir.glob` 287s does not register an offense 287s with `sort: false` keyword option 287s does not register an offense 287s with require block passed as parameter 287s does not register an offense 287s with top-level ::Dir 287s does not register an offense 287s when not requiring files 287s does not register an offense 287s 287s RuboCop::Cop::Layout::MultilineOperationIndentation 287s when EnforcedStyle is indented 287s registers an offense and corrects three space indentation of second line 287s accepts any indentation of parameters to #[] 287s registers an offense and corrects aligned operators in assignment 287s registers an offense and corrects aligned code on LHS of equality operator 287s accepts indented operands in an array 287s registers an offense for a 2 space indentation of unless condition 287s registers an offense for a 2 space indentation of until condition 287s registers an offense and corrects emacs ruby-mode 1.1 indentation of an expression in an array 287s accepts special indentation of for expression 287s registers an offense and corrects one space indentation of second line 287s accepts indentation of next unless condition 287s accepts indented operands in while body 287s registers an offense and corrects no indentation of second line 287s accepts alignment inside a grouped expression 287s registers an offense and corrects wrong indentation of for expression 287s accepts double indentation of until condition 287s registers an offense for a 2 space indentation of while condition 287s accepts normal indentation of method parameters 287s accepts any indentation of method parameters 287s accepts double indentation of while condition 287s accepts two spaces indentation in assignment of array element 287s registers an offense and corrects extra indentation of third line 287s accepts indented operands in ordinary statement 287s accepts an expression where the first operand spans multiple lines 287s accepts indented operands inside and outside a block 287s accepts the indentation of a broken string 287s accepts indented operands in until body 287s accepts indented operands in if condition 287s accepts double indentation of if condition 287s registers an offense for a 2 space indentation of if condition 287s accepts two spaces indentation of second line 287s accepts two spaces indentation in assignment of local variable 287s accepts indentation of return unless condition 287s registers an offense and corrects correct + unrecognized style 287s registers an offense and corrects aligned operands in if conditions 287s accepts indentation of next if condition 287s does not check method calls 287s accepts indented operands in for body 287s accepts no extra indentation of third line 287s accepts unary operations 287s accepts indented operands in unless body 287s accepts indentation of return if condition 287s accepts normal indentation inside grouped expression 287s registers an offense and corrects an unindented multiline operation that is the left operand in another operation 287s accepts indentation of assignment 287s accepts indented operands in if body 287s accepts double indentation of unless condition 287s when indentation width is overridden for this cop 287s accepts indentation of while condition which is offset by a single normal indentation step 287s accepts indentation of unless condition which is offset by a single normal indentation step 287s accepts indented operands in until body 287s registers an offense for a 4 space indentation of unless condition 287s accepts indented operands in unless body 287s registers an offense for a 4 space indentation of if condition 287s accepts indented operands in if condition 287s accepts indented operands in while body 287s accepts indented operands in if body 287s registers an offense for a 4 space indentation of while condition 287s accepts indentation of until condition which is offset by a single normal indentation step 287s registers an offense for a 4 space indentation of until condition 287s registers an offense and corrects 287s accepts indentation of if condition which is offset by a single normal indentation step 287s when EnforcedStyle is aligned 287s registers an offense and corrects an unindented multiline operation that is the left operand in another operation 287s accepts indented operands in an array 287s accepts no extra indentation of third line 287s registers an offense for misaligned operands in while condition 287s registers an offense for misaligned operands in unless condition 287s accepts unary operations 287s registers an offense and corrects three space indentation of second line 287s accepts indented operands in ordinary statement 287s accepts aligned operands in if condition 287s accepts an expression where the first operand spans multiple lines 287s registers an offense and corrects one space indentation of second line 287s registers an offense and corrects misaligned operands in unless condition 287s registers an offense and corrects emacs ruby-mode 1.1 indentation of an expression in an array 287s registers an offense and corrects indented operand in second argument 287s does not check method calls 287s registers an offense and corrects misaligned string operand when the first operand has backslash continuation 287s accepts two spaces indentation of second line 287s registers an offense and corrects indented second part of string 287s registers an offense and corrects unaligned operands in op-assignment 287s accepts alignment inside a grouped expression 287s accepts indented operands with ternary operators 287s accepts any indentation of parameters to #[] 287s accepts aligned or:ed operands in assignment 287s registers an offense for misaligned operands in if condition 287s accepts indented operands inside block + assignment 287s accepts two spaces indentation in assignment of local variable 287s accepts indented code on LHS of equality operator 287s registers an offense and corrects misaligned string operand when plus is used 287s accepts two spaces indentation in assignment of array element 287s accepts indented operands inside and outside a block 287s accepts indented operands in for body 287s registers an offense and corrects indented operands in if condition 287s accepts aligned operands in assignment 287s registers an offense and corrects no indentation of second line 287s registers an offense for misaligned operands in until condition 287s registers an offense and corrects extra indentation of third line 287s 287s RuboCop::Cop::Layout::SpaceInsideStringInterpolation 287s when EnforcedStyle is no_space 287s does not touch spaces inside the interpolated expression 287s accepts empty interpolation 287s for "space" style formatted string interpolations 287s registers offenses and autocorrects 287s for ill-formatted string interpolations 287s finds interpolations in string-like contexts 287s registers offenses and autocorrects 287s when interpolation starts or ends with a line break 287s ignores comments and whitespace when looking for line breaks 287s does not register an offense 287s for well-formatted string interpolations 287s accepts excess literal spacing 287s when EnforcedStyle is space 287s accepts empty interpolation 287s for "no_space" style formatted string interpolations 287s registers offenses and autocorrects 287s for ill-formatted string interpolations 287s registers offenses and autocorrects 287s for well-formatted string interpolations 287s does not register an offense for excess literal spacing 287s 287s RuboCop::Cop::Style::MultilineMemoization 287s EnforcedStyle: braces 287s with a multiline memoization 287s without braces 287s when the expression is wrapped in `begin` and `end` keywords 287s registers an offense for begin...end block on following line 287s registers an offense for begin...end block on first line 287s with a multiline memoization 287s without a `begin` and `end` block 287s allows with another block on the first line 287s allows with a conditional on the first line 287s allows with another block on the following line 287s allows with a conditional on the following line 287s with a single line memoization 287s allows expression on the following line 287s allows expression on first line 287s EnforcedStyle: keyword 287s with a single line memoization 287s allows expression on first line 287s allows expression on the following line 287s with a multiline memoization 287s without a `begin` and `end` block 287s when the expression is wrapped in parentheses 287s registers an offense with multiline expression 287s registers an offense when expression starts on first line 287s registers an offense when expression starts on following line 287s with a multiline memoization 287s without a `begin` and `end` block 287s allows with another block on the following line 287s allows with a conditional on the first line 287s allows with another block on the first line 287s allows with a conditional on the following line 287s 287s RuboCop::Cop::Style::ReturnNil 287s when enforced style is `return` 287s does not register an offense for return nil from iterators 287s does not register an offense for returning others 287s registers an offense for return nil 287s when enforced style is `return_nil` 287s registers an offense for return 287s does not register an offense for returning others 287s 287s RuboCop::Cop::Layout::SingleLineBlockChain 287s does not register an offense for method call chained on a new line after a single line block with trailing dot 287s registers an offense for no selector method call chained on the same line as a block 287s does not register an offense for method call chained without a dot 287s does not register an offense for method call chained on the same line as a multiline block 287s registers an offense for method call chained on the same line as a block 287s does not register an offense for method call chained on a new line after a single line block 287s 287s RuboCop::Cop::Style::MixinGrouping 287s when configured with separated style 287s when using `prepend` 287s registers an offense for several mixins in one call 287s when using a mix of diffent methods 287s registers an offense for some calls having several mixins 287s when using `extend` 287s registers an offense for several mixins in one call 287s when using `include` 287s registers an offense for several mixins in one call 287s allows include call as an argument to another method 287s registers an offense for several mixins in separate calls 287s when configured with grouped style 287s when using `prepend` 287s registers an offense for single mixins in separate calls, interspersed 287s registers an offense when other mixins have receivers 287s registers an offense for single mixins in separate calls 287s when using a mix of diffent methods 287s registers an offense with some duplicated mixin methods 287s allows all different mixin methods 287s when using include 287s registers an offense for single mixins in separate calls 287s allows include with an explicit receiver 287s registers an offense for several mixins in separate calls 287s when using `extend` 287s registers an offense for single mixins in separate calls 287s 287s RuboCop::Cop::Style::ModuleFunction 287s when enforced style is `extend_self` 287s registers an offense for `module_function` without an argument 287s accepts module_function with an argument 287s when enforced style is `module_function` 287s accepts for `extend self` in a module with private methods 287s accepts `extend self` in a class 287s registers an offense for `extend self` in a module 287s accepts for `extend self` in a module with declarative private 287s when enforced style is `forbidden` 287s registers an offense for `module_function` without an argument 287s accepts `extend self` in a class 287s registers an offense for `extend self` 287s in a module with declarative private 287s in a module 287s in a module with private methods 287s 287s RuboCop::Cop::Style::NegatedWhile 287s registers an offense for while with "not" condition 287s autocorrects by replacing while not with until 287s accepts a while where only part of the condition is negated 287s autocorrects by replacing until not with while 287s does not blow up for empty while condition 287s registers an offense for while with exclamation point condition 287s accepts a while where the condition is doubly negated 287s does not blow up for empty until condition 287s registers an offense for until with exclamation point condition 287s 287s RuboCop::Cop::Style::CollectionMethods 287s registers an offense for find_all with proc param 287s registers an offense for inject with an argument and proc param 287s accepts find_all without a block 287s registers an offense for detect with proc param 287s registers an offense for collect with an argument and proc param 287s registers an offense for collect with block 287s registers an offense for find_all with an argument and proc param 287s accepts collect without a block 287s registers an offense for find_all with block 287s accepts member? without a block 287s registers an offense for collect with proc param 287s registers an offense for member? with an argument and proc param 287s registers an offense for member? with proc param 287s accepts inject without a block 287s registers an offense for inject with proc param 287s registers an offense for detect with block 287s accepts detect without a block 287s registers an offense for detect with an argument and proc param 287s registers an offense for member? with block 287s registers an offense for inject with block 287s Ruby 2.7 287s registers an offense for find_all with numblock 287s for methods that accept a symbol as implicit block 288s registers an offense with a final symbol param 288s registers an offense with an argument and final symbol param 288s Ruby 2.7 288s registers an offense for collect with numblock 288s Ruby 2.7 288s registers an offense for inject with numblock 288s Ruby 2.7 288s registers an offense for member? with numblock 288s for methods that do not accept a symbol as implicit block 288s does not register an offense for a final symbol param 288s does not register an offense for a final symbol param with extra args 288s Ruby 2.7 288s registers an offense for detect with numblock 288s 288s RuboCop::Cop::Style::RedundantException 288s reports an offense for a fail with ::RuntimeError.new 288s accepts rescue w/ non redundant error 288s reports an offense for a raise with ::RuntimeError.new 288s reports an offense for a fail with RuntimeError and () 288s reports an offense for a fail with ::RuntimeError.new 288s accepts a raise with ::RuntimeError if it does not have 2 args 288s accepts rescue w/ non redundant error 288s reports an offense for a raise with RuntimeError 288s reports an offense for a fail with ::RuntimeError 288s accepts rescue w/ non redundant error 288s accepts rescue w/ non redundant error 288s accepts a raise with RuntimeError if it does not have 2 args 288s reports an offense for a raise with RuntimeError.new 288s reports an offense for a fail with RuntimeError.new 288s reports an offense for a fail with RuntimeError 288s reports an offense for a raise with ::RuntimeError and () 288s reports an offense for a raise with RuntimeError and () 288s accepts a fail with RuntimeError if it does not have 2 args 288s reports an offense for a raise with RuntimeError.new 288s reports an offense for a fail with ::RuntimeError and () 288s reports an offense for a raise with ::RuntimeError 288s accepts a fail with ::RuntimeError if it does not have 2 args 288s reports an offense for a raise with ::RuntimeError.new 288s reports an offense for a fail with RuntimeError.new 288s 288s RuboCop::Cop::Lint::TripleQuotes 288s does not register an offense for implicit concatenation 288s quintuple quotes 288s registers an offense and corrects 288s heredocs 288s does not register an offense 288s triple quotes 288s when only quotes 288s registers an offense and corrects to a single empty quote 288s on multiple lines 288s registers an offense and corrects 288s with only whitespace 288s does not register 288s on one line 288s registers an offense and corrects 288s string interpolation 288s does not register an offense 288s with nested extra quotes 288s registers an offense and corrects 288s 288s RuboCop::Cop::Style::PreferredHashMethods 288s with enforced `verbose` style 288s registers an offense for key? with one arg 288s accepts key? with no args 288s accepts value? with no args 288s registers an offense for value? with one arg 288s with enforced `short` style 288s registers an offense for has_key? with one arg 288s registers an offense for has_value? with one arg 288s accepts has_key? with no args 288s accepts has_value? with no args 288s when using safe navigation operator 288s registers an offense for has_value? with one arg 288s 288s RuboCop::Cop::Style::OptionalBooleanParameter 288s does not register an offense when defining method with optional non-boolean arg 288s registers an offense when defining class method with optional boolean arg 288s registers an offense when defining method with optional boolean arg 288s does not register an offense when defining method without args 288s registers an offense when defining method with multiple optional boolean args 288s does not register an offense when defining method with keyword boolean arg 288s registers an offense when defining method with optional boolean arg that has no space 288s when AllowedMethods is not empty 288s does not register an offense 288s 288s RuboCop::Cop::Offense 288s overrides #to_s 288s does not blow up if a message contains % 288s is frozen 288s redefines == to compare offenses based on their contents 288s has a few required attributes 288s #cop_name 288s is frozen 288s offenses that span part of a line 288s highlights the first line 288s when unknown severity is passed 288s raises error 288s #<=> 288s when receiver has {:col=>6, :cop=>"A"} and other has {:col=>5, :cop=>"B"} 288s returns 1 288s when receiver has {} and other has {} 288s returns 0 288s when receiver has {:line=>5, :col=>6} and other has {:line=>5, :col=>5} 288s returns 1 288s when receiver has {:line=>6} and other has {:line=>5} 288s returns 1 288s when receiver has {:line=>6, :cop=>"A"} and other has {:line=>5, :cop=>"B"} 288s returns 1 288s when receiver has {:cop=>"B"} and other has {:cop=>"A"} 288s returns 1 288s when receiver has {:line=>6, :col=>4} and other has {:line=>5, :col=>5} 288s returns 1 288s offenses that span multiple lines 288s highlights the first line 288s #severity 288s is frozen 288s #location 288s is frozen 288s #message 288s is frozen 288s when the location is pseudo 288s returns a line 288s returns a column length 288s returns a column 288s returns the last column 288s returns a real column 288s returns the last line 288s returns a location with valid size and length 288s returns the first line 288s returns a source line 288s returns a column range 288s #severity_level 288s when severity is :refactor 288s is 2 288s when severity is :info 288s is 1 288s when severity is :fatal 288s is 6 288s 288s RuboCop::Cop::Layout::MultilineMethodArgumentLineBreaks 288s when argument starts on same line but ends on different line 288s registers an offense and corrects 288s when two arguments are on next line 288s does not add any offenses 288s when many arguments are on multiple lines, three on same line 288s registers an offense and corrects 288s when many arguments are on multiple lines, two on same line 288s registers an offense and corrects 288s when there are multiple arguments on the first line 288s registers an offense and corrects starting from the 2nd argument 288s when many arguments including hash are on multiple lines, three on same line 288s registers an offense and corrects 288s when one argument on same line 288s does not add any offenses 288s when second argument starts on same line as end of first 288s registers an offense and corrects 288s when bracket hash assignment on multiple lines 288s does not add any offenses 288s when bracket hash assignment key on multiple lines 288s does not add any offenses 288s 288s RuboCop::Formatter::QuietFormatter 288s #report_file 288s the file is under the current working directory 288s prints as relative path 288s the file is outside of the current working directory 288s prints as absolute path 288s when the offense is not corrected 288s prints message as-is 288s when the offense is automatically corrected 288s prints [Corrected] along with message 288s when the offense is correctable 288s prints message as-is 288s #report_summary 288s when no files inspected 288s handles pluralization correctly 288s when a offense detected 288s handles pluralization correctly 288s when 2 offenses detected and 2 offenses correctable 288s handles pluralization correctly 288s when 2 offenses are corrected and 2 offenses correctable 288s handles pluralization correctly 288s when a file inspected and no offenses detected 288s handles pluralization correctly 288s when 2 offenses are corrected 288s handles pluralization correctly 288s when 2 offenses detected 288s handles pluralization correctly 288s when a offense detected and a offense correctable 288s handles pluralization correctly 288s when an offense is corrected 288s prints about correction 288s 288s RuboCop::Cop::Style::StringLiterals 288s when configured with a bad value 288s fails 288s configured with double quotes preferred 288s flags single quotes with plain # (not #@var or #{interpolation} or #$global 288s accepts % quotes 288s accepts single quotes when they are needed 288s accepts double quotes 288s accepts %q and %Q quotes 288s can handle a built-in constant parsed as string 288s accepts ' in a %w 288s accepts escaped single quote in string with escaped non-' character 288s registers offense for opposite + correct 288s accepts single quoted string with backslash 288s accepts single quotes in interpolation 288s accepts heredocs 288s registers offense for single quotes when double quotes would be equivalent 288s accepts single quotes at the start of regexp literals 288s accepts single quotes in string with escaped non-' character 288s registers offense for escaped single quote in single quotes 288s does not accept multiple escaped single quotes in single quotes 288s when ConsistentQuotesInMultiline is true 288s and EnforcedStyle is single_quotes 288s accepts for double quotes with an escaped normal character 288s accepts for double quotes with an escaped special character 288s registers an offense for mixed quote styles in a continued string 288s doesn't choke on heredocs with inconsistent indentation 288s doesn't register offense for double quotes with embedded single 288s doesn't register offense for double quotes with interpolation 288s accepts continued strings using all single quotes 288s registers an offense for strings with line breaks in them 288s registers an offense for unneeded double quotes in continuation 288s and EnforcedStyle is double_quotes 288s accepts continued strings using all double quotes 288s registers an offense for mixed quote styles in a continued string 288s registers an offense for unneeded single quotes in continuation 288s doesn't register offense for single quotes with embedded double 288s configured with single quotes preferred 288s accepts double quotes when interpolating a global variable 288s accepts double quotes when control characters are used 288s registers an offense for "\" 288s accepts double quotes in interpolation 288s accepts double quotes when interpolating & quotes in multiple lines 288s accepts double quotes when single quotes are used 288s accepts heredocs 288s accepts % quotes 288s accepts double quotes when unicode control sequence is used 288s registers an offense for words with non-ascii chars 288s registers offense for double quotes when single quotes suffice 288s registers an offense for "\"" 288s accepts double quotes when new line is used 288s accepts double quotes with some other special symbols 288s accepts single quotes 288s accepts double quotes when interpolating an instance variable 288s does not register an offense for words with non-ascii chars and other control sequences 288s accepts double quotes at the start of regexp literals 288s can handle character literals 288s accepts " in a %w 288s can handle a built-in constant parsed as string 288s accepts single quotes in interpolation 288s registers offense for correct + opposite 288s accepts double quotes when interpolating a class variable 288s accepts \\\n in a string 288s accepts %q and %Q quotes 288s detects unneeded double quotes within concatenated string 288s 288s RuboCop::Cop::Style::MissingRespondToMissing 288s registers an offense when method_missing is implemented as a class methods 288s registers an offense when respond_to_missing? is not implemented 288s registers an offense respond_to_missing? is implemented as an instance method and method_missing is implemented as a class method 288s allows method_missing and respond_to_missing? when defined with inline access modifier 288s allows method_missing and respond_to_missing? implemented as class methods 288s registers an offense respond_to_missing? is implemented as a class method and method_missing is implemented as an instance method 288s allows method_missing and respond_to_missing? implemented as instance methods 288s allows method_missing and respond_to_missing? when defined with inline access modifier and method_missing is not qualified by inline access modifier 288s 288s RuboCop::Cop::Layout::SpaceAroundBlockParameters 288s when EnforcedStyleInsidePipes is no_space 288s skips lambda without args 288s accepts a block with parameters but no body 288s accepts a block parameter without preceding space 288s registers an offense and corrects no space after closing pipe 288s registers an offense and corrects all types of spacing issues for a lambda 288s skips lambda without parens 288s registers an offense and corrects multiple spaces before parameter 288s registers an offense and corrects space before first parameter 288s accepts line break after closing pipe 288s registers an offense and corrects a lambda for space before first parameter 288s registers an offense and corrects for space with parens 288s registers an offense and corrects all types of spacing issues 288s registers an offense and corrects a lambda for space after the last parameter 288s registers an offense and corrects space after last parameter 288s accepts a lambda with spaces in the right places 288s accepts block parameters with surrounding space that includes line breaks 288s accepts an empty block 288s accepts a block with spaces in the right places 288s trailing comma 288s registers an offense for space after the last comma 288s registers an offense for space before and after the last comma 288s when EnforcedStyleInsidePipes is space 288s skips lambda without args 288s registers an offense for no space before first parameter 288s skips lambda without parens 288s registers an offense and corrects spacing in lambda args 288s registers an offense and corrects a lambda for extra spacebefore first parameter 288s accepts a block parameter without preceding space 288s accepts a block with parameters but no body 288s accepts a lambda with spaces in the right places 288s registers an offense and corrects a lambda for no space before first parameter 288s registers an offense and corrects multiple spaces before parameter 288s registers an offense and corrects multiple spaces after last parameter 288s registers an offense and corrects extra space before first parameter 288s accepts line break after closing pipe 288s accepts an empty block 288s registers an offense and corrects space with parens at middle 288s registers an offense and corrects a lambda for no space after last parameter 288s accepts a block with spaces in the right places 288s registers an offense and corrects missing space before first argument and after last argument 288s registers an offense and corrects block arguments inside Hash#each 288s registers an offense and corrects no space after last parameter 288s registers an offense and corrects a lambda for multiple spacesafter last parameter 288s registers an offense and corrects no space after closing pipe 288s trailing comma 288s accepts space both before and after the last comma 288s registers an offense and corrects no space after the last comma 288s accepts space after the last comma 288s 288s RuboCop::Cop::Style::WhileUntilDo 288s accepts multi-line while without do 288s accepts do in single-line until 288s registers an offense for do in multiline until 288s accepts do in single-line while 288s accepts multi-line until without do 288s registers an offense for do in multiline while 288s 288s RuboCop::Cop::Layout::EmptyLinesAroundBlockBody 288s when EnforcedStyle is empty_lines for do end block 288s ignores block with an empty body 288s registers an offense for block body not starting or ending with a blank 288s is not fooled by single line blocks 288s when EnforcedStyle is no_empty_lines for { } block 288s registers an offense for block body starting with a blank passed to a multi-line method call 288s is not fooled by single line blocks 288s registers an offense for block body ending with a blank 288s registers an offense for block body starting with a blank 288s accepts block body starting with a line with spaces 288s Ruby 2.7 288s registers an offense for block body ending with a blank 288s when EnforcedStyle is empty_lines for { } block 288s is not fooled by single line blocks 288s ignores block with an empty body 288s registers an offense for block body not starting or ending with a blank 288s when EnforcedStyle is no_empty_lines for do end block 288s registers an offense for block body starting with a blank 288s accepts block body starting with a line with spaces 288s is not fooled by single line blocks 288s registers an offense for block body ending with a blank 288s registers an offense for block body starting with a blank passed to a multi-line method call 288s Ruby 2.7 288s registers an offense for block body ending with a blank 288s 288s RuboCop::Cop::Lint::UselessAccessModifier 288s when using the class_methods method from ActiveSupport::Concern 288s is aware that this creates a new scope 288s when an access modifier has no methods 288s registers an offense and corrects 288s when passing method as symbol 288s does not register an offense 288s behaves like at the end of the body 288s registers an offense for trailing `protected` 288s behaves like method defined on a singleton class 288s inside a class 288s doesn't register an offense if a method is defined 288s registers an offense even if a non-singleton-class method is defined 288s registers an offense if no method is defined after the modifier 288s registers an offense if no method is defined 288s doesn't register an offense if the modifier is the same as outside the meta-class 288s outside a class 288s doesn't register an offense if a method is defined 288s registers an offense if no method is defined after the modifier 288s registers an offense if no method is defined 288s when using ActiveSupport's `concerning` method 288s is aware that this creates a new scope 288s still points out redundant uses within the block 288s Ruby 2.7 288s still points out redundant uses within the block 288s behaves like def in new block 288s registers an offense if no method is defined in ::Class.new 288s doesn't register an offense if a method is defined in ::Class.new 288s behaves like method named by access modifier name 288s does not register an offense for `protected` 288s behaves like nested in a begin..end block 288s still flags repeated `private` 288s doesn't flag an access modifier from surrounding scope 288s behaves like def in new block 288s registers an offense if no method is defined in ::Module.new 288s doesn't register an offense if a method is defined in ::Module.new 288s when using a known method-creating method 288s still points out redundant uses within the module 288s is aware that this creates a new method 288s behaves like nested modules 288s doesn't register an offense for nested modules 288s unused modifiers 288s registers an offense with a nested module 288s registers an offense when inside a nested module 288s registers an offense when outside a nested module 288s behaves like at the end of the body 288s registers an offense for trailing `private` 288s behaves like method named by access modifier name 288s does not register an offense for `protected` 288s when private_class_method is used with arguments 288s does not register an offense 288s when using ActiveSupport behavior when Rails is not eabled 288s reports offenses and corrects 288s behaves like methods defined in an iteration 288s doesn't register an offense for map 288s doesn't register an offense for each 288s when using inline modifiers 288s does not register an offense 288s behaves like def in new block 288s registers an offense if no method is defined in ::Module.new 288s doesn't register an offense if a method is defined in ::Module.new 288s behaves like methods defined in an iteration 288s doesn't register an offense for each 288s doesn't register an offense for map 288s behaves like def in new block 288s doesn't register an offense if a method is defined in Struct.new 288s registers an offense if no method is defined in Struct.new 288s behaves like def in new block 288s registers an offense if no method is defined in Class.new 288s doesn't register an offense if a method is defined in Class.new 288s when class is empty save modifier 288s registers an offense and corrects 288s behaves like def in new block 288s registers an offense if no method is defined in ::Struct.new 288s doesn't register an offense if a method is defined in ::Struct.new 288s when private_class_method is used without arguments 288s registers an offense and corrects 288s behaves like at the end of the body 288s registers an offense for trailing `private` 288s behaves like at the top of the body 288s registers an offense and corrects for `public` 288s doesn't register an offense for `private` 288s doesn't register an offense for `protected` 288s behaves like nested in a begin..end block 288s still flags repeated `public` 288s behaves like repeated visibility modifiers 288s registers an offense when `public` is repeated 288s behaves like nested modules 288s doesn't register an offense for nested modules 288s unused modifiers 288s registers an offense with a nested module 288s registers an offense when inside a nested module 288s registers an offense when outside a nested module 288s behaves like conditionally defined method 288s doesn't register an offense for if 288s doesn't register an offense for unless 288s behaves like nested modules 288s doesn't register an offense for nested classs 288s unused modifiers 288s registers an offense when inside a nested class 288s registers an offense with a nested class 288s registers an offense when outside a nested class 288s behaves like method defined with define_method 288s doesn't register an offense if a block is passed 288s doesn't register an offense if a -> is passed 288s doesn't register an offense if a lambda is passed 288s doesn't register an offense if a proc is passed 288s behaves like repeated visibility modifiers 288s registers an offense when `protected` is repeated 288s behaves like def in new block 288s doesn't register an offense if a method is defined in ::Class.new 288s registers an offense if no method is defined in ::Class.new 288s behaves like nested in a begin..end block 288s doesn't flag an access modifier from surrounding scope 288s still flags repeated `protected` 288s behaves like method defined with define_method 288s doesn't register an offense if a lambda is passed 288s doesn't register an offense if a block is passed 288s doesn't register an offense if a -> is passed 288s doesn't register an offense if a proc is passed 288s behaves like repeated visibility modifiers 288s registers an offense when `private` is repeated 288s behaves like def in new block 288s doesn't register an offense if a method is defined in ::Struct.new 288s registers an offense if no method is defined in ::Struct.new 288s behaves like at the end of the body 288s registers an offense for trailing `protected` 288s behaves like method named by access modifier name 288s does not register an offense for `private` 288s behaves like at the top of the body 288s registers an offense and corrects for `public` 288s doesn't register an offense for `protected` 288s doesn't register an offense for `private` 288s when an access modifier is followed by a class method defined on constant 288s registers an offense and corrects 288s behaves like at the end of the body 288s registers an offense for trailing `public` 288s behaves like nested in a begin..end block 288s doesn't flag an access modifier from surrounding scope 288s still flags repeated `protected` 288s behaves like nested in a begin..end block 288s still flags repeated `private` 288s doesn't flag an access modifier from surrounding scope 288s behaves like method defined on a singleton class 288s inside a class 288s registers an offense if no method is defined 288s doesn't register an offense if a method is defined 288s registers an offense if no method is defined after the modifier 288s doesn't register an offense if the modifier is the same as outside the meta-class 288s registers an offense even if a non-singleton-class method is defined 288s outside a class 288s registers an offense if no method is defined 289s registers an offense if no method is defined after the modifier 289s doesn't register an offense if a method is defined 289s behaves like repeated visibility modifiers 289s registers an offense when `public` is repeated 289s behaves like method defined with define_method 289s doesn't register an offense if a proc is passed 289s doesn't register an offense if a -> is passed 289s doesn't register an offense if a block is passed 289s doesn't register an offense if a lambda is passed 289s behaves like unused visibility modifiers 289s registers an offense and corrects when visibility is immediately changed without any intervening defs 289s behaves like non-repeated visibility modifiers 289s doesn't register an offense when `private` is not repeated 289s doesn't register an offense when `protected` is not repeated 289s registers an offense and corrects even when `public` is not repeated 289s when multiple class definitions in file but only one has offense 289s registers an offense and corrects 289s behaves like def in new block 289s doesn't register an offense if a method is defined in Module.new 289s registers an offense if no method is defined in Module.new 289s behaves like methods defined in an iteration 289s doesn't register an offense for each 289s doesn't register an offense for map 289s behaves like method named by access modifier name 289s does not register an offense for `public` 289s behaves like method named by access modifier name 289s does not register an offense for `private` 289s behaves like nested modules 289s doesn't register an offense for nested classs 289s unused modifiers 289s registers an offense with a nested class 289s registers an offense when inside a nested class 289s registers an offense when outside a nested class 289s behaves like method defined with define_method 289s doesn't register an offense if a proc is passed 289s doesn't register an offense if a block is passed 289s doesn't register an offense if a -> is passed 289s doesn't register an offense if a lambda is passed 289s behaves like at the end of the body 289s registers an offense for trailing `public` 289s when only a constant or local variable is defined after the modifier 289s registers an offense and corrects 289s registers an offense and corrects 289s behaves like method defined using class_eval 289s registers an offense if no method is defined 289s doesn't register an offense if a method is defined 289s inside a class 289s registers an offense when a modifier is outside the block and a method is defined only inside the block 289s registers two offenses when a modifier is inside and outside the block and no method is defined 289s behaves like non-repeated visibility modifiers 289s doesn't register an offense when `private` is not repeated 289s registers an offense and corrects even when `public` is not repeated 289s doesn't register an offense when `protected` is not repeated 289s behaves like repeated visibility modifiers 289s registers an offense when `protected` is repeated 289s behaves like method defined using class_eval 289s doesn't register an offense if a method is defined 289s registers an offense if no method is defined 289s inside a class 289s registers an offense when a modifier is outside the block and a method is defined only inside the block 289s registers two offenses when a modifier is inside and outside the block and no method is defined 289s behaves like nested in a begin..end block 289s still flags repeated `public` 289s behaves like unused visibility modifiers 289s registers an offense and corrects when visibility is immediately changed without any intervening defs 289s when an access modifier has no effect 289s registers an offense and corrects 289s behaves like conditionally defined method 289s doesn't register an offense for unless 289s doesn't register an offense for if 289s when a def is an argument to a method call 289s does not register an offense 289s behaves like method defined using instance_eval 289s doesn't register an offense if a method is defined 289s registers an offense if no method is defined 289s inside a class 289s registers two offenses when a modifier is inside and outside the and no method is defined 289s registers an offense when a modifier is outside the block and a method is defined only inside the block 289s when an access modifier is followed by attr_* 289s does not register an offense 289s behaves like conditionally defined method 289s doesn't register an offense for if 289s doesn't register an offense for unless 289s behaves like method defined on a singleton class 289s inside a class 289s registers an offense even if a non-singleton-class method is defined 289s registers an offense if no method is defined 289s doesn't register an offense if the modifier is the same as outside the meta-class 289s doesn't register an offense if a method is defined 289s registers an offense if no method is defined after the modifier 289s outside a class 289s registers an offense if no method is defined after the modifier 289s registers an offense if no method is defined 289s doesn't register an offense if a method is defined 289s when there are consecutive access modifiers 289s registers an offense and corrects 289s behaves like method defined on a singleton class 289s inside a class 289s doesn't register an offense if a method is defined 289s registers an offense if no method is defined 289s doesn't register an offense if the modifier is the same as outside the meta-class 289s registers an offense even if a non-singleton-class method is defined 289s registers an offense if no method is defined after the modifier 289s outside a class 289s registers an offense if no method is defined 289s registers an offense if no method is defined after the modifier 289s doesn't register an offense if a method is defined 289s behaves like method defined using instance_eval 289s registers an offense if no method is defined 289s doesn't register an offense if a method is defined 289s inside a class 289s registers two offenses when a modifier is inside and outside the and no method is defined 289s registers an offense when a modifier is outside the block and a method is defined only inside the block 289s behaves like def in new block 289s doesn't register an offense if a method is defined in Module.new 289s registers an offense if no method is defined in Module.new 289s behaves like methods defined in an iteration 289s doesn't register an offense for map 289s doesn't register an offense for each 289s behaves like method named by access modifier name 289s does not register an offense for `public` 289s behaves like def in new block 289s doesn't register an offense if a method is defined in Class.new 289s registers an offense if no method is defined in Class.new 289s behaves like conditionally defined method 289s doesn't register an offense for if 289s doesn't register an offense for unless 289s behaves like def in new block 289s doesn't register an offense if a method is defined in Struct.new 289s registers an offense if no method is defined in Struct.new 289s behaves like repeated visibility modifiers 289s registers an offense when `private` is repeated 289s 289s RuboCop::Cop::Layout::ClassStructure 289s registers an offense and corrects when xstr heredoc constant is defined after public method 289s registers an offense and corrects when there is a comment in the macro method 289s registers an offense and corrects when literal constant is after method definitions 289s registers an offense and corrects when dstr heredoc constant is defined after public method 289s registers an offense and corrects when str heredoc constant is defined after public method 289s with protected methods declared before private 289s is expected to eq class MyClass 289s def public_method 289s end 289s 289s private 289s 289s def first_private...ar before `private_methods`. 289s end 289s 289s def second_protected_method 289s end 289s end 289s with attribute macros before after validations 289s is expected to eq class Person 289s include AnotherModule 289s extend SomeModule 289s 289s CustomError = Cla...rivate :other_public_method 289s 289s private 289s 289s def some_private_method 289s end 289s end 289s initializer is private and comes after attribute macro 289s registers an offense and autocorrects 289s simple example 289s is expected to eq "class Person\n include AnotherModule\n extend SomeModule\n CONST = 'wrong place'\nend\n" 289s when def modifier is used 289s registers an offense and corrects public method without modifier declared after private method with modifier 289s registers an offense and corrects public method with modifier declared after private method with modifier 289s registers an offense and corrects public method after private method marked by its name 289s when the first line ends with a comment 289s reports an offense and swaps the lines 289s with a complete ordered example 289s does not create offense 289s constant is not a literal 289s registers offense but does not autocorrect 289s 289s RuboCop::Cop::Lint::LiteralAsCondition 289s registers an offense for literal {} in until 289s registers an offense for literal :"#{a}" in while 289s registers an offense for literal 2.0 in while 289s accepts literal :sym in non-toplevel and/or 289s accepts literal :sym in a when of a case with something after case keyword 289s registers an offense for literal {} in post-loop while 289s accepts literal {} if it's not an and/or operand 289s registers an offense for literal 1 in post-loop until 289s registers an offense for literal [1] in while 289s registers an offense for literal [1] in case 289s registers an offense for literal :"#{a}" in if 289s accepts literal :"#{a}" in a when of a case with something after case keyword 289s registers an offense for literal :sym in complex cond 289s registers an offense for case with a primitive array condition 289s registers an offense for literal 1 in a when of a case without anything after case keyword 289s accepts `false` literal in `until` 289s registers an offense for literal :sym in while 289s registers an offense for literal 1 in && 289s registers an offense for literal {} in a when of a case without anything after case keyword 289s registers an offense for literal :sym in post-loop while 289s registers an offense for literal :"#{a}" in until 289s registers an offense for literal 1 in complex cond 289s registers an offense for `!:"#{a}"` 289s registers an offense for literal {} in complex cond 289s registers an offense for literal [1] in post-loop while 289s accepts array literal in case, if it has non-literal elements 289s registers an offense for literal [1] in complex cond 289s registers an offense for literal 1 in complex ! 289s registers an offense for literal :"#{a}" in ! 289s registers an offense for literal {} in complex ! 289s registers an offense for literal :sym in post-loop until 289s registers an offense for `not :"#{a}"` 289s registers an offense for literal [1] in a when of a case without anything after case keyword 289s accepts literal 1 if it's not an and/or operand 289s registers an offense for literal :"#{a}" in post-loop while 289s registers an offense for literal :"#{a}" in && 289s registers an offense for literal {} in case 289s registers an offense for literal 2.0 in complex cond 289s registers an offense for `!{}` 289s registers an offense for literal 1 in if 289s registers an offense for literal {} in post-loop until 289s registers an offense for literal [1] in until 289s accepts `true` literal in `while` 289s registers an offense for `not [1]` 289s registers an offense for `!:sym` 289s registers an offense for `not 1` 289s registers an offense for literal 1 in while 289s accepts literal 2.0 if it's not an and/or operand 289s registers an offense for `![1]` 289s registers an offense for literal 1 in post-loop while 289s registers an offense for literal :"#{a}" in a when of a case without anything after case keyword 289s accepts literal [1] in a when of a case with something after case keyword 289s registers an offense for literal :sym in && 289s registers an offense for literal :"#{a}" in case 289s registers an offense for literal :sym in until 289s registers an offense for literal :sym in complex ! 289s registers an offense for literal :"#{a}" in post-loop until 289s registers an offense for literal {} in while 289s registers an offense for literal 2.0 in complex ! 289s registers an offense for literal {} in ! 289s registers an offense for literal :sym in case 289s registers an offense for literal {} in if 289s registers an offense for literal {} in && 289s registers an offense for `not 2.0` 289s registers an offense for literal [1] in ! 289s accepts literal :"#{a}" if it's not an and/or operand 289s registers an offense for literal [1] in complex ! 289s accepts `false` literal in post-loop `until` 289s registers an offense for literal :sym in ! 289s registers an offense for literal [1] in post-loop until 289s accepts literal 2.0 in non-toplevel and/or 289s registers an offense for literal [1] in && 289s registers an offense for literal 1 in ! 289s registers an offense for literal :"#{a}" in complex ! 289s registers an offense for literal 2.0 in case 289s accepts literal 1 in a when of a case with something after case keyword 289s registers an offense for `!1` 289s accepts literal [1] in non-toplevel and/or 289s registers an offense for literal :sym in if 289s registers an offense for literal [1] in if 289s registers an offense for literal 2.0 in post-loop until 289s registers an offense for literal 2.0 in && 289s registers an offense for literal 1 in until 289s accepts literal [1] if it's not an and/or operand 289s accepts literal :"#{a}" in non-toplevel and/or 289s registers an offense for `!2.0` 289s accepts literal 1 in non-toplevel and/or 289s registers an offense for literal :"#{a}" in complex cond 289s registers an offense for `not {}` 289s registers an offense for `not :sym` 289s registers an offense for literal :sym in a when of a case without anything after case keyword 289s registers an offense for literal 2.0 in ! 289s accepts literal :sym if it's not an and/or operand 289s accepts array literal in case, if it has nested non-literal element 289s accepts literal {} in non-toplevel and/or 289s registers an offense for literal 2.0 in post-loop while 289s accepts literal 2.0 in a when of a case with something after case keyword 289s accepts `true` literal in post-loop `while` 289s registers an offense for literal 2.0 in if 289s accepts literal {} in a when of a case with something after case keyword 289s registers an offense for literal 1 in case 289s registers an offense for literal 2.0 in until 289s registers an offense for literal 2.0 in a when of a case without anything after case keyword 289s accepts dstr literal in case 289s >= Ruby 2.7 289s accepts an offense for literal :"#{a}" in case match with a match var 289s registers an offense for literal :"#{a}" in case match without a match var 289s accepts literal :"#{a}" in a when of a case match 289s >= Ruby 2.7 289s registers an offense for literal [1] in case match without a match var 289s accepts literal [1] in a when of a case match 289s accepts an offense for literal [1] in case match with a match var 289s >= Ruby 2.7 289s accepts literal 2.0 in a when of a case match 289s accepts an offense for literal 2.0 in case match with a match var 289s registers an offense for literal 2.0 in case match without a match var 289s >= Ruby 2.7 289s registers an offense for literal {} in case match without a match var 289s accepts literal {} in a when of a case match 289s accepts an offense for literal {} in case match with a match var 289s >= Ruby 2.7 289s accepts literal 1 in a when of a case match 289s registers an offense for literal 1 in case match without a match var 289s accepts an offense for literal 1 in case match with a match var 289s >= Ruby 2.7 289s registers an offense for literal :sym in case match without a match var 289s accepts literal :sym in a when of a case match 289s accepts an offense for literal :sym in case match with a match var 289s >= Ruby 2.7 289s accepts dstr literal in case match 289s registers an offense for case match with a primitive array condition 289s accepts an offense for case match with a match var 289s accepts array literal in case match, if it has nested non-literal element 289s accepts array literal in case match, if it has non-literal elements 289s 289s RuboCop::Cop::Style::SingleLineBlockParams 289s allows an unused parameter to have a leading underscore 289s reports an offense if the arguments names are wrong and not all arguments are given 289s does not report if the right names are used but not all arguments are given 289s reports an offense if the names are in reverse order 289s does not report when destructuring is used 289s does not report if no block arguments are present 289s finds incorrectly named parameters with leading underscores 289s reports an offense if the names are partially correct 289s finds wrong argument names in calls with different syntax 289s ignores :reduce symbols 289s allows calls with proper argument names 289s ignores do..end blocks 289s 289s RuboCop::Cop::Lint::AmbiguousRange 289s for an erange 289s registers an offense and corrects when not parenthesized 289s registers an offense and corrects when there are clauses on both sides 289s registers an offense and corrects when one side is parenthesized but the other is not 289s registers an offense and corrects when the entire range is parenthesized but contains complex boundaries 289s does not register an offense for `self` 289s does not register an offense if the range is composed of literals 289s can handle an endless range 289s does not register an offense if the range is parenthesized 289s does not register an offense for a constant 289s can handle a beginningless range 289s does not register an offense for a variable 289s method calls 289s with RequireParenthesesForMethodChains: false 289s does not register an offense for a chained method call with parens 289s does not register an offense for a chained method call without parens 289s behaves like common behavior 289s does not register an offense for a unary - 289s does not register an offense for a non-chained method call 289s requires parens when calling a method on a basic literal 289s does not register an offense for a unary + 289s with RequireParenthesesForMethodChains: true 289s registers an offense for a chained method call without parens 289s does not register an offense for a chained method call with parens 289s behaves like common behavior 289s requires parens when calling a method on a basic literal 289s does not register an offense for a unary + 289s does not register an offense for a unary - 289s does not register an offense for a non-chained method call 289s for an irange 289s does not register an offense for a constant 289s can handle a beginningless range 289s can handle an endless range 289s registers an offense and corrects when there are clauses on both sides 289s registers an offense and corrects when the entire range is parenthesized but contains complex boundaries 289s does not register an offense if the range is composed of literals 289s registers an offense and corrects when not parenthesized 289s does not register an offense if the range is parenthesized 289s does not register an offense for a variable 289s registers an offense and corrects when one side is parenthesized but the other is not 289s does not register an offense for `self` 289s method calls 289s with RequireParenthesesForMethodChains: false 289s does not register an offense for a chained method call with parens 289s does not register an offense for a chained method call without parens 289s behaves like common behavior 289s does not register an offense for a non-chained method call 289s does not register an offense for a unary - 289s does not register an offense for a unary + 289s requires parens when calling a method on a basic literal 289s with RequireParenthesesForMethodChains: true 289s does not register an offense for a chained method call with parens 289s registers an offense for a chained method call without parens 289s behaves like common behavior 289s does not register an offense for a unary + 289s does not register an offense for a non-chained method call 289s requires parens when calling a method on a basic literal 289s does not register an offense for a unary - 289s 289s RuboCop::Formatter::WorstOffendersFormatter 289s #finished 289s when there are many offenses 289s sorts by offense count first and then by cop name 289s 289s RuboCop::Cop::InternalAffairs::RedundantMessageArgument 289s does not register an offense when formatted `MSG` is passed 289s does not register an offense when `#message` with another node is passed 289s when `#message` with offending node is passed 289s when message is the only keyword argument 289s registers an offense 289s when there are others keyword arguments 289s registers an offense 289s when `MSG` is passed 289s registers an offense 289s when `#message` is passed 289s registers an offense 289s 289s RuboCop::Cop::Lint::TopLevelReturnWithArgument 289s Code segment with only top-level return statement 289s expects no offense from the return without arguments 289s expects offense from the return with arguments 289s expects multiple offenses from the return with arguments statements 289s Code segment containing semi-colon separated statements 289s expects an offense from the return with arguments and multi-line code 289s expects no offense from the return with arguments and multi-line code 289s Code segment with inline if along with top-level return 289s expects multiple offense from the return with arguments 289s expects no offense from the return without arguments 289s Code segment with block level returns other than the top-level return 289s expects offense from the return with arguments 289s expects no offense from the return without arguments 289s Code segment with method-level return statements 289s expects offense when method-level & top-level return co-exist 289s 289s RuboCop::Cop::Lint::EmptyFile 289s registers an offense when the file is empty 289s does not register an offense when the file contains code 290s does not register an offense when the file contains comments 290s when AllowComments is false 290s registers an offense when the file contains comments 290s 290s RuboCop::Cop::Style::DoubleCopDisableDirective 290s registers an offense for duplicate todo directives 290s does not register an offense for cops with single cop directive 290s registers an offense for duplicate disable directives 290s 290s RuboCop::Cop::InternalAffairs::EmptyLineBetweenExpectOffenseAndCorrection 290s does not register an offense when using empty line between `expect_offense` and `expect_correction` with heredoc argument 290s registers and corrects an offense when using no empty line between `expect_offense` and `expect_correction` with heredoc argument 290s does not register an offense when using only `expect_offense` 290s registers and corrects an offense when using no empty line between `expect_offense` and `expect_correction`with variable argument 290s registers and corrects an offense when using no empty line between `expect_offense` and `expect_no_corrections` 290s does not register an offense when using empty line between `expect_offense` and `expect_correction`with variable argument 290s does not register an offense when using empty line between `expect_offense` and `expect_no_corrections` 290s 290s RuboCop::Cop::Lint::Syntax 290s .offenses_from_processed_source 290s with a parser error 290s returns an offense 290s with --display-cop-names option 290s returns an offense with cop name 290s with a diagnostic error 290s returns an offense 290s with --display-cop-names option 290s returns an offense with cop name 290s with --autocorrect --disable-uncorrectable options 290s returns an offense 290s 290s RuboCop::Cop::VariableForce::VariableTable 290s #push_scope 290s returns pushed scope object 290s #find_variable 290s when current scope is not block 290s when a variable with the target name does not exist in current scope 290s but exists in the direct outer scope 290s returns nil 290s and does not exist in all outer scopes 290s returns nil 290s when a variable with the target name exists in current scope 290s and does not exist in outer scope 290s returns the current scope variable 290s and also exists in outer scope 290s returns the current scope variable 290s when current scope is block 290s when a variable with the target name does not exist in current scope 290s and does not exist in all outer scopes 290s returns nil 290s but exists in a indirect outer scope 290s when the direct outer scope is not block 290s returns nil 290s when the direct outer scope is block 290s returns the indirect outer scope variable 290s but exists in the direct outer scope 290s returns the direct outer scope variable 290s when a variable with the target name exists in current scope 290s and does not exist in outer scope 290s returns the current scope variable 290s and also exists in outer scope 290s returns the current scope variable 290s #accessible_variables 290s when the current scope has some variables 290s returns all the variables 290s when there are no variables 290s returns empty array 290s when the direct outer scope has some variables 290s and the current scope is block 290s returns the current and direct outer scope variables 290s and the current scope is not block 290s returns only the current scope variables 290s #current_scope_level 290s decreases by popping scope 290s increases by pushing scope 290s #pop_scope 290s returns popped scope object 290s #find_variable with an empty scope stack 290s returns nil 290s #declare_variable 290s adds variable to current scope with its name as key 290s returns the added variable 290s 290s RuboCop::Cop::Lint::NestedMethodDefinition 290s does not register offense for nested definition inside module_exec 290s does not register offense for nested definition inside class_exec 290s does not register offense for nested definition inside Struct.new 290s does not register offense for nested definition inside ::Module.new 290s does not register offense for nested definition inside class shovel 290s registers an offense for a nested singleton method definition 290s registers an offense for a nested class method definition 290s does not register offense for definition of method on local var 290s registers an offense for a nested method definition 290s does not register offense for nested definition inside instance_exec 290s does not register an offense for a lambda definition inside method 290s does not register offense for nested definition inside Class.new 290s does not register offense for nested definition inside ::Class.new 290s does not register offense for nested definition inside Module.new 290s does not register offense for nested definition inside class_eval 290s does not register offense for nested definition inside ::Struct.new 290s registers an offense for a nested method definition inside lambda 290s does not register offense for nested definition inside instance_eval 290s does not register offense for nested definition inside module_eval 290s when `AllowedPatterns: [baz]` 290s registers offense for nested definition inside `do_qux` 290s does not register offense for nested definition inside `do_baz` 290s when `AllowedMethods: [has_many]` 290s registers offense for nested definition inside `denied_method` 290s does not register offense for nested definition inside `has_many` 290s 290s RuboCop::ConfigStore 290s .for 290s always uses config specified in command line 290s when no config specified in command line 290s searches for config path if not available in cache 290s gets config path and config from cache if available 290s when --force-default-config option is specified 290s uses default config without searching for config path 290s 290s RuboCop::Cop::Style::AsciiComments 290s accepts comments with only ascii chars 290s registers an offense for a comment with non-ascii chars 290s registers an offense for comments with mixed chars 290s when certain non-ascii chars are allowed 290s accepts comment with allowed non-ascii chars 290s registers an offense for comments with non-allowed non-ascii chars 290s 290s RuboCop::Cop::Style::DocumentDynamicEvalDefinition 290s registers an offense when using eval-type method with string interpolation without comment docs 290s does not register an offense when using eval-type method without string interpolation 290s registers an offense when using eval-type method with interpolated string that is not heredoc without comment doc 290s does not register an offense when using eval-type method with string interpolation with comment docs 290s does not register an offense when using eval-type method with interpolated string that is not heredoc with comment doc 290s block comment outside heredoc 290s does not register an offense when using multiple methods 290s does not register an offense for a matching block comment before the heredoc 290s does not register an offense for a matching block comment after the heredoc 290s registers an offense if the comment does not match the method 290s does not register an offense when using inline comments 290s does not register an offense when using other text 290s block comment in heredoc 290s registers an offense if the comment does not match the method 290s does not register an offense when using other text 290s does not register an offense when using multiple methods 290s does not evaluate comments if there is no interpolation 290s does not register an offense when using inline comments 290s does not register an offense when using multiple methods with split comments 290s does not register an offense for a matching block comment 290s 290s RuboCop::Cop::Style::TopLevelMethodDefinition 290s does not register an offense when just called method on top-level 290s does not register an offense when defined within arbitrary block 290s registers an offense top-level class methods 290s does not register an offense when define_method is not top-level 290s registers an offense when defining a top-level method after a class definition 290s does not register an offense when using Struct 290s does not register an offense when using module 290s registers an offense top-level methods 290s does not register an offense when using class 290s top-level define_method 290s registers offense for multi-line block 290s registers offense for proc argument 290s registers offense with inline block 290s Ruby >= 2.7 290s registers offense with inline numblock 290s 290s RuboCop::Formatter::ProgressFormatter 290s #file_finished 290s when no offenses are detected 290s calls #report_as_with_mark 290s when any offenses are detected 290s calls #report_as_with_mark 290s #finished 290s calls #report_summary 290s when any offenses are detected 290s reports all detected offenses for all failed files 290s when no offenses are detected 290s does not report offenses 290s #report_file_as_mark 290s when a refactor convention offense is detected 290s prints "C" 290s when no offenses are detected 290s prints "." 290s when different severity offenses are detected 290s prints highest level mark 290s when a refactor severity offense is detected 290s prints "R" 290s 290s RuboCop::Cop::Style::Strip 290s registers an offense for str.lstrip.rstrip 290s registers an offense for str.rstrip.lstrip 290s 290s RuboCop::Cop::Lint::RedundantCopEnableDirective 290s registers offense and corrects redundant enabling of same cop 290s registers offense and corrects unnecessary enable 290s registers correct offense when combined with necessary enable, no white-space after comma 290s registers an offense and corrects when the first cop is unnecessarily enabled 290s registers correct offense when combined with necessary enable 290s registers multiple offenses and corrects the same comment 290s when last cop is unnecessarily enabled 290s registers an offense and corrects when there is no space between the cops and the comma 290s registers an offense and corrects 290s when middle cop is unnecessarily enabled 290s registers an offense and corrects 290s registers an offense and corrects when there is extra white space 290s when all department enabled 290s registers multiple offenses and corrects the same comment 290s registers offense and corrects redundant enabling of department of same cop 290s registers offense and corrects redundant enabling of same department 290s registers an offense and corrects when the first department is unnecessarily enabled 290s registers offense and corrects unnecessary enable 290s registers offense and corrects redundant enabling of cop of same department 290s registers correct offense when combined with necessary enable 290s when all cops are unnecessarily enabled 290s on the same line 290s registers an offense and corrects 290s on separate lines 290s registers an offense and corrects when there is extra white space 290s all switch 290s registers offense and corrects unnecessary enable all 290s when at least one cop was disabled 290s does not register offense 290s when cop is disabled in the configuration 290s registers no offense when enabling the cop 290s registers an offense if enabling it twice 290s 290s RuboCop::Cop::Util 290s #same_line? 290s returns false when two nodes are not on the same line 290s returns true when two nodes are on the same line 290s returns false if an argument is not a node or range 290s can use ranges 290s #line_range 290s returns line range of the expression 290s #to_supported_styles 290s when EnforcedStyleInsidePipes 290s is expected to eq "SupportedStylesInsidePipes" 290s when EnforcedStyle 290s is expected to eq "SupportedStyles" 290s 290s RuboCop::Cop::Style::ClassMethods 290s registers an offense for methods using a module name 290s does not register an offense for methods using self 290s does not register an offense for other top-level singleton methods 290s registers an offense for methods using a class name 290s does not register an offense outside class/module bodies 290s 290s RuboCop::Cop::Layout::ParameterAlignment 290s aligned with first parameter 290s accepts proper indentation 290s registers an offense and corrects parameters with single indent 290s accepts a method definition without parameters 290s registers an offense and corrects alignment in simple case 290s doesn't get confused by splat 290s registers an offense and corrects parameters with double indent 290s accepts the first parameter being on a new row 290s accepts parameter lists on a single line 290s defining self.method 290s accepts proper indentation 290s registers an offense and corrects parameters with single indent 290s aligned with fixed indentation 290s accepts a method definition without parameters 290s registers an offense and corrects parameters aligned to first param 290s registers an offense and corrects parameters with double indent 290s accepts parameter lists on a single line 290s accepts proper indentation 290s accepts the first parameter being on a new row 290s doesn't get confused by splat 290s defining self.method 290s accepts proper indentation 290s registers an offense and corrects parameters aligned to first param 290s 290s RuboCop::Cop::Naming::ClassAndModuleCamelCase 290s is not fooled by qualified names 290s accepts CamelCase names 290s registers an offense for underscore in class and module name 290s allows module_parent method 290s custom allowed names 290s does not register offense for multiple allowed names 290s 290s RuboCop::Cop::Layout::HashAlignment 290s register no offense for yield without args 290s accepts pairs that don't start a line 290s register no offense for superclass call without args 290s accepts single line hash 290s accepts several pairs per line 290s always ignore last argument hash 290s accepts misaligned keys in explicit hash for yield 290s accepts misaligned keys in explicit hash 290s accepts misaligned keys in explicit hash for super 290s accepts misaligned keys in implicit hash for yield 290s accepts misaligned keys in implicit hash 290s accepts misaligned keys in implicit hash for super 290s with table+separator alignment configuration 290s accepts a single method argument entry with colon 290s with `EnforcedHashRocketStyle`: `table` 290s and a misaligned double splat argument 290s registers an offense and corrects 290s and a double splat argument after a hash key 290s registers an offense on the misaligned key and corrects 290s when the only item is a kwsplat 290s does not register an offense 290s and misaligned keys 290s registers an offense and corrects 290s and aligned keys but a double splat argument after 290s does not register an offense on the `kwsplat` 290s ignore implicit last argument hash 290s registers an offense and corrects misaligned keys in explicit hash for super 290s accepts misaligned keys in implicit hash 290s accepts misaligned keys in implicit hash for yield 290s registers an offense and corrects misaligned keys in explicit hash 290s registers an offense and corrects misaligned keys in explicit hash for yield 290s accepts misaligned keys in implicit hash for super 290s with separator alignment configuration 290s accepts pairs that don't start a line 290s registers an offense and corrects misaligned hash rockets 290s accepts hashes with different separators 290s accepts several pairs per line 290s registers an offense and corrects mixed indentation and spacing 290s accepts an empty hash 290s doesn't break code by moving long keys too far left 290s registers an offense and corrects misaligned hash values 290s accepts single line hash 290s accepts aligned hash keys 290s when using hash value omission 290s registers an offense and corrects mixed indentation and spacing 290s accepts aligned hash keys 290s when using hash value omission 290s accepts pairs that don't start a line 290s accepts single line hash 290s accepts several pairs per line 290s when `EnforcedStyle: with_fixed_indentation` of `ArgumentAlignment` 290s does not register an offense using aligned hash literal 290s registers and corrects an offense when using misaligned keyword arguments 290s does not register an offense using aligned hash argument for `proc.()` 290s register and corrects an offense 290s does not register an offense for an empty hash literal 290s when using hash value omission 290s register and corrects an offense 290s does not register and corrects an offense when using aligned keyword arguments 290s always inspect last argument hash 290s registers an offense and corrects misaligned keys in explicit hash for super 290s registers offense and corrects misaligned keys in implicit hash 290s registers offense and corrects misaligned keys in explicit hash 290s registers an offense and corrects misaligned keys in implicit hash for yield 290s registers an offense and corrects misaligned keys in explicit hash for yield 290s registers an offense and corrects misaligned keys in implicit hash for super 290s when using hash value omission 290s registers offense and corrects misaligned keys in implicit hash 290s registers offense and corrects misaligned keys in explicit hash 290s ignore explicit last argument hash 290s registers an offense and corrects misaligned keys in implicit hash for super 290s accepts misaligned keys in explicit hash for yield 290s registers an offense and corrects misaligned keys in implicit hash 290s accepts misaligned keys in explicit hash for super 290s registers an offense and corrects misaligned keys in implicit hash for yield 290s accepts misaligned keys in explicit hash 290s when using hash value omission 290s accepts misaligned keys in explicit hash 290s registers an offense and corrects misaligned keys in implicit hash 290s with invalid configuration 290s fails 290s with different settings for => and : 290s accepts aligned entries 290s registers offenses and correct misaligned entries 290s with multiple preferred(key and table) alignment configuration 290s registers an offense and corrects misaligned hash values, prefer key when least offenses 290s registers an offense and corrects misaligned hash values 290s accepts aligned hash keys, by keys 290s accepts aligned hash keys, by table 290s accepts an empty hash 290s registers an offense and corrects misaligned hash values, works separate for each hash 290s accepts aligned hash keys, by both 290s registers an offense and corrects misaligned hash values, prefer table when least offenses 290s accepts aligned hash keys with mixed hash style 290s registers an offense and corrects misaligned hash keys with mixed hash style 290s table and key config 290s registers an offense and corrects misaligned hash values, prefer table because it is specified first 290s with table alignment configuration 290s accepts single line hash 290s accepts a symbol only hash followed by a keyword splat 290s registers an offense and corrects for misaligned hash keys 290s accepts aligned hash keys and values 290s accepts pairs that don't start a line 290s registers an offense for misaligned hash values 290s accepts an empty hash 290s accepts a keyword splat only hash 290s accepts several pairs per line 290s registers an offense and corrects misaligned hash rockets 290s accepts a multiline array of single line hashes 290s accepts hashes that use different separators 290s accepts hashes that use different separators and double splats 290s when using hash value omission 290s accepts aligned hash keys and values 290s when using hash value omission 290s accepts single line hash 290s accepts several pairs per line 290s accepts pairs that don't start a line 290s with `EnforcedColonStyle`: `table` 290s and misaligned keys 290s registers an offense and corrects 290s when using hash value omission 290s and aligned keys 290s does not register an offense and corrects 290s and aligned keys but a double splat argument after 290s does not register an offense on the `kwsplat` 290s when the only item is a kwsplat 290s does not register an offense 290s and a misaligned double splat argument 290s registers an offense and corrects 290s and a double splat argument after a hash key 290s registers an offense on the misaligned key and corrects 290s when using hash value omission 290s accepts pairs that don't start a line 290s accepts several pairs per line 290s accepts single line hash 290s with default configuration 290s registers an offense and corrects misaligned hash keys 290s registers an offense and corrects alignment when using double splat in an explicit hash 290s registers an offense and corrects alignment when using double splat in braces 290s registers an offense and corrects mixed hash styles 290s registers an offense and corrects table alignment 290s does not register an offense when value starts on next line 290s registers an offense and corrects misaligned mixed multiline hash keys 290s registers an offense and corrects multiline value starts in wrong place 290s registers an offense and corrects separator alignment 290s accepts left-aligned hash keys with single spaces 290s registers an offense and corrects zero or multiple spaces 290s with implicit hash as last argument 290s accepts aligned hash keys 290s accepts an empty hash 290s registers an offense and corrects misaligned hash keys 290s registers an offense and corrects right alignment of keys 290s 290s RuboCop::Cop::Style::IdenticalConditionalBranches 290s on if..else with identical bodies and assigning to a variable used in `if` condition 290s doesn't register an offense 290s on if..else with identical bodies 290s registers and corrects an offense 290s on if..else with identical trailing lines 290s registers and corrects an offense 290s with a ternary 290s registers an offense 290s with empty brace 290s does not raise any error 290s when one of the case branches is empty 290s does not register an offense 290s on case with identical trailing lines 290s registers and corrects an offense 290s on if..else with identical leading lines 291s registers and corrects an offense 291s on if..elsif with no else 291s doesn't register an offense 291s on case..when with identical bodies and assigning to a variable used in `case` condition 291s doesn't register an offense 291s when using pattern matching 291s on case-match with empty when 291s doesn't register an offense 291s on case-match without else 291s doesn't register an offense 291s on case-match with identical leading lines 291s registers and corrects an offense 291s on case-match with identical bodies 291s registers an offense and corrects 291s on case..in with identical bodies and assigning to a variable used in `case` condition 291s doesn't register an offense 291s on case-match with identical trailing lines 291s registers and corrects an offense 291s when one of the case-match branches is empty 291s does not register an offense 291s on if..else with slightly different trailing lines 291s doesn't register an offense 291s on case with identical bodies 291s registers an offense and corrects 291s on case with empty when 291s doesn't register an offense 291s on case without else 291s doesn't register an offense 291s on case with identical leading lines 291s registers and corrects an offense 291s 291s RuboCop::Cop::Lint::EmptyWhen 291s when `AllowComments: false` 291s registers an offense for empty when body with a comment 291s when a `when` body is missing 291s registers an offense for missing when ... then body 291s registers an offense for a missing when body 291s registers an offense when case line has no expression 291s registers an offense for missing when body followed by else 291s registers an offense for missing when body with a comment 291s registers an offense for missing when body with a comment followed by else 291s registers an offense for missing when ... then body followed by else 291s when a `when` body is present 291s accepts with no case line expression 291s accepts case with when ... then statements 291s accepts case with when bodies and else clause 291s accepts case with when bodies 291s accepts case with when ... then statements and else clause 291s when `AllowComments: true` 291s registers an offense for missing when body without a comment 291s accepts an empty when body with a comment 291s accepts an empty when ... then body with a comment 291s 291s RuboCop::Cop::InternalAffairs::NodeMatcherDirective 291s autocorrects with the right arguments if the pattern references a non-contiguous argument 291s does not register an offense if the node matcher already has a directive 291s registers an offense if the matcher does not have a directive 291s inserts a blank line between multiple multi-line pattern matchers 291s inserts a blank line between multiple multi-line pattern matchers 291s does not register an offense if called with a dynamic method name 291s registers an offense if the matcher does not have a directive and a method call is used for a pattern argument 291s autocorrects with the right arguments if the pattern includes arguments 291s autocorrects with the right arguments if the pattern references a non-contiguous argument 291s registers an offense if the directive name does not match the actual name 291s registers an offense if the matcher has multiple directives 291s does not register an offense if the directive is in a comment block 291s registers an offense if the matcher does not have a directive and a method call is used for a pattern argument 291s does not register an offense if the node matcher already has a directive 291s registers an offense if the matcher does not have a directive 291s does not insert a blank line if one already exists 291s autocorrects with the right arguments if the pattern includes arguments 291s retains indentation properly when inserting 291s registers an offense if the matcher does not have a directive but has preceding comments 291s retains indentation properly when inserting 291s registers an offense if the matcher does not have a directive but has preceding comments 291s does not register an offense if called with a dynamic method name 291s does not insert a blank line if one already exists 291s retains indentation properly when correcting 291s does not register an offense if the directive is in a comment block 291s inserts a blank line between multiple pattern matchers 291s retains indentation properly when correcting 291s registers an offense if the directive name does not match the actual name 291s inserts a blank line between multiple pattern matchers 291s registers an offense if the matcher has multiple directives 291s 291s RuboCop::Cop::Style::AndOr 291s when style is always 291s also warns on while (or) 291s autocorrects "and" with && in method calls (3) 291s autocorrects "and" with && and doesn't add extra parentheses 291s autocorrects "and" inside def 291s also warns on until (or) 291s autocorrects "or" with || in method calls 291s also warns on non short-circuit (or) 291s warns on short-circuit (and) 291s autocorrects "or" with || in method calls (4) 291s autocorrects "or" with || in method calls (2) 291s autocorrects "or" with an assignment on the left 291s also warns on while (and) 291s also warns on non short-circuit (and) (unless) 291s also warns on non short-circuit (or) (unless) 291s autocorrects "and" with && in method calls 291s also warns on until (and) 291s autocorrects "and" with && in method calls (2) 291s autocorrects "and" with && and adds parentheses to expr 291s autocorrects "or" with an assignment on the right 291s autocorrects "or" with || and adds parentheses to expr 291s registers an offense for "or" 291s autocorrects "and" with && in method calls (4) 291s autocorrects "or" with || and doesn't add extra parentheses 291s autocorrects "and" with an Enumerable accessor on either side 291s autocorrects "or" with || in method calls (3) 291s autocorrects "or" inside def 291s warns on short-circuit (or) 291s registers an offense for "and" 291s also warns on non short-circuit (and) 291s when `and` precedes `or` 291s registers an offense and corrects 291s when `or` precedes `and` 291s registers an offense and corrects 291s within a nested begin node with one child only 291s autocorrects "and" with && and adds parens 291s with obj.method= arg on left 291s autocorrects "and" with && and adds parens 291s with a file which contains __FILE__ 291s autocorrects "or" with || 291s with !obj.method arg on right 291s autocorrects "and" with && and adds parens 291s when `and` precedes `||` 291s registers an offense and corrects 291s within a nested begin node 291s autocorrects "and" with && and adds parens 291s with one predicate method without space on right and another method 291s autocorrects "and" with && and adds parens 291s autocorrects "or" with || and adds parens 291s with `not` expression on left 291s autocorrects "and" with && and adds parens 291s when left hand side is a comparison method 291s autocorrects "and" with && and adds parens 291s with predicate method with arg without space on right 291s autocorrects "or" with || and adds parens 291s autocorrects "and" with && and adds parens 291s with `not` expression on right 291s autocorrects "and" with && and adds parens 291s with two predicate methods with args without spaces on right 291s autocorrects "or" with || and adds parens 291s autocorrects "and" with && and adds parens 291s with obj.method = arg on left 291s autocorrects "and" with && and adds parens 291s when `or` precedes `&&` 291s registers an offense and corrects 291s with !obj.method arg on left 291s autocorrects "and" with && and adds parens 291s with !variable on left 291s doesn't crash and burn 291s when style is conditionals 291s accepts && inside of conditional 291s registers an offense for "and" in if condition 291s registers an offense for "or" in until condition 291s accepts "and" in if body 291s accepts "or" in until body 291s registers an offense for "or" in post-while condition 291s registers an offense for "and" in until condition 291s accepts "or" in post-while body 291s registers an offense for "and" in post-until condition 291s accepts "and" in post-while body 291s accepts "or" outside of conditional 291s registers an offense for "or" in if condition 291s accepts "or" in post-until body 291s registers an offense for "and" in while condition 291s registers an offense for "or" in post-until condition 291s accepts "and" in while body 291s accepts && outside of conditional 291s accepts "or" in if body 291s accepts || outside of conditional 291s accepts "and" outside of conditional 291s registers an offense for "or" in while condition 291s accepts || inside of conditional 291s registers an offense for "and" in post-while condition 291s accepts "or" in while body 291s accepts "and" in until body 291s accepts "and" in post-until body 291s 291s RuboCop::Cop::Layout::SpaceBeforeComment 291s accepts an EOL comment with a preceding space 291s registers an offense and corrects missing space before an EOL comment 291s accepts a doc comment 291s registers an offense and corrects after a heredoc 291s accepts a comment that begins a line 291s 291s RuboCop::Cop::InternalAffairs::UselessRestrictOnSend 291s does not register an offense when using `RESTRICT_ON_SEND` and defines `on_send` with alias 291s registers an offense when using `RESTRICT_ON_SEND` and not defines send callback method 291s does not register an offense when using `RESTRICT_ON_SEND` and defines `on_send` 291s does not register an offense when using `RESTRICT_ON_SEND` and defines `after_send` 291s does not register an offense when using `RESTRICT_ON_SEND` and defines `on_send` with alias_method 291s does not register an offense when using `RESTRICT_ON_SEND` and defines `after_send` with alias_method 291s does not register an offense when using `RESTRICT_ON_SEND` and defines `after_send` with alias 291s 291s RuboCop::Cop::Lint::UnusedMethodArgument 291s when IgnoreNotImplementedMethods config parameter is set 291s accepts a method with a single unused parameter & raises NotImplementedError 291s accepts a method with a single unused parameter & raises ::NotImplementedError 291s accepts an empty method with multiple unused parameters 291s accepts a method with a single unused parameter & fails with message 291s registers an offense for a non-empty method with multiple unused parameters 291s accepts a method with a single unused parameter & fails without message 291s registers an offense for a non-empty method with a single unused parameter 291s accepts an empty singleton method with a single unused parameter &raise NotImplementedError 291s accepts a method with a single unused parameter & raises NotImplementedError, message 291s when IgnoreEmptyMethods config parameter is set 291s accepts an empty method with a single unused parameter 291s registers an offense for a non-empty method with multiple unused parameters 291s registers an offense for a non-empty method with a single unused parameter 291s accepts an empty method with multiple unused parameters 291s accepts an empty singleton method with a single unused parameter 291s inspection 291s when a splat argument is unused 291s registers an offense and preserves the splat 291s in a method calling `super` with arguments 291s when a method argument is unused 291s registers an offense 291s when a method takes multiple arguments 291s and all the arguments are unused 291s registers offenses and suggests the use of `*` and autocorrects to add underscore-prefix to all arguments 291s and an argument is unused 291s registers an offense and adds underscore-prefix 291s and there is some whitespace around the unused argument 291s registers an offense and preserves whitespace 291s and one argument is assigned to another, whilst other's value is not used 291s registers an offense 291s and arguments are swap-assigned 291s accepts 291s when a method argument is used 291s accepts 291s when an argument with a default value is unused 291s registers an offense and preserves the default value 291s when a singleton method argument is unused 291s registers an offense 291s when an underscore-prefixed method argument is unused 291s accepts 291s when a trailing block argument is unused 291s registers an offense and removes the unused block arg 291s in a method calling `binding` without arguments 291s accepts all arguments 291s inside another method definition 291s registers offenses 291s when a block argument is unused 291s does not care 291s when a required keyword argument is unused 291s when a required keyword argument is unused 291s registers an offense but does not suggest underscore-prefix 291s when an optional keyword argument is unused 291s registers an offense but does not suggest underscore-prefix 291s and AllowUnusedKeywordArguments set 291s does not care 291s in a method calling `super` without arguments 291s when a method argument is not used explicitly 291s accepts since the arguments are guaranteed to be the same as superclass' ones and the user has no control on them 291s in a method calling `binding` with arguments 291s when a method argument is unused 291s registers an offense 291s when a variable is unused 291s does not care 291s 291s RuboCop::Cop::Style::HashAsLastArrayItem 291s when EnforcedStyle is no_braces 291s registers an offense and corrects when hash with braces 291s does not register an offense when hash is not the last element 291s does not register an offense when the array is all hashes 291s registers an offense and corrects when hash with braces and trailing comma 291s does not register an offense when hash without braces 291s registers an offense and corrects when hash with braces and trailing comma and new line 291s does not register an offense when hash is not inside array 291s does not register an offense when the hash is empty 291s does not register an offense when passing an implicit array to a setter 291s when EnforcedStyle is braces 291s registers an offense and corrects when hash without braces 291s does not register an offense when using double splat operator 291s does not register an offense when hash with braces 291s does not register an offense when the array is all hashes 291s does not register an offense when the hash is empty 291s does not register an offense when hash is not inside array 291s 291s RuboCop::Cop::Layout::MultilineMethodCallBraceLayout 291s ignores calls with an empty brace 291s ignores calls without arguments 291s ignores calls with a multiline empty brace 291s ignores implicit calls 291s ignores single-line calls 291s when EnforcedStyle is new_line 291s ignores single-line calls with multi-line receiver with leading dot 291s still ignores single-line calls 291s ignores single-line calls with multi-line receiver 291s when comment present before closing brace 291s corrects closing brace without crashing 291s behaves like multiline literal brace layout 291s new_line style 291s opening brace on same line as first element 291s allows closing brace on different line from multi-line element 291s detects closing brace on same line as last multiline element 291s allows closing brace on different line from last element 291s autocorrects closing brace on same line as last element 291s opening brace on separate line from first element 291s allows closing brace on separate line from last element 291s detects closing brace on same line as last element 291s allows closing brace on separate line from last multiline element 291s symmetrical style 291s opening brace on same line as first element 291s detects closing brace on different line from last element 291s autocorrects closing brace on different line from last element 291s allows closing brace on same line as last multiline element 291s allows closing brace on same line as last element 291s with a chained call on the closing brace 291s and a comment after the last element 291s detects closing brace on separate line from last elementbut does not autocorrect the closing brace 291s but no comment after the last element 291s autocorrects the closing brace 291s opening brace on separate line from first element 291s allows closing brace on separate line from last element 291s allows closing brace on separate line from last multiline element 291s detects closing brace on same line as last element 291s heredoc 291s ignores heredocs that could share a last line 291s detects heredoc structures that are safe to add to 291s same_line style 291s opening brace on separate line from first element 291s allows closing brace on same line as last multiline element 291s detects closing brace on different line from last element 291s allows closing brace on same line as last element 291s opening brace on same line as first element 291s allows closing brace on same line from last element 291s allows closing brace on same line as multi-line element 291s detects closing brace on different line from multiline element 291s autocorrects closing brace on different line as last element 291s with a chained call on the closing brace 291s and a comment after the last element 291s detects closing brace on separate line from last elementbut does not autocorrect the closing brace 291s but no comment after the last element 291s autocorrects the closing brace 291s behaves like multiline literal brace layout trailing comma 291s symmetrical style 291s opening brace on same line as first element 291s last element has a trailing comma 291s autocorrects closing brace on different line from last element 291s same_line style 291s opening brace on same line as first element 291s last element has a trailing comma 291s autocorrects closing brace on different line as last element 291s 291s RuboCop::Cop::Lint::FormatParameterMismatch 291s does not register an offense when arguments and fields match 291s registers an offense when calling Kernel.format and the fields do not match 291s does not register an offense when using named parameters with escaped `%` 291s registers an offense when there are less arguments than expected 291s accepts an extra argument for dynamic width 291s ignores percent right next to format string 291s does not register an offense for sprintf with splat argument 291s finds faults even when the string looks like a HEREDOC 291s correctly parses different sprintf formats 291s registers an offense when there are more arguments than expected 291s correctly ignores double percent 291s does not register offense for `String#%` when arguments, fields match 291s registers an offense when calling Kernel.sprintf and the fields do not match 291s registers an offense if extra argument for dynamic width not given 291s does not register an offense for format with splat argument 291s does not register an offense argument is the result of a message send 291s constants do not register offenses 291s identifies correctly digits for spacing in format 291s does not register an offense when single argument is a hash 291s accepts an extra arg for dynamic width with other preceding flags 291s does not register an offense when using named parameters 291s does not register an offense when single argument is not an array 291s registers offense with sprintf 291s registers an offense for String#% 291s behaves like variables 291s does not register an offense for format called on a variable 291s does not register an offense for format called on a variable 291s does not register an offense for % called on a variable 291s when using (digit)$ flag 291s does not register an offense 291s registers an offense when mismatch between the maximum value specified by (digit)$ flag and the number of arguments 291s does not register an offense when match between the maximum value specified by (digit)$ flag and the number of arguments 291s with wildcard 291s does not register an offense for width 291s does not register an offense for width and precision 291s does not register an offense for precision 291s does not register an offense for multiple wildcards 291s on format with %{} interpolations 291s and 1 argument 291s does not register an offense 291s and multiple arguments 291s registers an offense 291s behaves like variables 291s does not register an offense for format called on a variable 291s does not register an offense for % called on a variable 291s does not register an offense for format called on a variable 291s when format is invalid 291s registers an offense 291s when splat argument is present 291s does not register an offense when args count is less than expected 291s when args count is more than expected 291s does not register an offense for `#sprintf` 291s registers an offense for `#%` 291s does not register an offense for `#format` 291s when argument itself contains format characters and formats in format string and argument are not equal 291s ignores argument formatting 291s when passed an empty array 291s does not register an offense 291s when multiple arguments are called for 291s and a single send node is passed 291s does not register an offense 291s and a single variable argument is passed 291s does not register an offense 291s when format is not a string literal 291s does not register an offense 291s behaves like variables 291s does not register an offense for format called on a variable 291s does not register an offense for % called on a variable 291s does not register an offense for format called on a variable 291s behaves like variables 291s does not register an offense for format called on a variable 291s does not register an offense for % called on a variable 291s does not register an offense for format called on a variable 291s on format with %<> interpolations 291s and multiple arguments 291s registers an offense 291s and 1 argument 291s does not register an offense 291s behaves like variables 291s does not register an offense for format called on a variable 291s does not register an offense for % called on a variable 292s does not register an offense for format called on a variable 292s 292s RuboCop::Formatter::AutoGenConfigFormatter 292s #finished 292s calls #report_summary 292s when any offenses are detected 292s outputs report summary 292s does not report offenses 292s when no offenses are detected 292s does not report offenses 292s #report_file_as_mark 292s when no offenses are detected 292s prints "." 292s when a refactor severity offense is detected 292s prints "R" 292s when a refactor convention offense is detected 292s prints "C" 292s when different severity offenses are detected 292s prints highest level mark 292s 292s RuboCop::Cop::Lint::IneffectiveAccessModifier 292s when a `class << self` block is used 292s doesn't register an offense 292s when there is `begin` before a method definition 292s does not register an offense 292s when there is an intervening instance method 292s still registers an offense 292s when `private_class_method` is used 292s when `private_class_method` does not contain the method 292s registers an offense 292s when `private_class_method` contains all private method names 292s doesn't register an offense 292s when `private` is applied to a class method 292s registers an offense 292s when `protected` is applied to a class method 292s registers an offense 292s when no access modifier is used 292s doesn't register an offense 292s 292s RuboCop::Cop::Lint::ToEnumArguments 292s registers an offense when optional arg is missing 292s registers an offense when required keyword arg is missing 292s does not register an offense when method call has a receiver other than `self` 292s registers an offense when enumerator is created for another method 292s ignores the block argument 292s registers an offense when required arg is missing 292s registers an offense when optional keyword arg is missing 292s registers an offense when arguments are swapped 292s registers an offense when method is called on `self` 292s does not register an offense when not inside method definition 292s registers an offense when splat arg is missing 292s registers an offense when splat keyword arg is missing 292s does not register an offense when enumerator is created with `__callee__` and the correct arguments 292s registers an offense when other values are passed for keyword arguments 292s does not register an offense when enumerator is created with `:m` and the correct arguments 292s does not register an offense when enumerator is created with `__method__` and the correct arguments 292s registers an offense when enumerator is created for `__method__` with missing arguments 292s arguments forwarding 292s does not register an offense when enumerator is created with the correct arguments 292s registers an offense when enumerator is created with non matching arguments 292s 292s RuboCop::Formatter::MarkdownFormatter 292s outputs the result in Markdown 292s outputs the cached result in Markdown 292s 292s RuboCop::Cop::Style::RedundantCondition 292s when regular condition (if) 292s accepts different when the condition does not match the branch 292s accepts elsif 292s when condition and if_branch are same 292s registers an offense and corrects multiline nodes 292s does not register an offense when using assignment by hash key access 292s does not register an offense when the branches are the same with different receivers 292s does not register offenses when the branches contains hash key access 292s registers an offense and corrects when defined inside method and the branches contains assignment 292s registers an offense and corrects when `raise` without argument parentheses in `else` 292s registers an offense and corrects complex one liners 292s registers an offense and corrects when using operator method in `else` 292s accepts an elsif branch 292s registers an offense and corrects when the branches contains parenthesized method call 292s registers an offense and corrects when the branches contains method call 292s registers an offense and corrects modifier nodes offense 292s accepts when using ternary if in `else` branch 292s registers an offense and corrects when the branches contains method call with braced hash 292s does not register offenses when the branches contains assignment but target not matched 292s does not register offenses when using `nil?` and the branches contains assignment 292s registers an offense and corrects when the branches contains arithmetic operation 292s registers an offense and corrects when the else branch contains an irange 292s registers an offense and corrects when the branches contains assignment 292s registers an offense and correct when the branches are the same with the same receivers 292s registers an offense and corrects when a method without argument parentheses in `else` 292s registers an offense and corrects when the branches contains method call with non-braced hash 292s registers an offense and corrects 292s autocorrects when using `<<` method higher precedence than `||` operator 292s registers an offense and corrects when `if` condition and `then` branch are the same and it has no `else` branch 292s does not register offenses when using `nil?` and the branches contains method which has multiple arguments 292s registers an offense and corrects when using modifier if 292s registers an offense and corrects when the branches contains assignment method 292s accepts complex else branches 292s when inverted condition (unless) 292s registers no offense 292s when condition and else branch are same 292s registers an offense 292s accepts complex unless branches 292s ternary expression (?:) 292s accepts expressions when the condition and if branch do not match 292s when condition and if_branch are same 293s registers an offense and corrects class vars 293s registers an offense and corrects when the else branch contains an erange 293s registers an offense and corrects functions 293s registers an offense and corrects when the else branch contains `and` 293s registers an offense and corrects brackets accesses 293s registers an offense and corrects nested vars 293s registers an offense and corrects 293s registers an offense and corrects with ternary expression and the branches contains chained parenthesized method call 293s registers an offense and corrects with ternary expression and the branches contains parenthesized method call 293s registers an offense and corrects when the else branch contains `rescue` 293s registers an offense and corrects when the else branch contains an irange 293s 293s RuboCop::Cop::Style::ParenthesesAroundCondition 293s allows parens if the condition node is a modifier rescue op 293s accepts parentheses if there is no space between the keyword and (. 293s allows parens if the condition node is a modifier until op 293s registers an offense for parentheses around condition 293s is not confused by leading parentheses in subexpression 293s does not blow up for empty if condition 293s does not register an offense when parentheses in multiple expressions separated by semicolon 293s does not blow up for empty unless condition 293s allows parens if the condition node is a modifier unless op 293s accepts parentheses around condition in a ternary 293s is not confused by parentheses in subexpression 293s allows parens if the condition node is a modifier if op 293s does not blow up when the condition is a ternary op 293s allows parens if the condition node is a modifier while op 293s safe assignment is not allowed 293s does not accept variable assignment in condition surrounded with parentheses 293s does not accept element assignment in condition surrounded with parentheses 293s safe assignment is allowed 293s accepts variable assignment in condition surrounded with parentheses 293s accepts setter in condition surrounded with parentheses 293s accepts element assignment in condition surrounded with parentheses 293s parentheses in multiline conditions are allowed 293s registers an offense for parentheses in single line condition 293s accepts parentheses around multiline condition 293s parentheses in multiline conditions are not allowed 293s registers an offense for parentheses around multiline condition 293s 293s RuboCop::Cop::Layout::DefEndAlignment 293s when EnforcedStyleAlignWith is def 293s accepts matching defs ... end 293s registers an offense for mismatched def test end and autocorrects 293s registers an offense for mismatched foo def test end and autocorrects 293s accepts matching foo def ... end 293s accepts matching def ... end 293s registers an offense for mismatched def Test.test end and autocorrects 293s correct + opposite 293s registers an offense 293s when EnforcedStyleAlignWith is start_of_line 293s accepts matching foo bar def ... end 293s registers an offense for mismatched def Test.test end and autocorrects 293s registers an offense for mismatched def test end and autocorrects 293s accepts matching def ... end 293s accepts matching def ... end 293s accepts matching defs ... end 293s accepts matching foo def ... end 293s registers an offense for mismatched foo def test end and autocorrects 293s when including an anonymous module containing `private def` 293s does not register an offense 293s when using refinements and `private def` 293s does not register an offense 293s correct + opposite 293s registers an offense 293s 293s RuboCop::Cop::Gemspec::OrderedDependencies 293s When using method call to gem names 293s does not register any offenses 293s When using a local variable in an argument of dependent gem 293s does not register any offenses 293s behaves like ordered dependency 293s when add_development_dependency 293s When gems are alphabetically sorted 293s does not register any offenses 293s when gems are not alphabetically sorted 293s registers an offense 293s when dependency is separated by multiline comment 293s with TreatCommentsAsGroupSeparators: false 293s registers an offense 293s with TreatCommentsAsGroupSeparators: true 293s accepts 293s when each individual group of line is sorted 293s does not register any offenses 293s behaves like ordered dependency 293s when add_runtime_dependency 293s when each individual group of line is sorted 293s does not register any offenses 293s When gems are alphabetically sorted 293s does not register any offenses 293s when dependency is separated by multiline comment 293s with TreatCommentsAsGroupSeparators: false 293s registers an offense 293s with TreatCommentsAsGroupSeparators: true 293s accepts 293s when gems are not alphabetically sorted 293s registers an offense 293s behaves like ordered dependency 293s when add_dependency 293s when dependency is separated by multiline comment 293s with TreatCommentsAsGroupSeparators: true 293s accepts 293s with TreatCommentsAsGroupSeparators: false 293s registers an offense 293s When gems are alphabetically sorted 293s does not register any offenses 293s when each individual group of line is sorted 293s does not register any offenses 293s when gems are not alphabetically sorted 293s registers an offense 293s when different dependencies are consecutive 293s does not register any offenses 293s 293s RuboCop::Cop::Style::UnlessElse 293s unless with else 293s registers an offense 293s and nested unless with else 293s registers offenses for both but corrects only the outer unless/else 293s unless without else 293s does not register an offense 293s unless with nested if-else 293s registers an offense 293s 293s RuboCop::Cop::Layout::SpaceBeforeFirstArg 293s for method calls without parentheses 293s accepts + operator 293s registers an offense for method call with no spaces before the first arg 293s accepts a method call with one space before the first arg 293s registers an offense and corrects method call with two spaces before the first arg 293s accepts setter call 293s accepts multiple space containing line break 293s when a vertical argument positions are aligned 293s registers an offense 293s when using safe navigation operator 293s registers an offense and corrects method call with two spaces before the first arg 293s when AllowForAlignment is true 293s accepts method calls with aligned first arguments 293s when AllowForAlignment is false 293s registers an offense and corrects method calls with aligned first arguments 293s for method calls with parentheses 293s accepts a method call without space 293s accepts a method call with space after the left parenthesis 293s 293s RuboCop::FileFinder 293s #find_file_upwards 293s returns a file to be found upwards 293s returns nil when file is not found 293s #find_last_file_upwards 293s returns the last file found upwards 293s returns nil when file is not found 293s 293s RuboCop::Cop::Lint::NonLocalExitFromIterator 293s allows return in define_singleton_method 293s allows return with value 293s allows return in define_method 293s when block is followed by method chain 293s and has no argument 293s allows 293s and has single argument 293s registers an offense 293s and has multiple arguments 293s registers an offense 293s when block is not followed by method chain 293s allows 293s when the return is within a nested method definition 293s allows return in a class method definition 293s allows return in an instance method definition 293s when block is lambda 293s allows 293s when block in middle of nest is followed by method chain 293s registers offenses 293s when lambda is inside of block followed by method chain 293s allows 293s 293s RuboCop::Cop::InternalAffairs::ExampleDescription 293s with `expect_offense` 293s registers an offense when given an improper description 293s does not register an offense when given an unexpected description 293s does not register an offense when given a proper description 293s with `expect_correction` 293s registers an offense when given an improper description 293s in conjunction with expect_offense 293s registers an offense when given an improper description 293s when the description is invalid for both methods 293s registers an offense for the first method encountered 293s when not making an expectation on offenses 293s does not register an offense 293s with `expect_no_offenses` 293s does not register an offense when given an unexpected description 293s does not crash when given a proper description that is split with + 293s does not register an offense when given a proper description 293s registers an offense when given an improper description 293s with `expect_no_corrections` 293s registers an offense when given an improper description 293s in conjunction with expect_offense 293s registers an offense when given an improper description 293s 293s RuboCop::Cop::Style::NumericLiteralPrefix 293s binary literals 293s does not register offense for lowercase prefix 293s registers an offense for uppercase prefix 293s octal literals 293s when config is zero_with_o 293s registers an offense for prefixes `0` and `0O` 293s does not register offense for lowercase prefix 293s when config is zero_only 293s registers an offense for prefix `0O` and `0o` 293s does not register offense for prefix `0` 293s decimal literals 293s registers an offense for prefixes 293s does not register offense for no prefix 293s hex literals 293s registers an offense for uppercase prefix 293s does not register offense for lowercase prefix 293s 293s RuboCop::Cop::Lint::ConstantDefinitionInBlock 293s registers an offense for a class defined within a block 293s does not register an offense for a top-level module followed by another statement 293s registers an offense for a constant defined within a block followed by another statement 293s does not register an offense for a top-level module 293s does not register an offense for a constant with an explicit top-level scope followed by another statement 293s does not register an offense for a constant with an explicit top-level scope 293s registers an offense for a constant defined within a block 293s does not register an offense for a top-level constant followed by another statement 293s registers an offense for a module defined within a block 293s does not register an offense for a constant with an explicit self scope 293s does not register an offense for a constant with an explicit self scope followed by another statement 293s registers an offense for a module defined within a block followed by another statement 293s does not register an offense for a top-level class 293s registers an offense for a class defined within a block followed by another statement 293s does not register an offense for a top-level class followed by another statement 293s does not register an offense for a top-level constant 293s when `AllowedMethods: []` 293s registers an offense for a class defined within a block of `enums` method 293s registers an offense for a casign used within a block of `enums` method 293s registers an offense for a module defined within a block of `enums` method 293s when `AllowedMethods: [enums]` 293s does not register an offense for a class defined within a block of `enums` method 293s does not register an offense for a module defined within a block of `enums` method 293s does not register an offense for a casign used within a block of `enums` method 293s 293s RuboCop::Cop::Lint::NonAtomicFileOperation 293s registers an offense when use `FileTest.exist?` before force remove file 293s does not register an offense when not an exist check 293s does not register an offense when use `FileTest.exist?` before creating file with an option `force: false` 293s registers an offense when use `FileTest.exist?` before force creating file 293s registers an offense when using `FileTest.exist?` as a condition for `elsif` 293s registers an offense when use `FileTest.exist?` before remove file 293s registers an offense when use `FileTest.exist?` before remove file 293s registers an offense when use `FileTest.exist?` before creating file 293s does not register an offense when processing other than file operations 293s registers an offense when use `FileTest.exist?` before remove file 293s registers an offense when use `FileTest.exists?` before creating file 293s does not register an offense when use `FileTest.exist?` before remove recursive file 293s registers an offense when use `FileTest.exist?` before remove file 293s registers an offense when use `FileTest.exist?` before remove file 293s registers an offense when use `FileTest.exist?` before force creating file 293s does not register an offense when using `FileTest.exist?` with `if` condition that has `else` branch 293s registers an offense when use `FileTest.exist?` before creating file with an option not `force` 293s registers an offense when use `FileTest.exist?` before force creating file 293s registers an offense when use `FileTest.exist?` before remove file 293s registers an offense when use `FileTest.exist?` before remove file 293s registers an offense when use `FileTest.exist?` before remove file 293s does not register an offense when not checking for the existence 293s registers an offense when use `FileTest.exist?` before creating file with an option `force: true` 293s does not register an offense when not a method of file operation 293s does not register an offense when checking for the existence of different files 293s registers an offense when use `FileTest.exist?` before remove file 293s registers an offense when use file existence checks `unless` by postfix before creating file 293s does not register an offense when use `FileTest.exist?` before remove recursive file 293s registers an offense when use file existence checks `if` by postfix before removing file 293s registers an offense when use `FileTest.exist?` with negated `if` before creating file 293s registers an offense when use `FileTest.exist?` before force remove file 293s registers an offense when use `FileTest.exist?` before remove file 293s does not register an offense when using complex conditional with `&&` 293s does not register an offense when using complex conditional with `||` 293s 293s RuboCop::Cop::Bundler::GemFilename 293s with default configuration (EnforcedStyle => `Gemfile`) 293s with gems.rb file path 293s registers an offense 293s with gems.locked file path 293s registers an offense 293s with non-root Gemfile file path 293s does not register an offense 293s with non-root gems.rb file path 293s registers an offense 293s with non-root Gemfile.lock file path 293s does not register an offense 293s with non-root gems.locked file path 293s registers an offense 293s with Gemfile file path 293s does not register an offense 293s with Gemfile.lock file path 293s does not register an offense 293s with EnforcedStyle set to `gems.rb` 293s with non-root Gemfile.lock file path 293s registers an offense 293s with non-root Gemfile file path 293s registers an offense 293s with non-root gems.rb file path 293s does not register an offense 293s with Gemfile.lock file path 293s registers an offense 293s with non-root gems.locked file path 293s does not register an offense 293s with Gemfile file path 293s registers an offense 293s with gems.rb file path 293s does not register an offense 293s 293s RuboCop::Cop::Style::OrAssignment 293s when using `elsif` statement 293s does not register an offense 293s when using unless var; var = something; end 293s registers an offense for normal variables 293s registers an offense for instance variables 293s does not register an offense if any of the variables are different 293s registers an offense for global variables 293s registers an offense for class variables 293s when using var = if var; var; else; something; end 293s registers an offense with global variables 293s registers an offense with normal variables 293s does not register an offense if any of the variables are different 293s registers an offense with instance variables 293s registers an offense with class variables 293s when using var = var ? var : something 293s does not register an offense if any of the variables are different 293s registers an offense with class variables 293s registers an offense with normal variables 293s registers an offense with instance variables 293s registers an offense with global variables 293s when using var = something unless var 293s registers an offense for global variables 293s registers an offense for instance variables 293s registers an offense for normal variables 293s does not register an offense if any of the variables are different 293s registers an offense for class variables 293s when `then` branch body is empty 293s registers an offense 293s 293s RuboCop::Cop::Lint::UnreachableLoop 293s does not register an offense when using `return do_something(value) || next` in a loop 293s does not register an offense when branch includes continue statement preceding break statement 293s registers an offense when using `return do_something(value) || break` in a loop 293s handles inner loops 293s does not register an offense when using `return do_something(value) || redo` in a loop 293s Ruby 2.7 293s registers an offense when using `return do_something(value) || break` in a loop 293s without preceding continue statements 293s registers an offense when using `if-else` with all break branches 293s does not register an offense when using `case` without `else` 293s does not register an offense when using `case-when-else` and not all branches are breaking 293s registers an offense when using `break` 293s does not register an offense when using `if-elsif-else` and not all branches are breaking 293s registers an offense when using `case-when-else` with all break branches 293s does not register an offense when using `if` without `else` 293s with an enumerator method 293s not chained 293s registers an offense 293s in the middle of a method chain 293s does not register an offense 293s as the last item in a method chain 293s registers an offense 293s with AllowedPatterns 293s with a ignored method call 293s does not register an offense 293s with a non ignored method call 293s registers an offense 293s Ruby 2.7 293s registers an offense 293s with preceding continue statements 293s does not register an offense when using `if-else` with all break branches 293s does not register an offense when using `case-when-else` with all break branches 293s does not register an offense when using `break` 293s 293s RuboCop::Cop::Lint::UselessElseWithoutRescue 293s with `else` without `rescue` 293s registers an offense 293s with `else` with `rescue` 293s accepts 293s 293s RuboCop::Cop::Style::EnvHome 293s does not register an offense when using `ENV['HOME'] = '/home/foo'` 293s registers and corrects an offense when using `ENV.fetch('HOME')` 293s does not register an offense when using `Dir.home` 293s registers and corrects an offense when using `::ENV['HOME']` 293s does not register an offense when using `ENV.fetch('HOME', default)` 293s registers and corrects an offense when using `ENV.fetch('HOME', nil)` 293s registers and corrects an offense when using `ENV['HOME']` 293s 293s RuboCop::Cop::Style::ImplicitRuntimeError 293s registers an offense for `fail` with a multiline string 293s registers an offense for `fail` without error class 293s does not register an offense for `fail` with an error class 293s does not register an offense for `raise` with an error class 293s does not register an offense for `fail` without arguments 293s registers an offense for `raise` with a multiline string 293s registers an offense for `raise` without error class 293s does not register an offense for `raise` without arguments 293s 293s RuboCop::Cop::Style::TrailingCommaInBlockArgs 293s curly brace block format 293s does not register an offense when more than one argument is present with no trailing comma 293s does not register an offense for keyword arguments 293s does not register an offense for default arguments 293s ignores commas in default argument strings 293s registers an offense when a trailing comma is not needed 293s preserves semicolons in block/local variables 293s does not register an offense when no arguments are present 293s does not register an offense when a trailing comma is required 293s do/end block format 293s does not register an offense when a trailing comma is required 293s registers an offense when a trailing comma is not needed 293s preserves semicolons in block/local variables 293s does not register an offense when more than one argument is present with no trailing comma 293s does not register an offense for keyword arguments 293s does not register an offense for an empty block 293s does not register an offense when no arguments are present 293s ignores commas in default argument strings 293s does not register an offense for default arguments 293s when `->` has multiple arguments 293s does not register an offense 293s when `lambda` has multiple arguments 293s registers an offense and corrects when a trailing comma isn't needed 293s does not register an offense when more than one argument is present with no trailing comma 293s 293s RuboCop::Cop::Layout::SpaceAroundEqualsInParameterDefault 293s when EnforcedStyle is space 293s registers an offense and corrects assignment of empty list without space 293s accepts default value assignment with spaces and unary + operator 293s registers an offense and corrects default value assignment without space 293s registers an offense and corrects assigning empty string without space 293s registers an offense and corrects default value assignment where first is partially right without space 293s registers an offense and corrects missing space for arguments with unary operators 293s accepts default value assignment with space 293s when EnforcedStyle is no_space 293s accepts default value assignment without space 293s registers an offense and corrects default value assignment with space 293s registers an offense and corrects assignment of empty string with space 293s registers an offense and corrects assignment of empty list with space 293s 293s RuboCop::Cop::Lint::DuplicateBranch 293s registers an offense when `if` has multiple duplicate branches 293s does not register an offense when `unless` has no duplicate branches 293s does not register an offense for modifier `unless` 293s does not register an offense for empty `unless` 293s registers an offense when `if` has duplicate `else` branch 293s does not register an offense for simple `if` without other branches 294s registers an offense when `rescue` has multiple duplicate `resbody` branches 294s does not register an offense when `rescue` has no duplicate branches 294s registers an offense when `unless` has duplicate `else` branch 294s registers an offense when `rescue` has duplicate `else` branch 294s registers an offense when `case` has multiple duplicate branches 294s does not register an offense for empty `if` 294s does not register an offense for simple `unless` without other branches 294s registers an offense when `if` has duplicate `elsif` branch 294s registers an offense when `rescue` has duplicate `resbody` branch 294s registers an offense when `case` has duplicate `else` branch 294s does not register an offense for modifier `if` 294s does not register an offense when `if` has no duplicate branches 294s does not register an offense when ternary has no duplicate branches 294s registers an offense when ternary has duplicate branches 294s registers an offense when `case` has duplicate `when` branch 294s does not register an offense when `case` has no duplicate branches 294s with IgnoreLiteralBranches: true 294s with `rescue` 294s behaves like literal rescue allowed 294s when returning a simple erange in multiple branches 294s allows branches to be duplicated 294s behaves like literal rescue disallowed 294s when returning a dstr in multiple branches 294s registers an offense 294s behaves like literal rescue allowed 294s when returning a hash of literals in multiple branches 294s allows branches to be duplicated 294s behaves like literal rescue allowed 294s when returning a rational in multiple branches 294s allows branches to be duplicated 294s behaves like literal rescue allowed 294s when returning a float in multiple branches 294s allows branches to be duplicated 294s behaves like literal rescue allowed 294s when returning a simple irange in multiple branches 294s allows branches to be duplicated 294s behaves like literal rescue disallowed 294s when returning a complex irange in multiple branches 294s registers an offense 294s behaves like literal rescue disallowed 294s when returning a variable in multiple branches 294s registers an offense 294s and IgnoreConstBranches: true 294s behaves like literal rescue allowed 294s when returning a array of constants in multiple branches 294s allows branches to be duplicated 294s behaves like literal rescue allowed 294s when returning a hash of constants in multiple branches 294s allows branches to be duplicated 294s behaves like literal rescue disallowed 294s when returning a method call in multiple branches 294s registers an offense 294s behaves like literal rescue disallowed 294s when returning a complex erange in multiple branches 294s registers an offense 294s behaves like literal rescue disallowed 294s when returning a complex hash in multiple branches 294s registers an offense 294s behaves like literal rescue disallowed 294s when returning a complex regexp in multiple branches 294s registers an offense 294s behaves like literal rescue allowed 294s when returning a array of literals in multiple branches 294s allows branches to be duplicated 294s behaves like literal rescue allowed 294s when returning a regexp in multiple branches 294s allows branches to be duplicated 294s behaves like literal rescue disallowed 294s when returning a complex array in multiple branches 294s registers an offense 294s behaves like literal rescue disallowed 294s when returning a dsym in multiple branches 294s registers an offense 294s and IgnoreConstBranches: false 294s behaves like literal rescue disallowed 294s when returning a hash of constants in multiple branches 294s registers an offense 294s behaves like literal rescue disallowed 294s when returning a array of constants in multiple branches 294s registers an offense 294s behaves like literal rescue allowed 294s when returning a empty hash in multiple branches 294s allows branches to be duplicated 294s behaves like literal rescue allowed 294s when returning a regexp with modifier in multiple branches 294s allows branches to be duplicated 294s behaves like literal rescue allowed 294s when returning a complex in multiple branches 294s allows branches to be duplicated 294s behaves like literal rescue allowed 294s when returning a empty array in multiple branches 294s allows branches to be duplicated 294s behaves like literal rescue allowed 294s when returning a true in multiple branches 294s allows branches to be duplicated 294s behaves like literal rescue allowed 294s when returning a string in multiple branches 294s allows branches to be duplicated 294s behaves like literal rescue disallowed 294s when returning a xstr in multiple branches 294s registers an offense 294s behaves like literal rescue allowed 294s when returning a symbol in multiple branches 294s allows branches to be duplicated 294s behaves like literal rescue allowed 294s when returning a false in multiple branches 294s allows branches to be duplicated 294s behaves like literal rescue allowed 294s when returning a nil in multiple branches 294s allows branches to be duplicated 294s behaves like literal rescue allowed 294s when returning a integer in multiple branches 294s allows branches to be duplicated 294s with `case` 294s behaves like literal case allowed 294s when returning a hash of literals in multiple branches 294s allows branches to be duplicated 294s behaves like literal case allowed 294s when returning a float in multiple branches 294s allows branches to be duplicated 294s and IgnoreConstBranches: false 294s behaves like literal case disallowed 294s when returning a hash of constants in multiple branches 294s registers an offense 294s behaves like literal case disallowed 294s when returning a array of constants in multiple branches 294s registers an offense 294s behaves like literal case allowed 294s when returning a array of literals in multiple branches 294s allows branches to be duplicated 294s behaves like literal case disallowed 294s when returning a method call in multiple branches 294s registers an offense 294s behaves like literal case allowed 294s when returning a simple irange in multiple branches 294s allows branches to be duplicated 294s behaves like literal case disallowed 294s when returning a complex array in multiple branches 294s registers an offense 294s behaves like literal case allowed 294s when returning a complex in multiple branches 294s allows branches to be duplicated 294s behaves like literal case allowed 294s when returning a true in multiple branches 294s allows branches to be duplicated 294s behaves like literal case allowed 294s when returning a rational in multiple branches 294s allows branches to be duplicated 294s behaves like literal case disallowed 294s when returning a dsym in multiple branches 294s registers an offense 294s behaves like literal case allowed 294s when returning a nil in multiple branches 294s allows branches to be duplicated 294s behaves like literal case allowed 294s when returning a empty array in multiple branches 294s allows branches to be duplicated 294s behaves like literal case allowed 294s when returning a integer in multiple branches 294s allows branches to be duplicated 294s behaves like literal case allowed 294s when returning a symbol in multiple branches 294s allows branches to be duplicated 294s behaves like literal case allowed 294s when returning a simple erange in multiple branches 294s allows branches to be duplicated 294s behaves like literal case allowed 294s when returning a string in multiple branches 294s allows branches to be duplicated 294s behaves like literal case allowed 294s when returning a false in multiple branches 294s allows branches to be duplicated 294s behaves like literal case disallowed 294s when returning a complex hash in multiple branches 294s registers an offense 294s behaves like literal case disallowed 294s when returning a dstr in multiple branches 294s registers an offense 294s behaves like literal case allowed 294s when returning a regexp in multiple branches 294s allows branches to be duplicated 294s and IgnoreConstBranches: true 294s behaves like literal case allowed 294s when returning a hash of constants in multiple branches 294s allows branches to be duplicated 294s behaves like literal case allowed 294s when returning a array of constants in multiple branches 294s allows branches to be duplicated 294s behaves like literal case disallowed 294s when returning a complex erange in multiple branches 294s registers an offense 294s behaves like literal case disallowed 294s when returning a xstr in multiple branches 294s registers an offense 294s behaves like literal case disallowed 294s when returning a variable in multiple branches 294s registers an offense 294s behaves like literal case disallowed 294s when returning a complex irange in multiple branches 294s registers an offense 294s behaves like literal case allowed 294s when returning a regexp with modifier in multiple branches 294s allows branches to be duplicated 294s behaves like literal case disallowed 294s when returning a complex regexp in multiple branches 294s registers an offense 294s behaves like literal case allowed 294s when returning a empty hash in multiple branches 294s allows branches to be duplicated 294s with `if` 294s behaves like literal if allowed 294s when returning a nil in multiple branches 294s allows branches to be duplicated 294s behaves like literal if allowed 294s when returning a array of literals in multiple branches 294s allows branches to be duplicated 294s behaves like literal if disallowed 294s when returning a complex regexp in multiple branches 294s registers an offense 294s behaves like literal if disallowed 294s when returning a complex hash in multiple branches 294s registers an offense 294s behaves like literal if allowed 294s when returning a complex in multiple branches 294s allows branches to be duplicated 294s behaves like literal if allowed 294s when returning a regexp with modifier in multiple branches 294s allows branches to be duplicated 294s behaves like literal if allowed 294s when returning a regexp in multiple branches 294s allows branches to be duplicated 294s behaves like literal if allowed 294s when returning a float in multiple branches 294s allows branches to be duplicated 294s behaves like literal if disallowed 294s when returning a complex array in multiple branches 294s registers an offense 294s behaves like literal if disallowed 294s when returning a complex irange in multiple branches 294s registers an offense 294s behaves like literal if disallowed 294s when returning a complex erange in multiple branches 294s registers an offense 294s behaves like literal if allowed 294s when returning a rational in multiple branches 294s allows branches to be duplicated 294s behaves like literal if allowed 294s when returning a hash of literals in multiple branches 294s allows branches to be duplicated 294s behaves like literal if disallowed 294s when returning a method call in multiple branches 294s registers an offense 294s behaves like literal if allowed 294s when returning a empty array in multiple branches 294s allows branches to be duplicated 294s behaves like literal if allowed 294s when returning a empty hash in multiple branches 294s allows branches to be duplicated 294s behaves like literal if allowed 294s when returning a simple irange in multiple branches 294s allows branches to be duplicated 294s behaves like literal if disallowed 294s when returning a dstr in multiple branches 294s registers an offense 294s behaves like literal if allowed 294s when returning a simple erange in multiple branches 294s allows branches to be duplicated 294s behaves like literal if disallowed 294s when returning a dsym in multiple branches 294s registers an offense 294s behaves like literal if allowed 294s when returning a false in multiple branches 294s allows branches to be duplicated 294s and IgnoreConstBranches: false 294s behaves like literal if disallowed 294s when returning a hash of constants in multiple branches 294s registers an offense 294s behaves like literal if disallowed 294s when returning a array of constants in multiple branches 294s registers an offense 294s and IgnoreConstBranches: true 294s behaves like literal if allowed 294s when returning a array of constants in multiple branches 294s allows branches to be duplicated 294s behaves like literal if allowed 294s when returning a hash of constants in multiple branches 294s allows branches to be duplicated 294s behaves like literal if allowed 294s when returning a string in multiple branches 294s allows branches to be duplicated 294s behaves like literal if allowed 294s when returning a symbol in multiple branches 294s allows branches to be duplicated 294s behaves like literal if allowed 294s when returning a true in multiple branches 294s allows branches to be duplicated 294s behaves like literal if disallowed 294s when returning a xstr in multiple branches 294s registers an offense 294s behaves like literal if allowed 294s when returning a integer in multiple branches 294s allows branches to be duplicated 294s behaves like literal if disallowed 294s when returning a variable in multiple branches 294s registers an offense 294s with IgnoreConstantBranches: true 294s with `rescue` 294s behaves like literal rescue disallowed 294s when returning a object in multiple branches 294s registers an offense 294s behaves like literal rescue allowed 294s when returning a constant in multiple branches 294s allows branches to be duplicated 294s with `case` 294s behaves like literal case allowed 294s when returning a constant in multiple branches 294s allows branches to be duplicated 294s behaves like literal case disallowed 294s when returning a object in multiple branches 294s registers an offense 294s with `if` 294s behaves like literal if allowed 294s when returning a constant in multiple branches 294s allows branches to be duplicated 294s behaves like literal if disallowed 294s when returning a object in multiple branches 294s registers an offense 294s with `case-match` 294s behaves like literal case-match allowed 294s when returning a constant in multiple branches 294s allows branches to be duplicated 294s behaves like literal case-match disallowed 294s when returning a object in multiple branches 294s registers an offense 294s 294s RuboCop::Cop::Naming::HeredocDelimiterNaming 294s when the delimiter contains non-letter characters 294s does not register an offense when delimiter contains an underscore 294s does not register an offense when delimiter contains a number 294s with a squiggly heredoc 294s does not register an offense with a meaningful delimiter 294s registers an offense with a non-meaningful delimiter 294s with multiple heredocs starting on the same line 294s registers an offense with a leading non-meaningful delimiter 294s does not register an offense with meaningful delimiters 294s registers an offense with a trailing non-meaningful delimiter 294s with an interpolated heredoc 294s registers an offense with a non-meaningful delimiter 294s does not register an offense with a meaningful delimiter 294s with a naked heredoc 294s registers an offense with a non-meaningful delimiter 294s does not register an offense with a meaningful delimiter 294s with a non-interpolated heredoc 294s when using single quoted delimiters 294s does not register an offense with a meaningful delimiter 294s registers an offense with a non-meaningful delimiter 294s when using non-word delimiters 294s registers an offense 294s when using back tick delimiters 294s registers an offense with a non-meaningful delimiter 294s does not register an offense with a meaningful delimiter 294s when using double quoted delimiters 294s registers an offense with a non-meaningful delimiter 294s does not register an offense with a meaningful delimiter 294s 294s RuboCop::Cop::Layout::SpaceInsideHashLiteralBraces 294s registers an offense for hashes with no spaces if so configured 294s registers an offense for correct + opposite 294s accepts hashes with spaces by default 294s accepts hash literals with no braces 294s can handle interpolation in a braceless hash literal 294s on Hash[{ x: 1 } => [1]] 294s does not register an offense 294s when EnforcedStyle is no_space 294s accepts hashes with no spaces 294s accepts multiline hash 294s registers an offense for hashes with spaces 294s registers an offense for opposite + correct 294s accepts multiline hash with comment 294s when using method argument that both key and value are hash literals 294s accepts hashes with no spaces 294s with newline inside empty braces not allowed 294s registers an offense 294s with space inside empty braces allowed 294s accepts empty braces with space inside 294s registers an offense for empty braces with no space inside 294s when using method argument that both key and value are hash literals 294s registers hashes with no spaces 294s when EnforcedStyle is compact 294s registers an offense for opposite + correct 294s accepts multiline hash with comment 294s registers an offense for nested hashes with spaces 294s accepts multiline hash 294s doesn't register an offense for non-nested hashes with spaces 294s registers offenses for hashes with no spaces 294s on { key: "{" } 294s does not register an offense 294s offending hash following empty hash 294s registers an offense on both sides 294s with space inside empty braces not allowed 294s registers an offense for empty braces with space inside 294s accepts empty braces with no space inside 294s 294s RuboCop::Cop::Style::WhileUntilModifier 294s behaves like condition modifier cop 294s for a multiline 'until' 294s doesn't break when used as RHS of class var assignment 294s doesn't break when used as RHS of binary arithmetic 294s doesn't break when used as RHS of constant assignment 294s doesn't break when used as RHS of local var assignment 294s corrects it if result fits in one line 294s handles one-line usage 294s accepts an empty body 294s accepts it if single line would not fit on one line 294s doesn't break when used as RHS of instance var assignment 294s accepts it when condition has local variable assignment 294s accepts it if body spans more than one line 294s handles inline comments during autocorrection 294s corrects it when assignment is in body 294s accepts multiline condition in modifier form 294s registers an offense 294s when there is a comment on the first line and some code after the end keyword 294s does not register an offense 294s when Layout/LineLength is disabled 294s registers an offense even for a long modifier statement 294s behaves like condition modifier cop 294s for a multiline 'while' 294s corrects it when assignment is in body 294s handles one-line usage 294s corrects it if result fits in one line 294s handles inline comments during autocorrection 294s doesn't break when used as RHS of instance var assignment 294s doesn't break when used as RHS of binary arithmetic 294s accepts an empty body 294s doesn't break when used as RHS of constant assignment 294s accepts it when condition has local variable assignment 294s doesn't break when used as RHS of local var assignment 294s accepts it if single line would not fit on one line 294s accepts it if body spans more than one line 294s doesn't break when used as RHS of class var assignment 294s accepts multiline condition in modifier form 294s registers an offense 294s when Layout/LineLength is disabled 294s registers an offense even for a long modifier statement 294s when there is a comment on the first line and some code after the end keyword 294s does not register an offense 294s 294s RuboCop::Cop::Metrics::Utils::CodeLengthCalculator 294s #calculate 294s raises when unknown foldable type is passed 294s when method 294s folds arrays if asked 294s folds heredocs if asked 294s folds multiline hashes with line break before it as method args if asked 294s folds hashes if asked 294s folds hashes with comment if asked 294s counts single line hash with line breaks correctly if asked folding 294s counts comments if asked 294s folds hashes without braces as the one of method args if asked 294s folds multiline hashes without braces as method args if asked 294s counts single line hash as the one of method args if asked folding 294s counts single line correctly if asked folding 294s folds multiline hashes with line break after it as method args if asked 294s calculates method length 294s counts single line without parentheses correctly if asked folding 294s folds hashes as method args if asked 294s counts single line hash as the one of method args with safe navigation operator if asked folding 294s does not count blank lines 294s counts single line hash with other args correctly if asked folding 294s folds hashes as method kwargs if asked 294s when class 294s counts comments if asked 294s folds heredocs if asked 294s does not count blank lines 294s folds arrays if asked 294s calculates class length 294s does not count lines of inner classes 294s folds hashes if asked 294s 294s RuboCop::Cop::Gemspec::RequiredRubyVersion 294s registers an offense when `required_ruby_version` is blank 294s registers an offense when `required_ruby_version` is not specified 294s registers an offense when `required_ruby_version` is an empty array 294s target ruby version > 2.7 294s registers an offense when `required_ruby_version` is specified in array and is lower than `TargetRubyVersion` 294s registers an offense when `required_ruby_version` is specified with ~> and is lower than `TargetRubyVersion` 294s recognizes a Gem::Requirement with multiple requirements and does not register an offense 294s registers an offense when `required_ruby_version` is specified with >= and is lower than `TargetRubyVersion` 294s recognizes Gem::Requirement and registers offense 294s false negatives 294s does not register an offense when `required_ruby_version` is assigned as a variable (string literal) 294s does not register an offense when `required_ruby_version` is assigned as a variable (an array of string literal) 294s target ruby version > 2.7 294s registers an offense when `required_ruby_version` is specified with ~> without a minor version and is lower than `TargetRubyVersion` 294s does not register an offense when `required_ruby_version` is specified with ~> without a patch version and equals `TargetRubyVersion` 294s registers an offense when `required_ruby_version` is specified with >= without a minor version and is lower than `TargetRubyVersion` 294s does not register an offense when lowest version of `required_ruby_version` equals `TargetRubyVersion` 294s does not register an offense when `required_ruby_version` is specified with >= without a patch version and equals `TargetRubyVersion` 294s does not register an offense when `required_ruby_version` is specified with >= and equals `TargetRubyVersion` 294s does not register an offense when `required_ruby_version` is specified with ~> and equals `TargetRubyVersion` 294s target ruby version > 2.6 294s registers an offense when `required_ruby_version` is specified with ~> and is higher than `TargetRubyVersion` 294s registers an offense when `required_ruby_version` is specified with >= and is higher than `TargetRubyVersion` 294s 294s RuboCop::Cop::Style::Proc 294s registers an offense for a Proc.new call 294s accepts the ::Proc.new call without block 294s accepts the Proc.new call without block 294s registers an offense for ::Proc.new 294s Ruby 2.7 294s registers an offense for a Proc.new call 294s 294s RuboCop::Cop::Lint::SafeNavigationWithEmpty 294s in a conditional 294s does not register an offense on `.empty?` 294s registers an offense and corrects on `&.empty?` 294s outside a conditional 294s registers no offense 294s 294s RuboCop::Cop::Lint::HashCompareByIdentity 294s does not register an offense for hash methods without `object_id` as key 294s registers an offense when using hash methods with `object_id` on receiver as a key 294s registers an offense when using hash method with `object_id` as a key 294s 294s RuboCop::Cop::Lint::EmptyInterpolation 294s registers an offense and corrects #{ } in interpolation 294s registers an offense and corrects #{} in interpolation 294s accepts non-empty interpolation 294s finds interpolations in string-like contexts 294s 294s RuboCop::Formatter::JUnitFormatter 294s #file_finished 294s displays end of parsable text 294s displays a non-offense element in parsable text 295s displays an offense for `classname='test_1` in parsable text 295s displays start of parsable text 295s displays an offense for `classname='test_2` in parsable text 295s 295s RuboCop::Cop::Layout::MultilineHashKeyLineBreaks 295s without line break after opening bracket 295s registers an offense and corrects nested hashes 295s registers an offense and corrects when key starts on same line as another 295s when on same line 295s does not add any offenses 295s with line break after opening bracket 295s registers an offense and corrects when key starts on same line as another 295s when key starts on same line as another with rockets 295s adds an offense 295s when on different lines than brackets but keys on one 295s does not add any offenses 295s when on all keys on one line different than brackets 295s does not add any offenses 295s 295s RuboCop::Cop::Layout::EmptyLines 295s does not register an offense when there are no tokens 295s does not register an offense for comments 295s does not register an offense for heredocs with empty lines inside 295s registers an offense for consecutive empty lines 295s does not register an offense for empty lines in a string 295s 295s RuboCop::Cop::InternalAffairs::RedundantLocationArgument 295s when location argument is not passed 295s does not register an offense 295s when location argument is passed 295s when location argument is :expression 295s registers an offense 295s removes default `location` when preceded by another keyword 295s removes default `location` surrounded by other keywords 295s when there is a message argument 295s registers an offense 295s when location argument does not equal to :expression 295s does not register an offense 295s 295s RuboCop::Cop::Lint::Loop 295s accepts loop/break unless 295s accepts loop/break if 295s registers an offense and corrects for begin/end/while 295s registers an offense for begin/end/until 295s 295s RuboCop::Cop::Layout::SpaceInsideReferenceBrackets 295s with space inside empty brackets not allowed 295s accepts empty brackets with no space inside 295s registers an offense and corrects empty brackets with 1 space inside 295s registers an offense and corrects empty brackets with multiple spaces inside 295s registers an offense and corrects empty brackets with newline inside 295s when EnforcedStyle is space 295s registers and corrects multiple offenses for multiple sets of ref brackets 295s accepts square brackets called with method call syntax 295s accepts square brackets as method name 295s accepts an array as a reference object 295s registers and corrects multiple offenses in one set of ref brackets 295s registers an offense and corrects ref brackets with no trailing whitespace 295s registers an offense and corrects when a reference bracket with no trailing whitespace is assigned by another reference bracket 295s registers an offense and corrects second ref brackets with no trailing whitespace 295s registers an offense and corrects when a reference bracket is assigned by another reference bracket with no trailing whitespace 295s accepts spaces in array brackets 295s registers an offense and corrects second ref brackets with no leading whitespace 295s registers an offense and corrects ref brackets with no leading whitespace 295s registers an offense and corrects third ref brackets with no leading whitespace 295s does not register offense for reference brackets with spaces 295s does not register offense for array literals 295s does not register offense for ref bcts with spaces that assign 295s registers an offense and corrects when a reference bracket with no leading whitespace is assigned by another reference bracket 295s registers an offense and correct third ref brackets with no trailing whitespace 295s when EnforcedStyle is no_space 295s registers an offense and corrects when a reference bracket with a trailing whitespace is assigned by another reference bracket 295s accepts an array as a reference object 295s registers an offense and corrects ref brackets with leading whitespace 295s registers an offense and corrects second ref brackets with trailing whitespace 295s does not register offense for array literals 295s registers an offense and corrects third ref brackets with leading whitespace 295s does not register offense for ref bcts with no spaces that assign 295s registers an offense and corrects ref brackets with trailing whitespace 295s registers an offense and corrects outer ref brackets 295s registers an offense and corrects third ref brackets with trailing whitespace 295s accepts extra spacing in array brackets 295s registers multiple offenses and corrects multiple sets of ref brackets 295s registers an offense and corrects when a reference bracket is assigned by another reference bracket with trailing whitespace 295s registers an offense and corrects when a reference bracket with a leading whitespace is assigned by another reference bracket 295s does not register offense for non-empty brackets with newline inside 295s does not register offense for reference brackets with no spaces 295s registers an offense and corrects second ref brackets with leading whitespace 295s accepts square brackets as method name 295s register and correct multiple offenses for multiple sets of ref brackets 295s accepts square brackets called with method call syntax 295s registers multiple offenses and corrects one set of ref brackets 295s with space inside empty braces allowed 295s accepts empty brackets with space inside 295s registers offense and corrects empty brackets with more than one space inside 295s registers offense and corrects empty brackets with newline inside 295s registers offense and corrects empty brackets with no space inside 295s 295s RuboCop::Cop::Lint::TrailingCommaInAttributeDeclaration 295s registers an offense when using trailing comma 295s does not register an offense when not using trailing comma 295s 295s RuboCop::Cop::Layout::SpaceInLambdaLiteral 295s when configured to enforce spaces 295s registers an offense and corrects no space in the inner nested lambda 295s does not register an offense for multi-line lambdas 295s does not register an offense for no space between -> and { 295s registers an offense and corrects no space in both lambdas when nested 295s registers an offense and corrects no space in the outer nested lambda 295s registers an offense and corrects no space between -> and ( 295s does not register an offense for a space between -> and ( 295s when configured to enforce no space 295s does not register an offense for a space between -> and { 295s registers an offense and corrects a space in the outer nested lambda 295s does not register an offense for multi-line lambdas 295s registers an offense and corrects a space between -> and ( 295s does not register an offense for no space between -> and ( 295s register offenses and correct spaces in both lambdas when nested 295s registers an offense and corrects spaces between -> and ( 295s registers an offense and corrects a space in the inner nested lambda 295s 295s RuboCop::Cop::Style::Attr 295s does not register offense for custom `attr` method 295s registers offense for attr within class_eval 295s registers offense for attr within module_eval 295s registers an offense attr 295s accepts attr when it has a receiver 295s accepts attr when it does not take arguments 295s autocorrects 295s attr, false to attr_reader 295s attr to attr_reader 295s attr with multiple names to attr_reader 295s attr :name, true to attr_accessor :name 295s 295s RuboCop::Cop::Style::MethodCalledOnDoEndBlock 295s with a {} block 295s accepts a multi-line block with a chained call 295s accepts a single-line block with a chained call 295s Ruby 2.7 295s registers an offense for a chained call 295s with a multi-line do..end block 295s registers an offense for a chained call 295s accepts it if there is no chained call 295s accepts a chained block 295s when using safe navigation operator 295s registers an offense for a chained call 295s with a single-line do..end block 295s accepts a single-line do..end block with a chained block 295s registers an offense for a chained call 295s 295s RuboCop::Cop::InternalAffairs::RedundantContextConfigParameter 295s does not register an offense when using `:config` in other than `context` 295s registers an offense when using `:config` parameter 295s does not register an offense when not using `:config` 295s does not register an offense when using `:ruby30` only 295s registers an offense when using `:config` parameter with other parameters 295s 295s isolated environment 296s is not affected by a config file above the work directory 296s 296s RuboCop::Cop::Style::NumberedParametersLimit 296s with Ruby >= 2.7 296s sets Max properly for auto-gen-config 296s does not register an offense for a numblock with fewer than `Max` parameters 296s does not register an offense for a numblock with exactly `Max` parameters 296s does not register an offense for a normal block with too many parameters 296s when there are more than `Max` numbered parameters 296s registers an offense for a single line `numblock` 296s registers an offense for a multiline `numblock` 296s when Max is 1 296s uses the right offense message 296s when configuring Max 296s does not register an offense when there are not too many numbered params 296s 296s RuboCop::Cop::Style::CaseEquality 296s when AllowOnConstant is false 296s registers an offense and does not correct for === when receiver is of some other type 296s does not register an offense for === when the receiver is not a camel cased constant 296s registers an offense and corrects for === when the receiver is a constant 296s does not fail when the receiver is implicit 296s registers an offense and corrects for === when the receiver is a range 296s registers an offense and corrects for === when the receiver is a regexp 296s when AllowOnSelfClass is false 296s does not register an offense for === when the receiver is not a camel cased constant 296s registers an offense and corrects for === when the receiver is self.class 296s registers an offense and corrects for === when the receiver is a regexp 296s registers an offense and corrects for === when the receiver is a range 296s does not fail when the receiver is implicit 296s registers an offense and does not correct for === when receiver is of some other type 296s when AllowOnSelfClass is true 296s registers an offense and corrects for === when the receiver is self.klass 296s registers an offense and corrects for === when the receiver is a range 296s does not register an offense for === when the receiver is self.class 296s does not register an offense for === when the receiver is not a camel cased constant 296s does not fail when the receiver is implicit 296s registers an offense and does not correct for === when receiver is of some other type 296s registers an offense and corrects for === when the receiver is a regexp 296s when AllowOnConstant is true 296s registers an offense and corrects for === when the receiver is a regexp 296s registers an offense and does not correct for === when receiver is of some other type 296s registers an offense and corrects for === when the receiver is a range 296s does not fail when the receiver is implicit 296s does not register an offense for === when the receiver is not a camel cased constant 296s does not register an offense for === when the receiver is a constant 296s 296s RuboCop::Cop::Metrics::ParameterLists 296s accepts a lambda with more than 4 parameters 296s registers an offense for a method def with 5 parameters 296s registers an offense when optargs count exceeds the maximum 296s accepts a method def with 4 parameters 296s does not register an offense when method has no args 296s does not register an offense when method has allowed amount of args with block arg 296s does not register an offense when method has allowed amount of optargs 296s accepts a proc with more than 4 parameters 296s When CountKeywordArgs is false 296s does not count keyword arguments 296s does not count keyword arguments without default values 296s When CountKeywordArgs is true 296s counts keyword arguments as well 296s 296s RuboCop::Cop::Style::HashEachMethods 296s when node matches a keys#each or values#each 296s when `AllowedReceivers: ['execute']` 296s does not register an offense when receiver is `execute` variable 296s registers an offense when receiver is not allowed name 296s does not register an offense when receiver is `execute` method with a symbol proc argument 296s does not register an offense when receiver is `execute` method 296s when receiver is a send 296s registers offense, autocorrects foo#values.each to foo#each_value 296s registers offense, autocorrects foo#keys.each to foo#each_key 296s does not register an offense for foo#each_key 296s does not register an offense for Hash#each_value 296s registers offense, autocorrects foo#values.each to foo#each_value with a symbol proc argument 296s registers offense, autocorrects foo#keys.each to foo#each_key with a symbol proc argument 296s Ruby 2.7 296s registers offense, autocorrects foo#keys.each to foo#each_key with numblock 296s when receiver is a hash literal 296s registers offense, autocorrects {}#keys.each to {}#each_key with a symbol proc argument 296s does not register an offense for {}#each_key 296s registers offense, autocorrects {}#values.each with {}#each_value 296s registers offense, autocorrects {}#values.each to {}#each_value with a symbol proc argument 296s registers offense, autocorrects {}#keys.each with {}#each_key 296s does not register an offense for {}#each_value 296s when receiver is implicit 296s does not register an offense for `keys.each` with a symbol proc argument 296s does not register an offense for `keys.each` 296s does not register an offense for `values.each` with a symbol proc argument 296s does not register an offense for `values.each` 296s does not register an offense for each_key 296s does not register an offense for each_value 296s 296s RuboCop::Cop::InternalAffairs::RedundantLetRuboCopConfigNew 296s registers an offense when using `let(:config)` and `:config` is not specified in `describe` 296s does not register an offense when using `let(:config)` with arguments to `RuboCop::Config.new` 296s registers an offense when using `let(:config)` with no argument `RuboCop::Config.new` and `:config` is specified 296s registers an offense when using `let(:config)` and `:config` is already specified in `describe` 296s 296s RuboCop::Cop::Style::TernaryParentheses 296s configured for parentheses on complex and there are parens 296s accepts condition including a range 296s with an assignment condition 296s accepts accepts safe multiple assignment 296s accepts equality check 296s accepts safe assignment as part of multiple assignment 296s accepts safe assignment 296s behaves like safe assignment disabled 296s registers an offense for parens around assignment 296s registers an offense for parens around inner assignment 296s registers an offense for parens around outer assignment 296s with a simple condition 296s registers an offense for accessor in condition 296s registers an offense with preceding boolean keyword expression 296s registers an offense for save navigation 296s registers an offense for query method in condition 296s registers an offense for yield in condition 296s with a complex condition 296s registers an offense for defined with class method in condition 296s registers an offense for defined with nested constant in condition 296s registers an offense for defined with method chain in condition 296s accepts boolean expression using keywords 296s accepts boolean expression 296s registers an offense for defined with variable in condition 296s registers an offense when calling method on a receiver 296s with method call condition 296s registers an offense when calling method on a receiver 296s registers an offense when calling method with a parameter 296s registers an offense for defined check 296s without accessor in method call parameters 296s registers an offense for array include? without parens 296s registers an offense for array include? with parens 296s with accessor in method call parameters 296s registers an offense for array include? with multiple parameters with parens 296s registers an offense for array include? with multiple parameters without parens 296s registers an offense for array include? without parens 296s configured for parentheses on complex and there are no parens 296s with an assignment condition 296s registers an offense for equality check 296s accepts safe assignment 296s with complex condition 296s registers an offense for boolean expression with inner parens 296s registers an offense for comparison with multiplication 296s registers an offense for addition expression 296s registers an offense for compound boolean expression 296s registers an offense for comparison 296s registers an offense comparison with exponentiation 296s registers an offense for boolean expression 296s registers an offense for comparison with method call on receiver 296s registers an offense for arithmetic and equality check 296s registers an offense for subtraction expression 296s when configured to enforce parentheses inclusion 296s with a complex condition 296s registers an offense for boolean expression 296s registers an offense for boolean expression using keyword 296s registers an offense for arithmetic condition 296s registers an offense for defined? with variable in condition 296s registers an offense for defined? with class method in condition 296s registers an offense when calling method on a receiver 296s registers an offense for negated condition 296s registers an offense for defined? with nested constant in condition 296s registers an offense for defined? with method chain in condition 296s registers an offense for boolean expression containing parens 296s registers an offense for equality check 296s with an assignment condition 296s registers an offense for triple assignment 296s registers an offense for double assignment with equality check in condition 296s registers an offense for double assignment 296s accepts safe assignment in condition 296s with a simple condition 296s registers an offense for accessor in condition 296s registers an offense for query method in condition 296s registers an offense for yield in condition 296s when configured to enforce parentheses omission 296s accepts condition including a range 296s with an unparenthesized method call condition 296s registers an offense when calling method with a parameter 296s registers an offense for defined check 296s when calling method with multiple arguments 296s registers an offense 296s when calling method on a literal receiver 296s registers an offense 296s when calling method on a constant receiver 296s registers an offense 296s when calling method on a receiver 296s registers an offense 296s with one line pattern matching 296s does not register an offense 296s with no space between the parentheses and question mark 296s registers an offense 296s with one line pattern matching 296s does not register an offense 296s with a simple condition 296s registers an offense for accessor in condition 296s registers an offense for multi-line boolean expression 296s registers an offense for query method in condition 296s accepts multi-line boolean expression starting on following line 296s registers an offense for yield in condition 296s with a complex condition 296s registers an offense for negated condition 296s registers an offense for defined with class method in condition 296s registers an offense for defined with method chain in condition 296s registers an offense for arithmetic expression 296s registers an offense for boolean expression 296s registers an offense for defined with variable in condition 296s registers an offense for query method on object 296s registers an offense for equality check 296s registers an offense for boolean expression using keyword 296s accepts parens around inner boolean expression 296s registers an offense for defined with nested constant in condition 296s with an assignment condition 296s accepts double safe assignment 296s accepts safe assignment as part of multiple assignment 296s registers an offense for equality check 296s accepts safe assignment 296s behaves like safe assignment disabled 296s registers an offense for parens around assignment 296s registers an offense for parens around outer assignment 296s registers an offense for parens around inner assignment 296s 296s RuboCop::Cop::Style::Semicolon 296s accepts one line empty module definitions 296s registers an offense for a single expression 296s registers an offense for range (`1..42`) with semicolon 296s registers an offense for several expressions 296s registers an offense for range (`1...42`) with semicolon 296s accepts one line method definitions 296s accepts semicolon after params if so configured 296s accepts semicolon before end if so configured 296s registers an offense for one line method with two statements 296s accepts one line empty class definitions 296s registers an offense for semicolon at the end no matter what 296s accepts one line empty method definitions 296s registers an offense for a semicolon at the beginning of a line 296s accept semicolons inside strings 296s with a multi-expression line without a semicolon 296s does not register an offense 296s Ruby >= 2.6 296s registers an offense for endless range with semicolon (irange only) 296s registers an offense for endless range with semicolon (irange and erange) 296s does not register an offense for endless range without semicolon 296s registers an offense for endless range with semicolon in the method definition 296s when AllowAsExpressionSeparator is true 296s accepts one line method with two statements 296s accepts several expressions 296s 296s RuboCop::Cop::Bundler::GemComment 296s when investigating Gemfiles 296s when the "OnlyFor" option is set 296s including one or more option names but not "version_specifiers" 296s when a gem is uncommented and has one of the specified options 296s registers an offense 296s when a gem is uncommented and contains only options not specified 296s does not register an offense 296s when a gem is uncommented and has a version specifier but none of the specified options 296s does not register an offense 296s including "version_specifiers" 296s when a gem is uncommented and has a version specifier 296s registers an offense 296s when a gem is uncommented and has multiple version specifiers 296s registers an offense 296s when a gem is commented 296s does not register an offense 296s when a gem is uncommented and has a version specifier along with other options 296s registers an offense 296s when a gem is uncommented and has options but no version specifiers 296s does not register an offense 296s when a gem is uncommented and has no version specified 296s does not register an offense 296s including "restrictive_version_specifiers" 296s when a gem is uncommented and has both minimum and non-minimum version specifier 296s registers an offense 296s when a gem is uncommented and has a pessimistic version specifier 296s registers an offense 296s when a gem is uncommented and has a non-minimum version specifier with a leading space 296s registers an offense 296s when a gem is uncommented and has no version specified 296s does not register an offense 296s when a gem is uncommented and has a frozen version specifier 296s registers an offense 296s when a gem is uncommented and has only a minimum version specifier 296s does not register an offense 296s when a gem is uncommented and has a version specifier along with other options 296s registers an offense 296s when a gem is commented 296s does not register an offense 296s when a gem is uncommented and has a version specifier without operator 296s registers an offense 296s when a gem is uncommented and has options but no version specifiers 296s does not register an offense 296s and a gem has no comment 296s registers an offense 296s and the gem is commented 296s does not register any offenses 296s and the gem is permitted 296s does not register any offenses 296s and the gem is commented on the same line 296s does not register any offenses 296s and the file contains source and group 296s does not register any offenses 296s and the file is empty 296s does not register any offenses 296s when investigating Ruby files 296s does not register any offenses 296s 296s RuboCop::Runner 296s how formatter is invoked 296s #finished 296s when RuboCop finished inspecting all files normally 297s sends all file paths 297s the passed files paths 297s is frozen 297s when RuboCop is interrupted by user 297s sends only processed file paths 297s #file_finished 297s sends an array of detected offenses for the file 297s sends a file path 297s the passed path 298s is frozen 298s invocation order 298s is called in the proper sequence 298s #file_started 298s sends file specific information hash 298s sends a file path 298s the passed path 299s is frozen 299s #started 299s sends all file paths 299s the passed files paths 299s is frozen 299s 299s RuboCop::Cop::Style::RedundantFetchBlock 299s with SafeForConstants: false 299s does not register an offense when using `#fetch` with constant in the block 299s with SafeForConstants: true 299s registers an offense and corrects when using `#fetch` with Symbol in the block 299s registers an offense and corrects when using `#fetch` with empty block 299s does not register an offense when using `#fetch` with `Rails.cache` 299s registers an offense and corrects when using `#fetch` with String in the block and strings are frozen 299s registers an offense and corrects when using `#fetch` with Rational in the block 299s does not register an offense when using `#fetch` with String in the block and strings are not frozen 299s registers an offense and corrects when using `#fetch` with Integer in the block 299s does not register an offense when using `#fetch` with argument fallback 299s registers an offense and corrects when using `#fetch` with constant in the block 299s registers an offense and corrects when using `#fetch` with Complex in the block 299s does not register an offense when using `#fetch` with an argument in the block 299s does not register an offense when using `#fetch` with interpolated Symbol in the block 299s registers an offense and corrects when using `#fetch` with Float in the block 299s 299s RuboCop::Cop::Lint::IncompatibleIoSelectWithFiberScheduler 299s does not register an offense when using `Enumerable#select` 299s registers and corrects an offense when using `IO.select` with single read argument and specify the first argument only 299s registers and corrects an offense when using `::IO.select` with single read and timeout arguments 299s does not register an offense when using `IO.select` with multiple write arguments 299s registers an offense when using `IO.select` with write argument and using return value but does not autocorrect 299s registers and corrects an offense when using `IO.select` with single write and timeout arguments 299s registers an offense when using `IO.select` with read argument and using return value but does not autocorrect 299s registers and corrects an offense when using `IO.select` with single read argument 299s registers and corrects an offense when using `IO.select` with single write, `nil`, and timeout arguments 299s registers and corrects an offense when using `IO.select` with single read and timeout arguments 299s registers and corrects an offense when using `IO.select` with multiple read argument and specify the first argument only 299s registers and corrects an offense when using `::IO.select` with single read argument 299s does not register an offense when using `IO.select` with read and write arguments 299s registers and corrects an offense when using `IO.select` with single read as `self` and timeout arguments 299s registers and corrects an offense when using `IO.select` with single write argument 299s does not register an offense when using `IO.select` with multiple read arguments 299s registers and corrects an offense when using `IO.select` with single write as `self` and timeout arguments 299s registers and corrects an offense when using `IO.select` with single read, `nil`, and timeout arguments 299s 299s RuboCop::Cop::Lint::FlipFlop 299s registers an offense for inclusive flip-flops 299s registers an offense for exclusive flip-flops 299s 299s RuboCop::Cop::Style::EmptyMethod 299s when configured with expanded style 299s when method is nested in class scope 299s registers an offense for single line method 299s with a non-empty class method definition 299s allows single line method 299s allows multi line method 299s allows multi line method with comment 299s relation with Layout/LineLength 299s still corrects even if the method is longer than the configured Max 299s with an empty instance method definition 299s registers an offense for single line method 299s allows multi line method 299s allows multi line method with blank line 299s with an empty class method definition 299s registers an offense for single line method 299s allows empty multi line method 299s allows multi line method with a blank line 299s with a non-empty instance method definition 299s allows single line method 299s allows multi line method 299s allows multi line method with a comment 299s when configured with compact style 299s with a non-empty class method definition 299s allows multi line method with comment 299s allows single line method 299s allows multi line method 299s with an empty instance method definition 299s allows single line method 299s registers an offense for empty method 299s registers an offense for method with arguments 299s registers an offense for method with closing paren on following line 299s registers an offense for method with blank line 299s registers an offense for method with arguments without parens 299s with an empty class method definition 299s registers an offense for method with blank line 299s allows single line method 299s registers an offense for empty method 299s registers an offense for empty method with arguments 299s with a non-empty instance method definition 299s allows single line method 299s allows multi line method 299s allows multi line method with comment 299s relation with Layout/LineLength 299s when the correction would exceed the configured maximum 299s reports an offense but does not correct 299s when that cop is disabled 299s corrects to long lines 299s 299s RuboCop::Cop::Lint::RedundantWithObject 299s an object is used as a block argument 299s registers an offense and corrects when using ary.each_with_object do-end block without parentheses 299s registers an offense and corrects when using `ary.each_with_object { |v| v }` 299s registers an offense and corrects when using `ary.each.with_object([]) { |v| v }` 299s registers an offense and corrects when using ary.each_with_object([]) do-end block 299s Ruby 2.7 299s registers an offense and corrects when using `ary.each.with_object([]) { _1 }` 299s registers an offense and corrects when using `ary.each_with_object { _1 }` 299s when missing argument to `each_with_object` 299s does not register an offense when block has 2 arguments 299s does not register an offense when block has 1 argument 299s 299s RuboCop::Cop::Layout::SpaceAfterMethodName 299s accepts an assignment def with arguments but no parentheses 299s accepts class method def with arguments but no parentheses 299s accepts a defs without arguments 299s registers an offense and corrects def with space before the parenthesis 299s accepts a def without arguments 299s registers offense and corrects assignment def with space before parenthesis 299s registers offense and corrects class def with space before parenthesis 299s accepts a def with arguments but no parentheses 299s 299s RuboCop::Cop::Security::IoMethods 299s when using `IO` receiver and string argument that starts with a pipe character (`"| command"`) 299s behaves like accepts 299s does not register an offense when using `IO.readlines("| command")` 299s behaves like accepts 299s does not register an offense when using `IO.foreach("| command") { |x| puts x }` 299s behaves like accepts 299s does not register an offense when using `IO.binwrite("| command", "hi")` 299s behaves like accepts 299s does not register an offense when using `IO.read("| command")` 299s behaves like accepts 299s does not register an offense when using `IO.write("| command", "hi")` 299s when using `File` receiver 299s behaves like accepts 299s does not register an offense when using `File.readlines(path)` 299s behaves like accepts 299s does not register an offense when using `File.binread(path)` 299s behaves like accepts 299s does not register an offense when using `File.foreach(path) { |x| puts x }` 299s behaves like accepts 299s does not register an offense when using `File.binwrite(path, "hi")` 299s behaves like accepts 299s does not register an offense when using `File.read(path)` 299s when using `IO` receiver and string argument 299s registers and corrects an offense when using `foreach` 299s behaves like offense 299s registers and corrects an offense when using `read` 299s behaves like offense 299s registers and corrects an offense when using `write` 299s behaves like offense 299s registers and corrects an offense when using `readlines` 299s behaves like offense 299s registers and corrects an offense when using `binwrite` 299s behaves like offense 299s registers and corrects an offense when using `binwrite` 299s when using `IO` receiver and variable argument 299s registers and corrects an offense when using `foreach` 299s behaves like offense 299s registers and corrects an offense when using `read` 299s behaves like offense 299s registers and corrects an offense when using `binwrite` 299s behaves like offense 299s registers and corrects an offense when using `binread` 299s behaves like offense 299s registers and corrects an offense when using `write` 299s behaves like offense 299s registers and corrects an offense when using `readlines` 299s when using no receiver 299s behaves like accepts 299s does not register an offense when using `foreach("command") { |x| puts x }` 299s behaves like accepts 299s does not register an offense when using `binwrite("command", "hi")` 299s behaves like accepts 299s does not register an offense when using `read("command")` 299s behaves like accepts 299s does not register an offense when using `write("command", "hi")` 299s behaves like accepts 299s does not register an offense when using `readlines("command")` 299s when using `IO` receiver and string argument that starts with a pipe character (`" | command"`) 299s behaves like accepts 299s does not register an offense when using `IO.foreach(" | command") { |x| puts x }` 299s behaves like accepts 299s does not register an offense when using `IO.read(" | command")` 299s behaves like accepts 299s does not register an offense when using `IO.readlines(" | command")` 299s behaves like accepts 299s does not register an offense when using `IO.write(" | command", "hi")` 299s behaves like accepts 299s does not register an offense when using `IO.binwrite(" | command", "hi")` 299s 299s RuboCop::Cop::Security::Eval 299s registers an offense for eval with string that has an interpolation 299s registers an offense `Binding#eval` 299s registers an offense for eval as command 299s registers an offense for eval as function 299s accepts eval with a string that interpolates a literal 299s accepts eval as method 299s accepts eval with a multiline string 299s accepts eval on a literal string 299s accepts eval as variable 299s accepts eval with no arguments 299s with an explicit binding, filename, and line number 299s registers an offense for eval as command 299s registers an offense for eval as function 299s accepts eval on a literal string 299s 299s RuboCop::Cop::Style::ClassCheck 299s when enforced style is kind_of? 299s registers an offense for is_a? and corrects to kind_of? 299s when enforced style is is_a? 299s registers an offense for kind_of? and corrects to is_a? 299s 299s RuboCop::Cop::Style::NilComparison 299s configured with comparison preferred 299s registers an offense for nil? 299s registers and corrects an offense for `!x.nil?` 299s configured with predicate preferred 299s registers an offense for == nil 299s registers an offense for === nil 299s registers and corrects an offense when using `x == nil` as a guard condition 299s 299s RuboCop::Cop::Style::AccessorGrouping 299s when EnforcedStyle is separated 299s does not register an offense if the same accessor is listed twice 299s registers an offense and corrects when using grouped accessors within eigenclass 299s does not register an offense for grouped accessors with comments 299s registers an offense and corrects when the same accessor is given more than once in the same statement 300s registers an offense and corrects when using grouped accessors 300s registers an offense and corrects when using grouped accessors with different access modifiers 300s does not register an offense when using separated accessors 300s when there are comments for attributes 300s registers and corrects an offense 300s when EnforcedStyle is grouped 300s registers an offense and corrects when using separated accessors with different access modifiers 300s registers offense and corrects if at least two separate accessors without comments 300s registers an offense and corrects when using separated accessors 300s does not register an offense when using grouped accessors 300s registers an offense and corrects when using separated accessors within eigenclass 300s registers an offense and correct if the same accessor is listed twice 300s does not register offense for accessors with comments 300s does not register an offense when the same accessor is given more than once in the same statement 300s 300s RuboCop::Cop::Layout::EmptyLinesAroundArguments 300s when extra lines 300s registers and autocorrects offense for empty line after arg 300s registers and autocorrects offense when args start on definition line 300s registers and autocorrects offense for empty line before arg 300s registers and autocorrects offense on correct lines for multi-offense example 300s registers and autocorrects offense for empty line between args 300s registers and autocorrects offenses when multiple empty lines are detected 300s registers autocorrects empty line whetn args start on definition line 300s registers and autocorrects offense when empty line between normal arg & block arg 300s registers and autocorrects offense on correct line for single offense example 300s when using safe navigation operator 300s registers and autocorrects offense for empty line before arg 300s when no extra lines 300s accepts listed args starting on definition line 300s accepts method with no arguments that trails off block 300s accepts multiple listed mixed args 300s accepts method with argument that trails off block 300s accepts multiline style argument for method call without selector 300s accepts block argument with empty line 300s accepts method with argument that trails off heredoc 300s accepts one line methods 300s accepts when blank line is inserted between method with arguments and receiver 300s with multiple arguments 300s ignores empty lines inside of method arguments 300s with one argument 300s ignores empty lines inside of method arguments 300s 300s RuboCop::Cop::Style::CommentAnnotation 300s with RequireColon configuration set to false 300s accepts upper case keyword with colon, space and note 300s accepts a keyword that is somewhere in a sentence 300s accepts a keyword that is just the beginning of a sentence 300s accepts a comment that is obviously a code example 300s accepts upper case keyword alone 300s lower case keyword 300s registers an offense and upcases 300s when a keyword is not in the configuration 300s accepts the word with colon 300s with colon 300s registers an offense and removes colon 300s offenses in consecutive inline comments 300s registers each of them 300s upper case keyword with colon but no note 300s registers an offense without autocorrection 300s with configured keyword 300s registers an offense for containing a colon after the word 300s upper case keyword with space but no note 300s registers an offense without autocorrection 300s multiline comment 300s only registers an offense on the first line 300s with default RequireColon configuration (colon + space) 300s accepts upper case keyword alone 300s accepts a keyword that is somewhere in a sentence 300s accepts a keyword that is just the beginning of a sentence 300s accepts a comment that is obviously a code example 300s accepts upper case keyword with colon, space and note 300s capitalized keyword 300s registers an offense and upcases 300s multiline comment 300s only registers an offense on the first line 300s upper case keyword with space but no note 300s registers an offense without autocorrection 300s when a keyword is not in the configuration 300s accepts the word without colon 300s lower case keyword 300s registers an offense and upcases 300s with multiword keywords 300s registers an offense for each matching keyword 300s missing space after colon 300s registers an offense and adds space 300s upper case keyword with colon but no note 300s registers an offense without autocorrection 300s with configured keyword 300s registers an offense for a missing colon after the word 300s offenses in consecutive inline comments 300s registers each of them 300s missing colon 300s registers an offense and adds colon 300s 300s RuboCop::Cop::MessageAnnotator 300s with style guide url 300s when a base URL is specified 300s combines correctly with a target-based setting 300s can accept relative paths if base has a full path 300s does not specify a URL if a cop does not have one 300s can use a path-based setting 300s allows absolute URLs in the cop config 300s when a department other than AllCops is specified 300s returns style guide url when it is specified 300s when a nested department is specified 300s returns style guide url when it is specified 300s when StyleGuide is set in the config 300s adds style guide url 300s when StyleGuide is not set in the config 300s does not add style guide url 300s #annotate 300s when the output format is JSON 300s returns the message unannotated 300s with default options 300s returns the message 300s with options on 300s returns an annotated message 300s #urls 300s returns an empty array if the reference url is blank 300s returns reference url when it is specified 300s returns an empty array without StyleGuide URL 300s returns style guide and reference url when they are specified 300s returns multiple reference urls 300s returns style guide url when it is specified 300s 300s RuboCop::Cop::Lint::SymbolConversion 300s does not register an offense for a symbol that requires quotes 300s does not register an offense for a normal symbol 300s does not register an offense for a dstr 300s in an alias 300s does not register an offense 300s implicit `to_sym` call 300s does not register an offense 300s behaves like offense 300s registers an offense for "foo_bar".to_sym 300s behaves like offense 300s registers an offense for :"foo_bar" 300s behaves like offense 300s registers an offense for :foo.to_sym 300s behaves like offense 300s registers an offense for "foo".intern 300s behaves like offense 300s registers an offense for "foo-bar".to_sym 300s inside a percent literal array 300s does not register an offense 300s behaves like offense 300s registers an offense for "foo-bar".intern 300s in a hash 300s keys 300s registers and corrects an offense for a quoted symbol that ends with `!` 300s does not register an offense for a require quoted symbol that contains `:` 300s registers an offense for a quoted symbol 300s does not register an offense for operators 300s does not register an offense for a require quoted symbol that ends with `=` 300s does not register an offense for a normal symbol 300s registers and corrects an offense for a quoted symbol that ends with `?` 300s does not register an offense for a require quoted symbol 300s values 300s registers an offense for a quoted symbol key 300s registers an offense for a quoted symbol value 300s does not register an offense for a normal symbol 300s behaves like offense 300s registers an offense for :"foo" 300s behaves like offense 300s registers an offense for :foo.intern 300s behaves like offense 300s registers an offense for "foo".to_sym 300s behaves like offense 300s registers an offense for "foo_bar".intern 300s single quoted symbol 300s does not register an offense 300s EnforcedStyle: consistent 300s hash where there are keys needing quoting 300s registers an offense for unquoted keys 300s hash where keys are quoted but do not need to be 300s registers an offense 300s with a key with = 300s requires symbols to be quoted 300s hash where no keys need to be quoted 300s does not register an offense 300s with a mix of string and symbol keys 300s does not register an offense 300s with different quote styles 300s does not register an offense 300s 300s RuboCop::Cop::Style::StringLiteralsInInterpolation 300s configured with double quotes preferred 300s registers an offense for single quotes within embedded expression in a heredoc string 300s registers an offense for single quotes within embedded expression 300s when configured with a bad value 300s fails 300s configured with single quotes preferred 300s accepts double quotes on a broken static string 300s can handle character literals 300s accepts double quotes on a static string 300s can handle a built-in constant parsed as string 300s registers an offense for double quotes within embedded expression 300s registers an offense for double quotes within embedded expression in a heredoc string 300s accepts double quotes on static strings within a method 300s 300s RuboCop::Config 300s #for_badge 300s takes into account the department 300s works if department has no config 300s #file_to_include? 300s when the passed path matches any of patterns to include 300s returns true 300s when the passed path does not match any of patterns to include 300s returns false 300s whether the cop is enabled 300s when an entire cop department is disabled 300s but an individual cop is enabled 300s the cop setting overrides the department 300s when an nested cop department is disabled 300s and an individual cop is not specified 300s the cop setting overrides the department 300s but an individual cop is enabled 300s the cop setting overrides the department 300s when an entire cop department is enabled 300s but an individual cop is disabled 300s still disables the cop 300s when configuration has no mention of a cop 300s enables the cop that is not mentioned 300s when all cops are explicitly enabled by default 300s enables the cop that is not mentioned 300s when all cops are disabled by default 300s disables the cop that is not mentioned 300s when a cop has configuration but no explicit Enabled setting 300s enables the cop by default 300s #deprecation_check 300s when there is AllCops configuration 300s if there are is an Excludes key 300s yields 300s if there are no Excludes or Includes keys 300s does not yield 300s if there are is an Includes key 300s yields 300s when there is no AllCops configuration 300s does not yield 300s #patterns_to_include 300s when config file has AllCops => Include key 300s returns the Include value 300s #possibly_include_hidden? 300s returns true when Include config includes a dotfile in a path 300s returns true when Include config only includes regular paths 300s returns true when Include config includes a regex 300s returns true when Include config includes a toplevel dotfile 300s #file_to_exclude? 300s when the passed path does not match any of patterns to exclude 300s returns false 300s when the passed path matches any of patterns to exclude 300s returns true 300s #patterns_to_exclude 300s when config file has AllCops => Exclude key 300s returns the Exclude value 300s #check 300s when a deprecated configuration is detected 300s prints a warning message for the loaded path 300s #validate 300s when the configuration includes an obsolete EnforcedStyle parameter 300s raises validation error 300s when the configuration includes the obsolete Style/WhileUntilModifier: MaxLineLength parameter 300s raises validation error 300s when the configuration includes multiple but config does not allow 300s raises validation error 300s when the configuration includes multiple valid enforced styles 300s does not raise validation error 300s when the configuration includes any unrecognized cop name 300s raises an validation error 300s when the configuration includes any unrecognized parameter 300s prints a warning message 300s when the empty section is AllCops 300s raises validation error 300s when the configuration includes a valid enforced style 300s does not raise validation error 300s when the configuration includes an invalid enforced style 300s raises validation error 300s when the configuration includes an invalid EnforcedStyle 300s raises validation error 300s when the configuration includes the obsolete Style/IfUnlessModifier: MaxLineLength parameter 300s raises validation error 300s when the configuration includes Lint/Syntax cop 300s when the configuration matches the default 300s does not raise validation error 300s when the configuration does not match the default 300s raises validation error 300s when the configuration includes an empty section 300s raises validation error 300s when the configuration includes multiple valid enforced styles and one invalid style 300s raises validation error 300s when the configuration includes obsolete parameters and cops 300s raises validation error 300s when all cops are both Enabled and Disabled by default 300s raises validation error 300s when the configuration includes any unrecognized cop name and given `--ignore-unrecognized-cops` option 300s there are no unrecognized cops 300s does not print any warnings 300s there is unrecognized cop 300s prints a warning about the cop 300s when the configuration includes a valid EnforcedStyle 300s does not raise validation error 300s when the configuration includes an obsolete parameter 300s raises validation error 300s when the configuration includes multiple invalid enforced styles 300s raises validation error 300s conflicting Safe settings 300s when the configuration includes an unsafe cop without a declaration of its autocorrection 300s does not raise validation error 300s when the configuration includes an unsafe cop that is explicitly declared to have a safe autocorrection 300s raises validation error 300s when the configuration is in the base RuboCop config folder 300s is not validated 300s when the configuration includes any common parameter 300s does not raise validation error 300s when the configuration includes an obsolete cop 300s raises validation error 300s #make_excludes_absolute 300s when config is in root directory 300s generates valid absolute directory 300s when config is in subdirectory 300s generates valid absolute directory 300s #allowed_camel_case_file? 300s when the passed path does not match allowed camel case patterns to include 300s is expected to equal false 300s when the passed path matches allowed camel case patterns to include 300s is expected to equal true 300s when the passed path is a gemspec 300s is expected to equal true 300s #for_department 300s accepts a Symbol 300s always returns the department's config 300s 300s RuboCop::Cop::Lint::MissingSuper 300s constructor 300s registers an offense when no `super` call 300s does not register an offense for the class without parent class 300s does not register an offense for the constructor-like method defined outside of a class 300s does not register an offense for the class with stateless parent class 300s does not register an offense when there is a `super` call 300s callbacks 300s registers no offense when module callback without `super` call 300s does not register an offense when callback has a `super` call 300s registers an offense when class callback without `super` call 300s registers an offense when method callback is without `super` call 300s registers an offense when class callback within `self << class` and without `super` call 300s 300s RuboCop::Cop::Layout::EmptyLinesAroundBeginBody 300s registers an offense for begin body ending in method 300s registers an offense for else body ending 300s registers an offense for begin body starting with a blank 300s accepts begin block without empty line 300s registers an offense for ensure body ending 300s registers an offense for begin body ending with a blank 300s registers an offense for rescue body ending 300s registers an offense for begin body starting in method 300s registers an offense for begin body starting with rescue 300s registers many offenses with complex begin-end 300s accepts begin block without empty line in a method 300s 300s RuboCop::Cop::Lint::RedundantCopDisableDirective 300s .check 300s when there are disabled lines 300s and there are two offenses 300s and a comment disables 300s one cop twice 300s returns an offense 300s one cop and then all cops 301s returns an offense 301s and there is an offense 301s and a comment disables 301s that cop 301s returns no offense 301s that cop but on other lines 301s returns an offense 301s all cops 301s returns no offense 301s and there are no offenses 301s and a comment disables 301s when using a directive comment after a non-directive comment 301s returns an offense 301s itself and all cops 301s disabled on different ranges 301s returns no offense 301s itself and another cop 301s disabled on different ranges 301s returns no offense 301s disabled on the same range 301s returns no offense 301s and the other cop is disabled a second time 301s returns no offense 301s multiple cops, and one of them has offenses 301s returns an offense 301s an unknown cop 301s returns an offense 301s multiple cops 301s returns an offense 301s a cop that is disabled in the config 301s returns an offense 301s if that cop has offenses 301s returns an offense 301s when that cop was previously enabled 301s returns no offense 301s misspelled cops 301s returns an offense 301s comment is not at the beginning of the file 301s and not all cops have offenses 301s returns an offense 301s multiple cops, with abbreviated names 301s one of them has offenses 301s returns an offense 301s multiple cops, and the leftmost one has no offenses 301s returns an offense 301s all cops 301s returns an offense 301s one cop 301s returns an offense 301s when there are no disabled lines 301s returns no offense 301s autocorrecting whitespace 301s when the comment is not the first line of the file 301s preserves whitespace before the comment 301s inline comment 301s removes the comment and preceding whitespace 301s when the comment is the first line of the file 301s followed by code 301s removes the comment 301s followed by another comment 301s removes the comment and newline 301s followed by a newline 301s removes the comment and newline 301s nested inside a namespace 301s preserves indentation 301s when there is only whitespace before the comment 301s leaves the whitespace 301s when there is a blank line before inline comment 301s removes the comment and preceding whitespace 301s with a disabled department 301s does not remove correct department 301s removes cop duplicated by department and leaves free text as a comment 301s removes cop duplicated by department 301s removes entire comment 301s removes cop duplicated by department on previous line 301s removes redundant department 301s 301s RuboCop::Cop::Style::DateTime 301s does not register an offense when using DateTime in another namespace 301s does not register an offense when using DateTime for historic date 301s does not register an offense when using Date for modern date 301s registers an offense when using ::DateTime for current time 301s does not register an offense when using ::DateTime for historic date 301s registers an offense when using DateTime for modern date 301s registers an offense when using DateTime for current time 301s does not register an offense when using Time for current time 301s when configured to not allow #to_datetime 301s registers an offense 301s when configured to allow #to_datetime 301s does not register an offense 301s 301s RuboCop::Cop::Lint::UnmodifiedReduceAccumulator 301s behaves like reduce/inject 301s does not affect inject called without a block 301s does not affect inject called with no block args 301s given a inject block 301s registers an offense when returning an index of the accumulator 301s does not register an offense when returning the accumulator in an expression 301s does not register an offense if the return value cannot be determined 301s does not register an offense when returning the accumulator in a boolean statement 301s does not register an offense when returning a method called on the accumulator 301s registers an offense when returning the element 301s registers an offense when returning an expression with the element 301s does not look inside inner blocks 301s does not register an offense when or-assigning the accumulator 301s registers an offense for values returned with `next` 301s registers an offense with the element in heredoc 301s does not register an offense when comparing 301s does not register an offense when calling a method on the accumulator with the element 301s allows break with no value 301s does not register an offense when mutating the element with the another value 301s allows the element to be the return value if the accumulator is returned in any branch 301s does not register an offense when returning the accumulator 301s registers an offense when returning accumulator[element]= 301s does not register an offense when mutating the element with the accumulator 301s does not register an offense when returning a method called with the accumulator 301s registers an offense for every violating return value 301s registers an offense for values returned with `break` 301s does not register an offense with the accumulator in interpolation 301s does not register an offense when assigning the accumulator 301s does not register an offense when returning a literal 301s does not register an offense with the accumulator in heredoc 301s does not register an offense when shovelling the accumulator 301s does not register an offense when returning accumulator[element] 301s registers an offense when returning an index setter on the accumulator 301s registers an offense when called with no argument 301s does not register an offense when and-assigning the accumulator 301s registers an offense with the element in interpolation 301s registers an offense when mutating the accumulator with the element but not returning it 301s does not register an offense when op-assigning the accumulator 301s numblocks 301s registers an offense when returning the element 301s does not register an offense when when returning the accumulator 301s argument count 301s ignores when there is a splat argument 301s ignores when there are not enough block arguments 301s registers an offense when there are more than two arguments but the element is returned 301s behaves like reduce/inject 301s does not affect reduce called without a block 301s does not affect reduce called with no block args 301s given a reduce block 301s does not register an offense with the accumulator in heredoc 301s does not register an offense when calling a method on the accumulator with the element 301s does not register an offense when mutating the element with the accumulator 301s does not register an offense when shovelling the accumulator 301s does not register an offense when assigning the accumulator 301s registers an offense for every violating return value 301s registers an offense when returning the element 301s does not register an offense when or-assigning the accumulator 301s does not register an offense when returning a method called with the accumulator 301s does not register an offense when returning a method called on the accumulator 301s registers an offense when mutating the accumulator with the element but not returning it 301s does not register an offense when and-assigning the accumulator 301s does not register an offense when mutating the element with the another value 301s does not register an offense when comparing 301s does not register an offense when returning the accumulator in a boolean statement 301s registers an offense when returning an expression with the element 301s registers an offense with the element in interpolation 301s does not register an offense when op-assigning the accumulator 301s does not register an offense with the accumulator in interpolation 301s registers an offense for values returned with `break` 301s allows the element to be the return value if the accumulator is returned in any branch 301s does not register an offense when returning the accumulator in an expression 301s allows break with no value 301s registers an offense when returning accumulator[element]= 301s does not look inside inner blocks 301s registers an offense when returning an index setter on the accumulator 301s does not register an offense when returning accumulator[element] 301s does not register an offense if the return value cannot be determined 301s does not register an offense when returning the accumulator 301s registers an offense when returning an index of the accumulator 301s registers an offense for values returned with `next` 301s registers an offense when called with no argument 301s registers an offense with the element in heredoc 301s does not register an offense when returning a literal 301s numblocks 301s registers an offense when returning the element 301s does not register an offense when when returning the accumulator 301s argument count 301s ignores when there are not enough block arguments 301s ignores when there is a splat argument 301s registers an offense when there are more than two arguments but the element is returned 301s 301s RuboCop::Cop::Metrics::PerceivedComplexity 301s when AllowedPatterns is enabled 301s does not register an offense when defining an instance method 301s does not register an offense when defining a class method 301s does not register an offense when using `define_method` 301s when Max is 1 301s registers an offense for an until block 301s registers an offense for a rescue block 301s registers an offense for a case/when block without an expression after case 301s registers an offense for a while block 301s accepts complex code outside of methods 301s registers an offense for a for block 301s accepts a method with no decision points 301s deals with nested if blocks containing && and || 301s registers an offense for a ternary operator 301s counts known iterating block 301s registers an offense for an unless modifier 301s registers an offense for an if modifier 301s registers an offense for && 301s counts only a single method 301s accepts an empty method 301s registers an offense for and 301s registers an offense for or 301s accepts an empty `define_method` 301s registers an offense for elsif and else blocks 301s registers an offense for || 301s does not count unknown block calls 301s registers an offense for a `define_method` 301s counts else in a case with no argument 301s registers an offense for a case/when block 301s when AllowedMethods is enabled 301s does not register an offense when using `define_method` 301s does not register an offense when defining a class method 301s does not register an offense when defining an instance method 301s when Max is 2 301s counts stupid nested if and else blocks 301s 301s RuboCop::Cop::Layout::DotPosition 301s Leading dots style 301s does not err on method call on same line 301s accepts leading do in multi-line method call 301s does not err on method call with no dots 301s does not err on method call without a method name 301s registers an offense for only dot line 301s registers an offense for trailing dot in multi-line call 301s registers an offense for correct + opposite 301s when the receiver is a heredoc 301s registers an offense 301s when the receiver has a heredoc argument 301s with multiple heredocs 301s registers an offense 301s as the first argument 301s registers an offense 301s as the last argument 301s registers an offense 301s with a dynamic heredoc 301s registers an offense 301s with another method on the same line 301s does not register an offense 301s when using safe navigation operator 301s registers an offense for correct + opposite 301s accepts leading do in multi-line method call 301s with multiple offenses 301s registers all of them 301s when there is an intervening blank line 301s does not register offense 301s when there is an intervening line comment 301s does not register offense 301s when a method spans multiple lines 301s registers an offense 301s Trailing dots style 301s does not err on method call with no dots 301s does not err on method call on same line 301s does not get confused by several lines of chained methods 301s accepts trailing dot in multi-line method call 301s does not err on method call without a method name 301s does not err on method call with multi-line arguments 301s registers an offense for leading dot in multi-line call 301s when using safe navigation operator 301s accepts trailing dot in multi-line method call 301s registers an offense for correct + opposite 301s when the receiver has a heredoc argument 301s as the last argument 301s registers an offense 301s with another method on the same line 301s does not register an offense 301s with multiple heredocs 301s registers an offense 301s with a dynamic heredoc 301s registers an offense 301s as the first argument 301s registers an offense 301s when the receiver is a heredoc 301s registers an offense 301s when there is a heredoc with a following method 301s does not register an offense for a heredoc 301s 301s RuboCop::Cop::Lint::ElseLayout 301s registers an offense and corrects for the entire else body being on the same line 301s accepts proper else 301s accepts ternary ops 301s accepts modifier forms 301s registers an offense and corrects for expr on same line as else 301s registers and corrects an offense when using multiple `elsif`s 301s accepts empty braces 301s does not register an offense for an elsif with no body 301s registers an offense and corrects for elsifs 301s does not register an offense if the entire if is on a single line 301s 301s RuboCop::Cop::Security::JSONLoad 301s registers an offense and corrects JSON.load 301s allows JSON.parse 301s allows JSON.dump 301s registers an offense and corrects JSON.restore 301s does not register an offense for JSON under another namespace 301s 301s RuboCop::MagicComment 301s returns "ascii-8bit" for encoding when comment is #vim: filetype=ruby, fileencoding=ascii-8bit, typed=strict 301s returns nil for frozen_string_literal when comment is # sHaReaBLE-CoNstANT-ValUE: literal 301s returns nil for frozen_string_literal when comment is # xyz shareable_constant_value: literal xyz 301s returns nil for shareable_constant_value when comment is # vim: filetype=ruby, fileencoding=ascii-8bit 301s returns true for frozen_string_literal when comment is # coding: utf-8 -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- 301s returns nil for frozen_string_literal when comment is # frozen_string_literal: true encoding: ascii-8bit 301s returns nil for frozen_string_literal when comment is # shareable_constant_value: experimental_copy 301s returns nil for typed when comment is #vim: filetype=ruby, fileencoding=ascii-8bit, typed=strict 301s returns nil for typed when comment is # @typed 301s returns "ascii-8bit" for encoding when comment is # vim: filetype=python, fileencoding=ascii-8bit 301s returns nil for shareable_constant_value when comment is # eNcOdInG: utf-8 301s returns nil for shareable_constant_value when comment is # vim: filetype=python, fileencoding=ascii-8bit 301s returns nil for typed when comment is # vim: filetype=ruby,fileencoding=ascii-8bit 301s returns "strict" for typed when comment is # typed:strict 301s returns nil for frozen_string_literal when comment is # 301s returns nil for frozen_string_literal when comment is CSV.generate(encoding: Encoding::UTF_8) do |csv| 301s returns "strong" for typed when comment is # typed: strong 301s returns nil for typed when comment is # encoding: utf-8 302s returns "ascii-8bit" for encoding when comment is # frozen_string_literal: true encoding: ascii-8bit 302s returns "ascii-8bit" for encoding when comment is # vim: filetype=ruby, fileencoding=ascii-8bit 302s returns nil for typed when comment is # encoding: stateless-iso-2022-jp-kddi 302s returns nil for shareable_constant_value when comment is # typed: strong 302s returns "true" for typed when comment is # typed: true 302s returns nil for shareable_constant_value when comment is # frozen_string_literal: true 302s returns nil for shareable_constant_value when comment is # 302s returns nil for encoding when comment is # frozen_string_literal: true 302s returns nil for encoding when comment is # typed: true 302s returns nil for frozen_string_literal when comment is # encoding: ascii-8bit frozen_string_literal: true 302s returns nil for frozen_string_literal when comment is # typed: strong 302s returns "utf-8" for encoding when comment is # encoding: utf-8 302s returns "literal" for shareable_constant_value when comment is # shareable_constant_value: literal 302s returns nil for shareable_constant_value when comment is # ENCODING: utf-8 302s returns nil for shareable_constant_value when comment is # coding: utf-8 -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- 302s returns nil for encoding when comment is # typed:strict 302s returns nil for encoding when comment is # typed: false 302s returns nil for frozen_string_literal when comment is # shareable_constant_value: literal 302s returns nil for typed when comment is # coding: utf-8 vim: filetype=ruby, fileencoding=ascii-8bit 302s returns nil for encoding when comment is # fRoZeN-sTrInG_lItErAl: true 302s returns nil for typed when comment is # xyz shareable_constant_value: literal xyz 302s returns nil for shareable_constant_value when comment is # frozen_string_literal: true 302s returns nil for encoding when comment is CSV.generate(encoding: Encoding::UTF_8) do |csv| 302s returns nil for frozen_string_literal when comment is # coding: utf-8 302s returns nil for frozen_string_literal when comment is # typed:strict 302s returns nil for encoding when comment is # typed: strong 302s returns nil for typed when comment is # frozen_string_literal: invalid 302s returns nil for shareable_constant_value when comment is # coding: utf-8 vim: filetype=ruby, fileencoding=ascii-8bit 302s returns nil for typed when comment is # vim: filetype=python, fileencoding=ascii-8bit 302s returns nil for frozen_string_literal when comment is # vim: filetype=ruby, fileencoding=ascii-8bit 302s returns nil for frozen_string_literal when comment is # incoding: utf-8 302s returns nil for frozen_string_literal when comment is # ENCODING: utf-8 302s returns "utf-8" for encoding when comment is # ENCODING: utf-8 302s returns "utf-8" for encoding when comment is # coding: utf-8 302s returns nil for shareable_constant_value when comment is # fRoZeN-sTrInG_lItErAl: true 302s returns nil for typed when comment is # coding: utf-8 302s returns nil for frozen_string_literal when comment is # shareable_constant_value: none 302s returns nil for typed when comment is # encoding: ascii-8bit frozen_string_literal: true 302s returns true for frozen_string_literal when comment is # frozen_string_literal:true 302s returns nil for frozen_string_literal when comment is # vim: filetype=ruby,fileencoding=ascii-8bit 302s returns nil for frozen_string_literal when comment is # SHAREABLE-CONSTANT-VALUE: literal 302s returns nil for typed when comment is # frozen_string_literal: true 302s returns nil for frozen_string_literal when comment is #typed:strict 302s returns nil for typed when comment is # -*- encoding : ascii-8bit -*- 302s returns nil for typed when comment is # vim:fileencoding=utf-8 302s returns nil for shareable_constant_value when comment is # typed:strict 302s returns "literal" for shareable_constant_value when comment is # shareable_constant_value:literal 302s returns nil for encoding when comment is # frozen-string-literal: true 302s returns nil for shareable_constant_value when comment is # coding: utf-8 302s returns nil for shareable_constant_value when comment is # typed: true 302s returns "literal" for shareable_constant_value when comment is # SHAREABLE-CONSTANT-VALUE: literal 302s returns nil for encoding when comment is #typed:strict 302s returns nil for shareable_constant_value when comment is # -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- 302s returns nil for encoding when comment is # xyz shareable_constant_value: literal xyz 302s returns nil for shareable_constant_value when comment is CSV.generate(encoding: Encoding::UTF_8) do |csv| 302s returns nil for encoding when comment is # typed: ignore 302s returns nil for typed when comment is # xyz shareable_constant_value: literal 302s returns "ascii-8bit" for encoding when comment is # -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- 302s returns nil for typed when comment is # 302s returns nil for typed when comment is # shareable_constant_value:literal 302s returns nil for typed when comment is # frozen_string_literal: false 302s returns "ignore" for typed when comment is # typed: ignore 302s returns nil for typed when comment is # shareable_constant_value: none 302s returns "none" for shareable_constant_value when comment is # shareable_constant_value: none 302s returns nil for frozen_string_literal when comment is # shareable-constant-value: literal 302s returns nil for frozen_string_literal when comment is # shareable_constant_value:literal 302s returns nil for typed when comment is # -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- 302s returns nil for encoding when comment is # xyz shareable_constant_value: literal 302s returns nil for encoding when comment is # @typed 302s returns nil for frozen_string_literal when comment is # vim: filetype=python, fileencoding=ascii-8bit 302s returns "invalid" for frozen_string_literal when comment is # frozen_string_literal: invalid 302s returns nil for typed when comment is # vim: filetype=ruby, fileencoding=ascii-8bit 302s returns nil for typed when comment is # -*- coding: ASCII-8BIT; typed: strict -*- 302s returns nil for encoding when comment is # shareable_constant_value: experimental_copy 302s returns nil for encoding when comment is # incoding: utf-8 302s returns nil for frozen_string_literal when comment is #vim: filetype=ruby, fileencoding=ascii-8bit 302s returns nil for frozen_string_literal when comment is # typed: true 302s returns "experimental_copy" for shareable_constant_value when comment is # shareable_constant_value: experimental_copy 302s returns nil for encoding when comment is # typed: strict 302s returns nil for typed when comment is # sHaReaBLE-CoNstANT-ValUE: literal 302s returns nil for frozen_string_literal when comment is # coding: utf-8 vim: filetype=ruby, fileencoding=ascii-8bit 302s returns nil for typed when comment is # shareable-constant-value: literal 302s returns nil for shareable_constant_value when comment is # frozen_string_literal:true 302s returns nil for typed when comment is # frozen-string-literal: true 302s returns nil for typed when comment is # vim: filetype=ruby, fileencoding=ascii-8bit 302s returns true for frozen_string_literal when comment is # FROZEN-STRING-LITERAL: true 302s returns nil for frozen_string_literal when comment is # shareable_constant_value: experimental_everything 302s returns true for frozen_string_literal when comment is # -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- 302s returns nil for typed when comment is # frozen_string_literal: true 302s returns nil for encoding when comment is # FROZEN-STRING-LITERAL: true 302s returns nil for shareable_constant_value when comment is # frozen_string_literal: true encoding: ascii-8bit 302s returns nil for shareable_constant_value when comment is # typed: false 302s returns nil for frozen_string_literal when comment is # typed: ignore 302s returns nil for encoding when comment is # shareable_constant_value: none 302s returns nil for shareable_constant_value when comment is # typed: ignore 302s returns nil for encoding when comment is # vim:fileencoding=utf-8 302s returns nil for typed when comment is # coding: utf-8 -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- 302s returns "ascii-8bit" for encoding when comment is # coding: utf-8 -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- 302s returns "stateless-iso-2022-jp-kddi" for encoding when comment is # encoding: stateless-iso-2022-jp-kddi 302s returns nil for frozen_string_literal when comment is # xyz shareable_constant_value: literal 302s returns nil for shareable_constant_value when comment is # -*- encoding : ascii-8bit -*- 302s returns nil for shareable_constant_value when comment is # frozen_string_literal: false 302s returns nil for frozen_string_literal when comment is # -*- encoding : ascii-8bit -*- 302s returns nil for encoding when comment is # frozen_string_literal: invalid 302s returns "ascii-8bit" for encoding when comment is # encoding: ascii-8bit frozen_string_literal: true 302s returns nil for frozen_string_literal when comment is # @typed 302s returns nil for typed when comment is # shareable_constant_value: experimental_everything 302s returns "strict" for typed when comment is #typed:strict 302s returns nil for shareable_constant_value when comment is #typed:strict 302s returns "ascii-8bit" for encoding when comment is # -*- coding: ASCII-8BIT; typed: strict -*- 302s returns true for frozen_string_literal when comment is # fRoZeN-sTrInG_lItErAl: true 302s returns true for frozen_string_literal when comment is # -*- frozen-string-literal: true -*- 302s returns nil for typed when comment is #vim: filetype=ruby, fileencoding=ascii-8bit 302s returns nil for shareable_constant_value when comment is # -*- frozen-string-literal: true -*- 302s returns nil for frozen_string_literal when comment is # vim: filetype=ruby, fileencoding=ascii-8bit 302s returns "literal" for shareable_constant_value when comment is # shareable-constant-value: literal 302s returns true for frozen_string_literal when comment is # frozen-string-literal: true 302s returns nil for shareable_constant_value when comment is # incoding: utf-8 302s returns nil for encoding when comment is # frozen_string_literal: true 302s returns nil for encoding when comment is # shareable_constant_value: experimental_everything 302s returns nil for frozen_string_literal when comment is # eNcOdInG: utf-8 302s returns nil for shareable_constant_value when comment is # vim: filetype=ruby,fileencoding=ascii-8bit 302s returns nil for shareable_constant_value when comment is # encoding: ascii-8bit frozen_string_literal: true 302s returns nil for typed when comment is # eNcOdInG: utf-8 302s returns "ascii-8bit" for encoding when comment is # -*- encoding : ascii-8bit -*- 302s returns false for frozen_string_literal when comment is # frozen_string_literal: false 302s returns nil for frozen_string_literal when comment is # encoding: stateless-iso-2022-jp-kddi 302s returns "utf-8" for encoding when comment is # coding: utf-8 302s returns nil for encoding when comment is # shareable_constant_value:literal 302s returns nil for shareable_constant_value when comment is # frozen_string_literal: invalid 302s returns "ascii-8bit" for encoding when comment is #vim: filetype=ruby, fileencoding=ascii-8bit 302s returns nil for encoding when comment is # SHAREABLE-CONSTANT-VALUE: literal 302s returns nil for shareable_constant_value when comment is # vim:fileencoding=utf-8 302s returns nil for typed when comment is # FROZEN-STRING-LITERAL: true 302s returns nil for frozen_string_literal when comment is # typed: false 302s returns true for frozen_string_literal when comment is # frozen_string_literal: true 302s returns nil for encoding when comment is # sHaReaBLE-CoNstANT-ValUE: literal 302s returns "ascii-8bit" for encoding when comment is # vim: filetype=ruby, fileencoding=ascii-8bit 302s returns nil for typed when comment is # coding: utf-8 302s returns nil for frozen_string_literal when comment is # vim:fileencoding=utf-8 302s returns nil for shareable_constant_value when comment is # encoding: utf-8 302s returns nil for encoding when comment is # frozen_string_literal: false 302s returns "literal" for shareable_constant_value when comment is # sHaReaBLE-CoNstANT-ValUE: literal 302s returns nil for encoding when comment is # vim: filetype=ruby,fileencoding=ascii-8bit 302s returns nil for typed when comment is # shareable_constant_value: literal 302s returns nil for frozen_string_literal when comment is # -*- coding: ASCII-8BIT; typed: strict -*- 302s returns nil for frozen_string_literal when comment is #vim: filetype=ruby, fileencoding=ascii-8bit, typed=strict 302s returns nil for frozen_string_literal when comment is # typed: strict 302s returns nil for frozen_string_literal when comment is # coding: utf-8 302s returns nil for shareable_constant_value when comment is #vim: filetype=ruby, fileencoding=ascii-8bit, typed=strict 302s returns nil for typed when comment is # SHAREABLE-CONSTANT-VALUE: literal 302s returns nil for encoding when comment is # frozen_string_literal:true 302s returns nil for encoding when comment is # shareable_constant_value: literal 302s returns nil for encoding when comment is # -*- frozen-string-literal: true -*- 302s returns "utf-8" for encoding when comment is # eNcOdInG: utf-8 302s returns true for frozen_string_literal when comment is # frozen_string_literal: true 302s returns "strict" for typed when comment is # typed: strict 302s returns nil for shareable_constant_value when comment is # @typed 302s returns nil for typed when comment is # shareable_constant_value: experimental_copy 302s returns nil for shareable_constant_value when comment is # coding: utf-8 302s returns "experimental_everything" for shareable_constant_value when comment is # shareable_constant_value: experimental_everything 302s returns nil for typed when comment is # frozen_string_literal:true 302s returns nil for typed when comment is # fRoZeN-sTrInG_lItErAl: true 302s returns nil for encoding when comment is # shareable-constant-value: literal 302s returns nil for frozen_string_literal when comment is # encoding: utf-8 302s returns nil for shareable_constant_value when comment is #vim: filetype=ruby, fileencoding=ascii-8bit 302s returns nil for shareable_constant_value when comment is # encoding: stateless-iso-2022-jp-kddi 302s returns nil for shareable_constant_value when comment is # xyz shareable_constant_value: literal xyz 302s returns nil for typed when comment is # incoding: utf-8 302s returns "false" for typed when comment is # typed: false 302s returns nil for shareable_constant_value when comment is # vim: filetype=ruby, fileencoding=ascii-8bit 302s returns nil for shareable_constant_value when comment is # xyz shareable_constant_value: literal 302s returns "utf-8" for encoding when comment is # coding: utf-8 vim: filetype=ruby, fileencoding=ascii-8bit 302s returns nil for typed when comment is # -*- frozen-string-literal: true -*- 302s returns nil for typed when comment is # ENCODING: utf-8 302s returns nil for encoding when comment is # 302s returns nil for typed when comment is # frozen_string_literal: true encoding: ascii-8bit 302s returns nil for shareable_constant_value when comment is # frozen-string-literal: true 302s returns nil for shareable_constant_value when comment is # FROZEN-STRING-LITERAL: true 302s returns nil for shareable_constant_value when comment is # -*- coding: ASCII-8BIT; typed: strict -*- 302s returns nil for typed when comment is CSV.generate(encoding: Encoding::UTF_8) do |csv| 302s returns nil for shareable_constant_value when comment is # typed: strict 302s #without 302s simple format 302s when the entire comment is a single value 302s is expected to eq "" 302s when the comment contains a different magic value 302s is expected to eq "# frozen-string-literal: true" 302s emacs format 302s with multiple tokens 302s is expected to eq "# -*- frozen_string_literal: true -*-" 302s with one token 302s is expected to eq "" 302s vim format 302s when the comment has multiple tokens 302s is expected to eq "# vim: filetype=ruby" 302s #valid_shareable_constant_value? 302s when given comment specified as `literal` 302s is expected to equal true 302s when given comment specified as `none` 302s is expected to equal true 302s when given comment is not specified 302s is expected to equal false 302s when given comment specified as `experimental_copy` 302s is expected to equal true 302s when given comment specified as `experimental_everything` 302s is expected to equal true 302s when given comment specified as unknown value 302s is expected to equal false 302s #valid? 302s with an empty string 302s is expected to equal false 302s with an encoding comment 302s is expected to equal true 302s with a non magic comment 302s is expected to equal false 302s with an frozen string literal comment 302s is expected to equal true 302s with an shareable constant value comment 302s is expected to equal true 302s 302s RuboCop::Cop::Layout::CommentIndentation 302s when allow_for_alignment is false 302s registers an offense and corrects 302s registers an offense for comments with extra indentation 302s registers offenses and corrects before __END__ but not after 302s on outer level 302s registers an offense and corrects a documentation comment 302s accepts a correctly indented comment 302s registers an offense for each incorrectly indented comment 302s accepts a comment that follows code 302s registers an offense and corrects an incorrectly indented (2) comment 302s registers an offense and corrects an incorrectly indented (1) comment 302s near various kinds of brackets 302s is unaffected by closing bracket that does not begin a line 302s accepts correctly indented comments 302s around program structure keywords 302s accepts correctly indented comments 302s with a blank line following the comment 302s accepts a correctly indented comment 302s when allow_for_alignment is true 302s registers offenses and corrects before __END__ but not after 302s registers an offense and corrects 302s accepts comments with extra indentation if aligned with comment on previous line 302s near various kinds of brackets 302s accepts correctly indented comments 302s is unaffected by closing bracket that does not begin a line 302s on outer level 302s registers an offense and corrects an incorrectly indented (1) comment 302s registers an offense and corrects a documentation comment 302s accepts a correctly indented comment 302s registers an offense and corrects an incorrectly indented (2) comment 302s accepts a comment that follows code 302s registers an offense for each incorrectly indented comment 302s around program structure keywords 302s accepts correctly indented comments 302s with a blank line following the comment 302s accepts a correctly indented comment 302s 302s RuboCop::Cop::Style::IfInsideElse 302s ignores if inside unless 302s catches an `if..else` nested inside an `else` and nested inside `if` branch code is empty 302s isn't offended by if..elsif..else 302s catches a modifier if nested inside an else after elsif 302s handles a nested multiline `if...then...elsif...else...end` 302s isn't offended if there is a statement following the if node 302s handles a nested `if...then...else...end` 302s catches an if..elsif..else nested inside an else 302s ignores ternary inside if..else 302s ignores unless inside else 302s catches an if..else nested inside an else 302s catches an if node nested inside an else 302s handles a nested `if...then...elsif...else...end` 302s ignores nested ternary expressions 302s handles a nested `if...then...elsif...end` 302s handles a nested `if...then...end` 302s isn't offended if there is a statement preceding the if node 302s when AllowIfModifier is false 302s catches a modifier if nested inside an else 302s when AllowIfModifier is true 302s accepts a modifier if nested inside an else 302s 302s RuboCop::Cop::Lint::DuplicateMagicComment 302s registers an offense when same encoding magic comments are duplicated 302s does not register an offense when frozen magic comments are not duplicated 302s does not register an offense when encoding magic comments are not duplicated 302s registers an offense when frozen magic comments are duplicated 302s does not register an offense when encoding and frozen magic comments are not duplicated 302s registers an offense when different encoding magic comments are duplicated 302s registers an offense when encoding and frozen magic comments are duplicated 302s 302s RuboCop::Cop::Style::RedundantConditional 302s registers an offense for ternary with boolean results 302s registers an offense for if/elsif/else with boolean results 302s does not register an offense for if/elsif/else with non-boolean results 302s registers an offense for if/else with negated boolean results 302s registers an offense for if/else with boolean results 302s does not register an offense for if/else with non-boolean results 302s registers an offense for if/elsif/else with negated boolean results 302s registers an offense for ternary with negated boolean results 302s allows ternary with non-boolean results 302s 302s RuboCop::Cop::Style::UnpackFirst 302s ruby version >= 2.4 302s registers offense 302s when using `#unpack` with square brackets 302s when using `#unpack` with `#first` 302s when using `#unpack` with `#at` 302s when using `#unpack` with dot and square brackets 302s when using `#unpack` with `#slice` 302s does not register offense 302s when using `#unpack` accessing second element 302s when using `#unpack1` 302s 302s RuboCop::Cop::Lint::EmptyEnsure 302s does not register an offense for non-empty ensure 302s registers an offense and corrects empty ensure 302s 302s RuboCop::Cop::Naming::VariableName 302s when configured for snake_case 302s registers an offense for default method arguments 302s registers an offense for rest arguments 302s registers an offense for camel case local variables marked as unused 302s accepts assigning to camel case constant 302s registers an offense for camel case in local variable name 302s registers an offense for block arguments 302s accepts assignment with indexing of self 302s accepts local variables marked as unused 302s registers an offense for keyword rest arguments 302s accepts one symbol size local variables 302s registers an offense for camel case in class variable name 302s registers an offense for correct + opposite 302s registers an offense for method arguments 302s registers an offense for keyword arguments 302s registers an offense for camel case when invoking method args 302s accepts screaming snake case globals 302s registers an offense for camel case in instance variable name 302s accepts screaming snake case constants 302s when AllowedIdentifiers is set 302s does not register an offense for a local variable name that is allowed 302s does not register an offense for a symbol that is allowed 302s does not register an offense for a global variable name that is allowed 302s does not register an offense for a class variable name that is allowed 302s does not register an offense for a instance variable name that is allowed 302s does not register an offense for a method name that is allowed 302s when AllowedPatterns is set 302s does not register an offense for a global variable name that matches the allowed pattern 302s does not register an offense for a class variable name that matches the allowed pattern 302s does not register an offense for a method name that matches the allowed pattern 302s does not register an offense for a instance variable name that matches the allowed pattern 302s does not register an offense for a local variable name that matches the allowed pattern 302s does not register an offense for a symbol that matches the allowed pattern 302s when configured for camelCase 302s registers an offense for snake case in method parameter 302s registers an offense for keyword arguments 302s registers an offense for rest arguments 302s accepts screaming snake case globals 302s accepts camel case in class variable name 302s accepts camel case local variables marked as unused 302s registers an offense for block arguments 302s accepts with non-ascii characters 302s accepts assigning to camel case constant 302s registers an offense for snake case in local variable name 302s registers an offense for camel case when invoking method args 302s accepts screaming snake case constants 302s accepts camel case in instance variable name 302s registers an offense for keyword rest arguments 302s accepts local variables marked as unused 302s accepts assignment with indexing of self 302s registers an offense for default method arguments 302s accepts camel case in local variable name 302s accepts one symbol size local variables 302s registers an offense for opposite + correct 302s when AllowedPatterns is set 302s does not register an offense for a symbol that matches the allowed pattern 302s does not register an offense for a instance variable name that matches the allowed pattern 302s does not register an offense for a method name that matches the allowed pattern 302s does not register an offense for a global variable name that matches the allowed pattern 302s does not register an offense for a class variable name that matches the allowed pattern 302s does not register an offense for a local variable name that matches the allowed pattern 302s when AllowedIdentifiers is set 302s does not register an offense for a instance variable name that is allowed 302s does not register an offense for a symbol that is allowed 302s does not register an offense for a method name that is allowed 302s does not register an offense for a class variable name that is allowed 302s does not register an offense for a local variable name that is allowed 302s does not register an offense for a global variable name that is allowed 302s 302s RuboCop::Cop::Style::Encoding 302s does not register an offense when encoding is in the wrong place 302s registers an offense and corrects the magic comment follows another magic comment 302s does not register an offense on a different magic comment type 302s registers an offense when encoding present and UTF-8 302s registers an offense and corrects if there are multiple encoding magic comments 302s does not register an offense when encoding present but not UTF-8 302s registers an offense when encoding present on 2nd line after shebang 302s does not register an offense when no encoding present 302s does not register an offense when encoding is not at the top of the file 302s vim comments 302s registers an offense and corrects 302s emacs comment 302s registers an offense for encoding 302s only removes encoding if there are other editor comments 302s 302s RuboCop::Cop::Style::SymbolProc 302s registers an offense when receiver is a hash literal and using `max` with a block 302s autocorrects multiple aliases with symbols as proc 302s accepts proc with 1 argument 302s accepts block when method in body is not called on block arg 302s accepts block with splat params 302s registers an offense when receiver is some value and using `select` with a block 302s does not register an offense when receiver is a array literal and using `max` with a block 302s registers an offense for a block with parameterless method call on param 302s accepts lambda with 1 argument 302s accepts block with adding a comma after the sole argument 302s accepts block with more than 1 arguments 302s does not crash with a bare method call 302s registers an offense when receiver is some value and using `reject` with a block 302s registers an offense for a block when method in body is unary -/+ 302s accepts ::Proc.new with 1 argument 302s accepts block with a block argument 302s autocorrects correctly when args have a trailing comma 302s accepts block with more than 1 expression in body 302s accepts a block with an unused argument with an lvar 302s registers an offense when receiver is an array literal and using `reject` with a block 302s accepts empty block body 302s registers an offense for safe navigation operator 302s registers an offense when receiver is a hash literal and using `min` with a block 302s does not register an offense when receiver is a hash literal and using `reject` with a block 302s does not register an offense when receiver is a hash literal and using `select` with a block 302s does not register an offense when receiver is a array literal and using `min` with a block 302s accepts block with no arguments 302s registers an offense when receiver is an array literal and using `select` with a block 302s autocorrects correctly when there are no arguments in parentheses 302s accepts Proc.new with 1 argument 302s accepts a block with an unused argument with an method call 302s when `AllowMethodsWithArguments: false` 302s when `super` has arguments 302s registers an offense 302s when method has arguments 302s registers an offense 302s when `super` has no arguments 302s registers an offense 302s numblocks 302s accepts block with only second numbered parameter 302s does not register an offense when receiver is a hash literal and using `reject` with a numblock 302s does not register an offense when receiver is a hash literal and using `select` with a numblock 302s accepts proc with 1 numbered parameter 302s accepts block with multiple numbered parameters 302s registers an offense when receiver is some value and using `reject` with a numblock 302s registers an offense for a block with a numbered parameter 302s accepts ::Proc.new with 1 numbered parameter 302s registers an offense when receiver is an hash literal and using `max` with a numblock 302s does not register an offense when receiver is a array literal and using `min` with a numblock 302s registers an offense when receiver is an array literal and using `select` with a numblock 302s registers an offense when receiver is an hash literal and using `min` with a numblock 302s accepts Proc.new with 1 numbered parameter 302s registers an offense when receiver is an array literal and using `reject` with a numblock 302s does not register an offense when receiver is a array literal and using `max` with a numblock 302s accepts lambda with 1 numbered parameter 302s registers an offense when receiver is some value and using `select` with a numblock 302s when the method has arguments 302s registers an offense 302s when `AllowMethodsWithArguments: true` 302s when `super` has arguments 302s does not register an offense 302s when method has arguments 302s does not register an offense 302s when method has no arguments 302s registers an offense 302s AllowComments: true 302s registers an offense for a block with parameterless method call on paramand not contains a comment 302s accepts block with parameterless method call on param and contains a comment 302s when AllowedPatterns is enabled 302s accepts ignored method 302s when AllowedMethods is enabled 302s accepts ignored method 302s 302s RuboCop::Cop::Style::StaticClass 302s registers an offense when class has only class method 302s does not register an offense when class has instance method 302s registers an offense when class has assignments along with class methods 302s does not register an offense when class includes/prepends a module 302s does not register an offense when class has macro-like method 302s does not register an offense when class is empty 302s does not register an offense when class has `class << self` with macro calls 302s does not register an offense when class has a parent 302s registers an offense when class has `class << self` with class methods 302s does not register an offense for modules 302s registers an offense when class extends a module 302s 302s RuboCop::Cop::Lint::DuplicateRegexpCharacterClassElement 302s with a repeated character posix character class inside a group 302s registers an offense and corrects 302s with repeated character class elements when `"\0\08"` (means `"\u0000\u00008"`) 302s registers an offense 302s with a repeated character class element and %r{} literal 302s registers an offense and corrects 302s with no repeated character class elements 302s does not register an offense 302s with a repeated range element 302s registers an offense and corrects 302s with multiple regexps with the same interpolation 302s does not register an offense 302s with a repeated character class element 302s registers an offense and corrects 302s with repeated elements in different character classes 302s does not register an offense 302s with a repeated intersection character class 302s does not register an offense 302s with a repeated character class element with interpolation 302s registers an offense and corrects 302s with a repeated character class element inside a group 302s registers an offense and corrects 302s with a repeated character class element with quantifier 302s registers an offense and corrects 302s with no repeated character class elements when `"\0\07"` (means `"\u0000\a"`) 302s does not register an offense 302s with a range that covers a repeated element character class 302s does not register an offense 302s 302s RuboCop::ResultCache 302s .cleanup 302s removes the oldest files in the cache if needed 302s the cache path 302s when CacheRootDirectory is set 302s contains the given root 302s and RUBOCOP_CACHE_ROOT is set 302s contains the root from RUBOCOP_CACHE_ROOT 302s when CacheRootDirectory not set 302s and XDG_CACHE_HOME is not set 302s contains $HOME/.cache 302s and XDG_CACHE_HOME is set 302s contains the given path and UID 302s cached result that was saved with no command line option 302s when --display-cop-names is given 302s is invalid 302s when offenses are saved 302s an offense with status new_status 302s serializes them with new_status status 302s an offense with status uncorrected 302s serializes them with uncorrected status 302s an offense with status unsupported 302s serializes them with unsupported status 302s an offense with status corrected 302s serializes them with uncorrected status 302s an offense with status corrected_with_todo 302s serializes them with uncorrected status 302s when no option is given 302s is valid and can be loaded 302s when file permission have changed 303s is invalid 303s when file contents have changed 303s is invalid 303s when team external_dependency_checksum is the same 303s is valid 303s when team external_dependency_checksum changes 303s is invalid 303s when a symlink is present in the cache location 303s and symlink attack protection is disabled 303s permits caching and prints no warning 303s and symlink attack protection is enabled 303s prevents caching and prints a warning 303s when end of line characters have changed 303s is invalid 303s when --format is given 303s is valid and can be loaded 303s when --cache-root is given 303s takes the cache_root from the options 303s when a cache source is read 303s has utf8 encoding 303s when --only is given 303s is invalid 303s #save 303s when the @path is not writable 303s behaves like invalid cache location 303s doesn't raise an exception 303s behaves like invalid cache location 303s doesn't raise an exception 303s when the default internal encoding is UTF-8 303s writes non UTF-8 encodable data to file with no exception 303s 303s RuboCop::Cop::Lint::ConstantResolution 303s registers no offense when qualifying a const 303s registers no offense qualifying a namespace const 303s registers an offense not qualifying a namespace const 303s registers an offense not qualifying a const 303s with Ignore set 303s registers no offense qualifying a namespace const 303s registers no offense when an unqualified namespace const 303s registers no offense with an unqualified const 303s registers no offense when qualifying a const 303s registers an offense not qualifying another const 303s registers an with a namespace const 303s module & class definitions 303s does not register offense 303s with Only set 303s registers no with a namespace const 303s registers no offense not qualifying another const 303s registers no offense qualifying a namespace const 303s registers an offense with an unqualified const 303s registers an offense when an unqualified namespace const 303s registers no offense when qualifying a const 303s 303s RuboCop::Cop::Style::SwapValues 303s handles comments when correcting 303s does not register an offense when idiomatically swapping variables 303s does not register an offense when almost swapping variables 303s does not register an offense when assigning receiver object at `def` 303s behaves like verbosely swapping 303s registers an offense and corrects when verbosely swapping local variables 303s behaves like verbosely swapping 303s registers an offense and corrects when verbosely swapping constant variables 303s behaves like verbosely swapping 303s registers an offense and corrects when verbosely swapping global variables 303s behaves like verbosely swapping 303s registers an offense and corrects when verbosely swapping constant with namespaces variables 303s behaves like verbosely swapping 303s registers an offense and corrects when verbosely swapping instance variables 303s behaves like verbosely swapping 303s registers an offense and corrects when verbosely swapping mixed variables 303s behaves like verbosely swapping 303s registers an offense and corrects when verbosely swapping class variables 303s 303s RuboCop::Cop::Layout::SpaceAroundKeyword 303s behaves like accept after 303s accepts `(` after keyword in `return(1)` 303s behaves like missing before 303s registers an offense for missing space before keyword in `if a; ""else end` 303s behaves like accept before 303s accepts `||` before keyword in `a||begin end` 303s behaves like accept before 303s accepts `!` before keyword in `!yield` 303s behaves like missing after 303s registers an offense for missing space after keyword in `case a; when b; else"" end` and autocorrects 303s behaves like missing after 303s registers an offense for missing space after keyword in `begin rescue; else"" end` and autocorrects 303s behaves like accept before 303s accepts `|` before keyword in `loop { |x|break }` 303s behaves like missing after 303s registers an offense for missing space after keyword in `begin ensure"" end` and autocorrects 303s behaves like accept after 303s accepts `{` after keyword in `loop{}` 303s behaves like accept after 303s accepts `+` after keyword in `+begin end` 303s behaves like missing before 303s registers an offense for missing space before keyword in `a do "a"end` 303s behaves like accept before 303s accepts `+` before keyword in `a+begin; end.method` 303s behaves like missing after 303s registers an offense for missing space after keyword in `while 1 do"x" end` and autocorrects 303s behaves like accept before 303s accepts `*` before keyword in `a*begin end` 303s behaves like missing after 303s registers an offense for missing space after keyword in `case"" when 1; end` and autocorrects 303s behaves like missing after 303s registers an offense for missing space after keyword in `yield""` and autocorrects 303s behaves like missing after 303s registers an offense for missing space after keyword in `until 1 do"x" end` and autocorrects 303s behaves like missing after 303s registers an offense for missing space after keyword in `unless""; end` and autocorrects 303s behaves like missing after 303s registers an offense for missing space after keyword in `if a; else"" end` and autocorrects 303s behaves like accept around 303s accepts `{}` around keyword in `{a: begin end}` 303s >= Ruby 2.7 303s behaves like missing after 303s registers an offense for missing space after keyword in `case""; in 1; end` and autocorrects 303s behaves like missing after 303s registers an offense for missing space after keyword in `1 and(2)` and autocorrects 303s behaves like accept after 303s accepts `::` after keyword in `super::ModuleName` 303s behaves like accept after 303s accepts `[` after keyword in `super[1]` 303s behaves like missing after 303s registers an offense for missing space after keyword in `for x in [] do"x" end` and autocorrects 303s behaves like missing before 303s registers an offense for missing space before keyword in `1and 2` 303s behaves like accept around 303s accepts `;` around keyword in `test do;end` 303s behaves like missing after 303s registers an offense for missing space after keyword in `a rescue""` and autocorrects 303s behaves like accept around 303s accepts `[]` around keyword in `[begin end]` 303s behaves like missing before 303s registers an offense for missing space before keyword in `begin ""ensure end` 303s behaves like accept before 303s accepts `>` before keyword in `a>begin end` 303s >= Ruby 2.7 303s behaves like missing before 303s registers an offense for missing space before keyword in `case a; in b; ""else end` 303s behaves like missing after 303s registers an offense for missing space after keyword in `case a; in "pattern" if"condition"; else "" end` and autocorrects 303s behaves like missing before 303s registers an offense for missing space before keyword in `case a; in "pattern"if "condition"; else "" end` 303s behaves like missing after 303s registers an offense for missing space after keyword in `case a; in b; else"" end` and autocorrects 303s behaves like missing before 303s registers an offense for missing space before keyword in `case a; in "pattern"unless "condition"; else "" end` 303s behaves like missing after 303s registers an offense for missing space after keyword in `case a; in "pattern" unless"condition"; else "" end` and autocorrects 303s behaves like missing after 303s registers an offense for missing space after keyword in `super""` and autocorrects 303s behaves like missing after 303s registers an offense for missing space after keyword in `not""` and autocorrects 303s behaves like accept around 303s accepts `[]` around keyword in `a[begin end]` 303s behaves like accept after 303s accepts `[` after keyword in `yield[1]` 303s behaves like missing after 303s registers an offense for missing space after keyword in `1 while""` and autocorrects 303s behaves like accept before 303s accepts `==` before keyword in `a==begin end` 303s behaves like accept after 303s accepts `(` after keyword in `not(1)` 303s &. 303s behaves like accept after 303s accepts `&.` after keyword in `yield&.foo` 303s behaves like accept after 303s accepts `&.` after keyword in `super&.foo` 303s behaves like accept after 303s accepts `rescue` after keyword in `begin; rescue(Error); end` 303s behaves like accept before 303s accepts `!` before keyword in `!super.method` 303s behaves like missing after 303s registers an offense for missing space after keyword in `if a; elsif""; end` and autocorrects 303s behaves like missing before 303s registers an offense for missing space before keyword in `1while ""` 303s >= Ruby 3.0 303s behaves like accept after 303s accepts `=>` after keyword in `a =>""` 303s behaves like accept before 303s accepts `=>` before keyword in `""=> a` 303s behaves like accept before 303s accepts `+` before keyword in `a+begin end` 303s behaves like accept after 303s accepts `.` after keyword in `begin end.inspect` 303s behaves like accept before 303s accepts `**` before keyword in `a**begin end` 303s behaves like accept before 303s accepts `/` before keyword in `a/begin end` 303s behaves like missing after 303s registers an offense for missing space after keyword in `next""` and autocorrects 303s behaves like missing after 303s registers an offense for missing space after keyword in `begin+1 end` and autocorrects 303s behaves like missing before 303s registers an offense for missing space before keyword in `until 1 do "x"end` 303s behaves like missing before 303s registers an offense for missing space before keyword in `1until ""` 303s behaves like missing after 303s registers an offense for missing space after keyword in `if a then"" end` and autocorrects 303s behaves like missing after 303s registers an offense for missing space after keyword in `defined?1` and autocorrects 303s behaves like accept after 303s accepts `(` after keyword in `break(1)` 303s behaves like missing after 303s registers an offense for missing space after keyword in `begin"" end` and autocorrects 303s behaves like missing after 303s registers an offense for missing space after keyword in `END{}` and autocorrects 303s behaves like accept after 303s accepts `(` after keyword in `super(1)` 303s behaves like missing after 303s registers an offense for missing space after keyword in `1 or(2)` and autocorrects 303s behaves like missing before 303s registers an offense for missing space before keyword in `a "b"do end` 303s behaves like accept before 303s accepts `<` before keyword in `a= Ruby 2.7 303s behaves like missing before 303s registers an offense for missing space before keyword in `""in a` 303s behaves like missing after 303s registers an offense for missing space after keyword in `a in""` and autocorrects 303s behaves like missing after 303s registers an offense for missing space after keyword in `case a; in""; end` and autocorrects 303s behaves like accept before 303s accepts `=` before keyword in `a=begin end` 303s behaves like missing after 303s registers an offense for missing space after keyword in `break""` and autocorrects 303s behaves like accept around 303s accepts `()` around keyword in `(next)` 303s behaves like missing before 303s registers an offense for missing space before keyword in `until 1do end` 303s behaves like missing before 303s registers an offense for missing space before keyword in `if a; ""elsif b; end` 303s behaves like missing after 303s registers an offense for missing space after keyword in `a do|x| end` and autocorrects 303s behaves like accept after 303s accepts `(` after keyword in `next(1)` 303s behaves like missing after 303s registers an offense for missing space after keyword in `if""; end` and autocorrects 303s behaves like missing before 303s registers an offense for missing space before keyword in `1or 2` 303s behaves like missing after 303s registers an offense for missing space after keyword in `1 until""` and autocorrects 303s behaves like missing after 303s registers an offense for missing space after keyword in `return""` and autocorrects 303s behaves like missing after 303s registers an offense for missing space after keyword in `case a when""; end` and autocorrects 303s behaves like missing before 303s registers an offense for missing space before keyword in `begin "a"end` 303s behaves like missing before 303s registers an offense for missing space before keyword in `for x in []do end` 303s behaves like accept after 303s accepts `#` after keyword in `next#comment` 303s behaves like missing before 303s registers an offense for missing space before keyword in `while 1do end` 303s behaves like missing before 303s registers an offense for missing space before keyword in `case a; when b; ""else end` 303s behaves like missing before 303s registers an offense for missing space before keyword in `if ""then a end` 303s behaves like missing before 303s registers an offense for missing space before keyword in `case ""when a; end` 303s behaves like missing before 303s registers an offense for missing space before keyword in `while 1 do "x"end` 303s 303s RuboCop::Cop::Style::OperatorMethodCall 303s registers an offense when using `foo.=~ bar` 303s registers an offense when using `foo.~(bar)` 303s does not register an offense when using `foo > bar` 303s registers an offense when using `foo.>>(bar)` 303s registers an offense when using `foo.&(bar)` 303s registers an offense when using `foo.!~(bar)` 303s registers an offense when using `foo.% bar` 303s registers an offense when using `foo.! bar` 303s registers an offense when using `foo.*(bar)` 303s registers an offense when using `foo.>= bar` 303s registers an offense when chaining `foo.bar.!~(baz).round(2)` 303s registers an offense when chaining `foo.bar.!=(baz).round(2)` 303s registers an offense when chaining `foo.bar./(baz).round(2)` 303s registers an offense when using `foo.!= bar` 303s does not register an offense when using `foo !~ bar` 303s registers an offense when chaining `foo.bar.!(baz).round(2)` 303s registers an offense when using `foo.<< bar` 303s registers an offense when using `foo.-(bar)` 303s registers an offense when using `foo.=~(bar)` 303s registers an offense when using `foo.<<(bar)` 303s registers an offense when using `foo.==(bar)` 303s registers an offense when using `foo./ bar` 303s registers an offense when using `foo.===(bar)` 303s registers an offense when chaining `foo.bar.%(baz).round(2)` 303s does not register an offense when using `foo.+@bar.to_s` 303s registers an offense when using `foo.== bar` 303s registers an offense when using `foo.| bar` 303s does not register an offense when using `foo ~ bar` 303s registers an offense when using `foo.^ bar` 303s registers an offense when using `foo.!~ bar` 303s does not register an offense when using `foo | bar` 303s registers an offense when using `foo.> bar` 303s registers an offense when using `foo.~ bar` 303s registers an offense when chaining `foo.bar.>>(baz).round(2)` 303s does not register an offense when using `foo.~@bar` 303s registers an offense when using `foo.<=(bar)` 303s registers an offense when using `foo.+(bar)` 303s registers an offense when using `foo.%(bar)` 303s does not register an offense when using `foo * bar` 303s registers an offense when chaining `foo.bar.&(baz).round(2)` 303s registers an offense when chaining `foo.bar.>=(baz).round(2)` 303s does not register an offense when using `foo >= bar` 303s registers an offense when using `foo.<=>(bar)` 303s registers an offense when using `foo.<(bar)` 303s does not register an offense when using `foo + bar` 303s does not register an offense when using `foo ** bar` 303s does not register an offense when using `foo << bar` 303s registers an offense when chaining `foo.bar.==(baz).round(2)` 303s registers an offense when using `foo.+ bar` 303s registers an offense when using `foo.|(bar)` 303s registers an offense when chaining `foo.bar.<(baz).round(2)` 303s registers an offense when chaining `foo.bar.>(baz).round(2)` 303s does not register an offense when using `foo =~ bar` 303s does not register an offense when using `foo % bar` 303s registers an offense when chaining `foo.bar.<<(baz).round(2)` 303s registers an offense when using `foo.>> bar` 303s does not register an offense when using `foo ! bar` 303s registers an offense when using `foo.<= bar` 303s registers an offense when using `foo./(bar)` 303s registers an offense when chaining `foo.bar.~(baz).round(2)` 303s registers an offense when chaining `foo.bar.*(baz).round(2)` 303s does not register an offense when using `foo.-@bar` 303s registers an offense when using `foo.=== bar` 303s does not register an offense when using `foo <= bar` 303s registers an offense when using `foo.!(bar)` 303s registers an offense when chaining `foo.bar.<=(baz).round(2)` 303s registers an offense when chaining `foo.bar.<=>(baz).round(2)` 303s registers an offense when chaining `foo.bar.=~(baz).round(2)` 303s registers an offense when using `foo.!=(bar)` 303s does not register an offense when using `foo < bar` 303s registers an offense when using `foo.< bar` 303s registers an offense when using `foo.<=> bar` 303s registers an offense when using `foo.>(bar)` 303s registers an offense when using `foo.- bar` 303s does not register an offense when using `foo.!@bar` 303s does not register an offense when using `Foo.+(bar)` 303s registers an offense when chaining `foo.bar.**(baz).round(2)` 303s does not register an offense when using `foo ^ bar` 303s registers an offense when using `foo.>=(bar)` 303s does not register an offense when using `foo.+@bar` 303s registers an offense when using `foo.* bar` 303s does not register an offense when using `foo <=> bar` 303s registers an offense when using `foo.^(bar)` 303s does not register an offense when using `obj.!` 303s registers an offense when chaining `foo.bar.+(baz).round(2)` 303s does not register an offense when using `foo & bar` 303s registers an offense when chaining `foo.bar.-(baz).round(2)` 303s does not register an offense when using `foo - bar` 303s registers an offense when chaining `foo.bar.===(baz).round(2)` 303s does not register an offense when using `foo.`bar` 303s does not register an offense when using `foo == bar` 303s registers an offense when chaining `foo.bar.^(baz).round(2)` 303s registers an offense when chaining `foo.bar.|(baz).round(2)` 303s does not register an offense when using `foo >> bar` 303s registers an offense when using `foo.** bar` 303s registers an offense when using `foo.& bar` 303s does not register an offense when using `foo === bar` 303s does not register an offense when using `foo != bar` 303s does not register an offense when using `foo / bar` 303s registers an offense when using `foo.**(bar)` 303s 303s RuboCop::YAMLDuplicationChecker 303s when yaml has duplicated keys in the second level 303s calls block 303s calls block with keys 303s when yaml has duplicated keys in the top level 303s calls block 303s calls block with keys 303s when yaml does not have any duplication 303s does not call block 303s 303s RuboCop::CommentConfig 303s #extra_enabled_comments 303s has values as arrays of extra enabled cops 303s has keys as instances of Parser::Source::Comment for extra enabled comments 303s #cop_disabled_line_ranges 303s collects line ranges by disabled cops 303s comment_only_line? 303s when line contains only comment 303s returns true 303s returns true 303s when line is empty 303s returns true 303s when line contains only code 303s returns false 303s returns false 303s returns false 303s returns false 303s when line contains code and comment 303s returns false 303s #cop_enabled_at_line? 304s supports disabling cops with numbers in their name 304s supports enabling/disabling multiple cops along with a comment 304s supports enabling/disabling multiple cops in a single directive 304s can handle double disable of one cop 304s supports disabling cops with multiple levels in department name 304s supports disabling single line with a directive at end of line 304s just ignores unpaired enabling directives 304s handles indented single line 304s supports disabling multiple lines with a pair of directive 304s supports disabling cops on a comment line with an EOL comment 305s supports disabling all cops except Lint/RedundantCopDisableDirective with keyword all 305s supports enabling/disabling cops without a prefix 305s supports disabling cops with multiple uppercase letters 305s does not confuse a comment directive embedded in a string literal with a real comment 305s supports disabling all lines after a directive 305s does not confuse a cop name including "all" with all cops 305s 305s RuboCop::Cop::Lint::OrderedMagicComments 305s does not register an offense when using `encoding` magic comment is first line 305s does not register an offense when using `encoding: Encoding::SJIS` Hash notation after`frozen_string_literal` magic comment 305s registers an offense and corrects when using `frozen_string_literal` magic comment is next of shebang 305s does not register an offense when using `encoding` magic comment only 305s does not register an offense when using `frozen_string_literal` magic comment only 305s registers an offense and corrects when `coding` magic comment does not precede all other magic comments 305s does not register an offense when using `encoding` magic comment is next of shebang 305s registers an offense and corrects when an `encoding` magic comment does not precede all other magic comments 305s registers an offense and corrects when `-*- encoding : ascii-8bit -*-` magic comment does not precede all other magic comments 305s 305s RuboCop::Cop::Style::QuotedSymbols 305s configured with `same_as_string_literals` 305s when Style/StringLiterals is configured with double_quotes 305s behaves like enforce double quotes 305s accepts double quoted symbol with an escaped quote 305s accepts unquoted symbols 305s accepts single quotes with double quotes 305s accepts double quotes with escape sequences 305s accepts double quotes with line breaks 305s accepts single quotes with line breaks 305s registers an offense for single quotes 305s accepts double quotes with interpolation 305s accepts double quotes when interpolating a global variable 305s accepts double quotes 305s accepts double quotes with single quotes 305s registers an offense and corrects escape characters properly 305s registers an offense and corrects for an escaped quote within single quotes 305s accepts double quotes when interpolating an instance variable 305s accepts double quotes when interpolating a class variable 305s hash with hashrocket style 305s accepts properly quoted symbols 305s corrects wrong quotes 305s when Style/StringLiterals is configured with single_quotes 305s behaves like enforce single quotes 305s accepts single quotes 305s registers an offense and corrects for double quotes without interpolation 305s accepts double quotes when unicode control sequence is used 305s accepts single quotes with line breaks 305s accepts double quotes when interpolating an instance variable 305s accepts double quotes when interpolating a global variable 305s accepts single quoted symbol with an escaped quote 305s accepts double quotes when interpolating a class variable 305s accepts single quotes with double quotes 305s accepts unquoted symbols 305s accepts double quotes with escape sequences 305s accepts double quotes with some other special symbols 305s registers an offense and corrects escape characters properly 305s accepts double quotes with single quotes 305s registers an offense and corrects for an escaped quote within double quotes 305s registers an offense and corrects for double quotes in hash keys 305s accepts double quotes with line breaks 305s accepts double quotes when control characters are used 305s accepts double quotes with interpolation 305s hash with hashrocket style 305s accepts properly quoted symbols 305s corrects wrong quotes 305s when Style/StringLiterals is disabled 305s behaves like enforce single quotes 305s accepts double quotes with single quotes 305s registers an offense and corrects escape characters properly 305s accepts single quoted symbol with an escaped quote 305s accepts double quotes when control characters are used 305s accepts single quotes with line breaks 305s registers an offense and corrects for double quotes in hash keys 305s accepts double quotes with interpolation 305s accepts double quotes when interpolating an instance variable 305s accepts double quotes when interpolating a global variable 305s accepts single quotes with double quotes 305s accepts double quotes when interpolating a class variable 305s accepts double quotes with some other special symbols 305s accepts double quotes when unicode control sequence is used 305s accepts single quotes 305s accepts unquoted symbols 305s accepts double quotes with line breaks 305s registers an offense and corrects for double quotes without interpolation 305s accepts double quotes with escape sequences 305s registers an offense and corrects for an escaped quote within double quotes 305s hash with hashrocket style 305s corrects wrong quotes 305s accepts properly quoted symbols 305s configured with `double_quotes` 305s behaves like enforce double quotes 305s accepts double quotes with interpolation 305s accepts double quoted symbol with an escaped quote 305s accepts double quotes with line breaks 305s accepts double quotes when interpolating an instance variable 305s registers an offense for single quotes 305s accepts double quotes with single quotes 305s registers an offense and corrects escape characters properly 305s registers an offense and corrects for an escaped quote within single quotes 305s accepts double quotes when interpolating a class variable 305s accepts double quotes 305s accepts single quotes with line breaks 305s accepts double quotes with escape sequences 305s accepts single quotes with double quotes 305s accepts double quotes when interpolating a global variable 305s accepts unquoted symbols 305s hash with hashrocket style 305s accepts properly quoted symbols 305s corrects wrong quotes 305s configured with `single_quotes` 305s behaves like enforce single quotes 305s accepts double quotes with escape sequences 305s accepts single quoted symbol with an escaped quote 305s registers an offense and corrects for double quotes in hash keys 305s accepts double quotes when unicode control sequence is used 305s accepts single quotes with double quotes 305s accepts double quotes with some other special symbols 305s registers an offense and corrects for double quotes without interpolation 305s accepts double quotes with interpolation 305s accepts double quotes with single quotes 305s accepts double quotes when control characters are used 305s accepts double quotes when interpolating a global variable 305s accepts unquoted symbols 305s accepts single quotes 305s registers an offense and corrects escape characters properly 305s registers an offense and corrects for an escaped quote within double quotes 305s accepts double quotes with line breaks 305s accepts double quotes when interpolating an instance variable 305s accepts double quotes when interpolating a class variable 305s accepts single quotes with line breaks 305s hash with hashrocket style 305s accepts properly quoted symbols 305s corrects wrong quotes 305s 305s RuboCop::Cop::Style::EndlessMethod 305s Ruby >= 3.0 305s EnforcedStyle: allow_always 305s does not register an offense for an endless method with arguments 305s does not register an offense for an endless method 305s does not register an offense for a multiline endless method with begin 305s does not register an offense for a multiline endless method with arguments 305s does not register an offense for a multiline endless method 305s EnforcedStyle: allow_single_line 305s registers an offense and corrects for a multiline endless method with begin 305s does not register an offense for an endless method with arguments 305s registers an offense and corrects for a multiline endless method 305s registers an offense and corrects for a multiline endless method with arguments 305s does not register an offense for an endless method 305s EnforcedStyle: disallow 305s registers an offense for an endless method with arguments 305s registers an offense for an endless method 305s 305s RuboCop::Cop::Registry 305s can filter down to one type 305s can be cloned 305s exposes a mapping of cop names to cop classes 305s exposes the number of stored cops 305s exposes cop departments 305s can filter down to all but one type 305s exposes a list of cop names 305s names_for_department 305s returns array of cops for specified department 305s #cops 305s exposes a list of cops 305s with cops having the same inner-most module 305s exposes both cops 305s when dismissing a cop class 305s allows it if done rapidly 305s disallows it if done too late 305s allows re-listing 305s #contains_cop_matching? 305s can find cops matching a given name 305s returns false for cops not included in the store 305s #department? 305s returns false for other names 305s returns true for department name 305s #qualified_cop_name 305s emits a warning when namespace is incorrect 305s raises an error when a cop name is ambiguous 305s gives back already properly qualified names 305s qualifies names with the correct namespace 305s qualifies names without a namespace 305s returns the provided name if no namespace is found 305s #enabled 305s selects only safe cops if :safe passed 305s selects cops which are enabled in the config 305s overrides config if :only includes the cop 305s when new cops are introduced 305s does not include them 305s overrides config if :only includes the cop 305s when specifying `NewCops: pending` option in .rubocop.yml 305s does not include them 305s when specifying `--enable-pending-cops` command-line option 305s includes them 305s when specifying `NewCops: disable` option in .rubocop.yml 305s includes them because command-line option takes precedence over .rubocop.yml 305s when specifying `NewCops: enable` option in .rubocop.yml 305s includes them 305s when specifying `NewCops: disable` option in .rubocop.yml 305s does not include them 305s when specifying `--disable-pending-cops` command-line option 305s does not include them 305s when specifying `NewCops: enable` option in .rubocop.yml 305s does not include them because command-line option takes precedence over .rubocop.yml 305s 305s RuboCop::Cop::Layout::MultilineArrayLineBreaks 305s when two elements on same line 305s registers an offense and corrects 305s when on same line, separate line from brackets 305s does not add any offenses 305s when nested arrays 305s registers an offense and corrects 305s when on same line 305s does not add any offenses 305s 305s RuboCop::Cop::Layout::BeginEndAlignment 305s accepts matching puts 1; begin ... end 306s registers an offense for mismatched begin end and autocorrects 306s accepts matching begin ... end 306s when EnforcedStyleAlignWith is start_of_line 306s registers an offense for mismatched begin end and autocorrects 306s registers an offense for mismatched var << begin end and autocorrects 306s accepts matching puts 1; begin ... end 306s accepts matching var = begin ... end 306s 306s RuboCop::Cop::VariableForce::Assignment 306s #operator 306s when it is ||= operator assignment 306s returns ||= 306s when it is multiple assignment 306s returns = 306s when it is normal assignment 306s returns = 306s when it is &&= operator assignment 306s returns &&= 306s when it is += operator assignment 306s returns += 306s .new 306s when an argument declaration node is passed 306s raises error 306s when an assignment node is passed 306s does not raise error 306s when any other type node is passed 306s raises error 306s #meta_assignment_node 306s when it is &&= operator assignment 306s returns and_asgn node 306s when it is ||= operator assignment 306s returns or_asgn node 306s when it is += operator assignment 306s returns op_asgn node 306s when it is multiple assignment 306s returns masgn node 306s #name 306s returns the variable name 306s 306s RuboCop::CLI 306s can process a file with an invalid UTF-8 byte sequence 306s registers an offense for a syntax error 306s does not register any offenses for an empty file 307s checks a given file with faults and returns 1 307s registers an offense for Parser warnings 307s finds a file with no .rb extension but has a shebang line 307s when a directory is named `*` 307s does not crash 307s for a disabled cop 307s reports no offense when enabled on part of a file 307s cops can exclude files based on config 307s ignores excluded files 307s configuration from file 307s excludes the vendor directory by default 308s can be configured with project config to disable a certain error 308s can be configured to override a parameter that is a hash in a special case 308s prefers a config file in ancestor directory to another in home 308s matches included/excluded files correctly when . argument is given 308s works when a configuration file specifies Severity for Metrics/ParameterLists and Layout/LineLength 308s works when a cop that others depend on is disabled 309s fails when a configuration file specifies an invalid Severity 309s displays cop names if DisplayCopNames is false 309s cannot disable Syntax offenses 309s can be configured to merge a parameter that is a hash 309s can exclude a vendor directory with an erroneous config file 309s uses the DefaultFormatter if another formatter is not specified 309s can disable parser-derived offenses with warning severity 310s can be configured with option to disable a certain error 310s can exclude a typical vendor directory 310s fails when a configuration file has invalid YAML syntax 310s does not consider Include parameters in subdirectories 310s prints an error message for an unrecognized EnforcedStyle 310s allows the default configuration file as the -c argument 310s works when a configuration file passed by -c specifies Exclude with strings 310s only reads configuration in explicitly included hidden directories 311s runs without errors for an unrecognized cop name in .rubocop.yml and `--ignore-unrecognized-cops` option is given 311s can have different config files in different directories 311s can use an alternative max line length from a config file 311s can exclude directories relative to .rubocop.yml 311s can exclude a vendor directory indirectly 311s works when a configuration file passed by -c specifies Exclude with regexp 311s shows an error if the input file cannot be found 311s does not read files in excluded list 312s prints an error for an unrecognized cop name in .rubocop.yml 312s ignores excluded files 312s prints a warning for an unrecognized configuration parameter 312s displays style guide URLs if DisplayStyleGuide is true 312s works when a configuration file specifies Severity for Metrics/ParameterLists and Layout 312s finds included files 312s when configured for indented_internal_methods style indentation 313s registers offense for normal indentation in module 313s registers offense for normal indentation in class 313s accepts indented_internal_methods style indentation 313s when MultilineOperationIndentation is used with aligned style and IndentationWidth parameter 313s fails with an error message 313s without using namespace 313s can be configured with option to disable a certain error 313s when obsolete MultiSpaceAllowedForOperators param is used 313s displays a warning 313s when --force-default-config option is specified 313s when config file specified with -c 313s ignores config file 313s when no config file specified 314s ignores config file 314s when configuration is taken from $HOME/.rubocop.yml 314s handles relative excludes correctly when run from project root 314s when a file inherits from a higher level 314s inherits relative excludes correctly 314s when a value in a hash is overridden with nil 314s acts as if the key/value pair was removed 314s when MultilineMethodCallIndentation is used with aligned style and IndentationWidth parameter 314s fails with an error message 314s when parallel static by default 314s when specifying `--debug` option only` 314s fails with an error message 314s when specifying `--debug` and `-a` options` 315s uses parallel inspection when correcting the file 315s when setting `UseCache: false` 315s fails with an error message 315s when setting `UseCache: true` 315s fails with an error message 315s when errors are raised while processing files due to bugs 315s displays an error message to stderr 315s configuration of `require` 315s unknown library is specified 315s exits with 2 315s when interrupted 315s returns 130 315s unknown cop 315s in configuration file is given 315s prints the error and exists with code 2 315s configuration of target Ruby versions 315s when configured with an unknown version 315s fails with an error message 315s when configured with an unsupported ruby 315s fails with an error message 315s when lines end with CR+LF 316s reports an offense 316s configuration of `AutoCorrect` 316s when setting `AutoCorrect: false` for `Style/StringLiterals` 316s does not suggest `1 offense autocorrectable` for `Style/StringLiterals` 316s style guide only usage 316s via the cli option 316s --only-guide-cops 316s runs cops for rules that link to a style guide 316s overrides configuration of AllCops/StyleGuideCopsOnly 316s skips cops that have no link to a style guide 316s via the config 316s AllCops/StyleGuideCopsOnly 316s when it is false 316s runs cops for rules regardless of any link to the style guide 316s when it is true 317s skips cops that have no link to a style guide 317s AllCops/DisabledByDefault 317s when it is true 317s runs only the cop configured in .rubocop.yml 317s when it is false 317s runs all cops that are enabled in default configuration 317s info severity 317s when given `--fail-level info` 317s returns a 1 code 317s when there are only info offenses 317s returns a 0 code 317s when `Lint/Syntax` is given `Severity: info` 317s is an invalid configuration 317s when given `--display-only-fail-level-offenses` 317s returns a 0 code but does not list offenses 317s when there are not only info offenses 318s returns a 1 code 318s when checking a correct file 318s returns 0 318s when super is used with a block 318s still returns 0 318s when given a file/directory that is not under the current dir 318s and the directory is absolute 318s checks a Rakefile but Style/FileName does not report 318s and the Rakefile path is relative 318s checks a Rakefile but Style/FileName does not report 318s and the directory is relative 318s checks a Rakefile but Style/FileName does not report 318s and the Rakefile path is absolute 318s checks a Rakefile but Style/FileName does not report 318s rubocop:disable comment 319s can disable selected cops in a code section 319s can disable all cops on a single line 319s can disable all cops in a code section 319s can disable selected cops on a single line 319s when not necessary 319s causes an offense to be reported 319s when using `rubocop:disable` line comment for `Style/RedundantInitialize` 319s does not register an offense for `Lint/RedundantCopDisableDirective` 319s and RedundantCopDisableDirective is individually disabled 320s does not report RedundantCopDisableDirective offenses 320s and RedundantCopDisableDirective is disabled through department 320s does not report RedundantCopDisableDirective offenses 320s when using `rubocop:disable` line comment for `Lint/EmptyBlock` 320s does not register an offense for `Lint/RedundantCopDisableDirective` 320s and RedundantCopDisableDirective is individually excluded 320s does not report RedundantCopDisableDirective offenses 320s and there are no other offenses 320s exits with error code 320s without using namespace 320s can disable selected cops on a single line but prints a warning 320s when --autocorrect-all is given 321s does not trigger RedundantCopDisableDirective due to lines moving around 321s Specify `--init` option to `rubocop` command 321s when .rubocop.yml already exists 321s fails with an error message 321s when .rubocop.yml does not exist 321s generate a .rubocop.yml file 321s obsolete cops 321s when configuration for TrailingComma is given 321s fails with an error message 321s 321s RuboCop::Cop::Style::NegatedIf 321s does not blow up for empty unless condition 321s does not blow up for empty if condition 321s does not blow up on a negated ternary operator 321s does not blow up for ternary ops 321s with “both” style 321s accepts an if where the condition is doubly negated 321s accepts an if/else with negative condition 321s accepts an if where only part of the condition is negated 321s is not confused by negated elsif 321s registers an offense for if with "not" condition 321s registers an offense for if with exclamation point condition 321s autocorrects by replacing parenthesized if not with unless 321s with “postfix” style 321s registers an offense for postfix 321s does not register an offense for prefix 321s with “prefix” style 321s registers an offense for prefix 321s does not register an offense for postfix 321s 321s RuboCop::Cop::Layout::ClosingParenthesisIndentation 321s accepts begin nodes that are not grouped expressions 321s for method definitions 321s with no line break before 1st parameter 321s accepts empty () 321s registers an offense for misaligned ) 321s accepts a correctly aligned ) 321s with line break before 1st parameter 321s accepts a correctly aligned ) 321s registers an offense for misaligned ) 321s for method chains 321s can handle multiple chains with differing breaks 321s registers an offense and corrects method chains 321s when using safe navigation operator 321s registers an offense and corrects misaligned ) 321s for grouped expressions 321s with no line break before 1st operand 321s accepts ) that does not begin its line 321s accepts a correctly aligned ) 321s registers an offense for misaligned ) 321s with line break before 1st operand 321s registers an offense for misaligned ) 321s accepts a correctly aligned ) 321s for method assignments with indented parameters 321s without arguments 321s can handle indentation up against the method 321s registers an offense for misaligned ) 321s accepts a correctly aligned ) against ( 321s can handle indentation up against the left edge 321s accepts empty () 321s with line break before 1st parameter 321s accepts a correctly aligned ) 321s registers an offense for misaligned ) 321s with no line break before 1st parameter 321s can handle hash arguments that are not broken over lines 321s accepts a correctly indented ) 321s can handle inner method calls 321s accepts a correctly aligned ) 321s registers an offense for misaligned ) 321s can handle indentation up against the left edge 321s can handle individual arguments that are broken over lines 321s for method calls 321s with first multiline arg on new line 321s accepts ) on the same level as ( with args on same line 321s accepts ) on the same level as ( with second arg on new line 321s with no line break before 1st parameter 321s does not register an offense when using keyword arguments 321s registers an offense for misaligned ) 321s accepts a correctly indented ) 321s accepts a correctly indented ) inside a block 321s accepts a correctly aligned ) 321s registers an offense and corrects misindented ) when ) is aligned with the params 321s without arguments 321s can handle indentation up against the left edge 321s accepts empty () 321s accepts a correctly aligned ) against ( 321s with line break before 1st parameter 321s accepts a correctly aligned ) 321s registers an offense for misaligned ) 321s 321s RuboCop::Cop::Layout::HeredocIndentation 321s quoted by ` 321s accepts for indented, but without `~` 321s registers an offense for too deep indented with empty line 321s accepts for an empty line 321s accepts for indented, but with `-` 321s registers an offense for too deep indented 321s registers an offense for not indented 321s registers an offense for too deep indented with whitespace line 321s registers an offense for not indented enough with empty line 321s does not register an offense when not indented but with whitespace, with `-` 321s accepts for not indented but with whitespace 321s registers an offense for minus level indented 321s registers an offense for not indented enough with whitespace line 321s displays message to use `<<~` instead of `<<-` 321s displays message to use `<<~` instead of `<<` 321s registers an offense for not indented, with `~` 321s accepts for include empty lines 321s registers an offense for not indented, without `~` 321s accepts for indented, with `~` 321s registers an offense for first line minus-level indented, with `-` 321s when Layout/LineLength is configured 321s accepts for long heredoc 321s quoted by " 321s registers an offense for not indented, with `~` 321s registers an offense for first line minus-level indented, with `-` 321s registers an offense for too deep indented 321s displays message to use `<<~` instead of `<<-` 321s registers an offense for not indented enough with whitespace line 321s accepts for indented, but without `~` 321s registers an offense for too deep indented with empty line 321s registers an offense for not indented enough with empty line 321s displays message to use `<<~` instead of `<<` 321s registers an offense for too deep indented with whitespace line 321s accepts for an empty line 321s accepts for include empty lines 321s registers an offense for not indented 321s does not register an offense when not indented but with whitespace, with `-` 321s accepts for indented, with `~` 321s accepts for not indented but with whitespace 321s registers an offense for not indented, without `~` 321s accepts for indented, but with `-` 321s registers an offense for minus level indented 321s when Layout/LineLength is configured 321s accepts for long heredoc 321s quoted by 321s registers an offense for too deep indented 321s registers an offense for not indented, without `~` 321s registers an offense for minus level indented 321s displays message to use `<<~` instead of `<<` 321s registers an offense for not indented enough with whitespace line 321s accepts for include empty lines 321s registers an offense for not indented, with `~` 321s registers an offense for not indented 321s accepts for an empty line 321s accepts for indented, but without `~` 321s registers an offense for too deep indented with whitespace line 321s accepts for indented, but with `-` 321s displays message to use `<<~` instead of `<<-` 321s does not register an offense when not indented but with whitespace, with `-` 321s registers an offense for too deep indented with empty line 321s registers an offense for not indented enough with empty line 321s registers an offense for first line minus-level indented, with `-` 321s accepts for not indented but with whitespace 321s accepts for indented, with `~` 321s when Layout/LineLength is configured 321s accepts for long heredoc 321s quoted by ' 321s accepts for indented, with `~` 321s accepts for an empty line 321s does not register an offense when not indented but with whitespace, with `-` 321s registers an offense for minus level indented 321s displays message to use `<<~` instead of `<<` 321s registers an offense for not indented, with `~` 321s displays message to use `<<~` instead of `<<-` 321s registers an offense for not indented, without `~` 321s accepts for include empty lines 321s accepts for indented, but without `~` 321s registers an offense for not indented enough with empty line 321s registers an offense for too deep indented 321s registers an offense for too deep indented with empty line 321s registers an offense for first line minus-level indented, with `-` 321s accepts for indented, but with `-` 321s registers an offense for too deep indented with whitespace line 321s registers an offense for not indented 321s registers an offense for not indented enough with whitespace line 321s accepts for not indented but with whitespace 321s when Layout/LineLength is configured 321s accepts for long heredoc 321s 321s RuboCop::Cop::Lint::RequireParentheses 321s accepts missing parentheses around expression with + operator 321s registers an offense for missing parentheses around expression in ternary 321s accepts calls to methods that are operators 321s registers an offense for missing parentheses around expression with || operator 321s accepts method calls that are all operations 321s accepts method call with parentheses in ternary 321s accepts missing parentheses when using ternary operator in square bracksts 321s accepts calls to methods that are setters 321s accepts method calls without parentheses followed by keyword and/or 321s accepts missing parentheses when using ternary operator 321s accepts parentheses around expression with boolean operator 321s registers an offense for missing parentheses around expression with && operator 321s accepts condition that is not a call 321s accepts missing parentheses when method is not a predicate 321s when using safe navigation operator 321s registers an offense for missing parentheses around expression with && operator 321s 321s RuboCop::Cop::Style::Not 321s autocorrects "not" with ! 321s uses the reverse operator when `not` is applied to a comparison 321s registers an offense for not 321s parenthesizes when `not` is applied to and 321s parenthesizes when `not` is applied to a ternary op 321s parenthesizes when `not` is applied to or 321s does not register an offense for ! 321s parenthesizes when `not` would change the meaning of a binary exp 321s autocorrects "not" followed by parens with ! 321s 321s RuboCop::Cop::Lint::UselessRuby2Keywords 321s when `ruby2_keywords` is given a symbol 321s does not register an offense when the `def` is at a different depth 321s registers an offense for an unnecessary `ruby2_keywords` 321s does not register an offense for an allowed def 321s does not register an offense when there is no `def` 321s when `ruby2_keywords` is given a `def` node 321s registers an offense for a method without arguments 321s does not register an offense for a method with a `restarg` and no `kwrestarg` 321s registers an offense for a method with a `restarg` and keyword args 321s registers an offense for a method with a `restarg` and `kwrestarg` 321s registers an offense for a method with only keyword args 321s does not register an offense for a method with a `restarg` other optional args 321s registers an offense for a method with only positional args 321s registers an offense for a method with only `kwrestarg` 321s does not register an offense for a method with a `restarg` and `blockarg` 321s does not register an offense for a method with a `restarg` other positional args 321s registers an offense for a method with a `restarg` and `kwoptarg` 321s with a dynamically defined method 321s does not register an offense when the method has a `restarg` and a `shadowarg` 321s does not register an offense for an allowed `ruby2_keywords` 321s registers an offense for a numblock 321s registers an offense for an unnecessary `ruby2_keywords` 321s registers an offense when the method has a `shadowarg` 321s 321s RuboCop::Cop::Style::MagicCommentFormat 321s invalid config 321s ValueCapitalization 321s raises an error 321s DirectiveCapitalization 321s raises an error 321s DirectiveCapitalization 321s when not set 321s does not change the case of magic comment directives 321s when lowercase 321s registers an offense and corrects when the case does not match 321s when uppercase 321s registers an offense and corrects when the case does not match 321s ValueCapitalization 321s when not set 321s does not change the case of magic comment directives 321s when uppercase 321s registers an offense and corrects when the case does not match 321s when lowercase 321s registers an offense and corrects when the case does not match 321s snake case style 321s accepts a magic comments in snake case 321s does not register an offense for incorrect style in comments after the first statement 321s does not register an offense for dashes in other comments 321s accepts a source with no tokens 321s registers an offense for kebab case in emacs style 321s accepts an empty source 321s accepts a frozen string literal in snake case in emacs style 321s registers an offense for mixed case 321s registers an offense for kebab case 321s kebab case style 321s accepts a source with no tokens 321s accepts an empty source 321s does not register an offense for dashes in other comments 321s registers an offense for snake case 321s accepts a frozen string literal in snake case in emacs style 321s registers an offense for mixed case 321s does not register an offense for incorrect style in comments after the first statement 321s registers an offense for snake case in emacs style 321s accepts a magic comments in kebab case 321s all issues at once 321s registers and corrects multiple issues 321s 321s RuboCop::Cop::Style::OpenStructUse 321s when not using OpenStruct 321s registers no offense 321s when using custom namespaced OpenStruct 321s when inheriting from it 321s is expected to eq "class A < SomeNamespace::OpenStruct; end" 321s when defined in custom namespace 321s when class 321s is expected to eq "module SomeNamespace\n class OpenStruct\n end\nend\n" 321s when module 321s is expected to eq "module SomeNamespace\n module OpenStruct\n end\nend\n" 321s when used in assignments 321s registers no offense 321s when using OpenStruct 321s for OpenStruct 321s when inheriting from it via Class.new 321s registers an offense 321s when used in assignments 321s registers an offense 321s when inheriting from it via < 321s registers an offense 321s for ::OpenStruct 321s when inheriting from it via < 321s registers an offense 321s when used in assignments 321s registers an offense 321s when inheriting from it via Class.new 321s registers an offense 321s 321s RuboCop::Formatter::DisabledConfigFormatter 321s when no files are inspected 321s creates a .rubocop_todo.yml even in such case 321s when exclude_limit option is passed 321s respects the file exclusion list limit 321s with autocorrect supported cop 321s adds a comment about --autocorrect option 321s when there's .rubocop.yml 322s merges in excludes from .rubocop.yml 322s when exclude_limit option is omitted 322s disables the cop with 15 offending files 322s when any offenses are detected 322s displays YAML configuration disabling all cops with offenses 322s 322s RuboCop::Cop::Style::MethodCallWithArgsParentheses 322s when EnforcedStyle is omit_parentheses 322s accepts parens in args with ternary conditions 322s autocorrects multi-line calls with trailing whitespace 322s register an offense in assignments 322s register an offense for camel-case methods with arguments 322s accepts parens in chaining with operators 322s accepts parens in operator method calls 322s accepts parens in super calls with braced blocks 322s accepts parens in blocks with braces 322s register an offense for superclass call with parens 322s accepts special lambda call syntax 322s accepts parens in calls with args with logical operators 322s accepts parens in calls with logical operators 322s accepts parens in ternary condition calls 322s accepts parens in chained method calls 322s accepts parens in camel case method without args 322s accepts parens in args splat 322s accepts parens in range literals 322s register an offense for hashes in keyword values 322s register an offense for parens in do-end blocks 322s register an offense for multi-line method calls 322s accepts parens in chaining with safe operators 322s accepts parens in default argument value calls 322s register an offense in multi-line inheritance 322s accepts parens in super method calls as arguments 322s accepts parens in method args 322s autocorrects single-line calls 322s accepts parens in super without args 322s register an offense for parens in string interpolation 322s accepts parens in nested method args 322s accepts parens in slash regexp literal as argument 322s register an offense for parens in the last chain 322s accepts parens in literals with unary operators as first argument 322s accepts parens in splat calls 322s accepts parens in yield argument method calls 322s accepts parens in single-line inheritance 322s accepts parens in assignment in conditions 322s accepts no parens in method call without args 322s accepts parens in block passing calls 322s register an offense for parens in method call without args 322s autocorrects complex multi-line calls 322s accepts parens in argument calls with braced blocks 322s register an offense for yield call with parens 322s accepts no parens in method call with args 322s register an offense in complex conditionals 322s register an offense for %r regex literal as arguments 322s accepts parens in calls with hash as arg 322s accepts parens in default keyword argument value calls 322s accepts parens in implicit #to_proc 322s hash value omission in 3.1 322s registers and corrects an offense when explicit hash value with parentheses and using modifier form 322s registers an offense when with parentheses call expr follows 322s registers an offense using assignment with parentheses call expr follows 322s registers an offense when last argument is a hash value omission 322s does not register an offense when hash value omission with parentheses and using modifier form 322s does not register an offense when without parentheses call expr follows 322s forwarded arguments in 3.0 322s accepts parens for forwarded arguments 322s behaves like endless methods 322s endless methods 322s without arguments 322s registers an offense for `defs` when there are parens 322s registers an offense when there are parens 322s does not register an offense when there are arguments 322s does not register an offense when there are no parens 322s does not register an offense for `defs` when there are arguments 322s with arguments 322s requires method calls to have parens 322s numbered parameters in 2.7 322s accepts parens for braced numeric block calls 322s allowing parens in multi-line calls 322s accepts parens for multi-line calls 322s allowing parenthesis in chaining 322s register offense for single-line chaining without previous parens 322s register offense for multi-line chaining without previous parens 322s accepts no parens in the last call if previous calls with parens 322s accepts parens in the last call if any previous calls with parentheses 322s forwarded arguments in 2.7 322s accepts parens for forwarded arguments 322s allowing parens in camel-case methods 322s accepts parens for camel-case method names 322s when EnforcedStyle is require_parentheses (default) 322s autocorrects calls where multiple args are method calls 322s accepts parens in method call with args 322s autocorrects call with multiple args by adding braces 322s autocorrects parenthesized args for local methods by removing space 322s autocorrects partially parenthesized args by adding needed braces 322s autocorrects fully parenthesized args by removing space 322s accepts no parens for unary operators 322s autocorrects calls where the argument node is a constant 322s register an offense for superclass call without parens 322s autocorrects calls with multiple args by adding needed braces 322s accepts parens in method call with do-end blocks 322s register an offense for methods starting with capital without parens 322s autocorrects calls where arg is method call 322s accepts no parens in method call without args 322s register an offense for non-receiver method call without parens 322s accepts no parens for operators 322s register an offense for yield without parens 322s autocorrects calls where the argument node is a number 322s accepts no parens for setter methods 322s register no offense for superclass call without args 322s register no offense for superclass call with parens 322s register no offense for yield without args 322s register an offense for method call without parens 322s AllowedPatterns 322s ignored methods listed in AllowedPatterns 322s when inspecting macro methods 322s in a module body 322s does not register an offense 322s in a class body 322s does not register an offense 322s when using safe navigation operator 322s register an offense for method call without parens 322s with AllowedMethods 322s allow method listed in AllowedMethods 322s behaves like endless methods 322s endless methods 322s without arguments 322s does not register an offense for `defs` when there are parens 322s does not register an offense when there are arguments 322s does not register an offense when there are no parens 322s does not register an offense when there are parens 322s does not register an offense for `defs` when there are arguments 322s with arguments 322s requires method calls to have parens 322s when inspecting macro methods with IncludedMacros 322s for a macro not on the included list 322s allows 322s in a module body 322s finds offense 322s for a macro in both IncludedMacros and AllowedMethods 322s allows 322s in a class body 322s finds offense 322s behaves like endless methods 322s endless methods 322s with arguments 322s requires method calls to have parens 322s without arguments 322s does not register an offense when there are parens 322s does not register an offense for `defs` when there are arguments 322s does not register an offense for `defs` when there are parens 322s does not register an offense when there are no parens 322s does not register an offense when there are arguments 322s allowing parens in string interpolation 322s accepts parens for camel-case method names 322s 322s RuboCop::Cop::Style::EvalWithLocation 322s registers an offense when using `::Kernel.eval` without any arguments 322s accepts `eval` with a string, a filename and `__LINE__` 322s does not register an offense when using eval with block argument 322s registers an offense when using `eval` with improper arguments 322s registers an offense when using `#eval` with an incorrect line number 322s registers an offense when using `class_eval` with improper arguments 322s registers an offense when using `#eval` with a string on a new line 322s registers an offense when using `#class_eval` with an incorrect lineno 322s accepts `eval` with a string, a filename and `__LINE__` on a new line 322s registers an offense when using `#eval` without lineno 322s accepts `eval` with a heredoc, a filename and `__LINE__ + 1` 322s registers an offense when using `instance_eval` with improper arguments 322s does not register an offense if `eval` is called on another object 322s accepts `eval` with a code that is a variable 322s registers an offense when using `#eval` with `binding` only 322s registers an offense when using `#instance_eval` with a string argument in parentheses 322s registers an offense when using `Kernel.eval` without any arguments 322s registers an offense when using `#instance_eval` without any arguments 322s registers an offense when using `#eval` without any arguments 322s registers an offense when using `#eval` with a heredoc and an incorrect line number 322s registers an offense when using `#module_eval` without any arguments 322s registers an offense when using `module_eval` with improper arguments 322s registers an offense when using correct file argument but incorrect line 322s registers an offense when using `#class_eval` without any arguments 322s 322s RuboCop::Cop::InternalAffairs::StyleDetectedApiUse 322s registers an offense when conflicting_styles_detected is used without a correct_style_detected follow up 322s does not register an offense when correct_style_detected and a conflicting_styles_detected are both used 322s does not register an offense when correct_style_detected and a opposite_style_detected are both used 322s does not register an offense when correct_style_detected and a ambiguous_style_detected are both used 322s registers an offense when unexpected_style_detected is used without a correct_style_detected follow up 322s registers an offense when no_acceptable_style! is used without a correct_style_detected follow up 322s does not register an offense when correct_style_detected and a unexpected_style_detected are both used 322s registers an offense when ambiguous_style_detected is used in a conditional expression 322s registers an offense when opposite_style_detected is used without a correct_style_detected follow up 322s registers an offense when ambiguous_style_detected is used without a correct_style_detected follow up 322s registers an offense when opposite_style_detected is used in a conditional expression 322s does not register an offense when correct_style_detected and a no_acceptable_style! are both used 322s registers an offense when correct_style_detected is used without a negative *_style_detected follow up 322s registers an offense when unexpected_style_detected is used in a conditional expression 322s does not register an offense when correct_style_detected and a unrecognized_style_detected are both used 322s registers an offense when correct_style_detected is used in a conditional expression 322s registers an offense when unrecognized_style_detected is used without a correct_style_detected follow up 322s registers an offense when conflicting_styles_detected is used in a conditional expression 322s registers an offense when no_acceptable_style! is used in a conditional expression 322s registers an offense when unrecognized_style_detected is used in a conditional expression 322s 322s RuboCop::Cop::Lint::ErbNewArguments 322s <= Ruby 2.5 322s does not register an offense when using `ERB.new` with non-keyword arguments 322s >= Ruby 2.6 322s registers an offense when using `ERB.new` with non-keyword 2nd, 3rd and 4th arguments andkeyword 5th argument 322s registers an offense when using `ERB.new` with non-keyword 2nd, 3rd and 4th arguments 322s registers an offense when using `ERB.new` with non-keyword 2nd and 3rd arguments andkeyword 4th argument 322s registers an offense when using `ERB.new` with non-keyword 2nd and 3rd arguments 322s does not register an offense when using `ERB.new` with keyword arguments 322s registers an offense when using `ERB.new` with non-keyword 2nd argument 322s does not register an offense when using `ERB.new` without optional arguments 322s registers an offense when using `::ERB.new` with non-keyword 2nd, 3rd and 4th arguments 322s when using `ActionView::Template::Handlers::ERB.new` 322s does not register an offense when using `ERB.new` without arguments 322s 322s RuboCop::Cop::Layout::EndAlignment 322s accepts matching class ... end 322s accepts matching puts 1; if ... end 322s registers an offense for mismatched puts 1; until test end and autocorrects 322s registers an offense for mismatched module Test end and autocorrects 322s registers an offense for mismatched puts 1; case a when b end and autocorrects 322s registers an offense for mismatched puts 1; while test end and autocorrects 322s registers an offense for mismatched puts 1; unless test end and autocorrects 322s registers an offense for mismatched puts 1; class Test end and autocorrects 322s registers an offense for mismatched unless test end and autocorrects 322s can handle modifier if 322s accepts matching class ... end 322s registers an offense for mismatched while test end and autocorrects 322s accepts matching unless ... end 322s accepts matching puts 1; module ... end 322s accepts matching while ... end 322s registers an offense for mismatched case a when b end and autocorrects 322s registers an offense for mismatched puts 1; if test end and autocorrects 322s accepts matching puts 1; class ... end 322s accepts matching puts 1; unless ... end 322s registers an offense for mismatched module Test end and autocorrects 322s accepts matching case ... end 322s accepts matching puts 1; until ... end 322s registers an offense for mismatched until test end and autocorrects 322s accepts matching module ... end 322s registers an offense for mismatched puts 1; class Test end and autocorrects 322s accepts matching until ... end 322s registers an offense for mismatched if test end and autocorrects 322s accepts matching puts 1; while ... end 322s accepts matching if ... end 322s can handle ternary if 322s accepts matching puts 1; case ... end 322s when end is preceded by something else than whitespace 322s does not register an offense 322s case as argument 322s when EnforcedStyleAlignWith is variable 322s registers an offense for mismatched test case a when b end and autocorrects 322s accepts matching test case ... end 322s when EnforcedStyleAlignWith is start_of_line 322s registers an offense for mismatched test case a when b end and autocorrects 322s accepts matching test case a when b ... end 322s when EnforcedStyleAlignWith is keyword 322s accepts matching test case ... end 322s registers an offense for mismatched test case a when b end and autocorrects 322s when EnforcedStyleAlignWith is variable 322s accepts matching case ... end 322s register an offense when using `+` operator method and `end` is not aligned 322s registers an offense for mismatched puts 1; while test end and autocorrects 322s registers an offense for mismatched puts 1; unless test end and autocorrects 322s accepts matching until ... end 322s registers an offense for mismatched while test end and autocorrects 322s accepts matching puts 1; module ... end 322s accepts matching puts 1; class ... end 322s accepts matching module ... end 322s accepts matching if ... end 322s registers an offense for mismatched puts 1; if test end and autocorrects 322s register an offense when using a conditional statement in a method argument and `end` is not aligned 322s registers an offense for mismatched puts 1; class Test end and autocorrects 322s registers an offense for mismatched unless test end and autocorrects 322s accepts matching class ... end 322s registers an offense for mismatched module Test end and autocorrects 322s register an offense when using `-` operator method and `end` is not aligned 322s registers an offense for mismatched if test end and autocorrects 322s accepts matching puts 1; unless ... end 322s accepts matching unless ... end 322s registers an offense for mismatched puts 1; module Test end and autocorrects 322s registers an offense for mismatched class Test end and autocorrects 322s accepts matching puts 1; if ... end 322s accepts matching puts 1; while ... end 322s registers an offense for mismatched puts 1; until test end and autocorrects 322s accepts matching puts 1; until ... end 322s accepts matching while ... end 322s registers an offense for mismatched until test end and autocorrects 322s accepts matching puts 1; case ... end 322s registers an offense for mismatched case a when b end and autocorrects 322s registers an offense for mismatched puts 1; case a when b end and autocorrects 322s correct + opposite 322s registers an offense and corrects 322s regarding assignment 322s when EnforcedStyleAlignWith is variable 322s accepts matching var = until ... end 322s accepts matching h[k] = if ... end 322s accepts matching h.k = if ... end 322s accepts matching var = until ... end 322s accepts matching CNST = if ... end 322s accepts matching var = unless ... end 322s registers an offense for mismatched var = case a when b end and autocorrects 322s registers an offense for mismatched var = # comment while test end and autocorrects 322s registers an offense for mismatched @@var << if test end and autocorrects 322s registers an offense for mismatched var = until test do_something end and autocorrects 322s registers an offense for mismatched @@var = if test end and autocorrects 322s registers an offense for mismatched h[k] << if test end and autocorrects 322s accepts matching $var = if ... end 322s registers an offense for mismatched CNST << if test end and autocorrects 322s accepts matching @@var = if ... end 322s accepts matching var = while ... end 322s registers an offense for mismatched var &&= if test end and autocorrects 322s accepts matching var = if ... end 322s registers an offense for mismatched h.k = if test end and autocorrects 322s registers an offense for mismatched var << case a when b end and autocorrects 322s registers an offense for mismatched var = unless test end and autocorrects 322s registers an offense for mismatched var += if test end and autocorrects 322s registers an offense for mismatched var << unless test end and autocorrects 322s registers an offense for mismatched var = while test end and autocorrects 322s registers an offense for mismatched var = if test end and autocorrects 322s accepts matching var += if ... end 322s accepts matching var = until ... end 322s registers an offense for mismatched var[x] = while test end and autocorrects 322s registers an offense for mismatched CNST = if test end and autocorrects 322s registers an offense for mismatched var = unless test end and autocorrects 322s accepts matching var = case ... end 322s registers an offense for mismatched a, b = if test end and autocorrects 322s registers an offense for mismatched $var = if test end and autocorrects 322s registers an offense for mismatched var = if test end and autocorrects 322s registers an offense for mismatched var = until test end and autocorrects 322s registers an offense for mismatched $var << if test end and autocorrects 322s registers an offense for mismatched var ||= if test end and autocorrects 322s registers an offense for mismatched @var = if test end and autocorrects 322s registers an offense for mismatched h[k] = if test end and autocorrects 322s registers an offense for mismatched var << if test end and autocorrects 322s registers an offense for mismatched var << until test end and autocorrects 322s accepts matching @var = if ... end 322s accepts matching a, b = if ... end 322s accepts matching var ||= if ... end 322s accepts matching var &&= if ... end 322s accepts matching var = if ... end 322s registers an offense for mismatched var = until test end.j and autocorrects 322s accepts matching var << if ... end 322s registers an offense for mismatched @var << if test end and autocorrects 322s when EnforcedStyleAlignWith is keyword 322s registers an offense for mismatched var = while test end and autocorrects 322s accepts matching var[0] = case ... end 322s accepts matching var = until ... end 322s accepts matching var = unless ... end 322s registers an offense for mismatched var << until test end and autocorrects 323s accepts matching var = case ... end 323s registers an offense for mismatched var = unless test end and autocorrects 323s registers an offense for mismatched var = until test end and autocorrects 323s registers an offense for mismatched var = if test end and autocorrects 323s accepts matching var = while ... end 323s accepts matching var = if ... end 323s when EnforcedStyleAlignWith is start_of_line 323s registers an offense for mismatched if test end and autocorrects 323s accepts matching var << while ... end 323s accepts matching var = if ... end 323s registers an offense for mismatched puts 1; until test end and autocorrects 323s registers an offense for mismatched until test end and autocorrects 323s registers an offense for mismatched module Test end and autocorrects 323s accepts matching var = case ... end 323s registers an offense for mismatched var = case a when b end and autocorrects 323s accepts matching var = if ... end 323s registers an offense for mismatched unless test end and autocorrects 323s registers an offense for mismatched while test end and autocorrects 323s registers an offense for mismatched var << unless test end and autocorrects 323s accepts matching var = while ... end 323s accepts matching puts 1; module ... end 323s accepts matching puts 1; unless ... end 323s accepts matching puts 1; case ... end 323s accepts matching var = until ... end 323s registers an offense for mismatched puts 1; case a when b end and autocorrects 323s registers an offense for mismatched var = unless test end and autocorrects 323s registers an offense for mismatched puts 1; class Test end and autocorrects 323s accepts matching puts 1; if ... end 323s registers an offense for mismatched var << until test end and autocorrects 323s registers an offense for mismatched var = until test end and autocorrects 323s registers an offense for mismatched puts 1; module Test end and autocorrects 323s accepts matching puts 1; class ... end 323s registers an offense for mismatched var = if test end and autocorrects 323s registers an offense for mismatched puts 1; while test end and autocorrects 323s registers an offense for mismatched var << if test end and autocorrects 323s registers an offense for mismatched puts 1; unless test end and autocorrects 323s accepts matching puts 1; while ... end 323s registers an offense for mismatched var << while test end and autocorrects 323s accepts matching puts 1; until ... end 323s registers an offense for mismatched var << case a when b end and autocorrects 323s registers an offense for mismatched class Test end and autocorrects 323s registers an offense for mismatched var = while test end and autocorrects 323s accepts matching var = unless ... end 323s registers an offense for mismatched puts(if test end) and autocorrects 323s registers an offense for mismatched var = if test end and autocorrects 323s registers an offense for mismatched puts 1; if test end and autocorrects 323s registers an offense for mismatched case a when b end and autocorrects 323s 323s RuboCop::Cop::Style::AccessModifierDeclarations 323s when `group` is configured 323s accepts when #{access_modifier} is a hash literal value 323s does not offend when protected is not inlined 323s does not registers an offense when using #{access_modifier} in a block 323s does not offend when protected is not inlined and has a comment 323s does not offend when private is not inlined 323s does not offend when module_function is not inlined and has a comment 323s offends when private is inlined with a method 323s offends when module_function is inlined with a method 323s accepts when using only #{access_modifier} 323s does not offend when module_function is not inlined 323s registers an offense for correct + multiple opposite styles of #{access_modifier} usage 323s accepts when #{access_modifier} is a hash literal value 323s does not registers an offense when using #{access_modifier} in a block 323s accepts when #{access_modifier} is a hash literal value 323s does not offend when public is not inlined 323s registers an offense for correct + multiple opposite styles of #{access_modifier} usage 323s does not offend when public is not inlined and has a comment 323s accepts when using only #{access_modifier} 323s accepts when using only #{access_modifier} 323s does not registers an offense when using #{access_modifier} in a block 323s registers an offense for correct + multiple opposite styles of #{access_modifier} usage 323s does not registers an offense when using #{access_modifier} in a block 323s offends when public is inlined with a method 323s accepts when #{access_modifier} is a hash literal value 323s accepts when using only #{access_modifier} 323s offends when protected is inlined with a method 323s registers an offense for correct + multiple opposite styles of #{access_modifier} usage 323s does not offend when private is not inlined and has a comment 323s allow access modifiers on symbols 323s accepts when argument to #{access_modifier} is a symbol 323s when non-existent method is modified by inline modifier with disallowed symbol 323s registers an offense but does not autocorrect it 323s do not allow access modifiers on symbols 323s accepts when argument to #{access_modifier} is a symbol 323s when method is modified by inline modifier with disallowed symbol 323s registers and autocorrects an offense 323s when non-existent method is modified by inline modifier with disallowed symbol 323s registers an offense but does not autocorrect it 323s when method is modified by inline modifier with disallowed symbol 323s registers and autocorrects an offense 323s when method is modified by inline modifier where group modifier already exists 323s registers and autocorrects an offense 323s allow access modifiers on symbols 323s accepts when argument to #{access_modifier} is a symbol 323s when method is modified by inline modifier where group modifier already exists 323s registers and autocorrects an offense 323s allow access modifiers on symbols 323s accepts when argument to #{access_modifier} is a symbol 323s when method is modified by inline modifier where group modifier already exists 323s registers and autocorrects an offense 323s when method is modified by inline modifier 323s registers and autocorrects an offense 323s when non-existent method is modified by inline modifier with disallowed symbol 323s registers an offense but does not autocorrect it 323s when method has comments 323s registers and autocorrects an offense 323s when method has comments 323s registers and autocorrects an offense 323s do not allow access modifiers on symbols 323s accepts when argument to #{access_modifier} is a symbol 323s when method is modified by inline modifier where group modifier already exists 323s registers and autocorrects an offense 323s when non-existent method is modified by inline modifier with disallowed symbol 323s registers an offense but does not autocorrect it 323s allow access modifiers on symbols 323s accepts when argument to #{access_modifier} is a symbol 323s when method is modified by inline modifier 323s registers and autocorrects an offense 323s when method has comments 323s registers and autocorrects an offense 323s when method has comments 323s registers and autocorrects an offense 323s when method is modified by inline modifier 323s registers and autocorrects an offense 323s do not allow access modifiers on symbols 323s accepts when argument to #{access_modifier} is a symbol 323s when method is modified by inline modifier with disallowed symbol 323s registers and autocorrects an offense 323s when method is modified by inline modifier with disallowed symbol 323s registers and autocorrects an offense 323s when method is modified by inline modifier 323s registers and autocorrects an offense 323s do not allow access modifiers on symbols 323s accepts when argument to #{access_modifier} is a symbol 323s when `inline` is configured 323s accepts when #{access_modifier} is a hash literal value 323s offends when public is not inlined and has a comment 323s offends when module_function is not inlined 323s does not offend when module_function is inlined with a method 323s does not offend when protected is inlined with a method 323s registers an offense for correct + multiple opposite styles of #{access_modifier} usage 323s offends when module_function is not inlined and has a comment 323s offends when protected is not inlined 323s offends when private is not inlined 323s offends when public is not inlined 323s does not offend when module_function is inlined with a symbol 323s registers an offense for correct + multiple opposite styles of #{access_modifier} usage 323s does not offend when protected is inlined with a symbol 323s does not offend when private is inlined with a symbol 323s does not offend when private is inlined with a method 323s registers an offense for correct + multiple opposite styles of #{access_modifier} usage 323s accepts when #{access_modifier} is a hash literal value 323s does not offend when public is inlined with a method 323s registers an offense for correct + multiple opposite styles of #{access_modifier} usage 323s does not offend when public is inlined with a symbol 323s accepts when #{access_modifier} is a hash literal value 323s offends when protected is not inlined and has a comment 323s accepts when #{access_modifier} is a hash literal value 323s offends when private is not inlined and has a comment 323s do not allow access modifiers on symbols 323s accepts when argument to #{access_modifier} is a symbol 323s when methods are modified by group modifier 323s registers and autocorrects an offense 323s when methods are modified by group modifier 323s registers and autocorrects an offense 323s when methods are modified by group modifier 323s registers and autocorrects an offense 323s do not allow access modifiers on symbols 323s accepts when argument to #{access_modifier} is a symbol 323s allow access modifiers on symbols 323s accepts when argument to #{access_modifier} is a symbol 323s do not allow access modifiers on symbols 323s accepts when argument to #{access_modifier} is a symbol 323s allow access modifiers on symbols 323s accepts when argument to #{access_modifier} is a symbol 323s do not allow access modifiers on symbols 323s accepts when argument to #{access_modifier} is a symbol 323s allow access modifiers on symbols 323s accepts when argument to #{access_modifier} is a symbol 323s allow access modifiers on symbols 323s accepts when argument to #{access_modifier} is a symbol 323s when methods are modified by group modifier 323s registers and autocorrects an offense 323s 323s RuboCop::Cop::Style::WhenThen 323s accepts ; separating statements in the body of when 323s registers an offense for when b; 323s registers an offense for when b, c; 323s when inspecting a case statement with an empty branch 323s does not register an offense 323s 323s RuboCop::CLI --autocorrect 323s does not hang SpaceAfterPunctuation and SpaceInsideParens 323s corrects IndentationWidth and IndentationConsistency offenseswithout correcting `Style/TrailingBodyOnClass` 323s corrects `Layout/DotPosition` and `Style/RedundantSelf` offenses 324s corrects `Layout/SpaceAroundOperators` and `Layout/ExtraSpacing` offenses when using `ForceEqualSignAlignment: true` 324s honors Exclude settings in individual cops 324s avoids adding extra spaces when both `Style/Semicolon` and `Style/SingleLineMethods`both apply 324s 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 324s can correct HashSyntax when --only is used 324s corrects `EnforcedStyle: require_parentheses` of `Style/MethodCallWithArgsParentheses` with `Layout/SpaceBeforeFirstArg` 324s corrects when specifying `EnforcedStyle: with_fixed_indentation` of `Layout/ArgumentAlignment` and `Layout/HashAlignment` and `Layout/FirstHashElementIndentation` 325s corrects indentation for a begin/rescue/else/ensure/end block properly 325s can change block comments and indent them 325s corrects code with indentation problems 325s can correct TrailingEmptyLines and TrailingWhitespace offenses 325s corrects `Style/IfUnlessModifier` with `Style/SoleNestedConditional` 325s corrects `EnforcedStyle: line_count_based` of `Style/BlockDelimiters` with `Style/CommentedKeyword` and `Layout/BlockEndNewline` 326s corrects Style/BlockDelimiters offenses when specifyingLayout/SpaceInsideBlockBraces together 326s corrects `Style/RedundantBegin` with `Style/MultilineMemoization` 326s corrects `EnforcedStyle: require_parentheses` of `Style/MethodCallWithArgsParentheses` with `EnforcedStyle: conditionals` of `Style/AndOr` 326s 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` 326s can correct MethodDefParentheses and other offense 326s corrects Style/InverseMethods and Style/Not offenses 326s says [Correctable] if correction is unsafe 327s corrects Style/BlockDelimiters offenses when specifyingLayout/SpaceBeforeBlockBraces with `EnforcedStyle: no_space` together 327s can be disabled for any cop in configuration 327s corrects `Lint/UnusedMethodArgument` with `Style/ExplicitBlockArgument` 327s properly corrects when `Style/SoleNestedConditional` and one of `Style/NegatedIf` or `Style/NegatedUnless` detect offenses 327s can correct IndentHash offenses with separator style 327s corrects Lint/ParenthesesAsGroupedExpression and offenses and accepts Style/RedundantParentheses 327s does not crash when using Lint/SafeNavigationWithEmpty and Layout/EmptyLinesAroundBlockBody 328s corrects `Style/InverseMethods` offenses when specifying `IncludeSemanticChanges: false` of `Style/NonNilCheck` and `EnforcedStyle: comparison` of `Style/NilComparison` 328s can correct SpaceAfterComma and HashSyntax offenses 328s corrects InitialIndentation offenses 328s consistently quotes symbol keys in a hash using `Lint/SymbolConversion` with `EnforcedStyle: consistent` and `Style/QuotedSymbols` 328s can correct indentation and another thing 328s corrects `Style/TernaryParentheses` offenses and accepts `Lint/ParenthesesAsGroupedExpression` 328s can correct HashSyntax and SpaceAroundOperators offenses 328s does not crash Lint/SafeNavigationWithEmpty and offenses and accepts Style/SafeNavigation when checking `foo&.empty?` in a conditional 329s does not correct SpaceAroundOperators in a hash that would be changed back 329s 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` 329s corrects HeredocArgumentClosingParenthesis offenses and ignores TrailingCommaInArguments offense 329s corrects SymbolProc and SpaceBeforeBlockBraces offenses 329s corrects RedundantBegin offenses and fixes indentation etc 330s handles different SpaceInsideBlockBraces and SpaceInsideHashLiteralBraces 330s can correct WordArray and SpaceAfterComma offenses 330s corrects when specifying `EnforcedStyle: with_first_argument` of `Layout/ArgumentAlignment` and `EnforcedColonStyle: separator` of `Layout/HashAlignment` (`EnforcedColonStyle` is array) 330s can correct two empty lines at end of class body 330s corrects only IndentationWidth without crashing 330s properly autocorrects when `Style/TernaryParentheses` requires parentheses that `Style/RedundantParentheses` would otherwise remove 331s plays nicely with default cops in complex ExtraSpacing scenarios 331s corrects IndentationWidth and IndentationConsistency offenses 332s can correct empty line inside special form of nested modules 332s corrects Layout/RedundantLineBreak and Layout/SingleLineBlockChain offenses 332s can correct MethodCallWithoutArgsParentheses and EmptyLiteral offenses 332s can correct a problems and the problem it creates 332s 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` 332s corrects properly when both `Style/MapToHash` and `Style/HashTransformKeys`or `Style/HashTransformValues` registers 332s corrects TrailingCommaIn(Array|Hash)Literal and Multiline(Array|Hash)BraceLayout offenses 333s corrects when specifying `EnforcedStyle: with_first_argument` of `Layout/ArgumentAlignment` and `EnforcedHashRocketStyle: separator` of `Layout/HashAlignment` 333s does not correct ExtraSpacing in a hash that would be changed back 333s corrects when specifying `EnforcedStyle: with_fixed_indentation` of `Layout/ArgumentAlignment` and `Layout/HashAlignment` 333s corrects IndentationWidth, RedundantBegin, and RescueEnsureAlignment offenses 333s corrects `Style/SoleNestedConditional` with `Style/InverseMethods` and `Style/IfUnlessModifier` 333s corrects `EnforcedStyle: require_parentheses` of `Style/MethodCallWithArgsParentheses` with `Style/NestedParenthesizedCalls` 333s breaks line at the beginning of trailing class/module body without removing a semicolon in the bodywhen using `Style/TrailingBodyOnClass` and `Style/TrailingBodyOnModule` 334s can correct two problems with blocks 334s corrects when specifying `EnforcedStyle: with_fixed_indentation` of `Layout/ArgumentAlignment` and `EnforcedStyle: consistent` of `Layout/FirstArgumentIndentation` 334s corrects RedundantCopDisableDirective offenses 334s corrects IndentationWidth and IndentationConsistency offenseswhen using `EnforcedStyle: outdent` and `EnforcedStyle: indented_internal_methods` 335s does not say [Corrected] if correction is not possible 335s does not hang SpaceAfterPunctuation and SpaceInsideArrayLiteralBrackets 335s corrects `Layout/DotPosition` and `Layout/SingleLineBlockChain` offenses 335s can correct two problems in the same place 335s corrects Tab and IndentationConsistency offenses 335s corrects `EnforcedStyle: hash_rockets` of `Style/HashSyntax` with `Layout/HashAlignment` 335s can correct single line methods 336s corrects LineEndConcatenation offenses leaving the RedundantInterpolation offense unchanged 336s corrects Style/Next and Style/SafeNavigation offenses 336s 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 336s does not crash when using `Layout/CaseIndentation` and `Layout/ElseAlignment` 336s corrects `EnforcedStyle: require_parentheses` of `Style/MethodCallWithArgsParentheses` with `Style/RescueModifier` 336s 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` 336s corrects `Naming/RescuedExceptionsVariableName` and `, `Style/RescueStandardError`and `Lint/OverwriteByRescue` offenses 337s corrects `Lint/Lambda` and `Lint/UnusedBlockArgument` offenses 337s corrects `EnforcedStyle: require_parentheses` of `Style/MethodCallWithArgsParentheses` with `Lint/AmbiguousOperator` 337s corrects when specifying `EnforcedStyle: with_first_argument` of `Layout/ArgumentAlignment` and `EnforcedColonStyle: separator` of `Layout/HashAlignment` 337s caching 337s with an offense in the cache 337s corrects offenses 337s with no offenses in the cache 337s doesn't correct offenses 337s when BlockDelimiters has semantic style 337s corrects SpaceBeforeBlockBraces, SpaceInsideBlockBraces offenses 337s when BlockDelimiters has braces_for_chaining style 337s corrects SpaceBeforeBlockBraces, SpaceInsideBlockBraces offenses 337s trailing comma cops 337s when the style is `comma` 338s corrects TrailingCommaInLiteral and TrailingCommaInArguments without producing a double comma 338s when the style is `consistent_comma` 338s corrects TrailingCommaInLiteral and TrailingCommaInArguments without producing a double comma 338s space_inside_bracket cops 338s when array style is space & reference style is no space 338s corrects SpaceInsideArrayLiteralBrackets and SpaceInsideReferenceBrackets 338s when array style is compact & reference style is space 338s corrects SpaceInsideArrayLiteralBrackets and SpaceInsideReferenceBrackets 338s when array style is no_space & reference style is space 339s corrects SpaceInsideArrayLiteralBrackets and SpaceInsideReferenceBrackets 339s when array style is compact & reference style is no_space 339s corrects SpaceInsideArrayLiteralBrackets and SpaceInsideReferenceBrackets 339s when BlockDelimiters has line_count_based style 339s corrects SpaceBeforeBlockBraces, SpaceInsideBlockBraces offenses 339s 339s RuboCop::Cop::Lint::NumberedParameterAssignment 339s registers an offense when using `_10` lvar 339s registers an offense when using `_0` lvar 339s does not register an offense when using non numbered parameter 339s does not register an offense when index assignment 339s when Ruby 2.7 or lower 339s registers an offense when using `_1` numbered parameter 339s registers an offense when using `_9` numbered parameter 339s registers an offense when using `_3` numbered parameter 339s registers an offense when using `_2` numbered parameter 339s registers an offense when using `_4` numbered parameter 339s registers an offense when using `_6` numbered parameter 339s registers an offense when using `_5` numbered parameter 339s registers an offense when using `_8` numbered parameter 339s registers an offense when using `_7` numbered parameter 339s 339s RuboCop::Cop::Gemspec::RequireMFA 339s when metadata is set by key assignment 339s and `rubygems_mfa_required` is included 339s does not register an offense 339s and `rubygems_mfa_required` is not included 339s registers an offense 339s with rubygems_mfa_required: true 339s does not register an offense 339s when the specification has an non-hash metadata 339s registers an offense but does not correct 339s with rubygems_mfa_required: false by key access 339s registers an offense and corrects 339s when the specification is blank 339s registers an offense and corrects 339s when there are other metadata keys 339s and `rubygems_mfa_required` is included 339s does not register an offense 339s and `rubygems_mfa_required` is not included 339s registers an offense and corrects 339s with rubygems_mfa_required: false 339s registers an offense and corrects 339s when the gemspec is blank 339s does not register an offense 339s when the specification has a metadata hash but no rubygems_mfa_required key 339s registers an offense and corrects 339s 339s RuboCop::Cop::Commissioner 339s #investigate 339s stores all errors raised by the cops 339s traverses the AST and invoke cops specific callbacks 339s when given a force 339s passes the input params to all cops/forces that implement their own #investigate method 339s when a cop reports offenses 339s returns all offenses found by the cops 339s traverses the AST with on_send / on_csend 339s for a restricted cop 339s calls on_send for the right method calls 339s on both csend and send 339s calls on_send for the right method calls 339s for unrestricted cops 339s calls on_send all method calls 339s when given a source with parsing errors 339s only calls on_other_file 339s when passed :raise_error option 339s re-raises the exception received while processing 339s when passed :raise_cop_error option 339s re-raises the exception received while processing 339s 339s RuboCop::Cop::Security::Open 339s registers an offense for `URI.open` with string that starts with a pipe 339s accepts open with no arguments 339s registers an offense for `::URI.open` with string that starts with a pipe 339s registers an offense for open with a block 339s accepts open with string that has a prefixed interpolation 339s registers an offense for open 339s registers an offense for `URI.open` with a block 339s accepts open with prefix string literal plus something 339s accepts open on a literal string 339s accepts open with a literal string starting with a pipe 339s registers an offense for open with mode argument 339s registers an offense for open with dynamic string that is not prefixed 339s accepts File.open as method 339s accepts open with a string that interpolates a literal 339s registers an offense for open with string that starts with a pipe 339s accepts open as variable 339s 339s RuboCop::Cop::Lint::RandOne 339s behaves like offenses 339s Kernel.rand(-1) 339s registers an offense 339s behaves like offenses 339s Kernel.rand(-1.0) 339s registers an offense 339s behaves like no offense 339s rand(-1..1) 339s does not register an offense 339s behaves like no offense 339s rand(2) 339s does not register an offense 339s behaves like offenses 339s rand(-1) 339s registers an offense 339s behaves like no offense 339s Kernel.rand 2 339s does not register an offense 339s behaves like offenses 339s rand(1.0) 340s registers an offense 340s behaves like no offense 340s ::Kernel.rand 340s does not register an offense 340s behaves like offenses 340s rand 1 340s registers an offense 340s behaves like offenses 340s ::Kernel.rand(1) 340s registers an offense 340s behaves like no offense 340s rand 340s does not register an offense 340s behaves like no offense 340s Kernel.rand 340s does not register an offense 340s behaves like offenses 340s Kernel.rand 1.0 340s registers an offense 340s behaves like offenses 340s Kernel.rand(1) 340s registers an offense 340s behaves like offenses 340s rand(-1.0) 340s registers an offense 340s behaves like no offense 340s Kernel.rand(-1..1) 340s does not register an offense 340s 340s RuboCop::Cop::Metrics::BlockLength 340s rejects brace blocks too 340s properly counts nested blocks 340s accepts a block with multiline receiver and less than 3 lines of body 340s accepts a block with less than 3 lines 340s rejects a block with more than 5 lines 340s does not count commented lines by default 340s reports the correct beginning and end lines 340s does not count blank lines 340s accepts empty blocks 340s when defining a Struct 340s does not register an offense 340s when using numbered parameter 340s rejects a block with more than 5 lines 340s does not count blank lines 340s reports the correct beginning and end lines 340s accepts a block with less than 3 lines 340s when methods to allow are defined 340s when ExcludedMethods is enabled 340s does not report an offense 340s that does not match 340s reports an offense 340s when AllowedMethods is enabled 340s when receiver contains whitespaces 340s allows whitespaces 340s when a method is allowed, but receiver is a module 340s does not report an offense 340s behaves like allow an offense on an allowed method 340s still rejects other methods with long blocks 340s accepts the foo method with a long block 340s behaves like allow an offense on an allowed method 340s still rejects other methods with long blocks 340s accepts the foo method with a long block 340s when AllowedPatterns is enabled 340s does not report an offense 340s that does not match 340s reports an offense 340s when IgnoredMethods is enabled 340s when string 340s does not report an offense 340s that does not match 340s reports an offense 340s when regex 340s does not report an offense 340s that does not match 340s reports an offense 340s when defining a class 340s does not register an offense 340s when CountComments is enabled 340s also counts commented lines 340s when defining a module 340s does not register an offense 340s when `CountAsOne` is not empty 340s folds array into one line 340s 340s RuboCop::Cop::Style::ObjectThen 340s EnforcedStyle: then 340s accepts yield_self without a block 340s accepts yield_self with more than 1 param 340s registers an offense for yield_self with proc param 340s Ruby 2.6 340s registers an offense for yield_self with block 340s Ruby 2.7 340s registers an offense for yield_self with block 340s Ruby 2.5 340s accepts yield_self with block 340s EnforcedStyle: yield_self 340s registers an offense for then with proc param 340s registers an offense for then with block 340s accepts then with more than 1 param 340s accepts then without a block 340s 340s RuboCop::Cop::Style::ArrayJoin 340s autocorrects '*' to 'join' when there are no spaces 340s registers an offense for an array followed by string 340s does not register an offense for numbers 340s does not register an offense for ambiguous cases 340s autocorrects '*' to 'join' when setting to a variable 340s 340s RuboCop::Cop::Gemspec::DependencyVersion 340s with `EnforcedStyle: required` 340s using add_dependency 340s registers an offense when adding dependency without version specification 340s does not register an offense when adding dependency by parenthesized call with tag specification 340s does not register an offense when adding dependency by parenthesized call with commit ref specification 340s does not register an offense when adding dependency with branch specification 340s does not register an offense when adding dependency with tag specification 340s does not register an offense when adding dependency with commit ref specification 340s does not register an offense when adding dependency with version specification 340s does not register an offense when adding dependency by parenthesized call with version specification 340s registers an offense when adding dependency using git option by parenthesized call without version specification 340s does not register an offense when adding dependency by parenthesized call with branch specification 340s registers an offense when adding dependency using git option without version specification 340s registers an offense when adding dependency by parenthesized call without version specification 340s with `AllowedGems` 340s registers an offense when adding dependency without version specification excepts allowed gems 340s registers an offense when adding dependency by parenthesized call without version specification excepts allowed gems 340s using add_development_dependency 340s registers an offense when adding development dependency without version specification 340s registers an offense when adding development dependency using git option by parenthesized call without version specification 340s does not register an offense when adding development dependency by parenthesized call with version specification 340s does not register an offense when adding development dependency with tag specification 340s does not register an offense when adding development dependency with version specification 340s does not register an offense when adding development dependency with commit ref specification 340s does not register an offense when adding development dependency by parenthesized call with commit ref specification 340s does not register an offense when adding development dependency by parenthesized call with tag specification 340s does not register an offense when adding development dependency with branch specification 340s registers an offense when adding development dependency using git option without version specification 340s registers an offense when adding development dependency by parenthesized call without version specification 340s does not register an offense when adding development dependency by parenthesized call with branch specification 340s using add_runtime_dependency 340s registers an offense when adding runtime dependency by parenthesized call without version specification 340s registers an offense when adding runtime dependency using git option by parenthesized call without version specification 340s does not register an offense when adding runtime dependency by parenthesized call with version specification 340s does not register an offense when adding runtime dependency by parenthesized call with tag specification 340s does not register an offense when adding runtime dependency by parenthesized call with branch specification 340s registers an offense when adding runtime dependency using git option without version specification 340s does not register an offense when adding runtime dependency with commit ref specification 340s does not register an offense when adding runtime dependency by parenthesized call with commit ref specification 340s registers an offense when adding runtime dependency without version specification 340s does not register an offense when adding runtime dependency with branch specification 340s does not register an offense when adding runtime dependency with tag specification 340s does not register an offense when adding runtime dependency with version specification 340s with `EnforcedStyle: forbidden` 340s with `AllowedGems` 340s registers an offense when adding dependency by parenthesized call without version specification 340s registers an offense when adding dependency without version specification 340s using add_runtime_dependency 340s registers an offense when adding runtime dependency with branch specification 340s registers an offense when adding runtime dependency by parenthesized call with tag specification 340s registers an offense when adding runtime dependency with version specification 340s does not register an offense when adding runtime dependency using git option without version specification 340s registers an offense when adding runtime dependency by parenthesized call with version specification 340s registers an offense when adding runtime dependency with commit ref specification 340s registers an offense when adding runtime dependency by parenthesized call with commit ref specification 340s registers an offense when adding runtime dependency with tag specification 340s registers an offense when adding runtime dependency by parenthesized call with branch specification 340s does not register an offense when adding runtime dependency using git option by parenthesized call without version specification 340s does not register an offense when adding runtime dependency by parenthesized call without version specification 340s does not register an offense when adding runtime dependency without version specification 340s using add_dependency 340s does not register an offense when adding dependency by parenthesized call without version specification 340s does not register an offense when adding dependency using git option without version specification 340s does not register an offense when adding dependency without version specification 340s registers an offense when adding dependency with version specification 340s registers an offense when adding dependency with commit ref specification 340s registers an offense when adding dependency by parenthesized call with commit ref specification 340s registers an offense when adding dependency by parenthesized call with branch specification 340s does not register an offense when adding dependency using git option by parenthesized call without version specification 340s registers an offense when adding dependency by parenthesized call with version specification 340s registers an offense when adding dependency by parenthesized call with tag specification 340s registers an offense when adding dependency with branch specification 340s registers an offense when adding dependency with tag specification 340s using add_development_dependency 340s does not register an offense when adding development dependency using git option without version specification 340s does not register an offense when adding development dependency using git option by parenthesized call without version specification 340s registers an offense when adding development dependency with commit ref specification 340s registers an offense when adding development dependency by parenthesized call with branch specification 340s registers an offense when adding development dependency with branch specification 340s registers an offense when adding development dependency by parenthesized call with tag specification 340s registers an offense when adding development dependency by parenthesized call with commit ref specification 340s does not register an offense when adding development dependency without version specification 340s registers an offense when adding development dependency with tag specification 340s does not register an offense when adding development dependency by parenthesized call without version specification 340s registers an offense when adding development dependency by parenthesized call with version specification 340s registers an offense when adding development dependency with version specification 340s 340s RuboCop::Cop::Style::OptionalArguments 340s allows methods with only one optional argument 340s allows methods with only optional arguments 340s registers an offense when an optional argument is followed by a required argument 340s allows methods with multiple optional arguments at the end 340s allows methods with only one required argument 340s allows methods with only required arguments 340s allows methods without arguments 340s registers an offense for each optional argument when multiple optional arguments are followed by a required argument 340s named params 340s required params 340s allows optional arguments before required named arguments 340s allows optional arguments to come before a mix of required and optional named argument 340s registers an offense for optional arguments that come before required arguments where there are name arguments 340s with default values 340s allows optional arguments before an optional named argument 340s 340s RuboCop::Cop::Style::Documentation 340s registers an offense for non-empty cbase class 340s accepts namespace class without documentation 340s does not raise an error for an implicit match conditional 340s registers an offense for compact-style nested class 340s registers offense for non-empty class with frozen string comment 340s accepts namespace module without documentation 340s registers an offense for non-empty class with directive comment 340s registers an offense for non-empty class with encoding comment 340s registers an offense for non-empty class 340s registers an offense for non-empty class with annotation comment 340s accepts non-empty module with documentation 340s accepts non-empty class with documentation 340s accepts non-empty class with comment that ends with an annotation 340s accepts empty class without documentation 340s does not consider comment followed by empty line to be class documentation 340s accepts namespace class which defines constants 340s accepts namespace module which defines constants 340s accepts non-empty class with annotation comment followed by other comment 340s registers an offense if the comment line contains code 340s registers an offense for empty module without documentation 340s registers an offense for non-namespace 340s registers an offense for a deeply nested class 340s registers an offense for compact-style nested module 340s without documentation 340s macro-only class 340s registers offense for macro with other methods 340s does not register offense with single macro 340s does not register offense with multiple macros 340s with non-empty module 340s with constants visibility declaration content 340s does not register an offense 340s with non-empty class 340s with constants visibility declaration content 340s does not register an offense 340s with # :nodoc: 340s accepts compact-style nested class without documentation 340s accepts compact-style nested module without documentation 340s registers an offense for nested class without documentation 340s accepts non-namespace module without documentation 340s registers an offense for nested module without documentation 340s accepts non-namespace class without documentation 340s on a subclass 340s accepts non-namespace subclass without documentation 340s registers an offense for nested subclass without documentation 340s with `all` modifier 340s accepts nested subclass without documentation 340s when AllowedConstants is configured 340s ignores the constants in the config 340s with `all` modifier 340s accepts nested class without documentation 340s with `all` modifier 340s accepts nested module without documentation 340s sparse and trailing comments 340s ignores comments after class node end 340s ignores comments after module node end 340s ignores sparse comments inside class node 340s ignores sparse comments inside module node 340s 340s RuboCop::Cop::Style::ParallelAssignment 340s corrects when the right variable is a symbol array 340s registers an offense when the right side has methods with/without blocks 340s registers an offense with indices 340s corrects when using nested indentation 340s corrects parallel assignment in if statements 340s registers an offense when the right side has multiple hashes 340s registers an offense with indices and attributes when assignments must be reordered to preserve meaning 340s corrects when assignments must be reordered to avoid changing meaning 340s corrects parallel assignment in rescue statements within begin ... rescue 340s registers an offense with attributes when assignments must be reordered to preserve meaning 340s corrects when the expression uses a modifier rescue statement as the only thing inside of a method 340s corrects when the expression uses a modifier rescue statement inside of a method 340s allows more left variables than right variables 340s corrects when the expression uses a modifier rescue statement 340s allows more right variables than left variables 340s registers an offense when the right side has constants 340s registers an offense when assigning to same variables in same order 340s registers an offense when assigning to namespaced constants 340s corrects when using constants 340s corrects when the right variable is a word array 340s corrects when the expression uses a modifier if statement inside a method 340s allows expanding an assigned var 340s registers an offense when assignments must be reordered to preserve meaning 340s registers an offense when the right side has mixed expressions 340s corrects when the expression uses a modifier if statement 340s corrects when the right variable is an array 340s corrects parallel assignment inside rescue statements within method definitions 340s registers an offense when the right side has mulitiple arrays 340s corrects when assigning from multiple methods with blocks 340s corrects when using parallel assignment in singleton method 340s corrects parallel assignment in while statements 340s corrects parallel assignment in unless statements 340s corrects when the number of left hand variables matches the number of right hand variables 340s corrects when the expression uses a modifier until statement 340s corrects when the expression is missing spaces 340s corrects when using single indentation 340s corrects when the expression uses a modifier while statement 340s registers an offense when left hand side ends with an implicit variable 340s corrects when assigning to method returns 340s registers an offense when right hand side has maps with blocks 340s registers an offense with indices of different variables 340s corrects when the expression uses a modifier unless statement 340s registers an offense when right hand side has namespaced constants 340s corrects parallel assignment in until statements 340s behaves like allowed 340s allows assignment of: foo = [1, 2, 3]; a, b, c = foo; 340s behaves like allowed 340s allows assignment of: a = a 340s behaves like allowed 340s allows assignment of: a, b, c = *node, 1, 2 340s behaves like allowed 340s allows assignment of: a, = *foo 340s behaves like allowed 340s allows assignment of: ary[0], ary[1], ary[2] = ary[1], ary[2], ary[0] 340s behaves like allowed 340s allows assignment of: a = *'foo' 340s behaves like allowed 340s allows assignment of: a, b = foo.map { |e| e.id } 340s behaves like allowed 340s allows assignment of: a, b = Float::INFINITY 340s behaves like allowed 340s allows assignment of: self.a, self.b = b, a 340s behaves like allowed 340s allows assignment of: a, = 1 340s behaves like allowed 340s allows assignment of: a = 1 340s behaves like allowed 340s allows assignment of: array = [1, 2, 3]; a, = array; 340s behaves like allowed 340s allows assignment of: *a, b = [1, 2, 3] 340s behaves like allowed 340s allows assignment of: a, b, c = b, c, a 340s behaves like allowed 340s allows assignment of: a = 1; b = 2; 340s behaves like allowed 340s allows assignment of: begin_token, end_token = CONSTANT 340s behaves like allowed 340s allows assignment of: self.a, self.b = self.b, self.a 340s behaves like allowed 340s allows assignment of: a, = a 340s behaves like allowed 340s allows assignment of: a, b = b, a 340s behaves like allowed 340s allows assignment of: a, b = (a + b), (a - b) 340s using custom indentation width 340s works with nesting 340s works with standard correction 340s works with rescue 340s works with guard clauses 340s behaves like allowed 340s allows assignment of: a, = *'foo' 340s behaves like allowed 340s allows assignment of: a[0], a[1] = a[1], a[0] 340s behaves like allowed 340s allows assignment of: a, b = foo() 340s behaves like allowed 340s allows assignment of: a, b, c = 1, 2, *node 340s behaves like allowed 340s allows assignment of: obj.attr1, ary[0] = ary[0], obj.attr1 340s behaves like allowed 340s allows assignment of: obj.attr1, obj.attr2 = obj.attr2, obj.attr1 340s behaves like allowed 340s allows assignment of: a, = 1, 2, 3 340s behaves like allowed 340s allows assignment of: CONSTANT, = 1, 2 340s behaves like allowed 340s allows assignment of: a, *b = [1, 2, 3] 340s behaves like allowed 340s allows assignment of: a, b = *foo 340s 340s RuboCop::Cop::Style::RedundantStringEscape 340s does not register an offense for a __dir__ literal 340s does not register an offense for a __FILE__ literal 340s does not register an offense for a regexp literal 340s does not register an offense for a x-str literal 340s with a %W(...) literal 340s does not register an offense for escaped spaces 340s behaves like a literal with interpolation 340s does not register an offense for a @-escaped cvar interpolation 340s does not register an offense for a unicode escape 340s does not register an offense for a @-escaped ivar interpolation 340s does not register an offense for a bracket-escaped interpolation 340s does not register an offense for an escaped gvar interpolation 340s does not register an offense for an escaped # followed { 340s does not register an offense for an octal escape 340s does not register an offense for an ascii DEL 340s does not register an offense for a $-escaped gvar interpolation 340s registers an offense and corrects an escaped # without following { 340s does not register an offense without escapes 340s registers an offense and corrects an escaped double quote 340s does not register an offense for an escaped delimiter 341s does not register an offense for a technically-unnecessary escape 341s does not register an offense for an escaped interpolation 341s does not register an offense for an escaped delimiter before interpolation 341s does not register an offense for an escaped cvar interpolation 341s does not register an offense for an escaped backslash 341s does not register an offense for a hex escape 341s does not register an offense for a meta character 341s does not register an offense for an escaped ivar interpolation 341s registers an offense and corrects an escaped # before interpolation 341s does not register an offense for a newline 341s registers an offense and corrects an escaped single quote 341s does not register an offense for an escaped newline 341s does not register an offense for meta control characters 341s registers an offense and corrects an escaped # at end-of-string 341s registers an offense and corrects a escaped nested delimiter in a double quoted string 341s does not register an offense for control characters 341s registers an offense and corrects an escaped } when escaping both brackets to avoid interpolation 341s does not register a bracket-escaped lvar interpolation 341s does not register an offense for multiple unicode escapes 341s with a %Q!...! literal 341s behaves like a literal with interpolation 341s does not register an offense for a bracket-escaped interpolation 341s registers an offense and corrects a escaped nested delimiter in a double quoted string 341s registers an offense and corrects an escaped # without following { 341s registers an offense and corrects an escaped } when escaping both brackets to avoid interpolation 341s does not register a bracket-escaped lvar interpolation 341s does not register an offense for an escaped ivar interpolation 341s does not register an offense for an escaped backslash 341s does not register an offense for an escaped cvar interpolation 341s does not register an offense for an escaped gvar interpolation 341s does not register an offense without escapes 341s does not register an offense for a @-escaped ivar interpolation 341s does not register an offense for an ascii DEL 341s registers an offense and corrects an escaped # before interpolation 341s registers an offense and corrects an escaped # at end-of-string 341s does not register an offense for a meta character 341s does not register an offense for a technically-unnecessary escape 341s does not register an offense for a hex escape 341s registers an offense and corrects an escaped single quote 341s does not register an offense for multiple unicode escapes 341s does not register an offense for an escaped delimiter before interpolation 341s does not register an offense for an escaped newline 341s does not register an offense for an escaped # followed { 341s does not register an offense for a unicode escape 341s does not register an offense for a @-escaped cvar interpolation 341s does not register an offense for control characters 341s does not register an offense for an octal escape 341s does not register an offense for a $-escaped gvar interpolation 341s does not register an offense for an escaped interpolation 341s does not register an offense for an escaped delimiter 341s does not register an offense for meta control characters 341s registers an offense and corrects an escaped double quote 341s does not register an offense for a newline 341s with an interpolation-disabled HEREDOC 341s behaves like a literal without interpolation 341s does not register an offense with escaped # at end-of-string 341s does not register an offense for an octal escape 341s does not register an offense for an escaped # with following { 341s does not register an offense with escaped single quote 341s does not register an offense for an escaped cvar interpolation 341s does not register an offense for a hex escape 341s does not register an offense for a @-escaped ivar interpolation 341s does not register an offense for a unicode escape 341s does not register an offense for a technically-unnecessary escape 341s does not register an offense for a meta character 341s does not register an offense for an escaped gvar interpolation 341s does not register an offense for an allowed escape inside multi-line literal 341s does not register an offense for an ascii DEL 341s does not register an offense for a newline 341s does not register an offense with escaped double quote 341s does not register an offense for a bracket-escaped interpolation 341s does not register an offense for an escaped interpolation 341s does not register an offense for an escaped # followed { 341s does not register an offense for an escaped ivar interpolation 341s does not register an offense without escapes 341s does not register an offense for an escaped backslash 341s does not register an offense for a @-escaped cvar interpolation 341s does not register a bracket-escaped lvar interpolation 341s does not register an offense for meta control characters 341s does not register an offense with escaped # without following { 341s does not register an offense for a $-escaped gvar interpolation 341s does not register an offense for multiple unicode escapes 341s does not register an offense for an escaped newline 341s does not register an offense for control characters 341s with a %Q(...) literal 341s behaves like a literal with interpolation 341s registers an offense and corrects an escaped # at end-of-string 341s does not register an offense for an escaped ivar interpolation 341s does not register an offense for a technically-unnecessary escape 341s does not register an offense for an escaped newline 341s does not register an offense for an escaped interpolation 341s does not register an offense for a @-escaped ivar interpolation 341s does not register an offense for a newline 341s does not register an offense for a meta character 341s does not register an offense for control characters 341s does not register an offense for a bracket-escaped interpolation 341s does not register an offense for a hex escape 341s does not register an offense for an escaped delimiter before interpolation 341s does not register an offense for an escaped # followed { 341s does not register an offense for an escaped delimiter 341s registers an offense and corrects an escaped } when escaping both brackets to avoid interpolation 341s does not register an offense without escapes 341s does not register a bracket-escaped lvar interpolation 341s does not register an offense for an octal escape 341s does not register an offense for a @-escaped cvar interpolation 341s does not register an offense for an escaped gvar interpolation 341s registers an offense and corrects an escaped double quote 341s does not register an offense for a $-escaped gvar interpolation 341s does not register an offense for meta control characters 341s registers an offense and corrects an escaped single quote 341s does not register an offense for an escaped backslash 341s registers an offense and corrects an escaped # before interpolation 341s does not register an offense for multiple unicode escapes 341s registers an offense and corrects an escaped # without following { 341s does not register an offense for an ascii DEL 341s registers an offense and corrects a escaped nested delimiter in a double quoted string 341s does not register an offense for a unicode escape 341s does not register an offense for an escaped cvar interpolation 341s when using character literals 341s does not register an offense for `?a` 341s does not register an offense for `?\n` 341s with a double quoted string 341s registers an offense and corrects an unnecessary escape in multi-line broken string 341s does not register an offense with multiple escaped backslashes 341s does not register an offense when escaping a quote in multi-line broken string 341s does not register an offense with escaped double quote 341s behaves like a literal with interpolation 341s does not register a bracket-escaped lvar interpolation 341s does not register an offense for a bracket-escaped interpolation 341s does not register an offense for a @-escaped ivar interpolation 341s registers an offense and corrects an escaped # at end-of-string 341s does not register an offense for an escaped interpolation 341s registers an offense and corrects an escaped } when escaping both brackets to avoid interpolation 341s does not register an offense for multiple unicode escapes 341s does not register an offense for meta control characters 341s does not register an offense for control characters 341s does not register an offense for an escaped delimiter 341s registers an offense and corrects an escaped # before interpolation 341s does not register an offense for a unicode escape 341s does not register an offense for a @-escaped cvar interpolation 341s does not register an offense without escapes 341s does not register an offense for a meta character 341s registers an offense and corrects an escaped single quote 341s does not register an offense for an escaped # followed { 341s does not register an offense for an escaped delimiter before interpolation 341s does not register an offense for an ascii DEL 341s does not register an offense for an escaped cvar interpolation 341s does not register an offense for a hex escape 341s registers an offense and corrects an escaped # without following { 341s does not register an offense for an escaped ivar interpolation 341s does not register an offense for a technically-unnecessary escape 341s does not register an offense for a $-escaped gvar interpolation 341s does not register an offense for an escaped newline 341s does not register an offense for an octal escape 341s does not register an offense for an escaped backslash 341s does not register an offense for a newline 341s does not register an offense for an escaped gvar interpolation 341s with a single quoted string 341s behaves like a literal without interpolation 341s does not register an offense for an ascii DEL 341s does not register an offense for meta control characters 341s does not register an offense for a @-escaped cvar interpolation 341s does not register an offense for an escaped # with following { 341s does not register an offense for an escaped backslash 341s does not register an offense for an escaped # followed { 341s does not register an offense for an allowed escape inside multi-line literal 341s does not register an offense for a bracket-escaped interpolation 341s does not register an offense for an escaped delimiter 341s does not register an offense for a technically-unnecessary escape 341s does not register a bracket-escaped lvar interpolation 341s does not register an offense for an escaped gvar interpolation 341s does not register an offense for an octal escape 341s does not register an offense without escapes 341s does not register an offense for a unicode escape 341s does not register an offense for an escaped cvar interpolation 341s does not register an offense for an escaped ivar interpolation 341s does not register an offense for control characters 341s does not register an offense for a $-escaped gvar interpolation 341s does not register an offense for a @-escaped ivar interpolation 341s does not register an offense with escaped # at end-of-string 341s does not register an offense for a hex escape 341s does not register an offense for multiple unicode escapes 341s does not register an offense for an escaped newline 341s does not register an offense for an escaped delimiter before interpolation 341s does not register an offense for a meta character 341s does not register an offense with escaped # without following { 341s does not register an offense for a newline 341s does not register an offense with escaped double quote 341s does not register an offense with escaped single quote 341s does not register an offense for an escaped interpolation 341s with an interpolation-enabled HEREDOC 341s does not register an offense for a technically-unnecessary escape 341s does not register an offense for an escaped backslash 341s registers an offense and corrects an escaped # without following { 341s registers an offense and corrects an escaped single quote 341s registers an offense and corrects an escaped # before interpolation 341s does not register an offense for a @-escaped cvar interpolation 341s does not register an offense for an ascii DEL 341s does not register an offense for an escaped ivar interpolation 341s does not register an offense for an escaped # followed { 341s does not register an offense for an octal escape 341s does not register an offense for a heredoc interpolating a string with an allowed escape 341s does not register an offense for a bracket-escaped interpolation 341s does not register an offense for a nested heredoc without interpolation 341s does not register an offense for control characters 341s does not register an offense for a newline 341s does not register an offense for an escaped interpolation 341s does not register an offense for multiple unicode escapes 341s does not register an offense without escapes 341s does not register an offense for a $-escaped gvar interpolation 341s does not register an offense for meta control characters 341s does not register an offense for a meta character 341s does not register an offense for an escaped cvar interpolation 341s does not register an offense for a unicode escape 341s does not register an offense for an escaped newline 341s does not register an offense for a @-escaped ivar interpolation 341s does not register a bracket-escaped lvar interpolation 341s does not register an offense for a hex escape 341s registers an offense and corrects an escaped # at end-of-string 341s does not register an offense for an escaped gvar interpolation 341s with a %q(...) literal 341s behaves like a literal without interpolation 341s does not register an offense for meta control characters 341s does not register an offense for control characters 341s does not register an offense for a meta character 341s does not register an offense for an escaped backslash 341s does not register an offense for an ascii DEL 341s does not register an offense for multiple unicode escapes 341s does not register an offense for a @-escaped cvar interpolation 341s does not register an offense for a $-escaped gvar interpolation 341s does not register an offense for a hex escape 341s does not register an offense for an escaped newline 341s does not register an offense for a bracket-escaped interpolation 341s does not register an offense for a newline 341s does not register an offense for an escaped delimiter 341s does not register an offense without escapes 341s does not register an offense with escaped # at end-of-string 341s does not register an offense with escaped single quote 341s does not register an offense for a technically-unnecessary escape 341s does not register an offense for an escaped # followed { 341s does not register an offense for an escaped interpolation 341s does not register an offense for an escaped cvar interpolation 341s does not register an offense for an octal escape 341s does not register an offense for an escaped gvar interpolation 341s does not register an offense for a unicode escape 341s does not register an offense with escaped double quote 341s does not register an offense with escaped # without following { 341s does not register an offense for an escaped ivar interpolation 341s does not register an offense for an escaped # with following { 341s does not register a bracket-escaped lvar interpolation 341s does not register an offense for a @-escaped ivar interpolation 341s does not register an offense for an allowed escape inside multi-line literal 341s does not register an offense for an escaped delimiter before interpolation 341s with a %w(...) literal 341s does not register an offense for escaped spaces 341s behaves like a literal without interpolation 341s does not register an offense for a unicode escape 341s does not register an offense for an escaped gvar interpolation 341s does not register an offense for a hex escape 341s does not register an offense for an octal escape 341s does not register an offense for meta control characters 341s does not register an offense for an escaped delimiter before interpolation 341s does not register an offense with escaped # at end-of-string 341s does not register an offense for an escaped cvar interpolation 341s does not register an offense for a $-escaped gvar interpolation 341s does not register an offense for a technically-unnecessary escape 341s does not register an offense for an allowed escape inside multi-line literal 341s does not register an offense with escaped # without following { 341s does not register an offense for an escaped # with following { 341s does not register an offense for an escaped backslash 341s does not register an offense without escapes 341s does not register an offense for a @-escaped ivar interpolation 341s does not register an offense for an escaped delimiter 341s does not register a bracket-escaped lvar interpolation 341s does not register an offense with escaped single quote 341s does not register an offense for a meta character 341s does not register an offense for an escaped # followed { 341s does not register an offense with escaped double quote 341s does not register an offense for control characters 341s does not register an offense for an escaped interpolation 341s does not register an offense for an escaped newline 341s does not register an offense for multiple unicode escapes 341s does not register an offense for an ascii DEL 341s does not register an offense for a bracket-escaped interpolation 341s does not register an offense for a newline 341s does not register an offense for an escaped ivar interpolation 341s does not register an offense for a @-escaped cvar interpolation 341s with a %(...) literal 341s behaves like a literal with interpolation 341s does not register an offense for an octal escape 341s does not register an offense for a @-escaped cvar interpolation 341s does not register an offense for a @-escaped ivar interpolation 341s does not register an offense for a meta character 341s does not register an offense for an escaped delimiter before interpolation 341s does not register an offense for a bracket-escaped interpolation 341s does not register an offense for multiple unicode escapes 341s does not register an offense for an escaped backslash 341s does not register an offense for a unicode escape 341s does not register an offense for an escaped delimiter 341s registers an offense and corrects a escaped nested delimiter in a double quoted string 341s does not register an offense for a newline 341s does not register an offense for an escaped ivar interpolation 341s does not register an offense for an escaped # followed { 341s registers an offense and corrects an escaped double quote 341s does not register an offense for an ascii DEL 341s does not register an offense without escapes 341s registers an offense and corrects an escaped # without following { 341s does not register an offense for an escaped cvar interpolation 341s does not register a bracket-escaped lvar interpolation 341s registers an offense and corrects an escaped } when escaping both brackets to avoid interpolation 341s registers an offense and corrects an escaped # before interpolation 341s does not register an offense for a $-escaped gvar interpolation 341s does not register an offense for an escaped newline 341s does not register an offense for an escaped gvar interpolation 341s does not register an offense for a technically-unnecessary escape 341s registers an offense and corrects an escaped single quote 341s does not register an offense for an escaped interpolation 341s registers an offense and corrects an escaped # at end-of-string 341s does not register an offense for a hex escape 341s does not register an offense for meta control characters 341s does not register an offense for control characters 341s 341s RuboCop::Cop::Style::GlobalStdStream 341s does not register an offense when assigning other const to std stream gvar 341s does not register an offense when using non std stream const 341s registers an offense and corrects when using std stream as const 341s does not register an offense when assigning std stream const to std stream gvar 341s 341s RuboCop::Cop::Style::RaiseArgs 341s when enforced style is compact 341s accepts exception constructor with keyword arguments and message argument 341s accepts a raise with an exception argument 341s accepts a raise with msg argument 341s with a raise with 2 args and exception object is assigned to a local variable 341s reports an offense 341s when used in a logical or expression 341s registers an offense and autocorrects 341s with a raise with 3 args 341s reports an offense 341s when used in a logical and expression 341s registers an offense and autocorrects 341s with a raise with 2 args 341s reports an offense 341s with correct + opposite 341s reports multiple offenses 341s reports an offense 341s with a raise with exception instantiation and message arguments 341s reports an offense 341s when used in a ternary expression 341s registers an offense and autocorrects 341s when enforced style is exploded 341s accepts a raise when exception object is assigned to a local variable 341s accepts a raise with 2 args 341s ignores a raise with an exception argument 341s accepts a raise with 3 args 341s accepts exception constructor with keyword arguments 341s accepts a raise with splatted arguments 341s accepts a raise with msg argument 341s accepts a raise with `new` method without receiver 341s accepts exception constructor with more than 1 argument 341s with opposite + correct 341s reports multiple offenses 341s reports an offense for opposite + correct 341s when an exception object is assigned to a local variable 341s autocorrects to exploded style 341s when exception type is in AllowedCompactTypes 341s accepts exception constructor with no arguments 341s with more than one argument 341s accepts exception constructor 341s with one argument 341s accepts exception constructor 341s with a raise with exception object 341s when used in a logical or expression 341s registers an offense and autocorrects 341s with no arguments 341s reports an offense 341s when used in a ternary expression 341s registers an offense and autocorrects 341s when used in a logical and expression 341s registers an offense and autocorrects 341s with one argument 341s reports an offense 341s 341s RuboCop::Cop::Style::BarePercentLiterals 341s when EnforcedStyle is percent_q 341s and strings are static 341s accepts heredoc 341s accepts %q 341s registers an offense for %() 341s accepts %Q() 341s accepts '' 342s accepts "" 342s accepts "" string with interpolation 342s accepts regular expressions 342s accepts __FILE__ 342s and strings are dynamic 342s accepts "" 342s accepts __FILE__ 342s accepts regular expressions 342s accepts %q 342s accepts %Q() 342s registers an offense for %() 342s accepts heredoc 342s accepts '' 342s accepts "" string with interpolation 342s when EnforcedStyle is bare_percent 342s and strings are dynamic 342s accepts regular expressions 342s accepts %q 342s accepts "" string with interpolation 342s accepts __FILE__ 342s registers an offense for %Q() 342s accepts "" 342s accepts heredoc 342s accepts %() 342s accepts '' 342s and strings are static 342s accepts %() 342s accepts heredoc 342s accepts "" 342s accepts %q 342s accepts regular expressions 342s registers an offense for %Q() 342s accepts '' 342s accepts __FILE__ 342s accepts "" string with interpolation 342s 342s RuboCop::Cop::InternalAffairs::LocationLineEqualityComparison 342s does not register an offense when using `same_line?` 342s registers and corrects an offense when comparing `#loc.source_range` with LHS and RHS 342s registers and corrects an offense when comparing `#loc.line` with LHS and RHS 342s registers an offense and corrects when using `loc.first_line` 342s registers an offense and corrects when using `first_line` 342s registers an offense and corrects when using `source_range.first_line` 342s 342s RuboCop::Cop::Layout::FirstArrayElementIndentation 342s when array is operand 342s registers an offense and corrects incorrectly indented ] 342s registers an offense and corrects incorrectly indented first element 342s accepts correctly indented first element 342s when indentation width is overridden for this cop 342s accepts correctly indented first element 342s registers an offense and corrects incorrectly indented 1st element 342s when array is argument to setter 342s accepts correctly indented first element 342s registers an offense and corrects incorrectly indented first element 342s when array is right hand side in assignment 342s accepts correctly indented first element 342s accepts multi-assignments with brackets 342s registers an offense and corrects incorrectly indented first element 342s accepts several elements per line 342s accepts a first element on the same line as the left bracket 342s accepts an empty array 342s accepts multi-assignments with no brackets 342s accepts single line array 342s when array is method argument 342s and argument are not surrounded by parentheses 342s 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 342s accepts bracketless array 342s accepts single line array with brackets 342s accepts a correctly indented multi-line array with brackets 342s registers an offense for incorrectly indented multi-line array that is the value of a single pair hash 342s accepts indent based on the left bracket when the outer hash key and the left bracket is not on the same line 342s 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 342s registers an offense and corrects incorrectly indented multi-line array with brackets 342s and arguments are surrounded by parentheses 342s and EnforcedStyle is consistent 342s registers an offense and corrects incorrect indentation 342s registers an offense for incorrectly indented multi-line array that is the value of a single pair hash 342s 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 342s accepts indent based on the left brace when the outer hash key and the left bracket is not on the same line 342s 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 342s accepts normal indentation for first argument 342s accepts normal indentation for second argument 342s and EnforcedStyle is special_inside_parentheses 342s registers an offense and corrects 'consistent' indentation 342s 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 342s accepts indent based on the preceding left parenthesis when the right bracket and its following pair is on the same line 342s registers an offense for incorrectly indented multi-line array that is the value of a single pair hash 342s accepts special indentation for second argument 342s accepts normal indentation for array within array 342s registers an offense and corrects 'align_brackets' indentation 342s accepts special indentation for first argument 342s accepts indent based on the left brace when the outer hash key and the left bracket is not on the same line 342s when using safe navigation operator 342s registers an offense and corrects 'consistent' indentation 342s when EnforcedStyle is align_brackets 342s accepts a first element on the same line as the left bracket 342s accepts multi-assignments with brackets 342s accepts multi-assignments with no brackets 342s accepts correctly indented first element 342s accepts single line array 342s accepts several elements per line 342s accepts an empty array 342s registers an offense and corrects incorrectly indented ] 342s when 'special_inside_parentheses' style is used 342s registers an offense and corrects incorrect indentation 342s when indentation width is overridden for this cop 342s registers an offense and corrects indentation that does not match IndentationWidth 342s accepts correctly indented first element 342s when 'consistent' style is used 342s registers an offense and corrects incorrectly indented 1st element 342s registers an offense and corrects incorrect indentation 342s 342s RuboCop::Cop::Lint::RedundantWithIndex 342s accepts an index is used as a block argument 342s registers an offense for `ary.each_with_index { |v| v }` and corrects to `ary.each` 342s registers an offense when using `ary.each.with_index { |v| v }` and corrects to `ary.each` 342s registers an offense when using `ary.each_with_object([]).with_index { |v| v }` and corrects to `ary.each_with_object([]) { |v| v }` 342s registers an offense when using `ary.each.with_index(1) { |v| v }` and correct to `ary.each { |v| v }` 342s Ruby 2.7 342s registers an offense for `ary.each_with_index { _1 }` and corrects to `ary.each` 342s registers an offense when using `ary.each.with_index { _1 }` and corrects to `ary.each` 342s accepts an index is used as a numblock argument 342s 342s RuboCop::Cop::Naming::BlockParameterName 342s can register multiple offenses in one block 342s registers offense when param contains uppercase characters 342s does not register for block without parameters 342s registers offense when param ends in number 342s registers offense when param is less than minimum length 342s registers offense when param with prefix is less than minimum length 342s does not register offense for valid parameter names 342s does not register for brace block without parameters 342s with AllowedNames 342s accepts specified block param names 342s registers unlisted offensive names 342s with AllowNamesEndingInNumbers 342s accept params that end in numbers 342s with ForbiddenNames 342s registers offense for param listed as forbidden 342s accepts param that uses a forbidden name's letters 342s 342s RuboCop::RakeTask 342s defining tasks 342s creates a named task and a named autocorrect task 342s creates a named task and a named auto_correct task 342s creates a rubocop task and a rubocop auto_correct task 342s creates a rubocop task and a rubocop autocorrect task 342s running tasks 342s uses the default formatter from .rubocop.yml if no formatter option is given 342s allows nested arrays inside formatters, options, and requires 342s runs with specified options if a block is given 342s runs with default options 342s exits when result is not 0 and fail_on_error is true 342s will not error when result is not 0 and fail_on_error is false 342s autocorrect 342s runs with --autocorrect 342s runs with --autocorrect-all 342s runs with with the options that were passed to its parent task 342s 342s RuboCop::Cop::Lint::UselessMethodDefinition 342s does not register an offense when `super` arguments differ from method arguments 342s does not register an offense when method definition contains optional argument 342s does not register an offense when method definition contains optional keyword argument 342s does not register an offense when non-constructor contains only comments 342s does not register an offense for method containing additional code to `super` 342s registers an offense and corrects for method containing only `super` call 342s does not register an offense for empty constructor 342s does not register an offense for empty class level `initialize` method 342s does not register an offense for constructor containing additional code to `super` 342s does not register an offense for constructor with only comments 342s 342s RuboCop::Cop::Style::OptionHash 342s registers an offense 342s when the last argument is an options hash named something else 342s does not register an offense 342s when the argument name is in the list of suspicious names 342s registers an offense 342s when passing options hash to super 342s does not register an offense 342s does not register an offense when call to super is in a nested block 342s does not register an offense when code exists before call to super 342s when the last argument is a non-options-hash optional hash 342s does not register an offense 342s when there are no arguments 342s does not register an offense 342s permitted list 342s ignores if the method is permitted 342s 342s RuboCop::Cop::Layout::MultilineHashBraceLayout 342s ignores empty hashes 342s ignores single-line hashes 342s ignores implicit hashes 342s behaves like multiline literal brace layout method argument 342s when arguments to a method 342s and a comment after the last element 342s detects closing brace on separate line from last element 342s but no comment after the last element 342s autocorrects the closing brace 342s behaves like multiline literal brace layout 342s symmetrical style 342s opening brace on same line as first element 342s allows closing brace on same line as last multiline element 342s autocorrects closing brace on different line from last element 342s detects closing brace on different line from last element 342s allows closing brace on same line as last element 342s with a chained call on the closing brace 342s but no comment after the last element 342s autocorrects the closing brace 342s and a comment after the last element 342s detects closing brace on separate line from last elementbut does not autocorrect the closing brace 342s opening brace on separate line from first element 342s allows closing brace on separate line from last multiline element 342s detects closing brace on same line as last element 342s allows closing brace on separate line from last element 342s heredoc 342s detects heredoc structures that are safe to add to 342s ignores heredocs that could share a last line 342s same_line style 342s opening brace on same line as first element 342s autocorrects closing brace on different line as last element 342s detects closing brace on different line from multiline element 342s allows closing brace on same line from last element 342s allows closing brace on same line as multi-line element 342s with a chained call on the closing brace 342s and a comment after the last element 342s detects closing brace on separate line from last elementbut does not autocorrect the closing brace 342s but no comment after the last element 342s autocorrects the closing brace 342s opening brace on separate line from first element 342s allows closing brace on same line as last multiline element 342s detects closing brace on different line from last element 342s allows closing brace on same line as last element 342s new_line style 342s opening brace on separate line from first element 342s allows closing brace on separate line from last element 342s detects closing brace on same line as last element 342s allows closing brace on separate line from last multiline element 342s opening brace on same line as first element 342s autocorrects closing brace on same line as last element 342s allows closing brace on different line from last element 342s detects closing brace on same line as last multiline element 342s allows closing brace on different line from multi-line element 342s behaves like multiline literal brace layout trailing comma 342s same_line style 342s opening brace on same line as first element 342s last element has a trailing comma 342s autocorrects closing brace on different line as last element 342s symmetrical style 342s opening brace on same line as first element 342s last element has a trailing comma 342s autocorrects closing brace on different line from last element 342s 342s RuboCop::Cop::Layout::SpaceInsideBlockBraces 342s registers an offense and corrects left brace without inner space 342s registers an offense and corrects both left and right brace without inner space after success 342s register offenses and correct both braces without inner space 342s registers an offense and corrects right brace without inner space 342s accepts left brace without outer space 342s accepts braces surrounded by spaces 342s with invalid value for EnforcedStyleForEmptyBraces 342s fails with an error 342s configured with no_space 342s registers an offense and corrects right brace with inner space 342s accepts left brace without outer space 342s accepts braces without spaces inside 342s registers an offense and corrects left brace with inner space 342s registers an offense and corrects both left and right brace with inner space after success 342s with passed in parameters 342s and space before block parameters allowed 342s registers an offense and corrects left brace without inner space 342s accepts left brace with inner space 342s accepts new lambda syntax 342s and space before block parameters not allowed 342s accepts when braces are aligned in multiline block 342s registers an offense when braces are not aligned in multiline block with bracket 342s accepts when braces are aligned in multiline block with bracket 342s accepts new lambda syntax 342s registers an offense and corrects left brace with inner space 342s registers an offense when braces are not aligned in multiline block 342s with passed in parameters 342s accepts new lambda syntax 342s for single-line blocks 342s accepts left brace with inner space 342s registers an offense and corrects left brace without inner space 342s and BlockDelimiters cop enabled 342s registers an offense and corrects multi-line blocks 342s registers an offense and corrects for single-line blocks 342s and space before block parameters not allowed 342s accepts left brace without inner space 342s accepts new lambda syntax 342s registers an offense and corrects left brace with inner space 342s for multi-line blocks 342s accepts left brace with inner space 342s registers an offense and corrects left brace without inner space 342s Ruby >= 2.7 342s registers an offense for numblocks without inner space 342s with space inside empty braces not allowed 342s accepts braces that are not empty 342s accepts braces with something inside 342s accepts empty braces with no space inside 342s accepts empty braces with comment and line break inside 342s accepts multiline braces with content 342s registers an offense and corrects empty braces with space inside 342s accepts empty braces with line break inside 342s with space inside empty braces allowed 342s registers an offense and corrects empty braces with no space inside 342s accepts empty braces with space inside 342s 342s RuboCop::Cop::Lint::OutOfRangeRegexpRef 342s does not register offense to a regexp with valid references for numbered captures 342s registers an offense when the regexp is matched with `match` 342s registers an offense when out of range references are used for mix of numbered and named captures 342s only registers an offense when the regexp is matched as a literal 342s does not register offense to a regexp with valid references for a mix named and numbered captures 342s does not register offense to a regexp with valid references for named captures 342s registers an offense when out of range references are used for named captures 342s registers an offense when out of range references are used for numbered captures 342s does not register an offense when in range references are used inside a when clause 342s registers an offense when out of range references are used inside a when clause 342s ignores `match` with no receiver 342s registers an offense when out of range references are used for non captures 342s ignores `match` with no arguments 342s ignores calls to `match?` 342s ignores regexp when clause conditions that contain interpolations 342s registers an offense when the regexp appears on the right hand side of `=~` 342s does not register an offense regexp containing non literal 342s does not register offense to a regexp with encoding option and valid references for numbered captures 342s registers an offense when the regexp is matched with `===` 342s only registers an offense for when clauses when the regexp is matched as a literal 342s registers an offense when references are used before any regexp 342s uses the maximum number of captures for when clauses with multiple conditions 342s matching with match 342s only registers an offense when the regexp is matched as a literal 342s registers an offense when out of range references are used 342s does not register an offense when in range references are used 342s matching with start_with? 342s does not register an offense when in range references are used 342s registers an offense when out of range references are used 342s only registers an offense when the regexp is matched as a literal 342s matching with gsub! 342s registers an offense when out of range references are used 342s only registers an offense when the regexp is matched as a literal 342s does not register an offense when in range references are used 342s matching with slice 342s registers an offense when out of range references are used 342s only registers an offense when the regexp is matched as a literal 342s does not register an offense when in range references are used 342s matching with end_with? 342s only registers an offense when the regexp is matched as a literal 342s does not register an offense when in range references are used 342s registers an offense when out of range references are used 342s matching with gsub 342s only registers an offense when the regexp is matched as a literal 342s does not register an offense when in range references are used 342s registers an offense when out of range references are used 342s matching with partition 342s only registers an offense when the regexp is matched as a literal 342s registers an offense when out of range references are used 342s does not register an offense when in range references are used 342s matching with slice! 342s only registers an offense when the regexp is matched as a literal 342s registers an offense when out of range references are used 342s does not register an offense when in range references are used 342s matching with sub 342s registers an offense when out of range references are used 342s only registers an offense when the regexp is matched as a literal 342s does not register an offense when in range references are used 342s matching with index 342s registers an offense when out of range references are used 342s only registers an offense when the regexp is matched as a literal 342s does not register an offense when in range references are used 342s matching with `grep` 342s registers an offense when out of range references are used 342s does not register an offense when in range references are used 342s only registers an offense when the regexp is matched as a literal 342s when calling a regexp method on a nth-ref node 342s does not register an offense when calling gsub on a valid nth-ref 342s registers an offense if the capturing groups have changed 342s registers an offense when calling gsub on an invalid nth-ref 342s matching with rpartition 342s does not register an offense when in range references are used 342s only registers an offense when the regexp is matched as a literal 342s registers an offense when out of range references are used 342s matching with rindex 342s does not register an offense when in range references are used 342s registers an offense when out of range references are used 342s only registers an offense when the regexp is matched as a literal 342s matching with `[]` 342s registers an offense when out of range references are used 342s does not register an offense when in range references are used 342s only registers an offense when the regexp is matched as a literal 342s matching with scan 342s registers an offense when out of range references are used 342s only registers an offense when the regexp is matched as a literal 342s does not register an offense when in range references are used 342s matching with sub! 342s only registers an offense when the regexp is matched as a literal 342s does not register an offense when in range references are used 342s registers an offense when out of range references are used 342s when both the LHS and RHS use regexp 342s only considers the RHS regexp 342s 342s RuboCop::Cop::Lint::RefinementImportMethods 342s Ruby >= 3.1 342s registers an offense when using `prepend` in `refine` block 342s does not register an offense when using `import_methods` in `refine` block 342s registers an offense when using `include` in `refine` block 342s does not register an offense when using `include` with a receiver in `refine` block 342s Ruby <= 3.0 342s does not register an offense when using `include` in `refine` block 342s does not register an offense when using `prepend` in `refine` block 342s 342s RuboCop::Cop::Layout::FirstMethodParameterLineBreak 342s accepts params without parens 342s registers an offense and corrects params on first line of singleton method 342s registers an offense and corrects params with default values 342s accepts methods without params 342s accepts single-line methods 342s registers an offense and corrects params listed on the first line 342s accepts params listed on a single line 342s 342s RuboCop::Cop::Lint::AmbiguousAssignment 342s registers an offense when using `!` with `X` 342s does not register an offense when no mistype assignments 342s does not register an offense when no mistype assignments 342s registers an offense when using `-` with `@x` 342s registers an offense when using `!` with `x` 342s registers an offense when using `!` with `@@x` 342s does not register an offense when no mistype assignments 342s does not register an offense when no mistype assignments 342s does not register an offense when no mistype assignments 343s does not register an offense when no mistype assignments 343s does not register an offense when no mistype assignments 343s does not register an offense when no mistype assignments 343s registers an offense when using `+` with `$x` 343s does not register an offense when no mistype assignments 343s does not register an offense when no mistype assignments 343s does not register an offense when no mistype assignments 343s registers an offense when using `+` with `X` 343s does not register an offense when no mistype assignments 343s registers an offense when using `-` with `x` 343s registers an offense when using `*` with `x` 343s registers an offense when using `*` with `@@x` 343s does not register an offense when no mistype assignments 343s registers an offense when using `-` with `X` 343s registers an offense when using `*` with `X` 343s does not register an offense when no mistype assignments 343s registers an offense when using `-` with `$x` 343s does not register an offense when no mistype assignments 343s registers an offense when using `*` with `@x` 343s does not register an offense when no mistype assignments 343s registers an offense when using `*` with `$x` 343s does not register an offense when no mistype assignments 343s registers an offense when using `-` with `@@x` 343s does not register an offense when no mistype assignments 343s does not register an offense when no mistype assignments 343s does not register an offense when no mistype assignments 343s registers an offense when using `!` with `$x` 343s registers an offense when using `!` with `@x` 343s registers an offense when using `+` with `@@x` 343s registers an offense when using `+` with `@x` 343s registers an offense when using `+` with `x` 343s 343s RuboCop::Cop::Style::OneLineConditional 343s when AlwaysCorrectToMultiline is false 343s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 343s does not register an offense for if/then/else/end with empty else 343s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with ternary operator without adding parentheses for if/then/else/end that contains unparenthesized operator method calls 343s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with multi-line construct for if-then-elsif-then-end 343s registers and corrects an offense with ternary operator for if/then/else/end 343s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 343s does not register an offense for if/then/end 343s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with multi-line construct for if-then-elsif-then-else-end 343s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with ternary operator when one of the branches of if/then/else/end contains `next` keyword 343s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with multi-line construct for if-then-elsif-then-elsif-then-else-end 343s does not register an offense for unless/then/end 343s does not register an offense for unless/then/else/end with empty else 343s registers and corrects an offense with ternary operator without adding parentheses for if/then/else/end that contains method calls with parenthesized arguments 343s registers and corrects an offense with ternary operator for if/then/else/end when `then` without body 343s registers and corrects an offense with ternary operator and adding parentheses for if/then/else/end that contains method calls with unparenthesized arguments 343s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with ternary operator for unless/then/else/end 343s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 343s behaves like if/then/else/end with constructs changing precedence 343s registers and corrects an offense with ternary operator and adding parentheses inside for if/then/else/end with `puts 1` constructs inside inner branches 343s behaves like if/then/else/end with constructs changing precedence 343s 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 343s behaves like if/then/else/end with keyword 343s registers and corrects an offense with ternary operator when one of the branches of if/then/else/end contains `break` keyword 343s behaves like if/then/else/end with constructs changing precedence 343s 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 343s behaves like if/then/else/end with constructs changing precedence 343s registers and corrects an offense with ternary operator and adding parentheses inside for if/then/else/end with `defined? :A` constructs inside inner branches 343s behaves like if/then/else/end with constructs changing precedence 343s registers and corrects an offense with ternary operator and adding parentheses inside for if/then/else/end with `yield a` constructs inside inner branches 343s behaves like if/then/else/end with keyword 343s registers and corrects an offense with ternary operator when one of the branches of if/then/else/end contains `raise` keyword 343s behaves like if/then/else/end with constructs changing precedence 343s 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 343s behaves like if/then/else/end with keyword 343s registers and corrects an offense with ternary operator when one of the branches of if/then/else/end contains `self` keyword 343s behaves like if/then/else/end with keyword 343s registers and corrects an offense with ternary operator when one of the branches of if/then/else/end contains `retry` keyword 343s behaves like if/then/else/end with constructs changing precedence 343s registers and corrects an offense with ternary operator and adding parentheses inside for if/then/else/end with `a = b` constructs inside inner branches 343s behaves like if/then/else/end with constructs changing precedence 343s registers and corrects an offense with ternary operator and adding parentheses inside for if/then/else/end with `not a` constructs inside inner branches 343s behaves like if/then/else/end with constructs changing precedence 343s registers and corrects an offense with ternary operator and adding parentheses inside for if/then/else/end with `super b` constructs inside inner branches 343s when AlwaysCorrectToMultiline is true 343s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with multi-line construct for if-then-elsif-then-else-end 343s does not register an offense for unless/then/end 343s does not register an offense for if/then/else/end with empty else 343s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end that contains method calls with parenthesized arguments 343s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end that contains unparenthesized operator method calls 343s registers and corrects an offense with multi-line construct for if/then/else/end when `then` without body 343s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end that contains method calls with unparenthesized arguments 343s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 343s does not register an offense for unless/then/else/end with empty else 343s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with multi-line construct for if/then/else/end 343s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with multi-line construct when one of the branches of if/then/else/end contains `next` keyword 343s registers and corrects an offense with multi-line construct for unless/then/else/end 343s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 343s does not register an offense for if/then/end 343s registers and corrects an offense with multi-line construct for if-then-elsif-then-elsif-then-else-end 343s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 343s behaves like if/then/else/end with keyword 343s registers and corrects an offense with multi-line construct when one of the branches of if/then/else/end contains `break` keyword 343s behaves like if/then/else/end with constructs changing precedence 343s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end with `a = b` constructs inside inner branches 343s behaves like if/then/else/end with keyword 343s registers and corrects an offense with multi-line construct when one of the branches of if/then/else/end contains `retry` keyword 343s behaves like if/then/else/end with constructs changing precedence 343s 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 343s behaves like if/then/else/end with constructs changing precedence 343s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end with `puts 1` constructs inside inner branches 343s behaves like if/then/else/end with constructs changing precedence 343s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end with `defined? :A` constructs inside inner branches 343s behaves like if/then/else/end with keyword 343s registers and corrects an offense with multi-line construct when one of the branches of if/then/else/end contains `raise` keyword 343s when IndentationWidth differs from default 343s registers and corrects an offense with multi-line construct for if/then/else/end 343s behaves like if/then/else/end with constructs changing precedence 343s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end with `not a` constructs inside inner branches 343s behaves like if/then/else/end with constructs changing precedence 343s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end with `yield a` constructs inside inner branches 343s behaves like if/then/else/end with constructs changing precedence 343s 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 343s behaves like if/then/else/end with constructs changing precedence 343s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end with `super b` constructs inside inner branches 343s behaves like if/then/else/end with keyword 343s registers and corrects an offense with multi-line construct when one of the branches of if/then/else/end contains `self` keyword 343s behaves like if/then/else/end with constructs changing precedence 343s 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 343s 343s RuboCop::Cop::Style::StringConcatenation 343s correctly handles strings with special characters 343s does not register an offense when using `+` with all non string arguments 343s registers an offense and corrects for string concatenation 343s registers an offense and corrects for string concatenation as part of other expression 343s correctly handles nested concatenable parts 343s Mode = conservative 343s when first operand is string literal 343s registers offense 343s when first operand is not string literal 343s does not register offense 343s multiline 343s simple expressions 343s registers an offense and corrects 343s multiline block 343s registers an offense but does not correct 343s if condition 343s registers an offense but does not correct 343s string continuation 343s does not register an offense 343s heredoc 343s registers an offense but does not correct when string concatenation with multiline heredoc text 343s registers an offense but does not correct 343s nested interpolation 343s registers an offense and corrects 343s inline block 343s registers an offense but does not correct 343s double quotes inside string 343s registers an offense and corrects with double quotes 343s registers an offense and corrects with percentage quotes 343s empty quotes 343s registers offense and corrects 343s double quotes inside string surrounded single quotes 343s registers an offense and corrects with double quotes 343s 343s RuboCop::Cop::Style::InfiniteLoop 343s registers an offense for until false if loop {} would work because the assigned variable is not used afterwards 343s registers an offense for a until loop with false as condition 343s accepts Kernel#loop 343s registers an offense for a while loop with 2.0 as condition 343s registers an offense for a while loop with {} as condition 343s registers an offense for a while loop with 1 as condition 343s accepts modifier while true if loop {} would change semantics 343s registers an offense for a while loop with [1] as condition 343s registers an offense for a until loop with nil as condition 343s accepts while true if loop {} would change semantics 343s registers an offense for while true if loop {} would work because it is an instance variable being assigned 343s registers an offense for until false if loop {} would work because of previous assignment in a while loop 343s registers an offense for modifier until false if loop {} would not change semantics 343s registers an offense for while true or until false if loop {} would work because of an earlier assignment 343s behaves like autocorrector 343s autocorrects the usage of while without do 343s autocorrects begin-end-while with two statements 343s autocorrects single line modifier while with and 343s autocorrects the usage of while with do 343s autocorrects single line modifier while 343s autocorrects begin-end-while with one statement 343s with non-default indentation width 343s autocorrects multi-line modifier while and indents correctly 343s behaves like autocorrector 343s autocorrects single line modifier until with and 343s autocorrects the usage of until without do 343s autocorrects begin-end-until with two statements 343s autocorrects single line modifier until 343s autocorrects begin-end-until with one statement 343s autocorrects the usage of until with do 343s with non-default indentation width 343s autocorrects multi-line modifier until and indents correctly 343s 343s RuboCop::Cop::InternalAffairs::NumblockHandler 343s does not register an offense for cops with on_numblock alias_method 343s does not register an offense for cops with on_numblock alias 343s does not register an offense for cops with on_numblock method 343s registers an offense for cops with forgotten numblock handlers 343s 343s RuboCop::Cop::Layout::EmptyLinesAroundAttributeAccessor 343s accepts code when attribute method is method chained 343s registers an offense and corrects for an attribute accessor and some comment line 343s registers an offense and corrects for an attribute accessor and comment line 343s registers an offense and corrects for some attribute accessors and comment line 343s accepts code that separates attribute accessors from the code and comment line with a newline 343s accepts code that separates attribute accessors from the code with a newline 343s registers an offense and corrects for an attribute accessor and `rubocop:enable` comment line 343s accepts code that separates an attribute accessor from the code with a newline 343s does not register an offense and corrects when using `if` ... `else` branches 343s registers an offense and corrects for code that immediately follows accessor with comment 343s accepts code that where the attr_accessor is the last line 343s registers an offense and corrects for code that immediately follows accessor 343s registers an offense and corrects for an attribute accessor and `rubocop:disable` comment line 343s registers an offense and corrects for an attribute accessor and `rubocop:enable` comment line and other comment 343s accepts code that separates an attribute accessor from the code and `rubocop:enable` comment line with a newline 343s accepts code when used in class definition 343s when `AllowedMethods: private` 343s does not register an offense for code that immediately ignored methods after accessor 343s when `AllowedMethods: []` 343s registers an offense for code that immediately ignored methods after accessor 343s when `AllowAliasSyntax: true` 343s does not register an offense for code that immediately `alias` syntax after accessor 343s when `AllowAliasSyntax: false` 343s registers an offense for code that immediately `alias` syntax after accessor 343s 343s RuboCop::Cop::Lint::ReturnInVoidContext 343s with an initialize method containing a return without a value 343s accepts 343s with a setter method containing a return with a value 343s registers an offense 343s with an initialize method containing a return with a value 343s registers an offense 343s when return is in top scope 343s accepts 343s with a class method called initialize containing a return 343s accepts 343s with a non initialize method containing a return 343s accepts 343s with a setter method containing a return without a value 343s accepts 343s 343s RuboCop::Cop::Layout::FirstArgumentIndentation 343s when EnforcedStyle is special_for_inner_method_call 343s when indentation width is overridden for this cop only 343s registers an offense and corrects an over-indented first argument 343s accepts a correctly indented first argument 343s for method calls within method calls 343s without outer parentheses 343s accepts a first argument with special indentation 343s with outer parentheses 343s registers an offense and corrects an over-indented first argument 343s when IndentationWidth:Width is 4 343s registers an offense and corrects an over-indented first argument 343s when IndentationWidth:Width is 2 343s registers an offense and corrects an over-indented first argument on a plus sign method name 343s registers an offense and corrects an under-indented first argument 343s registers an offense and corrects an over-indented first argument on a pipe method name 343s accepts method calls with no arguments 343s does not view []= as an outer method call 343s accepts a first argument that is not preceded by a line break 343s registers an offense and corrects lines affected by another offense 343s does not view chained call as an outer method call 343s accepts operator calls 343s registers an offense and corrects an over-indented first argument 343s registers an offense and corrects an over-indented first argument on an alphanumeric method name 343s registers an offense and corrects an over-indented first argument of `super` 343s when the receiver contains a line break 343s registers an offense and corrects an over-indented first argument 343s accepts a correctly indented first argument 343s accepts a correctly indented first argument preceded by an empty line 343s when preceded by a comment line 343s accepts a correctly indented first argument 343s registers an offense and corrects an under-indented first argument 343s for assignment 343s accepts a correctly indented first argument and does not care about the second argument 343s with line break 343s registers an offense and corrects an under-indented first argument 343s accepts a correctly indented first argument 343s when using safe navigation operator 343s registers an offense and corrects an under-indented 1st argument 343s for a setter call 343s accepts an unindented value 343s when EnforcedStyle is special_for_inner_method_call_in_parentheses 343s for method calls within method calls 343s without outer parentheses 343s accepts a first argument with consistent style indentation 343s with outer parentheses 343s accepts a correctly indented first argument with fullwidth characters 343s registers an offense and corrects an over-indented first argument 343s registers an offense and corrects an under-indented first argument 343s accepts a correctly indented first argument in interpolation 343s when IndentationWidth:Width is 4 343s registers an offense and corrects an over-indented first argument 343s when indentation width is overridden for this cop only 343s registers an offense and corrects an over-indented first argument 343s accepts a correctly indented first argument 343s when IndentationWidth:Width is 2 343s registers an offense and corrects lines affected by another offense 343s accepts operator calls 343s registers an offense and corrects an over-indented first argument on a pipe method name 343s does not view []= as an outer method call 343s accepts a first argument that is not preceded by a line break 343s registers an offense and corrects an over-indented first argument of `super` 343s registers an offense and corrects an over-indented first argument on an alphanumeric method name 343s registers an offense and corrects an over-indented first argument 343s registers an offense and corrects an over-indented first argument on a plus sign method name 343s registers an offense and corrects an under-indented first argument 343s does not view chained call as an outer method call 343s accepts method calls with no arguments 343s when the receiver contains a line break 343s registers an offense and corrects an over-indented first argument 343s accepts a correctly indented first argument 343s accepts a correctly indented first argument preceded by an empty line 343s when preceded by a comment line 343s registers an offense and corrects an under-indented first argument 343s accepts a correctly indented first argument 343s for a setter call 343s accepts an unindented value 343s when using safe navigation operator 343s registers an offense and corrects an under-indented 1st argument 343s for assignment 343s accepts a correctly indented first argument and does not care about the second argument 343s with line break 343s accepts a correctly indented first argument 343s registers an offense and corrects an under-indented first argument 343s when EnforcedStyle is consistent_relative_to_receiver 343s when IndentationWidth:Width is 4 343s registers an offense and corrects an over-indented first argument 343s for method calls within method calls 343s without outer parentheses 343s indents all relative to the receiver 343s accepts a first argument with special indentation 343s with outer parentheses 343s registers an offense and corrects an over-indented 1st argument 343s indents all relative to the receiver 343s when indentation width is overridden for this cop only 343s accepts a correctly indented first argument 343s registers an offense and corrects an over-indented first argument 343s when IndentationWidth:Width is 2 343s accepts a first argument that is not preceded by a line break 343s registers an offense and corrects an under-indented first argument 343s does not view []= as an outer method call 343s does not register an offense when argument has expected indent width and the method is preceded by double splat 343s registers an offense and corrects an over-indented first argument 343s registers an offense and corrects lines affected by other offenses 343s does not view chained call as an outer method call 343s does not register an offense when argument has expected indent width and the method is preceded by splat 343s accepts operator calls 343s accepts method calls with no arguments 343s when the receiver contains a line break 343s accepts a correctly indented first argument preceded by an empty line 344s accepts a correctly indented first argument 344s registers an offense and corrects an over-indented 1st argument 344s when preceded by a comment line 344s registers an offense and corrects an under-indented first argument 344s accepts a correctly indented first argument 344s for assignment 344s register an offense and corrects a correctly indented first argument and does not care about the second argument 344s with line break 344s registers an offense and corrects an under-indented first argument 344s accepts a correctly indented first argument 344s when EnforcedStyle is consistent 344s when IndentationWidth:Width is 4 344s registers an offense and corrects an over-indented first argument 344s for method calls within method calls 344s registers an offense and corrects an over-indented first argument 344s accepts first argument indented relative to previous line 344s when indentation width is overridden for this cop only 344s registers an offense and corrects an over-indented first argument 344s accepts a correctly indented first argument 344s when IndentationWidth:Width is 2 344s registers an offense and corrects an over-indented first argument of `super` 344s registers an offense and corrects lines affected by another offense 344s accepts operator calls 344s registers an offense and corrects an over-indented first argument on a plus sign method name 344s does not view chained call as an outer method call 344s accepts a first argument that is not preceded by a line break 344s registers an offense and corrects an over-indented first argument on an alphanumeric method name 344s registers an offense and corrects an over-indented first argument 344s accepts method calls with no arguments 344s registers an offense and corrects an over-indented first argument on a pipe method name 344s registers an offense and corrects an under-indented first argument 344s does not view []= as an outer method call 344s for a setter call 344s accepts an unindented value 344s when using safe navigation operator 344s registers an offense and corrects an under-indented 1st argument 344s when the receiver contains a line break 344s accepts a correctly indented first argument preceded by an empty line 344s registers an offense and corrects an over-indented first argument 344s accepts a correctly indented first argument 344s when preceded by a comment line 344s accepts a correctly indented first argument 344s registers an offense and corrects an under-indented first argument 344s for assignment 344s accepts a correctly indented first argument and does not care about the second argument 344s with line break 344s accepts a correctly indented first argument 344s registers an offense and corrects an under-indented first argument 344s 344s RuboCop::Cop::Lint::RedundantSplatExpansion 344s registers an offense and corrects an array literal being expanded in a rescue 344s allows expanding a method call on an array literal 344s allows an array using a constructor 344s allows assigning a variable to a splat expansion of a variable 344s allows splat expansion inside of an array 344s allows assigning to a splat variable 344s allows assigning to an expanded range 344s allows assigning to a splat 344s accepts expanding a variable as a method parameter 344s allows expansions of an array that is assigned to a variable in rescue 344s when `AllowPercentLiteralArrayArgument: true` 344s does not register an offense when using percent string literal array 344s does not register an offense when using percent symbol literal array 344s behaves like splat expansion 344s behaves like splat literal assignment 344s registers an offense and converts to an array 344s method parameters 344s registers an offense and converts to an array 344s assignment to splat expansion 344s registers and corrects an array using top-level const 344s registers an offense and corrects an array using a constructor 344s when `AllowPercentLiteralArrayArgument: false` 344s registers an offense when using percent symbol literal array 344s registers an offense when using percent literal array 344s splat expansion of method parameters 344s registers an offense and corrects an array literal %I 344s registers an offense and corrects an array literal %i 344s behaves like array splat expansion 344s behaves like splat literal assignment 344s registers an offense and removes the splat from array 344s method parameters 344s registers an offense and converts to a list of arguments 344s behaves like array splat expansion 344s behaves like splat literal assignment 344s registers an offense and removes the splat from array 344s method parameters 344s registers an offense and converts to a list of arguments 344s behaves like array splat expansion 344s behaves like splat literal assignment 344s registers an offense and removes the splat from array 344s method parameters 344s registers an offense and converts to a list of arguments 344s behaves like array splat expansion 344s behaves like splat literal assignment 344s registers an offense and removes the splat from array 344s method parameters 344s registers an offense and converts to a list of arguments 344s expanding an array literal in a when condition 344s registers an offense and corrects %I to a list of symbols 344s allows an array using a constructor 344s registers an offense and corrects an array using %w 344s registers an offense and corrects an array using [] 344s registers an offense and corrects an array using %W 344s registers an offense and corrects %i to a list of symbols 344s allows an array that is assigned to a variable 344s behaves like splat expansion 344s behaves like splat literal assignment 344s registers an offense and converts to an array 344s method parameters 344s registers an offense and converts to an array 344s expanding Array.new call on array literal 344s with ::Array.new 344s when the array literal contains exactly one element 344s registers an offense and corrects 344s when the array literal contains more than one element 344s accepts 344s when the array literal contains exactly one element 344s registers an offense and corrects 344s behaves like splat expansion 344s behaves like splat literal assignment 344s registers an offense and converts to an array 344s method parameters 344s registers an offense and converts to an array 344s behaves like array splat expansion 344s method parameters 344s registers an offense and converts to a list of arguments 344s behaves like splat literal assignment 344s registers an offense and removes the splat from array 344s behaves like splat expansion 344s behaves like splat literal assignment 344s registers an offense and converts to an array 344s method parameters 344s registers an offense and converts to an array 344s arrays being expanded with %i variants using splat expansion 344s splat expansion inside of an array 344s registers an offense and corrects %i to a list of symbols 344s registers an offense and changes %I to a list of symbols 344s expanding Array.new call on method argument 344s registers an offense and corrects 344s splat expansion inside of an array 344s registers an offense and corrects expansion of %w to a list of words 344s registers an offense and corrects expansion of %W to a list of words 344s registers an offense and corrects the expansion of an array literalinside of an array literal 344s 344s RuboCop::Cop::VariableForce::Scope 344s #name 344s when the scope is singleton method definition 344s returns the method name 344s when the scope is instance method definition 344s returns the method name 344s #body_node 344s when the scope is module 344s returns the body node 344s when the scope is instance method 344s returns the body node 344s when the scope is singleton class 344s returns the body node 344s when the scope is top level 344s returns the body node 344s when the scope is class 344s returns the body node 344s when the scope is block 344s returns the body node 344s when the scope is singleton method 344s returns the body node 344s #include? 344s with node of the scope itself 344s is expected to equal false 344s with child node the scope does not include 344s is expected to equal false 344s with descendant node the scope does not include 344s is expected to equal false 344s with child node the scope includes 344s is expected to equal true 344s with ancestor node the scope does not include 344s is expected to equal false 344s #each_node 344s inner scope boundary handling 344s when there's a singleton method definition 344s yields only the defs node and the method host node 344s when there's a method invocation with block 344s yields only the block node and the child send node 344s outer scope boundary handling 344s when the scope is singleton method 344s yields the argument and the body nodes 344s when the scope is block 344s yields the argument and the body nodes 344s when the scope is singleton class 344s yields the body nodes 344s when the scope is instance method 344s yields the argument and the body nodes 344s when the scope is class 344s yields the body nodes 344s when the scope is module 344s yields the body nodes 344s when the scope is top level 344s yields the body nodes 344s .new 344s when lvasgn node is passed 344s accepts that as top level scope 344s when begin node is passed 344s accepts that as top level scope 344s 344s Pending: (Failures listed here are expected and do not affect your suite's status) 344s 344s 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 344s # Requires an advanced logic that checks whether the return value of an operator assignment is used or not. 344s Failure/Error: 344s expect_offense(<<~RUBY) 344s def some_method 344s total = 0 344s foo = 0 344s 344s while total < 100 344s total += 1 344s foo += 1 344s ^^^ Useless assignment to variable - `foo`. 344s end 344s 344s Diff: 344s @@ -5,7 +5,6 @@ 344s while total < 100 344s total += 1 344s foo += 1 344s - ^^^ Useless assignment to variable - `foo`. 344s end 344s 344s total 344s # /usr/share/rubygems-integration/all/gems/rubocop-1.39.0/lib/rubocop/rspec/expect_offense.rb:123:in `expect_offense' 344s # ./spec/rubocop/cop/lint/useless_assignment_spec.rb:341:in `block (3 levels) in ' 344s # /usr/share/rubygems-integration/all/gems/webmock-3.25.1/lib/webmock/rspec.rb:39:in `block (2 levels) in ' 344s 344s Failures: 344s 344s 1) RuboCop::Cop::Style::RedundantRegexpCharacterClass with a character class containing an escaped-0 does not register an offense 344s Failure/Error: expect_no_offenses('foo = /[\032]/') 344s 344s expected: "foo = /[\\032]/" 344s got: "foo = /[\\032]/ ^^^^^^ Redundant single-element character class, `[\\032]` can be replaced with `\\032`.\n" 344s 344s (compared using ==) 344s 344s Diff: 344s @@ -1 +1 @@ 344s -foo = /[\032]/ 344s +foo = /[\032]/ ^^^^^^ Redundant single-element character class, `[\032]` can be replaced with `\032`. 344s # /usr/share/rubygems-integration/all/gems/rubocop-1.39.0/lib/rubocop/rspec/expect_offense.rb:184:in `expect_no_offenses' 344s # ./spec/rubocop/cop/style/redundant_regexp_character_class_spec.rb:315:in `block (3 levels) in ' 344s # /usr/share/rubygems-integration/all/gems/webmock-3.25.1/lib/webmock/rspec.rb:39:in `block (2 levels) in ' 344s 344s Finished in 2 minutes 0.7 seconds (files took 5.44 seconds to load) 344s 19119 examples, 1 failure, 1 pending 344s 344s Failed examples: 344s 344s 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 344s 344s Randomized with seed 59169 344s 345s /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 345s mv ./.gem2deb.lib lib 345s autopkgtest [18:46:15]: test gem2deb-test-runner: -----------------------] 349s gem2deb-test-runner FAIL non-zero exit status 1 349s autopkgtest [18:46:19]: test gem2deb-test-runner: - - - - - - - - - - results - - - - - - - - - - 353s autopkgtest [18:46:23]: @@@@@@@@@@@@@@@@@@@@ summary 353s gem2deb-test-runner FAIL non-zero exit status 1