0s autopkgtest [18:42:09]: starting date and time: 2026-02-09 18:42:09+0000 0s autopkgtest [18:42:09]: git checkout: 4b346b80 nova: make wait_reboot return success even when a no-op 0s autopkgtest [18:42:09]: host juju-7f2275-prod-proposed-migration-environment-2; command line: /home/ubuntu/autopkgtest/runner/autopkgtest --output-dir /tmp/autopkgtest-work.mje7nct9/out --timeout-copy=6000 --needs-internet=try --setup-commands /home/ubuntu/autopkgtest-cloud/worker-config-production/setup-canonical.sh --apt-pocket=proposed=src:ruby-regexp-parser --apt-upgrade rubocop --timeout-short=300 --timeout-copy=20000 --timeout-build=20000 --env=ADT_TEST_TRIGGERS=ruby-regexp-parser/2.11.3-1 -- ssh -s /home/ubuntu/autopkgtest/ssh-setup/nova -- --flavor autopkgtest-cpu2-ram4-disk20-arm64 --security-groups autopkgtest-juju-7f2275-prod-proposed-migration-environment-2@sto01-arm64-20.secgroup --name adt-resolute-arm64-rubocop-20260209-184209-juju-7f2275-prod-proposed-migration-environment-2-0cb61285-35c1-417f-8bbc-d2019a6f0543 --image adt/ubuntu-resolute-arm64-server --keyname testbed-juju-7f2275-prod-proposed-migration-environment-2 --net-id=net_prod-autopkgtest-workers-arm64 -e TERM=linux --mirror=http://ftpmaster.internal/ubuntu/ 3s Creating nova instance adt-resolute-arm64-rubocop-20260209-184209-juju-7f2275-prod-proposed-migration-environment-2-0cb61285-35c1-417f-8bbc-d2019a6f0543 from image adt/ubuntu-resolute-arm64-server-20260209.img (UUID 793037ca-75af-461b-82de-f8081300b2e3)... 82s autopkgtest [18:43:31]: testbed dpkg architecture: arm64 82s autopkgtest [18:43:31]: testbed apt version: 3.1.15 83s autopkgtest [18:43:32]: @@@@@@@@@@@@@@@@@@@@ test bed setup 83s autopkgtest [18:43:32]: testbed release detected to be: None 84s autopkgtest [18:43:33]: updating testbed package index (apt update) 84s Get:1 http://ftpmaster.internal/ubuntu resolute-proposed InRelease [124 kB] 84s Hit:2 http://ftpmaster.internal/ubuntu resolute InRelease 84s Hit:3 http://ftpmaster.internal/ubuntu resolute-updates InRelease 84s Hit:4 http://ftpmaster.internal/ubuntu resolute-security InRelease 84s Get:5 http://ftpmaster.internal/ubuntu resolute-proposed/restricted Sources [1764 B] 84s Get:6 http://ftpmaster.internal/ubuntu resolute-proposed/universe Sources [1630 kB] 86s Get:7 http://ftpmaster.internal/ubuntu resolute-proposed/main Sources [174 kB] 86s Get:8 http://ftpmaster.internal/ubuntu resolute-proposed/multiverse Sources [29.4 kB] 86s Get:9 http://ftpmaster.internal/ubuntu resolute-proposed/main arm64 Packages [246 kB] 87s Get:10 http://ftpmaster.internal/ubuntu resolute-proposed/main arm64 c-n-f Metadata [6172 B] 87s Get:11 http://ftpmaster.internal/ubuntu resolute-proposed/restricted arm64 Packages [7724 B] 87s Get:12 http://ftpmaster.internal/ubuntu resolute-proposed/restricted arm64 c-n-f Metadata [324 B] 87s Get:13 http://ftpmaster.internal/ubuntu resolute-proposed/universe arm64 Packages [1578 kB] 88s Get:14 http://ftpmaster.internal/ubuntu resolute-proposed/universe arm64 c-n-f Metadata [31.9 kB] 88s Get:15 http://ftpmaster.internal/ubuntu resolute-proposed/multiverse arm64 Packages [21.7 kB] 88s Get:16 http://ftpmaster.internal/ubuntu resolute-proposed/multiverse arm64 c-n-f Metadata [688 B] 90s Fetched 3852 kB in 4s (884 kB/s) 91s Reading package lists... 92s Hit:1 http://ftpmaster.internal/ubuntu resolute-proposed InRelease 92s Hit:2 http://ftpmaster.internal/ubuntu resolute InRelease 92s Hit:3 http://ftpmaster.internal/ubuntu resolute-updates InRelease 92s Hit:4 http://ftpmaster.internal/ubuntu resolute-security InRelease 93s Reading package lists... 93s Reading package lists... 93s Building dependency tree... 93s Reading state information... 93s Calculating upgrade... 94s The following packages will be upgraded: 94s cryptsetup-bin dracut-install iproute2 iptables libcryptsetup12 libip4tc2 94s libip6tc2 libxtables12 wget 94s 9 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 94s Need to get 2534 kB of archives. 94s After this operation, 18.4 kB of additional disk space will be used. 94s Get:1 http://ftpmaster.internal/ubuntu resolute/main arm64 iptables arm64 1.8.11-2ubuntu3 [386 kB] 94s Get:2 http://ftpmaster.internal/ubuntu resolute/main arm64 libip4tc2 arm64 1.8.11-2ubuntu3 [24.3 kB] 94s Get:3 http://ftpmaster.internal/ubuntu resolute/main arm64 libip6tc2 arm64 1.8.11-2ubuntu3 [24.7 kB] 94s Get:4 http://ftpmaster.internal/ubuntu resolute/main arm64 libxtables12 arm64 1.8.11-2ubuntu3 [36.7 kB] 94s Get:5 http://ftpmaster.internal/ubuntu resolute/main arm64 iproute2 arm64 6.18.0-1ubuntu1 [1171 kB] 95s Get:6 http://ftpmaster.internal/ubuntu resolute/main arm64 libcryptsetup12 arm64 2:2.8.0-1ubuntu3 [274 kB] 96s Get:7 http://ftpmaster.internal/ubuntu resolute/main arm64 wget arm64 1.25.0-2ubuntu4 [344 kB] 96s Get:8 http://ftpmaster.internal/ubuntu resolute/main arm64 cryptsetup-bin arm64 2:2.8.0-1ubuntu3 [227 kB] 96s Get:9 http://ftpmaster.internal/ubuntu resolute/main arm64 dracut-install arm64 109-11ubuntu1 [45.3 kB] 96s dpkg-preconfigure: unable to re-open stdin: No such file or directory 96s Fetched 2534 kB in 2s (1092 kB/s) 97s (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 ... 136597 files and directories currently installed.) 97s Preparing to unpack .../0-iptables_1.8.11-2ubuntu3_arm64.deb ... 97s Unpacking iptables (1.8.11-2ubuntu3) over (1.8.11-2ubuntu2) ... 97s Preparing to unpack .../1-libip4tc2_1.8.11-2ubuntu3_arm64.deb ... 97s Unpacking libip4tc2:arm64 (1.8.11-2ubuntu3) over (1.8.11-2ubuntu2) ... 97s Preparing to unpack .../2-libip6tc2_1.8.11-2ubuntu3_arm64.deb ... 97s Unpacking libip6tc2:arm64 (1.8.11-2ubuntu3) over (1.8.11-2ubuntu2) ... 97s Preparing to unpack .../3-libxtables12_1.8.11-2ubuntu3_arm64.deb ... 97s Unpacking libxtables12:arm64 (1.8.11-2ubuntu3) over (1.8.11-2ubuntu2) ... 97s Preparing to unpack .../4-iproute2_6.18.0-1ubuntu1_arm64.deb ... 97s Unpacking iproute2 (6.18.0-1ubuntu1) over (6.16.0-1ubuntu3) ... 98s Preparing to unpack .../5-libcryptsetup12_2%3a2.8.0-1ubuntu3_arm64.deb ... 98s Unpacking libcryptsetup12:arm64 (2:2.8.0-1ubuntu3) over (2:2.8.0-1ubuntu2) ... 98s Preparing to unpack .../6-wget_1.25.0-2ubuntu4_arm64.deb ... 98s Unpacking wget (1.25.0-2ubuntu4) over (1.25.0-2ubuntu3) ... 98s Preparing to unpack .../7-cryptsetup-bin_2%3a2.8.0-1ubuntu3_arm64.deb ... 98s Unpacking cryptsetup-bin (2:2.8.0-1ubuntu3) over (2:2.8.0-1ubuntu2) ... 98s Preparing to unpack .../8-dracut-install_109-11ubuntu1_arm64.deb ... 98s Unpacking dracut-install (109-11ubuntu1) over (109-9ubuntu1) ... 98s Setting up libip4tc2:arm64 (1.8.11-2ubuntu3) ... 98s Setting up wget (1.25.0-2ubuntu4) ... 98s Setting up libip6tc2:arm64 (1.8.11-2ubuntu3) ... 98s Setting up libxtables12:arm64 (1.8.11-2ubuntu3) ... 98s Setting up dracut-install (109-11ubuntu1) ... 98s Setting up libcryptsetup12:arm64 (2:2.8.0-1ubuntu3) ... 98s Setting up cryptsetup-bin (2:2.8.0-1ubuntu3) ... 98s Setting up iptables (1.8.11-2ubuntu3) ... 98s Setting up iproute2 (6.18.0-1ubuntu1) ... 99s Processing triggers for man-db (2.13.1-1build1) ... 100s Processing triggers for install-info (7.2-5) ... 100s Processing triggers for libc-bin (2.42-2ubuntu4) ... 100s autopkgtest [18:43:49]: upgrading testbed (apt dist-upgrade and autopurge) 101s Reading package lists... 101s Building dependency tree... 101s Reading state information... 101s Calculating upgrade... 102s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 102s Reading package lists... 102s Building dependency tree... 102s Reading state information... 102s Solving dependencies... 103s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 105s autopkgtest [18:43:54]: testbed running kernel: Linux 6.19.0-3-generic #3-Ubuntu SMP PREEMPT_DYNAMIC Fri Jan 23 19:46:27 UTC 2026 106s autopkgtest [18:43:55]: @@@@@@@@@@@@@@@@@@@@ apt-source rubocop 108s Get:1 http://ftpmaster.internal/ubuntu resolute/universe rubocop 1.39.0+dfsg-1build1 (dsc) [2425 B] 108s Get:2 http://ftpmaster.internal/ubuntu resolute/universe rubocop 1.39.0+dfsg-1build1 (tar) [1029 kB] 108s Get:3 http://ftpmaster.internal/ubuntu resolute/universe rubocop 1.39.0+dfsg-1build1 (diff) [11.1 kB] 108s gpgv: Signature made Fri Jan 9 19:37:41 2026 UTC 108s gpgv: using RSA key 25E3FF2D7F469DBE7D0D4E50AFCFEC8E669CE1C2 108s gpgv: Can't check signature: No public key 108s dpkg-source: warning: cannot verify inline signature for ./rubocop_1.39.0+dfsg-1build1.dsc: no acceptable signature found 108s autopkgtest [18:43:57]: testing package rubocop version 1.39.0+dfsg-1build1 109s autopkgtest [18:43:58]: build not needed 111s autopkgtest [18:44:00]: test gem2deb-test-runner: preparing testbed 111s Reading package lists... 111s Building dependency tree... 111s Reading state information... 111s Solving dependencies... 112s The following NEW packages will be installed: 112s gem2deb-test-runner libjs-jquery libjs-jquery-easing libjs-jquery-fancybox 112s libjs-jquery-mousewheel libjs-jquery-ui libruby libruby3.3 pry racc rake 112s rubocop ruby ruby-addressable ruby-ast ruby-coderay ruby-crack ruby-csv 112s ruby-did-you-mean ruby-diff-lcs ruby-docile ruby-hashdiff ruby-json 112s ruby-method-source ruby-minitest ruby-net-telnet ruby-parallel 112s ruby-power-assert ruby-progressbar ruby-public-suffix ruby-rainbow 112s ruby-regexp-parser ruby-rspec ruby-rspec-core ruby-rspec-expectations 112s ruby-rspec-mocks ruby-rspec-support ruby-rubocop-ast ruby-ruby2-keywords 112s ruby-rubygems ruby-simplecov ruby-simplecov-html ruby-test-unit 112s ruby-unicode-display-width ruby-webmock ruby-webrick ruby-whitequark-parser 112s ruby-xmlrpc ruby3.3 rubygems-integration 117s 0 upgraded, 50 newly installed, 0 to remove and 0 not upgraded. 117s Need to get 9905 kB of archives. 117s After this operation, 63.2 MB of additional disk space will be used. 117s Get:1 http://ftpmaster.internal/ubuntu resolute/main arm64 rubygems-integration all 1.19build1 [5666 B] 117s Get:2 http://ftpmaster.internal/ubuntu resolute/main arm64 ruby-csv all 3.3.4-1 [43.0 kB] 117s Get:3 http://ftpmaster.internal/ubuntu resolute/main arm64 ruby-did-you-mean all 1.6.3-2build1 [14.9 kB] 117s Get:4 http://ftpmaster.internal/ubuntu resolute/main arm64 ruby-net-telnet all 0.2.0-1build1 [13.5 kB] 117s Get:5 http://ftpmaster.internal/ubuntu resolute/main arm64 ruby-ruby2-keywords all 0.0.5-1build1 [4398 B] 117s Get:6 http://ftpmaster.internal/ubuntu resolute/main arm64 ruby-webrick all 1.9.1-1build1 [60.9 kB] 117s Get:7 http://ftpmaster.internal/ubuntu resolute/main arm64 ruby-xmlrpc all 0.3.3-2build1 [24.9 kB] 117s Get:8 http://ftpmaster.internal/ubuntu resolute/main arm64 libruby3.3 arm64 3.3.8-2ubuntu2 [5971 kB] 118s Get:9 http://ftpmaster.internal/ubuntu resolute/main arm64 ruby3.3 arm64 3.3.8-2ubuntu2 [59.1 kB] 118s Get:10 http://ftpmaster.internal/ubuntu resolute/main arm64 libruby arm64 1:3.3 [5164 B] 118s Get:11 http://ftpmaster.internal/ubuntu resolute/main arm64 ruby-rubygems all 3.6.7-2ubuntu2 [332 kB] 118s Get:12 http://ftpmaster.internal/ubuntu resolute/main arm64 ruby arm64 1:3.3 [3668 B] 118s Get:13 http://ftpmaster.internal/ubuntu resolute/main arm64 rake all 13.2.1-1build1 [45.9 kB] 118s Get:14 http://ftpmaster.internal/ubuntu resolute/universe arm64 ruby-minitest all 5.26.1-1 [49.3 kB] 118s Get:15 http://ftpmaster.internal/ubuntu resolute/universe arm64 ruby-power-assert all 3.0.1-1 [11.4 kB] 118s Get:16 http://ftpmaster.internal/ubuntu resolute/universe arm64 ruby-test-unit all 3.6.2-1 [67.0 kB] 118s Get:17 http://ftpmaster.internal/ubuntu resolute/universe arm64 gem2deb-test-runner arm64 2.2.5 [18.3 kB] 118s Get:18 http://ftpmaster.internal/ubuntu resolute/main arm64 libjs-jquery all 3.7.1+dfsg+~3.5.33-1build1 [321 kB] 118s Get:19 http://ftpmaster.internal/ubuntu resolute/universe arm64 libjs-jquery-easing all 12-4build1 [7078 B] 118s Get:20 http://ftpmaster.internal/ubuntu resolute/universe arm64 libjs-jquery-mousewheel all 1:3.1.13-5 [6324 B] 118s Get:21 http://ftpmaster.internal/ubuntu resolute/universe arm64 libjs-jquery-fancybox all 12-4build1 [45.8 kB] 118s Get:22 http://ftpmaster.internal/ubuntu resolute/universe arm64 libjs-jquery-ui all 1.13.2+dfsg-1build1 [251 kB] 118s Get:23 http://ftpmaster.internal/ubuntu resolute/universe arm64 ruby-coderay all 1.1.3-8build1 [78.4 kB] 118s Get:24 http://ftpmaster.internal/ubuntu resolute/universe arm64 ruby-method-source all 1.1.0-1 [8502 B] 118s Get:25 http://ftpmaster.internal/ubuntu resolute/universe arm64 pry all 0.15.2-1 [122 kB] 118s Get:26 http://ftpmaster.internal/ubuntu resolute/universe arm64 racc all 1.8.1-2 [71.5 kB] 118s Get:27 http://ftpmaster.internal/ubuntu resolute/main arm64 ruby-json arm64 2.15.2+dfsg-1 [69.4 kB] 118s Get:28 http://ftpmaster.internal/ubuntu resolute/universe arm64 ruby-progressbar all 1.11.0-1 [16.3 kB] 118s Get:29 http://ftpmaster.internal/ubuntu resolute/universe arm64 ruby-parallel all 1.27.0-1 [13.5 kB] 118s Get:30 http://ftpmaster.internal/ubuntu resolute/universe arm64 ruby-ast all 2.4.3-1 [10.8 kB] 118s Get:31 http://ftpmaster.internal/ubuntu resolute/universe arm64 ruby-whitequark-parser all 3.3.4.2-2 [511 kB] 118s Get:32 http://ftpmaster.internal/ubuntu resolute/universe arm64 ruby-rainbow all 3.1.1-1 [12.4 kB] 118s Get:33 http://ftpmaster.internal/ubuntu resolute-proposed/universe arm64 ruby-regexp-parser all 2.11.3-1 [58.1 kB] 118s Get:34 http://ftpmaster.internal/ubuntu resolute/universe arm64 ruby-rubocop-ast all 1.24.0-2 [50.3 kB] 118s Get:35 http://ftpmaster.internal/ubuntu resolute/universe arm64 ruby-unicode-display-width all 1.6.1-1 [8904 B] 119s Get:36 http://ftpmaster.internal/ubuntu resolute/universe arm64 rubocop all 1.39.0+dfsg-1build1 [455 kB] 119s Get:37 http://ftpmaster.internal/ubuntu resolute/universe arm64 ruby-public-suffix all 6.0.2-1.1 [14.6 kB] 119s Get:38 http://ftpmaster.internal/ubuntu resolute/universe arm64 ruby-addressable all 2.8.7-2 [55.4 kB] 119s Get:39 http://ftpmaster.internal/ubuntu resolute/universe arm64 ruby-crack all 0.4.4-4 [8764 B] 119s Get:40 http://ftpmaster.internal/ubuntu resolute/universe arm64 ruby-diff-lcs all 1.5.1-1 [22.8 kB] 119s Get:41 http://ftpmaster.internal/ubuntu resolute/universe arm64 ruby-docile all 1.4.1-1 [7038 B] 119s Get:42 http://ftpmaster.internal/ubuntu resolute/universe arm64 ruby-hashdiff all 1.2.1-1 [13.8 kB] 119s Get:43 http://ftpmaster.internal/ubuntu resolute/universe arm64 ruby-rspec-support all 3.13.0c0e0m0s1-2 [29.2 kB] 119s Get:44 http://ftpmaster.internal/ubuntu resolute/universe arm64 ruby-rspec-core all 3.13.0c0e0m0s1-2 [164 kB] 119s Get:45 http://ftpmaster.internal/ubuntu resolute/universe arm64 ruby-rspec-expectations all 3.13.0c0e0m0s1-2 [89.8 kB] 119s Get:46 http://ftpmaster.internal/ubuntu resolute/universe arm64 ruby-rspec-mocks all 3.13.0c0e0m0s1-2 [81.0 kB] 119s Get:47 http://ftpmaster.internal/ubuntu resolute/universe arm64 ruby-rspec all 3.13.0c0e0m0s1-2 [3500 B] 119s Get:48 http://ftpmaster.internal/ubuntu resolute/universe arm64 ruby-simplecov-html all 0.12.3-2 [477 kB] 119s Get:49 http://ftpmaster.internal/ubuntu resolute/universe arm64 ruby-simplecov all 0.22.0-2 [40.9 kB] 119s Get:50 http://ftpmaster.internal/ubuntu resolute/universe arm64 ruby-webmock all 3.25.1-1 [48.0 kB] 119s Fetched 9905 kB in 7s (1436 kB/s) 119s Selecting previously unselected package rubygems-integration. 119s (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 ... 136600 files and directories currently installed.) 119s Preparing to unpack .../00-rubygems-integration_1.19build1_all.deb ... 119s Unpacking rubygems-integration (1.19build1) ... 119s Selecting previously unselected package ruby-csv. 119s Preparing to unpack .../01-ruby-csv_3.3.4-1_all.deb ... 119s Unpacking ruby-csv (3.3.4-1) ... 119s Selecting previously unselected package ruby-did-you-mean. 119s Preparing to unpack .../02-ruby-did-you-mean_1.6.3-2build1_all.deb ... 119s Unpacking ruby-did-you-mean (1.6.3-2build1) ... 119s Selecting previously unselected package ruby-net-telnet. 119s Preparing to unpack .../03-ruby-net-telnet_0.2.0-1build1_all.deb ... 119s Unpacking ruby-net-telnet (0.2.0-1build1) ... 119s Selecting previously unselected package ruby-ruby2-keywords. 119s Preparing to unpack .../04-ruby-ruby2-keywords_0.0.5-1build1_all.deb ... 119s Unpacking ruby-ruby2-keywords (0.0.5-1build1) ... 119s Selecting previously unselected package ruby-webrick. 119s Preparing to unpack .../05-ruby-webrick_1.9.1-1build1_all.deb ... 119s Unpacking ruby-webrick (1.9.1-1build1) ... 119s Selecting previously unselected package ruby-xmlrpc. 119s Preparing to unpack .../06-ruby-xmlrpc_0.3.3-2build1_all.deb ... 119s Unpacking ruby-xmlrpc (0.3.3-2build1) ... 119s Selecting previously unselected package libruby3.3:arm64. 119s Preparing to unpack .../07-libruby3.3_3.3.8-2ubuntu2_arm64.deb ... 119s Unpacking libruby3.3:arm64 (3.3.8-2ubuntu2) ... 120s Selecting previously unselected package ruby3.3. 120s Preparing to unpack .../08-ruby3.3_3.3.8-2ubuntu2_arm64.deb ... 120s Unpacking ruby3.3 (3.3.8-2ubuntu2) ... 120s Selecting previously unselected package libruby:arm64. 120s Preparing to unpack .../09-libruby_1%3a3.3_arm64.deb ... 120s Unpacking libruby:arm64 (1:3.3) ... 120s Selecting previously unselected package ruby-rubygems. 120s Preparing to unpack .../10-ruby-rubygems_3.6.7-2ubuntu2_all.deb ... 120s Unpacking ruby-rubygems (3.6.7-2ubuntu2) ... 120s Selecting previously unselected package ruby. 120s Preparing to unpack .../11-ruby_1%3a3.3_arm64.deb ... 120s Unpacking ruby (1:3.3) ... 120s Selecting previously unselected package rake. 120s Preparing to unpack .../12-rake_13.2.1-1build1_all.deb ... 120s Unpacking rake (13.2.1-1build1) ... 120s Selecting previously unselected package ruby-minitest. 120s Preparing to unpack .../13-ruby-minitest_5.26.1-1_all.deb ... 120s Unpacking ruby-minitest (5.26.1-1) ... 120s Selecting previously unselected package ruby-power-assert. 120s Preparing to unpack .../14-ruby-power-assert_3.0.1-1_all.deb ... 120s Unpacking ruby-power-assert (3.0.1-1) ... 120s Selecting previously unselected package ruby-test-unit. 120s Preparing to unpack .../15-ruby-test-unit_3.6.2-1_all.deb ... 120s Unpacking ruby-test-unit (3.6.2-1) ... 120s Selecting previously unselected package gem2deb-test-runner. 120s Preparing to unpack .../16-gem2deb-test-runner_2.2.5_arm64.deb ... 120s Unpacking gem2deb-test-runner (2.2.5) ... 120s Selecting previously unselected package libjs-jquery. 120s Preparing to unpack .../17-libjs-jquery_3.7.1+dfsg+~3.5.33-1build1_all.deb ... 120s Unpacking libjs-jquery (3.7.1+dfsg+~3.5.33-1build1) ... 120s Selecting previously unselected package libjs-jquery-easing. 120s Preparing to unpack .../18-libjs-jquery-easing_12-4build1_all.deb ... 120s Unpacking libjs-jquery-easing (12-4build1) ... 120s Selecting previously unselected package libjs-jquery-mousewheel. 120s Preparing to unpack .../19-libjs-jquery-mousewheel_1%3a3.1.13-5_all.deb ... 120s Unpacking libjs-jquery-mousewheel (1:3.1.13-5) ... 120s Selecting previously unselected package libjs-jquery-fancybox. 120s Preparing to unpack .../20-libjs-jquery-fancybox_12-4build1_all.deb ... 120s Unpacking libjs-jquery-fancybox (12-4build1) ... 120s Selecting previously unselected package libjs-jquery-ui. 120s Preparing to unpack .../21-libjs-jquery-ui_1.13.2+dfsg-1build1_all.deb ... 120s Unpacking libjs-jquery-ui (1.13.2+dfsg-1build1) ... 120s Selecting previously unselected package ruby-coderay. 120s Preparing to unpack .../22-ruby-coderay_1.1.3-8build1_all.deb ... 120s Unpacking ruby-coderay (1.1.3-8build1) ... 120s Selecting previously unselected package ruby-method-source. 121s Preparing to unpack .../23-ruby-method-source_1.1.0-1_all.deb ... 121s Unpacking ruby-method-source (1.1.0-1) ... 121s Selecting previously unselected package pry. 121s Preparing to unpack .../24-pry_0.15.2-1_all.deb ... 121s Unpacking pry (0.15.2-1) ... 121s Selecting previously unselected package racc. 121s Preparing to unpack .../25-racc_1.8.1-2_all.deb ... 121s Unpacking racc (1.8.1-2) ... 121s Selecting previously unselected package ruby-json:arm64. 121s Preparing to unpack .../26-ruby-json_2.15.2+dfsg-1_arm64.deb ... 121s Unpacking ruby-json:arm64 (2.15.2+dfsg-1) ... 121s Selecting previously unselected package ruby-progressbar. 121s Preparing to unpack .../27-ruby-progressbar_1.11.0-1_all.deb ... 121s Unpacking ruby-progressbar (1.11.0-1) ... 121s Selecting previously unselected package ruby-parallel. 121s Preparing to unpack .../28-ruby-parallel_1.27.0-1_all.deb ... 121s Unpacking ruby-parallel (1.27.0-1) ... 121s Selecting previously unselected package ruby-ast. 121s Preparing to unpack .../29-ruby-ast_2.4.3-1_all.deb ... 121s Unpacking ruby-ast (2.4.3-1) ... 121s Selecting previously unselected package ruby-whitequark-parser. 121s Preparing to unpack .../30-ruby-whitequark-parser_3.3.4.2-2_all.deb ... 121s Unpacking ruby-whitequark-parser (3.3.4.2-2) ... 121s Selecting previously unselected package ruby-rainbow. 121s Preparing to unpack .../31-ruby-rainbow_3.1.1-1_all.deb ... 121s Unpacking ruby-rainbow (3.1.1-1) ... 121s Selecting previously unselected package ruby-regexp-parser. 121s Preparing to unpack .../32-ruby-regexp-parser_2.11.3-1_all.deb ... 121s Unpacking ruby-regexp-parser (2.11.3-1) ... 121s Selecting previously unselected package ruby-rubocop-ast. 121s Preparing to unpack .../33-ruby-rubocop-ast_1.24.0-2_all.deb ... 121s Unpacking ruby-rubocop-ast (1.24.0-2) ... 121s Selecting previously unselected package ruby-unicode-display-width. 121s Preparing to unpack .../34-ruby-unicode-display-width_1.6.1-1_all.deb ... 121s Unpacking ruby-unicode-display-width (1.6.1-1) ... 121s Selecting previously unselected package rubocop. 121s Preparing to unpack .../35-rubocop_1.39.0+dfsg-1build1_all.deb ... 121s Unpacking rubocop (1.39.0+dfsg-1build1) ... 121s Selecting previously unselected package ruby-public-suffix. 121s Preparing to unpack .../36-ruby-public-suffix_6.0.2-1.1_all.deb ... 121s Unpacking ruby-public-suffix (6.0.2-1.1) ... 121s Selecting previously unselected package ruby-addressable. 121s Preparing to unpack .../37-ruby-addressable_2.8.7-2_all.deb ... 121s Unpacking ruby-addressable (2.8.7-2) ... 121s Selecting previously unselected package ruby-crack. 121s Preparing to unpack .../38-ruby-crack_0.4.4-4_all.deb ... 121s Unpacking ruby-crack (0.4.4-4) ... 121s Selecting previously unselected package ruby-diff-lcs. 121s Preparing to unpack .../39-ruby-diff-lcs_1.5.1-1_all.deb ... 121s Unpacking ruby-diff-lcs (1.5.1-1) ... 121s Selecting previously unselected package ruby-docile. 121s Preparing to unpack .../40-ruby-docile_1.4.1-1_all.deb ... 121s Unpacking ruby-docile (1.4.1-1) ... 121s Selecting previously unselected package ruby-hashdiff. 122s Preparing to unpack .../41-ruby-hashdiff_1.2.1-1_all.deb ... 122s Unpacking ruby-hashdiff (1.2.1-1) ... 122s Selecting previously unselected package ruby-rspec-support. 122s Preparing to unpack .../42-ruby-rspec-support_3.13.0c0e0m0s1-2_all.deb ... 122s Unpacking ruby-rspec-support (3.13.0c0e0m0s1-2) ... 122s Selecting previously unselected package ruby-rspec-core. 122s Preparing to unpack .../43-ruby-rspec-core_3.13.0c0e0m0s1-2_all.deb ... 122s Unpacking ruby-rspec-core (3.13.0c0e0m0s1-2) ... 122s Selecting previously unselected package ruby-rspec-expectations. 122s Preparing to unpack .../44-ruby-rspec-expectations_3.13.0c0e0m0s1-2_all.deb ... 122s Unpacking ruby-rspec-expectations (3.13.0c0e0m0s1-2) ... 122s Selecting previously unselected package ruby-rspec-mocks. 122s Preparing to unpack .../45-ruby-rspec-mocks_3.13.0c0e0m0s1-2_all.deb ... 122s Unpacking ruby-rspec-mocks (3.13.0c0e0m0s1-2) ... 122s Selecting previously unselected package ruby-rspec. 122s Preparing to unpack .../46-ruby-rspec_3.13.0c0e0m0s1-2_all.deb ... 122s Unpacking ruby-rspec (3.13.0c0e0m0s1-2) ... 122s Selecting previously unselected package ruby-simplecov-html. 122s Preparing to unpack .../47-ruby-simplecov-html_0.12.3-2_all.deb ... 122s Unpacking ruby-simplecov-html (0.12.3-2) ... 122s Selecting previously unselected package ruby-simplecov. 122s Preparing to unpack .../48-ruby-simplecov_0.22.0-2_all.deb ... 122s Unpacking ruby-simplecov (0.22.0-2) ... 122s Selecting previously unselected package ruby-webmock. 122s Preparing to unpack .../49-ruby-webmock_3.25.1-1_all.deb ... 122s Unpacking ruby-webmock (3.25.1-1) ... 122s Setting up ruby-rainbow (3.1.1-1) ... 122s Setting up ruby-ruby2-keywords (0.0.5-1build1) ... 122s Setting up ruby-regexp-parser (2.11.3-1) ... 122s Setting up ruby-power-assert (3.0.1-1) ... 122s Setting up ruby-hashdiff (1.2.1-1) ... 122s Setting up ruby-public-suffix (6.0.2-1.1) ... 122s Setting up libjs-jquery-mousewheel (1:3.1.13-5) ... 122s Setting up rubygems-integration (1.19build1) ... 122s Setting up ruby-minitest (5.26.1-1) ... 122s Setting up ruby-method-source (1.1.0-1) ... 122s Setting up ruby-test-unit (3.6.2-1) ... 122s Setting up ruby-ast (2.4.3-1) ... 122s Setting up ruby-net-telnet (0.2.0-1build1) ... 122s Setting up ruby-csv (3.3.4-1) ... 122s Setting up ruby-rspec-support (3.13.0c0e0m0s1-2) ... 122s Setting up ruby-webrick (1.9.1-1build1) ... 122s Setting up ruby-progressbar (1.11.0-1) ... 122s Setting up ruby-docile (1.4.1-1) ... 122s Setting up libjs-jquery (3.7.1+dfsg+~3.5.33-1build1) ... 122s Setting up ruby-did-you-mean (1.6.3-2build1) ... 122s Setting up ruby-xmlrpc (0.3.3-2build1) ... 122s Setting up libjs-jquery-easing (12-4build1) ... 122s Setting up ruby-addressable (2.8.7-2) ... 122s Setting up libjs-jquery-fancybox (12-4build1) ... 122s Setting up ruby-parallel (1.27.0-1) ... 122s Setting up libjs-jquery-ui (1.13.2+dfsg-1build1) ... 122s Setting up rake (13.2.1-1build1) ... 122s Setting up libruby3.3:arm64 (3.3.8-2ubuntu2) ... 122s Setting up ruby-rubygems (3.6.7-2ubuntu2) ... 122s Setting up ruby3.3 (3.3.8-2ubuntu2) ... 122s Setting up libruby:arm64 (1:3.3) ... 122s Setting up ruby (1:3.3) ... 122s Setting up racc (1.8.1-2) ... 122s Setting up ruby-json:arm64 (2.15.2+dfsg-1) ... 122s Setting up ruby-coderay (1.1.3-8build1) ... 122s Setting up ruby-rspec-core (3.13.0c0e0m0s1-2) ... 122s Setting up ruby-unicode-display-width (1.6.1-1) ... 122s Setting up pry (0.15.2-1) ... 122s Setting up ruby-diff-lcs (1.5.1-1) ... 122s Setting up ruby-whitequark-parser (3.3.4.2-2) ... 122s Setting up ruby-simplecov-html (0.12.3-2) ... 122s Setting up ruby-crack (0.4.4-4) ... 122s Setting up gem2deb-test-runner (2.2.5) ... 122s Setting up ruby-rubocop-ast (1.24.0-2) ... 122s Setting up ruby-simplecov (0.22.0-2) ... 122s Setting up ruby-rspec-expectations (3.13.0c0e0m0s1-2) ... 122s Setting up rubocop (1.39.0+dfsg-1build1) ... 122s Setting up ruby-rspec-mocks (3.13.0c0e0m0s1-2) ... 122s Setting up ruby-webmock (3.25.1-1) ... 122s Setting up ruby-rspec (3.13.0c0e0m0s1-2) ... 122s Processing triggers for libc-bin (2.42-2ubuntu4) ... 122s Processing triggers for man-db (2.13.1-1build1) ... 123s autopkgtest [18:44:12]: test gem2deb-test-runner: gem2deb-test-runner --autopkgtest --check-dependencies 2>&1 123s autopkgtest [18:44:12]: test gem2deb-test-runner: [----------------------- 124s 124s ┌──────────────────────────────────────────────────────────────────────────────┐ 124s │ Checking Rubygems dependency resolution on ruby3.3 │ 124s └──────────────────────────────────────────────────────────────────────────────┘ 124s 124s RUBYLIB=. GEM_PATH= ruby3.3 -e gem\ \"rubocop\" 124s mv lib ./.gem2deb.lib 124s mv ./.gem2deb.lib lib 124s 124s ┌──────────────────────────────────────────────────────────────────────────────┐ 124s │ Run tests for ruby3.3 from debian/ruby-tests.rake │ 124s └──────────────────────────────────────────────────────────────────────────────┘ 124s 124s RUBYLIB=. GEM_PATH= ruby3.3 -S rake --rakelibdir /gem2deb-nonexistent -f debian/ruby-tests.rake 124s mv lib ./.gem2deb.lib 124s /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 129s 129s Randomized with seed 59049 129s 129s RuboCop::Cop::Style::BlockDelimiters 129s EnforcedStyle: semantic 130s allows {} if it is a known functional method 130s accepts a multi-line block with braces if the return value is assigned 130s autocorrects do-end to {} if it is a functional block and does not change the meaning 130s accepts a single line block with {} if used in an irange 130s registers an offense for a multi-line block with do-end if the return value is passed to a method 130s accepts a multi-line block with braces when passed to a method 130s accepts a multi-line functional block with do-end if it is an ignored method by regex 130s autocorrects do-end to {} with appropriate spacing 130s autocorrects do-end to {} if it is a functional block 130s autocorrects do-end with `rescue` to {} if it is a functional block 130s registers an offense for a multi-line block with braces if the return value is not used 130s accepts a single line block with {} if used in an array 130s accepts a multi-line block with braces when chained 130s registers an offense for a multi-line block with do-end if the return value is attribute-assigned 130s accepts a single line block with {} if used in an if statement 130s allows {} if it is a known procedural method 130s accepts a multi-line block with braces if it is the return value of its scope 130s accepts a single line block with {} if used in a logical and 130s registers an offense for a multi-line block with do-end if the return value is assigned 130s accepts a single line block with {} if used in a logical or 130s accepts a multi-line functional block with do-end if it is a known procedural method 130s accepts a multi-line block with do-end if it is the return value of its scope 130s autocorrects do-end with `ensure` to {} if it is a functional block 130s accepts a single line block with {} followed by a safe navigation method call 130s accepts a multi-line block with braces when passed to a known functional method 130s accepts a single line block with {} if used in an erange 130s accepts a multi-line functional block with do-end if it is an ignored method 130s with a procedural multi-line block 130s autocorrects { and } to do and end 130s autocorrects { and } to do and end with appropriate spacing 130s with a procedural one-line block 130s with AllowBracesOnProceduralOneLiners true 130s accepts a single line procedural block with braces 130s accepts a single line procedural do-end block 130s with AllowBracesOnProceduralOneLiners false or unset 130s accepts a single line block with do-end if it is procedural 130s registers an offense for a single line procedural block 130s EnforcedStyle: always_braces 130s autocorrects do-end with `rescue` to {} if it is a functional block 130s registers an offense for multi-line chained do-end blocks 130s registers an offense for a multi-line block with do-end 130s accepts a multi-line functional block with do-end if it is an ignored method 130s does not autocorrect do-end if {} would change the meaning 130s autocorrects do-end with `ensure` to {} if it is a functional block 130s accepts a multi-line block that needs braces to be valid ruby 130s accepts a multi-line functional block with do-end if it is an ignored method by regex 130s accepts a single line block with braces 130s registers an offense for multi-lined do-end blocks when combined with attribute assignment 130s registers an offense for a single line block with do-end 130s when there are braces around a multi-line block 130s allows when the block is being chained 130s allows when combined with attribute assignment 130s allows in the simple case 130s EnforcedStyle: line_count_based 130s autocorrects do-end for single line blocks to { and } 130s accepts a single line block with braces 130s does not autocorrect do-end if {} would change the meaning 130s registers an offense for a single line block with do-end 130s accepts a multi-line block with do-end 130s accepts a multi-line block that needs braces to be valid ruby 130s does not autocorrect {} if do-end would change the meaning 130s with a single line do-end block with an inline `rescue` 130s autocorrects properly 130s Ruby >= 2.7 131s accepts a multi-line numblock that needs braces to be valid ruby 131s accepts a single line numblock with braces 131s registers an offense for a single line numblock with do-end 131s accepts a multi-line numblock with do-end 131s when there are braces around a multi-line block 131s registers an offense in the simple case 131s accepts braces if do-end would change the meaning 131s can handle special method names such as []= and done? 131s registers an offense for braces if do-end would not change the meaning 131s does not autocorrect {} if do-end would introduce a syntax error 131s registers an offense when there is a comment after the closing brace and using method chain 131s registers an offense when there is a comment after the closing brace and block body is empty 131s registers an offense and keep chained block when there is a comment after the closing brace and block body is not empty 131s registers an offense when combined with attribute assignment 131s accepts a multi-line functional block with {} if it is an ignored method by regex 131s autocorrects { and } to do and end 131s registers an offense when there is a comment after the closing brace and block body is not empty 131s autocorrects adjacent curly braces correctly 131s accepts a multi-line functional block with {} if it is an ignored method 131s EnforcedStyle: braces_for_chaining 131s registers an offense for a single line block with do-end 131s autocorrects do-end with `rescue` to {} if it is a functional block 131s accepts a single line block with braces 131s accepts a multi-line block that needs braces to be valid ruby 131s accepts a multi-line functional block with {} if it is an ignored method by regex 131s disallows {} with no chain inside of Hash[] 131s allows do/end inside Hash[] 131s accepts a multi-line functional block with {} if it is an ignored method 131s autocorrects do-end with `ensure` to {} if it is a functional block 131s accepts a multi-line block with do-end 131s allows chaining to } inside of Hash[] 131s registers an offense for multi-line chained do-end blocks 131s allows when :[] is chained 131s Ruby >= 2.7 131s accepts a multi-line numblock that needs braces to be valid ruby 131s accepts a multi-line numblock with do-end 131s accepts a single line numblock with braces 131s registers an offense for a single line numblock with do-end 131s with safe navigation 131s registers an offense for multi-line chained do-end blocks 131s when there are braces around a multi-line block 131s allows when the block is being chained with attribute assignment 131s allows when the block is being chained 131s registers an offense in the simple case 131s registers an offense when combined with attribute assignment 131s BracesRequiredMethods 131s other methods 131s allows braces 131s autocorrects { and } to do and end 131s BracesRequiredMethods methods 131s registers an offense with do 131s allows braces 131s 131s RuboCop::Cop::Lint::DeprecatedClassMethods 131s prefer `Addrinfo#getnameinfo` over `Socket.gethostbyaddr` 131s registers an offense for Socket.gethostbyaddr 131s does not register an offense for method `gethostbyaddr` on other receivers 131s registers an offense for ::Socket.gethostbyaddr 131s prefer `File.exist?` over `File.exists?` 131s does not register an offense for File.exist? 131s registers an offense and corrects File.exists? 131s registers an offense and corrects ::File.exists? 131s when using `ENV.dup` 131s registers an offense 131s does not register an offense for method calls to `ENV` other than `dup` 131s prefer `Addrinfo#getaddrinfo` over `Socket.gethostbyname` 131s registers an offense for ::Socket.gethostbyname 131s does not register an offense for method `gethostbyname` on other receivers 131s registers an offense for Socket.gethostbyname 131s prefer `Dir.exist?` over `Dir.exists?` 131s registers an offense and corrects ::Dir.exists? 131s registers an offense and corrects Dir.exists? 131s does not register an offense for Dir.exist? 131s does not register an offense for offensive method `exists?`on other receivers 131s when using `ENV.freeze` 131s registers an offense 131s does not register an offense for method calls to `ENV` other than `freeze` 131s when using `ENV.clone` 131s does not register an offense for method calls to `ENV` other than `clone` 131s registers an offense 131s prefer `block_given?` over `iterator?` 131s does not register an offense for offensive method `iterator?`on other receivers 131s does not register an offense for block_given? 131s registers an offense and corrects iterator? 131s 131s RuboCop::Cop::Layout::SpaceAroundEqualsInParameterDefault 131s when EnforcedStyle is space 131s registers an offense and corrects assigning empty string without space 131s registers an offense and corrects default value assignment where first is partially right without space 131s accepts default value assignment with spaces and unary + operator 131s registers an offense and corrects assignment of empty list without space 131s registers an offense and corrects missing space for arguments with unary operators 131s registers an offense and corrects default value assignment without space 131s accepts default value assignment with space 131s when EnforcedStyle is no_space 131s registers an offense and corrects assignment of empty string with space 131s accepts default value assignment without space 131s registers an offense and corrects default value assignment with space 131s registers an offense and corrects assignment of empty list with space 131s 131s RuboCop::Cop::InternalAffairs::ExampleDescription 131s with `expect_correction` 131s registers an offense when given an improper description 131s in conjunction with expect_offense 131s registers an offense when given an improper description 131s when the description is invalid for both methods 131s registers an offense for the first method encountered 131s with `expect_no_offenses` 131s does not register an offense when given an unexpected description 131s does not register an offense when given a proper description 131s registers an offense when given an improper description 131s does not crash when given a proper description that is split with + 131s with `expect_no_corrections` 131s registers an offense when given an improper description 131s in conjunction with expect_offense 131s registers an offense when given an improper description 131s when not making an expectation on offenses 131s does not register an offense 131s with `expect_offense` 131s does not register an offense when given a proper description 131s does not register an offense when given an unexpected description 131s registers an offense when given an improper description 131s 131s RuboCop::Cop::Style::OptionalBooleanParameter 131s registers an offense when defining method with multiple optional boolean args 131s does not register an offense when defining method with keyword boolean arg 131s does not register an offense when defining method without args 131s registers an offense when defining class method with optional boolean arg 131s registers an offense when defining method with optional boolean arg that has no space 131s does not register an offense when defining method with optional non-boolean arg 131s registers an offense when defining method with optional boolean arg 131s when AllowedMethods is not empty 131s does not register an offense 131s 131s RuboCop::Cop::Style::Semicolon 131s accepts semicolon before end if so configured 131s accepts one line empty class definitions 131s accepts semicolon after params if so configured 131s accept semicolons inside strings 131s registers an offense for a single expression 131s registers an offense for semicolon at the end no matter what 131s accepts one line empty module definitions 131s registers an offense for several expressions 131s accepts one line method definitions 131s registers an offense for range (`1...42`) with semicolon 131s registers an offense for one line method with two statements 131s registers an offense for range (`1..42`) with semicolon 131s registers an offense for a semicolon at the beginning of a line 131s accepts one line empty method definitions 131s with a multi-expression line without a semicolon 131s does not register an offense 131s Ruby >= 2.6 131s does not register an offense for endless range without semicolon 131s registers an offense for endless range with semicolon (irange and erange) 131s registers an offense for endless range with semicolon in the method definition 131s registers an offense for endless range with semicolon (irange only) 131s when AllowAsExpressionSeparator is true 131s accepts several expressions 131s accepts one line method with two statements 131s 131s RuboCop::Cop::Layout::FirstArrayElementLineBreak 131s ignores elements listed on a single line 131s ignores properly formatted implicit arrays 131s masgn implicit arrays 131s registers and corrects the offense 131s send implicit arrays 131s registers and corrects the offense 131s array nested in a method call 131s registers an corrects the offense 131s word arrays 131s registers and corrects the offense 131s elements listed on the first line 131s registers and corrects the offense 131s 131s RuboCop::Cop::InternalAffairs::RedundantLocationArgument 131s when location argument is not passed 131s does not register an offense 131s when location argument is passed 131s when location argument does not equal to :expression 131s does not register an offense 131s when location argument is :expression 131s registers an offense 131s removes default `location` surrounded by other keywords 131s removes default `location` when preceded by another keyword 131s when there is a message argument 131s registers an offense 131s 131s RuboCop::Cop::Corrector 131s #rewrite 131s allows removal of characters preceding range 131s accepts a node instead of a range 131s allows insertion before and after a source range 131s allows removal of characters from range beginning 131s allows replacement of a range 131s allows insertion before a source range 131s raises a useful error if not given a node or a range 131s allows removal of characters from range ending 131s allows insertion after a source range 131s allows removal of a range 131s when range is from incorrect source 131s raises exception from insert_before 131s raises exception from remove_leading 131s raises exception from replace 131s raises exception from remove 131s raises exception from insert_after 131s raises exception from remove_trailing 131s raises exception from remove_preceding 131s 131s RuboCop::Cop::Style::ArgumentsForwarding 131s TargetRubyVersion >= 3.1 131s registers an offense when using restarg and anonymous block arg 131s registers an offense when using restarg, kwargs, and anonymous block arg 131s TargetRubyVersion <= 2.6 131s does not register an offense when using restarg with block arg 131s TargetRubyVersion >= 2.7 131s does not register an offense when referencing the restarg outside forwarding method arguments 131s does not register an offense when using arguments forwarding 131s registers an offense when the parentheses of arguments are omitted 131s does not register an offense when assigning the restarg outside forwarding method arguments 131s registers an offense when forwarding to a method in block 131s does not register an offense when different arguments are used 132s does not register an offense when the restarg is overwritten 132s registers an offense when using restarg, kwargs and block arg 132s does not register an offense when the block arg is overwritten 132s registers an offense when using restarg and block arg 132s registers an offense when delegating 132s does not register an offense when body of method definition is empty 132s registers an offense when passing restarg and block arg in defs 132s does not register an offense when using the restarg outside forwarding method arguments 132s does not register an offense when different argument names are used 132s does not register an offense when the kwarg is overwritten 132s AllowOnlyRestArgument: true 132s does not register an offense when using only kwrest arg 132s does not register an offense when using only rest arg 132s AllowOnlyRestArgument: false 132s registers an offense when using only kwrest arg 132s registers an offense when using only rest arg 132s 132s RuboCop::Cop::Layout::FirstArgumentIndentation 132s when EnforcedStyle is special_for_inner_method_call 132s when indentation width is overridden for this cop only 132s registers an offense and corrects an over-indented first argument 132s accepts a correctly indented first argument 132s for method calls within method calls 132s without outer parentheses 132s accepts a first argument with special indentation 132s with outer parentheses 132s registers an offense and corrects an over-indented first argument 132s when IndentationWidth:Width is 4 132s registers an offense and corrects an over-indented first argument 132s when IndentationWidth:Width is 2 132s registers an offense and corrects an over-indented first argument of `super` 132s registers an offense and corrects an over-indented first argument on a pipe method name 132s registers an offense and corrects an under-indented first argument 132s registers an offense and corrects lines affected by another offense 132s accepts method calls with no arguments 132s does not view chained call as an outer method call 132s registers an offense and corrects an over-indented first argument 132s accepts a first argument that is not preceded by a line break 132s accepts operator calls 132s does not view []= as an outer method call 132s registers an offense and corrects an over-indented first argument on a plus sign method name 132s registers an offense and corrects an over-indented first argument on an alphanumeric method name 132s when using safe navigation operator 132s registers an offense and corrects an under-indented 1st argument 132s when the receiver contains a line break 132s registers an offense and corrects an over-indented first argument 132s accepts a correctly indented first argument 132s accepts a correctly indented first argument preceded by an empty line 132s when preceded by a comment line 132s registers an offense and corrects an under-indented first argument 132s accepts a correctly indented first argument 132s for assignment 132s accepts a correctly indented first argument and does not care about the second argument 132s with line break 132s accepts a correctly indented first argument 132s registers an offense and corrects an under-indented first argument 132s for a setter call 132s accepts an unindented value 132s when EnforcedStyle is consistent_relative_to_receiver 132s when IndentationWidth:Width is 2 132s registers an offense and corrects an over-indented first argument 132s accepts a first argument that is not preceded by a line break 132s registers an offense and corrects an under-indented first argument 132s accepts operator calls 132s does not register an offense when argument has expected indent width and the method is preceded by double splat 132s does not register an offense when argument has expected indent width and the method is preceded by splat 132s does not view []= as an outer method call 132s accepts method calls with no arguments 132s does not view chained call as an outer method call 132s registers an offense and corrects lines affected by other offenses 132s when the receiver contains a line break 132s accepts a correctly indented first argument 132s registers an offense and corrects an over-indented 1st argument 132s accepts a correctly indented first argument preceded by an empty line 132s when preceded by a comment line 132s accepts a correctly indented first argument 132s registers an offense and corrects an under-indented first argument 132s for assignment 132s register an offense and corrects a correctly indented first argument and does not care about the second argument 132s with line break 132s registers an offense and corrects an under-indented first argument 132s accepts a correctly indented first argument 132s when indentation width is overridden for this cop only 132s accepts a correctly indented first argument 132s registers an offense and corrects an over-indented first argument 132s when IndentationWidth:Width is 4 132s registers an offense and corrects an over-indented first argument 132s for method calls within method calls 132s with outer parentheses 132s registers an offense and corrects an over-indented 1st argument 132s indents all relative to the receiver 132s without outer parentheses 132s indents all relative to the receiver 132s accepts a first argument with special indentation 132s when EnforcedStyle is consistent 132s when indentation width is overridden for this cop only 132s registers an offense and corrects an over-indented first argument 132s accepts a correctly indented first argument 132s for method calls within method calls 132s accepts first argument indented relative to previous line 132s registers an offense and corrects an over-indented first argument 132s when IndentationWidth:Width is 4 132s registers an offense and corrects an over-indented first argument 132s when IndentationWidth:Width is 2 132s accepts operator calls 132s accepts a first argument that is not preceded by a line break 132s registers an offense and corrects an over-indented first argument of `super` 132s accepts method calls with no arguments 132s registers an offense and corrects lines affected by another offense 132s registers an offense and corrects an over-indented first argument on a plus sign method name 132s registers an offense and corrects an over-indented first argument on an alphanumeric method name 132s does not view chained call as an outer method call 132s registers an offense and corrects an over-indented first argument on a pipe method name 132s does not view []= as an outer method call 132s registers an offense and corrects an under-indented first argument 132s registers an offense and corrects an over-indented first argument 132s for assignment 132s accepts a correctly indented first argument and does not care about the second argument 132s with line break 132s accepts a correctly indented first argument 132s registers an offense and corrects an under-indented first argument 132s for a setter call 132s accepts an unindented value 132s when the receiver contains a line break 132s registers an offense and corrects an over-indented first argument 132s accepts a correctly indented first argument 132s accepts a correctly indented first argument preceded by an empty line 132s when preceded by a comment line 132s registers an offense and corrects an under-indented first argument 132s accepts a correctly indented first argument 132s when using safe navigation operator 132s registers an offense and corrects an under-indented 1st argument 132s when EnforcedStyle is special_for_inner_method_call_in_parentheses 132s when indentation width is overridden for this cop only 132s registers an offense and corrects an over-indented first argument 132s accepts a correctly indented first argument 132s when IndentationWidth:Width is 2 132s does not view []= as an outer method call 132s accepts a first argument that is not preceded by a line break 132s registers an offense and corrects an over-indented first argument on an alphanumeric method name 132s accepts method calls with no arguments 132s registers an offense and corrects an over-indented first argument of `super` 132s registers an offense and corrects an over-indented first argument on a pipe method name 132s does not view chained call as an outer method call 132s accepts operator calls 132s registers an offense and corrects an over-indented first argument 132s registers an offense and corrects an over-indented first argument on a plus sign method name 132s registers an offense and corrects an under-indented first argument 132s registers an offense and corrects lines affected by another offense 132s for assignment 132s accepts a correctly indented first argument and does not care about the second argument 132s with line break 132s accepts a correctly indented first argument 132s registers an offense and corrects an under-indented first argument 132s when using safe navigation operator 132s registers an offense and corrects an under-indented 1st argument 132s when the receiver contains a line break 132s accepts a correctly indented first argument preceded by an empty line 132s registers an offense and corrects an over-indented first argument 132s accepts a correctly indented first argument 132s when preceded by a comment line 132s registers an offense and corrects an under-indented first argument 132s accepts a correctly indented first argument 132s for a setter call 132s accepts an unindented value 132s for method calls within method calls 132s with outer parentheses 132s accepts a correctly indented first argument with fullwidth characters 132s accepts a correctly indented first argument in interpolation 132s registers an offense and corrects an over-indented first argument 132s registers an offense and corrects an under-indented first argument 132s without outer parentheses 132s accepts a first argument with consistent style indentation 132s when IndentationWidth:Width is 4 132s registers an offense and corrects an over-indented first argument 132s 132s RuboCop::Cop::Lint::UnderscorePrefixedVariableName 132s in a method calling `super` with arguments 132s when an underscore-prefixed argument is used explicitly 132s registers an offense 132s when an underscore-prefixed argument is not used 132s does not register an offense 132s when an underscore-prefixed variable in top-level scope is used 132s registers an offense 132s when an underscore-prefixed keyword block argument is used 132s registers an offense 132s when AllowKeywordBlockArguments is set 132s does not register an offense 132s in a method calling `binding` with arguments 132s when an underscore-prefixed argument is used explicitly 132s registers an offense 132s when an underscore-prefixed argument is not used 132s does not register an offense 132s when an underscore-prefixed method argument is used 132s registers an offense 132s when an underscore-prefixed variable is used 132s registers an offense 132s when an underscore-prefixed variable is reassigned 132s does not register an offense 132s when an underscore-prefixed variable is captured by a block 132s accepts 132s when an underscore-prefixed block argument is used 132s registers an offense 132s registers an offense 132s in a method calling `binding` without arguments 132s when an underscore-prefixed argument is used explicitly 132s registers an offense 132s when an underscore-prefixed argument is not used explicitly 132s does not register an offense 132s in a method calling `super` without arguments 132s when an underscore-prefixed argument is used explicitly 132s registers an offense 132s when an underscore-prefixed argument is not used explicitly 132s does not register an offense 132s when an underscore-prefixed named capture variable is used 132s registers an offense 132s when non-underscore-prefixed variable is used 132s does not register an offense 132s 132s RuboCop::Cop::Lint::ConstantDefinitionInBlock 132s registers an offense for a class defined within a block followed by another statement 132s does not register an offense for a constant with an explicit top-level scope followed by another statement 132s registers an offense for a constant defined within a block followed by another statement 132s does not register an offense for a top-level class 132s registers an offense for a class defined within a block 132s does not register an offense for a constant with an explicit self scope followed by another statement 132s registers an offense for a module defined within a block followed by another statement 132s registers an offense for a module defined within a block 132s does not register an offense for a top-level constant 132s does not register an offense for a top-level module 132s does not register an offense for a top-level constant followed by another statement 132s does not register an offense for a constant with an explicit self scope 132s does not register an offense for a constant with an explicit top-level scope 132s does not register an offense for a top-level class followed by another statement 132s does not register an offense for a top-level module followed by another statement 132s registers an offense for a constant defined within a block 132s when `AllowedMethods: []` 132s registers an offense for a class defined within a block of `enums` method 132s registers an offense for a casign used within a block of `enums` method 132s registers an offense for a module defined within a block of `enums` method 132s when `AllowedMethods: [enums]` 132s does not register an offense for a casign used within a block of `enums` method 132s does not register an offense for a class defined within a block of `enums` method 132s does not register an offense for a module defined within a block of `enums` method 132s 132s RuboCop::Cop::Naming::HeredocDelimiterCase 132s when enforced style is uppercase 132s with a non-interpolated heredoc 132s when using double quoted delimiters 132s registers an offense and corrects with a lowercase delimiter 132s does not register an offense with an uppercase delimiter 132s registers an offense and corrects with a camel case delimiter 132s when using single quoted delimiters 132s registers an offense and corrects with a lowercase delimiter 132s does not register an offense with an uppercase delimiter 132s registers an offense and corrects with a camel case delimiter 132s when using non-word delimiters 132s does not register an offense 132s when using back tick delimiters 132s does not register an offense with an uppercase delimiter 132s registers an offense and corrects with a camel case delimiter 132s registers an offense and corrects with a lowercase delimiter 132s with a squiggly heredoc 132s registers an offense and corrects with a lowercase delimiter 132s registers an offense and corrects with a camel case delimiter 132s does not register an offense with an uppercase delimiter 132s with an interpolated heredoc 132s does not register an offense with an uppercase delimiter 132s registers an offense and corrects with a lowercase delimiter 132s registers an offense with a camel case delimiter 132s when enforced style is lowercase 132s with an interpolated heredoc 132s does not register an offense with a lowercase delimiter 132s registers an offense and corrects with an uppercase delimiter 132s registers an offense and corrects with a camel case delimiter 132s with a non-interpolated heredoc 132s registers an offense and corrects with an uppercase delimiter 132s registers an offense and corrects with a camel case delimiter 132s does not register an offense with a lowercase delimiter 132s with a squiggly heredoc 132s registers an offense and corrects with a camel case delimiter 132s does not register an offense with a lowercase delimiter 132s registers an offense and corrects with an uppercase delimiter 132s 132s RuboCop::Cop::Lint::BinaryOperatorWithIdenticalOperands 132s registers an offense for `<=` with duplicate operands 132s registers an offense for `&&` with duplicate operands 132s registers an offense for `^` with duplicate operands 132s does not register an offense for `+` with duplicate operands 132s does not register an offense when using arithmetic operator with numerics 132s does not register an offense for `**` with duplicate operands 132s does not register an offense for `<<` with duplicate operands 132s does not register an offense when using binary operator with different operands 132s does not crash on operator without any argument 132s registers an offense for `>=` with duplicate operands 132s registers an offense for `-` with duplicate operands 132s registers an offense for `<=>` with duplicate operands 132s registers an offense for `==` with duplicate operands 132s registers an offense for `<` with duplicate operands 132s registers an offense for `===` with duplicate operands 132s registers an offense for `|` with duplicate operands 132s registers an offense for `!=` with duplicate operands 132s registers an offense for `||` with duplicate operands 132s registers an offense for `%` with duplicate operands 132s does not register an offense for `*` with duplicate operands 132s registers an offense for `>` with duplicate operands 132s registers an offense for `=~` with duplicate operands 132s registers an offense for `/` with duplicate operands 132s does not register an offense for `>>` with duplicate operands 132s 132s RuboCop::Cop::Style::NestedTernaryOperator 132s registers an offense and corrects for a nested ternary operator expression with block 132s registers an offense and corrects for a nested ternary operator expression with no parentheses on the outside 132s accepts a non-nested ternary operator within an if 132s registers an offense and corrects for a nested ternary operator expression 132s can handle multiple nested ternaries 132s 132s RuboCop::Cop::Layout::ConditionPosition 132s accepts condition on a different line for modifiers 132s registers an offense and corrects for condition on the next line 132s registers an offense and corrects for condition on the next line 132s accepts ternary ops 133s registers an offense and corrects for condition on the next line 133s accepts condition on the same line 133s accepts condition on the same line 133s registers an offense and corrects for condition on the next line 133s accepts condition on the same line 133s accepts condition on a different line for modifiers 133s accepts condition on the same line 133s accepts condition on a different line for modifiers 133s registers an offense and corrects for elsif condition on the next line 133s accepts condition on a different line for modifiers 133s 133s RuboCop::Cop::Lint::SymbolConversion 133s does not register an offense for a symbol that requires quotes 133s does not register an offense for a dstr 133s does not register an offense for a normal symbol 133s behaves like offense 133s registers an offense for :"foo" 133s behaves like offense 133s registers an offense for :foo.intern 133s behaves like offense 133s registers an offense for "foo".to_sym 133s implicit `to_sym` call 133s does not register an offense 133s behaves like offense 133s registers an offense for :foo.to_sym 133s in an alias 133s does not register an offense 133s inside a percent literal array 133s does not register an offense 133s EnforcedStyle: consistent 133s with a mix of string and symbol keys 133s does not register an offense 133s with a key with = 133s requires symbols to be quoted 133s hash where no keys need to be quoted 133s does not register an offense 133s hash where keys are quoted but do not need to be 133s registers an offense 133s with different quote styles 133s does not register an offense 133s hash where there are keys needing quoting 133s registers an offense for unquoted keys 133s behaves like offense 133s registers an offense for "foo-bar".intern 133s in a hash 133s keys 133s does not register an offense for a require quoted symbol 133s registers an offense for a quoted symbol 133s registers and corrects an offense for a quoted symbol that ends with `?` 133s does not register an offense for operators 133s does not register an offense for a require quoted symbol that ends with `=` 133s registers and corrects an offense for a quoted symbol that ends with `!` 133s does not register an offense for a normal symbol 133s does not register an offense for a require quoted symbol that contains `:` 133s values 133s registers an offense for a quoted symbol value 133s registers an offense for a quoted symbol key 133s does not register an offense for a normal symbol 133s behaves like offense 133s registers an offense for :"foo_bar" 133s behaves like offense 133s registers an offense for "foo_bar".intern 133s behaves like offense 133s registers an offense for "foo".intern 133s behaves like offense 133s registers an offense for "foo-bar".to_sym 133s behaves like offense 133s registers an offense for "foo_bar".to_sym 133s single quoted symbol 133s does not register an offense 133s 133s RuboCop::Cop::Style::SymbolProc 133s accepts empty block body 133s does not register an offense when receiver is a array literal and using `max` with a block 133s accepts proc with 1 argument 133s autocorrects correctly when args have a trailing comma 133s registers an offense for a block with parameterless method call on param 133s does not register an offense when receiver is a hash literal and using `reject` with a block 133s accepts block when method in body is not called on block arg 133s accepts a block with an unused argument with an lvar 133s registers an offense for a block when method in body is unary -/+ 133s accepts a block with an unused argument with an method call 133s registers an offense when receiver is an array literal and using `select` with a block 133s registers an offense when receiver is some value and using `select` with a block 133s autocorrects correctly when there are no arguments in parentheses 133s accepts Proc.new with 1 argument 133s accepts block with splat params 133s does not register an offense when receiver is a array literal and using `min` with a block 133s accepts block with a block argument 133s accepts block with more than 1 expression in body 133s registers an offense when receiver is a hash literal and using `min` with a block 133s accepts block with no arguments 133s registers an offense for safe navigation operator 133s accepts block with more than 1 arguments 133s registers an offense when receiver is an array literal and using `reject` with a block 133s accepts ::Proc.new with 1 argument 133s does not crash with a bare method call 133s does not register an offense when receiver is a hash literal and using `select` with a block 133s accepts block with adding a comma after the sole argument 133s autocorrects multiple aliases with symbols as proc 133s registers an offense when receiver is some value and using `reject` with a block 133s registers an offense when receiver is a hash literal and using `max` with a block 133s accepts lambda with 1 argument 133s AllowComments: true 133s accepts block with parameterless method call on param and contains a comment 133s registers an offense for a block with parameterless method call on paramand not contains a comment 133s when `super` has no arguments 133s registers an offense 133s when `AllowMethodsWithArguments: false` 133s when method has arguments 133s registers an offense 133s when `super` has arguments 133s registers an offense 133s when AllowedPatterns is enabled 133s accepts ignored method 133s when AllowedMethods is enabled 133s accepts ignored method 133s numblocks 133s does not register an offense when receiver is a array literal and using `min` with a numblock 133s accepts Proc.new with 1 numbered parameter 133s registers an offense when receiver is an array literal and using `select` with a numblock 133s accepts block with only second numbered parameter 133s registers an offense when receiver is an array literal and using `reject` with a numblock 133s does not register an offense when receiver is a array literal and using `max` with a numblock 133s accepts block with multiple numbered parameters 133s registers an offense when receiver is an hash literal and using `min` with a numblock 133s registers an offense for a block with a numbered parameter 133s accepts ::Proc.new with 1 numbered parameter 133s registers an offense when receiver is an hash literal and using `max` with a numblock 133s does not register an offense when receiver is a hash literal and using `reject` with a numblock 133s accepts proc with 1 numbered parameter 133s registers an offense when receiver is some value and using `reject` with a numblock 133s accepts lambda with 1 numbered parameter 133s does not register an offense when receiver is a hash literal and using `select` with a numblock 133s registers an offense when receiver is some value and using `select` with a numblock 133s when the method has arguments 133s registers an offense 133s when `AllowMethodsWithArguments: true` 133s when method has no arguments 133s registers an offense 133s when `super` has arguments 133s does not register an offense 133s when method has arguments 133s does not register an offense 133s 133s RuboCop::Cop::Lint::EmptyWhen 133s when `AllowComments: false` 133s registers an offense for empty when body with a comment 133s when a `when` body is missing 133s registers an offense for missing when ... then body 133s registers an offense for missing when ... then body followed by else 133s registers an offense when case line has no expression 133s registers an offense for missing when body with a comment followed by else 133s registers an offense for missing when body followed by else 133s registers an offense for a missing when body 133s registers an offense for missing when body with a comment 133s when `AllowComments: true` 133s registers an offense for missing when body without a comment 133s accepts an empty when ... then body with a comment 133s accepts an empty when body with a comment 133s when a `when` body is present 133s accepts case with when ... then statements 133s accepts case with when bodies and else clause 133s accepts with no case line expression 133s accepts case with when ... then statements and else clause 133s accepts case with when bodies 133s 133s RuboCop::Cop::Layout::AccessModifierIndentation 133s when EnforcedStyle is set to outdent 133s accepts private indented to the containing class indent level 133s accepts private def indented to method depth in singleton class 133s accepts module fn def indented to method depth in a module 133s accepts private def indented to method depth in module defined with Module.new 133s accepts private def indented to method depth in class defined with Class.new 133s registers an offense and corrects private indented to method depth in singleton class 133s accepts protected indented to the containing class indent level 133s registers an offense and corrects misaligned access modifiers in nested classes 133s accepts private with argument indented to method depth in class defined with Class.new 133s registers an offense and corrects module_function indented to method depth in a module 133s registers an offense and corrects private indented to method depth in class defined with Class.new 133s registers an offense and corrects private indented to method depth in a module 133s accepts private with argument indented to method depth in a class 133s accepts module fn with argument indented to method depth in a module 133s accepts private def indented to method depth in a module 133s registers offense and corrects private indented to method depth in a class 133s accepts private with argument indented to method depth in singleton class 133s accepts private with argument indented to method depth in a module 133s registers an offense and corrects private indented to method depth in module defined with Module.new 133s accepts private def indented to method depth in a class 133s accepts private with argument indented to method depth in module defined with Module.new 133s when EnforcedStyle is set to indent 133s accepts indented access modifiers with arguments in nested classes 133s registers an offense and corrects misaligned private 133s accepts properly indented protected 133s registers an offense and corrects misaligned protected 133s registers an offense and corrects misaligned private in module defined with Module.new 133s registers an offense and corrects opposite + correct alignment 133s accepts properly indented private 133s accepts properly indented private in module defined with Module.new 133s registers an offense and corrects misaligned private in module 133s registers an offense and corrects misaligned private in class defined with Class.new 133s registers an offense and corrects misaligned private in a singleton class 133s registers an offense and corrects correct + opposite alignment 133s accepts methods with a body 133s registers an offense and corrects misaligned module_function in module 133s registers an offense and corrects misaligned access modifiers in nested classes 133s registers an offense and corrects access modifiers in arbitrary blocks 133s accepts an empty class 133s when indentation width is overridden for this cop only 133s accepts properly indented private 133s when 4 spaces per indent level are used 133s accepts properly indented private 133s 133s RuboCop::Cop::Style::DateTime 133s does not register an offense when using Date for modern date 133s registers an offense when using DateTime for current time 133s does not register an offense when using DateTime in another namespace 133s does not register an offense when using DateTime for historic date 133s registers an offense when using ::DateTime for current time 133s does not register an offense when using ::DateTime for historic date 133s registers an offense when using DateTime for modern date 133s does not register an offense when using Time for current time 133s when configured to allow #to_datetime 133s does not register an offense 133s when configured to not allow #to_datetime 133s registers an offense 133s 133s RuboCop::Cop::Style::Attr 133s accepts attr when it has a receiver 133s does not register offense for custom `attr` method 133s registers offense for attr within module_eval 133s registers an offense attr 133s accepts attr when it does not take arguments 133s registers offense for attr within class_eval 133s autocorrects 133s attr with multiple names to attr_reader 133s attr to attr_reader 133s attr :name, true to attr_accessor :name 133s attr, false to attr_reader 133s 133s RuboCop::Formatter::FileListFormatter 133s #file_finished 133s displays parsable text 133s 133s RuboCop::Cop::Layout::CommentIndentation 133s when allow_for_alignment is false 133s registers offenses and corrects before __END__ but not after 133s registers an offense and corrects 133s registers an offense for comments with extra indentation 133s around program structure keywords 133s accepts correctly indented comments 133s with a blank line following the comment 133s accepts a correctly indented comment 133s near various kinds of brackets 133s is unaffected by closing bracket that does not begin a line 133s accepts correctly indented comments 133s on outer level 133s registers an offense and corrects a documentation comment 133s accepts a correctly indented comment 133s registers an offense for each incorrectly indented comment 133s registers an offense and corrects an incorrectly indented (1) comment 133s registers an offense and corrects an incorrectly indented (2) comment 133s accepts a comment that follows code 133s when allow_for_alignment is true 133s registers offenses and corrects before __END__ but not after 133s registers an offense and corrects 133s accepts comments with extra indentation if aligned with comment on previous line 133s around program structure keywords 133s accepts correctly indented comments 133s with a blank line following the comment 133s accepts a correctly indented comment 133s on outer level 133s registers an offense and corrects an incorrectly indented (1) comment 133s registers an offense and corrects an incorrectly indented (2) comment 133s accepts a correctly indented comment 133s accepts a comment that follows code 133s registers an offense for each incorrectly indented comment 133s registers an offense and corrects a documentation comment 133s near various kinds of brackets 133s is unaffected by closing bracket that does not begin a line 133s accepts correctly indented comments 133s 133s RuboCop::Cop::Style::UnlessElse 133s unless with else 133s registers an offense 133s and nested unless with else 133s registers offenses for both but corrects only the outer unless/else 133s unless with nested if-else 133s registers an offense 133s unless without else 133s does not register an offense 133s 133s RuboCop::Cop::Style::OptionHash 133s registers an offense 133s when the last argument is an options hash named something else 133s does not register an offense 133s when the argument name is in the list of suspicious names 133s registers an offense 133s when there are no arguments 133s does not register an offense 133s when the last argument is a non-options-hash optional hash 133s does not register an offense 133s permitted list 133s ignores if the method is permitted 133s when passing options hash to super 133s does not register an offense when call to super is in a nested block 133s does not register an offense when code exists before call to super 133s does not register an offense 133s 133s RuboCop::Cop::Style::NestedModifier 133s adds parentheses when needed in autocorrection 133s does not add redundant parentheses in autocorrection 133s autocorrects unless + if 133s adds parentheses to method arguments when needed in autocorrection 133s registers one offense for more than two modifiers 133s autocorrects unless + unless 133s autocorrects if + if 133s autocorrects unless with a comparison operator + if 133s autocorrects if + unless 133s until 133s behaves like not correctable 133s does not autocorrect when until is the inner modifier 133s does not autocorrect when until is the outer modifier 133s while 133s behaves like not correctable 133s does not autocorrect when while is the outer modifier 133s does not autocorrect when while is the inner modifier 133s 133s RuboCop::Cop::Metrics::PerceivedComplexity 133s when Max is 1 133s counts known iterating block 133s registers an offense for a while block 133s accepts a method with no decision points 133s deals with nested if blocks containing && and || 133s accepts an empty method 133s registers an offense for a `define_method` 133s registers an offense for a for block 133s registers an offense for and 133s does not count unknown block calls 133s registers an offense for an unless modifier 133s registers an offense for a rescue block 133s registers an offense for a case/when block 133s registers an offense for elsif and else blocks 133s counts only a single method 133s registers an offense for or 133s registers an offense for && 133s registers an offense for an if modifier 133s accepts complex code outside of methods 133s accepts an empty `define_method` 133s registers an offense for || 133s registers an offense for a case/when block without an expression after case 133s counts else in a case with no argument 133s registers an offense for a ternary operator 133s registers an offense for an until block 133s when AllowedMethods is enabled 133s does not register an offense when defining an instance method 133s does not register an offense when using `define_method` 133s does not register an offense when defining a class method 133s when Max is 2 133s counts stupid nested if and else blocks 133s when AllowedPatterns is enabled 133s does not register an offense when defining a class method 133s does not register an offense when using `define_method` 133s does not register an offense when defining an instance method 133s 133s RuboCop::Cop::Layout::EmptyLinesAroundAttributeAccessor 133s registers an offense and corrects for an attribute accessor and `rubocop:disable` comment line 133s registers an offense and corrects for an attribute accessor and comment line 133s registers an offense and corrects for code that immediately follows accessor with comment 133s registers an offense and corrects for an attribute accessor and some comment line 133s accepts code that where the attr_accessor is the last line 133s registers an offense and corrects for some attribute accessors and comment line 133s does not register an offense and corrects when using `if` ... `else` branches 133s accepts code that separates an attribute accessor from the code and `rubocop:enable` comment line with a newline 133s registers an offense and corrects for code that immediately follows accessor 133s accepts code that separates attribute accessors from the code with a newline 133s accepts code that separates attribute accessors from the code and comment line with a newline 133s accepts code that separates an attribute accessor from the code with a newline 133s accepts code when attribute method is method chained 133s registers an offense and corrects for an attribute accessor and `rubocop:enable` comment line 133s registers an offense and corrects for an attribute accessor and `rubocop:enable` comment line and other comment 133s accepts code when used in class definition 134s when `AllowAliasSyntax: true` 134s does not register an offense for code that immediately `alias` syntax after accessor 134s when `AllowedMethods: []` 134s registers an offense for code that immediately ignored methods after accessor 134s when `AllowAliasSyntax: false` 134s registers an offense for code that immediately `alias` syntax after accessor 134s when `AllowedMethods: private` 134s does not register an offense for code that immediately ignored methods after accessor 134s 134s RuboCop::Cop::Style::CommentedKeyword 134s registers an offense and corrects when commenting on indented keywords 134s registers an offense and corrects for one-line cases 134s registers an offense and corrects when commenting on the same line as `end` 134s registers an offense and corrects when commenting after keyword with spaces 134s does not register an offense for certain comments 134s checks a long comment in less than one second 134s registers an offense and corrects when commenting on the same line as `begin` 134s accepts keyword letter sequences that are not keywords 134s registers an offense and corrects when commenting on the same line as `class` 134s registers an offense and corrects when commenting on the same line as `module` 134s does not register an offense if there are no comments after keywords 134s registers an offense and corrects when commenting on the same line as `def` 134s does not register an offense if AST contains # symbol 134s 134s RuboCop::Cop::Lint::IdentityComparison 134s does not register an offense when lhs is `object_id` without receiver 134s does not register an offense when using `==` for comparison between `object_id` and other 134s registers an offense and corrects when using `==` for comparison between `object_id`s 134s does not register an offense when rhs is `object_id` without receiver 134s does not register an offense when using `==` 134s does not register an offense when a receiver that is not `object_id` uses `==` 134s 134s RuboCop::Cop::Style::FileRead 134s registers an offense for and corrects the `File.open` with multiline read block (mode 'r') 134s does not register an offense when not reading from the block variable 134s registers an offense for and corrects the `File.open` with inline read block (mode 'r') 134s registers an offense for and corrects the `File.open` with multiline read block (mode 'rt') 134s registers an offense for and corrects `::File.open(filename).read` 134s registers an offense for and corrects `File.open(filename, 'rt').read` 134s registers an offense for and corrects the `File.open` with symbolic read proc (mode 'rb') 134s registers an offense for and corrects the `File.open` with symbolic read proc (mode 'r+') 134s registers an offense for and corrects the `File.open` with multiline read block (mode 'r+t') 134s registers an offense for and corrects `File.open(filename, 'r+t').read` 134s registers an offense for and corrects the `File.open` with multiline read block (mode 'r+b') 134s registers an offense for and corrects the `File.open` with inline read block (implicit text mode) 134s registers an offense for and corrects the `File.open` with multiline read block (mode 'r+') 134s registers an offense for and corrects the `File.open` with inline read block (mode 'rb') 134s registers an offense for and corrects the `File.open` with inline read block (mode 'r+') 134s registers an offense for and corrects the `File.open` with inline read block (mode 'r+b') 134s registers an offense for and corrects the `File.open` with inline read block (mode 'rt') 134s registers an offense for and corrects `File.open(filename, 'r+b').read` 134s registers an offense for and corrects `File.open(filename).read` 134s registers an offense for and corrects the `File.open` with symbolic read proc (mode 'rt') 134s registers an offense for and corrects the `File.open` with symbolic read proc (mode 'r') 134s registers an offense for and corrects the `File.open` with symbolic read proc (mode 'r+b') 134s registers an offense for and corrects `File.open(filename, 'r').read` 134s registers an offense for and corrects the `File.open` with multiline read block (implicit text mode) 134s registers an offense for and corrects the `File.open` with symbolic read proc (mode 'r+t') 134s registers an offense for and corrects `File.open(filename, 'rb').read` 134s registers an offense for and corrects `File.open(filename, 'r+').read` 134s registers an offense for and corrects the `File.open` with inline read block (mode 'r+t') 134s registers an offense for and corrects the `File.open` with multiline read block (mode 'rb') 134s registers an offense for and corrects the `File.open` with symbolic read proc (implicit text mode) 134s 134s RuboCop::Cop::Lint::RedundantStringCoercion 134s registers an offense and corrects `to_s` in an interpolation with several expressions 134s registers an offense and corrects an implicit receiver 134s accepts #to_s with arguments in an interpolation 134s accepts interpolation without #to_s 134s does not explode on empty interpolation 134s registers an offense and corrects `to_s` in interpolation 134s 134s RuboCop::Cop::Registry 134s can be cloned 134s exposes the number of stored cops 134s exposes a list of cop names 134s exposes cop departments 134s can filter down to one type 134s exposes a mapping of cop names to cop classes 134s can filter down to all but one type 134s #enabled 134s overrides config if :only includes the cop 134s selects only safe cops if :safe passed 134s selects cops which are enabled in the config 134s when new cops are introduced 134s overrides config if :only includes the cop 134s does not include them 134s when specifying `--disable-pending-cops` command-line option 134s does not include them 134s when specifying `NewCops: enable` option in .rubocop.yml 134s does not include them because command-line option takes precedence over .rubocop.yml 134s when specifying `NewCops: pending` option in .rubocop.yml 134s does not include them 134s when specifying `NewCops: enable` option in .rubocop.yml 134s includes them 134s when specifying `NewCops: disable` option in .rubocop.yml 134s does not include them 134s when specifying `--enable-pending-cops` command-line option 134s includes them 134s when specifying `NewCops: disable` option in .rubocop.yml 134s includes them because command-line option takes precedence over .rubocop.yml 134s #department? 134s returns true for department name 134s returns false for other names 134s #cops 134s exposes a list of cops 134s with cops having the same inner-most module 134s exposes both cops 134s #qualified_cop_name 134s emits a warning when namespace is incorrect 134s raises an error when a cop name is ambiguous 134s qualifies names with the correct namespace 134s returns the provided name if no namespace is found 134s qualifies names without a namespace 134s gives back already properly qualified names 134s when dismissing a cop class 134s allows re-listing 134s allows it if done rapidly 134s disallows it if done too late 134s #contains_cop_matching? 134s returns false for cops not included in the store 134s can find cops matching a given name 134s names_for_department 134s returns array of cops for specified department 134s 134s RuboCop::Cop::Style::CommandLiteral 134s %x commands with other delimiters than parentheses 134s registers an offense 134s when PercentLiteralDelimiters is configured and a default exists 134s ignores the default when autocorrecting 134s when EnforcedStyle is set to percent_x 134s a multi-line ` string without backticks 134s registers an offense and corrects to %x 134s a single-line %x string without backticks 134s is accepted 134s a single-line ` string with backticks 134s registers an offense without autocorrection 134s a single-line %x string with backticks 134s is accepted 134s a single-line ` string without backticks 134s registers an offense and corrects to %x 134s a multi-line ` string with backticks 134s registers an offense without autocorrection 134s a multi-line %x string without backticks 134s is accepted 134s a multi-line %x string with backticks 134s is accepted 134s when EnforcedStyle is set to mixed 134s a single-line %x string without backticks 134s registers an offense and corrects to backticks 134s a multi-line %x string without backticks 134s is accepted 134s a multi-line ` string without backticks 134s registers an offense and corrects to %x 134s a single-line ` string with backticks 134s registers an offense without autocorrection 134s when configured to allow inner backticks 134s is accepted 134s a multi-line ` string with backticks 134s registers an offense without autocorrection 134s a single-line %x string with backticks 134s is accepted 134s when configured to allow inner backticks 134s registers an offense without autocorrection 134s a single-line ` string without backticks 134s is accepted 134s a multi-line %x string with backticks 134s is accepted 134s heredoc commands 134s is ignored 134s when PercentLiteralDelimiters is configured with curly braces 134s respects the configuration when autocorrecting 134s when EnforcedStyle is set to backticks 134s a multi-line %x string with backticks 134s is accepted 134s when configured to allow inner backticks 134s registers an offense without autocorrection 134s a multi-line %x string without backticks 134s registers an offense and corrects to backticks 134s a multi-line ` string with backticks 134s registers an offense without autocorrection 134s when configured to allow inner backticks 134s is accepted 134s a single-line ` string with backticks 134s registers an offense without autocorrection 134s when configured to allow inner backticks 134s is accepted 134s a single-line %x string with backticks 134s is accepted 134s when configured to allow inner backticks 134s registers an offense without autocorrection 134s a single-line %x string without backticks 134s registers an offense and corrects to backticks 134s a single-line ` string without backticks 134s is accepted 134s a multi-line ` string without backticks 134s is accepted 134s when PercentLiteralDelimiters only has a default 134s respects the configuration when autocorrecting 134s 134s RuboCop::Cop::Utils::FormatString 134s finds the correct number of fields 134s #named_interpolation? 134s behaves like named format sequence 134s does not detect escaped named format sequence 134s detects named format sequence 134s behaves like named format sequence 134s does not detect escaped named format sequence 134s detects named format sequence 134s behaves like named format sequence 134s does not detect escaped named format sequence 134s detects named format sequence 134s behaves like named format sequence 134s detects named format sequence 134s does not detect escaped named format sequence 134s #valid? 134s returns true when there are only unnumbered formats 134s returns true when there are only named formats 134s returns true when there are only named with escaped `%` formats 134s returns false when there are numbered and named formats 134s returns false when there are unnumbered and numbered formats 134s returns false when there are unnumbered and named formats 134s returns true when there are only numbered formats 134s 134s RuboCop::Cop::Layout::AssignmentIndentation 134s allows a properly indented rhs with fullwidth characters 134s ignores comparison operators 134s registers an offense for incorrectly indented rhs when multiple assignment 134s registers an offense for incorrectly indented rhs whenmultiple assignment with line breaks on each line 134s registers an offense for multi-lhs 134s allows assignments that do not start on a newline 134s allows a properly indented rhs 134s registers an offense for incorrectly indented rhs 134s when indentation width is overridden for this cop only 134s autocorrects indentation 134s allows a properly indented rhs 134s 134s RuboCop::Cop::Cop 134s keeps track of offenses 134s initially has 0 offenses 134s will set custom severity if present 134s will warn if custom severity is invalid 134s will report registered offenses 134s will set default severity 134s with style cops 134s has right department 134s has right name 134s #safe_autocorrect? 134s when cop is declared unsafe 134s is expected to equal false 134s when safety is undeclared 134s is expected to equal true 134s when autocorrection of the cop is declared unsafe 134s is expected to equal false 134s when disabled by a comment 134s ignore_disable_comments is false 134s will set offense as disabled 134s ignore_disable_comments is true 134s will not set offense as disabled 134s .documentation_url 134s for a custom cop class 134s is expected to be nil 134s for a builtin cop class 134s is expected to eq "https://docs.rubocop.org/rubocop/cops_layout.html#layoutblockendnewline" 134s setting of Offense#corrected attribute 134s when cop supports autocorrection 134s when offense was corrected 134s is set to true 134s when autocorrection is not needed 134s is set to false 134s when offense was not corrected because of an error 134s is set to false 134s when cop does not support autocorrection 134s is not specified (set to nil) 134s when autocorrect is requested 134s is not specified (set to nil) 134s when disable_uncorrectable is enabled 134s is set to true 134s with no submodule 134s has right name 134s has right department 134s #autocorrect? 134s when the option is not given 134s is expected to equal false 134s when the option is given 134s is expected to equal true 134s when the cop is set to not autocorrect 134s is expected to equal false 134s when cop does not support autocorrection 134s is expected to equal false 134s when disable_uncorrectable is enabled 134s is expected to equal true 134s with lint cops 134s has right department 134s has right name 134s #relevant_file? 134s when the file doesn't match the Include configuration 134s is expected to equal false 134s when the file is an anonymous source 134s is expected to equal true 134s when the file matches the Include configuration 134s is expected to equal true 134s Registry 134s #departments 134s has departments 134s is expected to include :Style 134s contains every value only once 134s is expected to include :Lint 134s #with_department 134s has at least one cop per department 134s has each cop in exactly one type 134s returns 0 for an invalid type 134s for a cop with a name 134s registers offense with its name 134s .qualified_cop_name 134s returns the given cop name if it is not found in any namespace 134s raises an error if the cop name is in more than one namespace 134s adds namespace if the cop name is found in exactly one namespace 134s returns the given cop name if it already has a namespace 134s returns the given cop name if it already has a namespace even when the cop exists in multiple namespaces 134s returns the cop name in a different namespace if the provided namespace is incorrect 134s 134s RuboCop::ConfigRegeneration 134s #options 134s when there is a blank todo file 134s is expected to eq {:auto_gen_config=>true} 134s when no todo file exists 134s is expected to eq {:auto_gen_config=>true} 134s when the todo file is malformed 134s is expected to eq {:auto_gen_config=>true} 134s it parses options from the generation comment 134s is expected to eq {:auto_gen_config=>true, :auto_gen_only_exclude=>true, :auto_gen_timestamp=>false, :exclude_limit=>"100", :offense_counts=>false} 134s 134s RuboCop::Cop::Layout::SpaceAfterComma 134s inside hash braces 134s when EnforcedStyle for SpaceInsideBlockBraces is no_space 134s accepts no space between a comma and a closing brace 134s behaves like common behavior 134s accepts a space between a comma and a closing brace 134s when EnforcedStyle for SpaceInsideBlockBraces is space 134s registers an offense for no space between a comma and a closing brace 134s behaves like common behavior 134s accepts a space between a comma and a closing brace 134s array index commas without space 134s behaves like ends with an item 134s registers an offense and does autocorrection 134s behaves like trailing comma 134s accepts the last comma 134s block argument commas without space 134s behaves like trailing comma 134s accepts the last comma 134s behaves like ends with an item 134s registers an offense and does autocorrection 134s method call arg commas without space 134s behaves like ends with an item 134s registers an offense and does autocorrection 134s 134s RuboCop::Cop::AlignmentCorrector 134s #correct 134s simple indentation 134s with a positive column delta 134s indents 134s with a negative column delta 134s outdents 134s with large column deltas 134s with plain heredoc (<<) 134s behaves like heredoc indenter 134s does not change indentation of here doc bodies and end markers 134s with heredoc in backticks (<<``) 134s behaves like heredoc indenter 134s does not change indentation of here doc bodies and end markers 134s within string literals 134s does not insert whitespace 134s with single-line here docs 134s does not indent body and end marker 134s 134s RuboCop::Cop::Lint::FloatOutOfRange 134s does not register an offense for 0.0 134s does not register an offense for respectably sized floats 134s does not register an offense for tiny little itty bitty floats 134s on floats so close to zero that nobody can tell the difference 134s registers an offense 134s on whopping big floats which tip the scales 134s registers an offense 134s 134s RuboCop::Cop::Style::NumberedParameters 134s >= Ruby 2.7 134s EnforcedStyle: disallow 134s does an offense when using numbered parameters even with single-line blocks 134s EnforcedStyle: allow_single_line 134s does not register an offense when using numbered parameters with single-line blocks 134s registers an offense when using numbered parameters with multi-line blocks 134s 134s RuboCop::Cop::Style::StderrPuts 134s registers no offense when using `STDERR.puts` with no arguments 134s registers no offense when using `$stderr.puts` with no arguments 134s registers an offense when using `$stderr.puts('hello')` 134s registers an offense when using `STDERR.puts('hello')` 134s registers an offense when using `::STDERR.puts('hello')` 134s 134s RuboCop::Cop::Security::MarshalLoad 134s does not register an offense Marshal methods under another namespace 134s allows using dangerous Marshal methods for deep cloning 134s does not register an offense for Marshal.dump 134s registers an offense for using Marshal.restore 134s registers an offense for using Marshal.load 134s 134s RuboCop::Cop::Lint::SafeNavigationChain 134s TargetRubyVersion >= 2.3 134s accepts usages of safe navigation with self assignment method 134s accepts usages of method chain with safe navigation only 134s registers an offense for safe navigation on the right-hand side of the `/` 134s accepts usages of safe navigation with `present?` method 134s registers an offense for safe navigation with < operator 134s registers an offense for ordinary method call exists after safe navigation method call with an argument 134s registers an offense for safe navigation on the right-hand side of the `*` 134s registers an offense for safe navigation with >= operator 134s registers an offense for ordinary method chain exists after safe navigation method call with an argument 134s registers an offense for safe navigation with > operator 134s accepts usages of safe navigation with `nil?` method 134s accepts usages of safe navigation with | operator 134s accepts usages of method chain with safe navigation only with argument 134s accepts usages of safe navigation with `-@` method 134s accepts usages of safe navigation with `blank?` method 134s accepts usages of safe navigation with `in?` method 134s accepts usages of ordinary method chain 134s accepts usages of safe navigation with assignment method 134s accepts usages of safe navigation with `+@` method 134s registers an offense for ordinary method call exists after safe navigation method call 134s registers an offense for safe navigation with [] operator 134s accepts usages of safe navigation at last only 134s accepts usages of safe navigation with || operator 134s registers an offense for safe navigation on the right-hand side of the `-` 134s accepts usages of ordinary method chain with argument 134s registers an offense for safe navigation with []= operator 134s registers an offense for ordinary method chain exists after safe navigation method call with a block 134s accepts usages of safe navigation with === operator 134s registers an offense for ordinary method chain exists after safe navigation method call 134s registers an offense for safe navigation on the right-hand side of the `+` 135s registers an offense for safe navigation with <= operator 135s registers an offense for safe navigation with + operator 135s registers an offense for ordinary method chain exists after safe navigation method call with a block-pass 135s accepts usages of safe navigation at last only with argument 135s accepts usages of safe navigation with & operator 135s accepts usages of safe navigation with && operator 135s accepts usages of safe navigation with == operator 135s accepts usages of safe navigation with `to_d` method 135s accepts usages of safe navigation with `try` method 135s proper highlighting 135s when there are methods before 135s when used with a modifier if 135s when in a begin 135s when there are methods after 135s when in a method 135s >= Ruby 2.7 135s registers an offense for ordinary method chain exists after safe navigation method call with a block using numbered parameter 135s 135s RuboCop::Cop::Lint::RedundantWithObject 135s registers an offense and corrects when using `ary.each.with_object([]) { |v| v }` 135s an object is used as a block argument 135s registers an offense and corrects when using ary.each_with_object([]) do-end block 135s registers an offense and corrects when using `ary.each_with_object { |v| v }` 135s registers an offense and corrects when using ary.each_with_object do-end block without parentheses 135s Ruby 2.7 135s registers an offense and corrects when using `ary.each.with_object([]) { _1 }` 135s registers an offense and corrects when using `ary.each_with_object { _1 }` 135s when missing argument to `each_with_object` 135s does not register an offense when block has 2 arguments 135s does not register an offense when block has 1 argument 135s 135s RuboCop::Cop::Lint::Loop 135s accepts loop/break if 135s registers an offense for begin/end/until 135s accepts loop/break unless 135s registers an offense and corrects for begin/end/while 135s 135s RuboCop::Cop::Style::SingleArgumentDig 135s >= Ruby 2.7 135s when using dig with arguments forwarding 135s does not register an offense 135s dig over a variable as caller 135s with multiple arguments 135s does not register an offense 135s with single argument 135s registers an offense and corrects unsuitable use of dig 135s when using dig with splat operator 135s does not register an offense 135s when using multiple `dig` in a method chain 135s registers and corrects an offense 135s when without a receiver 135s does not register an offense 135s dig over literal 135s with multiple arguments 135s does not register an offense 135s with single argument 135s registers an offense and corrects unsuitable use of dig 135s when using dig with splat operator 135s does not register an offense 135s 135s RuboCop::Cop::Lint::NonAtomicFileOperation 135s does not register an offense when use `FileTest.exist?` before remove recursive file 135s registers an offense when use `FileTest.exist?` before remove file 135s registers an offense when use `FileTest.exist?` before force creating file 135s registers an offense when use `FileTest.exist?` before force creating file 135s does not register an offense when not a method of file operation 135s registers an offense when use `FileTest.exist?` before remove file 135s does not register an offense when using `FileTest.exist?` with `if` condition that has `else` branch 135s registers an offense when use `FileTest.exist?` before remove file 135s does not register an offense when not an exist check 135s registers an offense when use file existence checks `unless` by postfix before creating file 135s registers an offense when use `FileTest.exist?` before force remove file 135s registers an offense when use `FileTest.exist?` before remove file 135s does not register an offense when using complex conditional with `||` 135s registers an offense when use `FileTest.exist?` before remove file 135s registers an offense when use `FileTest.exist?` before creating file with an option `force: true` 135s registers an offense when use `FileTest.exist?` before remove file 135s registers an offense when use `FileTest.exist?` with negated `if` before creating file 135s registers an offense when use `FileTest.exist?` before remove file 135s registers an offense when use `FileTest.exist?` before force creating file 135s does not register an offense when use `FileTest.exist?` before creating file with an option `force: false` 135s does not register an offense when use `FileTest.exist?` before remove recursive file 135s registers an offense when use `FileTest.exist?` before creating file 135s does not register an offense when not checking for the existence 135s registers an offense when use `FileTest.exist?` before force remove file 135s registers an offense when use `FileTest.exist?` before remove file 135s does not register an offense when using complex conditional with `&&` 135s registers an offense when using `FileTest.exist?` as a condition for `elsif` 135s does not register an offense when processing other than file operations 135s registers an offense when use file existence checks `if` by postfix before removing file 135s does not register an offense when checking for the existence of different files 135s registers an offense when use `FileTest.exist?` before creating file with an option not `force` 135s registers an offense when use `FileTest.exist?` before remove file 135s registers an offense when use `FileTest.exists?` before creating file 135s registers an offense when use `FileTest.exist?` before remove file 135s 135s RuboCop::Cop::Lint::NumberConversion 135s AllowedPatterns 135s does not register an offense for an allowed method 135s registers an offense for other methods 135s to_method in symbol form 135s registers offense and autocorrects without parentheses 135s does not register an offense when using `Complex` constructor 135s registers offense with try 135s does not register an offense when using `Float` constructor 135s registers an offense when using nested number conversion methods 135s registers offense and autocorrects 135s does not register an offense when using `Integer` constructor 135s registers offense with send 135s registers an offense 135s when using `#to_i` 135s when `#to_i` called on a variable on a hash 135s when using `#to_f` for number literals 135s when using `#to_c` for number literals 135s when using `#to_r` 135s when `#to_i` called on a variable 135s when using `#to_r` for number literals 135s when `#to_i` called on a hash value 135s when using `#to_f` 135s when `#to_i` called on a variable on a array 135s when using `#to_i` for number literals 135s when using `#to_c` 135s AllowedMethods 135s does not register an offense for an allowed method 135s registers an offense for other methods 135s does not register an offense 135s when using Integer() with integer 135s when using Float() 135s when using Complex() 135s when `#to_i` called without a receiver 135s when `:to_f` is one of multiple method arguments 135s IgnoredClasses 135s when using DateTime 135s when using Time 135s when using Time/DateTime with multiple method calls 135s 135s RuboCop::Cop::Layout::FirstParameterIndentation 135s consistent style 135s invalid indentation on multi-line defs 135s normal arguments 135s registers an offense and corrects incorrectly indented first element 135s hash arguments 135s registers an offense and corrects incorrectly indented first element 135s hash arguments static method def 135s registers an offense and corrects incorrectly indented first element 135s valid indentation on static multi-line defs 135s accepts correctly indented first element 135s accepts correctly indented first element hash 135s single line method defs 135s ignores with hash args 135s ignores 135s no paren method defs 135s ignores 135s ignores with hash args 135s valid indentation on multi-line defs 135s accepts correctly indented first element 135s accepts correctly indented first element hash 135s align_parentheses style 135s valid indentation on multi-line defs 135s accepts correctly indented first element hash 135s accepts correctly indented first element 135s no paren method defs 135s ignores 135s ignores with hash args 135s invalid indentation on multi-line defs 135s hash arguments static def 135s registers an offense and corrects incorrectly indented first element 135s hash arguments 135s registers an offense and corrects incorrectly indented first element 135s normal arguments 135s registers an offense and corrects incorrectly indented first element 135s single line method defs 135s ignores with hash args 135s ignores 135s 135s RuboCop::Cop::Style::MapToHash 135s >= Ruby 2.6 135s when the receiver is an hash 135s registers an offense and corrects 135s `map` and `collect.to_h` with newlines 135s registers an offense and corrects with newline removal 135s when the receiver is an hash 135s registers an offense and corrects 135s `collect.to_h` with a block on `to_h` 135s registers an offense but does not correct 135s `map` and `map.to_h` with newlines 135s registers an offense and corrects with newline removal 135s for `collect.to_h` with block arity 1 135s registers an offense and corrects 135s when chained further 135s registers an offense and corrects 135s for `collect.to_h` with block arity 2 135s registers an offense and corrects 135s `map.to_h` with a block on `to_h` 135s registers an offense but does not correct 135s when chained further 135s registers an offense and corrects 135s when the receiver is an array 135s registers an offense and corrects 135s when the receiver is an array 135s registers an offense and corrects 135s `map` without `to_h` 135s does not register an offense 135s for `map.to_h` with block arity 1 135s registers an offense and corrects 135s `collect` without `to_h` 135s does not register an offense 135s for `map.to_h` with block arity 2 135s registers an offense and corrects 135s 135s RuboCop::Cop::Style::OperatorMethodCall 135s does not register an offense when using `foo + bar` 135s does not register an offense when using `foo.-@bar` 135s registers an offense when chaining `foo.bar.&(baz).round(2)` 135s registers an offense when chaining `foo.bar.!(baz).round(2)` 135s does not register an offense when using `foo / bar` 135s registers an offense when using `foo.~ bar` 135s registers an offense when using `foo.* bar` 135s registers an offense when using `foo.** bar` 135s does not register an offense when using `Foo.+(bar)` 135s registers an offense when using `foo./(bar)` 135s registers an offense when chaining `foo.bar.*(baz).round(2)` 135s registers an offense when chaining `foo.bar.!~(baz).round(2)` 135s registers an offense when using `foo.!~ bar` 135s registers an offense when chaining `foo.bar.-(baz).round(2)` 135s registers an offense when using `foo.== bar` 135s registers an offense when using `foo.<<(bar)` 135s registers an offense when using `foo.^ bar` 135s registers an offense when chaining `foo.bar.~(baz).round(2)` 135s registers an offense when using `foo.& bar` 135s registers an offense when using `foo.!=(bar)` 135s does not register an offense when using `foo.~@bar` 135s does not register an offense when using `foo >> bar` 135s does not register an offense when using `foo | bar` 135s does not register an offense when using `foo ~ bar` 135s does not register an offense when using `obj.!` 135s registers an offense when chaining `foo.bar.>=(baz).round(2)` 135s registers an offense when using `foo.!(bar)` 135s registers an offense when using `foo.<=(bar)` 135s does not register an offense when using `foo < bar` 135s registers an offense when chaining `foo.bar.>(baz).round(2)` 135s registers an offense when using `foo.=~ bar` 135s registers an offense when chaining `foo.bar.===(baz).round(2)` 135s registers an offense when using `foo.+(bar)` 135s does not register an offense when using `foo.!@bar` 135s registers an offense when using `foo.=~(bar)` 135s registers an offense when using `foo.**(bar)` 135s does not register an offense when using `foo > bar` 135s registers an offense when using `foo.!= bar` 135s does not register an offense when using `foo ! bar` 135s does not register an offense when using `foo != bar` 135s registers an offense when using `foo.~(bar)` 135s registers an offense when chaining `foo.bar.=~(baz).round(2)` 135s registers an offense when using `foo.<= bar` 135s registers an offense when chaining `foo.bar.<<(baz).round(2)` 135s registers an offense when chaining `foo.bar.!=(baz).round(2)` 135s registers an offense when using `foo.<=> bar` 135s registers an offense when using `foo.< bar` 135s registers an offense when using `foo.!~(bar)` 135s registers an offense when chaining `foo.bar.^(baz).round(2)` 135s registers an offense when using `foo.-(bar)` 135s registers an offense when using `foo.! bar` 135s registers an offense when using `foo.>>(bar)` 135s registers an offense when using `foo.>= bar` 135s does not register an offense when using `foo % bar` 135s registers an offense when chaining `foo.bar.**(baz).round(2)` 135s does not register an offense when using `foo >= bar` 135s registers an offense when using `foo.===(bar)` 135s registers an offense when chaining `foo.bar.+(baz).round(2)` 135s does not register an offense when using `foo =~ bar` 135s registers an offense when using `foo.%(bar)` 135s does not register an offense when using `foo ^ bar` 135s registers an offense when using `foo.<(bar)` 135s registers an offense when using `foo.>=(bar)` 135s registers an offense when using `foo.<=>(bar)` 135s registers an offense when using `foo.>(bar)` 135s registers an offense when chaining `foo.bar.==(baz).round(2)` 135s registers an offense when chaining `foo.bar.<(baz).round(2)` 135s registers an offense when using `foo.+ bar` 135s registers an offense when chaining `foo.bar.>>(baz).round(2)` 136s does not register an offense when using `foo - bar` 136s does not register an offense when using `foo == bar` 136s registers an offense when using `foo.&(bar)` 136s registers an offense when using `foo.>> bar` 136s registers an offense when chaining `foo.bar.|(baz).round(2)` 136s does not register an offense when using `foo << bar` 136s registers an offense when using `foo.^(bar)` 136s registers an offense when using `foo.=== bar` 136s registers an offense when chaining `foo.bar.<=>(baz).round(2)` 136s does not register an offense when using `foo ** bar` 136s does not register an offense when using `foo.`bar` 136s registers an offense when using `foo.|(bar)` 136s does not register an offense when using `foo.+@bar.to_s` 136s registers an offense when using `foo.> bar` 136s does not register an offense when using `foo <= bar` 136s registers an offense when using `foo.- bar` 136s registers an offense when using `foo.% bar` 136s registers an offense when chaining `foo.bar./(baz).round(2)` 136s does not register an offense when using `foo === bar` 136s does not register an offense when using `foo.+@bar` 136s does not register an offense when using `foo * bar` 136s registers an offense when chaining `foo.bar.<=(baz).round(2)` 136s does not register an offense when using `foo !~ bar` 136s registers an offense when using `foo./ bar` 136s registers an offense when using `foo.==(bar)` 136s registers an offense when using `foo.*(bar)` 136s does not register an offense when using `foo <=> bar` 136s registers an offense when using `foo.<< bar` 136s registers an offense when chaining `foo.bar.%(baz).round(2)` 136s does not register an offense when using `foo & bar` 136s registers an offense when using `foo.| bar` 136s 136s RuboCop::Cop::Style::ZeroLengthPredicate 136s with hashes 136s registers an offense for `0 == hash.size 136s registers an offense for `hash.size != 0` 136s registers an offense for `0 != hash.size` 136s registers an offense for `hash.size == 0` 136s when inspecting a File::Stat object 136s does not register an offense 136s does not register an offense with ::File 136s when inspecting a Tempfile object 136s does not register an offense with top-level ::Tempfile 136s does not register an offense 136s with strings 136s registers an offense for `string.size != 0` 136s registers an offense for `0 == string.size` 136s registers an offense for `0 != string.size` 136s registers an offense for `string.size == 0` 136s with collection variables 136s registers an offense for `collection.size == 0` 136s registers an offense for `0 != collection.size` 136s registers an offense for `collection.size != 0` 136s registers an offense for `0 == collection.size` 136s when inspecting a StringIO object 136s when initialized with a string 136s does not register an offense 136s does not register an offense with top-level ::StringIO 136s when initialized without arguments 136s does not register an offense with top-level ::StringIO 136s does not register an offense 136s with arrays 136s registers an offense for `array.length != 0` 136s registers an offense for `array.size != 0` 136s registers an offense for `0 < array.size` 136s registers an offense for `array.length == 0` 136s registers an offense for `0 == array.length` 136s registers an offense for `0 != array.length` 136s registers an offense for `0 < array.length 136s registers an offense for `0 != array.size` 136s registers an offense for `1 > array.length` 136s registers an offense for `array.length > 0` 136s registers an offense for `array.size == 0` 136s registers an offense for `array.length < 1` 136s registers an offense for `1 > array.size` 136s registers an offense for `array.size > 0` 136s registers an offense for `array.size < 1` 136s registers an offense for `0 == array.size` 136s when name of the variable is `size` or `length` 136s accepts equality check 136s accepts inequality check 136s accepts comparison 136s 136s RuboCop::Cop::Naming::AsciiIdentifiers 136s when AsciiConstants is false 136s does not get confused by an empty file 136s accepts identifiers with only ascii chars 136s registers an offense for a variable name with non-ascii chars 136s accepts constants with only ascii chars 136s does not get confused by a byte order mark 136s registers an offense for a variable name with mixed chars 136s when AsciiConstants is true 136s registers an offense for a constant name with non-ascii chars 136s does not get confused by an empty file 136s registers an offense for a variable name with non-ascii chars 136s does not get confused by a byte order mark 136s accepts identifiers with only ascii chars 136s registers an offense for a variable name with mixed chars 136s 136s RuboCop::Cop::Style::DoubleNegation 136s when `EnforcedStyle: forbidden` 136s registers an offense and corrects for `!!` when using `return` keyword 136s registers an offense and corrects for `!!` when return location 136s does not register an offense for `not not` 136s registers an offense and corrects for `!!` when not a return location 136s registers an offense and corrects for `!!` 136s does not register an offense for ! 136s registers an offense for `!!` when return location and using `ensure` 136s registers an offense for `!!` when return location and using `rescue` and `ensure` 136s registers an offense for `!!` when return location and using `rescue` 136s registers an offense for `!!` when return location and using `rescue`, `else`, and `ensure` 136s when `EnforcedStyle: allowed_in_returns` 136s registers an offense and corrects for `!!` with multi-line array at return location 136s does not register an offense for `!!` with hash when return location and using `if`, `elsif`, and `else` 136s does not register an offense for `not not` 136s registers an offense and corrects for `!!` 136s registers an offense and corrects for `!!` when not return locationand using `case`, `when`, and `else` 136s does not register an offense for `!!` when return location and using `if`, `elsif`, and `else` 136s registers an offense and corrects for `!!` with nested hash at return location 136s does not register an offense for `!!` when return location by `define_method` 136s does not register an offense for `!!` when return location and using `rescue` 136s does not register an offense for `!!` with array when return location and using `if`, `elsif`, and `else` 136s registers an offense and corrects for `!!` when not return location and using `unless` 136s does not register an offense for `!!` with array when return location and using `case`, `when`, and `else` 136s registers an offense and corrects for `!!` with hash when not return locationand using `if`, `elsif`, and `else` 136s registers an offense and corrects for `!!` with multi-line hash at return location 136s registers an offense and corrects for `!!` with single-line hash at return location 136s registers an offense and corrects for `!!` with single-line array at return location 136s does not register an offense for `!!` when using `return` keyword 136s registers an offense and corrects for `!!` with array when not return locationand using `if`, `elsif`, and `else` 136s registers an offense and corrects for `!!` with hash when not return locationand using `case`, `when`, and `else` 136s does not register an offense for `!!` when return location and using `rescue` and `ensure` 136s does not register an offense for `!!` when return location by `define_singleton_method` 136s registers an offense and corrects for `!!` with complex array at return location 136s does not register an offense for `!!` when return location 136s registers an offense and corrects for `!!` with nested array at return location 136s does not register an offense for `!!` when return location and using `unless` 136s registers an offense and corrects for `!!` when not a return location 136s registers an offense and corrects for `!!` when not return locationand using `if`, `elsif`, and `else` 136s does not register an offense for ! 136s does not register an offense for `!!` when return location and using `ensure` 136s registers an offense and corrects for `!!` with array when not return locationand using `case`, `when`, and `else` 136s does not register an offense for `!!` with hash when return location and using `case`, `when`, and `else` 136s does not register an offense for `!!` when return location and using `rescue`, `else`, and `ensure` 136s does not register an offense for `!!` when return location and using `case`, `when`, and `else` 136s Ruby >= 2.7 136s does not register an offense for `!!` when return location and using `case`, `in`, and `else` 136s Ruby >= 2.7 136s registers an offense and corrects for `!!` when not return locationand using `case`, `in`, and `else` 136s 136s RuboCop::Cop::Style::HashExcept 136s does not register an offense when using `select` and comparing with `lvar == :key` 136s does not register an offense when using `Hash#except` 136s does not register an offense when not using block` 136s does not register an offense when using `reject` and comparing with `:key != lvar` 136s does not register an offense when using `reject` and comparing with `lvar != :key` 136s does not register an offense when not using key block argument` 136s does not register an offense when using `reject` and `include?` 136s does not register an offense when using `select` and comparing with `:key == lvar` 136s Ruby 3.0 or higher 136s registers and corrects an offense when using `reject` and comparing with `lvar == 'str'` 136s registers and corrects an offense when using `reject` and comparing with `:sym == lvar` 136s does not register an offense when using `keep_if` and comparing with `lvar != :sym` 136s registers and corrects an offense when using `select` and comparing with `:sym != lvar` 136s does not register an offense when using `delete_if` and comparing with `lvar == :sym` 136s does not register an offense when using `reject` and other than comparison by string and symbol using `==` 136s registers and corrects an offense when using `select` and comparing with `lvar != :sym` 136s registers and corrects an offense when using `reject` and other than comparison by string and symbol using `eql?` 136s registers and corrects an offense when using `filter` and comparing with `lvar != :sym` 136s registers and corrects an offense when using `reject` and comparing with `lvar == :sym` 136s does not register an offense when comparing with hash value 136s using `in?` 136s does not register offenses when using `reject` and calling `key.in?` method with symbol array 136s using `exclude?` 136s does not register offenses when using `reject` and calling `!exclude?` method with symbol array 136s when `AllCops/ActiveSupportExtensionsEnabled: true` 136s registers and corrects an offense when using `select` and comparing with `:sym != lvar` 136s does not register an offense when using `keep_if` and comparing with `lvar != :sym` 136s registers and corrects an offense when using `reject` and comparing with `lvar == :sym` 136s registers and corrects an offense when using `select` and comparing with `lvar != :sym` 136s registers and corrects an offense when using `reject` and other than comparison by string and symbol using `eql?` 136s does not register an offense when using `reject` and other than comparison by string and symbol using `==` 136s registers and corrects an offense when using `filter` and comparing with `lvar != :sym` 136s does not register an offense when using `delete_if` and comparing with `lvar == :sym` 136s registers and corrects an offense when using `reject` and comparing with `lvar == 'str'` 136s registers and corrects an offense when using `reject` and comparing with `:sym == lvar` 136s does not register an offense when comparing with hash value 136s using `include?` 136s registers and corrects an offense when using `reject` and calling `include?` method with symbol array 136s registers and corrects an offense when using `reject` and calling `include?` method with dynamic string array 136s registers and corrects an offense when using `filter` and calling `!include?` method with symbol array 136s registers and corrects an offense when using `reject` and calling `include?` method with variable 136s registers and corrects an offense when using `select` and calling `!include?` method with symbol array 136s registers and corrects an offense when using `reject` and calling `include?` method with dynamic symbol array 136s registers and corrects an offense when using `reject` and calling `include?` method with method call 136s using `exclude?` 136s does not register an offense when using `reject` and calling `exclude?` method with symbol array and second block value 136s registers and corrects an offense when using `reject` and calling `!exclude?` method with variable 136s registers and corrects an offense when using `reject` and calling `!exclude?` method with method call 136s registers and corrects an offense when using `filter` and calling `exclude?` method with symbol array 136s registers and corrects an offense when using `select` and calling `exclude?` method with symbol array 136s registers and corrects an offense when using `reject` and calling `!exclude?` method with dynamic symbol array 136s registers and corrects an offense when using `reject` and calling `!exclude?` method with dynamic string array 136s registers and corrects an offense when using `reject` and calling `!exclude?` method with symbol array 136s using `in?` 136s does not register an offense when using `reject` and calling `in?` method with symbol array and second block value 136s registers and corrects an offense when using `reject` and calling `key.in?` method with method call 136s registers and corrects an offense when using `reject` and calling `key.in?` method with variable 136s registers and corrects an offense when using `reject` and calling `key.in?` method with symbol array 136s registers and corrects an offense when using `select` and calling `!key.in?` method with symbol array 136s registers and corrects an offense when using `filter` and calling `!key.in?` method with symbol array 136s registers and corrects an offense when using `reject` and calling `key.in?` method with dynamic symbol array 136s registers and corrects an offense when using `reject` and calling `key.in?` method with dynamic string array 136s using `include?` 136s registers and corrects an offense when using `reject` and calling `include?` method with symbol array 136s registers and corrects an offense when using `select` and calling `!include?` method with symbol array 136s does not register an offense when using `reject` and calling `include?` method with symbol array and second block value 136s registers and corrects an offense when using `reject` and calling `include?` method with dynamic symbol array 136s registers and corrects an offense when using `reject` and calling `include?` method with dynamic string array 136s registers and corrects an offense when using `reject` and calling `include?` method with variable 136s registers and corrects an offense when using `reject` and calling `include?` method with method call 136s registers and corrects an offense when using `filter` and calling `!include?` method with symbol array 136s Ruby 2.7 or lower 136s does not register an offense when using `select` and comparing with `:key != lvar` 136s does not register an offense when using `reject` and comparing with `:key == lvar` 136s does not register an offense when using `reject` and comparing with `lvar == :key` 136s does not register an offense when using `select` and comparing with `lvar != :key` 136s 136s RuboCop::Cop::Style::Sample 136s behaves like offense 136s registers an offense for shuffle.slice(-1) 136s behaves like accepts 136s accepts shuffle[2..-3] 136s behaves like accepts 136s accepts shuffle[foo..3] 136s behaves like accepts 136s accepts shuffle.at(2) 136s behaves like accepts 136s accepts shuffle[3, 3] 136s behaves like offense 136s registers an offense for shuffle.slice(0...3) 136s behaves like offense 136s registers an offense for shuffle.first 136s behaves like offense 136s registers an offense for shuffle(random: Random.new).first(2) 136s behaves like accepts 136s accepts shuffle.slice(foo, 3) 136s behaves like accepts 136s accepts sample 136s behaves like accepts 136s accepts shuffle.slice(foo..3) 136s behaves like accepts 136s accepts shuffle[foo] 136s behaves like offense 136s registers an offense for shuffle.at(0) 136s behaves like accepts 136s accepts shuffle.slice(-4..-3) 136s behaves like offense 136s registers an offense for shuffle[0...3] 136s behaves like accepts 136s accepts shuffle.slice(3, 3) 136s behaves like accepts 136s accepts shuffle.at(foo) 136s behaves like accepts 136s accepts shuffle.slice(2) 136s behaves like accepts 136s accepts shuffle.slice(foo..bar) 136s behaves like accepts 136s accepts shuffle[foo, 3] 136s behaves like accepts 136s accepts shuffle.slice(foo) 136s behaves like offense 136s registers an offense for shuffle.first(2) 136s behaves like accepts 136s accepts shuffle.slice(2..-3) 136s behaves like offense 136s registers an offense for shuffle[-1] 136s behaves like offense 136s registers an offense for shuffle.slice(0) 136s behaves like accepts 136s accepts shuffle[foo..bar] 136s behaves like offense 137s registers an offense for shuffle.last(bar) 137s Ruby >= 2.7 137s behaves like offense 137s registers an offense for shuffle[...3] 137s behaves like offense 137s registers an offense for shuffle(random: Random.new)[0..3] 137s behaves like accepts 137s accepts shuffle[-4..-3] 137s behaves like offense 137s registers an offense for shuffle.last 137s behaves like offense 137s registers an offense for shuffle(random: foo).last(bar) 137s behaves like offense 137s registers an offense for shuffle(random: Random.new).first 137s behaves like offense 137s registers an offense for shuffle.first(foo) 137s behaves like accepts 137s accepts shuffle[foo, bar] 137s behaves like offense 137s registers an offense for shuffle.slice(0..3) 137s behaves like offense 137s registers an offense for shuffle[0, 3] 137s behaves like offense 137s registers an offense for shuffle.last(3) 137s behaves like offense 137s registers an offense for shuffle.slice(0, 3) 137s behaves like accepts 137s accepts shuffle[2..3] 137s behaves like accepts 137s accepts shuffle(random: Random.new) 137s behaves like accepts 137s accepts shuffle(random: Random.new).find(&:odd?) 137s behaves like offense 137s registers an offense for shuffle[0..3] 137s behaves like accepts 137s accepts shuffle[2] 137s behaves like accepts 137s accepts shuffle(random: Random.new)[2] 137s behaves like offense 137s registers an offense for shuffle.at(-1) 137s behaves like accepts 137s accepts shuffle 137s behaves like offense 137s registers an offense for shuffle[0] 137s behaves like accepts 137s accepts shuffle(random: Random.new)[2, 3] 137s behaves like accepts 137s accepts shuffle.slice(2..3) 137s behaves like accepts 137s accepts shuffle.slice(foo, bar) 137s Ruby >= 2.6 137s behaves like accepts 137s accepts shuffle[3..] 137s behaves like accepts 137s accepts shuffle[3...] 137s behaves like accepts 137s accepts shuffle.join([5, 6, 7]) 137s behaves like accepts 137s accepts shuffle.map { |e| e } 137s 137s RuboCop::Cop::Naming::AccessorMethodName 137s accepts method set_something with kwarg 137s accepts method set_something with kwrestarg 137s accepts method set_something with no args 137s registers an offense for singleton method set_something with one args 137s accepts method set_something with restarg 137s accepts method get_something with args 137s accepts method set_something with optarg 137s accepts singleton method set_something with no args 137s accepts method set_something with kwoptarg 137s accepts singleton method get_something with args 137s registers an offense for singleton method get_something with no args 137s registers an offense for method set_something with one arg 137s registers an offense for method get_something with no args 137s accepts method set_something with blockarg 137s accepts singleton method set_something with two args 137s accepts method set_something with two args 137s >= Ruby 2.7 137s accepts method set_something with arguments forwarding 137s 137s RuboCop::Cop::Style::RedundantPercentQ 137s accepts %Q at the beginning of a double quoted string with interpolation 137s accepts %q at the beginning of a double quoted string with interpolation 137s accepts %q containing string interpolation 137s accepts a heredoc string that contains %q 137s accepts %q at the beginning of a section of a double quoted string with interpolation 137s accepts %Q at the beginning of a section of a double quoted string with interpolation 137s with %q strings 137s registers an offense for no quotes 137s registers an offense for a string containing escaped backslashes 137s registers an offense for only double quotes 137s registers an offense for only single quotes 137s accepts a string with escaped backslash and non-backslash characters 137s accepts regular expressions starting with %q 137s accepts a string with escaped non-backslash characters 137s autocorrects for strings that are concatenated with backslash 137s accepts a string with single quotes and double quotes 137s with %Q strings 137s registers an offense for dynamic string without quotes 137s accepts a string with double quotes and an escaped normal character 137s autocorrects for strings that are concatenated with backslash 137s accepts a dynamic %Q string with double quotes 137s registers an offense for static string with only double quotes 137s accepts regular expressions starting with %Q 137s accepts a string with double quotes and an escaped special character 137s accepts a string with single quotes and double quotes 137s registers an offense for static string without quotes 137s 137s RuboCop::Cop::Migration::DepartmentName 137s when a disable comment has cop names with departments 137s accepts 137s when a disable comment contains a plain comment 137s accepts 137s when an unexpected disable comment format 137s does not register an offense 137s when only department name has given 137s does not register an offense 137s when a disable comment contains an unexpected character for department name 137s accepts 137s when todo/enable comments have cop names without departments 137s registers offenses and corrects 137s registers offenses and corrects when there is space around `:` 137s registers offenses and corrects when using a legacy cop name 137s 137s RuboCop::Cop::Lint::MissingCopEnableDirective 137s when the maximum range size is infinite 137s registers an offense when a department is disabled and never re-enabled 137s does not register an offense when the disable cop is re-enabled 137s registers an offense when a cop is disabled and never re-enabled 137s does not register an offense when the disable department is re-enabled 137s when the cop is disabled in the config 137s reports no offense when re-disabling it until EOF 137s when the maximum range size is finite 137s does not register an offense when the disable department is re-enabled within the limit 137s registers an offense when a cop is disabled for too many lines 137s does not register an offense when the disable cop is re-enabled within the limit 137s registers an offense when a cop is disabled and never re-enabled 137s registers an offense when a department is disabled for too many lines 137s registers an offense when a department is disabled and never re-enabled 137s 137s RuboCop::Cop::Lint::Void 137s registers an offense for void op / if not on last line 137s accepts void op / by itself without a begin block 137s registers an offense for void var var if not on last line 137s registers an offense for void op != if not on last line 137s accepts short call syntax 137s accepts void op % if on last line 137s accepts method with irange block 137s accepts void op - by itself without a begin block 137s registers an offense for void lit 1 if not on last line 137s accepts void unary op ! by itself without a begin block 137s registers two offenses for void literals in a `for` 137s registers two offenses for void literals in a setter method 137s registers an offense for void lit {} if not on last line 137s registers an offense for void unary op ! if not on last line 137s registers an offense for void op <=> if not on last line 137s registers two offenses for void literals in `#tap` method 137s registers an offense for void lit :test if not on last line 137s registers an offense for void op - if not on last line 137s registers an offense for void op > if not on last line 137s registers an offense for void literal in a method definition 137s registers an offense for void op + if not on last line 137s registers an offense for void var @@var if not on last line 137s registers an offense for void op % if not on last line 137s accepts empty block 137s accepts void op <=> by itself without a begin block 137s handles `#each` block with single expression 137s handles explicit begin blocks 137s accepts void op < by itself without a begin block 137s accepts void op * if on last line 137s accepts void op <= if on last line 137s registers an offense for void `self` if not on last line 137s accepts void unary op + if on last line 137s accepts void unary op ! if on last line 137s accepts backtick commands 137s accepts void op == by itself without a begin block 137s registers an offense for void sign op + if not on last line 137s accepts void unary op - by itself without a begin block 137s accepts void unary op + by itself without a begin block 137s accepts void op != by itself without a begin block 137s accepts void op >= by itself without a begin block 137s registers two offenses for void literals in an initialize method 137s accepts void op % by itself without a begin block 137s registers two offenses for void literals in a `#each` method 137s registers an offense for void op >= if not on last line 137s accepts void op <= by itself without a begin block 137s registers an offense for void op == if not on last line 137s registers an offense for void sign op - if not on last line 137s registers an offense for void var @var if not on last line 137s accepts void op >= if on last line 137s accepts void op < if on last line 137s registers an offense for void op < if not on last line 137s registers an offense for void op === if not on last line 137s accepts percent-x commands 137s registers an offense for void lit 2.0 if not on last line 137s registers an offense for void var VAR if not on last line 137s accepts void op > by itself without a begin block 137s registers an offense for void op <= if not on last line 137s registers an offense for void op * if not on last line 137s registers an offense for void `defined?` if not on last line 137s accepts void unary op ~ if on last line 137s registers an offense for void lit [1] if not on last line 137s accepts method with erange block 137s accepts void op > if on last line 137s accepts void op === by itself without a begin block 137s accepts void unary op - if on last line 137s accepts void op === if on last line 137s registers an offense for void var $var if not on last line 137s accepts void op / if on last line 137s accepts void op + by itself without a begin block 137s registers an offense for void unary op ~ if not on last line 137s accepts void op == if on last line 137s accepts void unary op ~ by itself without a begin block 137s accepts void op + if on last line 137s accepts void op != if on last line 137s accepts void op * by itself without a begin block 137s accepts void op <=> if on last line 137s accepts void op - if on last line 137s registers an offense for void lit /test/ if not on last line 137s when checking for methods with no side effects 137s registers an offense if not on last line 137s registers an offense for chained methods 137s when not checking for methods with no side effects 137s does not register an offense for void nonmutating methods 137s Ruby 2.7 137s registers two offenses for void literals in `#tap` method 137s 137s RuboCop::Cop::Lint::RedundantRequireStatement 137s registers an offense when using requiring `enumerator` in condition 137s registers an offense when using requiring `enumerator` 137s registers an offense when using requiring `enumerator` with modifier form 137s target ruby version <= 2.1 138s does not register an offense when using requiring `rational`, `complex` 138s target ruby version < 3.1 138s does not register an offense and corrects when using requiring `fiber` 138s target ruby version >= 2.1 138s register an offense and corrects when using requiring `thread` or already redundant features 138s target ruby version >= 2.2 138s registers an offense when using requiring `rational`, `complex` 138s target ruby version <= 2.4 138s does not register an offense when using requiring `pp` 138s target ruby version <= 2.0 138s does not register an offense when using requiring `thread` 138s target ruby version >= 2.5 138s register an offense and corrects when using requiring `pp` or already redundant features 138s target ruby version >= 2.7 138s registers an offense when using requiring `ruby2_keywords` or already redundant features 138s target ruby version >= 3.1 138s registers an offense and corrects when using requiring `fiber` or already redundant features 138s target ruby version >= 3.2 138s registers an offense and corrects when using requiring `set` 138s target ruby version <= 2.6 138s does not register an offense when using requiring `ruby2_keywords` 138s 138s RuboCop::Cop::Style::RedundantEach 138s does not register an offense when not chaining `each_` calls 138s does not register an offense when using `each_with_index` 138s registers an offense when using `each.each` 138s does not register an offense when using `each {}.each_with_object([]) {}` 138s does not register an offense when any method is used between methods with `each` in the method name 138s registers an offense when using a method starting with `each_` with `each_with_object` 138s does not register an offense when using `each_with_index.reverse_each` 138s does not register an offense when using `each {}.each_with_index {}` 139s registers an offense when using `each.each_with_index` 139s does not register an offense when using `each_with_object` 139s registers an offense when using `reverse_each.each` 139s registers an offense when using `each.each_with_object` 139s registers an offense when using a method starting with `each_` with `each_with_index` 139s does not register an offense when using `each` as enumerator 139s does not register an offense when using `each_foo {}.each_with_object([]) {}` 139s does not register an offense when using `each.with_index` 139s registers an offense when using `each.each(&:foo)` 139s does not register an offense when using `reverse_each {}.each {}` 139s does not register an offense when using only single `each` 139s does not register an offense when using `reverse_each(&:foo).each {...}` 139s registers an offense when using `reverse_each.each_with_object` 139s does not register an offense when using `each {}.reverse_each {}` 139s does not register an offense when using `each.with_object` 139s registers an offense when using `reverse_each.each_with_index` 139s does not register an offense when using `each_ancestor.each` 139s does not register an offense when using `each` with a symbol proc for last argument 139s does not register an offense when using `each` with a symbol proc argument 139s registers an offense when using `each.reverse_each` 139s 139s RuboCop::Cop::Layout::MultilineArrayBraceLayout 139s ignores single-line arrays 139s ignores implicit arrays 139s ignores empty arrays 139s behaves like multiline literal brace layout trailing comma 139s symmetrical style 139s opening brace on same line as first element 139s last element has a trailing comma 139s autocorrects closing brace on different line from last element 139s same_line style 139s opening brace on same line as first element 139s last element has a trailing comma 139s autocorrects closing brace on different line as last element 139s when comment present before closing brace 139s corrects closing brace without crashing 139s behaves like multiline literal brace layout 139s same_line style 139s opening brace on same line as first element 139s allows closing brace on same line as multi-line element 139s autocorrects closing brace on different line as last element 139s allows closing brace on same line from last element 139s detects closing brace on different line from multiline element 139s with a chained call on the closing brace 139s and a comment after the last element 139s detects closing brace on separate line from last elementbut does not autocorrect the closing brace 139s but no comment after the last element 139s autocorrects the closing brace 139s opening brace on separate line from first element 139s detects closing brace on different line from last element 139s allows closing brace on same line as last element 139s allows closing brace on same line as last multiline element 139s symmetrical style 139s opening brace on same line as first element 139s autocorrects closing brace on different line from last element 139s allows closing brace on same line as last multiline element 139s detects closing brace on different line from last element 139s allows closing brace on same line as last element 139s with a chained call on the closing brace 139s but no comment after the last element 139s autocorrects the closing brace 139s and a comment after the last element 139s detects closing brace on separate line from last elementbut does not autocorrect the closing brace 139s opening brace on separate line from first element 139s allows closing brace on separate line from last element 139s allows closing brace on separate line from last multiline element 139s detects closing brace on same line as last element 139s heredoc 139s detects heredoc structures that are safe to add to 139s ignores heredocs that could share a last line 139s new_line style 139s opening brace on same line as first element 139s allows closing brace on different line from multi-line element 139s allows closing brace on different line from last element 139s detects closing brace on same line as last multiline element 139s autocorrects closing brace on same line as last element 139s opening brace on separate line from first element 139s allows closing brace on separate line from last element 139s detects closing brace on same line as last element 139s allows closing brace on separate line from last multiline element 139s behaves like multiline literal brace layout method argument 139s when arguments to a method 139s and a comment after the last element 139s detects closing brace on separate line from last element 139s but no comment after the last element 139s autocorrects the closing brace 139s 139s RuboCop::Cop::Style::NumberedParametersLimit 139s with Ruby >= 2.7 139s sets Max properly for auto-gen-config 139s does not register an offense for a numblock with fewer than `Max` parameters 139s does not register an offense for a normal block with too many parameters 139s does not register an offense for a numblock with exactly `Max` parameters 139s when there are more than `Max` numbered parameters 139s registers an offense for a single line `numblock` 139s registers an offense for a multiline `numblock` 139s when Max is 1 139s uses the right offense message 139s when configuring Max 139s does not register an offense when there are not too many numbered params 139s 139s RuboCop::Cop::Lint::SafeNavigationWithEmpty 139s outside a conditional 139s registers no offense 139s in a conditional 139s registers an offense and corrects on `&.empty?` 139s does not register an offense on `.empty?` 139s 139s RuboCop::Cop::Layout::SpaceAroundMethodCallOperator 139s does not register an offense when using `__ENCODING__` 139s does not register an offense when no method call operator 139s dot operator 139s does not register an offense when no space around any `.` operators 139s registers an offense and corrects when space before last method call operator 139s registers an offense and corrects when space after last method call operator 139s registers an offense and corrects when spaces after method call 139s registers an offense and corrects when space after method call 139s registers an offense and corrects when space after first method call operator 139s does not register an offense when no space around method call 139s registers an offense and corrects when spaces around method call 139s registers an offense and corrects when space around multiple method call operator 139s registers an offense and corrects when spaces before method call 139s registers an offense and corrects when spaces after `Proc#call` shorthand call 139s registers an offense and corrects when space before first method call operator 139s registers an offense and corrects when space around intermediate method call operator 139s registers an offense and corrects when space before method call 139s when multi line method call 139s does not register an offense when no space after the `.` 139s registers an offense and corrects when space before method call 139s registers an offense and corrects when space before method call in suffix chaining 139s when there is a space between `.` operator and a comment 139s registers an offense when there is a space before `.` 139s does not register an offense when there is not a space before `.` 139s safe navigation operator 139s registers an offense and corrects when spaces before method call 139s registers an offense and corrects when spaces after method call 139s registers an offense and corrects when space after method call 139s registers an offense and corrects when spaces around method call 139s does not register an offense when no space around any `.` operators 139s does not register an offense when no space around method call 139s registers an offense and corrects when space around multiple method call operator 139s registers an offense and corrects when space before last method call operator 139s registers an offense and corrects when space before method call 139s registers an offense and corrects when space before first method call operator 139s registers an offense and corrects when space after first method call operator 139s registers an offense and corrects when space after last method call operator 139s registers an offense and corrects when space around intermediate method call operator 139s when multi line method call 139s registers an offense and corrects when space before method call in suffix chaining 139s does not register an offense when no space after the `&.` 139s registers an offense and corrects when space before method call 139s :: operator 139s does not register an offense if no space with conditionals 139s does not register an offense when no space around method call 139s registers an offense and corrects when space after first operator with assignment 139s registers an offense and corrects when space after last method call operator 139s registers an offense and corrects when space around multiple method call operator 139s registers an offense and corrects when spaces after method call 139s does not register an offense if no space before `::` operator with inheritance 139s does not register an offense if no space before `::` operator with assignment 139s registers an offense and corrects when space around intermediate method call operator 139s does not register an offense when no space around any `.` operators 139s registers an offense and corrects when space after method call 139s registers an offense and corrects when multiple spaces with assignment 139s when multi line method call 139s registers an offense and corrects when space before method call 139s does not register an offense when no space after the `::` 139s 139s RuboCop::Cop::Style::NegatedUnless 139s does not blow up on a negated ternary operator 139s does not blow up for ternary ops 139s does not blow up for empty if condition 139s does not blow up for empty unless condition 139s with “prefix” style 139s registers an offense for prefix 139s does not register an offense for postfix 139s with “postfix” style 139s registers an offense for postfix 139s does not register an offense for prefix 139s with “both” style 139s registers an offense for unless with "not" condition 139s accepts an unless where the condition is doubly negated 139s accepts an unless where only part of the condition is negated 139s accepts an unless/else with negative condition 139s registers an offense for unless with exclamation point condition 139s autocorrects by replacing parenthesized unless not with if 139s 139s RuboCop::Cop::Gemspec::RequireMFA 139s when the specification has a metadata hash but no rubygems_mfa_required key 139s registers an offense and corrects 139s with rubygems_mfa_required: true 139s does not register an offense 139s when there are other metadata keys 139s and `rubygems_mfa_required` is not included 139s registers an offense and corrects 139s and `rubygems_mfa_required` is included 139s does not register an offense 139s when the specification has an non-hash metadata 139s registers an offense but does not correct 139s with rubygems_mfa_required: false by key access 139s registers an offense and corrects 139s when the gemspec is blank 139s does not register an offense 139s with rubygems_mfa_required: false 139s registers an offense and corrects 139s when metadata is set by key assignment 139s and `rubygems_mfa_required` is included 139s does not register an offense 139s and `rubygems_mfa_required` is not included 139s registers an offense 139s when the specification is blank 139s registers an offense and corrects 139s 139s RuboCop::Cop::Style::ObjectThen 139s EnforcedStyle: yield_self 139s registers an offense for then with proc param 139s registers an offense for then with block 139s accepts then without a block 139s accepts then with more than 1 param 139s EnforcedStyle: then 139s accepts yield_self without a block 139s accepts yield_self with more than 1 param 139s registers an offense for yield_self with proc param 139s Ruby 2.6 139s registers an offense for yield_self with block 139s Ruby 2.7 139s registers an offense for yield_self with block 139s Ruby 2.5 139s accepts yield_self with block 139s 139s RuboCop::Cop::Layout::SpaceBeforeFirstArg 139s for method calls without parentheses 139s accepts setter call 139s registers an offense for method call with no spaces before the first arg 139s accepts + operator 139s registers an offense and corrects method call with two spaces before the first arg 139s accepts a method call with one space before the first arg 139s accepts multiple space containing line break 139s when a vertical argument positions are aligned 139s registers an offense 139s when using safe navigation operator 139s registers an offense and corrects method call with two spaces before the first arg 139s when AllowForAlignment is false 139s registers an offense and corrects method calls with aligned first arguments 139s when AllowForAlignment is true 139s accepts method calls with aligned first arguments 139s for method calls with parentheses 139s accepts a method call without space 139s accepts a method call with space after the left parenthesis 139s 139s RuboCop::Cop::Style::HashTransformKeys 139s when using Ruby 2.6 or newer 139s does not flag _.to_h {...} when key block argument is unused 139s does not flag `_.to_h{...}` when its receiver is an array literal 139s does not flag `_.to_h{...}` when its receiver is `zip` 139s does not flag `_.to_h{...}` when its receiver is `each_with_index` 139s does not flag `_.to_h{...}` when both key & value are transformed 139s flags _.to_h{...} when transform_keys could be used 139s does not flag `_.to_h{...}` when its receiver is `with_index` 139s when using Ruby 2.5 or newer 139s flags _.map{...}.to_h when transform_keys could be used 139s does not flag `_.map{...}.to_h` when its receiver is `each_with_index` 139s does not flag `Hash[_.map{...}]` when its receiver is an array literal 139s does not flag each_with_object when its receiver is array literal 139s does not flag each_with_object when both key & value are transformed 139s correctly autocorrects _.map{...}.to_h with block 139s correctly autocorrects _.map{...}.to_h without block 139s does not flag `each_with_object` when its receiver is `zip` 139s does not flag each_with_object when its argument is not modified 139s does not flag `Hash[_.map{...}]` when its receiver is `each_with_index` 139s flags _.map {...}.to_h when transform_keys could be used when wrapped in another block 139s does not flag `_.map{...}.to_h` when its receiver is `zip` 139s does not flag `each_with_object` when its receiver is `each_with_index` 139s flags Hash[_.map{...}] when transform_keys could be used 139s flags _.map{...}.to_h when transform_keys could be used when line break before `to_h` 139s does not flag _.map {...}.to_h when key block argument is unused 139s correctly autocorrects Hash[_.map{...}] 139s does not flag Hash[_.map{...}] when both key & value are transformed 139s does not flag `_.map{...}.to_h` when its receiver is `with_index` 139s does not flag _.map{...}.to_h when both key & value are transformed 139s does not flag `Hash[_.map{...}]` when its receiver is `zip` 139s does not flag `Hash[_.map{...}]` when its receiver is `with_index` 139s does not flag key transformation when receiver is array literal 139s does not flag each_with_object when no transformation occurs 139s does not flag key transformation in the absence of to_h 139s does not flag `each_with_object` when its argument is used in the key 139s does not flag each_with_object when key transformation uses value 139s does not flag `each_with_object` when its receiver is `with_index` 139s with inline block 139s flags each_with_object when transform_keys could be used 139s with multiline block 139s flags each_with_object when transform_keys could be used 139s with safe navigation operator 139s flags each_with_object when transform_keys could be used 139s below Ruby 2.5 139s does not flag even if transform_keys could be used 139s below Ruby 2.6 139s does not flag _.to_h{...} 139s 139s RuboCop::Cop::Style::CaseLikeIf 139s does not register an offense when using `==` with class reference 139s does not register an offense when using `==` with constant containing 1 letter in name 139s does not register an offense when using `unless` 139s registers an offense and corrects when using `match?` with regexp 139s does not register an offense when using `match?` with non regexp 139s does not register an offense when using `match?` without a receiver 139s registers an offense and corrects when using `=~` 139s does not register an offense when using ternary operator 139s does not register an offense when not all conditions contain target 139s registers an offense and corrects when using `==` with literal 139s registers an offense and corrects when using `match?` with non regexp in other branches except first 139s does not register an offense when only `if-else` 139s does not register an offense when an object overrides `equal?` with no arity 139s does not register an offense when using `cover?` without a receiver 139s does not register an offense when using modifier `if` 139s registers an offense and corrects when using nested conditions with `||` 139s registers an offense and corrects when using `==` with constant 139s does not register an offense when one of `||` subconditions is not convertible 139s does not register an offense when only single `if` 139s registers an offense and corrects when using `||` within conditions 139s does not register an offense when one of the branches contains `==` with class reference 139s does not register an offense when using `==` with method call with arguments 139s registers an offense and corrects when using `include?` with range 139s does not register an offense when using `equal?` without a receiver 139s registers an offense and corrects when using `is_a?` 139s registers an offense and corrects when using `===` 139s does not register an offense when using `match?` in first branch with non regexp 139s does not register an offense when using `=~` in first branch with non regexp 139s registers an offense and corrects when target is a method call 139s does not register an offense when using `include?` without a receiver 139s when using regexp with named captures 139s does not register an offense with match and regexp on rhs 139s does not register an offense with match and regexp on lhs 139s registers and corrects an offense with =~ and regexp on rhs 139s does not register an offense with =~ and regexp on lhs 139s registers and corrects an offense with match? and regexp on rhs 139s registers and corrects an offense with match? and regexp on lhs 139s 139s RuboCop::Cop::Style::FormatString 139s when enforced style is sprintf 139s registers an offense for format 139s registers an offense for format with 2 arguments 139s registers an offense for something followed by an array 139s registers an offense for variable argument but does not autocorrect 139s registers an offense for variable argument and assignment but does not autocorrect 139s registers an offense for String#% with a hash argument 139s does not register an offense for ambiguous cases 139s works if the first operand contains embedded expressions 139s does not register an offense for numbers 139s registers an offense for a string followed by something 139s when enforced style is percent 139s registers an offense for format with a hash argument 139s accepts String#% 139s registers an offense for format 139s accepts sprintf without arguments 139s accepts sprintf with 1 argument 139s accepts format without arguments 139s registers an offense for sprintf with 3 arguments 139s registers an offense for sprintf 139s registers an offense for format with 3 arguments 139s registers an offense for sprintf with a hash argument 139s registers an offense and corrects when using springf with second argument that uses an operator 139s accepts format with 1 argument 139s when enforced style is format 139s registers an offense for a string followed by something 139s registers an offense for something followed by an array 139s registers an offense for sprintf 139s does not register an offense for numbers 139s works if the first operand contains embedded expressions 139s does not register an offense for ambiguous cases 140s registers an offense for sprintf with 2 arguments 140s does not autocorrect String#% with variable argument and assignment 140s registers an offense for variable argument but does not autocorrect 140s registers an offense for something followed by a hash 140s 140s RuboCop::Cop::Lint::AmbiguousBlockAssociation 140s behaves like accepts 140s does not register an offense 140s when AllowedMethods is enabled 140s does not register an offense for an allowed method 140s registers an offense for other methods 140s behaves like accepts 140s does not register an offense 140s behaves like accepts 140s does not register an offense 140s behaves like accepts 140s does not register an offense 140s behaves like accepts 140s does not register an offense 140s behaves like accepts 140s does not register an offense 140s behaves like accepts 140s does not register an offense 140s behaves like accepts 140s does not register an offense 140s behaves like accepts 140s does not register an offense 140s behaves like accepts 140s does not register an offense 140s behaves like accepts 140s does not register an offense 140s behaves like accepts 140s does not register an offense 140s behaves like accepts 140s does not register an offense 140s behaves like accepts 140s does not register an offense 140s behaves like accepts 140s does not register an offense 140s behaves like accepts 140s does not register an offense 140s behaves like accepts 140s does not register an offense 140s behaves like accepts 140s does not register an offense 140s behaves like accepts 140s does not register an offense 140s behaves like accepts 140s does not register an offense 140s when AllowedPatterns is enabled 140s registers an offense for other methods 140s does not register an offense for an allowed method 140s behaves like accepts 140s does not register an offense 140s behaves like accepts 140s does not register an offense 140s without parentheses 140s as a hash key 140s registers an offense 140s with assignment 140s registers an offense 140s without receiver 140s registers an offense 140s with receiver 140s registers an offense 140s when using safe navigation operator 140s registers an offense 140s rspec expect {}.to change {} 140s registers an offense 140s 140s RuboCop::Cop::Style::ClassMethodsDefinitions 140s when EnforcedStyle is self_class 140s does not register an offense when defining class methods with `class << self` 140s does not register an offense when defining singleton methods not on self 140s registers an offense when defining class methods with `def self.method` 140s when EnforcedStyle is def_self 140s does not register an offense when defining class methods with `def self.method` 140s does not register an offense when class << self does not contain methods 140s removes empty class << self when correcting 140s does not register an offense when `class << self` contains non public methods 140s registers an offense and corrects when defining class methods with `class << self` 140s correctly handles class << self containing multiple methods 140s registers and corrects an offense when defining class methods with `class << self` with inline comment 140s registers an offense and corrects when defining class methods with `class << self` and there is no blank line between method definition and attribute accessor 140s registers and corrects an offense when defining class methods with `class << self` with comment only body 140s correctly handles methods with annotation comments 140s does not register an offense when class << self contains only class methods 140s does not register an offense when defining singleton methods using `self << object` 140s correctly handles def self.x within class << self 140s 140s RuboCop::Cop::Layout::EmptyLinesAroundBeginBody 140s registers many offenses with complex begin-end 140s registers an offense for ensure body ending 140s registers an offense for begin body ending in method 140s registers an offense for begin body starting in method 140s registers an offense for begin body starting with rescue 140s registers an offense for rescue body ending 140s accepts begin block without empty line 140s accepts begin block without empty line in a method 140s registers an offense for begin body ending with a blank 140s registers an offense for else body ending 140s registers an offense for begin body starting with a blank 140s 140s RuboCop::Cop::Layout::EmptyLineAfterMagicComment 140s registers an offense for code that immediately follows comment 140s accepts magic comment with shareable_constant_value 140s accepts magic comment with typed 140s registers an offense when multiple magic comments without empty line 140s accepts code that separates the comment from the code with a newline 140s registers offense when frozen_string_literal used with shareable_constant_value without empty line 140s accepts a source file with only a magic comment 140s registers an offense when code that immediately follows typed comment 140s accepts magic comment followed by encoding 140s accepts an empty source file 140s registers an offense for documentation immediately following comment 140s 140s RuboCop::Cop::Lint::LiteralAsCondition 140s registers an offense for literal 2.0 in ! 140s accepts literal [1] if it's not an and/or operand 140s registers an offense for literal {} in complex cond 140s registers an offense for `not :"#{a}"` 140s registers an offense for literal {} in while 140s registers an offense for literal :sym in && 140s registers an offense for literal 1 in ! 140s registers an offense for literal {} in until 140s registers an offense for literal 2.0 in if 140s registers an offense for literal 2.0 in complex cond 140s registers an offense for literal :sym in until 140s registers an offense for literal 1 in post-loop until 140s registers an offense for literal :sym in complex cond 140s registers an offense for literal [1] in ! 140s accepts literal {} in a when of a case with something after case keyword 140s accepts `false` literal in post-loop `until` 140s accepts array literal in case, if it has nested non-literal element 140s registers an offense for `not 2.0` 140s registers an offense for literal 2.0 in post-loop while 140s registers an offense for literal {} in a when of a case without anything after case keyword 140s accepts literal 1 if it's not an and/or operand 140s registers an offense for literal 2.0 in a when of a case without anything after case keyword 140s registers an offense for literal :"#{a}" in post-loop while 140s registers an offense for literal 1 in if 140s registers an offense for literal 1 in while 140s registers an offense for literal :sym in ! 140s registers an offense for `!1` 140s accepts literal :"#{a}" if it's not an and/or operand 140s registers an offense for literal 2.0 in case 140s registers an offense for literal 2.0 in && 140s accepts literal {} in non-toplevel and/or 140s registers an offense for `!:"#{a}"` 140s registers an offense for `not :sym` 140s accepts literal :"#{a}" in a when of a case with something after case keyword 140s registers an offense for literal [1] in complex ! 140s registers an offense for literal [1] in if 140s accepts literal 2.0 in non-toplevel and/or 140s accepts literal {} if it's not an and/or operand 140s registers an offense for literal 1 in complex cond 140s registers an offense for literal 2.0 in until 140s accepts literal :"#{a}" in non-toplevel and/or 140s registers an offense for literal 1 in && 140s registers an offense for literal :"#{a}" in ! 140s accepts literal [1] in non-toplevel and/or 140s registers an offense for `!{}` 140s registers an offense for literal :sym in a when of a case without anything after case keyword 140s registers an offense for literal {} in if 140s accepts literal :sym in non-toplevel and/or 140s registers an offense for literal [1] in post-loop while 140s registers an offense for literal :sym in complex ! 140s registers an offense for literal :"#{a}" in while 140s registers an offense for literal {} in post-loop while 140s registers an offense for literal :sym in if 140s registers an offense for literal :"#{a}" in complex ! 140s registers an offense for `!:sym` 140s registers an offense for literal 2.0 in complex ! 140s registers an offense for literal :"#{a}" in a when of a case without anything after case keyword 140s registers an offense for literal [1] in post-loop until 140s accepts dstr literal in case 140s registers an offense for literal 1 in until 140s accepts literal 1 in a when of a case with something after case keyword 140s registers an offense for literal [1] in && 140s registers an offense for `not {}` 140s registers an offense for literal 1 in case 140s registers an offense for literal 1 in complex ! 140s registers an offense for `not 1` 140s registers an offense for literal {} in case 140s accepts literal 2.0 if it's not an and/or operand 140s accepts literal 1 in non-toplevel and/or 140s registers an offense for literal 2.0 in while 140s registers an offense for literal {} in complex ! 140s accepts array literal in case, if it has non-literal elements 140s registers an offense for literal [1] in while 140s accepts literal 2.0 in a when of a case with something after case keyword 140s registers an offense for literal :"#{a}" in if 140s accepts literal [1] in a when of a case with something after case keyword 140s registers an offense for literal [1] in complex cond 140s registers an offense for literal :"#{a}" in post-loop until 140s registers an offense for `not [1]` 140s accepts `false` literal in `until` 140s registers an offense for `!2.0` 140s registers an offense for `![1]` 140s registers an offense for literal :"#{a}" in until 140s registers an offense for literal [1] in case 140s registers an offense for literal :"#{a}" in case 140s registers an offense for literal {} in ! 140s registers an offense for literal 1 in post-loop while 140s registers an offense for literal :sym in post-loop until 140s registers an offense for literal [1] in a when of a case without anything after case keyword 140s registers an offense for literal 1 in a when of a case without anything after case keyword 140s accepts literal :sym in a when of a case with something after case keyword 140s registers an offense for case with a primitive array condition 140s registers an offense for literal {} in && 140s registers an offense for literal 2.0 in post-loop until 140s registers an offense for literal :"#{a}" in && 140s registers an offense for literal :"#{a}" in complex cond 140s registers an offense for literal [1] in until 140s accepts `true` literal in `while` 140s registers an offense for literal {} in post-loop until 140s registers an offense for literal :sym in case 140s accepts `true` literal in post-loop `while` 140s registers an offense for literal :sym in post-loop while 140s accepts literal :sym if it's not an and/or operand 140s registers an offense for literal :sym in while 140s >= Ruby 2.7 140s accepts literal :"#{a}" in a when of a case match 140s registers an offense for literal :"#{a}" in case match without a match var 140s accepts an offense for literal :"#{a}" in case match with a match var 140s >= Ruby 2.7 140s accepts literal 1 in a when of a case match 140s registers an offense for literal 1 in case match without a match var 140s accepts an offense for literal 1 in case match with a match var 140s >= Ruby 2.7 140s accepts literal 2.0 in a when of a case match 140s registers an offense for literal 2.0 in case match without a match var 140s accepts an offense for literal 2.0 in case match with a match var 140s >= Ruby 2.7 140s accepts literal {} in a when of a case match 140s accepts an offense for literal {} in case match with a match var 140s registers an offense for literal {} in case match without a match var 140s >= Ruby 2.7 140s accepts array literal in case match, if it has non-literal elements 140s accepts dstr literal in case match 140s accepts array literal in case match, if it has nested non-literal element 140s accepts an offense for case match with a match var 140s registers an offense for case match with a primitive array condition 140s >= Ruby 2.7 140s accepts an offense for literal :sym in case match with a match var 140s accepts literal :sym in a when of a case match 140s registers an offense for literal :sym in case match without a match var 140s >= Ruby 2.7 140s accepts an offense for literal [1] in case match with a match var 140s accepts literal [1] in a when of a case match 140s registers an offense for literal [1] in case match without a match var 140s 140s RuboCop::Cop::Lint::MixedRegexpCaptureTypes 140s does not register offense to a regexp with numbered capture only 140s does not register offense to a regexp with named capture only 140s does not register offense to a regexp with named capture and non-capturing group 140s registers an offense when both of named and numbered captures are used 140s does not register offense when using a Regexp cannot be processed by regexp_parser gem 140s when containing a non-regexp literal 140s does not register an offense when containing a lvar 140s does not register an offense when containing a method 140s does not register an offense when containing a cvar 140s does not register an offense when containing a gvar 140s does not register an offense when containing a ivar 140s does not register an offense when containing a constant 140s 140s RuboCop::Cop::Style::RedundantSortBy 140s autocorrects array.sort_by do |x| x end 140s autocorrects array.sort_by { |y| y } 140s autocorrects array.sort_by { |x| x } 140s Ruby 2.7 140s autocorrects array.sort_by { |x| x } 140s 140s RuboCop::Cop::Lint::MissingSuper 140s constructor 140s does not register an offense when there is a `super` call 140s does not register an offense for the constructor-like method defined outside of a class 140s registers an offense when no `super` call 140s does not register an offense for the class with stateless parent class 140s does not register an offense for the class without parent class 140s callbacks 140s registers an offense when class callback within `self << class` and without `super` call 140s registers an offense when method callback is without `super` call 140s does not register an offense when callback has a `super` call 140s registers an offense when class callback without `super` call 140s registers no offense when module callback without `super` call 140s 140s RuboCop::Cop::Lint::RescueType 140s accepts rescuing nothing 140s accepts rescue modifier 140s accepts rescuing a single exception 140s accepts rescuing nothing within a method definition 140s behaves like offenses 140s def rescue ensure 140s rescuing from 0 140s registers an offense and autocorrects 140s begin rescue 140s rescuing from 0 before another exception 140s registers an offense and autocorrects 140s rescuing from 0 after another exception 140s registers an offense and autocorrects 140s rescuing from 0 140s registers an offense and autocorrects 140s begin rescue ensure 140s rescuing from 0 140s registers an offense and autocorrects 140s def rescue 140s rescuing from 0 140s registers an offense and autocorrects 140s behaves like offenses 140s def rescue 140s rescuing from 0.0 140s registers an offense and autocorrects 140s begin rescue 140s rescuing from 0.0 after another exception 140s registers an offense and autocorrects 140s rescuing from 0.0 140s registers an offense and autocorrects 140s rescuing from 0.0 before another exception 140s registers an offense and autocorrects 140s begin rescue ensure 140s rescuing from 0.0 140s registers an offense and autocorrects 140s def rescue ensure 140s rescuing from 0.0 140s registers an offense and autocorrects 140s behaves like offenses 140s begin rescue 140s rescuing from nil after another exception 140s registers an offense and autocorrects 140s rescuing from nil before another exception 140s registers an offense and autocorrects 140s rescuing from nil 140s registers an offense and autocorrects 140s def rescue 140s rescuing from nil 140s registers an offense and autocorrects 140s begin rescue ensure 140s rescuing from nil 140s registers an offense and autocorrects 140s def rescue ensure 140s rescuing from nil 140s registers an offense and autocorrects 140s behaves like offenses 140s begin rescue 140s rescuing from "#{string}" 140s registers an offense and autocorrects 140s rescuing from "#{string}" after another exception 140s registers an offense and autocorrects 140s rescuing from "#{string}" before another exception 140s registers an offense and autocorrects 140s def rescue 140s rescuing from "#{string}" 140s registers an offense and autocorrects 140s def rescue ensure 140s rescuing from "#{string}" 140s registers an offense and autocorrects 140s begin rescue ensure 140s rescuing from "#{string}" 140s registers an offense and autocorrects 140s behaves like offenses 140s def rescue ensure 140s rescuing from {} 140s registers an offense and autocorrects 140s def rescue 140s rescuing from {} 140s registers an offense and autocorrects 140s begin rescue ensure 140s rescuing from {} 140s registers an offense and autocorrects 140s begin rescue 140s rescuing from {} before another exception 140s registers an offense and autocorrects 140s rescuing from {} 140s registers an offense and autocorrects 140s rescuing from {} after another exception 140s registers an offense and autocorrects 140s behaves like offenses 140s def rescue 140s rescuing from 'string' 140s registers an offense and autocorrects 140s def rescue ensure 140s rescuing from 'string' 140s registers an offense and autocorrects 140s begin rescue ensure 140s rescuing from 'string' 140s registers an offense and autocorrects 140s begin rescue 140s rescuing from 'string' after another exception 140s registers an offense and autocorrects 140s rescuing from 'string' 140s registers an offense and autocorrects 140s rescuing from 'string' before another exception 140s registers an offense and autocorrects 140s behaves like offenses 140s def rescue 140s rescuing from [] 140s registers an offense and autocorrects 140s begin rescue ensure 140s rescuing from [] 140s registers an offense and autocorrects 140s def rescue ensure 140s rescuing from [] 140s registers an offense and autocorrects 140s begin rescue 140s rescuing from [] 140s registers an offense and autocorrects 140s rescuing from [] after another exception 140s registers an offense and autocorrects 140s rescuing from [] before another exception 140s registers an offense and autocorrects 140s behaves like offenses 140s def rescue ensure 140s rescuing from :symbol 140s registers an offense and autocorrects 140s begin rescue ensure 140s rescuing from :symbol 140s registers an offense and autocorrects 140s def rescue 140s rescuing from :symbol 140s registers an offense and autocorrects 140s begin rescue 140s rescuing from :symbol after another exception 141s registers an offense and autocorrects 141s rescuing from :symbol before another exception 141s registers an offense and autocorrects 141s rescuing from :symbol 141s registers an offense and autocorrects 141s 141s RuboCop::Cop::Style::KeywordParametersOrder 141s registers an offense and corrects when multiple `kwoptarg`s are interleaved with `kwarg`sand last argument is `kwrestarg` and argument parentheses omitted 141s registers an offense and corrects when multiple `kwoptarg`s are interleaved with `kwarg`s 141s registers an offense and corrects when `kwoptarg` is before `kwarg` 141s registers an offense and corrects when multiple `kwoptarg`s are interleaved with `kwarg`sand last argument is `blockarg` and argument parentheses omitted 141s registers an offense and corrects when `kwoptarg` is before `kwarg` and argument parentheses omitted 141s does not register an offense when there are no `kwoptarg`s before `kwarg`s 141s registers an offense and corrects when multiple `kwoptarg` are before `kwarg` and argument parentheses omitted 141s when using block keyword parameters 141s registers an offense and corrects when `kwoptarg` is before `kwarg` 141s does not register an offense when there are no `kwoptarg`s before `kwarg`s 141s 141s RuboCop::Cop::Style::AutoResourceCleanup 141s does not register an offense for File.open with block 141s does not register an offense for File.open with immediate close 141s does not register an offense for File.open with block-pass 141s registers an offense for File.open without block 141s 141s RuboCop::Cop::Lint::AmbiguousRange 141s for an erange 141s can handle an endless range 141s registers an offense and corrects when not parenthesized 141s does not register an offense if the range is parenthesized 141s does not register an offense for a variable 141s can handle a beginningless range 141s registers an offense and corrects when the entire range is parenthesized but contains complex boundaries 141s does not register an offense for `self` 141s registers an offense and corrects when there are clauses on both sides 141s does not register an offense if the range is composed of literals 141s registers an offense and corrects when one side is parenthesized but the other is not 141s does not register an offense for a constant 141s method calls 141s with RequireParenthesesForMethodChains: false 141s does not register an offense for a chained method call with parens 141s does not register an offense for a chained method call without parens 141s behaves like common behavior 141s does not register an offense for a non-chained method call 141s does not register an offense for a unary + 141s does not register an offense for a unary - 141s requires parens when calling a method on a basic literal 141s with RequireParenthesesForMethodChains: true 141s does not register an offense for a chained method call with parens 141s registers an offense for a chained method call without parens 141s behaves like common behavior 141s requires parens when calling a method on a basic literal 141s does not register an offense for a non-chained method call 141s does not register an offense for a unary - 141s does not register an offense for a unary + 141s for an irange 141s can handle an endless range 141s does not register an offense for a variable 141s registers an offense and corrects when not parenthesized 141s registers an offense and corrects when the entire range is parenthesized but contains complex boundaries 141s does not register an offense for a constant 141s registers an offense and corrects when one side is parenthesized but the other is not 141s does not register an offense if the range is composed of literals 141s does not register an offense for `self` 141s registers an offense and corrects when there are clauses on both sides 141s can handle a beginningless range 141s does not register an offense if the range is parenthesized 141s method calls 141s with RequireParenthesesForMethodChains: true 141s does not register an offense for a chained method call with parens 141s registers an offense for a chained method call without parens 141s behaves like common behavior 141s does not register an offense for a unary + 141s does not register an offense for a unary - 141s requires parens when calling a method on a basic literal 141s does not register an offense for a non-chained method call 141s with RequireParenthesesForMethodChains: false 141s does not register an offense for a chained method call with parens 141s does not register an offense for a chained method call without parens 141s behaves like common behavior 141s does not register an offense for a unary + 141s does not register an offense for a non-chained method call 141s requires parens when calling a method on a basic literal 141s does not register an offense for a unary - 141s 141s RuboCop::Cop::Gemspec::RubyVersionGlobalsUsage 141s does not register an offense when no `RUBY_VERSION` 141s registers an offense when using `RUBY_VERSION` 141s registers an offense when using `::RUBY_VERSION` 141s 141s RuboCop::Cop::Style::ArrayCoercion 141s registers an offense and corrects when splatting variable into array 141s does not register an offense when splat is not in array 141s does not register an offense when splatting multiple variables into array 141s registers an offense and corrects when converting variable into array with check 141s does not register an offense when converting variable into other named array variable with check 141s 141s RuboCop::Runner 141s how formatter is invoked 141s #finished 141s when RuboCop is interrupted by user 141s sends only processed file paths 141s when RuboCop finished inspecting all files normally 141s sends all file paths 141s the passed files paths 141s is frozen 141s invocation order 142s is called in the proper sequence 142s #file_started 142s sends file specific information hash 142s sends a file path 142s the passed path 142s is frozen 142s #file_finished 142s sends a file path 142s sends an array of detected offenses for the file 142s the passed path 143s is frozen 143s #started 143s sends all file paths 143s the passed files paths 143s is frozen 143s 143s RuboCop::Cop::Style::RedundantSelf 143s reports an offense when a different lvasgn name is used in `if` 143s does not report an offense when masgn name is used in `unless` 143s does not report an offense when lvasgn name is used in `until` 143s accepts a self receiver on an lvalue of an and-assignment 143s does not report an offense when masgn name is used in `while` 143s accepts a self receiver with the double less-than operator 143s accepts a self receiver of methods also defined on `Kernel` 143s accepts a self receiver on an lvalue of a parallel assignment 143s does not report an offense when lvasgn name is used in `while` 143s accepts a self receiver with the square bracket operator 143s does not report an offense when masgn name is used in `until` 143s does not report an offense when masgn name is used in `if` 143s reports an offense a self receiver of .call 143s accepts a self receiver on an lvalue of a plus-assignment 143s accepts a self receiver used to distinguish from argument of block 143s does not report an offense when receiver and lvalue have the same name 143s accepts a self receiver on an lvalue of an assignment 143s accepts when nested receiver and lvalue have the name name 143s accepts a self receiver of .() 143s does not report an offense when self receiver in a method argument and multiple assigned lvalue have the same name 143s does not report an offense when lvasgn name is nested below `if` 143s does not report an offense when receiver and multiple assigned lvalue have the same name 143s does not report an offense when lvasgn name is used in `unless` 143s does not report an offense when self receiver in a method argument and lvalue have the same name 143s accepts a self receiver used to distinguish from constant 143s reports an offense when a different masgn name is used in `if` 143s accepts a self receiver on an lvalue of an or-assignment 143s accepts a self receiver for methods named like ruby keywords 143s does not report an offense when lvasgn name is used in `if` 143s accepts a self receiver on an lvalue of mlhs arguments 143s reports an offense a self receiver on an rvalue 143s Ruby 2.7 143s registers offense for self usage in numblocks 143s class methods 143s accepts a self receiver used to distinguish from blockarg 143s accepts a self receiver used to distinguish from optional argument 143s accepts a self receiver used to distinguish from local variable 143s accepts a self receiver used to distinguish from argument 143s instance methods 143s accepts a self receiver used to distinguish from optional argument 143s accepts a self receiver used to distinguish from blockarg 143s accepts a self receiver used to distinguish from local variable 143s accepts a self receiver used to distinguish from an argument 143s accepts a self receiver used to distinguish from an argument when an inner method is defined 143s accepts a self receiver used to distinguish from argument 143s with ruby >= 2.7 143s with pattern matching 143s accepts a self receiver with a `match-alt` 143s registers an offense when using self with a different match var 143s accepts a self receiver in a nested pattern` 143s registers an offense when using a self receiver with a pin 143s accepts a self receiver on a `hash-pattern` 143s accepts a self receiver in a `if-guard` 143s accepts a self receiver in a conditional pattern 143s accepts a self receiver on a `array-pattern` 143s accepts a self receiver on an `match-var` 143s 143s RuboCop::Cop::Style::ConditionalAssignment 143s allows aref assignment with different indices in if..else 143s allows method calls in if else 143s allows if else without variable assignment 143s registers an offense for assignment in ternary operation using strings 143s allows assignment using different operators in if elsif else 143s registers an offense in an if else if the assignment is already at the line length limit 143s registers an offense for assignment in unless else 143s autocorrects assignment in if else when the assignment spans multiple lines 143s doesn't crash when assignment statement uses chars which have special meaning in a regex 143s allows assignment to the result of a ternary operation 143s registers an offense for assignment in case with when else 143s registers an offense for assignment in if elsif elsif else 143s registers an offense for assignment in case when then else 143s registers an offense for assignment in if elsif else 143s allows modifier if inside of if else 143s allows assignment using different operators in if else 143s counts array assignment when determining multiple assignment 143s allows assignment in multiple branches when it is wrapped in a modifier 143s allows modifier if 143s allows assignment using different (method) operators in if..else 143s allows if elsif else with the same assignment only in if elsif 143s registers an offense for assignment in if then elsif then else 143s doesn't crash with empty braces 143s allows different assignment types in case with when else 143s allows method calls in conditionals 143s allows assignment of different variables in if else 143s allows assignment of different variables in case when else 143s allows if elsif else with the same assignment only in if else 143s allows if elsif else with the same assignment only in elsif else 143s behaves like all assignment types 143s with end alignment to keyword 143s for a class variable lval 143s registers an offense for assignment using >>= in case when 143s registers an offense for assignment using >>= in if else 143s for a instance variable lval 143s registers an offense for assignment using >>= in case when 143s registers an offense for assignment using >>= in if else 143s for a global variable lval 143s registers an offense for assignment using >>= in case when 143s registers an offense for assignment using >>= in if else 143s for a constant lval 143s registers an offense for assignment using >>= in if else 143s registers an offense for assignment using >>= in case when 143s for a local variable lval 143s registers an offense for assignment using >>= in case when 143s registers an offense for assignment using >>= in if else 143s with end alignment to start_of_line 143s for a class variable lval 143s registers an offense for assignment using >>= in if else 143s registers an offense for assignment using >>= in case when 143s for a instance variable lval 143s registers an offense for assignment using >>= in case when 143s registers an offense for assignment using >>= in if else 143s for a constant lval 143s registers an offense for assignment using >>= in if else 143s registers an offense for assignment using >>= in case when 143s for a global variable lval 143s registers an offense for assignment using >>= in case when 143s registers an offense for assignment using >>= in if else 143s for a local variable lval 143s registers an offense for assignment using >>= in if else 143s registers an offense for assignment using >>= in case when 143s for a constant lval 143s registers an offense for assignment using >>= in ternary 143s for a instance variable lval 143s registers an offense for assignment using >>= in ternary 143s for a class variable lval 143s registers an offense for assignment using >>= in ternary 143s for a global variable lval 143s registers an offense for assignment using >>= in ternary 143s for a local variable lval 143s registers an offense for assignment using >>= in ternary 143s behaves like comparison methods 143s registers an offense for comparison methods in ternary operations 143s with end alignment to start_of_line 143s corrects comparison methods in unless else 143s corrects comparison methods in case when 143s corrects comparison methods in if elsif else 143s >= Ruby 2.7 143s corrects comparison methods in case in 143s with end alignment to keyword 143s corrects comparison methods in case when 143s corrects comparison methods in unless else 143s corrects comparison methods in if elsif else 143s >= Ruby 2.7 144s corrects comparison methods in case in 144s behaves like all variable types 144s registers an offense assigning any variable type in case when 144s registers an offense assigning any variable type in if else 144s registers an offense assigning any variable type in ternary 144s allows assignment to the return of if else 144s allows assignment to the return of case when 144s allows assignment to the return of a ternary 144s correction would exceed max line length 144s allows assignment to the same variable in if else if the correction would cause the condition to exceed the configured LineLength 144s allows assignment to the same variable in if else if the correction would create a line longer than the configured LineLength 144s allows assignment to the same variable in case when else if the correction would create a line longer than the configured LineLength 144s behaves like comparison methods 144s registers an offense for comparison methods in ternary operations 144s with end alignment to start_of_line 144s corrects comparison methods in case when 144s corrects comparison methods in if elsif else 144s corrects comparison methods in unless else 144s >= Ruby 2.7 144s corrects comparison methods in case in 144s with end alignment to keyword 144s corrects comparison methods in unless else 144s corrects comparison methods in if elsif else 144s corrects comparison methods in case when 144s >= Ruby 2.7 144s corrects comparison methods in case in 144s for if elsif else if else 144s autocorrects the inner offense first 144s autocorrects the outer offense later 144s behaves like all assignment types 144s for a global variable lval 144s registers an offense for assignment using &= in ternary 144s for a instance variable lval 144s registers an offense for assignment using &= in ternary 144s for a class variable lval 144s registers an offense for assignment using &= in ternary 144s with end alignment to start_of_line 144s for a constant lval 144s registers an offense for assignment using &= in if else 144s registers an offense for assignment using &= in case when 144s for a global variable lval 144s registers an offense for assignment using &= in if else 144s registers an offense for assignment using &= in case when 144s for a local variable lval 144s registers an offense for assignment using &= in if else 144s registers an offense for assignment using &= in case when 144s for a instance variable lval 144s registers an offense for assignment using &= in if else 144s registers an offense for assignment using &= in case when 144s for a class variable lval 144s registers an offense for assignment using &= in case when 144s registers an offense for assignment using &= in if else 144s for a constant lval 144s registers an offense for assignment using &= in ternary 144s with end alignment to keyword 144s for a class variable lval 144s registers an offense for assignment using &= in if else 144s registers an offense for assignment using &= in case when 144s for a global variable lval 144s registers an offense for assignment using &= in if else 144s registers an offense for assignment using &= in case when 144s for a instance variable lval 144s registers an offense for assignment using &= in case when 144s registers an offense for assignment using &= in if else 144s for a local variable lval 144s registers an offense for assignment using &= in case when 144s registers an offense for assignment using &= in if else 144s for a constant lval 144s registers an offense for assignment using &= in case when 144s registers an offense for assignment using &= in if else 144s for a local variable lval 144s registers an offense for assignment using &= in ternary 144s behaves like all assignment types 144s for a global variable lval 144s registers an offense for assignment using <<= in ternary 144s with end alignment to keyword 144s for a global variable lval 144s registers an offense for assignment using <<= in if else 144s registers an offense for assignment using <<= in case when 144s for a constant lval 144s registers an offense for assignment using <<= in case when 144s registers an offense for assignment using <<= in if else 144s for a class variable lval 144s registers an offense for assignment using <<= in case when 144s registers an offense for assignment using <<= in if else 144s for a instance variable lval 144s registers an offense for assignment using <<= in if else 144s registers an offense for assignment using <<= in case when 144s for a local variable lval 144s registers an offense for assignment using <<= in if else 144s registers an offense for assignment using <<= in case when 144s with end alignment to start_of_line 144s for a constant lval 144s registers an offense for assignment using <<= in if else 144s registers an offense for assignment using <<= in case when 144s for a class variable lval 144s registers an offense for assignment using <<= in case when 144s registers an offense for assignment using <<= in if else 144s for a instance variable lval 144s registers an offense for assignment using <<= in if else 144s registers an offense for assignment using <<= in case when 144s for a global variable lval 144s registers an offense for assignment using <<= in if else 144s registers an offense for assignment using <<= in case when 144s for a local variable lval 144s registers an offense for assignment using <<= in case when 144s registers an offense for assignment using <<= in if else 144s for a class variable lval 144s registers an offense for assignment using <<= in ternary 144s for a instance variable lval 144s registers an offense for assignment using <<= in ternary 144s for a constant lval 144s registers an offense for assignment using <<= in ternary 144s for a local variable lval 144s registers an offense for assignment using <<= in ternary 144s behaves like all assignment types 144s for a global variable lval 144s registers an offense for assignment using &&= in ternary 144s for a class variable lval 144s registers an offense for assignment using &&= in ternary 144s for a local variable lval 144s registers an offense for assignment using &&= in ternary 144s for a constant lval 144s registers an offense for assignment using &&= in ternary 144s for a instance variable lval 144s registers an offense for assignment using &&= in ternary 144s with end alignment to keyword 144s for a local variable lval 144s registers an offense for assignment using &&= in case when 144s registers an offense for assignment using &&= in if else 144s for a global variable lval 144s registers an offense for assignment using &&= in if else 144s registers an offense for assignment using &&= in case when 144s for a constant lval 144s registers an offense for assignment using &&= in case when 144s registers an offense for assignment using &&= in if else 144s for a class variable lval 144s registers an offense for assignment using &&= in case when 144s registers an offense for assignment using &&= in if else 144s for a instance variable lval 144s registers an offense for assignment using &&= in case when 144s registers an offense for assignment using &&= in if else 144s with end alignment to start_of_line 144s for a local variable lval 144s registers an offense for assignment using &&= in case when 144s registers an offense for assignment using &&= in if else 144s for a global variable lval 144s registers an offense for assignment using &&= in if else 144s registers an offense for assignment using &&= in case when 144s for a constant lval 144s registers an offense for assignment using &&= in if else 144s registers an offense for assignment using &&= in case when 144s for a class variable lval 144s registers an offense for assignment using &&= in if else 144s registers an offense for assignment using &&= in case when 144s for a instance variable lval 144s registers an offense for assignment using &&= in case when 144s registers an offense for assignment using &&= in if else 144s behaves like comparison methods 144s registers an offense for comparison methods in ternary operations 144s with end alignment to start_of_line 144s corrects comparison methods in unless else 144s corrects comparison methods in case when 144s corrects comparison methods in if elsif else 144s >= Ruby 2.7 144s corrects comparison methods in case in 144s with end alignment to keyword 144s corrects comparison methods in case when 144s corrects comparison methods in if elsif else 144s corrects comparison methods in unless else 144s >= Ruby 2.7 144s corrects comparison methods in case in 144s empty branch 144s allows an empty if statement 144s allows assignment in if without an else 144s allows assignment in case when without an else 144s allows an empty elsif statement 144s allows assignment in unless without an else 144s allows an empty when branch with an else 144s allows case with an empty else 144s allows if elsif without else 144s behaves like all variable types 144s allows assignment to the return of a ternary 144s registers an offense assigning any variable type in ternary 144s registers an offense assigning any variable type in if else 144s registers an offense assigning any variable type in case when 144s allows assignment to the return of if else 144s allows assignment to the return of case when 144s behaves like all assignment types 144s for a instance variable lval 144s registers an offense for assignment using ||= in ternary 144s for a global variable lval 144s registers an offense for assignment using ||= in ternary 144s with end alignment to start_of_line 144s for a class variable lval 144s registers an offense for assignment using ||= in case when 144s registers an offense for assignment using ||= in if else 144s for a global variable lval 144s registers an offense for assignment using ||= in case when 144s registers an offense for assignment using ||= in if else 144s for a local variable lval 144s registers an offense for assignment using ||= in case when 144s registers an offense for assignment using ||= in if else 144s for a instance variable lval 144s registers an offense for assignment using ||= in if else 144s registers an offense for assignment using ||= in case when 144s for a constant lval 144s registers an offense for assignment using ||= in if else 144s registers an offense for assignment using ||= in case when 144s with end alignment to keyword 144s for a class variable lval 144s registers an offense for assignment using ||= in if else 144s registers an offense for assignment using ||= in case when 144s for a constant lval 144s registers an offense for assignment using ||= in if else 144s registers an offense for assignment using ||= in case when 144s for a local variable lval 144s registers an offense for assignment using ||= in case when 144s registers an offense for assignment using ||= in if else 144s for a global variable lval 144s registers an offense for assignment using ||= in case when 144s registers an offense for assignment using ||= in if else 144s for a instance variable lval 144s registers an offense for assignment using ||= in case when 144s registers an offense for assignment using ||= in if else 144s for a class variable lval 144s registers an offense for assignment using ||= in ternary 144s for a local variable lval 144s registers an offense for assignment using ||= in ternary 144s for a constant lval 144s registers an offense for assignment using ||= in ternary 144s behaves like comparison methods 144s registers an offense for comparison methods in ternary operations 144s with end alignment to keyword 144s corrects comparison methods in case when 144s corrects comparison methods in if elsif else 144s corrects comparison methods in unless else 144s >= Ruby 2.7 144s corrects comparison methods in case in 144s with end alignment to start_of_line 144s corrects comparison methods in case when 144s corrects comparison methods in unless else 144s corrects comparison methods in if elsif else 144s >= Ruby 2.7 144s corrects comparison methods in case in 144s behaves like all assignment types 144s for a class variable lval 144s registers an offense for assignment using /= in ternary 144s for a global variable lval 144s registers an offense for assignment using /= in ternary 144s for a constant lval 144s registers an offense for assignment using /= in ternary 144s for a local variable lval 144s registers an offense for assignment using /= in ternary 144s with end alignment to start_of_line 144s for a local variable lval 144s registers an offense for assignment using /= in if else 144s registers an offense for assignment using /= in case when 144s for a instance variable lval 144s registers an offense for assignment using /= in case when 144s registers an offense for assignment using /= in if else 144s for a global variable lval 144s registers an offense for assignment using /= in case when 144s registers an offense for assignment using /= in if else 144s for a constant lval 144s registers an offense for assignment using /= in case when 144s registers an offense for assignment using /= in if else 144s for a class variable lval 144s registers an offense for assignment using /= in case when 144s registers an offense for assignment using /= in if else 144s with end alignment to keyword 144s for a global variable lval 144s registers an offense for assignment using /= in case when 144s registers an offense for assignment using /= in if else 144s for a class variable lval 144s registers an offense for assignment using /= in if else 144s registers an offense for assignment using /= in case when 144s for a instance variable lval 144s registers an offense for assignment using /= in case when 144s registers an offense for assignment using /= in if else 144s for a local variable lval 144s registers an offense for assignment using /= in case when 144s registers an offense for assignment using /= in if else 144s for a constant lval 144s registers an offense for assignment using /= in if else 144s registers an offense for assignment using /= in case when 144s for a instance variable lval 144s registers an offense for assignment using /= in ternary 144s autocorrect 144s corrects =~ in ternary operations 144s corrects assignment to unbracketed array in if else 144s preserves comments during correction in if else 144s preserves comments during correction in case when else 144s assignment from a method 144s corrects unless else 144s corrects if else 144s corrects case when 144s aref assignment 144s corrects if..else 144s with different indices 144s doesn't register an offense 144s constant assignment 144s corrects if..else with namespaced constant 144s corrects if..else with top-level constant 144s multiple assignment 144s does not register an offense in case when 144s does not register an offense in if else 144s self.attribute= assignment 144s corrects if..else 144s with different receivers 144s doesn't register an offense 144s behaves like all assignment types 144s for a constant lval 144s registers an offense for assignment using -= in ternary 144s for a instance variable lval 144s registers an offense for assignment using -= in ternary 144s with end alignment to start_of_line 144s for a class variable lval 144s registers an offense for assignment using -= in if else 144s registers an offense for assignment using -= in case when 144s for a constant lval 144s registers an offense for assignment using -= in if else 144s registers an offense for assignment using -= in case when 144s for a local variable lval 144s registers an offense for assignment using -= in case when 144s registers an offense for assignment using -= in if else 144s for a global variable lval 144s registers an offense for assignment using -= in case when 144s registers an offense for assignment using -= in if else 144s for a instance variable lval 144s registers an offense for assignment using -= in case when 144s registers an offense for assignment using -= in if else 144s for a local variable lval 144s registers an offense for assignment using -= in ternary 144s with end alignment to keyword 144s for a local variable lval 144s registers an offense for assignment using -= in if else 144s registers an offense for assignment using -= in case when 144s for a global variable lval 144s registers an offense for assignment using -= in if else 144s registers an offense for assignment using -= in case when 144s for a class variable lval 144s registers an offense for assignment using -= in case when 144s registers an offense for assignment using -= in if else 144s for a constant lval 144s registers an offense for assignment using -= in if else 145s registers an offense for assignment using -= in case when 145s for a instance variable lval 145s registers an offense for assignment using -= in if else 145s registers an offense for assignment using -= in case when 145s for a global variable lval 145s registers an offense for assignment using -= in ternary 145s for a class variable lval 145s registers an offense for assignment using -= in ternary 145s assignment as the last statement 145s allows multiple assignments in case when with only one when 145s allows multiple assignment in case when else when the last assignment is the same and the earlier assignments do not appear in all branches 145s allows multiple assignment in if elsif else 145s allows variable assignment in unless else with more than variable assignment 145s allows multiple assignment in case statements when the last assignment is the same and the earlier assignments do not appear in all branches 145s allows assignment in if elsif else with some branches only containing variable assignment and others containing more than variable assignment 145s allows multiple assignments in case when if there are uniq variables in the when branches 145s allows more than variable assignment in if else 145s allows multiple assignment in if elsif elsif else 145s allows variable assignment in case when else with more than variable assignment 145s allows multiple assignment in if else 145s allows multiple assignments in case when with multiple whens 145s allows multiple assignment in unless else 145s allows multiple assignment in if elsif else when the last assignment is the same and the earlier assignments do not appear in all branches 145s allows more than variable assignment in if elsif else 145s multiple assignment in only one branch 145s does not register an offense when multiple assignment is in else 145s allows multiple assignment is in if 145s allows multiple assignment is in elsif 145s behaves like allows out of order multiple assignment in if elsif else 145s allows out of order multiple assignment in if elsif else 145s behaves like all variable types 145s allows assignment to the return of a ternary 145s allows assignment to the return of case when 145s registers an offense assigning any variable type in ternary 145s allows assignment to the return of if else 145s registers an offense assigning any variable type in if else 145s registers an offense assigning any variable type in case when 145s behaves like comparison methods 145s registers an offense for comparison methods in ternary operations 145s with end alignment to start_of_line 145s corrects comparison methods in unless else 145s corrects comparison methods in if elsif else 145s corrects comparison methods in case when 145s >= Ruby 2.7 145s corrects comparison methods in case in 145s with end alignment to keyword 145s corrects comparison methods in case when 145s corrects comparison methods in if elsif else 145s corrects comparison methods in unless else 145s >= Ruby 2.7 145s corrects comparison methods in case in 145s behaves like comparison methods 145s registers an offense for comparison methods in ternary operations 145s with end alignment to start_of_line 145s corrects comparison methods in unless else 145s corrects comparison methods in case when 145s corrects comparison methods in if elsif else 145s >= Ruby 2.7 145s corrects comparison methods in case in 145s with end alignment to keyword 145s corrects comparison methods in if elsif else 145s corrects comparison methods in case when 145s corrects comparison methods in unless else 145s >= Ruby 2.7 145s corrects comparison methods in case in 145s behaves like comparison methods 145s registers an offense for comparison methods in ternary operations 145s with end alignment to keyword 145s corrects comparison methods in case when 145s corrects comparison methods in if elsif else 145s corrects comparison methods in unless else 145s >= Ruby 2.7 145s corrects comparison methods in case in 145s with end alignment to start_of_line 145s corrects comparison methods in unless else 145s corrects comparison methods in case when 145s corrects comparison methods in if elsif else 145s >= Ruby 2.7 145s corrects comparison methods in case in 145s behaves like comparison methods 145s registers an offense for comparison methods in ternary operations 145s with end alignment to start_of_line 145s corrects comparison methods in if elsif else 145s corrects comparison methods in case when 145s corrects comparison methods in unless else 145s >= Ruby 2.7 145s corrects comparison methods in case in 145s with end alignment to keyword 145s corrects comparison methods in if elsif else 145s corrects comparison methods in case when 145s corrects comparison methods in unless else 145s >= Ruby 2.7 145s corrects comparison methods in case in 145s behaves like all assignment types 145s for a instance variable lval 145s registers an offense for assignment using ^= in ternary 145s with end alignment to keyword 145s for a global variable lval 145s registers an offense for assignment using ^= in case when 145s registers an offense for assignment using ^= in if else 145s for a instance variable lval 145s registers an offense for assignment using ^= in case when 145s registers an offense for assignment using ^= in if else 145s for a constant lval 145s registers an offense for assignment using ^= in case when 145s registers an offense for assignment using ^= in if else 145s for a local variable lval 145s registers an offense for assignment using ^= in case when 145s registers an offense for assignment using ^= in if else 145s for a class variable lval 145s registers an offense for assignment using ^= in if else 145s registers an offense for assignment using ^= in case when 145s for a constant lval 145s registers an offense for assignment using ^= in ternary 145s with end alignment to start_of_line 145s for a instance variable lval 145s registers an offense for assignment using ^= in case when 145s registers an offense for assignment using ^= in if else 145s for a constant lval 145s registers an offense for assignment using ^= in if else 145s registers an offense for assignment using ^= in case when 145s for a local variable lval 145s registers an offense for assignment using ^= in case when 145s registers an offense for assignment using ^= in if else 145s for a global variable lval 145s registers an offense for assignment using ^= in case when 145s registers an offense for assignment using ^= in if else 145s for a class variable lval 145s registers an offense for assignment using ^= in if else 145s registers an offense for assignment using ^= in case when 145s for a class variable lval 145s registers an offense for assignment using ^= in ternary 145s for a local variable lval 145s registers an offense for assignment using ^= in ternary 145s for a global variable lval 145s registers an offense for assignment using ^= in ternary 145s behaves like all assignment types 145s for a global variable lval 145s registers an offense for assignment using %= in ternary 145s for a constant lval 145s registers an offense for assignment using %= in ternary 145s for a instance variable lval 145s registers an offense for assignment using %= in ternary 145s for a class variable lval 145s registers an offense for assignment using %= in ternary 145s for a local variable lval 145s registers an offense for assignment using %= in ternary 145s with end alignment to start_of_line 145s for a global variable lval 145s registers an offense for assignment using %= in if else 145s registers an offense for assignment using %= in case when 145s for a local variable lval 145s registers an offense for assignment using %= in case when 145s registers an offense for assignment using %= in if else 145s for a class variable lval 145s registers an offense for assignment using %= in case when 145s registers an offense for assignment using %= in if else 145s for a instance variable lval 145s registers an offense for assignment using %= in case when 145s registers an offense for assignment using %= in if else 145s for a constant lval 145s registers an offense for assignment using %= in case when 145s registers an offense for assignment using %= in if else 145s with end alignment to keyword 145s for a class variable lval 145s registers an offense for assignment using %= in case when 145s registers an offense for assignment using %= in if else 145s for a local variable lval 145s registers an offense for assignment using %= in case when 145s registers an offense for assignment using %= in if else 145s for a global variable lval 145s registers an offense for assignment using %= in case when 145s registers an offense for assignment using %= in if else 145s for a instance variable lval 145s registers an offense for assignment using %= in case when 145s registers an offense for assignment using %= in if else 145s for a constant lval 145s registers an offense for assignment using %= in case when 145s registers an offense for assignment using %= in if else 145s behaves like else followed by new conditional without else 145s allows if elsif else if 145s configured to check conditions with multiple statements 145s registers an offense for multiple assignment when an earlier assignment is is protected by a modifier 145s allows assignment in multiple branches when it is wrapped in a modifier 145s assignment as the last statement 145s registers offense for multiple assignments in case when with only one when 145s registers offense for multiple assignment in if elsif elsif else 145s registers offense for multiple assignments in case when with multiple whens 145s registers an offense in if elsif else with some branches only containing variable assignment and others containing more than variable assignment 145s registers an offense for multiple assignment in if elsif else 145s registers an offense in if elsif else with more than variable assignment 145s registers an offense in if else with more than variable assignment 145s registers an offense in case when else with more than variable assignment 145s registers offense for multiple assignment in unless else 145s register an offense for multiple assignment in if else 145s registers an offense in unless else with more than variable assignment 145s behaves like allows out of order multiple assignment in if elsif else 145s allows out of order multiple assignment in if elsif else 145s multiple assignment in only one branch 145s registers an offense when multiple assignment is in elsif 145s registers an offense when multiple assignment is in if 145s registers an offense when multiple assignment is in else 145s autocorrect 145s corrects multiple assignment in if elsif else 145s corrects assignment in an if statement that is nested in unless else 145s corrects multiple assignment in case when 145s corrects multiple assignment in if elsif else with multiple elsifs 145s corrects multiple assignment in case when with multiple whens 145s corrects multiple assignment in if else 145s corrects multiple assignment in unless else 145s behaves like all assignment types 145s with end alignment to keyword 145s for a local variable lval 145s registers an offense for assignment using **= in case when 145s registers an offense for assignment using **= in if else 145s for a global variable lval 145s registers an offense for assignment using **= in case when 145s registers an offense for assignment using **= in if else 145s for a class variable lval 145s registers an offense for assignment using **= in case when 145s registers an offense for assignment using **= in if else 145s for a instance variable lval 145s registers an offense for assignment using **= in if else 145s registers an offense for assignment using **= in case when 145s for a constant lval 145s registers an offense for assignment using **= in case when 145s registers an offense for assignment using **= in if else 145s for a class variable lval 145s registers an offense for assignment using **= in ternary 145s for a instance variable lval 145s registers an offense for assignment using **= in ternary 145s with end alignment to start_of_line 145s for a class variable lval 145s registers an offense for assignment using **= in case when 145s registers an offense for assignment using **= in if else 145s for a local variable lval 145s registers an offense for assignment using **= in if else 145s registers an offense for assignment using **= in case when 145s for a constant lval 145s registers an offense for assignment using **= in case when 145s registers an offense for assignment using **= in if else 145s for a instance variable lval 145s registers an offense for assignment using **= in case when 145s registers an offense for assignment using **= in if else 145s for a global variable lval 145s registers an offense for assignment using **= in if else 145s registers an offense for assignment using **= in case when 145s for a local variable lval 145s registers an offense for assignment using **= in ternary 145s for a constant lval 145s registers an offense for assignment using **= in ternary 145s for a global variable lval 145s registers an offense for assignment using **= in ternary 145s behaves like all assignment types 145s for a instance variable lval 145s registers an offense for assignment using *= in ternary 145s for a local variable lval 145s registers an offense for assignment using *= in ternary 145s with end alignment to keyword 145s for a global variable lval 145s registers an offense for assignment using *= in case when 145s registers an offense for assignment using *= in if else 145s for a local variable lval 145s registers an offense for assignment using *= in if else 145s registers an offense for assignment using *= in case when 145s for a class variable lval 145s registers an offense for assignment using *= in case when 145s registers an offense for assignment using *= in if else 145s for a constant lval 145s registers an offense for assignment using *= in case when 145s registers an offense for assignment using *= in if else 145s for a instance variable lval 145s registers an offense for assignment using *= in if else 145s registers an offense for assignment using *= in case when 145s for a class variable lval 145s registers an offense for assignment using *= in ternary 145s for a global variable lval 145s registers an offense for assignment using *= in ternary 145s with end alignment to start_of_line 145s for a global variable lval 145s registers an offense for assignment using *= in case when 145s registers an offense for assignment using *= in if else 145s for a instance variable lval 145s registers an offense for assignment using *= in if else 145s registers an offense for assignment using *= in case when 145s for a class variable lval 145s registers an offense for assignment using *= in case when 145s registers an offense for assignment using *= in if else 145s for a constant lval 145s registers an offense for assignment using *= in case when 145s registers an offense for assignment using *= in if else 145s for a local variable lval 145s registers an offense for assignment using *= in if else 145s registers an offense for assignment using *= in case when 145s for a constant lval 145s registers an offense for assignment using *= in ternary 145s behaves like all assignment types 145s for a class variable lval 145s registers an offense for assignment using = in ternary 145s with end alignment to start_of_line 145s for a global variable lval 145s registers an offense for assignment using = in if else 145s registers an offense for assignment using = in case when 145s for a constant lval 145s registers an offense for assignment using = in if else 145s registers an offense for assignment using = in case when 145s for a instance variable lval 145s registers an offense for assignment using = in if else 145s registers an offense for assignment using = in case when 145s for a class variable lval 145s registers an offense for assignment using = in case when 145s registers an offense for assignment using = in if else 145s for a local variable lval 145s registers an offense for assignment using = in case when 145s registers an offense for assignment using = in if else 145s for a local variable lval 145s registers an offense for assignment using = in ternary 145s for a global variable lval 145s registers an offense for assignment using = in ternary 145s for a instance variable lval 145s registers an offense for assignment using = in ternary 145s with end alignment to keyword 145s for a local variable lval 145s registers an offense for assignment using = in if else 145s registers an offense for assignment using = in case when 145s for a constant lval 145s registers an offense for assignment using = in case when 145s registers an offense for assignment using = in if else 145s for a class variable lval 145s registers an offense for assignment using = in if else 145s registers an offense for assignment using = in case when 145s for a instance variable lval 146s registers an offense for assignment using = in if else 146s registers an offense for assignment using = in case when 146s for a global variable lval 146s registers an offense for assignment using = in case when 146s registers an offense for assignment using = in if else 146s for a constant lval 146s registers an offense for assignment using = in ternary 146s behaves like all assignment types 146s with end alignment to start_of_line 146s for a constant lval 146s registers an offense for assignment using += in if else 146s registers an offense for assignment using += in case when 146s for a global variable lval 146s registers an offense for assignment using += in case when 146s registers an offense for assignment using += in if else 146s for a local variable lval 146s registers an offense for assignment using += in case when 146s registers an offense for assignment using += in if else 146s for a instance variable lval 146s registers an offense for assignment using += in if else 146s registers an offense for assignment using += in case when 146s for a class variable lval 146s registers an offense for assignment using += in if else 146s registers an offense for assignment using += in case when 146s for a instance variable lval 146s registers an offense for assignment using += in ternary 146s for a constant lval 146s registers an offense for assignment using += in ternary 146s for a global variable lval 146s registers an offense for assignment using += in ternary 146s for a local variable lval 146s registers an offense for assignment using += in ternary 146s with end alignment to keyword 146s for a class variable lval 146s registers an offense for assignment using += in case when 146s registers an offense for assignment using += in if else 146s for a global variable lval 146s registers an offense for assignment using += in if else 146s registers an offense for assignment using += in case when 146s for a constant lval 146s registers an offense for assignment using += in if else 146s registers an offense for assignment using += in case when 146s for a local variable lval 146s registers an offense for assignment using += in if else 146s registers an offense for assignment using += in case when 146s for a instance variable lval 146s registers an offense for assignment using += in case when 146s registers an offense for assignment using += in if else 146s for a class variable lval 146s registers an offense for assignment using += in ternary 146s behaves like all assignment types 146s with end alignment to start_of_line 146s for a constant lval 146s registers an offense for assignment using |= in if else 146s registers an offense for assignment using |= in case when 146s for a local variable lval 146s registers an offense for assignment using |= in if else 146s registers an offense for assignment using |= in case when 146s for a class variable lval 146s registers an offense for assignment using |= in if else 146s registers an offense for assignment using |= in case when 146s for a instance variable lval 146s registers an offense for assignment using |= in if else 146s registers an offense for assignment using |= in case when 146s for a global variable lval 146s registers an offense for assignment using |= in case when 146s registers an offense for assignment using |= in if else 146s for a instance variable lval 146s registers an offense for assignment using |= in ternary 146s for a local variable lval 146s registers an offense for assignment using |= in ternary 146s with end alignment to keyword 146s for a class variable lval 146s registers an offense for assignment using |= in if else 146s registers an offense for assignment using |= in case when 146s for a constant lval 146s registers an offense for assignment using |= in if else 146s registers an offense for assignment using |= in case when 146s for a local variable lval 146s registers an offense for assignment using |= in case when 146s registers an offense for assignment using |= in if else 146s for a instance variable lval 146s registers an offense for assignment using |= in if else 146s registers an offense for assignment using |= in case when 146s for a global variable lval 146s registers an offense for assignment using |= in case when 146s registers an offense for assignment using |= in if else 146s for a class variable lval 146s registers an offense for assignment using |= in ternary 146s for a global variable lval 146s registers an offense for assignment using |= in ternary 146s for a constant lval 146s registers an offense for assignment using |= in ternary 146s behaves like all variable types 146s allows assignment to the return of case when 146s registers an offense assigning any variable type in ternary 146s registers an offense assigning any variable type in case when 146s allows assignment to the return of a ternary 146s allows assignment to the return of if else 146s registers an offense assigning any variable type in if else 146s IncludeTernaryExpressions false 146s allows assignment in ternary operation 146s behaves like all variable types 146s allows assignment to the return of if else 146s allows assignment to the return of case when 146s registers an offense assigning any variable type in case when 146s allows assignment to the return of a ternary 146s registers an offense assigning any variable type in ternary 146s registers an offense assigning any variable type in if else 146s with nested conditionals 146s eventually autocorrects all branches 146s does not consider branches of nested ifs 146s behaves like comparison methods 146s registers an offense for comparison methods in ternary operations 146s with end alignment to start_of_line 146s corrects comparison methods in case when 146s corrects comparison methods in unless else 146s corrects comparison methods in if elsif else 146s >= Ruby 2.7 146s corrects comparison methods in case in 146s with end alignment to keyword 146s corrects comparison methods in unless else 146s corrects comparison methods in if elsif else 146s corrects comparison methods in case when 146s >= Ruby 2.7 146s corrects comparison methods in case in 146s EndAlignment configured to start_of_line 146s autocorrect 146s uses proper end alignment in unless 146s uses proper end alignment in case 146s uses proper end alignment in if 146s behaves like comparison methods 146s registers an offense for comparison methods in ternary operations 146s with end alignment to keyword 146s corrects comparison methods in if elsif else 146s corrects comparison methods in case when 146s corrects comparison methods in unless else 146s >= Ruby 2.7 146s corrects comparison methods in case in 146s with end alignment to start_of_line 146s corrects comparison methods in if elsif else 146s corrects comparison methods in unless else 146s corrects comparison methods in case when 146s >= Ruby 2.7 146s corrects comparison methods in case in 146s behaves like else followed by new conditional without else 146s allows if elsif else unless 146s behaves like all variable types 146s allows assignment to the return of if else 146s registers an offense assigning any variable type in ternary 146s allows assignment to the return of a ternary 146s allows assignment to the return of case when 146s registers an offense assigning any variable type in if else 146s registers an offense assigning any variable type in case when 146s behaves like all assignment types 146s for a class variable lval 146s registers an offense for assignment using << in ternary 146s for a local variable lval 146s registers an offense for assignment using << in ternary 146s for a instance variable lval 146s registers an offense for assignment using << in ternary 146s for a constant lval 146s registers an offense for assignment using << in ternary 146s with end alignment to keyword 146s for a constant lval 146s registers an offense for assignment using << in if else 146s registers an offense for assignment using << in case when 146s for a local variable lval 146s registers an offense for assignment using << in case when 146s registers an offense for assignment using << in if else 146s for a global variable lval 146s registers an offense for assignment using << in case when 146s registers an offense for assignment using << in if else 146s for a instance variable lval 146s registers an offense for assignment using << in case when 146s registers an offense for assignment using << in if else 146s for a class variable lval 146s registers an offense for assignment using << in case when 146s registers an offense for assignment using << in if else 146s with end alignment to start_of_line 146s for a global variable lval 146s registers an offense for assignment using << in case when 146s registers an offense for assignment using << in if else 146s for a instance variable lval 146s registers an offense for assignment using << in if else 146s registers an offense for assignment using << in case when 146s for a local variable lval 146s registers an offense for assignment using << in if else 146s registers an offense for assignment using << in case when 146s for a class variable lval 146s registers an offense for assignment using << in case when 146s registers an offense for assignment using << in if else 146s for a constant lval 146s registers an offense for assignment using << in if else 146s registers an offense for assignment using << in case when 146s for a global variable lval 146s registers an offense for assignment using << in ternary 146s behaves like all variable types 146s allows assignment to the return of a ternary 146s allows assignment to the return of if else 146s registers an offense assigning any variable type in ternary 146s registers an offense assigning any variable type in case when 146s registers an offense assigning any variable type in if else 146s allows assignment to the return of case when 146s 146s RuboCop::Cop::Style::MultilineInPatternThen 146s >= Ruby 2.7 146s does not register an offense for hash `in` statement with `then` 146s doesn't register an offense for multiline `in` statement without `then` 146s does not register an offense when line break for multiple candidate values of `in` 146s autocorrects when the body of `in` branch starts with `then` 146s doesn't register an offense for empty `in` statement without `then` 146s doesn't register an offense for singleline `in` statement with `then` 146s doesn't register an offense when `then` required for a body of `in` is used 146s registers an offense for multiline (two lines in a body) `in` statement with `then` 146s does not register an offense for array `when` statement with `then` 146s registers an offense for empty `in` statement with `then` 146s registers an offense for multiline (one line in a body) `in` statement with `then` 146s registers an offense when one line for multiple candidate values of `in` 146s doesn't register an offense for multiline `in` statement with `then` followed by other lines 146s 146s RuboCop::Cop::Style::TrailingCommaInHashLiteral 146s with single line list of values 146s when EnforcedStyleForMultiline is consistent_comma 146s registers an offense for trailing comma in a literal 146s accepts single element literal without trailing comma 146s accepts literal without trailing comma 146s accepts empty literal 146s when EnforcedStyleForMultiline is no_comma 146s accepts single element literal without trailing comma 146s registers an offense for trailing comma in a literal 146s accepts empty literal 146s accepts literal without trailing comma 146s when EnforcedStyleForMultiline is comma 146s accepts empty literal 146s accepts literal without trailing comma 146s registers an offense for trailing comma in a literal 146s accepts single element literal without trailing comma 146s with multi-line list of values 146s when EnforcedStyleForMultiline is consistent_comma 146s accepts trailing comma 146s accepts a multiline hash with a single pair and trailing comma 146s registers an offense for no trailing comma 146s accepts a multiline hash with pairs on a single line andtrailing comma 146s accepts trailing comma after a heredoc 146s when closing bracket is on same line as last value 146s registers an offense for literal with no trailing comma 146s when EnforcedStyleForMultiline is no_comma 146s accepts literal with no trailing comma 146s accepts comma in comment after last value item 146s registers an offense for trailing comma in literal 146s accepts comma inside a heredoc parameters at the end 146s when EnforcedStyleForMultiline is comma 146s accepts trailing comma 146s registers an offense for trailing comma in a comment 146s registers an offense for no trailing comma 146s accepts a multiline hash with a single pair and trailing comma 146s accepts trailing comma after a heredoc 146s when closing bracket is on same line as last value 146s accepts literal with no trailing comma 146s 146s RuboCop::Cop::Lint::ParenthesesAsGroupedExpression 146s accepts method with parens as arg to method without 146s does not register an offense when method argument parentheses are omitted and hash argument key is enclosed in parentheses 146s registers an offense and corrects for predicate method call with space before the parenthesis 146s does not register an offense for math expression 146s accepts a space inside opening paren followed by left paren 146s does not register an offense for math expression with `to_i` 146s accepts an operator call with argument in parentheses 146s does not register an offesne when heredoc has a space between the same string as the method name and `(` 146s does not register an offense for a call with multiple arguments 146s does not register an offense for expression followed by an operator 146s accepts a chain of method calls 146s accepts a method call with arguments but no parentheses 146s does not register an offense for expression followed by chained expression 146s registers an offense and corrects for method call with space before the parenthesis 146s does not register an offense for ternary operator 146s accepts a method call without arguments 146s does not register an offense for expression followed by chained expression with safe navigation operator 146s when using safe navigation operator 146s registers an offense and corrects for method call with space before the parenthesis 146s 146s RuboCop::Formatter::SimpleTextFormatter 146s #report_summary 146s when a file inspected and no offenses detected 146s handles pluralization correctly 146s when 2 offenses detected 146s handles pluralization correctly 146s when an offense is corrected 146s prints about correction 146s when 2 offenses detected and 2 offenses autocorrectable 146s handles pluralization correctly 146s when 2 offenses are corrected 146s handles pluralization correctly 146s when a offense detected 146s handles pluralization correctly 146s when no files inspected 146s handles pluralization correctly 146s when 2 offenses are corrected and 2 offenses autocorrectable 146s handles pluralization correctly 146s when a offense detected and a offense autocorrectable 146s handles pluralization correctly 146s #report_file 146s behaves like report for severity 146s when the offense is not corrected 146s prints message as-is 146s when the offense is correctable 146s prints message as-is 146s when the offense is automatically corrected 146s prints [Corrected] along with message 146s the file is outside of the current working directory 146s prints as absolute path 146s when the offense is marked as todo 146s prints [Todo] along with message 146s the file is under the current working directory 146s prints as relative path 146s behaves like report for severity 146s the file is outside of the current working directory 146s prints as absolute path 146s when the offense is automatically corrected 146s prints [Corrected] along with message 146s when the offense is marked as todo 146s prints [Todo] along with message 146s the file is under the current working directory 146s prints as relative path 146s when the offense is correctable 146s prints message as-is 146s when the offense is not corrected 146s prints message as-is 146s behaves like report for severity 146s when the offense is automatically corrected 146s prints [Corrected] along with message 146s when the offense is marked as todo 146s prints [Todo] along with message 146s when the offense is correctable 146s prints message as-is 146s when the offense is not corrected 146s prints message as-is 146s the file is outside of the current working directory 146s prints as absolute path 146s the file is under the current working directory 146s prints as relative path 146s behaves like report for severity 146s when the offense is not corrected 146s prints message as-is 146s the file is under the current working directory 146s prints as relative path 146s when the offense is marked as todo 146s prints [Todo] along with message 146s when the offense is correctable 146s prints message as-is 146s the file is outside of the current working directory 146s prints as absolute path 146s when the offense is automatically corrected 146s prints [Corrected] along with message 146s behaves like report for severity 146s when the offense is marked as todo 146s prints [Todo] along with message 146s the file is outside of the current working directory 146s prints as absolute path 146s the file is under the current working directory 146s prints as relative path 146s when the offense is correctable 146s prints message as-is 146s when the offense is automatically corrected 146s prints [Corrected] along with message 146s when the offense is not corrected 146s prints message as-is 146s behaves like report for severity 146s the file is outside of the current working directory 146s prints as absolute path 146s when the offense is correctable 146s prints message as-is 146s when the offense is marked as todo 146s prints [Todo] along with message 146s when the offense is automatically corrected 146s prints [Corrected] along with message 146s the file is under the current working directory 146s prints as relative path 146s when the offense is not corrected 146s prints message as-is 146s 146s RuboCop::Cop::Layout::SpaceInsideArrayPercentLiteral 146s accepts non array percent literals 146s for I type and ["[", "]"] delimiters 146s accepts literals with escaped and additional spaces 146s accepts multi-line literals 146s accepts multi-line literals within a method 146s accepts literals without additional spaces 146s accepts literals with escaped spaces 146s registers an offense for multiple spaces between items 146s registers an offense for unnecessary spaces 146s accepts newlines and additional following alignment spaces 146s for I type and ["(", ")"] delimiters 146s accepts literals with escaped spaces 146s registers an offense for multiple spaces between items 146s registers an offense for unnecessary spaces 146s accepts multi-line literals 146s accepts newlines and additional following alignment spaces 146s accepts multi-line literals within a method 146s accepts literals without additional spaces 146s accepts literals with escaped and additional spaces 146s for i type and ["!", "!"] delimiters 146s accepts literals with escaped and additional spaces 146s accepts literals without additional spaces 146s registers an offense for unnecessary spaces 146s accepts literals with escaped spaces 146s accepts newlines and additional following alignment spaces 146s accepts multi-line literals 146s accepts multi-line literals within a method 146s registers an offense for multiple spaces between items 146s for w type and ["(", ")"] delimiters 146s accepts multi-line literals within a method 146s accepts multi-line literals 146s accepts literals with escaped and additional spaces 146s accepts literals with escaped spaces 146s accepts literals without additional spaces 146s accepts newlines and additional following alignment spaces 146s registers an offense for unnecessary spaces 146s registers an offense for multiple spaces between items 146s for I type and ["!", "!"] delimiters 146s accepts literals with escaped and additional spaces 146s accepts multi-line literals within a method 146s accepts literals without additional spaces 146s accepts literals with escaped spaces 146s accepts multi-line literals 146s accepts newlines and additional following alignment spaces 147s registers an offense for multiple spaces between items 147s registers an offense for unnecessary spaces 147s for W type and ["{", "}"] delimiters 147s accepts literals without additional spaces 147s accepts newlines and additional following alignment spaces 147s registers an offense for unnecessary spaces 147s accepts literals with escaped and additional spaces 147s registers an offense for multiple spaces between items 147s accepts multi-line literals 147s accepts literals with escaped spaces 147s accepts multi-line literals within a method 147s for w type and ["{", "}"] delimiters 147s accepts literals with escaped spaces 147s accepts multi-line literals 147s registers an offense for unnecessary spaces 147s accepts literals with escaped and additional spaces 147s accepts literals without additional spaces 147s registers an offense for multiple spaces between items 147s accepts multi-line literals within a method 147s accepts newlines and additional following alignment spaces 147s for w type and ["!", "!"] delimiters 147s accepts multi-line literals within a method 147s accepts literals without additional spaces 147s registers an offense for unnecessary spaces 147s registers an offense for multiple spaces between items 147s accepts multi-line literals 147s accepts literals with escaped spaces 147s accepts newlines and additional following alignment spaces 147s accepts literals with escaped and additional spaces 147s for W type and ["!", "!"] delimiters 147s registers an offense for unnecessary spaces 147s accepts multi-line literals 147s accepts newlines and additional following alignment spaces 147s accepts literals without additional spaces 147s registers an offense for multiple spaces between items 147s accepts literals with escaped spaces 147s accepts literals with escaped and additional spaces 147s accepts multi-line literals within a method 147s for I type and ["{", "}"] delimiters 147s accepts literals with escaped spaces 147s accepts literals with escaped and additional spaces 147s accepts newlines and additional following alignment spaces 147s accepts literals without additional spaces 147s registers an offense for unnecessary spaces 147s accepts multi-line literals 147s registers an offense for multiple spaces between items 147s accepts multi-line literals within a method 147s for w type and ["[", "]"] delimiters 147s accepts literals with escaped and additional spaces 147s registers an offense for unnecessary spaces 147s accepts multi-line literals 147s accepts multi-line literals within a method 147s registers an offense for multiple spaces between items 147s accepts literals with escaped spaces 147s accepts newlines and additional following alignment spaces 147s accepts literals without additional spaces 147s for W type and ["[", "]"] delimiters 147s accepts multi-line literals within a method 147s registers an offense for unnecessary spaces 147s accepts newlines and additional following alignment spaces 147s accepts multi-line literals 147s accepts literals with escaped spaces 147s accepts literals with escaped and additional spaces 147s registers an offense for multiple spaces between items 147s accepts literals without additional spaces 147s for i type and ["{", "}"] delimiters 147s accepts newlines and additional following alignment spaces 147s registers an offense for multiple spaces between items 147s accepts literals with escaped and additional spaces 147s accepts literals without additional spaces 147s accepts multi-line literals 147s registers an offense for unnecessary spaces 147s accepts literals with escaped spaces 147s accepts multi-line literals within a method 147s for i type and ["[", "]"] delimiters 147s accepts literals with escaped and additional spaces 147s registers an offense for unnecessary spaces 147s accepts newlines and additional following alignment spaces 147s accepts multi-line literals 147s accepts literals without additional spaces 147s accepts literals with escaped spaces 147s registers an offense for multiple spaces between items 147s accepts multi-line literals within a method 147s for i type and ["(", ")"] delimiters 147s accepts literals with escaped spaces 147s accepts multi-line literals 147s registers an offense for unnecessary spaces 147s accepts literals with escaped and additional spaces 147s accepts multi-line literals within a method 147s accepts newlines and additional following alignment spaces 147s accepts literals without additional spaces 147s registers an offense for multiple spaces between items 147s for W type and ["(", ")"] delimiters 147s registers an offense for unnecessary spaces 147s registers an offense for multiple spaces between items 147s accepts newlines and additional following alignment spaces 147s accepts literals with escaped spaces 147s accepts multi-line literals within a method 147s accepts multi-line literals 147s accepts literals with escaped and additional spaces 147s accepts literals without additional spaces 147s 147s RuboCop::Cop::Lint::LambdaWithoutLiteralBlock 147s does not register an offense when using lambda with a symbol proc 147s registers and corrects an offense when using lambda with `&proc {}` block argument 147s does not register an offense when using lambda with a literal block 147s registers and corrects an offense when using lambda with a proc variable block argument 147s does not register an offense when using `lambda.call` 147s registers and corrects an offense when using lambda with `&Proc.new {}` block argument 147s 147s RuboCop::Cop::Naming::BinaryOperatorParameterName 147s does not register an offense for [] 147s registers an offense and corrects for `#eql?` when argument is not named other 147s does not register an offense for multibyte character method name 147s does not register an offense for []= 147s does not register an offense for the match operator 147s does not register an offense for arg named _other 147s does not register an offense for non binary operators 147s registers an offense and corrects for `#equal?` when argument is not named other 147s works properly even if the argument not surrounded with braces 147s does not register an offense for arg named other 147s registers an offense and corrects when assigned to argument in method body 147s does not register an offense for === 147s registers an offense and corrects when argument is referenced in method body 147s does not register an offense for << 147s registers an offense and corrects for `#+` when argument is not named other 147s 147s RuboCop::Cop::Style::SingleLineMethods 147s autocorrects def with argument in parentheses 147s autocorrects def with semicolon after method name 147s registers an offense for a single-line method 147s accepts a multi-line method 147s autocorrects def with argument and no parentheses 147s autocorrects def with semicolon before end 147s does not crash on an method with a capitalized name 147s autocorrects defs with parentheses after method name 147s registers an offense for a single-line method and method body is enclosed in parentheses 147s when `Style/EndlessMethod` is enabled 147s prior to ruby 3.0 147s corrects to a multiline method 147s with `allow_always` style 147s behaves like convert to endless method 147s corrects to an endless method definition 147s handles arguments properly 147s corrects to an endless class method definition when using > 147s corrects to an endless class method definition when using === 147s corrects to an endless method definition when single line method call with parentheses 147s does not add parens if they are already present 147s does not to an endless class method definition when using `break` 147s corrects to an endless class method definition when using >= 147s corrects to an endless class method definition when using == 147s does not to an endless class method definition when using `return` 147s does not to an endless class method definition when using `next` 147s corrects to an endless class method definition when using != 147s corrects to a normal method if the method body contains multiple statements 147s retains comments 147s corrects to an endless method definition when single line method call without parentheses 147s corrects to an endless method definition when method body is a literal 147s corrects to an endless class method definition 147s corrects to an endless class method definition when using < 147s corrects to an endless class method definition when using <= 147s corrects to multiline method definition when defining setter method 147s with AllowIfMethodIsEmpty: true 147s does not correct 147s with AllowIfMethodIsEmpty: false 147s does not turn a method with no body into an endless method 147s with `disallow` style 147s corrects to an normal method 147s with `allow_single_line` style 147s behaves like convert to endless method 147s retains comments 147s does not to an endless class method definition when using `next` 147s corrects to an endless class method definition when using == 147s corrects to an endless class method definition when using > 147s corrects to an endless method definition when single line method call with parentheses 147s corrects to multiline method definition when defining setter method 147s does not to an endless class method definition when using `return` 147s corrects to an endless class method definition when using != 147s corrects to an endless class method definition when using === 147s corrects to a normal method if the method body contains multiple statements 147s handles arguments properly 147s corrects to an endless class method definition when using < 147s corrects to an endless class method definition when using <= 147s corrects to an endless class method definition when using >= 147s corrects to an endless class method definition 147s corrects to an endless method definition 147s does not to an endless class method definition when using `break` 147s corrects to an endless method definition when single line method call without parentheses 147s corrects to an endless method definition when method body is a literal 147s does not add parens if they are already present 147s with AllowIfMethodIsEmpty: false 147s does not turn a method with no body into an endless method 147s with AllowIfMethodIsEmpty: true 147s does not correct 147s when `Style/EndlessMethod` is disabled 147s corrects to an normal method 147s when AllowIfMethodIsEmpty is disabled 147s registers an offense for an empty method 147s when AllowIfMethodIsEmpty is enabled 147s accepts a single-line empty method 147s endless methods 147s does not register an offense 147s 147s RuboCop::Cop::Security::IoMethods 147s when using `IO` receiver and string argument 147s registers and corrects an offense when using `foreach` 147s behaves like offense 147s registers and corrects an offense when using `binwrite` 147s behaves like offense 147s registers and corrects an offense when using `read` 147s behaves like offense 147s registers and corrects an offense when using `write` 147s behaves like offense 147s registers and corrects an offense when using `readlines` 147s behaves like offense 147s registers and corrects an offense when using `binwrite` 147s when using no receiver 147s behaves like accepts 147s does not register an offense when using `foreach("command") { |x| puts x }` 147s behaves like accepts 147s does not register an offense when using `binwrite("command", "hi")` 147s behaves like accepts 147s does not register an offense when using `read("command")` 147s behaves like accepts 147s does not register an offense when using `readlines("command")` 147s behaves like accepts 147s does not register an offense when using `write("command", "hi")` 147s when using `IO` receiver and string argument that starts with a pipe character (`" | command"`) 147s behaves like accepts 147s does not register an offense when using `IO.foreach(" | command") { |x| puts x }` 147s behaves like accepts 147s does not register an offense when using `IO.write(" | command", "hi")` 147s behaves like accepts 147s does not register an offense when using `IO.readlines(" | command")` 147s behaves like accepts 147s does not register an offense when using `IO.binwrite(" | command", "hi")` 147s behaves like accepts 147s does not register an offense when using `IO.read(" | command")` 147s when using `IO` receiver and string argument that starts with a pipe character (`"| command"`) 147s behaves like accepts 147s does not register an offense when using `IO.readlines("| command")` 147s behaves like accepts 147s does not register an offense when using `IO.foreach("| command") { |x| puts x }` 147s behaves like accepts 147s does not register an offense when using `IO.binwrite("| command", "hi")` 147s behaves like accepts 147s does not register an offense when using `IO.write("| command", "hi")` 147s behaves like accepts 147s does not register an offense when using `IO.read("| command")` 147s when using `File` receiver 147s behaves like accepts 147s does not register an offense when using `File.binread(path)` 147s behaves like accepts 147s does not register an offense when using `File.foreach(path) { |x| puts x }` 147s behaves like accepts 147s does not register an offense when using `File.readlines(path)` 147s behaves like accepts 147s does not register an offense when using `File.binwrite(path, "hi")` 147s behaves like accepts 147s does not register an offense when using `File.read(path)` 147s when using `IO` receiver and variable argument 147s registers and corrects an offense when using `foreach` 147s behaves like offense 147s registers and corrects an offense when using `write` 147s behaves like offense 147s registers and corrects an offense when using `read` 147s behaves like offense 147s registers and corrects an offense when using `binwrite` 147s behaves like offense 147s registers and corrects an offense when using `readlines` 147s behaves like offense 147s registers and corrects an offense when using `binread` 147s 147s RuboCop::Cop::Lint::ShadowedException 147s multiple rescues 147s accepts rescuing exceptions in order of level 147s registers an offense rescuing out of order exceptions when there is an ensure 147s accepts rescuing a known exception before an unknown exceptions 147s registers an offense when a higher level exception is rescued before a lower level exception 147s accepts rescuing exceptions in order of level with multiple exceptions in a group 147s accepts rescuing a known exception after an unknown exceptions 147s accepts rescuing a known exception between unknown exceptions 147s ignores expressions of non-const 147s accepts many (>= 7) rescue groups 147s registers an offense rescuing Exception before an unknown exceptions 147s accepts rescuing custom exceptions in multiple rescue groups 147s registers an offense for two exceptions when there are multiple levels of exceptions in the same rescue 147s accepts rescuing exceptions in order of level with multiple exceptions in a group with custom exceptions 147s registers an offense when a higher level exception is rescued before a lower level exception when there are multiple exceptions rescued in a group 147s last rescue does not specify exception class 147s highlights range ending at rescue keyword 147s splat arguments 147s accepts splat arguments passed to multiple rescues 147s does not register an offense for splat arguments rescued after rescuing a known exception 147s registers an offense for splat arguments rescued after rescuing Exception 147s exceptions from different ancestry chains 147s accepts rescuing exceptions in one order 147s accepts rescuing exceptions in another order 147s single rescue 147s accepts rescue containing multiple same error code exceptions 147s registers an offense rescuing Exception with any other error or exception 147s accepts rescuing a single custom exception 147s accepts splat arguments passed to rescue 147s rescue a exception without causing constant name deprecation warning 147s accepts an empty rescue 147s registers an offense for the same exception multiple times 147s accepts rescuing multiple custom exceptions 147s accepts rescuing a multiple exceptions that are not ancestors that have an else 147s accepts rescuing a single exception 147s accepts rescuing a single exception that has an else 147s accepts rescuing a custom exception and a standard exception 147s accepts rescuing a single exception that is assigned to a variable 147s registers an offense rescuing exceptions that are ancestors of each other 147s accepts rescuing a single exception that has an ensure 147s when there are multiple levels of exceptions in the same rescue 147s registers an offense for two exceptions 147s registers an offense for more than two exceptions 147s modifier rescue 147s accepts rescue in its modifier form 147s 147s RuboCop::Cop::Lint::UriRegexp 147s does not register an offense when using `regexp` without receiver 147s registers an offense and corrects using `::URI.regexp` with argument 147s does not register an offense when using `regexp` with variable receiver 147s registers an offense and corrects using `::URI.regexp` without argument 147s registers an offense and corrects using `URI.regexp` without argument 147s registers an offense and corrects using `URI.regexp` with argument 147s array argument 147s registers an offense and corrects using `URI.regexp` with literal arrays 147s registers an offense and corrects using `URI.regexp` with %w arrays 147s registers an offense and corrects using `URI.regexp` with %i arrays 147s 147s RuboCop::Cop::Style::TrailingMethodEndStatement 147s autocorrects all trailing ends for larger example 147s register offense with trailing end inside class 147s register offense with trailing end on 2 line method 147s register offense with trailing end on method with comment 147s register offense with trailing end on 3 line method 147s register offense with trailing end on method with block 147s does not register on single line no op 147s does not register on single line method 147s when Ruby 3.0 or higher 147s does not register an offense when endless method definition signature and body are on different lines 147s does not register an offense when using endless method definition 147s 147s RuboCop::Cop::Naming::InclusiveLanguage 147s comments 147s registers an offense in a block comment 147s registers an offense in a single line comment 147s when CheckComments is false 147s does not register an offense 147s identifiers 147s when CheckIdentifiers config is true 147s registers an offense 147s when CheckIdentifiers config is false 147s does not register offenses for identifiers 147s filepath 147s CheckFilepaths is false 147s does not register an offense 147s one offense in filename 147s registers an offense 147s offense in directory name 147s registers an offense for a director 147s multiple offenses in filename 147s registers an offense with all problematic words 147s variables 147s when CheckVariables config is false 147s does not register offenses for variables 147s when CheckVariables config is true 147s registers offenses for global variables 147s registers offenses for class variables 147s registers offenses for instance variables 147s flagged term matching 147s registers an offense when using a flagged term 147s registers an offense for a partial word match 147s registers an offense when using a flagged term with mixed case 147s WholeWord: true 147s only flags when the term is a whole word 147s multiple offenses on a line 148s registers an offense for each word 148s disable default flagged term 148s ignores flagged terms that are set to nil 148s regex 148s registers an offense for a flagged term matched with a regexp 148s symbols 148s when CheckSymbols is true 148s registers an offense 148s when CheckSymbols is false 148s does not register an offense 148s allowed use 148s does not register an offense for an allowed use 148s offense after an allowed use 148s registers an offense at the correct location 148s strings 148s registers an offense for an interpolated string 148s does not register offenses and not raise `ArgumentError` for invalid byte sequence in UTF-8 148s registers an offense in a heredoc 148s registers an offense for a multiline string 148s when CheckStrings config is false 148s does not register offenses for strings 148s constants 148s when CheckConstants config is false 148s does not register offenses for constants 148s when CheckConstants config is true 148s registers offenses for constants 148s suggestions 148s flagged term with three or more suggestions 148s includes all suggestions in the message 148s flagged term with one suggestion 148s includes the suggestion in the offense message 148s flagged term with two suggestions 148s includes both suggestions in the offense message 148s 148s RuboCop::Cop::InternalAffairs::NodeMatcherDirective 148s does not insert a blank line if one already exists 148s autocorrects with the right arguments if the pattern includes arguments 148s inserts a blank line between multiple pattern matchers 148s registers an offense if the matcher does not have a directive but has preceding comments 148s registers an offense if the directive name does not match the actual name 148s retains indentation properly when inserting 148s does not register an offense if the node matcher already has a directive 148s registers an offense if the matcher has multiple directives 148s does not register an offense if the directive is in a comment block 148s registers an offense if the matcher does not have a directive and a method call is used for a pattern argument 148s does not register an offense if called with a dynamic method name 148s registers an offense if the matcher does not have a directive 148s retains indentation properly when correcting 148s does not register an offense if the directive is in a comment block 148s registers an offense if the matcher does not have a directive and a method call is used for a pattern argument 148s does not insert a blank line if one already exists 148s registers an offense if the matcher has multiple directives 148s registers an offense if the matcher does not have a directive but has preceding comments 148s does not register an offense if called with a dynamic method name 148s inserts a blank line between multiple multi-line pattern matchers 148s autocorrects with the right arguments if the pattern includes arguments 148s autocorrects with the right arguments if the pattern references a non-contiguous argument 148s registers an offense if the directive name does not match the actual name 148s autocorrects with the right arguments if the pattern references a non-contiguous argument 148s retains indentation properly when correcting 148s does not register an offense if the node matcher already has a directive 148s inserts a blank line between multiple multi-line pattern matchers 148s registers an offense if the matcher does not have a directive 148s inserts a blank line between multiple pattern matchers 148s retains indentation properly when inserting 148s 148s RuboCop::Cop::Naming::BlockForwarding 148s when `EnforcedStyle: anonymous 148s Ruby < 3.0 148s does not register an offense when not using anonymous block forwarding 148s Ruby >= 3.1 148s registers and corrects an only explicit block forwarding when using multiple proc arguments 148s registers and corrects an offense when using `yield` in method body 148s registers and corrects an offense when using explicit block forwarding without method body 148s does not register an offense when assigning the block arg 148s registers and corrects an offense when using symbol proc argument in method body 148s registers and corrects an offense when using explicit block forwarding without method definition parentheses 148s does not register an offense when using block argument as a variable 148s does not register an offense when defining no arguments method 148s does not register an offense when defining kwarg with block args method 148s does not register an offense when using anonymous block forwarding 148s does not register an offense when defining without block argument method 148s does not register an offense when using anonymous block forwarding without method body 148s registers and corrects an offense when using explicit block forwarding 148s does not register an offense when defining kwoptarg with block args method 148s registers and corrects an offense when using explicit block forwarding in singleton method 148s when `EnforcedStyle: explicit 148s Ruby >= 3.1 148s registers and corrects an offense when using anonymous block forwarding 148s registers and corrects and corrects an offense when using anonymous block forwarding without method body 148s registers and corrects an offense when using anonymous block forwarding in singleton method 148s does not register an offense when using explicit block forwarding without method body 148s registers and corrects an offense when using `yield` in method body 148s does not register an offense when using explicit block forwarding 148s does not register an offense when defining without block argument method 148s does not register an offense when assigning the block arg 148s registers and corrects an offense when using symbol proc argument in method body 148s when `BlockForwardingName: proc 148s registers and corrects an offense when using anonymous block forwarding 148s when `BlockForwardingName: block` is already in use 148s registers and no corrects an offense when using anonymous block forwarding 148s 148s RuboCop::Cop::InternalAffairs::MethodNameEqual 148s registers an offense when using `#method == :do_something` 148s registers an offense when using `#method == other_node.do_something` 148s does not register an offense when using `#method?` 148s 148s RuboCop::Cop::Style::MethodCallWithArgsParentheses 148s when inspecting macro methods with IncludedMacros 148s in a module body 148s finds offense 148s in a class body 148s finds offense 148s for a macro not on the included list 148s allows 148s behaves like endless methods 148s endless methods 148s without arguments 148s does not register an offense when there are no parens 148s does not register an offense for `defs` when there are arguments 148s does not register an offense for `defs` when there are parens 148s does not register an offense when there are parens 148s does not register an offense when there are arguments 148s with arguments 148s requires method calls to have parens 148s for a macro in both IncludedMacros and AllowedMethods 148s allows 148s when EnforcedStyle is require_parentheses (default) 148s register an offense for method call without parens 148s autocorrects fully parenthesized args by removing space 148s accepts no parens in method call without args 148s accepts no parens for setter methods 148s accepts parens in method call with do-end blocks 148s autocorrects calls with multiple args by adding needed braces 148s autocorrects parenthesized args for local methods by removing space 148s autocorrects call with multiple args by adding braces 148s autocorrects calls where multiple args are method calls 148s register no offense for superclass call with parens 148s register no offense for superclass call without args 148s register no offense for yield without args 148s accepts parens in method call with args 148s register an offense for superclass call without parens 148s autocorrects calls where arg is method call 148s accepts no parens for unary operators 148s register an offense for yield without parens 148s register an offense for non-receiver method call without parens 148s autocorrects partially parenthesized args by adding needed braces 148s accepts no parens for operators 148s register an offense for methods starting with capital without parens 148s autocorrects calls where the argument node is a number 148s autocorrects calls where the argument node is a constant 148s when using safe navigation operator 148s register an offense for method call without parens 148s behaves like endless methods 148s endless methods 148s without arguments 148s does not register an offense when there are no parens 148s does not register an offense when there are parens 148s does not register an offense when there are arguments 148s does not register an offense for `defs` when there are parens 148s does not register an offense for `defs` when there are arguments 148s with arguments 148s requires method calls to have parens 148s when inspecting macro methods 148s in a module body 148s does not register an offense 148s in a class body 148s does not register an offense 148s AllowedPatterns 148s ignored methods listed in AllowedPatterns 148s with AllowedMethods 148s allow method listed in AllowedMethods 148s allowing parens in string interpolation 148s accepts parens for camel-case method names 148s when EnforcedStyle is omit_parentheses 148s register an offense for parens in string interpolation 148s accepts parens in calls with args with logical operators 148s accepts parens in nested method args 148s accepts special lambda call syntax 148s register an offense for %r regex literal as arguments 148s accepts parens in slash regexp literal as argument 148s accepts parens in argument calls with braced blocks 148s accepts no parens in method call with args 148s accepts parens in blocks with braces 148s register an offense for yield call with parens 148s accepts parens in single-line inheritance 148s accepts parens in literals with unary operators as first argument 148s register an offense for parens in do-end blocks 148s accepts parens in method args 148s register an offense in assignments 148s accepts parens in yield argument method calls 148s register an offense for parens in method call without args 148s accepts parens in chaining with operators 148s register an offense for camel-case methods with arguments 148s accepts parens in args splat 148s accepts parens in camel case method without args 148s register an offense for hashes in keyword values 148s accepts no parens in method call without args 148s accepts parens in operator method calls 148s accepts parens in calls with hash as arg 148s accepts parens in super method calls as arguments 148s register an offense for multi-line method calls 148s accepts parens in assignment in conditions 148s accepts parens in range literals 148s accepts parens in args with ternary conditions 148s accepts parens in super without args 148s accepts parens in default argument value calls 148s accepts parens in calls with logical operators 148s accepts parens in super calls with braced blocks 148s autocorrects complex multi-line calls 148s accepts parens in block passing calls 148s autocorrects single-line calls 148s register an offense in complex conditionals 148s accepts parens in chaining with safe operators 148s accepts parens in ternary condition calls 148s accepts parens in chained method calls 148s autocorrects multi-line calls with trailing whitespace 148s accepts parens in splat calls 148s register an offense for parens in the last chain 148s accepts parens in implicit #to_proc 148s register an offense in multi-line inheritance 148s register an offense for superclass call with parens 148s accepts parens in default keyword argument value calls 148s forwarded arguments in 2.7 148s accepts parens for forwarded arguments 148s allowing parens in multi-line calls 148s accepts parens for multi-line calls 148s forwarded arguments in 3.0 148s accepts parens for forwarded arguments 148s allowing parens in camel-case methods 148s accepts parens for camel-case method names 148s allowing parenthesis in chaining 148s accepts parens in the last call if any previous calls with parentheses 148s accepts no parens in the last call if previous calls with parens 148s register offense for multi-line chaining without previous parens 148s register offense for single-line chaining without previous parens 148s behaves like endless methods 148s endless methods 148s without arguments 148s does not register an offense when there are arguments 148s does not register an offense for `defs` when there are arguments 148s registers an offense for `defs` when there are parens 148s registers an offense when there are parens 148s does not register an offense when there are no parens 148s with arguments 148s requires method calls to have parens 148s hash value omission in 3.1 148s does not register an offense when without parentheses call expr follows 148s registers an offense using assignment with parentheses call expr follows 148s does not register an offense when hash value omission with parentheses and using modifier form 148s registers an offense when last argument is a hash value omission 148s registers an offense when with parentheses call expr follows 148s registers and corrects an offense when explicit hash value with parentheses and using modifier form 148s numbered parameters in 2.7 148s accepts parens for braced numeric block calls 148s 148s RuboCop::Cop::InternalAffairs::EmptyLineBetweenExpectOffenseAndCorrection 148s does not register an offense when using only `expect_offense` 148s does not register an offense when using empty line between `expect_offense` and `expect_correction`with variable argument 148s registers and corrects an offense when using no empty line between `expect_offense` and `expect_correction`with variable argument 148s does not register an offense when using empty line between `expect_offense` and `expect_no_corrections` 148s does not register an offense when using empty line between `expect_offense` and `expect_correction` with heredoc argument 148s registers and corrects an offense when using no empty line between `expect_offense` and `expect_correction` with heredoc argument 148s registers and corrects an offense when using no empty line between `expect_offense` and `expect_no_corrections` 148s 148s RuboCop::CLI --disable-uncorrectable 148s --disable-uncorrectable 148s does not disable anything for cops that support autocorrect 148s when exist offense for Layout/SpaceInsideArrayLiteralBrackets 148s when `EnforcedStyle: space` 149s does not disable anything for cops that support autocorrect 149s when `EnforcedStyle: no_space` 149s does not disable anything for cops that support autocorrect 149s if one one-line disable statement fits 149s adds it when the cop supports autocorrect but does not correct the offense 149s adds it 149s and there are two offenses of the same kind on one line 149s adds a single one-line disable statement 149s but there are more offenses on the line and they don't all fit 150s adds both one-line and before-and-after disable statements 150s if a one-line disable statement doesn't fit 150s adds before-and-after disable statement 150s and the offense is inside a heredoc 150s adds before-and-after disable statement around the heredoc 150s 150s RuboCop::Cop::Layout::EmptyLinesAroundBlockBody 150s when EnforcedStyle is empty_lines for { } block 150s is not fooled by single line blocks 150s registers an offense for block body not starting or ending with a blank 150s ignores block with an empty body 150s when EnforcedStyle is no_empty_lines for { } block 150s registers an offense for block body ending with a blank 150s registers an offense for block body starting with a blank passed to a multi-line method call 150s registers an offense for block body starting with a blank 150s is not fooled by single line blocks 150s accepts block body starting with a line with spaces 150s Ruby 2.7 150s registers an offense for block body ending with a blank 150s when EnforcedStyle is empty_lines for do end block 150s ignores block with an empty body 150s is not fooled by single line blocks 150s registers an offense for block body not starting or ending with a blank 150s when EnforcedStyle is no_empty_lines for do end block 150s is not fooled by single line blocks 150s registers an offense for block body starting with a blank 150s registers an offense for block body ending with a blank 150s registers an offense for block body starting with a blank passed to a multi-line method call 150s accepts block body starting with a line with spaces 150s Ruby 2.7 150s registers an offense for block body ending with a blank 150s 150s RuboCop::Cop::InternalAffairs::StyleDetectedApiUse 150s registers an offense when unrecognized_style_detected is used without a correct_style_detected follow up 150s does not register an offense when correct_style_detected and a no_acceptable_style! are both used 150s registers an offense when conflicting_styles_detected is used without a correct_style_detected follow up 150s does not register an offense when correct_style_detected and a conflicting_styles_detected are both used 150s registers an offense when ambiguous_style_detected is used in a conditional expression 150s does not register an offense when correct_style_detected and a unexpected_style_detected are both used 150s registers an offense when unexpected_style_detected is used without a correct_style_detected follow up 150s registers an offense when unexpected_style_detected is used in a conditional expression 150s registers an offense when correct_style_detected is used in a conditional expression 150s registers an offense when ambiguous_style_detected is used without a correct_style_detected follow up 150s registers an offense when correct_style_detected is used without a negative *_style_detected follow up 150s registers an offense when no_acceptable_style! is used in a conditional expression 150s registers an offense when opposite_style_detected is used in a conditional expression 150s registers an offense when no_acceptable_style! is used without a correct_style_detected follow up 150s does not register an offense when correct_style_detected and a opposite_style_detected are both used 150s registers an offense when opposite_style_detected is used without a correct_style_detected follow up 150s registers an offense when conflicting_styles_detected is used in a conditional expression 150s does not register an offense when correct_style_detected and a ambiguous_style_detected are both used 150s does not register an offense when correct_style_detected and a unrecognized_style_detected are both used 150s registers an offense when unrecognized_style_detected is used in a conditional expression 150s 150s RuboCop::Formatter::TapFormatter 150s #report_file 150s when the source contains multibyte characters 150s displays text containing the offending source line 150s #file_finished 150s when any offenses are detected 150s prints "not ok" 150s when no offenses are detected 150s prints "ok" 150s #finished 150s when any offenses are detected 150s reports all detected offenses for all failed files 150s when no offenses are detected 150s does not report offenses 150s 150s RuboCop::Cop::InternalAffairs::RedundantContextConfigParameter 150s does not register an offense when not using `:config` 150s does not register an offense when using `:config` in other than `context` 150s registers an offense when using `:config` parameter 150s does not register an offense when using `:ruby30` only 150s registers an offense when using `:config` parameter with other parameters 150s 150s RuboCop::Cop::Style::HashSyntax 150s configured to enforce ruby 1.9 style with no mixed keys 150s UseHashRocketsWithSymbolValues enabled 150s accepts new syntax in a hash literal 150s accepts new syntax when keys are interpolated string 150s registers an offense when keys have whitespaces in them 150s registers offense for hash rocket syntax when new is possible 150s registers an offense when keys have different types and styles 150s registers an offense when keys have special symbols in them 150s accepts an empty hash 150s autocorrects to hash rockets when all elements have symbol value 150s registers an offense when any element uses a symbol for the value 150s accepts new syntax in method calls 150s registers an offense for hash rockets in method calls 150s registers an offense when any element has a symbol value in method calls 150s registers an offense for mixed syntax when new is possible 150s accepts hash rockets when keys have different types 150s registers an offense when keys start with a digit 150s ruby < 2.2 150s accepts hash rockets when keys start with a digit 150s accepts hash rockets when keys have special symbols in them 150s registers an offense when keys have special symbols and mix styles 150s registers an offense when keys start with a digit and mix styles 150s accepts hash rockets when keys have whitespaces in them 150s registers an offense when keys have whitespaces and mix styles 150s UseHashRocketsWithSymbolValues disabled 150s registers an offense when keys start with a digit 150s registers an offense when keys have different types and styles 150s registers an offense when keys have whitespaces in them 150s accepts an empty hash 150s accepts new syntax in a hash literal 150s registers an offense for mixed syntax when new is possible 150s registers an offense when keys have special symbols in them 150s accepts new syntax in method calls 150s registers an offense for hash rockets in method calls 150s accepts hash rockets when keys have different types 150s accepts new syntax when keys are interpolated string 150s registers offense for hash rocket syntax when new is possible 150s ruby < 2.2 150s registers an offense when keys have whitespaces and mix styles 150s accepts hash rockets when keys start with a digit 150s accepts hash rockets when keys have special symbols in them 150s registers an offense when keys start with a digit and mix styles 150s registers an offense when keys have special symbols and mix styles 150s accepts hash rockets when keys have whitespaces in them 150s configured to enforce no mixed keys 150s accepts hash rockets when keys have different types 150s accepts hash rockets when keys have special symbols in them 150s accepts an empty hash 150s accepts hash rockets when keys start with a digit 150s registers an offense when keys start with a digit and mix styles 150s autocorrects mixed key hashes 150s registers an offense when keys have different types and styles 150s accepts hash rockets when keys have whitespaces in them 150s accepts old hash rockets style 150s accepts new hash style 150s accepts the hash rocket syntax when new is possible 150s registers an offense when keys have special symbols and mix styles 150s registers an offense for mixed syntax when new is possible 150s accepts new syntax in a hash literal 150s registers an offense when keys have whitespaces and mix styles 150s accepts new syntax in method calls 150s accepts hash rockets in method calls 150s configured to accept both shorthand and explicit use of hash literal value 150s Ruby >= 3.1 150s does not register an offense when hash key and hash value are not the same 150s does not register an offense when hash values are omitted 150s does not register an offense when hash key and hash value are the same 150s does not register an offense when hash key and hash value are partially the same 150s Ruby <= 3.0 150s does not register an offense when hash key and hash value are the same 150s configured to disallow mixing of implicit and explicit hash literal value 150s Ruby <= 3.0 150s does not register an offense when all hash key and hash values are the same 150s Ruby >= 3.1 150s registers an offense when some hash values are omitted but they cannot all be omitted 150s registers an offense when some hash values are omitted but they can all be omitted 150s registers an offense when all hash values are present, but can all be omitted 150s does not register an offense when all hash values are omitted 150s does not register an offense when all hash values are present, but no values can be omitted 150s does not register an offense when all hash values are present, but only some values can be omitted 150s configured to enforce ruby19 style 150s with SpaceAroundOperators enabled 150s autocorrects even if it interferes with SpaceAroundOperators 150s registers an offense for mixed syntax when new is possible 150s accepts an empty hash 150s registers an offense for hash rockets in method calls 150s accepts hash rockets when symbol characters are not supported 150s registers offense for hash rocket syntax when new is possible 150s accepts hash rockets when symbol keys end with = 150s accepts new syntax in method calls 150s accepts new syntax in a hash literal 150s autocorrects a missing space when hash is used as argument 150s preserves quotes during autocorrection 150s accepts hash rockets when keys have different types 150s registers an offense when symbol keys have strings in them 150s registers offense when keys start with an uppercase letter 150s if PreferHashRocketsForNonAlnumEndingSymbols is true 151s accepts hash rockets when symbols end with ? 151s accepts hash rockets when symbols end with ! 151s if PreferHashRocketsForNonAlnumEndingSymbols is false 151s registers an offense for hash rockets when symbols end with ? 151s registers an offense for hash rockets when symbols end with ! 151s when using a return value uses `return` 151s registers an offense and corrects when enclosed in parentheses 151s registers an offense and corrects when not enclosed in parentheses 151s ruby < 2.2 151s accepts hash rockets when symbol keys have string in them 151s configured to use hash rockets when symbol values are found 151s registers an offense when any element has a symbol value in method calls 151s accepts hash in ruby19 style with no symbol values 151s accepts ruby19 syntax when no elements have symbol values 151s accepts both hash rockets and ruby19 syntax in the same code 151s registers an offense for hashes with elements on multiple lines 151s registers an offense when using hash rockets and no elements have a symbol value 151s autocorrects to hash rockets when all elements have symbol value 151s registers an offense when any element uses a symbol for the value 151s accepts ruby19 syntax when no elements have symbol values in method calls 151s accepts an empty hash 151s with SpaceAroundOperators disabled 151s autocorrects even if there is no space around => 151s configured to enforce explicit hash value syntax style 151s Ruby >= 3.1 151s does not register an offense when hash key and hash value are not the same 151s does not register an offense when hash key and hash value are the same 151s registers and corrects an offense when hash values are omitted 151s registers and corrects an offense when hash key and hash value are partially the same 151s Ruby <= 3.0 151s does not register an offense when hash key and hash value are the same 151s configured to enforce hash rockets style 151s registers an offense for 1.9 style in method calls 151s accepts an empty hash 151s accepts hash rockets in a hash literal 151s registers offense for Ruby 1.9 style 151s registers an offense for mixed syntax 151s accepts hash rockets in method calls 151s UseHashRocketsWithSymbolValues has no impact 151s does not register an offense when there is a symbol value 151s configured to enforce shorthand syntax style 151s Ruby <= 3.0 151s does not register an offense when hash key and hash value are the same 151s Ruby >= 3.1 151s does not register an offense when hash key and hash value are not the same 151s registers an offense when one line `until` condition follows (with parentheses) 151s does not register an offense when hash pattern matching 151s does not register an offense when symbol hash key and hash value (lvar) are not the same 151s registers and corrects an offense when hash key and hash value are the same 151s does not register an offense when hash key and hash value are the same but the value ends `?` 151s does not register an offense when call expr without arguments and with a block follows 151s registers and corrects an offense when hash key and hash value are the same and it in the method body 151s does not register an offense when one line `until` condition follows (without parentheses) 151s does not register an offense when lvar hash key and hash value are the same 151s does not register an offense when method call hash key and hash value are the same 151s registers and corrects an offense when hash key and hash value are the same and it in the method bodyand an expression follows 151s does not register an offense when one line `if` condition follows (without parentheses) 151s does not register an offense when without parentheses call expr follows after nested method call 151s does not register an offense when call expr with argument and a block follows 151s does not register an offense when hash key and hash value are the same but the value ends `!` 151s does not register an offense when hash values are omitted 151s does not register an offense when with parentheses call expr follows assignment expr 151s registers an offense when one line `if` condition follows (with parentheses) 151s does not register an offense when symbol hash key and string hash value are the same 151s registers an offense when hash key and hash value are not the same and method with `[]` is called 151s registers and corrects an offense when hash key and hash value (lvar) are the same 151s registers and corrects an offense when `Hash[foo: foo]` and an expression follows 151s registers and corrects an offense when hash key and hash value are partially the same 151s does not register an offense when `return` with one line `if` condition follows (without parentheses) 151s does not register an offense when hash key and hash value are partially the same 151s does not register an offense when without parentheses call expr follows 151s registers and corrects an offense when `Hash[foo: foo]` 151s does not register an offense when with parentheses call expr follows 151s when hash roket syntax 151s does not register an offense 151s 151s RuboCop::Cop::Style::GlobalStdStream 151s does not register an offense when using non std stream const 151s does not register an offense when assigning std stream const to std stream gvar 151s does not register an offense when assigning other const to std stream gvar 151s registers an offense and corrects when using std stream as const 151s 151s RuboCop::Cop::Layout::DefEndAlignment 151s when EnforcedStyleAlignWith is def 151s accepts matching foo def ... end 151s accepts matching def ... end 151s registers an offense for mismatched def Test.test end and autocorrects 151s registers an offense for mismatched foo def test end and autocorrects 151s registers an offense for mismatched def test end and autocorrects 151s accepts matching defs ... end 151s correct + opposite 151s registers an offense 151s when EnforcedStyleAlignWith is start_of_line 151s accepts matching def ... end 151s accepts matching foo def ... end 151s registers an offense for mismatched def Test.test end and autocorrects 151s accepts matching def ... end 151s accepts matching defs ... end 151s registers an offense for mismatched foo def test end and autocorrects 151s accepts matching foo bar def ... end 151s registers an offense for mismatched def test end and autocorrects 151s correct + opposite 151s registers an offense 151s when including an anonymous module containing `private def` 151s does not register an offense 151s when using refinements and `private def` 151s does not register an offense 151s 151s RuboCop::Cop::Style::ColonMethodCall 151s does not register an offense for constant access 151s does not register an offense when for constructor methods 151s does not register an offense for Java static types 151s registers an offense for instance method call with arg 151s registers an offense for class method call 151s does not register an offense for op methods 151s does not register an offense for nested class 151s registers an offense for instance method call 151s registers an offense for class method call with arg 151s does not register an offense for Java package namespaces 151s 151s RuboCop::Cop::Lint::UriEscapeUnescape 151s registers an offense when using `URI.encode('http://example.com')` 151s registers an offense when using `URI.unescape(enc_uri)` 151s registers an offense when using `::URI.unescape(enc_uri)` 151s registers an offense when using `::URI.escape('http://example.com')` 151s registers an offense when using `::URI.decode(enc_uri)` 151s registers an offense when using `URI.escape('http://example.com')` 151s registers an offense when using `URI.escape('@?@!', '!?')` 151s registers an offense when using `::URI.encode('http://example.com)` 151s registers an offense when using `URI.decode(enc_uri)` 151s 151s RuboCop::Cop::Style::RescueStandardError 151s implicit 151s accepts rescue modifier 151s when rescuing in a method definition 151s accepts rescuing StandardError with other errors, assigned to a variable 151s accepts rescuing a single error other than StandardError, assigned to a variable 151s accepts rescuing a single error other than StandardError 151s accepts rescuing StandardError with other errors 151s accepts rescuing no error class, assigned to a variable 151s accepts rescuing no error class 151s when rescuing StandardError by itself 151s registers an offense 151s when the error is assigned to a variable 151s registers an offense 151s when rescuing in a begin block 151s accepts rescuing a single error class other than StandardError, assigned to a variable 151s accepts rescuing StandardError with other errors, assigned to a variable 151s accepts rescuing no error class 151s accepts rescuing no error class, assigned to a variable 151s accepts rescuing a single error class other than StandardError 151s accepts rescuing ::StandardError with other errors 151s accepts rescuing StandardError with other errors 151s when rescuing StandardError by itself 151s registers an offense 151s when the error is assigned to a variable 151s registers an offense 151s with ::StandardError 151s registers an offense 151s with ::StandardError 151s registers an offense 151s explicit 151s accepts rescue modifier 151s when rescuing in a method definition 151s accepts rescuing StandardError with other errors, assigned to a variable 151s accepts rescuing StandardError with other errors 151s accepts rescuing StandardError by itself 151s accepts rescuing StandardError by itself, assigned to a variable 151s accepts rescuing a single error other than StandardError 151s accepts rescuing a single error other than StandardError, assigned to a variable 151s when the error is assigned to a variable 151s registers an offense 151s when rescue is called without an error class 151s registers an offense 151s when rescuing in a begin block 151s accepts rescuing StandardError by itself 151s accepts rescuing a single error other than StandardError 151s accepts rescuing a single error other than StandardErrorassigned to a variable 151s accepts rescuing StandardError by itself, assigned to a variable 151s accepts rescuing StandardError with other errors 151s accepts rescuing StandardError with other errors, assigned to a variable 151s when calling rescue without an error class 151s registers an offense 151s when the error is assigned to a variable 151s registers an offense 151s 151s RuboCop::Cop::Style::For 151s when for is the enforced style 151s registers an offense for multiline each 151s registers an offense for correct + opposite style 151s registers an offense for a tuple of items 151s registers an offense for each without an item and uses _ as the item 151s accepts single line each 151s accepts for 151s registers multiple offenses 151s Ruby 2.7 151s registers an offense for each without an item and uses _ as the item 151s when using safe navigation operator 151s does not break 151s when each is the enforced style 151s registers an offense for opposite + correct style 151s accepts def for 151s accepts multiline each 151s registers an offense for for 151s registers multiple offenses 151s accepts :for 151s autocorrect 151s corrects a tuple of items 151s corrects an array with `||` operator 151s corrects an array with `-` operator 151s corrects an array with `&&` operator 151s corrects an array with `+` operator 151s corrects an array with `*` operator 151s corrects to `each` without parenthesize collection if non-operator method called 151s changes for that does not have do or semicolon to each 151s corrects an array with `|` operator 151s corrects an array with `&` operator 151s with range 151s changes for that does not have do or semicolon to each 151s changes for to each 151s without parentheses 151s changes for that does not have do or semicolon to each 151s changes for to each 151s 151s RuboCop::Cop::Style::QuotedSymbols 151s configured with `single_quotes` 151s behaves like enforce single quotes 151s registers an offense and corrects for double quotes in hash keys 151s accepts single quotes with line breaks 151s accepts double quotes when interpolating an instance variable 151s accepts double quotes with interpolation 151s accepts double quotes when interpolating a global variable 151s accepts single quotes with double quotes 151s accepts double quotes with single quotes 151s accepts double quotes with line breaks 151s accepts single quoted symbol with an escaped quote 151s accepts double quotes when control characters are used 151s accepts double quotes with escape sequences 151s accepts unquoted symbols 151s accepts single quotes 151s registers an offense and corrects for an escaped quote within double quotes 151s registers an offense and corrects for double quotes without interpolation 151s accepts double quotes when interpolating a class variable 151s accepts double quotes with some other special symbols 151s accepts double quotes when unicode control sequence is used 151s registers an offense and corrects escape characters properly 151s hash with hashrocket style 151s corrects wrong quotes 151s accepts properly quoted symbols 151s configured with `same_as_string_literals` 151s when Style/StringLiterals is disabled 151s behaves like enforce single quotes 151s accepts unquoted symbols 151s accepts single quoted symbol with an escaped quote 151s registers an offense and corrects for an escaped quote within double quotes 151s accepts double quotes with some other special symbols 151s accepts double quotes with single quotes 151s accepts double quotes with escape sequences 151s accepts double quotes with line breaks 151s accepts double quotes with interpolation 151s accepts double quotes when interpolating a global variable 151s registers an offense and corrects escape characters properly 151s registers an offense and corrects for double quotes without interpolation 151s accepts double quotes when interpolating a class variable 151s accepts single quotes with line breaks 151s accepts single quotes 151s registers an offense and corrects for double quotes in hash keys 151s accepts double quotes when control characters are used 151s accepts double quotes when unicode control sequence is used 151s accepts single quotes with double quotes 151s accepts double quotes when interpolating an instance variable 151s hash with hashrocket style 151s corrects wrong quotes 151s accepts properly quoted symbols 151s when Style/StringLiterals is configured with double_quotes 151s behaves like enforce double quotes 151s accepts double quotes when interpolating a global variable 151s accepts double quotes 151s registers an offense for single quotes 151s accepts double quotes with single quotes 151s accepts single quotes with line breaks 151s registers an offense and corrects for an escaped quote within single quotes 151s accepts double quoted symbol with an escaped quote 151s accepts double quotes with interpolation 151s accepts double quotes when interpolating an instance variable 151s registers an offense and corrects escape characters properly 151s accepts double quotes with line breaks 151s accepts single quotes with double quotes 151s accepts unquoted symbols 151s accepts double quotes when interpolating a class variable 151s accepts double quotes with escape sequences 151s hash with hashrocket style 151s accepts properly quoted symbols 151s corrects wrong quotes 151s when Style/StringLiterals is configured with single_quotes 151s behaves like enforce single quotes 151s accepts single quotes with line breaks 151s accepts double quotes when unicode control sequence is used 151s registers an offense and corrects for double quotes without interpolation 151s registers an offense and corrects for an escaped quote within double quotes 151s accepts double quotes when interpolating a class variable 151s accepts double quotes with interpolation 151s accepts single quotes with double quotes 151s accepts single quotes 151s accepts double quotes with line breaks 151s accepts unquoted symbols 151s accepts double quotes with escape sequences 151s accepts double quotes when interpolating a global variable 151s accepts double quotes with single quotes 151s accepts double quotes when control characters are used 151s accepts single quoted symbol with an escaped quote 151s registers an offense and corrects for double quotes in hash keys 151s accepts double quotes with some other special symbols 151s registers an offense and corrects escape characters properly 151s accepts double quotes when interpolating an instance variable 151s hash with hashrocket style 151s accepts properly quoted symbols 151s corrects wrong quotes 151s configured with `double_quotes` 151s behaves like enforce double quotes 151s accepts double quotes 151s accepts unquoted symbols 151s accepts double quotes when interpolating an instance variable 151s registers an offense and corrects escape characters properly 151s registers an offense and corrects for an escaped quote within single quotes 151s accepts double quoted symbol with an escaped quote 151s accepts double quotes with interpolation 151s accepts single quotes with line breaks 151s accepts double quotes with single quotes 151s accepts double quotes with escape sequences 151s accepts double quotes when interpolating a global variable 151s accepts double quotes when interpolating a class variable 151s accepts double quotes with line breaks 151s registers an offense for single quotes 151s accepts single quotes with double quotes 151s hash with hashrocket style 151s accepts properly quoted symbols 151s corrects wrong quotes 151s 151s RuboCop::Cop::VariableForce::Variable 151s #referenced? 151s when the variable is not assigned 151s is expected to be falsey 151s and the variable is referenced 151s is expected to be truthy 151s when the variable has an assignment 151s and the variable is referenced 151s is expected to be truthy 151s and the variable is not yet referenced 151s is expected to be falsey 151s .new 151s when non variable declaration node is passed 151s raises error 151s 151s RuboCop::Cop::Layout::ClosingParenthesisIndentation 151s accepts begin nodes that are not grouped expressions 151s for method definitions 151s with line break before 1st parameter 152s accepts a correctly aligned ) 152s registers an offense for misaligned ) 152s with no line break before 1st parameter 152s registers an offense for misaligned ) 152s accepts a correctly aligned ) 152s accepts empty () 152s for grouped expressions 152s with line break before 1st operand 152s accepts a correctly aligned ) 152s registers an offense for misaligned ) 152s with no line break before 1st operand 152s accepts ) that does not begin its line 152s registers an offense for misaligned ) 152s accepts a correctly aligned ) 152s for method assignments with indented parameters 152s with no line break before 1st parameter 152s registers an offense for misaligned ) 152s accepts a correctly aligned ) 152s can handle indentation up against the left edge 152s accepts a correctly indented ) 152s can handle hash arguments that are not broken over lines 152s can handle individual arguments that are broken over lines 152s can handle inner method calls 152s with line break before 1st parameter 152s accepts a correctly aligned ) 152s registers an offense for misaligned ) 152s without arguments 152s can handle indentation up against the method 152s accepts empty () 152s registers an offense for misaligned ) 152s can handle indentation up against the left edge 152s accepts a correctly aligned ) against ( 152s for method chains 152s can handle multiple chains with differing breaks 152s registers an offense and corrects method chains 152s when using safe navigation operator 152s registers an offense and corrects misaligned ) 152s for method calls 152s with no line break before 1st parameter 152s accepts a correctly indented ) inside a block 152s registers an offense for misaligned ) 152s accepts a correctly indented ) 152s registers an offense and corrects misindented ) when ) is aligned with the params 152s accepts a correctly aligned ) 152s does not register an offense when using keyword arguments 152s without arguments 152s can handle indentation up against the left edge 152s accepts empty () 152s accepts a correctly aligned ) against ( 152s with first multiline arg on new line 152s accepts ) on the same level as ( with second arg on new line 152s accepts ) on the same level as ( with args on same line 152s with line break before 1st parameter 152s accepts a correctly aligned ) 152s registers an offense for misaligned ) 152s 152s RuboCop::Cop::Style::RedundantInterpolation 152s registers an offense for "#{1 + 1; 2 + 2}" 152s registers an offense for "#@var" 152s accepts strings implicitly concatenated with an earlier string 152s registers an offense for "%|#{1 + 1}|" 152s registers an offense for "#{1 + 1}" 152s registers an offense for "#{$+}" 152s registers an offense for "#$1" 152s registers an offense for "#{number}" 152s registers an offense for "%Q(#{1 + 1})" 152s registers an offense for ["#{@var}"] 152s accepts strings with characters after the interpolation 152s registers an offense for "#{@@var}" 152s registers an offense for "#{@var}" 152s accepts strings with characters before the interpolation 152s registers an offense for "#$var" 152s registers an offense for "#{$1}" 152s registers an offense for "#{do_something 42}" 152s registers an offense for "#@@var" 152s registers an offense for "#{do_something(42)}" 152s registers an offense for "#{var}" 152s registers an offense for "#{foo.do_something 42}" 152s registers an offense for "#{$var}" 152s registers an offense for "#$+" 152s accepts strings that are part of a %W() 152s accepts strings implicitly concatenated with a later string 152s 152s RuboCop::Cop::Style::Encoding 152s registers an offense and corrects the magic comment follows another magic comment 152s does not register an offense when encoding is not at the top of the file 152s registers an offense when encoding present and UTF-8 152s does not register an offense when no encoding present 152s registers an offense when encoding present on 2nd line after shebang 152s does not register an offense when encoding is in the wrong place 152s does not register an offense when encoding present but not UTF-8 152s registers an offense and corrects if there are multiple encoding magic comments 152s does not register an offense on a different magic comment type 152s vim comments 152s registers an offense and corrects 152s emacs comment 152s registers an offense for encoding 152s only removes encoding if there are other editor comments 152s 152s RuboCop::Cop::Lint::CircularArgumentReference 152s circular argument references in keyword arguments 152s when the keyword argument is not circular 152s does not register an offense 152s when there are multiple offensive keyword arguments 152s registers an offense 152s when there is one circular argument reference 152s registers an offense 152s when the keyword argument is not circular, but calls a method of its own class with a self specification 152s does not register an offense 152s when the keyword argument is not circular, but calls a method of some other object with the same name 152s does not register an offense 152s when the keyword argument is not circular, and calls a method 152s does not register an offense 152s circular argument references in ordinal arguments 152s when the method contains a circular argument reference 152s registers an offense 152s when the method does not contain a circular argument reference 152s does not register an offense 152s when the seemingly-circular default value is a method call 152s does not register an offense 152s 152s RuboCop::Formatter::QuietFormatter 152s #report_file 152s the file is under the current working directory 152s prints as relative path 152s when the offense is not corrected 152s prints message as-is 152s the file is outside of the current working directory 152s prints as absolute path 152s when the offense is automatically corrected 152s prints [Corrected] along with message 152s when the offense is correctable 152s prints message as-is 152s #report_summary 152s when a offense detected and a offense correctable 152s handles pluralization correctly 152s when 2 offenses are corrected 152s handles pluralization correctly 152s when a file inspected and no offenses detected 152s handles pluralization correctly 152s when 2 offenses are corrected and 2 offenses correctable 152s handles pluralization correctly 152s when 2 offenses detected 152s handles pluralization correctly 152s when a offense detected 152s handles pluralization correctly 152s when no files inspected 152s handles pluralization correctly 152s when 2 offenses detected and 2 offenses correctable 152s handles pluralization correctly 152s when an offense is corrected 152s prints about correction 152s 152s RuboCop::Cop::Style::ExplicitBlockArgument 152s registers an offense and corrects when `yield` is inside block of `super` 152s does not register an offense when `yield` is not inside block 152s correctly corrects when method already has an explicit block argument 152s does not register an offense when `yield` is the sole block body 152s correctly corrects when using safe navigation method call 152s registers an offense and corrects when block just yields its arguments 152s registers an offense and corrects when `yield` inside block has no arguments 152s correctly corrects when the method call has a trailing comma in its argument list 152s does not register an offense when arguments are yielded in a different order 152s registers an offense and corrects when method contains multiple `yield`s 152s does not register an offense when there is more than one block argument and not all are yielded 152s registers an offense and corrects when multiple arguments are yielded 152s does not register an offense when code is called outside of a method 152s does not add extra parens to `super` when correcting 152s does not add extra parens when correcting 152s does not register an offense when `yield` arguments is not a prefix of block arguments 152s adds to the existing arguments when correcting 152s 152s RuboCop::Cop::Style::RedundantRegexpEscape 152s with a single-line %r^^ regexp 152s with escaped delimiters outside a character-class 152s does not register an offense 152s with escaped delimiters and regexp options 152s does not register an offense 152s without escapes 152s does not register an offense 152s with escaped delimiters inside a character-class 152s does not register an offense 152s with a single-line %r__ regexp 152s without escapes 152s does not register an offense 152s with escaped delimiters and regexp options 152s does not register an offense 152s with escaped delimiters inside a character-class 152s does not register an offense 152s with escaped delimiters outside a character-class 152s does not register an offense 152s with a multi-line %r{} regexp 152s with a # inside a character class 152s does not register an offense 152s without escapes 152s does not register an offense 152s with redundantly-escaped slashes 152s registers an offense and corrects 152s with a redundant escape after a line with comment 152s registers an offense and corrects 152s with a single-line %r@@ regexp 152s with escaped delimiters and regexp options 152s does not register an offense 152s without escapes 152s does not register an offense 152s with escaped delimiters outside a character-class 152s does not register an offense 152s with escaped delimiters inside a character-class 152s does not register an offense 152s with a single-line `//` regexp 152s with an escaped 'Z' outside a character class 152s does not register an offense 152s with an escaped 'U' outside a character class 152s does not register an offense 152s with an escaped 'q' inside a character class 152s does not register an offense 152s with an escaped 'J' outside a character class 152s does not register an offense 152s with an escaped '-' outside a character class 152s registers an offense and corrects 152s with an escaped 'p{alpha}' inside a character class 152s does not register an offense 152s with an escaped 'cc' outside a character class 152s does not register an offense 152s with an escaped 'I' outside a character class 152s does not register an offense 152s with an escaped character class and following escaped char 152s does not register an offense 152s with an escaped 'H' inside a character class 152s does not register an offense 152s with an uppercase metacharacter outside a character class 152s does not register an offense 152s with an escaped 'h' inside a character class 152s does not register an offense 152s with an escaped '?' inside a character class 152s registers an offense and corrects 152s with a line continuation within a character class 152s does not register an offense 152s with an escaped ' ' inside a character class 152s does not register an offense 152s with an escaped 'D' inside a character class 152s does not register an offense 152s with an escaped . inside a character class beginning with : 152s registers an offense and corrects 152s with an escaped 'I' inside a character class 152s does not register an offense 152s with an escaped 'z' inside a character class 152s does not register an offense 152s with an escaped 't' outside a character class 152s does not register an offense 152s with an escaped 'r' inside a character class 152s does not register an offense 152s with an escaped 'y' outside a character class 152s does not register an offense 152s with an escaped '?' outside a character class 152s does not register an offense 152s with an escaped 's' inside a character class 152s does not register an offense 152s with an escaped 'R' inside a character class 152s does not register an offense 152s with an escaped 'p{alpha}' outside a character class 152s does not register an offense 152s with an escaped 'F' inside a character class 152s does not register an offense 152s with an escaped 'a' outside a character class 152s does not register an offense 152s without escapes 152s does not register an offense 152s with an escaped '.' outside a character class 152s does not register an offense 152s with an escaped 'G' inside a character class 152s does not register an offense 152s with an escaped 'Z' inside a character class 152s does not register an offense 152s with an escaped ')' outside a character class 152s does not register an offense 152s with a free-spaced mode regex 152s with a commented redundant escape 152s does not register an offense 152s with a commented [ and ] 152s does not register an offense 152s with redundant escape preceded by an escaped comment 152s registers offenses and corrects 152s with a commented redundant escape on a single line 152s does not register an offense 152s with multiple escaped metachars inside a character class 152s registers offenses and corrects 152s with an escaped '-' inside a character class 152s registers an offense and corrects 152s with an escaped 'u0041' inside a character class 152s does not register an offense 152s with an escaped '+' inside a character class 152s registers an offense and corrects 152s with an escaped 'S' outside a character class 152s does not register an offense 152s with an escaped 'B' inside a character class 152s does not register an offense 152s with an escaped 'D' outside a character class 152s does not register an offense 152s with an escaped '-' character being the first character inside a character class 152s registers an offense and corrects 152s with an uppercase metacharacter inside a character class 152s does not register an offense 152s with a backreference 152s does not register an offense 152s with an escaped 'V' inside a character class 152s does not register an offense 152s with an escaped 'Y' inside a character class 152s does not register an offense 152s with an escaped 'w' inside a character class 152s does not register an offense 152s with an escaped 'P{alpha}' outside a character class 152s does not register an offense 152s with an escaped 'x41' inside a character class 152s does not register an offense 152s with an escaped 'l' outside a character class 152s does not register an offense 152s with an escaped '^' outside a character class 152s does not register an offense 152s with an escaped 'm' inside a character class 152s does not register an offense 152s with an escaped ']' inside a character class 152s does not register an offense 152s with an escaped 'x41' outside a character class 152s does not register an offense 152s with an escaped 'n101' outside a character class 152s does not register an offense 152s with an escaped 'Q' inside a character class 152s does not register an offense 152s with an interpolated unnecessary-escape regexp 152s registers an offense and corrects 152s with an escaped 'n101' inside a character class 152s does not register an offense 152s with an escape inside an interpolated string 152s does not register an offense 152s with an escaped interpolation inside a character class 152s does not register an offense 152s with an escaped 'f' outside a character class 152s does not register an offense 152s with a POSIX character class then disallowed escape inside a character class 152s registers an offense and corrects 152s with an interpolation followed by redundant escapes 152s registers offenses and corrects 152s with escaped slashes 152s does not register an offense 152s with an escaped 'y' inside a character class 152s does not register an offense 152s with an escaped 'o' outside a character class 152s does not register an offense 152s with a nested character class then allowed escape 152s does not register an offense 152s with a POSIX character class then allowed escape inside a character class 152s does not register an offense 152s with an escaped '(' outside a character class 152s does not register an offense 152s with an escaped '[' inside a character class 152s does not register an offense 152s with an escaped 'A' outside a character class 152s does not register an offense 152s with an escaped '+' outside a character class 152s does not register an offense 152s with an escaped 'b' outside a character class 152s does not register an offense 152s with an escaped 'E' inside a character class 152s does not register an offense 152s with an escaped 'i' inside a character class 152s does not register an offense 152s with an escaped 'K' outside a character class 152s does not register an offense 152s with an escaped '-' character being the last character inside a character class 152s registers an offense and corrects 152s with an escaped 'L' inside a character class 152s does not register an offense 152s with an escaped '*' inside a character class 152s registers an offense and corrects 152s with an escaped 'G' outside a character class 152s does not register an offense 152s with an escaped '|' inside a character class 152s registers an offense and corrects 152s with an escaped 'L' outside a character class 152s does not register an offense 152s with an escaped ']' outside a character class 152s does not register an offense 152s with an escaped 'S' inside a character class 152s does not register an offense 152s with an escaped 'N' inside a character class 152s does not register an offense 152s with an escaped 'l' inside a character class 152s does not register an offense 152s with an escaped '^' inside a character class 152s does not register an offense 152s with an escaped ' ' outside a character class 152s does not register an offense 152s with an escaped 'd' inside a character class 152s does not register an offense 152s with an escaped 'j' inside a character class 152s does not register an offense 152s with an escaped '#' inside a character class 152s does not register an offense 152s with an invalid g escape 152s does not register an offense 152s with an escaped 'T' inside a character class 152s does not register an offense 152s with an escaped 'H' outside a character class 152s does not register an offense 152s with an escaped '}' inside a character class 152s registers an offense and corrects 152s with an escaped interpolation outside a character class 152s does not register an offense 152s with an escaped 'Y' outside a character class 152s does not register an offense 152s with an escaped 'R' outside a character class 152s does not register an offense 152s with an escaped 'O' outside a character class 152s does not register an offense 152s with an escaped 'C-c' inside a character class 152s does not register an offense 152s with an escaped 'b' inside a character class 152s does not register an offense 152s with an escaped 'X' inside a character class 152s does not register an offense 152s with an escaped 'u{0041}' inside a character class 152s does not register an offense 152s with an escaped 'J' inside a character class 152s does not register an offense 152s with a line continuation 152s does not register an offense 152s with an escaped 'w' outside a character class 152s does not register an offense 152s with an escaped 'E' outside a character class 152s does not register an offense 152s with regexp options and a redundant escape 152s registers offenses and corrects 152s with an escaped '+' inside a character class inside a group 152s registers an offense and corrects 152s with an escaped '$' inside a character class 152s registers an offense and corrects 152s with an escaped 'z' outside a character class 152s does not register an offense 152s with an escaped 'a' inside a character class 152s does not register an offense 152s with an escaped '#' outside a character class 152s does not register an offense 152s with an escaped 'd' outside a character class 152s does not register an offense 152s with an escaped 'W' outside a character class 152s does not register an offense 152s with an escaped 'W' inside a character class 152s does not register an offense 152s with an escaped 'V' outside a character class 152s does not register an offense 152s with an escaped 'h' outside a character class 152s does not register an offense 152s with an escaped 'C-c' outside a character class 152s does not register an offense 152s with an escaped '}' outside a character class 152s does not register an offense 152s with an escaped 'e' outside a character class 152s does not register an offense 152s with a nested character class containing redundant escape 152s registers an offense and corrects 152s with an escaped 'm' outside a character class 152s does not register an offense 152s with an escaped 'T' outside a character class 152s does not register an offense 152s with an escaped '{' outside a character class 152s does not register an offense 152s with an escaped '\' outside a character class 152s does not register an offense 152s with an escaped 'M-a' outside a character class 152s does not register an offense 152s with an escaped '{' inside a character class 152s registers an offense and corrects 152s with an escaped 'M-a' inside a character class 153s does not register an offense 153s with an escaped ')' inside a character class 153s registers an offense and corrects 153s with an escaped 'e' inside a character class 153s does not register an offense 153s with an escaped 'O' inside a character class 153s does not register an offense 153s with an escaped 'F' outside a character class 153s does not register an offense 153s with an escaped 'K' inside a character class 153s does not register an offense 153s with an escaped ' 153s ' outside a character class 153s does not register an offense 153s with an escaped 'A' inside a character class 153s does not register an offense 153s with an escaped 'u{0041}' outside a character class 153s does not register an offense 153s with an escaped 'o' inside a character class 153s does not register an offense 153s with an escaped 'X' outside a character class 153s does not register an offense 153s with an escaped '[' outside a character class 153s does not register an offense 153s with an escaped '.' inside a character class 153s registers an offense and corrects 153s with an escaped 'v' inside a character class 153s does not register an offense 153s with an escaped '*' outside a character class 153s does not register an offense 153s with an escaped '(' inside a character class 153s registers an offense and corrects 153s with an escaped '\' inside a character class 153s does not register an offense 153s with an escaped 'B' outside a character class 153s does not register an offense 153s with an escaped 'N' outside a character class 153s does not register an offense 153s with an escaped 'v' outside a character class 153s does not register an offense 153s with an escaped 'f' inside a character class 153s does not register an offense 153s with an escaped 's' outside a character class 153s does not register an offense 153s with an escaped 'Q' outside a character class 153s does not register an offense 153s with an escaped 'i' outside a character class 153s does not register an offense 153s with a character class and following escaped char 153s does not register an offense 153s with an escaped 'r' outside a character class 153s does not register an offense 153s with an escaped 'j' outside a character class 153s does not register an offense 153s with an escaped 'q' outside a character class 153s does not register an offense 153s with an escaped '$' outside a character class 153s does not register an offense 153s with an escaped 'P{alpha}' inside a character class 153s does not register an offense 153s with an escaped '|' outside a character class 153s does not register an offense 153s with an escaped 'u0041' outside a character class 153s does not register an offense 153s with an escaped 't' inside a character class 153s does not register an offense 153s with an escaped 'U' inside a character class 153s does not register an offense 153s with an escaped 'cc' inside a character class 153s does not register an offense 153s with a single-line %r{} regexp 153s without escapes 153s does not register an offense 153s with redundantly-escaped slashes 153s registers an offense and corrects 153s with an escaped { or } outside a character class 153s does not register an offense 153s with an escaped { or } inside a character class 153s does not register an offense 153s with a multi-line %r// regexp 153s without escapes 153s does not register an offense 153s with escaped slashes 153s does not register an offense 153s with a single-line %r~~ regexp 153s with escaped delimiters and regexp options 153s does not register an offense 153s with escaped delimiters inside a character-class 153s does not register an offense 153s without escapes 153s does not register an offense 153s with escaped delimiters outside a character-class 153s does not register an offense 153s with a single-line %r// regexp 153s with escaped slashes 153s does not register an offense 153s without escapes 153s does not register an offense 153s with multibyte characters 153s removes the escape character at the right position 153s with a single-line %r() regexp 153s with escaped delimiters inside a character-class 153s does not register an offense 153s without escapes 153s does not register an offense 153s with escaped delimiters outside a character-class 153s does not register an offense 153s with escaped delimiters and regexp options 153s does not register an offense 153s with a single-line %r<> regexp 153s with escaped delimiters and regexp options 153s does not register an offense 153s with escaped delimiters outside a character-class 153s does not register an offense 153s with escaped delimiters inside a character-class 153s does not register an offense 153s without escapes 153s does not register an offense 153s with a single-line %r!! regexp 153s with escaped delimiters and regexp options 153s does not register an offense 153s with escaped delimiters outside a character-class 153s does not register an offense 153s with escaped delimiters inside a character-class 153s does not register an offense 153s without escapes 153s does not register an offense 153s 153s RuboCop::Formatter::MarkdownFormatter 153s outputs the result in Markdown 153s outputs the cached result in Markdown 153s 153s RuboCop::Cop::Style::WhileUntilModifier 153s behaves like condition modifier cop 153s for a multiline 'until' 153s corrects it when assignment is in body 153s accepts it if body spans more than one line 153s doesn't break when used as RHS of instance var assignment 153s doesn't break when used as RHS of class var assignment 153s handles one-line usage 153s accepts an empty body 153s handles inline comments during autocorrection 153s doesn't break when used as RHS of constant assignment 153s accepts it when condition has local variable assignment 153s corrects it if result fits in one line 153s doesn't break when used as RHS of binary arithmetic 153s doesn't break when used as RHS of local var assignment 153s accepts it if single line would not fit on one line 153s when Layout/LineLength is disabled 153s registers an offense even for a long modifier statement 153s accepts multiline condition in modifier form 153s registers an offense 153s when there is a comment on the first line and some code after the end keyword 153s does not register an offense 153s behaves like condition modifier cop 153s for a multiline 'while' 153s handles inline comments during autocorrection 153s corrects it if result fits in one line 153s handles one-line usage 153s accepts it if body spans more than one line 153s doesn't break when used as RHS of class var assignment 153s accepts an empty body 153s doesn't break when used as RHS of local var assignment 153s corrects it when assignment is in body 153s accepts it if single line would not fit on one line 153s doesn't break when used as RHS of instance var assignment 153s doesn't break when used as RHS of constant assignment 153s doesn't break when used as RHS of binary arithmetic 153s accepts it when condition has local variable assignment 153s when Layout/LineLength is disabled 153s registers an offense even for a long modifier statement 153s accepts multiline condition in modifier form 153s registers an offense 153s when there is a comment on the first line and some code after the end keyword 153s does not register an offense 153s 153s RuboCop::Cop::Style::HashTransformValues 153s below Ruby 2.4 153s does not flag even if transform_values could be used 153s below Ruby 2.6 153s does not flag _.to_h{...} 153s when using Ruby 2.4 or newer 153s does not flag `each_with_object` when its argument is used in the value 153s does not flag _.map {...}.to_h when value block argument is unused 153s flags _.map {...}.to_h when transform_values could be used when line break before `to_h` 153s does not flag `each_with_object` when its receiver is `zip` 153s flags _.map {...}.to_h when transform_values could be used 153s does not flag `_.map{...}.to_h` when its receiver is `with_index` 153s does not flag `_.map{...}.to_h` when its receiver is `each_with_index` 153s does not flag Hash[_.map{...}] when both key & value are transformed 153s does not flag each_with_object when no transformation occurs 153s does not flag `_.map{...}.to_h` when its receiver is `zip` 153s does not flag each_with_object when value transformation uses key 153s does not flag each_with_object when both key & value are transformed 153s does not flag each_with_object when its argument is not modified 153s correctly autocorrects _.map{...}.to_h with block 153s flags Hash[_.map{...}] when transform_values could be used 153s does not flag `Hash[_.map{...}]` when its receiver is `each_with_index` 153s flags _.map {...}.to_h when transform_values could be used when wrapped in another block 153s does not flag `Hash[_.map{...}]` when its receiver is `zip` 153s does not flag _.map{...}.to_h when both key & value are transformed 153s does not flag value transformation in the absence of to_h 153s does not flag each_with_object when receiver is array literal 153s does not flag `each_with_object` when its receiver is `each_with_index` 153s does not flag `Hash[_.map{...}]` when its receiver is an array literal 153s does not flag `each_with_object` when its receiver is `with_index` 153s does not flag value transformation when receiver is array literal 153s does not flag `Hash[_.map{...}]` when its receiver is `with_index` 153s with safe navigation operator 153s flags each_with_object when transform_values could be used 153s with multiline block 153s flags each_with_object when transform_values could be used 153s with inline block 153s flags each_with_object when transform_values could be used 153s when using Ruby 2.6 or newer 153s does not flag _.to_h {...} when value block argument is unused 153s does not flag `_.to_h{...}` when both key & value are transformed 153s register and corrects an offense _.to_h{...} when value is a hash literal and is enclosed in braces 153s does not flag `_.to_h{...}` when its receiver is `with_index` 153s does not flag `_.to_h{...}` when its receiver is `zip` 153s flags _.to_h{...} when transform_values could be used 153s does not flag `_.to_h{...}` when its receiver is an array literal 153s register and corrects an offense _.to_h{...} when value is a hash literal and is not enclosed in braces 153s does not flag `_.to_h{...}` when its receiver is `each_with_index` 153s 153s RuboCop::Cop::Style::WhenThen 153s accepts ; separating statements in the body of when 153s registers an offense for when b, c; 153s registers an offense for when b; 153s when inspecting a case statement with an empty branch 153s does not register an offense 153s 153s RuboCop::Cop::Layout::BlockEndNewline 153s registers an offense and corrects when multiline block `}` is not on its own line and using multiple heredoc arguments 153s registers an offense and corrects when multiline block `}` is not on its own line and using method chain 153s registers an offense and corrects when `}` of multiline block without processing is not on its own line 153s registers an offense and corrects when a multiline block ends with a hash 153s registers an offense and corrects when multiline block `}` is not on its own line and using heredoc argument 153s registers an offense and corrects when multiline block `}` is not on its own line and using heredoc argument with method chain 153s accepts multiline blocks with newlines before the end 153s registers an offense and corrects when multiline block `}` is not on its own line 153s registers an offense and corrects when multiline block `}` is not on its own line and using multiple heredoc argument method chain 153s accepts a one-liner 153s registers an offense and corrects when multiline block end is not on its own line 153s registers an offense and corrects when a multiline block ends with a method call with hash arguments 153s Ruby 2.7 153s registers an offense and corrects when multiline block `}` is not on its own line and using heredoc argument 153s registers an offense and corrects when multiline block `}` is not on its own line and using method chain 153s 153s RuboCop::Formatter::GitHubActionsFormatter 153s #finished 153s when file is relative to the current directory 153s reports offenses as error with the relative path 153s when fail level is defined 153s reports offenses below fail level as warnings 153s reports offenses above or at fail level as errors 153s when no offenses are detected 153s does not print anything 153s when offenses are detected 153s reports offenses as errors 153s when message contains % 153s escapes message 153s 153s RuboCop::Cop::Lint::ToEnumArguments 153s does not register an offense when not inside method definition 153s does not register an offense when method call has a receiver other than `self` 153s registers an offense when splat arg is missing 153s registers an offense when required arg is missing 153s registers an offense when other values are passed for keyword arguments 153s does not register an offense when enumerator is created with `__method__` and the correct arguments 153s does not register an offense when enumerator is created with `:m` and the correct arguments 153s registers an offense when required keyword arg is missing 153s registers an offense when enumerator is created for `__method__` with missing arguments 153s registers an offense when optional arg is missing 154s does not register an offense when enumerator is created with `__callee__` and the correct arguments 154s registers an offense when enumerator is created for another method 154s ignores the block argument 154s registers an offense when splat keyword arg is missing 154s registers an offense when method is called on `self` 154s registers an offense when arguments are swapped 154s registers an offense when optional keyword arg is missing 154s arguments forwarding 154s does not register an offense when enumerator is created with the correct arguments 154s registers an offense when enumerator is created with non matching arguments 154s 154s RuboCop::Cop::Style::RedundantSelfAssignment 154s does not register an offense when there is no a receiver 154s registers an offense and corrects when assigning to attribute of non `self` 154s does not register an offense when lhs and receiver are different 154s registers an offense and corrects when assigning to attribute of `self` 154s does not register an offense when assigning to attribute of `self` the result from other object 154s when lhs and receiver are the same 154s registers an offense and corrects when assigning to class variable 154s registers an offense and corrects when assigning to instance variable 154s registers an offense and corrects when assigning to global variable 154s registers an offense and corrects when assigning to local variable 154s 154s RuboCop::Cop::Style::ClassVars 154s does not register an offense for class variable usage 154s registers an offense for class variable declaration 154s registers an offense for class variable set in class 154s registers an offense for class variable set on class receiver 154s 154s RuboCop::Cop::Lint::DuplicateRegexpCharacterClassElement 154s with a repeated character class element inside a group 154s registers an offense and corrects 154s with no repeated character class elements when `"\0\07"` (means `"\u0000\a"`) 154s does not register an offense 154s with a repeated character posix character class inside a group 154s registers an offense and corrects 154s with a repeated range element 154s registers an offense and corrects 154s with no repeated character class elements 154s does not register an offense 154s with repeated elements in different character classes 154s does not register an offense 154s with a repeated character class element 154s registers an offense and corrects 154s with a repeated character class element with quantifier 154s registers an offense and corrects 154s with a range that covers a repeated element character class 154s does not register an offense 154s with a repeated character class element and %r{} literal 154s registers an offense and corrects 154s with a repeated intersection character class 154s does not register an offense 154s with multiple regexps with the same interpolation 154s does not register an offense 154s with a repeated character class element with interpolation 154s registers an offense and corrects 154s with repeated character class elements when `"\0\08"` (means `"\u0000\u00008"`) 154s registers an offense 154s 154s RuboCop::Cop::Layout::MultilineBlockLayout 154s registers an offense and corrects line-break before arguments 154s registers offenses and corrects for new lambda literal syntax 154s autocorrects nested parens correctly 154s does not register offenses when there is a newline for {} block 154s registers offenses when there are not too many parameters to fit on one line 154s does not register offenses when there is a newline for do/end block 154s does not register an offense for one-line do/end blocks 154s registers an offense and corrects line-break before arguments with empty block 154s registers an offense and corrects for missing newline in {} block with params 154s does not remove a trailing comma when only one argument is present 154s registers an offense and corrects line-break within arguments 154s does not register offenses when there are too many parameters to fit on one line 154s registers an offense and corrects a line-break within arguments 154s registers an offense and corrects a line break within destructured arguments 154s autocorrects in more complex case with lambda and assignment, and aligns the next line two spaces out from the start of the block 154s registers an offense and corrects a do/end block with a mult-line body 154s considers the extra space required to join the lines together 154s registers offenses and corrects for lambdas 154s registers an offense and corrects for missing newline in do/end block with params 154s does not register an offense for one-line {} blocks 154s does not error out when the block is empty 154s registers an offense and corrects for missing newline before opening parenthesis `(` for block body 154s registers an offense and corrects for missing newline in {} block w/o params 154s doesn't move end keyword in a way which causes infinite loop in combination with Style/BlockEndNewLine 154s registers an offense for missing newline in do/end block w/o params 154s Ruby 2.7 154s registers an offense and corrects for missing newline in do/end block with params 154s registers an offense and corrects for missing newline in {} block w/o params 154s 154s RuboCop::Formatter::WorstOffendersFormatter 154s #finished 154s when there are many offenses 154s sorts by offense count first and then by cop name 154s 154s Changelog 154s merges correctly 154s parses correctly 154s Changelog::Entry 154s #ref_id 154s when there is no body 154s is expected to eq "x" 154s when there is an issue referenced with [Fix #x] the body 154s is expected to eq "123" 154s when there is an issue referenced with [Fixes #x] the body 154s is expected to eq "123" 154s when there is no issue referenced in the body 154s is expected to eq "x" 154s #body 154s when there is no body 154s is expected to eq "" 154s when there is an issue referenced with [Fixes #x] the body 154s is expected to eq "Fix something" 154s when there is no issue referenced in the body 154s is expected to eq "Fix something" 154s when there is an issue referenced with [Fix #x] the body 154s is expected to eq "Fix something" 154s #content 154s when there is no issue referenced 154s generates correct content 154s when there is an issue referenced 154s generates correct content 154s 154s RuboCop::Cop::Layout::CaseIndentation 154s when `when` is on the same line as `case` 154s registers an offense but does not autocorrect 154s with EnforcedStyle: end 154s with IndentOneStep: false 154s `case` ... `when` 154s regarding assignment where the right hand side is a `case` 154s accepts a correctly indented assignment 154s registers an offense and corrects an assignment indented some other way 154s with everything on a single line 154s does not register an offense 154s `when` and `end` same line 154s does not register an offense 154s `else` and `end` same line 154s does not register an offense 154s `case` ... `in` 154s `in` and `end` same line 154s does not register an offense 154s regarding assignment where the right hand side is a `case` 154s accepts a correctly indented assignment 154s registers an offense and corrects an assignment indented some other way 154s with everything on a single line 154s does not register an offense 154s with IndentOneStep: true 154s `case` ... `in` 154s with everything on a single line 154s does not register an offense 154s regarding assignment where the right hand side is a `case` 154s accepts a correctly indented assignment 154s registers an offense and corrects an assignment indented as `case` 154s registers an offense and corrects an assignment indented some other way 154s `case` ... `when` 154s with everything on a single line 154s does not register an offense 154s regarding assignment where the right hand side is a `case` 154s registers an offense and corrects an assignment indented some other way 154s accepts a correctly indented assignment 154s registers an offense and corrects an assignment indented as `case` 154s with EnforcedStyle: case 154s with IndentOneStep: true 154s `case` ... `when` 154s accepts a `when` clause that's 2 spaces deeper than `case` 154s registers an offense and corrects a `when` clause that is equally indented with `case` 154s with everything on a single line 154s does not register an offense 154s when indentation width is overridden for this cop only 154s respects cop-specific IndentationWidth 154s regarding assignment where the right hand side is a `case` 154s accepts a correctly indented assignment 154s registers an offense and corrects an assignment indented some other way 154s `case` ... `in` 154s accepts an `in` clause that's 2 spaces deeper than `case` 154s registers an offense and corrects an `in` clause that is equally indented with `case` 154s with everything on a single line 154s does not register an offense 154s when indentation width is overridden for this cop only 154s respects cop-specific IndentationWidth 154s regarding assignment where the right hand side is a `case` 154s registers an offense and corrects an assignment indented some other way 154s accepts a correctly indented assignment 154s with IndentOneStep: false 154s `case` ... `in` 154s doesn't get confused by symbols named `case` or `in` 154s accepts correctly indented whens in complex combinations 154s accepts an `in` clause that's equally indented with `case` 154s doesn't get confused by strings with `case` in them 154s registers an offense and corrects an `in` clause that is indented deeper than `case` 154s with everything on a single line 154s does not register an offense 154s regarding assignment where the right hand side is a `case` 154s registers an offense and corrects assignment indented some other way 154s registers an offense and corrects assignment indented as `end` 154s registers an offense and corrects correct + opposite style 154s accepts a correctly indented assignment 154s `case` ... `when` 154s accepts correctly indented whens in complex combinations 154s doesn't get confused by strings with `case` in them 154s doesn't get confused by symbols named `case` or `when` 154s registers an offense and corrects a `when` clause that is indented deeper than `case` 154s accepts a `when` clause that's equally indented with `case` 154s regarding assignment where the right hand side is a `case` 154s registers an offense and corrects correct + opposite style 154s accepts a correctly indented assignment 154s registers an offense and corrects assignment indented some other way 154s registers an offense and corrects assignment indented as end 154s with everything on a single line 154s does not register an offense 154s 154s RuboCop::Cop::Style::ClassEqualityComparison 154s registers an offense and corrects when comparing `Module#name` for equality 154s registers an offense and corrects when comparing class using `eql?` for equality 154s does not register an offense when using `instance_of?` 154s registers an offense and corrects when comparing double quoted class name for equality 154s registers an offense and corrects when comparing single quoted class name for equality 154s registers an offense and corrects when comparing class using `equal?` for equality 154s registers an offense and corrects when comparing class using `==` for equality 154s with String comparison in module 154s registers and corrects an offense 154s with instance variable comparison in module 154s registers and corrects an offense 154s when AllowedPatterns is enabled 154s does not register an offense when comparing class for equality 154s when AllowedMethods is enabled 154s does not register an offense when comparing class for equality 154s 154s RuboCop::Cop::Security::JSONLoad 154s allows JSON.parse 154s registers an offense and corrects JSON.load 154s registers an offense and corrects JSON.restore 154s does not register an offense for JSON under another namespace 154s allows JSON.dump 154s 154s RuboCop::Cop::Layout::SpaceBeforeBlockBraces 154s when EnforcedStyle is space 154s registers an offense and corrects opposite + correct style 154s registers an offense and corrects left brace without outer space 154s accepts braces surrounded by spaces 154s registers an offense and corrects multiline block where the left brace has no outer space 154s Ruby 2.7 154s registers an offense and corrects opposite + correct style 154s registers an offense and corrects multiline block where the left brace has no outer space 154s with invalid value for EnforcedStyleForEmptyBraces 154s fails with an error 154s when EnforcedStyle is no_space 154s registers an offense and corrects braces surrounded by spaces 154s accepts left brace without outer space 154s registers an offense and corrects correct + opposite style 154s Ruby 2.7 154s registers an offense and corrects correct + opposite style 154s with `EnforcedStyle` of `Style/BlockDelimiters` 154s accepts left brace without outer space 154s with space before empty braces allowed 154s accepts empty braces with outer space 154s registers an offense and corrects empty braces 154s with space before empty braces not allowed 154s accepts empty braces without outer space 154s registers an offense and corrects empty braces 154s 154s RuboCop::Cop::Layout::MultilineArrayLineBreaks 154s when two elements on same line 154s registers an offense and corrects 154s when on same line, separate line from brackets 154s does not add any offenses 154s when on same line 154s does not add any offenses 154s when nested arrays 154s registers an offense and corrects 154s 154s RuboCop::CLI --autocorrect 154s corrects `Style/SoleNestedConditional` with `Style/InverseMethods` and `Style/IfUnlessModifier` 154s handles different SpaceInsideBlockBraces and SpaceInsideHashLiteralBraces 155s can correct two empty lines at end of class body 155s can correct IndentHash offenses with separator style 155s corrects `EnforcedStyle: require_parentheses` of `Style/MethodCallWithArgsParentheses` with `EnforcedStyle: conditionals` of `Style/AndOr` 155s corrects `Layout/DotPosition` and `Style/RedundantSelf` offenses 155s corrects IndentationWidth, RedundantBegin, and RescueEnsureAlignment offenses 155s can be disabled for any cop in configuration 156s corrects IndentationWidth and IndentationConsistency offenses 156s does not correct SpaceAroundOperators in a hash that would be changed back 156s corrects `EnforcedStyle: require_parentheses` of `Style/MethodCallWithArgsParentheses` with `Lint/AmbiguousOperator` 156s corrects Style/BlockDelimiters offenses when specifyingLayout/SpaceBeforeBlockBraces with `EnforcedStyle: no_space` together 156s properly corrects when `Style/SoleNestedConditional` and one of `Style/NegatedIf` or `Style/NegatedUnless` detect offenses 156s can correct two problems with blocks 156s corrects when specifying `EnforcedStyle: with_fixed_indentation` of `Layout/ArgumentAlignment` and `Layout/HashAlignment` 157s honors Exclude settings in individual cops 157s corrects `Style/IfUnlessModifier` with `Style/SoleNestedConditional` 157s corrects Tab and IndentationConsistency offenses 157s does not correct ExtraSpacing in a hash that would be changed back 157s corrects `Style/InverseMethods` offenses when specifying `IncludeSemanticChanges: false` of `Style/NonNilCheck` and `EnforcedStyle: comparison` of `Style/NilComparison` 157s corrects only IndentationWidth without crashing 157s does not crash when using `Layout/CaseIndentation` and `Layout/ElseAlignment` 158s corrects LineEndConcatenation offenses leaving the RedundantInterpolation offense unchanged 158s corrects HeredocArgumentClosingParenthesis offenses and ignores TrailingCommaInArguments offense 158s does not crash Lint/SafeNavigationWithEmpty and offenses and accepts Style/SafeNavigation when checking `foo&.empty?` in a conditional 158s 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` 158s corrects `Naming/RescuedExceptionsVariableName` and `, `Style/RescueStandardError`and `Lint/OverwriteByRescue` offenses 158s does not crash when using Lint/SafeNavigationWithEmpty and Layout/EmptyLinesAroundBlockBody 158s does not hang SpaceAfterPunctuation and SpaceInsideArrayLiteralBrackets 158s corrects Style/InverseMethods and Style/Not offenses 159s corrects Lint/ParenthesesAsGroupedExpression and offenses and accepts Style/RedundantParentheses 159s corrects `Lint/UnusedMethodArgument` with `Style/ExplicitBlockArgument` 159s corrects `EnforcedStyle: require_parentheses` of `Style/MethodCallWithArgsParentheses` with `Style/NestedParenthesizedCalls` 159s corrects `Style/RedundantBegin` with `Style/MultilineMemoization` 159s corrects properly when both `Style/MapToHash` and `Style/HashTransformKeys`or `Style/HashTransformValues` registers 159s corrects `EnforcedStyle: require_parentheses` of `Style/MethodCallWithArgsParentheses` with `Style/RescueModifier` 159s consistently quotes symbol keys in a hash using `Lint/SymbolConversion` with `EnforcedStyle: consistent` and `Style/QuotedSymbols` 159s 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 160s plays nicely with default cops in complex ExtraSpacing scenarios 160s 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` 160s corrects InitialIndentation offenses 160s can correct a problems and the problem it creates 160s can correct single line methods 160s can change block comments and indent them 161s can correct MethodDefParentheses and other offense 161s corrects IndentationWidth and IndentationConsistency offenseswhen using `EnforcedStyle: outdent` and `EnforcedStyle: indented_internal_methods` 161s can correct empty line inside special form of nested modules 161s corrects `Lint/Lambda` and `Lint/UnusedBlockArgument` offenses 161s corrects IndentationWidth and IndentationConsistency offenseswithout correcting `Style/TrailingBodyOnClass` 161s corrects SymbolProc and SpaceBeforeBlockBraces offenses 162s corrects RedundantBegin offenses and fixes indentation etc 162s corrects code with indentation problems 162s breaks line at the beginning of trailing class/module body without removing a semicolon in the bodywhen using `Style/TrailingBodyOnClass` and `Style/TrailingBodyOnModule` 162s can correct two problems in the same place 162s can correct HashSyntax when --only is used 162s can correct TrailingEmptyLines and TrailingWhitespace offenses 162s corrects `EnforcedStyle: line_count_based` of `Style/BlockDelimiters` with `Style/CommentedKeyword` and `Layout/BlockEndNewline` 162s can correct WordArray and SpaceAfterComma offenses 163s corrects when specifying `EnforcedStyle: with_first_argument` of `Layout/ArgumentAlignment` and `EnforcedColonStyle: separator` of `Layout/HashAlignment` 163s can correct SpaceAfterComma and HashSyntax offenses 163s properly autocorrects when `Style/TernaryParentheses` requires parentheses that `Style/RedundantParentheses` would otherwise remove 163s corrects Style/BlockDelimiters offenses when specifyingLayout/SpaceInsideBlockBraces together 163s does not hang SpaceAfterPunctuation and SpaceInsideParens 163s corrects `Layout/DotPosition` and `Layout/SingleLineBlockChain` offenses 163s corrects Layout/RedundantLineBreak and Layout/SingleLineBlockChain offenses 164s corrects when specifying `EnforcedStyle: with_fixed_indentation` of `Layout/ArgumentAlignment` and `EnforcedStyle: consistent` of `Layout/FirstArgumentIndentation` 164s corrects TrailingCommaIn(Array|Hash)Literal and Multiline(Array|Hash)BraceLayout offenses 164s corrects when specifying `EnforcedStyle: with_first_argument` of `Layout/ArgumentAlignment` and `EnforcedColonStyle: separator` of `Layout/HashAlignment` (`EnforcedColonStyle` is array) 164s avoids adding extra spaces when both `Style/Semicolon` and `Style/SingleLineMethods`both apply 164s corrects `EnforcedStyle: hash_rockets` of `Style/HashSyntax` with `Layout/HashAlignment` 164s does not say [Corrected] if correction is not possible 165s corrects indentation for a begin/rescue/else/ensure/end block properly 165s corrects `EnforcedStyle: require_parentheses` of `Style/MethodCallWithArgsParentheses` with `Layout/SpaceBeforeFirstArg` 165s 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` 165s can correct MethodCallWithoutArgsParentheses and EmptyLiteral offenses 165s says [Correctable] if correction is unsafe 165s 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` 165s corrects Style/Next and Style/SafeNavigation offenses 165s corrects `Layout/SpaceAroundOperators` and `Layout/ExtraSpacing` offenses when using `ForceEqualSignAlignment: true` 166s corrects RedundantCopDisableDirective offenses 166s 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 166s can correct HashSyntax and SpaceAroundOperators offenses 166s corrects `Style/TernaryParentheses` offenses and accepts `Lint/ParenthesesAsGroupedExpression` 166s can correct indentation and another thing 166s corrects when specifying `EnforcedStyle: with_fixed_indentation` of `Layout/ArgumentAlignment` and `Layout/HashAlignment` and `Layout/FirstHashElementIndentation` 166s corrects when specifying `EnforcedStyle: with_first_argument` of `Layout/ArgumentAlignment` and `EnforcedHashRocketStyle: separator` of `Layout/HashAlignment` 166s when BlockDelimiters has line_count_based style 167s corrects SpaceBeforeBlockBraces, SpaceInsideBlockBraces offenses 167s space_inside_bracket cops 167s when array style is compact & reference style is no_space 167s corrects SpaceInsideArrayLiteralBrackets and SpaceInsideReferenceBrackets 167s when array style is compact & reference style is space 167s corrects SpaceInsideArrayLiteralBrackets and SpaceInsideReferenceBrackets 167s when array style is no_space & reference style is space 167s corrects SpaceInsideArrayLiteralBrackets and SpaceInsideReferenceBrackets 167s when array style is space & reference style is no space 167s corrects SpaceInsideArrayLiteralBrackets and SpaceInsideReferenceBrackets 167s when BlockDelimiters has braces_for_chaining style 168s corrects SpaceBeforeBlockBraces, SpaceInsideBlockBraces offenses 168s trailing comma cops 168s when the style is `comma` 168s corrects TrailingCommaInLiteral and TrailingCommaInArguments without producing a double comma 168s when the style is `consistent_comma` 168s corrects TrailingCommaInLiteral and TrailingCommaInArguments without producing a double comma 168s caching 168s with an offense in the cache 168s corrects offenses 168s with no offenses in the cache 168s doesn't correct offenses 168s when BlockDelimiters has semantic style 169s corrects SpaceBeforeBlockBraces, SpaceInsideBlockBraces offenses 169s 169s RuboCop::Cop::Layout::LineEndStringConcatenationIndentation 169s when EnforcedStyle is aligned 169s accepts aligned strings in method call 169s accepts indented strings in implicit return statement of a block 169s accepts single line string literal concatenation 169s accepts an empty heredoc string with interpolation 169s accepts a heredoc string with interpolation 169s accepts string literal with line break concatenated with other string 169s accepts indented strings in implicit return statement of a method definition after other statement 169s accepts indented strings in implicit return statement of a singleton method definition 169s registers an offense for aligned strings in an if/elsif/else statement 169s accepts a heredoc string ... 169s accepts indented strings in implicit return statement of a method definition 169s registers an offense for third part of a string if it is aligned only with the first 169s accepts indented strings in ordinary statement 169s accepts a multiline string literal 169s registers an offense for indented string 169s registers an offense for unaligned strings in hash literal values 169s for assignment with x += 169s accepts aligned strings 169s registers an offense for indented strings 169s for assignment with X = 169s accepts aligned strings 169s registers an offense for indented strings 169s for assignment with $x = 169s registers an offense for indented strings 169s accepts aligned strings 169s for assignment with x = 169s accepts aligned strings 169s registers an offense for indented strings 169s for assignment with x ||= 169s registers an offense for indented strings 169s accepts aligned strings 169s for assignment with @x = 169s registers an offense for indented strings 169s accepts aligned strings 169s when EnforcedStyle is indented 169s accepts indented strings in implicit return statement of a method definition after other statement 169s registers an offense for unaligned third part of string 169s accepts indented strings in ordinary statement 169s accepts an empty heredoc string with interpolation 169s registers an offense for aligned strings in an if/elsif/else statement 169s registers an offense for aligned strings in hash literal values 169s accepts a heredoc string with interpolation 169s accepts indented strings in implicit return statement of a block 169s accepts indented strings 169s accepts string literal with line break concatenated with other string 169s accepts indented strings in implicit return statement of a method definition 169s accepts a heredoc string ... 169s accepts a multiline string literal 169s registers an offense for aligned string 169s accepts indented strings in implicit return statement of a singleton method definition 169s accepts single line string literal concatenation 169s for assignment with $x = 169s accepts indented strings 169s registers an offense for aligned strings 169s for assignment with x ||= 169s registers an offense for aligned strings 169s accepts indented strings 169s when IndentationWidth is 1 169s accepts indented strings 169s for assignment with @x = 169s registers an offense for aligned strings 169s accepts indented strings 169s for assignment with x = 169s accepts indented strings 169s registers an offense for aligned strings 169s for assignment with X = 169s registers an offense for aligned strings 169s accepts indented strings 169s for assignment with x += 169s accepts indented strings 169s registers an offense for aligned strings 169s 169s RuboCop::Cop::Layout::RescueEnsureAlignment 169s accepts correctly aligned rescue/ensure with def with no body 169s accepts aligned rescue with do-end block that line break with trailing dot for method calls 169s accepts rescue and ensure on the same line 169s accepts aligned rescue in do-end block on operation assignment 169s accepts aligned rescue in assigned do-end block starting on newline 169s accepts correctly aligned ensure 169s accepts aligned rescue in do-end block on and-assignment 169s accepts correctly aligned rescue/ensure with def 169s accepts aligned rescue in do-end block in a method 169s accepts correctly aligned rescue in assigned begin-end block 169s accepts aligned rescue in do-end block assigned to class 169s accepts aligned rescue in do-end block on multi-assignment 169s accepts aligned rescue in do-end block assigned to class variable 169s accepts end being misaligned 169s accepts aligned rescue in do-end block on or-assignment 169s accepts aligned rescue with do-end block that line break with leading dot for method calls 169s accepts correctly aligned rescue 169s accepts aligned rescue in do-end block 169s accepts the modifier form 169s accepts aligned rescue in do-end block assigned to instance variable 169s accepts aligned rescue do-end block assigned to local variable 169s accepts aligned rescue in do-end block assigned to global variable 169s accepts aligned rescue in do-end block with `.()` call 169s rescue with module 169s registers an offense when rescue used with module 169s rescue in do-end block assigned to local variable 169s registers an offense 169s rescue in do-end block on or-assignment 169s registers an offense 169s ensure with def 169s registers an offense 169s ensure with begin 169s registers an offense when ensure used with begin 169s when using zsuper with block 169s does not register an offense when correct alignment 169s registers and corrects an offense and corrects when incorrect alignment 169s rescue in do-end block assigned to class variable 169s registers an offense 169s rescue in do-end block assigned to instance variable 169s registers an offense 169s ensure with class 169s registers an offense 169s allows inline expression before 169s rescue 169s registers an offense 169s ensure 169s registers an offense 169s rescue with do-end block 169s registers an offense 169s ensure with defs 169s registers an offense 169s rescue in assigned do-end block starting on newline 169s registers an offense 169s rescue in do-end block on multi-assignment 169s registers an offense 169s allows inline access modifier 169s with private modifier 169s rescue with defs 169s correct alignment 169s registers an offense 169s ensure with defs 169s correct alignment 169s registers an offense 169s rescue with def 169s correct alignment 169s registers an offense 169s ensure with def 169s correct alignment 169s registers an offense 169s with public_class_method modifier 169s ensure with defs 169s registers an offense 169s correct alignment 169s ensure with def 169s registers an offense 169s correct alignment 169s rescue with def 169s correct alignment 169s registers an offense 169s rescue with defs 169s correct alignment 169s registers an offense 169s with private_class_method modifier 169s ensure with defs 169s registers an offense 169s correct alignment 169s ensure with def 169s correct alignment 169s registers an offense 169s rescue with def 169s registers an offense 169s correct alignment 169s rescue with defs 169s correct alignment 169s registers an offense 169s rescue with class 169s registers an offense when rescue used with class 169s rescue with def 169s registers an offense 169s ensure with module 169s registers an offense when ensure used with module 169s rescue with begin 169s registers an offense 169s as RHS of assignment 169s when `EnforcedStyleAlignWith: start_of_line` of `Layout/BeginEndAlignment` cop 169s accepts multi-line, indented 169s registers an offense and corrects for incorrect alignment 169s accepts multi-line, aligned 169s `Layout/BeginEndAlignment` cop is not enabled 169s accepts multi-line, indented 169s accepts multi-line, aligned 169s registers an offense and corrects for incorrect alignment 169s when `EnforcedStyleAlignWith: begin` of `Layout/BeginEndAlignment` cop 169s registers an offense and corrects for incorrect alignment 169s accepts multi-line, aligned 169s accepts multi-line, indented 169s rescue with defs 169s registers an offense 169s excluded file 169s processes excluded files with issue 169s rescue in do-end block assigned to class 169s registers an offense 169s rescue in do-end block assigned to global variable 169s registers an offense 169s rescue in do-end block on operation assignment 169s registers an offense 169s rescue in do-end block on and-assignment 169s registers an offense 169s 169s RuboCop::Cop::Style::TrailingBodyOnModule 169s registers an offense when body trails after module definition 169s registers offense with multi-line module 169s autocorrects when there are multiple semicolons 169s registers offense when module definition uses semicolon 169s accepts regular module 169s autocorrects with comment after body 169s when module is not on first line of processed_source 169s autocorrects offense 169s 169s RuboCop::Cop::Style::OrAssignment 169s when using `elsif` statement 169s does not register an offense 169s when `then` branch body is empty 169s registers an offense 169s when using unless var; var = something; end 169s registers an offense for global variables 169s registers an offense for instance variables 169s registers an offense for normal variables 169s does not register an offense if any of the variables are different 169s registers an offense for class variables 169s when using var = var ? var : something 169s does not register an offense if any of the variables are different 169s registers an offense with normal variables 169s registers an offense with class variables 169s registers an offense with global variables 169s registers an offense with instance variables 169s when using var = if var; var; else; something; end 169s does not register an offense if any of the variables are different 169s registers an offense with global variables 169s registers an offense with normal variables 169s registers an offense with class variables 169s registers an offense with instance variables 169s when using var = something unless var 169s registers an offense for instance variables 169s registers an offense for normal variables 169s does not register an offense if any of the variables are different 169s registers an offense for global variables 169s registers an offense for class variables 169s 169s RuboCop::Cop::Style::Send 169s with send 169s and with a receiver 169s does not register an offense for an invocation without args 169s registers an offense for an invocation with args 169s when using safe navigation operator 169s registers an offense for an invocation with args 169s and without a receiver 169s does not register an offense for an invocation without args 169s registers an offense for an invocation with args 169s with __send__ 169s and with a receiver 169s does not register an offense for an invocation with args 169s does not register an offense for an invocation without args 169s and without a receiver 169s does not register an offense for an invocation without args 169s does not register an offense for an invocation with args 169s with public_send 169s and without a receiver 169s does not register an offense for an invocation with args 169s does not register an offense for an invocation without args 169s and with a receiver 169s does not register an offense for an invocation without args 169s does not register an offense for an invocation with args 169s 169s RuboCop::Cop::Lint::IncompatibleIoSelectWithFiberScheduler 169s registers and corrects an offense when using `::IO.select` with single read argument 169s registers an offense when using `IO.select` with write argument and using return value but does not autocorrect 169s does not register an offense when using `IO.select` with multiple write arguments 169s registers and corrects an offense when using `IO.select` with single write and timeout arguments 169s registers and corrects an offense when using `IO.select` with multiple read argument and specify the first argument only 169s registers and corrects an offense when using `IO.select` with single read argument and specify the first argument only 169s does not register an offense when using `IO.select` with read and write arguments 169s registers and corrects an offense when using `IO.select` with single write as `self` and timeout arguments 169s registers an offense when using `IO.select` with read argument and using return value but does not autocorrect 169s registers and corrects an offense when using `IO.select` with single write argument 169s does not register an offense when using `Enumerable#select` 169s registers and corrects an offense when using `IO.select` with single read and timeout arguments 169s registers and corrects an offense when using `IO.select` with single write, `nil`, and timeout arguments 169s registers and corrects an offense when using `IO.select` with single read as `self` and timeout arguments 169s registers and corrects an offense when using `IO.select` with single read argument 169s registers and corrects an offense when using `::IO.select` with single read and timeout arguments 169s registers and corrects an offense when using `IO.select` with single read, `nil`, and timeout arguments 169s does not register an offense when using `IO.select` with multiple read arguments 169s 169s RuboCop::Cop::Badge 169s exposes cop name 169s exposes department name 169s can be converted to a string with the Department/CopName format 169s compares by value 169s .new 169s assigns name 169s assigns department 169s assigns department 169s assigns name 169s assigns department 169s assigns department 169s assigns name 169s assigns name 169s .for 169s parses cop class name 169s parses cop class name 169s parses cop class name 169s parses cop class name 169s parses cop class name 169s #camel_case 169s converts "foo_bar" to CamelCase 169s converts "lint" to CamelCase 169s converts "rspec" to CamelCase 169s .parse 169s parses identifier 169s parses identifier 169s parses identifier 169s parses identifier 169s parses identifier 169s parses identifier 169s #qualified? 169s says `Deep/Department/CopName` is qualified 169s says `CopName` is not qualified 169s says `Department/CopName` is qualified 169s 169s RuboCop::Cop::Style::EmptyElse 169s configured to warn on empty else 169s given an if-statement 169s with an else-clause with side-effects 169s doesn't register an offense 169s with a completely empty else-clause 169s using semicolons 169s behaves like autocorrect 169s MissingElse is case 169s does autocorrection 169s MissingElse is disabled 169s does autocorrection 169s MissingElse is if 169s does not autocorrect 169s MissingElse is both 169s does not autocorrect 169s not using semicolons 169s behaves like autocorrect 169s MissingElse is both 169s does not autocorrect 169s MissingElse is if 169s does not autocorrect 169s MissingElse is case 169s does autocorrection 169s MissingElse is disabled 169s does autocorrection 169s with no else-clause 169s doesn't register an offense 169s in an if-statement 169s behaves like autocorrect 169s MissingElse is case 169s does autocorrection 169s MissingElse is if 169s does not autocorrect 169s MissingElse is both 169s does not autocorrect 169s MissingElse is disabled 169s does autocorrection 169s with an empty comment 169s does not autocorrect 169s with an else-clause containing only the literal nil 169s doesn't register an offense 169s given a case statement 169s with a completely empty else-clause 169s behaves like autocorrect 169s MissingElse is disabled 169s does autocorrection 169s MissingElse is if 169s does autocorrection 169s MissingElse is case 169s does not autocorrect 169s MissingElse is both 169s does not autocorrect 169s with no else-clause 169s doesn't register an offense 169s with an else-clause containing only the literal nil 169s doesn't register an offense 169s with an else-clause with side-effects 170s doesn't register an offense 170s given an unless-statement 170s with a completely empty else-clause 170s behaves like autocorrect 170s MissingElse is if 170s does not autocorrect 170s MissingElse is both 170s does not autocorrect 170s MissingElse is disabled 170s does autocorrection 170s MissingElse is case 170s does autocorrection 170s with an else-clause containing only the literal nil 170s doesn't register an offense 170s with an else-clause with side-effects 170s doesn't register an offense 170s with no else-clause 170s doesn't register an offense 170s with nested if and case statement 170s behaves like autocorrect 170s MissingElse is case 170s does not autocorrect 170s MissingElse is if 170s does autocorrection 170s MissingElse is disabled 170s does autocorrection 170s MissingElse is both 170s does not autocorrect 170s configured to warn on nil in else 170s given a case statement 170s with no else-clause 170s doesn't register an offense 170s with a completely empty else-clause 170s doesn't register an offense 170s with an else-clause containing only the literal nil 170s when the result is assigned to a variable 170s behaves like autocorrect 170s MissingElse is case 170s does not autocorrect 170s MissingElse is if 170s does autocorrection 170s MissingElse is both 170s does not autocorrect 170s MissingElse is disabled 170s does autocorrection 170s using semicolons 170s behaves like autocorrect 170s MissingElse is both 170s does not autocorrect 170s MissingElse is if 170s does autocorrection 170s MissingElse is case 170s does not autocorrect 170s MissingElse is disabled 170s does autocorrection 170s with an else-clause with side-effects 170s doesn't register an offense 170s given an unless-statement 170s with a completely empty else-clause 170s doesn't register an offense 170s with an else-clause containing only the literal nil 170s behaves like autocorrect 170s MissingElse is disabled 170s does autocorrection 170s MissingElse is both 170s does not autocorrect 170s MissingElse is case 170s does autocorrection 170s MissingElse is if 170s does not autocorrect 170s with an else-clause with side-effects 170s doesn't register an offense 170s with no else-clause 170s doesn't register an offense 170s given an if-statement 170s with a completely empty else-clause 170s doesn't register an offense 170s with an else-clause containing only the literal nil using semicolons 170s with one elsif 170s behaves like autocorrect 170s MissingElse is disabled 170s does autocorrection 170s MissingElse is case 170s does autocorrection 170s MissingElse is both 170s does not autocorrect 170s MissingElse is if 170s does not autocorrect 170s with multiple elsifs 170s behaves like autocorrect 170s MissingElse is both 170s does not autocorrect 170s MissingElse is disabled 170s does autocorrection 170s MissingElse is if 170s does not autocorrect 170s MissingElse is case 170s does autocorrection 170s with an else-clause with side-effects 170s doesn't register an offense 170s with an else-clause containing only the literal nil 170s when the result is assigned to a variable 170s behaves like autocorrect 170s MissingElse is if 170s does not autocorrect 170s MissingElse is case 170s does autocorrection 170s MissingElse is both 170s does not autocorrect 170s MissingElse is disabled 170s does autocorrection 170s when standalone 170s behaves like autocorrect 170s MissingElse is both 170s does not autocorrect 170s MissingElse is disabled 170s does autocorrection 170s MissingElse is if 170s does not autocorrect 170s MissingElse is case 170s does autocorrection 170s with no else-clause 170s doesn't register an offense 170s when `AllowComments: true` 170s given an unless-statement 170s with not comment and nil else-clause 170s registers an offense 170s with comment and empty else-clause 170s doesn't register an offense 170s with not comment and empty else-clause 170s registers an offense 170s with comment and nil else-clause 170s doesn't register an offense 170s given an if-statement 170s with comment and nil else-clause 170s doesn't register an offense 170s with not comment and empty else-clause 170s registers an offense 170s with comment and empty else-clause 170s doesn't register an offense 170s with not comment and nil else-clause 170s registers an offense 170s given a case statement 170s with not comment and nil else-clause 170s registers an offense 170s with not comment and empty else-clause 170s registers an offense 170s with comment and nil else-clause 170s doesn't register an offense 170s with comment and empty else-clause 170s doesn't register an offense 170s configured to warn on empty else and nil in else 170s given a case statement 170s with an else-clause with side-effects 170s doesn't register an offense 170s with no else-clause 170s doesn't register an offense 170s with an else-clause containing only the literal nil 170s behaves like autocorrect 170s MissingElse is disabled 170s does autocorrection 170s MissingElse is both 170s does not autocorrect 170s MissingElse is if 170s does autocorrection 170s MissingElse is case 170s does not autocorrect 170s with a completely empty else-clause 170s behaves like autocorrect 170s MissingElse is disabled 170s does autocorrection 170s MissingElse is if 170s does autocorrection 170s MissingElse is case 170s does not autocorrect 170s MissingElse is both 170s does not autocorrect 170s given an if-statement 170s with a completely empty else-clause 170s behaves like autocorrect 170s MissingElse is case 170s does autocorrection 170s MissingElse is disabled 170s does autocorrection 170s MissingElse is if 170s does not autocorrect 170s MissingElse is both 170s does not autocorrect 170s with an else-clause with side-effects 170s doesn't register an offense 170s with an else-clause containing only the literal nil 170s with one elsif 170s behaves like autocorrect 170s MissingElse is disabled 170s does autocorrection 170s MissingElse is both 170s does not autocorrect 170s MissingElse is case 170s does autocorrection 170s MissingElse is if 170s does not autocorrect 170s with multiple elsifs 170s behaves like autocorrect 170s MissingElse is both 170s does not autocorrect 170s MissingElse is disabled 170s does autocorrection 170s MissingElse is case 170s does autocorrection 170s MissingElse is if 170s does not autocorrect 170s with no else-clause 170s doesn't register an offense 170s given an unless-statement 170s with an else-clause with side-effects 170s doesn't register an offense 170s with an else-clause containing only the literal nil 170s behaves like autocorrect 170s MissingElse is if 170s does not autocorrect 170s MissingElse is disabled 170s does autocorrection 170s MissingElse is both 170s does not autocorrect 170s MissingElse is case 170s does autocorrection 170s with no else-clause 170s doesn't register an offense 170s with a completely empty else-clause 170s behaves like autocorrect 170s MissingElse is case 170s does autocorrection 170s MissingElse is if 170s does not autocorrect 170s MissingElse is disabled 170s does autocorrection 170s MissingElse is both 170s does not autocorrect 170s 170s RuboCop::Cop::Style::BlockComments 170s accepts regular comments 170s registers an offense for block comments 170s autocorrects a block comment into a regular comment (without trailingnewline) 170s autocorrects an empty block comment by removing it 170s autocorrects a block comment into a regular comment 170s 170s RuboCop::Cop::Style::IpAddresses 170s does not register an offense on an empty string 170s IPv4 170s does not register an offense for an address inside larger text 170s registers an offense for a valid address 170s does not register an offense for an invalid address 170s with allowed addresses 170s does not register an offense if the case differs 170s does not register an offense for a allowed addresses 170s IPv6 170s does not register an offense for an invalid address 170s registers an offense for a shortened address 170s registers an offense for a valid address 170s registers an offense for an address with 0s collapsed 170s registers an offense for a very short address 170s registers an offense for the loopback address 170s the unspecified address :: (shortform of 0:0:0:0:0:0:0:0) 170s does not register an offense 170s when it is removed from the allowed addresses 170s registers an offense 170s 170s RuboCop::Cop::Style::ExponentialNotation 170s EnforcedStyle is integral 170s registers no offense for negative mantissa 170s registers an offense for mantissa divisible by 10 170s registers an offense for decimal mantissa 170s registers no offense for a float smaller than 1 170s registers no offense for an integral mantissa 170s registers no offense for a regular float 170s registers no offense for negative exponent 170s EnforcedStyle is engineering 170s registers no offense for a large mantissa 170s registers an offense for a mantissa greater than -0.1 170s registers an offense for mantissa smaller than -1000 170s registers an offense for exponent equal to 4 170s registers an offense for exponent equal to -2 170s registers no offense for a mantissa equal to 1 170s registers no offense for a regular float 170s registers no offense for a negative mantissa 170s registers an offense for mantissa smaller than 0.1 170s registers no offense for a negative exponent 170s registers no offense for a float smaller than 1 170s EnforcedStyle is scientific 170s registers no offense for a regular float 170s registers no offense for a negative exponent 170s registers no offense for a mantissa equal to 1 170s registers no offense for a mantissa between 1 and 10 170s registers an offense for mantissa equal to 10 170s registers an offense for mantissa smaller than 1 170s registers an offense for mantissa greater than 10 170s registers no offense for a negative mantissa 170s registers no offense for a float smaller than 1 170s 170s RuboCop::Cop::Lint::UselessElseWithoutRescue 170s with `else` with `rescue` 170s accepts 170s with `else` without `rescue` 170s registers an offense 170s 170s RuboCop::Cop::Style::MixinGrouping 170s when configured with separated style 170s when using `prepend` 170s registers an offense for several mixins in one call 170s when using a mix of diffent methods 170s registers an offense for some calls having several mixins 170s when using `extend` 170s registers an offense for several mixins in one call 170s when using `include` 170s registers an offense for several mixins in one call 170s registers an offense for several mixins in separate calls 170s allows include call as an argument to another method 170s when configured with grouped style 170s when using `prepend` 170s registers an offense when other mixins have receivers 170s registers an offense for single mixins in separate calls 170s registers an offense for single mixins in separate calls, interspersed 170s when using `extend` 170s registers an offense for single mixins in separate calls 170s when using include 170s registers an offense for several mixins in separate calls 170s allows include with an explicit receiver 170s registers an offense for single mixins in separate calls 170s when using a mix of diffent methods 170s registers an offense with some duplicated mixin methods 170s allows all different mixin methods 170s 170s RuboCop::Cop::Style::StabbyLambdaParentheses 170s require_no_parentheses 170s registers an offense for a stabby lambda with parentheses 170s behaves like common 170s does not check a method call named lambda 170s does not check the old lambda syntax 170s does not check a stabby lambda without arguments 170s require_parentheses 170s registers an offense for a stabby lambda without parentheses 170s does not register an offense for a stabby lambda with parentheses 170s behaves like common 170s does not check the old lambda syntax 170s does not check a method call named lambda 170s does not check a stabby lambda without arguments 170s 170s RuboCop::RemoteConfig 170s .inherit_from_remote 170s when the remote includes file starting with `./` 170s returns remote includes URI 170s .file 170s downloads the file if the file does not exist 170s does not download the file if cache lifetime has not been reached 170s downloads the file if cache lifetime has been reached 170s when the network is inaccessible 170s reuses the existing cached file 170s when the remote URL responds with 500 170s raises error 170s when the remote URL responds with not modified 170s reuses the existing cached file 170s when remote URL is configured with token auth 170s downloads the file if cache lifetime has been reached 170s downloads the file if the file does not exist 170s does not download the file if cache lifetime has not been reached 170s when the remote URL responds with 404 170s raises error 170s when remote URL is configured with basic auth 170s downloads the file if the file does not exist 170s does not download the file if cache lifetime has not been reached 170s downloads the file if cache lifetime has been reached 170s when the remote URL responds with 404 170s raises error 170s when the remote URL responds with 500 170s raises error 170s when the remote URL responds with redirect 170s follows the redirect and downloads the file 170s 170s RuboCop::Cop::Layout::MultilineHashBraceLayout 170s ignores implicit hashes 170s ignores empty hashes 170s ignores single-line hashes 170s behaves like multiline literal brace layout 170s same_line style 170s opening brace on separate line from first element 170s allows closing brace on same line as last multiline element 170s allows closing brace on same line as last element 170s detects closing brace on different line from last element 170s opening brace on same line as first element 170s allows closing brace on same line as multi-line element 170s allows closing brace on same line from last element 170s autocorrects closing brace on different line as last element 170s detects closing brace on different line from multiline element 170s with a chained call on the closing brace 170s and a comment after the last element 170s detects closing brace on separate line from last elementbut does not autocorrect the closing brace 170s but no comment after the last element 170s autocorrects the closing brace 170s heredoc 170s detects heredoc structures that are safe to add to 170s ignores heredocs that could share a last line 170s new_line style 170s opening brace on same line as first element 170s allows closing brace on different line from last element 170s autocorrects closing brace on same line as last element 170s allows closing brace on different line from multi-line element 170s detects closing brace on same line as last multiline element 170s opening brace on separate line from first element 170s detects closing brace on same line as last element 170s allows closing brace on separate line from last element 170s allows closing brace on separate line from last multiline element 170s symmetrical style 170s opening brace on separate line from first element 170s allows closing brace on separate line from last element 170s allows closing brace on separate line from last multiline element 170s detects closing brace on same line as last element 170s opening brace on same line as first element 170s detects closing brace on different line from last element 170s autocorrects closing brace on different line from last element 170s allows closing brace on same line as last element 170s allows closing brace on same line as last multiline element 170s with a chained call on the closing brace 170s but no comment after the last element 170s autocorrects the closing brace 170s and a comment after the last element 170s detects closing brace on separate line from last elementbut does not autocorrect the closing brace 170s behaves like multiline literal brace layout method argument 170s when arguments to a method 170s and a comment after the last element 170s detects closing brace on separate line from last element 170s but no comment after the last element 170s autocorrects the closing brace 170s behaves like multiline literal brace layout trailing comma 170s same_line style 170s opening brace on same line as first element 170s last element has a trailing comma 170s autocorrects closing brace on different line as last element 170s symmetrical style 170s opening brace on same line as first element 170s last element has a trailing comma 170s autocorrects closing brace on different line from last element 170s 170s RuboCop::CLI 170s finds a file with no .rb extension but has a shebang line 171s registers an offense for a syntax error 171s checks a given file with faults and returns 1 171s can process a file with an invalid UTF-8 byte sequence 171s registers an offense for Parser warnings 171s does not register any offenses for an empty file 171s for a disabled cop 171s reports no offense when enabled on part of a file 171s info severity 171s when given `--display-only-fail-level-offenses` 171s returns a 0 code but does not list offenses 171s when given `--fail-level info` 172s returns a 1 code 172s when `Lint/Syntax` is given `Severity: info` 172s is an invalid configuration 172s when there are only info offenses 172s returns a 0 code 172s when there are not only info offenses 172s returns a 1 code 172s configuration from file 172s works when a configuration file passed by -c specifies Exclude with strings 172s can exclude a typical vendor directory 172s displays cop names if DisplayCopNames is false 172s cannot disable Syntax offenses 173s runs without errors for an unrecognized cop name in .rubocop.yml and `--ignore-unrecognized-cops` option is given 173s matches included/excluded files correctly when . argument is given 173s uses the DefaultFormatter if another formatter is not specified 173s prints an error message for an unrecognized EnforcedStyle 173s works when a configuration file specifies Severity for Metrics/ParameterLists and Layout 173s allows the default configuration file as the -c argument 173s can be configured with option to disable a certain error 174s can exclude a vendor directory with an erroneous config file 174s excludes the vendor directory by default 174s ignores excluded files 174s fails when a configuration file specifies an invalid Severity 174s can have different config files in different directories 174s fails when a configuration file has invalid YAML syntax 174s works when a configuration file specifies Severity for Metrics/ParameterLists and Layout/LineLength 174s does not read files in excluded list 174s shows an error if the input file cannot be found 175s can exclude directories relative to .rubocop.yml 175s works when a cop that others depend on is disabled 175s can exclude a vendor directory indirectly 175s prints a warning for an unrecognized configuration parameter 175s does not consider Include parameters in subdirectories 175s finds included files 175s only reads configuration in explicitly included hidden directories 176s can be configured to merge a parameter that is a hash 176s can be configured to override a parameter that is a hash in a special case 176s can be configured with project config to disable a certain error 176s can use an alternative max line length from a config file 176s works when a configuration file passed by -c specifies Exclude with regexp 176s can disable parser-derived offenses with warning severity 176s prints an error for an unrecognized cop name in .rubocop.yml 177s prefers a config file in ancestor directory to another in home 177s displays style guide URLs if DisplayStyleGuide is true 177s when configuration is taken from $HOME/.rubocop.yml 177s handles relative excludes correctly when run from project root 177s when a value in a hash is overridden with nil 177s acts as if the key/value pair was removed 177s without using namespace 177s can be configured with option to disable a certain error 177s when MultilineOperationIndentation is used with aligned style and IndentationWidth parameter 177s fails with an error message 177s when a file inherits from a higher level 177s inherits relative excludes correctly 177s when --force-default-config option is specified 177s when config file specified with -c 178s ignores config file 178s when no config file specified 178s ignores config file 178s when obsolete MultiSpaceAllowedForOperators param is used 178s displays a warning 178s when configured for indented_internal_methods style indentation 178s registers offense for normal indentation in module 178s accepts indented_internal_methods style indentation 178s registers offense for normal indentation in class 178s when MultilineMethodCallIndentation is used with aligned style and IndentationWidth parameter 178s fails with an error message 178s when parallel static by default 178s when setting `UseCache: false` 178s fails with an error message 178s when setting `UseCache: true` 179s fails with an error message 179s when specifying `--debug` and `-a` options` 179s uses parallel inspection when correcting the file 179s when specifying `--debug` option only` 179s fails with an error message 179s when a directory is named `*` 179s does not crash 179s unknown cop 179s in configuration file is given 179s prints the error and exists with code 2 179s when lines end with CR+LF 179s reports an offense 179s configuration of `require` 179s unknown library is specified 179s exits with 2 179s cops can exclude files based on config 179s ignores excluded files 179s configuration of target Ruby versions 179s when configured with an unknown version 180s fails with an error message 180s when configured with an unsupported ruby 180s fails with an error message 180s when errors are raised while processing files due to bugs 180s displays an error message to stderr 180s rubocop:disable comment 180s can disable all cops on a single line 180s can disable selected cops in a code section 180s can disable selected cops on a single line 180s can disable all cops in a code section 180s when --autocorrect-all is given 181s does not trigger RedundantCopDisableDirective due to lines moving around 181s Specify `--init` option to `rubocop` command 181s when .rubocop.yml already exists 181s fails with an error message 181s when .rubocop.yml does not exist 181s generate a .rubocop.yml file 181s without using namespace 181s can disable selected cops on a single line but prints a warning 181s when not necessary 181s causes an offense to be reported 181s and RedundantCopDisableDirective is disabled through department 181s does not report RedundantCopDisableDirective offenses 181s and RedundantCopDisableDirective is individually disabled 181s does not report RedundantCopDisableDirective offenses 181s and RedundantCopDisableDirective is individually excluded 181s does not report RedundantCopDisableDirective offenses 181s when using `rubocop:disable` line comment for `Style/RedundantInitialize` 182s does not register an offense for `Lint/RedundantCopDisableDirective` 182s and there are no other offenses 182s exits with error code 182s when using `rubocop:disable` line comment for `Lint/EmptyBlock` 182s does not register an offense for `Lint/RedundantCopDisableDirective` 182s when checking a correct file 182s returns 0 182s when super is used with a block 182s still returns 0 182s when interrupted 182s returns 130 182s obsolete cops 182s when configuration for TrailingComma is given 182s fails with an error message 182s style guide only usage 182s via the config 182s AllCops/DisabledByDefault 182s when it is true 182s runs only the cop configured in .rubocop.yml 182s when it is false 183s runs all cops that are enabled in default configuration 183s AllCops/StyleGuideCopsOnly 183s when it is false 183s runs cops for rules regardless of any link to the style guide 183s when it is true 183s skips cops that have no link to a style guide 183s via the cli option 183s --only-guide-cops 183s runs cops for rules that link to a style guide 183s skips cops that have no link to a style guide 183s overrides configuration of AllCops/StyleGuideCopsOnly 183s when given a file/directory that is not under the current dir 183s and the directory is absolute 183s checks a Rakefile but Style/FileName does not report 183s and the Rakefile path is relative 183s checks a Rakefile but Style/FileName does not report 183s and the Rakefile path is absolute 184s checks a Rakefile but Style/FileName does not report 184s and the directory is relative 184s checks a Rakefile but Style/FileName does not report 184s configuration of `AutoCorrect` 184s when setting `AutoCorrect: false` for `Style/StringLiterals` 184s does not suggest `1 offense autocorrectable` for `Style/StringLiterals` 184s 184s RuboCop::Cop::Style::NonNilCheck 184s when allowing semantic changes 184s does not register an offense for `!x` 184s registers an offense for `!x.nil?` 184s registers an offense for `not x.nil?` 184s does not blow up with ternary operators 184s corrects code that would not be modified if IncludeSemanticChanges were false 184s does not blow up when autocorrecting implicit receiver 184s autocorrects by changing `x != nil` to `x` 184s registers an offense for unless x.nil? 184s does not register an offense for `x.nil?` 184s when not allowing semantic changes 184s does not register an offense with implicit receiver 184s does not register an offense if only expression in predicate 184s does not register an offense for != 0 184s does not register an offense for not x.nil? 184s does not register an offense if last expression in predicate 184s registers an offense but does not correct when the code was not modified 184s does not register an offense if only expression in class predicate 184s registers an offense for != nil 184s does not register an offense if last expression in class predicate 184s does not register an offense for !x.nil? 184s when `EnforcedStyle: comparison` of `Style/NilComparison` cop 184s `IncludeSemanticChanges: true` 184s registers an offense for `foo != nil` 184s `IncludeSemanticChanges: false` 184s does not register an offense for `foo != nil` 184s 184s RuboCop::Cop::Lint::TrailingCommaInAttributeDeclaration 184s does not register an offense when not using trailing comma 184s registers an offense when using trailing comma 184s 184s RuboCop::Cop::Bundler::DuplicatedGem 184s when investigating Ruby files 184s does not register any offenses 184s when investigating Gemfiles 184s does not register an offense when gem is duplicated within `if-else` statement 184s does not register an offense when gem is duplicated within `case` statement 184s does not register an offense when gem is duplicated within `if-elsif` statement 184s registers an offense when gem from default group is conditionally duplicated 184s and a duplicated gem is in a git/path/group/platforms block 184s registers an offense 184s and no duplicate gems are present 184s does not register any offenses 184s and a gem is duplicated in default group 184s registers an offense 184s and the file is empty 184s does not register any offenses 184s 184s RuboCop::Cop::Layout::SpaceInsideReferenceBrackets 184s with space inside empty braces allowed 184s accepts empty brackets with space inside 184s registers offense and corrects empty brackets with newline inside 184s registers offense and corrects empty brackets with no space inside 184s registers offense and corrects empty brackets with more than one space inside 184s when EnforcedStyle is space 184s registers an offense and corrects ref brackets with no leading whitespace 184s registers an offense and corrects second ref brackets with no trailing whitespace 184s accepts an array as a reference object 184s accepts square brackets as method name 184s registers an offense and corrects second ref brackets with no leading whitespace 184s registers an offense and correct third ref brackets with no trailing whitespace 184s does not register offense for array literals 184s registers an offense and corrects when a reference bracket with no leading whitespace is assigned by another reference bracket 184s registers and corrects multiple offenses in one set of ref brackets 184s registers an offense and corrects third ref brackets with no leading whitespace 184s does not register offense for ref bcts with spaces that assign 184s accepts spaces in array brackets 184s registers and corrects multiple offenses for multiple sets of ref brackets 184s registers an offense and corrects when a reference bracket with no trailing whitespace is assigned by another reference bracket 184s accepts square brackets called with method call syntax 184s does not register offense for reference brackets with spaces 184s registers an offense and corrects when a reference bracket is assigned by another reference bracket with no trailing whitespace 184s registers an offense and corrects ref brackets with no trailing whitespace 184s when EnforcedStyle is no_space 184s registers an offense and corrects third ref brackets with leading whitespace 184s registers an offense and corrects second ref brackets with leading whitespace 184s registers an offense and corrects when a reference bracket is assigned by another reference bracket with trailing whitespace 184s does not register offense for reference brackets with no spaces 184s register and correct multiple offenses for multiple sets of ref brackets 184s does not register offense for ref bcts with no spaces that assign 184s registers an offense and corrects when a reference bracket with a trailing whitespace is assigned by another reference bracket 184s registers an offense and corrects when a reference bracket with a leading whitespace is assigned by another reference bracket 184s registers an offense and corrects third ref brackets with trailing whitespace 184s registers an offense and corrects outer ref brackets 184s does not register offense for array literals 184s accepts square brackets as method name 184s does not register offense for non-empty brackets with newline inside 184s registers an offense and corrects ref brackets with leading whitespace 184s registers an offense and corrects second ref brackets with trailing whitespace 184s registers an offense and corrects ref brackets with trailing whitespace 184s accepts square brackets called with method call syntax 184s registers multiple offenses and corrects multiple sets of ref brackets 184s accepts extra spacing in array brackets 184s accepts an array as a reference object 184s registers multiple offenses and corrects one set of ref brackets 184s with space inside empty brackets not allowed 184s registers an offense and corrects empty brackets with newline inside 184s registers an offense and corrects empty brackets with 1 space inside 184s registers an offense and corrects empty brackets with multiple spaces inside 184s accepts empty brackets with no space inside 184s 184s RuboCop::Cop::Style::EmptyCaseCondition 184s given a case statement with an empty case 184s with a single when branch and no else 184s behaves like detect/correct empty case, accept non-empty case 184s accepts the source with case 184s registers an offense and autocorrects 184s when using `return ... if` in `else` clause and assigning the return value of `case` 184s does not register an offense 184s when used as an argument of a method without comment 184s behaves like detect/correct empty case, accept non-empty case 184s accepts the source with case 184s registers an offense and autocorrects 184s with multiple when branches and an else 184s behaves like detect/correct empty case, accept non-empty case 184s accepts the source with case 184s registers an offense and autocorrects 184s when using `return` in `else` clause and assigning the return value of `case` 184s does not register an offense 184s with first when branch including comma-delimited alternatives 184s behaves like detect/correct empty case, accept non-empty case 184s accepts the source with case 184s registers an offense and autocorrects 184s with a when branch including comma-delimited alternatives 184s behaves like detect/correct empty case, accept non-empty case 184s accepts the source with case 184s registers an offense and autocorrects 184s with multiple when branches and no else 184s behaves like detect/correct empty case, accept non-empty case 184s registers an offense and autocorrects 184s accepts the source with case 184s when using `when ... then` in `case` in a method call 184s behaves like detect/correct empty case, accept non-empty case 184s accepts the source with case 184s registers an offense and autocorrects 184s when used as an argument of a method with comment 184s behaves like detect/correct empty case, accept non-empty case 184s accepts the source with case 184s registers an offense and autocorrects 184s when using `when ... then` in `case` in `return` 184s behaves like detect/correct empty case, accept non-empty case 184s accepts the source with case 184s registers an offense and autocorrects 184s when using `return` in `when` clause and assigning the return value of `case` 184s does not register an offense 184s with when branches using then 184s behaves like detect/correct empty case, accept non-empty case 184s registers an offense and autocorrects 184s accepts the source with case 184s with multiple when branches and an `else` with code comments 184s behaves like detect/correct empty case, accept non-empty case 184s registers an offense and autocorrects 184s accepts the source with case 184s with a single when branch and an else 184s behaves like detect/correct empty case, accept non-empty case 184s accepts the source with case 184s registers an offense and autocorrects 184s when using `return ... if` in `when` clause and assigning the return value of `case` 184s does not register an offense 184s 184s RuboCop::Cop::Metrics::AbcSize 184s when Max is 10.3 184s reports size and max as <10, 10, 40> 42.43/10.3 184s when Max is 1000.3 185s reports size and max as <1000, 1000, 4000> 4243/1000 185s when Max is 0 185s accepts an empty `define_method` 185s registers an offense for complex content including A, B, and C scores 185s treats safe navigation method calls like regular method calls + a condition 185s registers an offense for an if modifier 185s registers an offense for an assignment of a local variable 185s registers an offense for an assignment of an element 185s registers an offense for a `define_method` 185s accepts an empty method 185s Ruby 2.7 185s registers an offense for a `define_method` with numblock 185s when method is in list of allowed methods 185s when AllowedMethods is enabled 185s does not register an offense when defining an instance method 185s does not register an offense when using `define_method` 185s does not register an offense when defining a class method 185s when AllowedPatterns is enabled 185s does not register an offense when defining a class method 185s does not register an offense when defining an instance method 185s does not register an offense when using `define_method` 185s when CountRepeatedAttributes is `false` 185s does not count repeated attributes 185s when CountRepeatedAttributes is `true` 185s counts repeated attributes 185s when Max is 2 185s accepts two assignments 185s when Max is 2.3 185s accepts a total score of 2.24 185s when Max is 100.321 185s reports size and max as <100, 100, 400> 424.3/100.3 185s when Max is 1.3 185s reports size and max as <1, 1, 4> 4.24/1.3 185s 185s RuboCop::Cop::Layout::MultilineAssignmentLayout 185s new_line style 185s registers an offense when the rhs is on the same line in setters 185s registers an offense for masgn with multi-line lhs 185s registers an offense when the rhs is on the same line in []= 185s allows multi-line assignments on separate lines 185s ignores arrays 185s registers an offense when the rhs is on the same line 185s configured supported types 185s allows supported types to be configured 185s when supported types is block 185s allows multi-line assignments when using shovel operator 185s allows multi-line assignments when using block definition on separate lines 185s allows multi-line block defines on separate lines 185s registers an offense when multi-line assignments using block definition is on the same line 185s same_line style 185s registers an offense when the rhs is a different line in []= 185s registers an offense when the rhs is a different line 185s registers an offense for masgn with multi-line lhs 185s allows multi-line assignments on the same line 185s ignores arrays 185s registers an offense when the rhs is a different line in setters 185s configured supported types 185s allows supported types to be configured 185s when supported types is block 185s allows when multi-line assignments using block definition is on the same line 185s allows multi-line block defines on separate lines 185s allows multi-line assignments when using shovel operator 185s registers an offense when multi-line assignments using block definition on separate lines 185s 185s RuboCop::Cop::Layout::LineContinuationSpacing 185s EnforcedStyle: space 185s registers no offense with one space in front of backslash 185s ignores heredocs and comments 185s registers an offense when no space in front of backslash 185s ignores when too much space in front of backslash after `__END__` 185s ignores empty code 185s registers an offense when too much space in front of backslash 185s marks the offense correctly when offense is not in first line 185s EnforcedStyle: no_space 185s registers no offense with zero spaces in front of backslash 185s registers an offense when many spaces in front of backslash 185s ignores heredocs and comments 185s ignores when too much space in front of backslash after `__END__` 185s ignores empty code 185s marks the offense correctly when offense is not in first line 185s registers an offense when one space in front of backslash 185s 185s RuboCop::Cop::Lint::FormatParameterMismatch 185s accepts an extra arg for dynamic width with other preceding flags 185s ignores percent right next to format string 185s does not register offense for `String#%` when arguments, fields match 185s does not register an offense for sprintf with splat argument 185s does not register an offense when using named parameters with escaped `%` 185s does not register an offense when single argument is not an array 185s does not register an offense when single argument is a hash 185s does not register an offense for format with splat argument 185s does not register an offense when using named parameters 185s does not register an offense when arguments and fields match 185s correctly ignores double percent 185s does not register an offense argument is the result of a message send 185s registers an offense if extra argument for dynamic width not given 185s registers an offense when calling Kernel.sprintf and the fields do not match 185s registers an offense when calling Kernel.format and the fields do not match 185s registers an offense for String#% 185s registers offense with sprintf 185s registers an offense when there are less arguments than expected 185s registers an offense when there are more arguments than expected 185s constants do not register offenses 185s identifies correctly digits for spacing in format 185s finds faults even when the string looks like a HEREDOC 185s accepts an extra argument for dynamic width 185s correctly parses different sprintf formats 185s on format with %{} interpolations 185s and 1 argument 185s does not register an offense 185s and multiple arguments 185s registers an offense 185s when format is invalid 185s registers an offense 185s when multiple arguments are called for 185s and a single variable argument is passed 185s does not register an offense 185s and a single send node is passed 185s does not register an offense 185s behaves like variables 185s does not register an offense for % called on a variable 185s does not register an offense for format called on a variable 185s does not register an offense for format called on a variable 185s with wildcard 185s does not register an offense for multiple wildcards 185s does not register an offense for width and precision 185s does not register an offense for width 185s does not register an offense for precision 185s when argument itself contains format characters and formats in format string and argument are not equal 185s ignores argument formatting 185s when format is not a string literal 185s does not register an offense 185s behaves like variables 185s does not register an offense for format called on a variable 185s does not register an offense for format called on a variable 185s does not register an offense for % called on a variable 185s when passed an empty array 185s does not register an offense 185s when using (digit)$ flag 185s does not register an offense 185s registers an offense when mismatch between the maximum value specified by (digit)$ flag and the number of arguments 185s does not register an offense when match between the maximum value specified by (digit)$ flag and the number of arguments 185s when splat argument is present 185s does not register an offense when args count is less than expected 185s when args count is more than expected 185s does not register an offense for `#sprintf` 185s registers an offense for `#%` 185s does not register an offense for `#format` 185s behaves like variables 185s does not register an offense for format called on a variable 185s does not register an offense for format called on a variable 185s does not register an offense for % called on a variable 185s on format with %<> interpolations 185s and 1 argument 185s does not register an offense 185s and multiple arguments 185s registers an offense 185s behaves like variables 185s does not register an offense for % called on a variable 185s does not register an offense for format called on a variable 185s does not register an offense for format called on a variable 185s behaves like variables 185s does not register an offense for format called on a variable 185s does not register an offense for format called on a variable 185s does not register an offense for % called on a variable 185s 185s RuboCop::Cop::Bundler::GemFilename 185s with default configuration (EnforcedStyle => `Gemfile`) 185s with non-root Gemfile.lock file path 185s does not register an offense 185s with gems.locked file path 185s registers an offense 185s with non-root Gemfile file path 185s does not register an offense 185s with non-root gems.rb file path 185s registers an offense 185s with non-root gems.locked file path 185s registers an offense 185s with Gemfile.lock file path 185s does not register an offense 185s with Gemfile file path 185s does not register an offense 185s with gems.rb file path 185s registers an offense 185s with EnforcedStyle set to `gems.rb` 185s with non-root Gemfile.lock file path 185s registers an offense 185s with Gemfile file path 185s registers an offense 185s with Gemfile.lock file path 185s registers an offense 185s with non-root Gemfile file path 185s registers an offense 185s with non-root gems.locked file path 185s does not register an offense 185s with non-root gems.rb file path 185s does not register an offense 185s with gems.rb file path 185s does not register an offense 185s 185s RuboCop::Cop::Layout::SpaceInsideRangeLiteral 185s accepts complex range literal with space in it 185s accepts no space inside ... literal 185s registers an offense for space inside .. literal 185s accepts no space inside .. literal 185s registers an offense in multiline range literal with space in it 185s registers an offense for space inside ... literal 185s accepts multiline range literal with no space in it 185s 185s RuboCop::Cop::Style::IfWithBooleanLiteralBranches 185s when `AllowedMethods: nonzero?` 185s does not register an offense when using `nonzero?` 185s when condition is a logical operator and all operands are predicate methods 185s registers and corrects an offense when using `if foo? && bar? && baz?` with boolean literal branches 185s registers and corrects an offense when using `if foo? && bar?` with boolean literal branches 185s registers and corrects an offense when using `unless foo? || bar?` with opposite boolean literal branches 185s registers and corrects an offense when using `if foo? && bar? || baz?` with boolean literal branches 185s registers and corrects an offense when using `if foo? && bar?` with opposite boolean literal branches 185s registers and corrects an offense when using `unless foo? || bar?` with boolean literal branches 185s when using `elsif` with boolean literal branches 185s does not register an offense when using multiple `elsif` with boolean literal branches 185s registers and corrects an offense when using single `elsif` with boolean literal branches 185s when condition is a method that does not known whether to return boolean value 185s does not register an offense when using `if condition` with opposite boolean literal branches 185s does not register an offense when using `unless condition` with opposite boolean literal branches 185s does not register an offense when using `if condition` with boolean literal branches 185s does not register an offense when using `unless condition` with boolean literal branches 185s when double negative is used in condition 185s registers and corrects an offense when using `if !!condition` with opposite boolean literal branches 185s registers and corrects an offense when using `if !!condition` with boolean literal branches 185s when condition is a comparison method 185s registers and corrects an offense when using `if foo == bar` with opposite boolean literal branches 185s registers and corrects an offense when using `if` with boolean literal branches directly under `def` 185s registers and corrects an offense when using `unless foo == bar` with boolean literal branches 185s does not register an offense when using a branch that is not boolean literal 185s registers and corrects an offense when using opposite ternary operator with boolean literal branches 185s registers and corrects an offense when using `if` with boolean literal branches directly under `def` 185s registers and corrects an offense when using `if foo == bar` with opposite boolean literal branches 185s does not register an offense when using a branch that is not boolean literal 185s registers and corrects an offense when using `unless foo == bar` with opposite boolean literal branches 185s registers and corrects an offense when using `if foo == bar` with opposite boolean literal branches 185s registers and corrects an offense when using `unless foo == bar` with opposite boolean literal branches 185s registers and corrects an offense when using `unless foo == bar` with opposite boolean literal branches 185s registers and corrects an offense when using `unless foo == bar` with boolean literal branches 185s registers and corrects an offense when using `unless foo == bar` with opposite boolean literal branches 185s does not register an offense when using a branch that is not boolean literal 185s registers and corrects an offense when using opposite ternary operator with boolean literal branches 185s registers and corrects an offense when using `if foo == bar` with opposite boolean literal branches 185s registers and corrects an offense when using ternary operator with boolean literal branches 185s registers and corrects an offense when using `if foo == bar` with boolean literal branches 185s registers and corrects an offense when using opposite ternary operator with boolean literal branches 185s registers and corrects an offense when using `unless foo == bar` with boolean literal branches 185s registers and corrects an offense when using ternary operator with boolean literal branches 185s registers and corrects an offense when using `unless foo == bar` with boolean literal branches 185s registers and corrects an offense when using `unless foo == bar` with opposite boolean literal branches 185s registers and corrects an offense when using `unless foo == bar` with opposite boolean literal branches 185s registers and corrects an offense when using `if` with boolean literal branches directly under `def` 185s registers and corrects an offense when using ternary operator with boolean literal branches 185s registers and corrects an offense when using `if foo == bar` with boolean literal branches 185s does not register an offense when using a branch that is not boolean literal 185s registers and corrects an offense when using `if foo == bar` with boolean literal branches 185s registers and corrects an offense when using opposite ternary operator with boolean literal branches 185s registers and corrects an offense when using `if` with boolean literal branches directly under `def` 185s registers and corrects an offense when using ternary operator with boolean literal branches 185s registers and corrects an offense when using `if` with boolean literal branches directly under `def` 185s registers and corrects an offense when using `unless foo == bar` with boolean literal branches 185s registers and corrects an offense when using `unless foo == bar` with boolean literal branches 185s does not register an offense when using a branch that is not boolean literal 185s registers and corrects an offense when using `if foo == bar` with opposite boolean literal branches 185s registers and corrects an offense when using `if foo == bar` with boolean literal branches 185s registers and corrects an offense when using opposite ternary operator with boolean literal branches 185s registers and corrects an offense when using `if foo == bar` with boolean literal branches 185s registers and corrects an offense when using `if foo == bar` with boolean literal branches 185s registers and corrects an offense when using `unless foo == bar` with boolean literal branches 185s registers and corrects an offense when using `if foo == bar` with opposite boolean literal branches 185s does not register an offense when using a branch that is not boolean literal 185s registers and corrects an offense when using ternary operator with boolean literal branches 185s registers and corrects an offense when using opposite ternary operator with boolean literal branches 185s registers and corrects an offense when using `unless foo == bar` with opposite boolean literal branches 185s registers and corrects an offense when using `if foo == bar` with opposite boolean literal branches 185s does not register an offense when using a branch that is not boolean literal 185s registers and corrects an offense when using `if` with boolean literal branches directly under `def` 185s registers and corrects an offense when using opposite ternary operator with boolean literal branches 185s registers and corrects an offense when using `if` with boolean literal branches directly under `def` 185s registers and corrects an offense when using ternary operator with boolean literal branches 185s registers and corrects an offense when using ternary operator with boolean literal branches 185s registers and corrects an offense when using `if foo == bar` with boolean literal branches 185s when condition is a predicate method 185s registers and corrects an offense when using `elsif foo.do_something?` with opposite boolean literal branches 185s registers and corrects an offense when using `unless foo.do_something?` with opposite boolean literal branches 185s registers and corrects an offense when using `elsif foo.do_something?` with boolean literal branches 185s registers and corrects an offense when using `if foo.do_something?` with boolean literal branches 185s registers and corrects an offense when using `unless foo.do_something?` with boolean literal branches 185s registers and corrects an offense when using `if foo.do_something?` with opposite boolean literal branches 185s when condition is a logical operator and operands do not known whether to return boolean value 185s does not register an offense when using `unless foo || bar` with opposite boolean literal branches 185s does not register an offense when using `if foo || bar` with boolean literal branches 185s does not register an offense when using `unless foo && bar` with opposite boolean literal branches 185s does not register an offense when using `if foo || bar` with opposite boolean literal branches 185s does not register an offense when using `unless foo && bar` with boolean literal branches 185s does not register an offense when using `unless foo || bar` with boolean literal branches 185s does not register an offense when using `if foo && bar` with boolean literal branches 185s does not register an offense when using `if foo && bar` with opposite boolean literal branches 185s when complex condition 185s registers and corrects an offense when using `if foo? || (bar && baz)?` with boolean literal branches 185s registers and corrects an offense when using `if foo? || bar && baz?` with boolean literal branches 185s does not register an offense when using `if foo? || bar || baz?` with boolean literal branches 185s does not register an offense when using `if foo? && (bar || baz)?` with boolean literal branches 185s does not register an offense when using `if (foo? && bar) || baz?` with boolean literal branches 185s register and corrects an offense when using `if (foo? || bar) && baz?` with boolean literal branches 185s does not register an offense when using `if foo? && bar || baz?` with boolean literal branches 185s registers and corrects an offense when using `if foo? && bar && baz?` with boolean literal branches 185s 185s isolated environment 186s is not affected by a config file above the work directory 186s 186s RuboCop::Cop::Style::Alias 186s when EnforcedStyle is prefer_alias_method 186s does not register an offense for alias_method 186s registers an offense for alias with bareword args 186s does not register an offense for alias in an instance_eval block 186s does not register an offense for alias with gvars 186s registers an offense for alias with symbol args 186s when EnforcedStyle is prefer_alias 186s does not register an offense for alias_method with non-literal method call argument 186s does not register an offense for alias_method with non-literal constant argument 186s registers an offense for alias_method in a module block 186s does not register an offense for alias in an instance_eval block 186s registers an offense for alias_method in a class block 186s does not register an offense for alias_method in a method def 186s does not register an offense for alias_method with explicit receiver 186s registers an offense for alias with symbol args 186s does not register an offense for alias with bareword args 186s does not register an offense for alias_method in a block 186s does not register an offense for alias_method in self.method def 186s registers an offense for alias_method at the top level 186s 186s RuboCop::Cop::Layout::ParameterAlignment 186s aligned with fixed indentation 186s accepts parameter lists on a single line 186s doesn't get confused by splat 186s registers an offense and corrects parameters aligned to first param 186s accepts a method definition without parameters 186s accepts the first parameter being on a new row 186s registers an offense and corrects parameters with double indent 186s accepts proper indentation 186s defining self.method 186s accepts proper indentation 186s registers an offense and corrects parameters aligned to first param 186s aligned with first parameter 186s registers an offense and corrects alignment in simple case 186s accepts the first parameter being on a new row 186s accepts parameter lists on a single line 186s accepts proper indentation 186s registers an offense and corrects parameters with double indent 186s accepts a method definition without parameters 186s registers an offense and corrects parameters with single indent 186s doesn't get confused by splat 186s defining self.method 186s registers an offense and corrects parameters with single indent 186s accepts proper indentation 186s 186s RuboCop::Cop::Lint::NextWithoutAccumulator 186s given an unrelated block 186s accepts a bare next 186s accepts next with a value 186s behaves like reduce/inject 186s given a inject block 186s registers an offense for a bare next 186s accepts next with a value 186s accepts next within a nested block 186s Ruby 2.7 186s registers an offense for a bare next 186s behaves like reduce/inject 186s given a reduce block 186s registers an offense for a bare next 186s accepts next with a value 186s accepts next within a nested block 186s Ruby 2.7 186s registers an offense for a bare next 186s 186s RuboCop::Cop::Style::MethodCalledOnDoEndBlock 186s with a {} block 186s accepts a multi-line block with a chained call 186s accepts a single-line block with a chained call 186s Ruby 2.7 186s registers an offense for a chained call 186s with a multi-line do..end block 186s accepts a chained block 186s registers an offense for a chained call 186s accepts it if there is no chained call 186s when using safe navigation operator 186s registers an offense for a chained call 186s with a single-line do..end block 186s registers an offense for a chained call 186s accepts a single-line do..end block with a chained block 186s 186s RuboCop::Cop::VariableForce::Assignment 186s #operator 186s when it is ||= operator assignment 186s returns ||= 186s when it is multiple assignment 186s returns = 186s when it is &&= operator assignment 186s returns &&= 186s when it is += operator assignment 186s returns += 186s when it is normal assignment 186s returns = 186s #name 186s returns the variable name 186s #meta_assignment_node 186s when it is ||= operator assignment 186s returns or_asgn node 186s when it is += operator assignment 186s returns op_asgn node 186s when it is multiple assignment 186s returns masgn node 186s when it is &&= operator assignment 186s returns and_asgn node 186s .new 186s when an assignment node is passed 186s does not raise error 186s when any other type node is passed 186s raises error 186s when an argument declaration node is passed 186s raises error 186s 186s RuboCop::Cop::Lint::OrAssignmentToConstant 186s does not register an offense with plain assignment to a constant 186s registers an offense with or-assignment to a constant 186s does not register an offense with or-assignment to an attribute 186s does not register an offense with or-assignment to a global variable 186s does not register an offense with or-assignment to a local variable 186s does not register an offense with or-assignment to a class variable 186s does not register an offense with or-assignment to an instance variable 186s 186s RuboCop::Cop::Style::FetchEnvVar 186s registers an offense when using `ENV && x` that is different from `if` condition in the body 186s registers an offense when using an `ENV` at `if` condition in the body 186s registers an offense with using an `ENV` at multiple `if` condition in the body 186s registers an offense when using `ENV || x` that is different from `if` condition in the body 186s when it is compared `!=` with other object 186s does not register an offense 186s when it receives a message 186s registers no offenses 186s when it is an argument of a method 186s registers an offense 186s when it is compared `==` with other object 186s does not register an offense 186s when it is assigned to a variable 186s registers an offense when using multiple assignment 186s registers an offense when using single assignment 186s when `ENV[]` is the LHS of `||` 186s registers no offenses 186s when it is a hash value 186s registers an offense 186s when it is a hash key 186s registers an offense 186s when the node is a assigned by `||=` 186s registers an offense 186s when the node is a receiver of `&&=` 186s does not register an offense 186s with negation 186s registers no offenses 186s when it is evaluated with no default values 186s registers an offense 186s when the node is a assigned by `&&=` 186s registers an offense 186s when it is used in a conditional expression 186s registers no offenses when using the same `ENV` var as `if` condition in the body with assignment method 186s registers an offense with `case` 186s registers no offenses with `if` 186s registers no offenses with `unless` 186s registers no offenses when using the same `ENV` var as `if` condition in the body with operator 186s registers no offenses when using the same `ENV` var as `if` condition in the body 186s registers an offense with using an `ENV` var as `if` condition in the body with assignment method 186s registers an offense when using an `ENV` var that is different from `if` condition in the body 186s registers no offenses when using the same `ENV` var as `if` condition in the body with predicate method 186s registers no offenses when using the same `ENV` var as `if` condition in the body with other conditions 186s registers no offenses with ternary operator 186s when `ENV[]` is the right end of `||` chains 186s registers an offense 186s when the node is a receiver of `||=` 186s does not register an offense 186s when it is used in an interpolation 186s registers an offense 186s when the env val is excluded from the inspection by the config 186s registers no offenses 186s when it receives a message with safe navigation 186s registers no offenses 186s when using `fetch` instead of `[]` 186s registers no offenses 186s when it is an array element 186s registers an offense 186s 186s RuboCop::Cop::Lint::InheritException 186s when class inherits from `Exception` 186s with enforced style set to `runtime_error` 186s registers an offense and corrects 186s when inheriting a standard lib exception class that is not a subclass of `StandardError` 186s does not register an offense 186s when creating a subclass using Class.new 186s registers an offense and corrects 186s with enforced style set to `standard_error` 186s registers an offense and corrects 186s when inheriting a standard lib exception class that is not a subclass of `StandardError` 186s does not register an offense 186s when creating a subclass using Class.new 186s registers an offense and corrects 186s 186s RuboCop::Cop::Layout::FirstHashElementIndentation 186s when hash is right hand side in assignment 186s accepts an empty hash 186s accepts single line hash 186s accepts several pairs per line 186s accepts a first pair on the same line as the left brace 186s accepts correctly indented first pair 186s registers an offense and corrects incorrectly indented first pair 186s when indentation width is overridden for this cop 186s registers an offense and corrects incorrectly indented first pair 186s accepts correctly indented first pair 186s when EnforcedStyle is align_braces 186s registers an offense for incorrectly indented hash that is the value of a single pair hash 186s 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 186s accepts a first pair on the same line as the left brace 186s accepts an empty hash 186s registers an offense and corrects incorrectly indented } 186s accepts several pairs per line 186s accepts single line hash 186s accepts correctly indented first pair 186s when 'consistent' style is used 186s registers an offense and corrects incorrect indentation 186s when 'special_inside_parentheses' style is used 186s registers an offense and corrects incorrect indentation 186s when the HashAlignment style is separator for : 186s registers an offense and corrects incorrectly indented first pair with : 186s registers an offense and corrects incorrectly indented } 186s accepts correctly indented first pair 186s when hash is method argument 186s and argument are not surrounded by parentheses 186s 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 186s accepts a correctly indented multi-line hash with braces 186s 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 186s 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 186s accepts braceless hash 186s accepts single line hash with braces 186s accepts indent based on the left brace when the outer hash key and the left brace is not on the same line 186s registers an offense for incorrectly indented multi-line hash with braces 186s and arguments are surrounded by parentheses 186s and EnforcedStyle is consistent 186s accepts normal indentation for second argument 186s registers an offense and corrects incorrect indentation 186s 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 186s registers an offense for incorrectly indented hash that is the value of a single pair hash 186s accepts indent based on the left brace when the outer hash key and the left brace is not on the same line 186s accepts normal indentation for first argument 186s 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 186s and EnforcedStyle is special_inside_parentheses 186s accepts indent based on the left brace when the outer hash key and the left brace is not on the same line 186s accepts special indentation for second argument 186s registers an offense and corrects 'consistent' indentation 186s registers an offense for incorrectly indented hash that is the value of a single pair hash 186s accepts special indentation for first argument 186s registers an offense and corrects 'align_braces' indentation 186s accepts normal indentation for hash within hash 186s accepts indent based on the preceding left parenthesiswhen the right brace and its following pair is on the same line 186s 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 186s when using safe navigation operator 186s registers an offense and corrects 'consistent' indentation 186s when the HashAlignment style is separator for => 186s registers an offense and corrects incorrectly indented first pair with => 186s accepts correctly indented first pair 186s registers an offense and corrects incorrectly indented } 186s when hash is argument to setter 186s registers an offense and corrects incorrectly indented first pair 186s accepts correctly indented first pair 186s when hash is operand 186s registers an offense and corrects incorrectly indented } 186s registers an offense and corrects incorrectly indented first pair 186s accepts correctly indented first pair 186s 186s RuboCop::Cop::Style::EmptyBlockParameter 186s accepts an empty block parameter with a lambda 186s accepts a non-empty block parameter with do-end style 186s registers an offense for an empty block parameter with lambda 186s registers an offense for an empty block parameter with super 186s registers an offense for an empty block parameter with {} style 186s accepts a block that is {} style without parameter 186s accepts a block that is do-end style without parameter 186s registers an offense for an empty block parameter with do-end style 186s accepts a non-empty block parameter with {} style 186s 186s RuboCop::Cop::Layout::SpaceBeforeSemicolon 186s does not register an offense for no space before semicolons 186s registers an offense and corrects space before semicolon 186s registers an offense and corrects more than one space before a semicolon 186s inside block braces 186s when EnforcedStyle for SpaceInsideBlockBraces is no_space 186s registers an offense and corrects a space between an opening brace and a semicolon 186s behaves like common behavior 186s accepts no space between an opening brace and a semicolon 186s when EnforcedStyle for SpaceInsideBlockBraces is space 186s accepts a space between an opening brace and a semicolon 186s behaves like common behavior 186s accepts no space between an opening brace and a semicolon 186s heredocs 186s registers an offense and corrects 186s 186s RuboCop::Cop::Style::MagicCommentFormat 186s ValueCapitalization 186s when lowercase 186s registers an offense and corrects when the case does not match 186s when uppercase 186s registers an offense and corrects when the case does not match 186s when not set 186s does not change the case of magic comment directives 186s invalid config 186s DirectiveCapitalization 186s raises an error 186s ValueCapitalization 186s raises an error 186s kebab case style 186s accepts a source with no tokens 186s accepts an empty source 186s registers an offense for snake case 186s registers an offense for snake case in emacs style 186s accepts a frozen string literal in snake case in emacs style 186s registers an offense for mixed case 186s does not register an offense for incorrect style in comments after the first statement 186s accepts a magic comments in kebab case 186s does not register an offense for dashes in other comments 186s snake case style 186s registers an offense for kebab case 186s does not register an offense for incorrect style in comments after the first statement 186s accepts an empty source 186s accepts a source with no tokens 186s accepts a frozen string literal in snake case in emacs style 186s registers an offense for mixed case 186s registers an offense for kebab case in emacs style 186s does not register an offense for dashes in other comments 186s accepts a magic comments in snake case 186s all issues at once 186s registers and corrects multiple issues 186s DirectiveCapitalization 186s when not set 186s does not change the case of magic comment directives 186s when uppercase 186s registers an offense and corrects when the case does not match 186s when lowercase 186s registers an offense and corrects when the case does not match 186s 186s RuboCop::Cop::InternalAffairs::LocationLineEqualityComparison 186s registers and corrects an offense when comparing `#loc.line` with LHS and RHS 186s registers an offense and corrects when using `source_range.first_line` 186s registers and corrects an offense when comparing `#loc.source_range` with LHS and RHS 186s registers an offense and corrects when using `loc.first_line` 186s registers an offense and corrects when using `first_line` 186s does not register an offense when using `same_line?` 186s 186s RuboCop::Cop::Lint::UselessAccessModifier 186s behaves like def in new block 186s doesn't register an offense if a method is defined in ::Class.new 186s registers an offense if no method is defined in ::Class.new 186s behaves like def in new block 186s registers an offense if no method is defined in ::Struct.new 186s doesn't register an offense if a method is defined in ::Struct.new 186s behaves like method defined with define_method 186s doesn't register an offense if a lambda is passed 186s doesn't register an offense if a -> is passed 186s doesn't register an offense if a proc is passed 186s doesn't register an offense if a block is passed 186s behaves like nested in a begin..end block 186s still flags repeated `protected` 186s doesn't flag an access modifier from surrounding scope 186s when using ActiveSupport's `concerning` method 186s still points out redundant uses within the block 186s is aware that this creates a new scope 186s Ruby 2.7 186s still points out redundant uses within the block 186s when an access modifier is followed by attr_* 186s does not register an offense 186s when private_class_method is used with arguments 186s does not register an offense 186s when class is empty save modifier 186s registers an offense and corrects 186s behaves like nested modules 186s doesn't register an offense for nested classs 186s unused modifiers 186s registers an offense when outside a nested class 186s registers an offense with a nested class 186s registers an offense when inside a nested class 186s behaves like method defined on a singleton class 186s outside a class 186s doesn't register an offense if a method is defined 186s registers an offense if no method is defined after the modifier 186s registers an offense if no method is defined 186s inside a class 186s doesn't register an offense if the modifier is the same as outside the meta-class 186s doesn't register an offense if a method is defined 186s registers an offense even if a non-singleton-class method is defined 186s registers an offense if no method is defined 186s registers an offense if no method is defined after the modifier 186s behaves like method named by access modifier name 186s does not register an offense for `public` 186s behaves like at the end of the body 186s registers an offense for trailing `public` 186s behaves like non-repeated visibility modifiers 186s doesn't register an offense when `protected` is not repeated 187s registers an offense and corrects even when `public` is not repeated 187s doesn't register an offense when `private` is not repeated 187s behaves like method named by access modifier name 187s does not register an offense for `protected` 187s behaves like method defined using instance_eval 187s doesn't register an offense if a method is defined 187s registers an offense if no method is defined 187s inside a class 187s registers an offense when a modifier is outside the block and a method is defined only inside the block 187s registers two offenses when a modifier is inside and outside the and no method is defined 187s behaves like nested in a begin..end block 187s still flags repeated `public` 187s when an access modifier has no effect 187s registers an offense and corrects 187s behaves like unused visibility modifiers 187s registers an offense and corrects when visibility is immediately changed without any intervening defs 187s when a def is an argument to a method call 187s does not register an offense 187s behaves like at the end of the body 187s registers an offense for trailing `protected` 187s when an access modifier is followed by a class method defined on constant 187s registers an offense and corrects 187s behaves like methods defined in an iteration 187s doesn't register an offense for map 187s doesn't register an offense for each 187s behaves like nested in a begin..end block 187s still flags repeated `public` 187s behaves like repeated visibility modifiers 187s registers an offense when `protected` is repeated 187s behaves like methods defined in an iteration 187s doesn't register an offense for each 187s doesn't register an offense for map 187s behaves like repeated visibility modifiers 187s registers an offense when `private` is repeated 187s behaves like repeated visibility modifiers 187s registers an offense when `protected` is repeated 187s behaves like nested modules 187s doesn't register an offense for nested modules 187s unused modifiers 187s registers an offense when outside a nested module 187s registers an offense with a nested module 187s registers an offense when inside a nested module 187s behaves like method defined on a singleton class 187s inside a class 187s registers an offense even if a non-singleton-class method is defined 187s registers an offense if no method is defined 187s doesn't register an offense if a method is defined 187s registers an offense if no method is defined after the modifier 187s doesn't register an offense if the modifier is the same as outside the meta-class 187s outside a class 187s registers an offense if no method is defined 187s doesn't register an offense if a method is defined 187s registers an offense if no method is defined after the modifier 187s when passing method as symbol 187s does not register an offense 187s behaves like def in new block 187s registers an offense if no method is defined in ::Module.new 187s doesn't register an offense if a method is defined in ::Module.new 187s behaves like def in new block 187s registers an offense if no method is defined in Struct.new 187s doesn't register an offense if a method is defined in Struct.new 187s behaves like methods defined in an iteration 187s doesn't register an offense for each 187s doesn't register an offense for map 187s behaves like method defined using instance_eval 187s doesn't register an offense if a method is defined 187s registers an offense if no method is defined 187s inside a class 187s registers two offenses when a modifier is inside and outside the and no method is defined 187s registers an offense when a modifier is outside the block and a method is defined only inside the block 187s behaves like method named by access modifier name 187s does not register an offense for `public` 187s when using ActiveSupport behavior when Rails is not eabled 187s reports offenses and corrects 187s behaves like def in new block 187s registers an offense if no method is defined in ::Class.new 187s doesn't register an offense if a method is defined in ::Class.new 187s behaves like repeated visibility modifiers 187s registers an offense when `public` is repeated 187s behaves like method defined on a singleton class 187s inside a class 187s doesn't register an offense if a method is defined 187s registers an offense even if a non-singleton-class method is defined 187s registers an offense if no method is defined after the modifier 187s doesn't register an offense if the modifier is the same as outside the meta-class 187s registers an offense if no method is defined 187s outside a class 187s registers an offense if no method is defined after the modifier 187s doesn't register an offense if a method is defined 187s registers an offense if no method is defined 187s when an access modifier has no methods 187s registers an offense and corrects 187s behaves like methods defined in an iteration 187s doesn't register an offense for each 187s doesn't register an offense for map 187s behaves like def in new block 187s registers an offense if no method is defined in Class.new 187s doesn't register an offense if a method is defined in Class.new 187s behaves like at the top of the body 187s registers an offense and corrects for `public` 187s doesn't register an offense for `protected` 187s doesn't register an offense for `private` 187s when only a constant or local variable is defined after the modifier 187s registers an offense and corrects 187s registers an offense and corrects 187s behaves like nested in a begin..end block 187s doesn't flag an access modifier from surrounding scope 187s still flags repeated `private` 187s behaves like at the end of the body 187s registers an offense for trailing `private` 187s behaves like def in new block 187s doesn't register an offense if a method is defined in ::Struct.new 187s registers an offense if no method is defined in ::Struct.new 187s behaves like method defined using class_eval 187s doesn't register an offense if a method is defined 187s registers an offense if no method is defined 187s inside a class 187s registers two offenses when a modifier is inside and outside the block and no method is defined 187s registers an offense when a modifier is outside the block and a method is defined only inside the block 187s behaves like conditionally defined method 187s doesn't register an offense for unless 187s doesn't register an offense for if 187s behaves like def in new block 187s doesn't register an offense if a method is defined in Class.new 187s registers an offense if no method is defined in Class.new 187s behaves like nested modules 187s doesn't register an offense for nested classs 187s unused modifiers 187s registers an offense when outside a nested class 187s registers an offense when inside a nested class 187s registers an offense with a nested class 187s behaves like method defined with define_method 187s doesn't register an offense if a block is passed 187s doesn't register an offense if a lambda is passed 187s doesn't register an offense if a proc is passed 187s doesn't register an offense if a -> is passed 187s behaves like nested modules 187s doesn't register an offense for nested modules 187s unused modifiers 187s registers an offense when inside a nested module 187s registers an offense with a nested module 187s registers an offense when outside a nested module 187s behaves like conditionally defined method 187s doesn't register an offense for if 187s doesn't register an offense for unless 187s behaves like at the top of the body 187s registers an offense and corrects for `public` 187s doesn't register an offense for `private` 187s doesn't register an offense for `protected` 187s behaves like repeated visibility modifiers 187s registers an offense when `public` is repeated 187s behaves like method defined with define_method 187s doesn't register an offense if a block is passed 187s doesn't register an offense if a proc is passed 187s doesn't register an offense if a lambda is passed 187s doesn't register an offense if a -> is passed 187s behaves like method defined using class_eval 187s registers an offense if no method is defined 187s doesn't register an offense if a method is defined 187s inside a class 187s registers an offense when a modifier is outside the block and a method is defined only inside the block 187s registers two offenses when a modifier is inside and outside the block and no method is defined 187s behaves like at the end of the body 187s registers an offense for trailing `protected` 187s behaves like unused visibility modifiers 187s registers an offense and corrects when visibility is immediately changed without any intervening defs 187s behaves like def in new block 187s registers an offense if no method is defined in ::Module.new 187s doesn't register an offense if a method is defined in ::Module.new 187s when using a known method-creating method 187s still points out redundant uses within the module 187s is aware that this creates a new method 187s behaves like def in new block 187s doesn't register an offense if a method is defined in Struct.new 187s registers an offense if no method is defined in Struct.new 187s behaves like repeated visibility modifiers 187s registers an offense when `private` is repeated 187s behaves like method named by access modifier name 187s does not register an offense for `private` 187s behaves like at the end of the body 187s registers an offense for trailing `private` 187s when there are consecutive access modifiers 187s registers an offense and corrects 187s behaves like def in new block 187s registers an offense if no method is defined in Module.new 187s doesn't register an offense if a method is defined in Module.new 187s behaves like conditionally defined method 187s doesn't register an offense for unless 187s doesn't register an offense for if 187s behaves like at the end of the body 187s registers an offense for trailing `public` 187s behaves like conditionally defined method 187s doesn't register an offense for unless 187s doesn't register an offense for if 187s behaves like non-repeated visibility modifiers 187s registers an offense and corrects even when `public` is not repeated 187s doesn't register an offense when `private` is not repeated 187s doesn't register an offense when `protected` is not repeated 187s behaves like method named by access modifier name 187s does not register an offense for `protected` 187s behaves like method defined on a singleton class 187s outside a class 187s doesn't register an offense if a method is defined 187s registers an offense if no method is defined 187s registers an offense if no method is defined after the modifier 187s inside a class 187s doesn't register an offense if a method is defined 187s registers an offense if no method is defined after the modifier 187s doesn't register an offense if the modifier is the same as outside the meta-class 187s registers an offense even if a non-singleton-class method is defined 187s registers an offense if no method is defined 187s when private_class_method is used without arguments 187s registers an offense and corrects 187s behaves like method defined with define_method 187s doesn't register an offense if a proc is passed 187s doesn't register an offense if a lambda is passed 187s doesn't register an offense if a block is passed 187s doesn't register an offense if a -> is passed 187s when using inline modifiers 187s does not register an offense 187s behaves like nested in a begin..end block 187s doesn't flag an access modifier from surrounding scope 187s still flags repeated `protected` 187s behaves like method named by access modifier name 187s does not register an offense for `private` 187s behaves like def in new block 187s doesn't register an offense if a method is defined in Module.new 187s registers an offense if no method is defined in Module.new 187s behaves like nested in a begin..end block 187s doesn't flag an access modifier from surrounding scope 187s still flags repeated `private` 187s when using the class_methods method from ActiveSupport::Concern 187s is aware that this creates a new scope 187s when multiple class definitions in file but only one has offense 187s registers an offense and corrects 187s 187s RuboCop::Cop::Style::LambdaCall 187s when style is set to braces 187s registers an offense for opposite + correct 187s registers an offense for x.call() 187s autocorrects x.call to x.() 187s autocorrects x.call asdf, x123 to x.(asdf, x123) 187s accepts a call without receiver 187s registers an offense for correct + multiple opposite styles 187s when style is set to call 187s registers an offense for correct + opposite 187s registers an offense for correct + multiple opposite styles 187s registers an offense for x.() 187s 187s RuboCop::Cop::Style::ExpandPathArguments 187s does not register an offense when using `File.expand_path("#{path_to_file}.png", __FILE__)` 187s does not register an offense when using `Pathname(__dir__).expand_path` 187s does not register an offense when using `File.expand_path(__FILE__)` 187s registers an offense when using `File.expand_path('../../..', __FILE__)` 187s registers an offense when using `Pathname.new(__FILE__).parent.expand_path` 187s registers an offense when using `Pathname(__FILE__).parent.expand_path` 187s registers an offense when using `::Pathname.new(__FILE__).parent.expand_path` 187s does not register an offense when using `File.expand_path('..', __dir__)` 187s registers an offense when using `File.expand_path('..', __FILE__)` 187s registers an offense when using `File.expand_path('../../lib', __FILE__)` 187s does not register an offense when using `File.expand_path(path, __FILE__)` 187s registers an offense when using `File.expand_path('../..', __FILE__)` 187s registers an offense when using `File.expand_path('.', __FILE__)` 187s does not register an offense when using `File.expand_path(__dir__)` 187s registers an offense when using `::File.expand_path('./../..', __FILE__)` 187s registers an offense when using `File.expand_path('./../..', __FILE__)` 187s 187s RuboCop::Cop::Lint::DuplicateRescueException 187s registers an offense when duplicate exception exists 187s registers an offense when duplicate exception splat exists 187s registers an offense when duplicate exception exists within rescues with empty `rescue` branch 187s registers an offense when duplicate exception exists within rescues with `else` branch 187s does not register an offense when there are no duplicate exceptions 187s registers an offense when multiple duplicate exceptions exist 187s 187s RuboCop::Cop::Generator::RequireFileInjector 187s when using an unknown department 187s inserts a `require_relative` statement to the bottom of the file 187s when a `require_relative` entry does not exist from before 187s injects a `require_relative` statement on the right line in the root file 187s when a cop of style department already exists 187s injects a `require_relative` statement on the end of style department 187s when a `require` entry already exists 187s does not write to any file 187s 187s RuboCop::Cop::Style::BarePercentLiterals 187s when EnforcedStyle is bare_percent 187s and strings are static 187s accepts %() 187s accepts regular expressions 187s accepts "" string with interpolation 187s accepts '' 187s accepts %q 187s registers an offense for %Q() 187s accepts "" 187s accepts heredoc 187s accepts __FILE__ 187s and strings are dynamic 187s accepts '' 187s accepts heredoc 187s accepts regular expressions 187s accepts "" string with interpolation 187s accepts %q 187s accepts "" 187s accepts __FILE__ 187s accepts %() 187s registers an offense for %Q() 187s when EnforcedStyle is percent_q 187s and strings are dynamic 187s accepts '' 187s accepts %q 187s accepts %Q() 187s registers an offense for %() 187s accepts __FILE__ 187s accepts "" string with interpolation 187s accepts "" 187s accepts regular expressions 187s accepts heredoc 187s and strings are static 187s accepts heredoc 187s registers an offense for %() 187s accepts '' 187s accepts %q 187s accepts regular expressions 187s accepts "" 187s accepts __FILE__ 187s accepts "" string with interpolation 187s accepts %Q() 187s 187s RuboCop::Cop::Style::NegatedWhile 187s accepts a while where only part of the condition is negated 187s registers an offense for until with exclamation point condition 187s registers an offense for while with "not" condition 187s does not blow up for empty until condition 187s accepts a while where the condition is doubly negated 187s autocorrects by replacing while not with until 187s registers an offense for while with exclamation point condition 187s does not blow up for empty while condition 187s autocorrects by replacing until not with while 187s 187s RuboCop::Cop::Lint::InterpolationCheck 187s does not register an offense for an escaped interpolation 187s does not register an offense for interpolation in nested strings 187s does not register offense for strings in %w() 187s does not register an offense for properly interpolation strings 187s does not crash for \xff 187s registers an offense for interpolation in double + single quoted split string 187s registers an offense and corrects for interpolation in single quoted string 187s does not register an offense for interpolation in a regexp 187s registers an offense and corrects when including interpolation and double quoted string in single quoted string 187s registers an offense for interpolation in single quoted split string 187s does not register an offense for escaped crab claws in dstr 187s 187s RuboCop::Cop::Layout::EndOfLine 187s when EnforcedStyle is crlf 187s accepts an empty file 187s does not register offense for no CR at end of file 187s registers an offense for CR+LF 187s does not register offenses after __END__ 187s and there are many lines ending with LF 187s can inspect non-UTF-8 encoded source with proper encoding comment 187s registers only one offense 187s and the default external encoding is US_ASCII 187s does not crash on UTF-8 encoded non-ascii characters 187s can inspect non-UTF-8 encoded source with proper encoding comment 187s when EnforcedStyle is native 187s registers an offense for an incorrect EOL 187s when EnforcedStyle is lf 187s registers an offense for CR at end of file 187s registers an offense for CR+LF 187s accepts an empty file 187s does not register offenses after __END__ 187s and there are many lines ending with CR+LF 187s registers only one offense 187s can inspect non-UTF-8 encoded source with proper encoding comment 187s and the default external encoding is US_ASCII 187s can inspect non-UTF-8 encoded source with proper encoding comment 187s does not crash on UTF-8 encoded non-ascii characters 187s 187s RuboCop::Cop::Lint::RefinementImportMethods 187s Ruby >= 3.1 187s does not register an offense when using `import_methods` in `refine` block 187s registers an offense when using `prepend` in `refine` block 187s does not register an offense when using `include` with a receiver in `refine` block 187s registers an offense when using `include` in `refine` block 187s Ruby <= 3.0 187s does not register an offense when using `include` in `refine` block 187s does not register an offense when using `prepend` in `refine` block 187s 187s RuboCop::Cop::Lint::RaiseException 187s registers an offense and corrects for `fail` with `Exception.new` and message 187s registers an offense and corrects for `raise` with `Exception.new` and message 187s registers an offense and corrects for `raise` with `Exception` and message 187s registers an offense and corrects for `raise` with `Exception` 187s registers an offense and corrects for `raise` with `Exception.new(args*)` 187s does not register an offense for `fail` without arguments 187s does not register an offense when raising Exception with explicit namespace 187s registers an offense and corrects for `fail` with `Exception` and message 187s registers an offense and corrects for `raise` with `::Exception` 188s registers an offense and corrects for `raise` with `::Exception` and message 188s registers an offense and corrects for `raise` with `::Exception.new` 188s registers an offense and corrects for `fail` with `Exception` 188s does not register an offense for `raise` without arguments 188s when under namespace 188s registers an offense and corrects when Exception with cbase specified 188s does not register an offense when Exception without cbase specified 188s 188s RuboCop::Cop::Style::NumericPredicate 188s when there are allowed methods 188s simple method call 188s `EnforcedStyle` is `predicate` 188s allows checking if a number is zero 188s `EnforcedStyle` is `comparison` 188s allows checking if a number is zero 188s in block 188s not ignored method 188s registers an offense for checking if a number is negative 188s registers an offense for checking if a number is positive 188s ignored method 188s with a string 188s allows checking if a number is negative 188s allows checking if a number is positive 188s with a regex 188s allows checking if a number is negative 188s allows checking if a number is positive 188s in argument 188s not ignored method 188s when checking if a number is positive 188s when target ruby version is 2.3 or higher 188s registers an offense 188s when target ruby version is 2.2 or lower 188s does not register an offense 188s when checking if a number is negative 188s when target ruby version is 2.2 or lower 188s does not register an offense 188s when target ruby version is 2.3 or higher 188s registers an offense 188s ignored method 188s with a regex 188s allows checking if a number is negative 188s allows checking if a number is positive 188s with a string 188s allows checking if a number is positive 188s allows checking if a number is negative 188s when configured to enforce numeric comparison methods 188s registers an offense for checking if a number is positive 188s registers an offense for checking if a number is negative 188s registers an offense for checking if a number is zero 188s allows checking if a number is not zero 188s when configured to enforce numeric predicate methods 188s when checking if a number is negative 188s when target ruby version is 2.2 or lower 188s does not register an offense 188s when target ruby version is 2.3 or higher 188s registers an offense in yoda condition 188s registers an offense 188s with a complex expression 188s registers an offense in yoda condition 188s registers an offense 188s with checking if a number is not zero 188s allows comparing against a variable 188s allows comparing against a complex expression 188s allows comparing against a global variable 188s when checking if a number is positive 188s when target ruby version is 2.3 or higher 188s registers an offense in yoda condition 188s registers an offense 188s with a complex expression 188s registers an offense 188s registers an offense in yoda condition 188s when target ruby version is 2.2 or lower 188s does not register an offense 188s when checking if a number is zero 188s allows comparing against a global variable 188s registers an offense with a complex expression 188s registers an offense 188s when comparing against a method argument variable 188s registers an offense 188s registers an offense with complex expression 188s 188s RuboCop::Cop::InternalAffairs::ExampleHeredocDelimiter 188s when unexpected heredoc delimiter is used but heredoc body contains an expected delimiter line 188s does not register an offense 188s when unexpected heredoc delimiter is used at non RuboCop specific expectation 188s does not register an offense 188s when expected heredoc delimiter is used at RuboCop specific expectation 188s does not register an offense 188s when unexpected heredoc delimiter is used in multi-line heredoc 188s registers an offense 188s when unexpected heredoc delimiter is used in single-line heredoc 188s registers an offense 188s 188s RuboCop::Cop::Style::RedundantBegin 188s reports an offense when assigning nested `begin` blocks 188s reports an offense when multi-line `begin` block has single statement and it is inside condition 188s reports an offense when assigning nested blocks which contain `begin` blocks 188s registers an offense and corrects when using `begin` without `rescue` or `ensure` 188s accepts a def with a begin block after a statement 188s does not register an offense when using `begin` with `until` 188s registers and corrects an offense when using multi-line `if` in `begin` block 188s does not register an offense when using `begin` with multiple statement for or assignment 188s doesn't modify spacing when autocorrecting 188s does not register an offense when using body of `begin` is empty 188s accepts a def with required begin block 188s reports an offense when multi-line `begin` block has single statement with modifier condition 188s does not register an offense when using `begin` for semantic operator conditions 188s does not register an offense when using `begin` for logical operator conditions 188s reports an offense for single line def with redundant begin block 188s does not register an offense when using `begin` with `while` 188s registers and corrects an offense when using `begin` with single statement that called a block for or assignment 188s does not register an offense when using `begin` for assignment 188s registers and corrects an offense when using `begin` with single statement for or assignment 188s registers and corrects an offense when using modifier `if` single statement in `begin` block 188s accepts when multi-line `begin` block has multiple statements with modifier condition 188s accepts when one-liner `begin` block has multiple statements with modifier condition 188s reports an offense for def with redundant begin block 188s autocorrects when there are trailing comments 188s does not register an offense when using `begin` with `ensure` 188s does not register an offense when using `begin` with no statements for or assignment 188s reports an offense when one-liner `begin` block has single statement with modifier condition 188s does not register an offense when using `begin` for method argument 188s accepts a defs with required begin block 188s does not register an offense when using `begin` with `rescue` 188s reports an offense for defs with redundant begin block 188s does not register an offense when using `begin` for or assignment and method call 188s < Ruby 2.5 188s accepts a do-end block with a begin-end 188s >= ruby 2.5 188s accepts super with block 188s accepts a {} block with a begin-end 188s accepts a block with a begin block after a statement 188s accepts a stabby lambda with a begin-end 188s registers an offense for a do-end block with redundant begin-end 188s when using endless method definition 188s registers when `begin` block has a single statement 188s accepts when `begin` block has no statements 188s accepts when `begin` block has multiple statements 188s Ruby 2.7 188s reports an offense when assigning nested blocks which contain `begin` blocks 188s 188s RuboCop::Cop::InternalAffairs::UselessMessageAssertion 188s registers an offense for specs that expect offense using the MSG 188s does not register an offense for an assertion about the message 188s registers an offense for specs that assert using the MSG 188s registers an offense for described_class::MSG in let 188s 188s RuboCop::Cop::Lint::IneffectiveAccessModifier 188s when `protected` is applied to a class method 188s registers an offense 188s when there is `begin` before a method definition 188s does not register an offense 188s when `private` is applied to a class method 188s registers an offense 188s when no access modifier is used 188s doesn't register an offense 188s when there is an intervening instance method 188s still registers an offense 188s when a `class << self` block is used 188s doesn't register an offense 188s when `private_class_method` is used 188s when `private_class_method` contains all private method names 188s doesn't register an offense 188s when `private_class_method` does not contain the method 188s registers an offense 188s 188s RuboCop::Formatter::AutoGenConfigFormatter 188s #report_file_as_mark 188s when a refactor severity offense is detected 188s prints "R" 188s when different severity offenses are detected 188s prints highest level mark 188s when no offenses are detected 188s prints "." 188s when a refactor convention offense is detected 188s prints "C" 188s #finished 188s calls #report_summary 188s when no offenses are detected 188s does not report offenses 188s when any offenses are detected 188s does not report offenses 188s outputs report summary 188s 188s RuboCop::Cop::Lint::UnusedMethodArgument 188s inspection 188s when a splat argument is unused 188s registers an offense and preserves the splat 188s when a trailing block argument is unused 188s registers an offense and removes the unused block arg 188s in a method calling `super` with arguments 188s when a method argument is unused 188s registers an offense 188s when a required keyword argument is unused 188s when a required keyword argument is unused 188s registers an offense but does not suggest underscore-prefix 188s when an optional keyword argument is unused 188s registers an offense but does not suggest underscore-prefix 188s and AllowUnusedKeywordArguments set 188s does not care 188s when a singleton method argument is unused 188s registers an offense 188s in a method calling `binding` without arguments 188s accepts all arguments 188s inside another method definition 188s registers offenses 188s when a method takes multiple arguments 188s and all the arguments are unused 188s registers offenses and suggests the use of `*` and autocorrects to add underscore-prefix to all arguments 188s and an argument is unused 188s registers an offense and adds underscore-prefix 188s and arguments are swap-assigned 188s accepts 188s and there is some whitespace around the unused argument 188s registers an offense and preserves whitespace 188s and one argument is assigned to another, whilst other's value is not used 188s registers an offense 188s when a method argument is used 188s accepts 188s in a method calling `super` without arguments 188s when a method argument is not used explicitly 188s accepts since the arguments are guaranteed to be the same as superclass' ones and the user has no control on them 188s when a variable is unused 188s does not care 188s when an underscore-prefixed method argument is unused 188s accepts 188s when an argument with a default value is unused 188s registers an offense and preserves the default value 188s when a block argument is unused 188s does not care 188s in a method calling `binding` with arguments 188s when a method argument is unused 188s registers an offense 188s when IgnoreNotImplementedMethods config parameter is set 188s accepts a method with a single unused parameter & raises ::NotImplementedError 188s accepts a method with a single unused parameter & fails without message 188s accepts a method with a single unused parameter & raises NotImplementedError 188s accepts a method with a single unused parameter & fails with message 188s registers an offense for a non-empty method with multiple unused parameters 188s accepts a method with a single unused parameter & raises NotImplementedError, message 188s accepts an empty method with multiple unused parameters 188s accepts an empty singleton method with a single unused parameter &raise NotImplementedError 188s registers an offense for a non-empty method with a single unused parameter 188s when IgnoreEmptyMethods config parameter is set 188s registers an offense for a non-empty method with a single unused parameter 188s registers an offense for a non-empty method with multiple unused parameters 188s accepts an empty method with multiple unused parameters 188s accepts an empty singleton method with a single unused parameter 188s accepts an empty method with a single unused parameter 188s 188s RuboCop::Cop::Lint::UnreachableLoop 188s handles inner loops 188s does not register an offense when using `return do_something(value) || next` in a loop 188s does not register an offense when using `return do_something(value) || redo` in a loop 188s does not register an offense when branch includes continue statement preceding break statement 188s registers an offense when using `return do_something(value) || break` in a loop 188s with AllowedPatterns 188s with a ignored method call 188s does not register an offense 188s with a non ignored method call 188s registers an offense 188s Ruby 2.7 188s registers an offense 188s with an enumerator method 188s as the last item in a method chain 188s registers an offense 188s in the middle of a method chain 188s does not register an offense 188s not chained 188s registers an offense 188s without preceding continue statements 188s does not register an offense when using `if` without `else` 188s does not register an offense when using `case-when-else` and not all branches are breaking 188s registers an offense when using `break` 188s does not register an offense when using `if-elsif-else` and not all branches are breaking 188s does not register an offense when using `case` without `else` 188s registers an offense when using `case-when-else` with all break branches 188s registers an offense when using `if-else` with all break branches 188s with preceding continue statements 188s does not register an offense when using `break` 188s does not register an offense when using `case-when-else` with all break branches 188s does not register an offense when using `if-else` with all break branches 188s Ruby 2.7 188s registers an offense when using `return do_something(value) || break` in a loop 188s 188s RuboCop::Cop::Layout::EmptyLines 188s does not register an offense for comments 188s registers an offense for consecutive empty lines 188s does not register an offense for heredocs with empty lines inside 188s does not register an offense when there are no tokens 188s does not register an offense for empty lines in a string 188s 188s RuboCop::ConfigStore 188s .for 188s always uses config specified in command line 188s when no config specified in command line 188s searches for config path if not available in cache 188s gets config path and config from cache if available 188s when --force-default-config option is specified 188s uses default config without searching for config path 188s 188s RuboCop::Cop::Layout::SpaceBeforeComment 188s accepts a comment that begins a line 188s accepts a doc comment 188s registers an offense and corrects missing space before an EOL comment 188s accepts an EOL comment with a preceding space 188s registers an offense and corrects after a heredoc 188s 188s RuboCop::Cop::Style::NegatedIf 188s does not blow up for empty if condition 188s does not blow up on a negated ternary operator 188s does not blow up for ternary ops 188s does not blow up for empty unless condition 188s with “both” style 188s is not confused by negated elsif 188s registers an offense for if with exclamation point condition 188s accepts an if where the condition is doubly negated 188s registers an offense for if with "not" condition 188s accepts an if/else with negative condition 188s accepts an if where only part of the condition is negated 188s autocorrects by replacing parenthesized if not with unless 188s with “postfix” style 188s registers an offense for postfix 188s does not register an offense for prefix 188s with “prefix” style 188s registers an offense for prefix 188s does not register an offense for postfix 188s 188s RuboCop::Cop::Lint::ConstantOverwrittenInRescue 188s does not register an offense when using `=>` but correctly assigning to variables 188s does not register an offense when not overriding an exception with an exception result 188s registers an offense when overriding an exception with an exception result 188s 188s RuboCop::Cop::InternalAffairs::NodeDestructuring 188s does not register an offense when receiver is named `array` 188s registers an offense when destructuring using a splat 188s when destructuring using `node.children` 188s registers an offense when receiver is named `send_node` 188s registers an offense when receiver is named `node` 188s 188s RuboCop::CommentConfig 188s #cop_enabled_at_line? 188s does not confuse a cop name including "all" with all cops 188s supports disabling cops with multiple levels in department name 188s supports disabling cops with multiple uppercase letters 188s supports enabling/disabling multiple cops along with a comment 188s supports disabling single line with a directive at end of line 188s supports enabling/disabling cops without a prefix 189s just ignores unpaired enabling directives 189s supports disabling all cops except Lint/RedundantCopDisableDirective with keyword all 189s supports disabling cops on a comment line with an EOL comment 189s does not confuse a comment directive embedded in a string literal with a real comment 189s handles indented single line 189s supports enabling/disabling multiple cops in a single directive 189s supports disabling cops with numbers in their name 190s can handle double disable of one cop 190s supports disabling multiple lines with a pair of directive 190s supports disabling all lines after a directive 190s #cop_disabled_line_ranges 190s collects line ranges by disabled cops 190s #extra_enabled_comments 190s has values as arrays of extra enabled cops 190s has keys as instances of Parser::Source::Comment for extra enabled comments 190s comment_only_line? 190s when line contains only comment 190s returns true 190s returns true 190s when line is empty 190s returns true 190s when line contains code and comment 190s returns false 190s when line contains only code 190s returns false 190s returns false 190s returns false 190s returns false 190s 190s RuboCop::Cop::Style::Strip 190s registers an offense for str.rstrip.lstrip 190s registers an offense for str.lstrip.rstrip 190s 190s RuboCop::Cop::Style::OneLineConditional 190s when AlwaysCorrectToMultiline is true 190s registers and corrects an offense with multi-line construct for if-then-elsif-then-else-end 190s does not register an offense for if/then/else/end with empty else 190s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 190s does not register an offense for if/then/end 190s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end that contains unparenthesized operator method calls 190s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 190s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 190s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 190s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 190s registers and corrects an offense with multi-line construct for if-then-elsif-then-elsif-then-else-end 190s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 190s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 190s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 190s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 190s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end that contains method calls with unparenthesized arguments 190s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 190s does not register an offense for unless/then/end 190s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 190s registers and corrects an offense with multi-line construct for unless/then/else/end 190s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 190s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 190s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end that contains method calls with parenthesized arguments 190s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 190s does not register an offense for unless/then/else/end with empty else 190s registers and corrects an offense with multi-line construct for if/then/else/end 190s registers and corrects an offense with multi-line construct when one of the branches of if/then/else/end contains `next` keyword 190s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 190s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 190s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 190s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 190s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 190s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 190s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 190s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 190s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 190s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 190s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 190s registers and corrects an offense with multi-line construct for if/then/else/end when `then` without body 190s behaves like if/then/else/end with constructs changing precedence 190s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end with `defined? :A` constructs inside inner branches 190s behaves like if/then/else/end with constructs changing precedence 190s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end with `yield a` constructs inside inner branches 190s behaves like if/then/else/end with constructs changing precedence 190s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end with `not a` constructs inside inner branches 190s behaves like if/then/else/end with constructs changing precedence 190s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end with `a = b` constructs inside inner branches 190s behaves like if/then/else/end with constructs changing precedence 190s 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 190s when IndentationWidth differs from default 190s registers and corrects an offense with multi-line construct for if/then/else/end 190s behaves like if/then/else/end with constructs changing precedence 190s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end with `puts 1` constructs inside inner branches 190s behaves like if/then/else/end with keyword 190s registers and corrects an offense with multi-line construct when one of the branches of if/then/else/end contains `self` keyword 190s behaves like if/then/else/end with constructs changing precedence 190s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end with `super b` constructs inside inner branches 190s behaves like if/then/else/end with keyword 190s registers and corrects an offense with multi-line construct when one of the branches of if/then/else/end contains `break` keyword 190s behaves like if/then/else/end with keyword 190s registers and corrects an offense with multi-line construct when one of the branches of if/then/else/end contains `raise` keyword 190s behaves like if/then/else/end with constructs changing precedence 190s 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 190s behaves like if/then/else/end with constructs changing precedence 190s 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 190s behaves like if/then/else/end with keyword 190s registers and corrects an offense with multi-line construct when one of the branches of if/then/else/end contains `retry` keyword 190s when AlwaysCorrectToMultiline is false 190s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 190s registers and corrects an offense with ternary operator and adding parentheses for if/then/else/end that contains method calls with unparenthesized arguments 190s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 190s registers and corrects an offense with ternary operator for if/then/else/end when `then` without body 190s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 190s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 190s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 190s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 190s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 190s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 190s registers and corrects an offense with ternary operator for unless/then/else/end 190s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 190s does not register an offense for unless/then/else/end with empty else 190s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 190s does not register an offense for unless/then/end 190s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 190s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 190s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 190s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 190s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 190s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 190s registers and corrects an offense with multi-line construct for if-then-elsif-then-else-end 190s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 190s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 190s registers and corrects an offense with multi-line construct for if-then-elsif-then-elsif-then-else-end 190s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 190s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 190s registers and corrects an offense with ternary operator when one of the branches of if/then/else/end contains `next` keyword 190s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 190s does not register an offense for if/then/else/end with empty else 190s registers and corrects an offense with ternary operator without adding parentheses for if/then/else/end that contains unparenthesized operator method calls 190s does not register an offense for if/then/end 190s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 190s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 190s registers and corrects an offense with ternary operator for if/then/else/end 190s registers and corrects an offense with ternary operator without adding parentheses for if/then/else/end that contains method calls with parenthesized arguments 190s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 190s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 190s registers and corrects an offense with multi-line construct for if-then-elsif-then-end 190s behaves like if/then/else/end with constructs changing precedence 190s registers and corrects an offense with ternary operator and adding parentheses inside for if/then/else/end with `not a` constructs inside inner branches 190s behaves like if/then/else/end with constructs changing precedence 190s 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 190s behaves like if/then/else/end with constructs changing precedence 190s registers and corrects an offense with ternary operator and adding parentheses inside for if/then/else/end with `defined? :A` constructs inside inner branches 190s behaves like if/then/else/end with keyword 190s registers and corrects an offense with ternary operator when one of the branches of if/then/else/end contains `break` keyword 190s behaves like if/then/else/end with keyword 190s registers and corrects an offense with ternary operator when one of the branches of if/then/else/end contains `self` keyword 190s behaves like if/then/else/end with constructs changing precedence 190s registers and corrects an offense with ternary operator and adding parentheses inside for if/then/else/end with `a = b` constructs inside inner branches 190s behaves like if/then/else/end with keyword 190s registers and corrects an offense with ternary operator when one of the branches of if/then/else/end contains `retry` keyword 190s behaves like if/then/else/end with constructs changing precedence 190s registers and corrects an offense with ternary operator and adding parentheses inside for if/then/else/end with `super b` constructs inside inner branches 190s behaves like if/then/else/end with keyword 190s registers and corrects an offense with ternary operator when one of the branches of if/then/else/end contains `raise` keyword 190s behaves like if/then/else/end with constructs changing precedence 190s registers and corrects an offense with ternary operator and adding parentheses inside for if/then/else/end with `puts 1` constructs inside inner branches 190s behaves like if/then/else/end with constructs changing precedence 190s 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 190s behaves like if/then/else/end with constructs changing precedence 190s 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 190s behaves like if/then/else/end with constructs changing precedence 190s registers and corrects an offense with ternary operator and adding parentheses inside for if/then/else/end with `yield a` constructs inside inner branches 190s 190s RuboCop::Cop::Style::EnvHome 190s registers and corrects an offense when using `ENV.fetch('HOME')` 190s registers and corrects an offense when using `::ENV['HOME']` 190s registers and corrects an offense when using `ENV['HOME']` 190s does not register an offense when using `Dir.home` 190s does not register an offense when using `ENV['HOME'] = '/home/foo'` 190s registers and corrects an offense when using `ENV.fetch('HOME', nil)` 190s does not register an offense when using `ENV.fetch('HOME', default)` 190s 190s RuboCop::Cop::Layout::RedundantLineBreak 190s when InspectBlocks is true 190s when Layout/SingleLineBlockChain is enabled 190s accepts a method call chained onto a single line block 190s for an expression that fits on a single line 190s accepts a method call on a single line 190s accepts an assignment containing a begin-end expression 190s registers an offense for a method call with a double quoted split string without parentheses 190s accepts an assignment containing a case expression 190s registers an offense for a method call with a double and single quoted split string 190s accepts a method call with a block 190s accepts a binary expression containing an if expression 190s registers an offense for a method call with a split operation 190s registers an offense for a method call on multiple lines 190s registers an offense for a method call on multiple lines with backslash 190s registers an offense for a method call with a single quoted split string 190s registers an offense for a method call on multiple lines inside a block 190s accepts an assignment containing an if expression 190s registers an offense for a method call as right hand side of an assignment 190s accepts a method call on multiple lines if there are comments on them 190s registers an offense for a method call with a double quoted split string in parentheses 190s method chains 190s does not register an offense with a heredoc argument 190s properly corrects a method chain on multiple lines 190s registers an offense and corrects with a arguments on multiple lines 190s registers an offense and corrects with a string argument on multiple lines 190s with LineLength Max 100 190s registers an offense for a method without parentheses on multiple lines 190s for a block 190s registers an offense when the method call has parentheses 190s registers an offense when the method call has no arguments 190s when Layout/SingleLineBlockChain is enabled 190s reports an offense for a multiline block without a chained method call 190s when Layout/SingleLineBlockChain is disabled 190s reports an offense for a method call chained onto a multiline block 190s reports an offense for a multiline block without a chained method call 190s when Layout/SingleLineBlockChain is disabled 190s reports an offense for a method call chained onto a single line block 190s for an expression that does not fit on a single line 190s accepts a method call on a multiple lines 190s with a longer max line length 190s accepts method call with a do keyword that would just surpass the max line length 190s accepts a method call followed by binary operations that are too long taken together 190s accepts an assignment containing a heredoc 190s accepts an assignment containing a method definition 190s registers an offense for a method call with a do keyword that is just under the max line length 190s accepts a complex method call on a multiple lines 190s for a block 190s accepts when it is difficult to convert to single line 190s when InspectBlocks is false 190s when Layout/SingleLineBlockChain is enabled 190s accepts a method call chained onto a single line block 190s when Layout/SingleLineBlockChain is disabled 190s reports an offense for a method call chained onto a single line block 190s for an expression that does not fit on a single line 190s accepts a method call on a multiple lines 190s with a longer max line length 190s accepts a method call followed by binary operations that are too long taken together 190s accepts a complex method call on a multiple lines 190s accepts an assignment containing a heredoc 190s accepts method call with a do keyword that would just surpass the max line length 190s registers an offense for a method call with a do keyword that is just under the max line length 190s accepts an assignment containing a method definition 190s for a block 190s accepts when it is difficult to convert to single line 190s for an expression that fits on a single line 190s accepts an assignment containing a begin-end expression 190s accepts a binary expression containing an if expression 190s accepts a method call with a block 190s registers an offense for a method call on multiple lines 190s registers an offense for a method call on multiple lines with backslash 190s registers an offense for a method call on multiple lines inside a block 190s registers an offense for a method call with a single quoted split string 190s registers an offense for a method call as right hand side of an assignment 190s registers an offense for a method call with a double quoted split string in parentheses 190s registers an offense for a method call with a split operation 190s accepts an assignment containing a case expression 190s registers an offense for a method call with a double quoted split string without parentheses 190s accepts a method call on a single line 190s accepts an assignment containing an if expression 190s accepts a method call on multiple lines if there are comments on them 190s registers an offense for a method call with a double and single quoted split string 190s method chains 190s registers an offense and corrects with a string argument on multiple lines 190s does not register an offense with a heredoc argument 190s registers an offense and corrects with a arguments on multiple lines 190s properly corrects a method chain on multiple lines 190s with LineLength Max 100 190s registers an offense for a method without parentheses on multiple lines 190s for a block 190s accepts when the method call has parentheses 190s accepts when the method call has no arguments 190s when Layout/SingleLineBlockChain is enabled 190s accepts a multiline block without a chained method call 190s when Layout/SingleLineBlockChain is disabled 190s accepts a multiline block without a chained method call 190s accepts a method call chained onto a multiline block 190s 190s RuboCop::Cop::Style::IfUnlessModifier 190s accepts code with EOL comment since user might want to keep it 190s adds parens in autocorrect when if-end used with `||` operator 190s accepts if-else-end 190s accepts if-end when used as LHS of binary arithmetic 190s accepts if-end followed by a chained call using `&.` 190s accepts if/elsif 190s accepts if-end followed by a chained call using `.` 190s adds parens in autocorrect when if-end used with `&&` operator 190s when if-end condition is assigned to a variable 190s with variable being on the previous line 190s when it is not short enough to fit on a single line 190s accepts it in the multiline form 190s when it is short enough to fit on a single line 190s corrects it to the single-line form 190s with variable being on the same line 190s when it is not short enough to fit on a single line 190s accepts it in the multiline form 190s when it is short enough to fit on a single line 190s corrects it to the single-line form 190s multiline unless that fits on one line 190s registers an offense 190s when if-end condition is a value in a hash 190s when it is not short enough to fit on a single line 190s accepts it in the multiline form 190s when it is short enough to fit on a single line 190s corrects it to the single-line form 190s if-end with conditional as body 190s accepts 190s when if-end condition has some code after the end keyword 190s when it is short enough to fit on a single line 190s corrects it to the single-line form 190s when it is not short enough to fit on a single line 190s accepts it in the multiline form 190s modifier if that does not fit on one line 190s when Layout/LineLength is disabled with an EOL comment 190s accepts 190s when Layout/LineLength is disabled with enable/disable comments 190s accepts 190s when Layout/LineLength is enabled 190s corrects it to normal form 190s when variable assignment is used in the branch body of if modifier 190s registers an offense 190s IgnoreCopDirectives 190s and the long line is too long because IgnoreCopDirectives is false 190s registers an offense 190s and the long line is allowed because IgnoreCopDirectives is true 190s accepts 190s when using a method with heredoc argument 190s accepts 190s and the long line is allowed because AllowURI is true 190s accepts 190s and the long line is too long because AllowURI is false 190s registers an offense 190s when Layout/LineLength is disabled in configuration 190s accepts 190s multiline if that fits on one line 190s registers an offense 190s and has two statements separated by semicolon 190s accepts 190s multiline if that fits on one line with comment on first line 190s registers an offense and preserves comment 190s with implicit match conditional 190s when a multiline if fits on one line 190s registers an offense 190s when a multiline if doesn't fit on one line 191s accepts 191s multiline if that fits on one line with comment near end 191s accepts 191s behaves like condition modifier cop 191s for a multiline 'unless' 191s handles one-line usage 191s accepts it if body spans more than one line 191s corrects it when assignment is in body 191s doesn't break when used as RHS of binary arithmetic 191s doesn't break when used as RHS of local var assignment 191s doesn't break when used as RHS of instance var assignment 191s doesn't break when used as RHS of class var assignment 191s corrects it if result fits in one line 191s doesn't break when used as RHS of constant assignment 191s handles inline comments during autocorrection 191s accepts it when condition has local variable assignment 191s accepts it if single line would not fit on one line 191s accepts an empty body 191s when there is a comment on the first line and some code after the end keyword 191s does not register an offense 191s accepts multiline condition in modifier form 191s registers an offense 191s when Layout/LineLength is disabled 191s registers an offense even for a long modifier statement 191s behaves like condition modifier cop 191s for a multiline 'if' 191s handles one-line usage 191s accepts an empty body 191s doesn't break when used as RHS of constant assignment 191s doesn't break when used as RHS of binary arithmetic 191s accepts it if body spans more than one line 191s doesn't break when used as RHS of instance var assignment 191s corrects it when assignment is in body 191s accepts it if single line would not fit on one line 191s handles inline comments during autocorrection 191s doesn't break when used as RHS of local var assignment 191s accepts it when condition has local variable assignment 191s doesn't break when used as RHS of class var assignment 191s corrects it if result fits in one line 191s when Layout/LineLength is disabled 191s registers an offense even for a long modifier statement 191s when there is a comment on the first line and some code after the end keyword 191s does not register an offense 191s accepts multiline condition in modifier form 191s registers an offense 191s if-end is argument to a parenthesized method call 191s adds parentheses because otherwise it would cause SyntaxError 191s short multiline if near an else etc 191s registers an offense 191s unless-end with conditional as body 191s accepts 191s when if-end condition has a first line comment 191s when it is short enough to fit on a single line 191s corrects it to the single-line form 191s when it is not short enough to fit on a single line 191s accepts it in the multiline form 191s if-end is argument to a non-parenthesized method call 191s adds parentheses so as not to change meaning 191s with a named regexp capture on the LHS 191s does not register an offense 191s when Layout/LineLength is disabled 191s registers an offense even for a long modifier statement 191s with tabs used for indentation 191s with Layout/IndentationStyle: IndentationWidth config 191s behaves like with tabs indentation 191s it doesn't fit on one line 191s doesn't register an offense 191s it fits on one line 191s registers an offense 191s with Layout/IndentationWidth: Width config 191s behaves like with tabs indentation 191s it fits on one line 191s registers an offense 191s it doesn't fit on one line 191s doesn't register an offense 191s when if-end condition is an element of an array 191s when short enough to fit on a single line 191s corrects it to the single-line form 191s when not short enough to fit on a single line 191s accepts it in the multiline form 191s modifier if that does not fit on one line, but is not the only statement on the line 191s accepts 191s 191s RuboCop::Cop::Lint::HashCompareByIdentity 191s does not register an offense for hash methods without `object_id` as key 191s registers an offense when using hash method with `object_id` as a key 191s registers an offense when using hash methods with `object_id` on receiver as a key 191s 191s RuboCop::Formatter::JSONFormatter 191s #started 191s sets target file count in summary 191s #file_finished 191s adds value of #hash_for_file to #output_hash[:files] 191s adds detected offense count in summary 191s #hash_for_file 191s sets an array of #hash_for_offense values for :offenses key 191s sets relative file path for :path key 191s #hash_for_location 191s sets column value for :column key 191s sets length value for :length key 191s sets line value for :line key 191s when the location is pseudo 191s returns a valid hash 191s #finished 191s outputs #output_hash as JSON 191s sets inspected file count in summary 191s #hash_for_offense 191s sets Offense#cop_name value for :cop_name key 191s sets value of #hash_for_location for :location key 191s sets Offense#severity value for :severity key 191s sets Offense#corrected? value for :corrected key 191s sets Offense#message value for :message key 191s sets Offense#correctable? value for :correctable key 191s 191s RuboCop::Cop::Layout::BlockAlignment 191s registers an offense for mismatched block end with an op-asgn (+=, -=) 191s accepts end aligned with a class variable 191s registers an offense for mismatched block end with a mass assignment 191s accepts end aligned with a method call with arguments 191s registers an offense for mismatched block end with a global variable 191s accepts end aligned with a constant 191s accepts end aligned with an and-asgn (&&=) 191s accepts a block end that does not begin its line 191s registers an offense for mismatched end not aligned with the block that is an argument 191s accepts end aligned with the block when the block is a method argument 191s accepts end aligned with an op-asgn (+=, -=) 191s does not raise an error for nested block in a method call 191s accepts end aligned with an instance variable 191s accepts end aligned with a global variable 191s registers an offense for mismatched block end with a constant 191s registers an offense for mismatched block end with a class variable 191s accepts end aligned with a method call 191s accepts end aligned with a variable 191s registers an offense for mismatched block end with an or-asgn (||=) 191s registers an offense for mismatched block end with an and-asgn (&&=) 191s registers an offense for mismatched block end with a method call 191s accepts end aligned with an or-asgn (||=) 191s accepts end aligned with a call chain left hand side 191s accepts end aligned with a mass assignment 191s registers an offense for mismatched block end with a variable 191s registers an offense for mismatched end with a method call with arguments 191s registers an offense for mismatched block end with an instance variable 191s when configured to align with do 191s errors when start_of_line aligned 191s allows when do aligned 191s on a logically negated method call 191s registers an offense and corrects 191s aligns end with the ! operator 191s Ruby 2.7 191s accepts end aligned with a call chain left hand side 191s registers an offense for mismatched block end with a mass assignment 191s on a splatted method call 191s registers an offense and corrects misaligned end braces 191s aligns end with the splat operator 191s on a bit-flipped method call 191s aligns end with the ~ operator 191s registers an offense and corrects misaligned end brace 191s when the block has arguments 191s registers an offense for mismatched block end 191s when multiple similar-looking blocks have misaligned ends 191s registers an offense for each of them 191s when the block is defined on the next line 191s registers an offenses for mismatched end alignment 191s accepts end aligned with the block expression 191s and the block is an operand 191s accepts end aligned with a variable 191s when there is an assignment chain 191s registers an offense for an end aligned with the 2nd variable 191s accepts end aligned with the first variable 191s when configured to align with start_of_line 191s allows when start_of_line aligned 191s errors when do aligned 191s when variables of a mass assignment spans several lines 191s accepts end aligned with the variables 191s registers an offense for end aligned with the block 191s on an arithmetically negated method call 191s aligns end with the - operator 191s registers an offense and corrects 191s when the block is a logical operand 191s accepts a correctly aligned block end 191s when the method part is a call chain that spans several lines 191s accepts end indented as the start of the block 191s accepts two kinds of end alignment 191s accepts pretty alignment style 191s registers offenses for misaligned ends 191s when the block is terminated by } 191s mentions } (not end) in the message 191s when the block has no arguments 191s registers an offense for mismatched block end 191s 191s RuboCop::Cop::Layout::TrailingWhitespace 191s is not fooled by __END__ within a documentation comment 191s is not fooled by heredoc containing __END__ 191s is not fooled by heredoc containing __END__ within a doc comment 191s registers an offense for a line ending with tab 191s registers an offense for a blank line with space 191s accepts a line without trailing whitespace 191s registers offenses before __END__ but not after 191s autocorrects unwanted space 191s registers an offense for trailing whitespace in a heredoc string 191s registers an offense for a tab in a heredoc 191s registers an offense for a line ending with space 191s when `AllowInHeredoc` is set to true 191s registers an offense for trailing whitespace at the heredoc begin 191s accepts trailing whitespace in a heredoc string 191s when `AllowInHeredoc` is set to false 191s corrects safely trailing whitespace in a heredoc string 191s corrects by removing trailing whitespace used for indentation in a heredoc string 191s corrects a whitespace line in a heredoc string that is longer than the indentation 191s does not correct trailing whitespace in a static heredoc string 191s 191s RuboCop::Cop::Style::AccessorGrouping 191s when EnforcedStyle is grouped 191s does not register an offense when using grouped accessors 191s does not register an offense when the same accessor is given more than once in the same statement 191s registers an offense and corrects when using separated accessors 191s registers offense and corrects if at least two separate accessors without comments 191s registers an offense and corrects when using separated accessors with different access modifiers 191s registers an offense and correct if the same accessor is listed twice 191s does not register offense for accessors with comments 191s registers an offense and corrects when using separated accessors within eigenclass 191s when EnforcedStyle is separated 191s registers an offense and corrects when the same accessor is given more than once in the same statement 191s does not register an offense for grouped accessors with comments 191s does not register an offense when using separated accessors 191s registers an offense and corrects when using grouped accessors 191s does not register an offense if the same accessor is listed twice 191s registers an offense and corrects when using grouped accessors within eigenclass 191s registers an offense and corrects when using grouped accessors with different access modifiers 191s when there are comments for attributes 191s registers and corrects an offense 191s 191s RuboCop::Cop::Gemspec::OrderedDependencies 191s behaves like ordered dependency 191s when add_runtime_dependency 191s When gems are alphabetically sorted 191s does not register any offenses 191s when dependency is separated by multiline comment 191s with TreatCommentsAsGroupSeparators: false 191s registers an offense 191s with TreatCommentsAsGroupSeparators: true 191s accepts 191s when each individual group of line is sorted 191s does not register any offenses 191s when gems are not alphabetically sorted 191s registers an offense 191s When using a local variable in an argument of dependent gem 191s does not register any offenses 191s behaves like ordered dependency 191s when add_dependency 191s when each individual group of line is sorted 191s does not register any offenses 191s when gems are not alphabetically sorted 191s registers an offense 191s When gems are alphabetically sorted 191s does not register any offenses 191s when dependency is separated by multiline comment 191s with TreatCommentsAsGroupSeparators: true 191s accepts 191s with TreatCommentsAsGroupSeparators: false 191s registers an offense 191s When using method call to gem names 191s does not register any offenses 191s when different dependencies are consecutive 191s does not register any offenses 191s behaves like ordered dependency 191s when add_development_dependency 191s When gems are alphabetically sorted 191s does not register any offenses 191s when each individual group of line is sorted 191s does not register any offenses 191s when gems are not alphabetically sorted 191s registers an offense 191s when dependency is separated by multiline comment 191s with TreatCommentsAsGroupSeparators: false 191s registers an offense 191s with TreatCommentsAsGroupSeparators: true 191s accepts 191s 191s RuboCop::Cop::AnnotationComment 191s #annotation? 191s when annotated with a non keyword 191s is expected to be falsey 191s when it includes a keyword 191s is expected to be falsey 191s when given a keyword followed by a space 191s is expected to equal true 191s when given a keyword followed by a colon 191s is expected to equal true 191s when the keyword is not capitalized properly 191s is expected to equal true 191s when the keyword is multiple words 191s is expected to equal true 191s when given as the first word of a sentence 191s is expected to be falsey 191s #correct? 191s when no colon is required 191s behaves like incorrect 191s is expected to be falsey 191s behaves like correct 191s is expected to be truthy 191s behaves like incorrect 191s is expected to be falsey 191s behaves like incorrect 191s is expected to be falsey 191s behaves like correct 191s is expected to be truthy 191s behaves like incorrect 191s is expected to be falsey 191s behaves like correct 191s is expected to be truthy 191s behaves like incorrect 191s is expected to be falsey 191s behaves like incorrect 191s is expected to be falsey 191s behaves like incorrect 191s is expected to be falsey 191s behaves like incorrect 191s is expected to be falsey 191s behaves like incorrect 191s is expected to be falsey 191s behaves like incorrect 191s is expected to be falsey 191s behaves like incorrect 191s is expected to be falsey 191s when a colon is required 191s behaves like correct 191s is expected to be truthy 191s behaves like incorrect 191s is expected to be falsey 191s behaves like incorrect 191s is expected to be falsey 191s behaves like incorrect 191s is expected to be falsey 191s behaves like correct 191s is expected to be truthy 191s behaves like incorrect 191s is expected to be falsey 191s behaves like incorrect 191s is expected to be falsey 191s behaves like incorrect 191s is expected to be falsey 191s behaves like incorrect 191s is expected to be falsey 191s behaves like incorrect 191s is expected to be falsey 191s behaves like correct 191s is expected to be truthy 191s behaves like incorrect 191s is expected to be falsey 191s behaves like incorrect 191s is expected to be falsey 191s behaves like incorrect 191s is expected to be falsey 191s when there is duplication in the keywords 191s when the shorter keyword is given first 191s behaves like correct 191s is expected to be truthy 191s behaves like correct 191s is expected to be truthy 191s behaves like incorrect 191s is expected to be falsey 191s behaves like incorrect 191s is expected to be falsey 191s when the longer keyword is given first 191s behaves like incorrect 191s is expected to be falsey 191s behaves like correct 191s is expected to be truthy 191s behaves like correct 191s is expected to be truthy 191s behaves like incorrect 191s is expected to be falsey 191s 191s RuboCop::Cop::Style::CombinableLoops 191s when for loop 191s does not register an offense when the same loop method is used over different collections 191s does not register an offense when the same loops are interleaved with some code 191s registers an offense when looping over the same data as previous loop 191s does not register an offense when each branch contains the same single loop over the same collection 191s when looping method 191s does not register an offense when the same loops are interleaved with some code 191s does not register an offense when different loop methods are used over the same collection 191s registers an offense when looping over the same data as previous loop 191s does not register an offense when the same loop method is used over different collections 191s does not register an offense for when the same method with different arguments 191s does not register an offense for when the same method with different arguments and safe navigation 191s does not register an offense when each branch contains the same single loop over the same collection 191s Ruby 2.7 191s registers an offense when looping over the same data as previous loop in numblocks 191s 191s RuboCop::Cop::Style::ClassAndModuleChildren 191s compact style 191s registers a offense for classes with nested one-liner children 191s registers and offense for deeply nested children 191s accepts nesting for classes with an explicit superclass 191s registers a offense for modules with nested children 191s registers an offense for modules with partially nested children 191s accepts class/module with single method 191s registers an offense for classes with partially nested children 191s accepts compact style for classes/modules 191s registers a offense for classes with nested children 191s preserves comments between classes 191s correctly indents heavily nested children 191s accepts nesting for classes/modules with more than one child 191s nested style 191s accepts cbase class name 191s registers an offense for partially nested modules 191s registers an offense for not nested classes when namespace is defined as a module 191s registers an offense for partially nested classes 191s registers an offense for not nested modules 191s preserves comments 191s registers an offense for not nested classes 191s accepts cbase module name 191s accepts :: in parent class on inheritance 191s registers an offense for not nested classes when namespace is defined as a class 191s registers an offense for not nested classes with explicit superclass 191s accepts nested children 191s 191s RuboCop::Cop::Style::TopLevelMethodDefinition 191s does not register an offense when using Struct 191s registers an offense when defining a top-level method after a class definition 191s does not register an offense when just called method on top-level 191s registers an offense top-level class methods 191s does not register an offense when defined within arbitrary block 191s does not register an offense when using class 191s does not register an offense when define_method is not top-level 191s registers an offense top-level methods 191s does not register an offense when using module 191s top-level define_method 191s registers offense for multi-line block 191s registers offense for proc argument 191s registers offense with inline block 191s Ruby >= 2.7 191s registers offense with inline numblock 191s 191s RuboCop::Cop::Style::RandomWithOffset 191s registers an offense when using rand(irange).succ 191s registers an offense when using offset + rand(int) 191s registers an offense when using Random.rand(int).succ 191s registers an offense when using offset + Random.rand(int) 191s registers an offense when using offset - rand(int) 191s registers an offense when using offset - rand(erange) 191s registers an offense when using ::Random.rand 191s registers an offense when using ::Random.rand(int).pred 191s does not register an offense when using range with double dots 191s registers an offense when using rand(irange) - offset 191s does not register an offense when using offset - rand(erange) with a non-integer range value 191s registers an offense when using Random.rand 191s registers an offense when using offset - rand(irange) 191s registers an offense when using rand(int) - offset 191s registers an offense when using Kernel.rand 191s registers an offense when using rand(int).pred 191s registers an offense when using rand(int) + offset 191s registers an offense when using rand(erange).succ 191s registers an offense when using rand(erange) + offset 191s registers an offense when using rand(int).next 191s registers an offense when using offset - ::Random.rand(int) 191s registers an offense when using rand(irange) + offset 191s registers an offense when using rand(int).succ 191s registers an offense when using ::Kernel.rand 191s does not register an offense when using rand(erange).pred with a non-integer range value 191s does not register an offense when using range with triple dots 191s registers an offense when using rand(erange) - offset 191s does not register an offense when using rand(irange).succ with a non-integer range value 191s does not register an offense when using rand(irange) + offset with a non-integer range value 191s 191s RuboCop::Cop::Lint::SelfAssignment 191s registers an offense when using shorthand-or var self-assignment 191s does not register an offense when using instance var assignment 191s registers an offense when using local var self-assignment 191s does not register an offense when using constant var or-assignment for constant from another scope 191s does not register an offense when using multiple var assignment through method call 191s does not register an offense when using class var assignment 191s registers an offense when using global var self-assignment 191s registers an offense when using multiple var self-assignment through array 191s does not register an offense when using local var assignment 191s registers an offense when using multiple var self-assignment 192s does not register an offense when using constant var assignment for constant from another scope 192s does not register an offense when using multiple var assignment through splat 192s does not register an offense when using shorthand-and var assignment 192s does not register an offense when using multiple var assignment 192s does not register an offense when using global var assignment 192s registers an offense when using shorthand-and var self-assignment 192s registers an offense when using instance var self-assignment 192s does not register an offense when using shorthand-or var assignment 192s registers an offense when using class var self-assignment 192s registers an offense when using constant var self-assignment 192s 192s RuboCop::Cop::Style::CommentAnnotation 192s with RequireColon configuration set to false 192s accepts a keyword that is somewhere in a sentence 192s accepts a keyword that is just the beginning of a sentence 192s accepts upper case keyword alone 192s accepts upper case keyword with colon, space and note 192s accepts a comment that is obviously a code example 192s multiline comment 192s only registers an offense on the first line 192s upper case keyword with colon but no note 192s registers an offense without autocorrection 192s offenses in consecutive inline comments 192s registers each of them 192s with colon 192s registers an offense and removes colon 192s when a keyword is not in the configuration 192s accepts the word with colon 192s upper case keyword with space but no note 192s registers an offense without autocorrection 192s with configured keyword 192s registers an offense for containing a colon after the word 192s lower case keyword 192s registers an offense and upcases 192s with default RequireColon configuration (colon + space) 192s accepts a keyword that is just the beginning of a sentence 192s accepts a keyword that is somewhere in a sentence 192s accepts upper case keyword alone 192s accepts upper case keyword with colon, space and note 192s accepts a comment that is obviously a code example 192s capitalized keyword 192s registers an offense and upcases 192s with configured keyword 192s registers an offense for a missing colon after the word 192s missing colon 192s registers an offense and adds colon 192s upper case keyword with space but no note 192s registers an offense without autocorrection 192s lower case keyword 192s registers an offense and upcases 192s with multiword keywords 192s registers an offense for each matching keyword 192s upper case keyword with colon but no note 192s registers an offense without autocorrection 192s missing space after colon 192s registers an offense and adds space 192s offenses in consecutive inline comments 192s registers each of them 192s when a keyword is not in the configuration 192s accepts the word without colon 192s multiline comment 192s only registers an offense on the first line 192s 192s RuboCop::Cop::InternalAffairs::InheritDeprecatedCopClass 192s does not register an offense when not inherited super class 192s registers an offense when using `Cop` 192s registers an offense when using `RuboCop::Cop::Cop` 192s does not register an offense when using `Base` 192s 192s RuboCop::Cop::Style::TrailingBodyOnMethodDefinition 192s autocorrects body with method definition with args not in parens 192s registers an offense when body trails after method definition 192s removes semicolon from method definition but not body when autocorrecting 192s registers when body starts on def line & continues many more lines 192s does not register offense with trailing body on method end 192s registers when body starts on def line & continues one more line 192s autocorrects with comment after body 192s accepts a method with one line of body 192s accepts a method with multiple lines of body 192s when method is not on first line of processed_source 192s autocorrects offense 192s Ruby 3.0 or higher 192s does not register offense when endless method definition body is after newline in opening parenthesis 192s 192s RuboCop::Cop::Force 192s #run_hook 192s invokes a hook in all cops 192s .force_name 192s returns the class name without namespace 192s 192s RuboCop::Formatter::FuubarStyleFormatter 192s #with_color 192s when color is enabled 192s outputs coloring sequence code at the beginning and the end 192s when color is disabled 192s outputs nothing 192s #progressbar_color 192s when no offenses are detected in a file 192s is still green 192s when a offense is detected in a file and autocorrected 192s is green 192s when convention and error offenses are detected in a file 192s is red 192s initially 192s is green 192s when a convention offense is detected in a file 192s is yellow 192s when an error offense is detected in a file 192s is red 192s and then a convention offense is detected in the next file 192s is still red 192s 192s RuboCop::Cop::Layout::ArgumentAlignment 192s aligned with fixed indentation 192s registers an offense and corrects when missed indentation kwargs 192s autocorrects when first line is indented 192s does not register an offense when using aligned braced hash as a argument 192s autocorrects by outdenting when indented too far 192s corrects indentation for kwargs starting on same line as other args 192s autocorrects by indenting when not indented 192s multi-line method calls 192s autocorrects relative to position of relevant method call 192s can handle existing indentation from multi-line method calls 192s does not err on method call without a method name 192s registers offenses and corrects double indentation from relevant method 192s assigned methods 192s with ArgumentAlignment:IndentationWidth set to 4 192s accepts the first parameter being on method row 192s accepts the first parameter being on a new row 192s with IndentationWidth:Width set to 4 192s autocorrects even when first argument is in wrong position 192s accepts the first parameter being on method row 192s accepts the first parameter being on a new row 192s aligned with first argument 192s registers an offense and corrects multi-line outdented parameters 192s does not crash in autocorrect on dynamic string in parameter value 192s can handle a string literal as other argument 192s doesn't get confused by symbols with embedded expressions 192s registers an offense and corrects multiline missed indentation 192s accepts braceless hashes 192s accepts calls that only span one line 192s can handle heredoc strings 192s can handle a ternary condition with a block reference 192s registers an offense and correct multi-line parametersindented too far 192s registers an offense and corrects when missed indentation kwargs 192s registers an offense and corrects splat operator 192s doesn't get confused by extra comma at the end 192s can handle a multiline hash as second parameter 192s accepts correctly aligned arguments 192s can handle other method calls without parentheses 192s can handle a call with a block inside another call 192s registers an offense and corrects arguments with double indent 192s doesn't crash and burn when there are nested issues 192s can handle a method call within a method call 192s accepts correctly aligned arguments with fullwidth characters 192s can handle do-end 192s can handle a correctly aligned string literal as first argument 192s doesn't get confused by a line break inside a parameter 192s accepts the first parameter being on a new row 192s doesn't get confused by regexen with embedded expressions 192s can handle a call embedded in a string 192s registers an offense and corrects arguments with single indent 192s can handle method calls without parentheses 192s accepts multiline []= method call 192s doesn't get confused by a symbol argument 192s can handle parentheses used with no arguments 192s assigned methods 192s accepts the first parameter being on a new row 192s accepts the first parameter being on method row 192s when using safe navigation operator 192s registers an offense and corrects arguments with single indent 192s 192s RuboCop::Cop::Lint::DisjunctiveAssignmentInConstructor 192s constructor does not have disjunctive assignment 192s accepts 192s empty constructor 192s accepts 192s constructor has disjunctive assignment 192s LHS is ivar 192s registers an offense and corrects 192s constructor calls any method before disjunctive assignment 192s accepts 192s constructor calls super after assignment 192s registers an offense and corrects 192s constructor calls super before disjunctive assignment 192s accepts 192s LHS is lvar 192s accepts 192s 192s RuboCop::Cop::Lint::RedundantDirGlobSort 192s does not register an offense when using `sort` without a receiver 192s does not register an offense when not using `sort` for `Dir` 192s when Ruby 3.0 or higher 192s registers an offense and correction when using `Dir.glob.sort` 192s does not register an offense when using `collection.sort` 192s does not register an offense when not using `sort` with `sort: false` option for `Dir` 192s registers an offense and correction when using `::Dir.glob.sort` 192s does not register an offense when using `Dir.glob(*path).sort` 192s does not register an offense when using `Dir.glob('./b/*.txt', './a/*.txt').sort` 192s registers an offense and correction when using `Dir[].sort.each do` 192s registers an offense and correction when using `Dir[].sort.each(&do_something)` 192s does not register an offense when using `Dir['./b/*.txt', './a/*.txt'].sort` 192s does not register an offense when using `Dir[*path].sort` 192s when Ruby 2.7 or lower 192s does not register an offense and correction when using `::Dir.glob.sort` 192s does not register an offense and correction when using `Dir.glob.sort` 192s does not register an offense and correction when using `Dir[].sort.each do` 192s does not register an offense and correction when using `Dir[].sort.each(&do_something)` 192s 192s RuboCop::Cop::VariableForce 192s #process_node 192s when processing a regex with regopt 192s does not raise an error 192s when processing lvar node 192s when the variable is not yet declared 192s does not raise error 192s when processing an empty regex 192s does not raise an error 192s when processing a regexp with a line break at the start of capture parenthesis 192s does not raise an error 192s 192s RuboCop::Cop::Style::ArrayJoin 192s does not register an offense for numbers 192s does not register an offense for ambiguous cases 192s autocorrects '*' to 'join' when setting to a variable 192s registers an offense for an array followed by string 192s autocorrects '*' to 'join' when there are no spaces 192s 192s RuboCop::Cop::Lint::ShadowingOuterLocalVariable 192s when a block local variable has same name as an outer scope variablewith same branches of same `case` condition node 192s registers an offense 192s when a block local variable has same name as an outer scope variablewith same branches of same `if` condition node 192s registers an offense 192s when a block block argument has same name as an outer scope variable 192s registers an offense 192s when a block local variable has same name as an outer scope variablewith different branches of same `unless` condition node 192s does not register an offense 192s 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 192s registers an offense 192s when a block local variable has same name as an outer scope variable 192s registers an offense 192s when a block local variable has same name as an outer scope variablewith same branches of same `unless` condition node 192s registers an offense 192s when multiple block arguments have same name "_" 192s does not register an offense 192s when an outer scope variable is referenced in a block 192s does not register an offense 192s when a block local variable has same name as an outer scope variablewith different branches of same `case` condition node 192s does not register an offense 192s when a splat block argument has same name as an outer scope variable 192s registers an offense 192s when an outer scope variable is reassigned in a block 192s does not register an offense 192s when a block argument has a same name starts with "_" as an outer scope variable 192s does not register an offense 192s with Ractor.new 192s does not register an offense 192s when a block argument has different name with outer scope variables 192s does not register an offense 192s when a block local variable has same name as an outer scope variablewith different branches of same `if` condition node 192s does not register an offense 192s when a method argument has same name as an outer scope variable 192s does not register an offense 192s when a block argument has same name as an outer scope variable 192s registers an offense 192s when the same variable name as a block variable is used in return value assignment of `if` 192s does not register an offense 192s when a block local variable has same name as an outer scope variablewith same branches of same nested `if` condition node 192s registers an offense 192s when multiple block arguments have a same name starts with "_" 192s does not register an offense 192s when a block argument has same name "_" as outer scope variable "_" 192s does not register an offense 192s 192s RuboCop::Cop::Lint::RedundantSafeNavigation 192s registers an offense and corrects when `&.` is used inside `if` condition 192s registers an offense and corrects when `&.` is used inside complex condition 192s registers an offense and corrects when `&.` is used inside `unless` condition 192s registers an offense and corrects when `&.` is used inside `#{loop_type}` condition 192s does not register an offense when using `&.respond_to?` with `nil` specific method as argument in condition 192s does not register an offense when using `&.` with non-allowed method in condition 192s does not register an offense when using `&.` outside of conditions 192s registers an offense and corrects when `&.` is used inside `#{loop_type}` condition 192s 192s RuboCop::Cop::Layout::EmptyLinesAroundMethodBody 192s is not fooled by single line methods 192s accepts method body starting with a line with spaces 192s registers an offense for class method body ending with a blank 192s registers an offense for method body ending with a blank 192s registers an offense for class method body starting with a blank 192s registers an offense for method body starting with a blank 192s 192s RuboCop::Cop::Style::SelectByRegexp 192s with find_all 192s does not register an offense when the block arity is not 1 192s does not register an offense when the receiver is `ENV` 192s does not register an offense when given a proc 192s does not register an offense when the block has multiple expressions 192s does not register an offense when the receiver is `Hash[]` 192s does not register an offense when the receiver is `to_hash` 192s does not register an offense when the block uses an external variable in a regexp match 192s registers an offense and corrects with a multiline block 192s registers an offense and corrects for `regexp =~ blockvar` 192s does not register an offense when the receiver is `to_h` 192s registers an offense if `to_h` is in the receiver chain but not the actual receiver 192s does not register an offense when the receiver is a hash literal 192s registers an offense and corrects without a receiver 192s registers an offense and corrects when the receiver is an array 192s does not register an offense when the block param is a method argument 192s registers an offense and corrects when there is no explicit regexp 192s registers an offense and corrects for `Regexp#match?` 192s does not register an offense when there is no block 192s registers an offense and corrects for `blockvar =~ lvar` 192s does not register an offense when the block does not match a regexp 192s does not register an offense when the receiver is `Hash.new` 192s registers an offense and corrects when the receiver is a range 192s registers an offense and corrects when the receiver is a set 192s registers an offense and corrects for `match?` 192s registers an offense and corrects for `lvar =~ blockvar` 192s registers an offense and corrects for `blockvar =~ regexp` 192s with `numblock`s 192s registers an offense and corrects for `regexp =~ blockvar` 192s does not register an offense when the param is a method argument 192s registers an offense and corrects for `blockvar =~ regexp` 192s registers an offense and corrects for `match?` 192s does not register an offense when using `match?` without a receiver 192s registers an offense and corrects for `Regexp#match?` 192s does not register an offense if there is more than one numbered param 192s with select 192s registers an offense and corrects for `Regexp#match?` 192s registers an offense and corrects when the receiver is a set 192s registers an offense and corrects for `match?` 192s does not register an offense when the receiver is `ENV` 192s does not register an offense when the block does not match a regexp 192s does not register an offense when the block arity is not 1 192s does not register an offense when the receiver is `to_h` 192s does not register an offense when the block has multiple expressions 192s does not register an offense when the block uses an external variable in a regexp match 192s registers an offense and corrects with a multiline block 192s does not register an offense when the block param is a method argument 192s does not register an offense when given a proc 192s registers an offense and corrects when there is no explicit regexp 192s does not register an offense when there is no block 192s does not register an offense when the receiver is `to_hash` 192s registers an offense and corrects for `blockvar =~ regexp` 192s does not register an offense when the receiver is `Hash.new` 192s registers an offense and corrects for `lvar =~ blockvar` 192s registers an offense and corrects when the receiver is a range 192s does not register an offense when the receiver is `Hash[]` 192s does not register an offense when the receiver is a hash literal 192s registers an offense and corrects for `blockvar =~ lvar` 192s registers an offense and corrects when the receiver is an array 192s registers an offense if `to_h` is in the receiver chain but not the actual receiver 192s registers an offense and corrects for `regexp =~ blockvar` 192s registers an offense and corrects without a receiver 192s with `numblock`s 192s registers an offense and corrects for `blockvar =~ regexp` 192s registers an offense and corrects for `match?` 192s registers an offense and corrects for `regexp =~ blockvar` 192s does not register an offense when using `match?` without a receiver 192s does not register an offense when the param is a method argument 192s does not register an offense if there is more than one numbered param 192s registers an offense and corrects for `Regexp#match?` 192s with reject 192s registers an offense and corrects when there is no explicit regexp 192s does not register an offense when the receiver is `ENV` 192s registers an offense and corrects with a multiline block 192s does not register an offense when the block arity is not 1 192s registers an offense and corrects for `regexp =~ blockvar` 192s registers an offense and corrects for `blockvar =~ lvar` 192s does not register an offense when there is no block 192s registers an offense and corrects without a receiver 192s does not register an offense when the block uses an external variable in a regexp match 193s does not register an offense when the block param is a method argument 193s does not register an offense when the receiver is `Hash[]` 193s registers an offense and corrects when the receiver is an array 193s does not register an offense when the receiver is `to_h` 193s registers an offense and corrects for `blockvar =~ regexp` 193s does not register an offense when the block has multiple expressions 193s registers an offense and corrects when the receiver is a range 193s registers an offense and corrects when the receiver is a set 193s registers an offense and corrects for `match?` 193s registers an offense and corrects for `Regexp#match?` 193s registers an offense if `to_h` is in the receiver chain but not the actual receiver 193s does not register an offense when the receiver is `to_hash` 193s does not register an offense when given a proc 193s does not register an offense when the receiver is `Hash.new` 193s registers an offense and corrects for `lvar =~ blockvar` 193s does not register an offense when the receiver is a hash literal 193s does not register an offense when the block does not match a regexp 193s with `numblock`s 193s does not register an offense when the param is a method argument 193s registers an offense and corrects for `Regexp#match?` 193s registers an offense and corrects for `blockvar =~ regexp` 193s registers an offense and corrects for `regexp =~ blockvar` 193s does not register an offense when using `match?` without a receiver 193s registers an offense and corrects for `match?` 193s does not register an offense if there is more than one numbered param 193s 193s RuboCop::Cop::Style::RedundantSort 193s registers an offense when slice(0) is called on sort_by 193s registers an offense when last is called with sort 193s registers an offense when last is called on sort_by 193s registers an offense when [0] is called on sort 193s does not register an offense when first has an argument 193s registers an offense when slice(0) is called on sort 193s does not register an offense when first is used without sort_by 193s registers an offense when first is called on sort_by with line breaks and `&&` operator 193s does not register an offense when sort has an argument 193s registers an offense when at(0) is called on sort_by 193s registers an offense when slice(-1) is called on sort_by 193s registers an offense when last is called on sort with comparator 193s does not register an offense when sort_by is not given a block 193s does not register an offense for sort_by!(&:something).last 193s registers an offense when last is called on sort_by no block 193s registers an offense when first is called on sort_by with line breaks and `or` operator 193s does not register an offense when sort_by is used without first 193s registers an offense when first is called with sort 193s registers an offense when [-1] is called on sort 193s registers an offense when [0] is called on sort_by 193s registers an offense when first is called on sort_by with line breaks and `||` operator 193s does not register an offense when first is used before sort 193s registers an offense when [](0) is called on sort 193s registers an offense when first is called on sort_by with line breaks 193s registers an offense when first is called on sort_by 193s registers an offense when at(-1) is called with sort 193s registers an offense when first is called on sort_by no block 193s registers an offense when [](-1) is called on sort_by 193s does not register an offense for sort!.first 193s registers an offense when first is called on sort_by with line breaks and `and` operator 193s registers an offense when [-1] is called on sort_by 193s registers an offense with `sort_by { a || b }` 193s when not taking first or last element 193s does not register an offense when [-1] is called on sort with an argument 193s does not register an offense when at(-2) is called on sort_by 193s does not register an offense when [1] is called on sort 193s >= Ruby 2.7 193s when using numbered parameter 193s registers an offense and corrects when at(0) is called on sort_by 193s registers an offense and corrects when last is called on sort with comparator 193s registers an offense and corrects when first is called on sort_by 193s 193s RuboCop::Cop::Layout::EmptyLinesAroundModuleBody 193s when EnforcedStyle is empty_lines_except_namespace 193s when has multiple child modules 193s registers offenses for namespace body starting and ending without a blank 193s requires empty lines for namespace 193s when only child is class 193s requires no empty lines for namespace 193s registers offense for namespace body ending with a blank 193s registers offense for namespace body starting with a blank 193s when only child is module 193s requires no empty lines for namespace 193s autocorrects beginning and end 193s registers offense for namespace body ending with a blank 193s registers offenses for namespaced module body not starting with a blank 193s registers offense for namespace body starting with a blank 193s registers offenses for namespaced module body not ending with a blank 193s when EnforcedStyle is empty_lines 193s registers an offense for module body not starting or ending with a blank 193s registers an offense for module body not ending with a blank 193s accepts modules with an empty body 193s autocorrects beginning and end 193s when EnforcedStyle is empty_lines_special 193s when first child is an access modifier 193s with blank lines at the beginning and ending of module body 193s registers no offense 193s with no blank lines at the beginning and ending of module body 193s registers and corrects an offense 193s module with only constants 193s registers and autocorrects the offenses 193s module with empty body 193s without empty line 193s does NOT register offenses 193s with empty line 193s does NOT register offenses 193s when first child is NOT a method 193s 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 193s source with blank lines 193s registers an offense for module beginning with a blank line 193s source with comment before method definition 193s registers an offense for module beginning with a blank line 193s when module has a namespace 193s 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 193s source with blank lines 193s registers and autocorrects the offenses 193s source without blank lines 193s registers and autocorrects the offenses 193s source with constants 193s registers and autocorrects the offenses 193s source without blank lines 193s registers an offense for module not ending with a blank line 193s when first child is a method 193s requires blank line at the beginning and ending of module body 193s source without blank lines 193s registers an offense for module not beginning and ending with a blank line 193s when module has a namespace 193s requires no empty lines for namespace but requires blank line at the beginning and ending of module body 193s source with blank lines 193s autocorrects the offenses 193s source without blank lines 193s registers and autocorrects the offenses 193s module with constant and child module 193s registers and autocorrects the offenses 193s when namespace has multiple children 193s requires empty lines for namespace 193s when EnforcedStyle is no_empty_lines 193s registers an offense for module body ending with a blank 193s registers an offense for module body starting with a blank 193s autocorrects beginning and end 193s 193s RuboCop::Cop::Layout::LeadingCommentSpace 193s registers an offense and corrects comment without leading space 193s does not register an offense for only #s 193s accepts =begin/=end comments 193s registers an offense and corrects #! after the first line 193s does not register an offense for more than one space 193s does not register an offense for #! on first line 193s does not register an offense for # followed by no text 193s does not register an offense for more than one # 193s accepts sprockets directives 193s Gemfile Ruby comment 193s when config option is enabled 193s file not named Gemfile 193s registers an offense when using ruby config as comment 193s file named Gemfile 193s does not register an offense when using ruby config as comment 193s when config option is disabled 193s registers an offense when using ruby config as comment 193s file not named config.ru 193s registers an offense and corrects #\ after the first line 193s registers an offense and corrects #\ on first line 193s Doxygen style 193s when config option is enabled 193s does not register offense when using Doxygen style 193s when config option is disabled 193s registers an offense and corrects using Doxygen style 193s RDoc syntax 193s does not register an offense when using `#++` or `#--` 193s registers an offense when starting `:` 193s file named config.ru 193s registers an offense and corrects for #\ after the first line 193s does not register an offense for #\ on first line 193s 193s RuboCop::Cop::Bundler::GemComment 193s when investigating Gemfiles 193s and the file contains source and group 193s does not register any offenses 193s and a gem has no comment 193s registers an offense 193s and the gem is commented on the same line 193s does not register any offenses 193s and the gem is commented 193s does not register any offenses 193s when the "OnlyFor" option is set 193s including "restrictive_version_specifiers" 193s when a gem is uncommented and has no version specified 193s does not register an offense 193s when a gem is uncommented and has a frozen version specifier 193s registers an offense 193s when a gem is uncommented and has a pessimistic version specifier 193s registers an offense 193s when a gem is uncommented and has a version specifier along with other options 193s registers an offense 193s when a gem is uncommented and has a non-minimum version specifier with a leading space 193s registers an offense 193s when a gem is uncommented and has both minimum and non-minimum version specifier 193s registers an offense 193s when a gem is commented 193s does not register an offense 193s when a gem is uncommented and has options but no version specifiers 193s does not register an offense 193s when a gem is uncommented and has only a minimum version specifier 193s does not register an offense 193s when a gem is uncommented and has a version specifier without operator 193s registers an offense 193s including one or more option names but not "version_specifiers" 193s when a gem is uncommented and has one of the specified options 193s registers an offense 193s when a gem is uncommented and has a version specifier but none of the specified options 193s does not register an offense 193s when a gem is uncommented and contains only options not specified 193s does not register an offense 193s including "version_specifiers" 193s when a gem is uncommented and has options but no version specifiers 193s does not register an offense 193s when a gem is uncommented and has multiple version specifiers 193s registers an offense 193s when a gem is uncommented and has a version specifier along with other options 193s registers an offense 193s when a gem is uncommented and has a version specifier 193s registers an offense 193s when a gem is commented 193s does not register an offense 193s when a gem is uncommented and has no version specified 193s does not register an offense 193s and the gem is permitted 193s does not register any offenses 193s and the file is empty 193s does not register any offenses 193s when investigating Ruby files 193s does not register any offenses 193s 193s RuboCop::Cop::Metrics::BlockLength 193s does not count blank lines 193s accepts empty blocks 193s reports the correct beginning and end lines 193s rejects brace blocks too 193s accepts a block with multiline receiver and less than 3 lines of body 193s accepts a block with less than 3 lines 193s rejects a block with more than 5 lines 193s properly counts nested blocks 193s does not count commented lines by default 193s when defining a module 193s does not register an offense 193s when defining a Struct 193s does not register an offense 193s when defining a class 193s does not register an offense 193s when `CountAsOne` is not empty 193s folds array into one line 193s when methods to allow are defined 193s when IgnoredMethods is enabled 193s when string 193s does not report an offense 193s that does not match 193s reports an offense 193s when regex 193s does not report an offense 193s that does not match 193s reports an offense 193s when ExcludedMethods is enabled 193s does not report an offense 193s that does not match 193s reports an offense 193s when AllowedMethods is enabled 193s behaves like allow an offense on an allowed method 193s still rejects other methods with long blocks 193s accepts the foo method with a long block 193s when a method is allowed, but receiver is a module 193s does not report an offense 193s when receiver contains whitespaces 193s allows whitespaces 193s behaves like allow an offense on an allowed method 193s accepts the foo method with a long block 193s still rejects other methods with long blocks 193s when AllowedPatterns is enabled 193s does not report an offense 193s that does not match 193s reports an offense 193s when using numbered parameter 193s does not count blank lines 193s reports the correct beginning and end lines 193s accepts a block with less than 3 lines 193s rejects a block with more than 5 lines 193s when CountComments is enabled 193s also counts commented lines 193s 193s RuboCop::Formatter::Colorizable 193s #black 193s invokes #colorize(string, black 193s #red 193s invokes #colorize(string, red 193s #green 193s invokes #colorize(string, green 193s #white 193s invokes #colorize(string, white 193s #yellow 193s invokes #colorize(string, yellow 193s #magenta 193s invokes #colorize(string, magenta 193s #colorize 193s when the global Rainbow.enabled is true 193s and the formatter's output is not a tty 193s does nothing 193s and output is not a tty, but --color option was provided 193s colorizes the passed string 193s and the formatter's output is a tty 193s colorizes the passed string 193s when the global Rainbow.enabled is false 193s and the formatter's output is not a tty 193s does nothing 193s and the formatter's output is a tty 193s does nothing 193s #blue 193s invokes #colorize(string, blue 193s #cyan 193s invokes #colorize(string, cyan 193s 193s RuboCop::Cop::Style::SoleNestedConditional 193s registers an offense and corrects when using `unless` and `&&` without parens in the outer condition and nested modifier condition 193s does not register an offense when using nested ternary within conditional 193s registers an offense and corrects when `if` foo && bar do_something end `unless` baz 193s registers an offense and corrects when using `unless` and `||` and parens in the outer condition and nested modifier condition 193s registers an offense and corrects when using nested `if` within `unless foo == bar` 193s registers an offense and corrects when using nested `if` within `unless` 193s registers an offense and corrects when using nested `unless` within `if` 193s registers an offense and corrects when using `||` in the outer condition 193s registers an offense and corrects for multiple nested conditionals with using method call outer condition by omitting parentheses 193s registers an offense and corrects when using nested `if` modifier conditional 193s does not register an offense when nested conditional has an `else` branch 193s registers an offense and corrects when using nested conditional and branch contains a comment 193s registers an offense and corrects when `if` foo do_something end `if` bar 193s registers an offense and corrects when `unless` foo do_something end `if` bar 193s registers an offense and corrects when using nested `if` within `if foo = bar` 193s does not register an offense when using nested conditional is not the whole body 193s registers an offense and corrects when nested `||` operator condition 193s registers an offense and corrects when using `unless` and multiple method arguments with parenthesesin the outer condition and nested modifier condition 193s registers an offense and corrects when `if` foo do_something end `unless` bar && baz 193s registers an offense and corrects when `if` foo && bar do_something end `if` baz 193s registers an offense and corrects when using nested `if` within `if` 193s registers an offense and corrects when using nested `unless` modifier with a single expression condition 193s registers an offense and corrects when `if` foo do_something end `unless` bar 193s registers an offense and corrects when using guard conditional with outer comment 193s registers an offense and corrects when using `unless` and method arguments without parentheses in the outer condition and nested modifier condition 193s registers an offense and corrects when using nested `unless` within `unless` 193s registers an offense and corrects when `unless` foo && bar do_something end `if` baz 193s registers an offense and corrects when using nested `unless` modifier conditional 193s registers an offense and corrects when using nested `unless` modifier multiple conditional 193s does not register an offense when no nested conditionals 193s registers an offense and corrects when nested `||` operator modifier condition 193s registers an offense and corrects when using `unless` and `||` without parens in the outer condition and nested modifier condition 193s does not register an offense when using nested conditional within `elsif` 193s does not register an offense for nested conditionals when outer conditional has an `else` branch 193s registers an offense and corrects for multiple nested conditionals 193s does not register an offense when using nested modifier on value assigned in multiple conditions 193s registers an offense and corrects when using `unless` and method arguments with parentheses in the outer condition and nested modifier condition 193s registers an offense and corrects when `if` foo do_something end `if` bar && baz 193s registers an offense and corrects when using `||` in the outer condition and nested modifier condition 193s does not register an offense when using nested modifier on value assigned in single condition 193s registers an offense and corrects when there are outer and inline comments 193s when the inner condition has a send node without parens 193s in guard style 193s registers an offense and corrects 193s in modifier style 193s registers an offense and corrects 193s with a `csend` node 193s registers an offense and corrects 193s with a block 193s registers an offense and corrects 193s when AllowModifier is true 193s does not register an offense when using nested modifier conditional 193s when disabling `Style/IfUnlessModifier` 193s registers an offense and corrects when there are outer and inline comments 193s registers an offense and corrects when using nested conditional and branch contains a comment 193s when the inner condition has a send node with parens 193s in modifier style 193s registers an offense and corrects 193s in guard style 193s registers an offense and corrects 193s 193s RuboCop::Cop::Layout::TrailingEmptyLines 193s when EnforcedStyle is final_blank_line 193s registers an offense for final newline 193s registers an offense for multiple trailing blank lines 193s registers an offense for no final newline 193s autocorrects missing blank line 193s autocorrects missing newline 193s registers an offense for multiple blank lines in an empty file 193s accepts final blank line 193s when EnforcedStyle is final_newline 193s registers an offense for no final newline after block comment 193s autocorrects even if some lines have space 193s accepts an empty file 193s accepts final blank lines if they come after __END__ in empty file 193s accepts final newline 193s accepts final blank lines if they come after __END__ 193s registers an offense for no final newline after assignment 193s registers an offense for multiple blank lines in an empty file 193s registers an offense for multiple trailing blank lines 193s 193s RuboCop::Cop::Style::StringLiterals 193s when ConsistentQuotesInMultiline is true 193s and EnforcedStyle is double_quotes 193s accepts continued strings using all double quotes 193s registers an offense for mixed quote styles in a continued string 193s doesn't register offense for single quotes with embedded double 193s registers an offense for unneeded single quotes in continuation 193s and EnforcedStyle is single_quotes 193s doesn't choke on heredocs with inconsistent indentation 193s doesn't register offense for double quotes with interpolation 193s accepts continued strings using all single quotes 193s registers an offense for mixed quote styles in a continued string 193s registers an offense for strings with line breaks in them 193s doesn't register offense for double quotes with embedded single 193s registers an offense for unneeded double quotes in continuation 193s accepts for double quotes with an escaped special character 193s accepts for double quotes with an escaped normal character 193s configured with double quotes preferred 193s can handle a built-in constant parsed as string 193s accepts ' in a %w 193s accepts heredocs 193s flags single quotes with plain # (not #@var or #{interpolation} or #$global 193s accepts %q and %Q quotes 193s accepts single quoted string with backslash 193s does not accept multiple escaped single quotes in single quotes 193s accepts single quotes in string with escaped non-' character 193s accepts single quotes at the start of regexp literals 193s accepts escaped single quote in string with escaped non-' character 193s accepts % quotes 193s accepts double quotes 194s accepts single quotes in interpolation 194s registers offense for escaped single quote in single quotes 194s registers offense for single quotes when double quotes would be equivalent 194s accepts single quotes when they are needed 194s registers offense for opposite + correct 194s configured with single quotes preferred 194s accepts double quotes when interpolating & quotes in multiple lines 194s accepts double quotes when new line is used 194s registers an offense for words with non-ascii chars 194s does not register an offense for words with non-ascii chars and other control sequences 194s registers offense for double quotes when single quotes suffice 194s registers an offense for "\"" 194s can handle a built-in constant parsed as string 194s can handle character literals 194s accepts single quotes 194s accepts %q and %Q quotes 194s detects unneeded double quotes within concatenated string 194s accepts double quotes when interpolating an instance variable 194s accepts double quotes when interpolating a class variable 194s accepts double quotes when single quotes are used 194s registers an offense for "\" 194s accepts double quotes with some other special symbols 194s registers offense for correct + opposite 194s accepts double quotes when interpolating a global variable 194s accepts single quotes in interpolation 194s accepts double quotes in interpolation 194s accepts heredocs 194s accepts double quotes when unicode control sequence is used 194s accepts double quotes when control characters are used 194s accepts double quotes at the start of regexp literals 194s accepts " in a %w 194s accepts % quotes 194s accepts \\\n in a string 194s when configured with a bad value 194s fails 194s 194s RuboCop::RakeTask 194s running tasks 194s runs with specified options if a block is given 194s will not error when result is not 0 and fail_on_error is false 194s uses the default formatter from .rubocop.yml if no formatter option is given 194s runs with default options 194s exits when result is not 0 and fail_on_error is true 194s allows nested arrays inside formatters, options, and requires 194s autocorrect 194s runs with --autocorrect 194s runs with --autocorrect-all 194s runs with with the options that were passed to its parent task 194s defining tasks 194s creates a named task and a named auto_correct task 194s creates a rubocop task and a rubocop autocorrect task 194s creates a named task and a named autocorrect task 194s creates a rubocop task and a rubocop auto_correct task 194s 194s RuboCop::Cop::Layout::SpaceInsideArrayLiteralBrackets 194s does not register offense for any kind of reference brackets 194s when EnforcedStyle is space 194s does not register offense for valid 2-dimensional array 194s behaves like space inside arrays 194s accepts space inside array brackets with comment 194s does not register offense when bottom bracket gets its own line & has trailing method 194s registers an offense and corrects an array missing whitespace when there is more than one array on a line 194s registers an offense and corrects array brackets with no leading whitespace 194s does not register offense for array when brackets get their own line 194s accepts square brackets called with method call syntax 194s registers an offense and corrects multiline array on end bracket 194s registers an offense and corrects multiline array on end bracket with trailing method 194s does not register offense for valid multiline array 194s does not register offense for arrays with spaces 194s does not register offense when 2 arrays on one line 194s registers an offense and corrects array brackets with no trailing whitespace 194s does not register offense for indented array when bottom bracket gets its own line & is misaligned 194s accepts square brackets as method name 194s register an offense and corrects when 2 arrays are on one line 194s does not register offense for arrays using ref brackets 194s when EnforcedStyle is compact 194s registers an offense and corrects space between 2 closing brackets 194s does not register offense for valid 2-dimensional array 194s accepts multiline array 194s registers an offense and corrects space between 2 opening brackets 194s registers an offense and corrects 2-dimensional array with extra spaces 194s registers an offense and corrects 3-dimensional array with extra spaces 194s does not register offense for valid 3-dimensional array 194s does not register offense for valid 4-dimensional array 194s multiline, 2-dimensional array with newlines 194s registers an offense and corrects at the beginning of array 194s registers an offense and corrects at the end of array 194s multiline, 2-dimensional array with spaces 194s registers an offense and corrects at the end of array 194s registers an offense and corrects at the beginning of array 194s behaves like space inside arrays 194s does not register offense for indented array when bottom bracket gets its own line & is misaligned 194s does not register offense when bottom bracket gets its own line & has trailing method 194s accepts square brackets called with method call syntax 194s registers an offense and corrects multiline array on end bracket 194s does not register offense for array when brackets get their own line 194s does not register offense when 2 arrays on one line 194s registers an offense and corrects an array missing whitespace when there is more than one array on a line 194s does not register offense for arrays using ref brackets 194s accepts space inside array brackets with comment 194s register an offense and corrects when 2 arrays are on one line 194s registers an offense and corrects multiline array on end bracket with trailing method 194s registers an offense and corrects array brackets with no leading whitespace 194s does not register offense for valid multiline array 194s does not register offense for arrays with spaces 194s registers an offense and corrects array brackets with no trailing whitespace 194s accepts square brackets as method name 194s with space inside empty brackets not allowed 194s registers an offense and corrects multiline spaces 194s registers an offense and corrects empty brackets with multiple spaces inside 194s registers an offense and corrects empty brackets with 1 space inside 194s accepts empty brackets with no space inside 194s when EnforcedStyle is no_space 194s registers an offense and corrects array brackets with leading whitespace 194s does not register offense for arrays with no spaces 194s registers an offense and corrects an array literal as an argument with trailing whitespace after a heredoc is started 194s does not register offense for indented array when bottom bracket gets its own line & is misaligned 194s does not register offense for array when brackets get own line 194s registers an offense and corrects multiline array on end bracket with trailing method 194s accepts square brackets called with method call syntax 194s accepts square brackets as method name 194s registers an offense and corrects array brackets with trailing whitespace 194s registers an offense and corrects an array when two on one line 194s does not register offense for valid multiline array 194s accepts a multiline array with whitespace before end bracket 194s does not register offense when contains an array literal as an argument after a heredoc is started 194s does not register offense when 2 arrays on one line 194s does not register offense when bottom bracket gets its own line & has trailing method 194s does not register offense for valid 2-dimensional array 194s does not register offense for arrays using ref brackets 194s registers an offense and corrects multiline array on end bracket 194s accepts space inside array brackets if with comment 194s registers an offense and corrects 2 arrays on one line 194s does not register offense when bottom bracket gets its own line indented with tabs 194s with space inside empty braces allowed 194s accepts empty brackets with space inside 194s registers an offense and corrects empty brackets with more than one space inside 194s registers an offense and corrects empty brackets with no space inside 194s 194s RuboCop::Cop::Lint::UselessTimes 194s registers an offense and corrects when 1.times with empty block argument 194s does not register an offense for an integer > 1 194s registers an offense and corrects with negative times 194s registers an offense and corrects with 0.times 194s registers an offense and corrects with 1.times 194s registers an offense and corrects with 0.times with block arg 194s registers an offense and corrects with 1.times with block arg 194s registers an offense and corrects with negative times with block arg 194s registers an offense and corrects with 1.times with method chain 194s registers an offense and corrects when there is a blank line in the method definition 194s multiline block 194s does not try to correct a block if the block arg is changed 194s correctly handles a multiline block with 1.times 194s corrects a block that changes another lvar 194s does not try to correct a block if the block arg is changed in parallel assignment 194s within indentation 194s corrects properly when removing multiline 194s corrects properly when replacing 194s corrects properly when removing single line 194s inline `Integer#times` calls 194s does not try to correct `1.times` 194s does not try to correct `0.times` 194s short-form method 194s does not adjust surrounding space 194s registers an offense and corrects with 0.times 194s registers an offense and corrects with 1.times 194s registers an offense and corrects with negative times 194s does not register an offense for an integer > 1 194s 194s RuboCop::Cop::Style::MultilineWhenThen 194s does not register an offense when line break for multiple candidate values of `when` 194s registers an offense when one line for multiple candidate values of `when` 194s doesn't register an offense for singleline when statement with then 194s does not register an offense for hash when statement with then 194s does not register an offense for array when statement with then 194s doesn't register an offense for multiline when statementwith then followed by other lines 194s registers an offense for multiline (one line in a body) when statement with then 194s autocorrects when the body of `when` branch starts with `then` 194s registers an offense for multiline (two lines in a body) when statement with then 194s doesn't register an offense when `then` required for a body of `when` is used 194s doesn't register an offense for multiline when statement without then 194s doesn't register an offense for empty when statement without then 194s registers an offense for empty when statement with then 194s 194s RuboCop::StringInterpreter 194s .interpret 194s handles unicode 194s handles extended unicode 194s handles octal 194s handles hex 194s behaves like simple escape 194s handles \\s 194s behaves like simple escape 194s handles \\f 194s behaves like simple escape 194s handles \\r 194s behaves like simple escape 194s handles \\v 194s behaves like simple escape 194s handles \\t 194s behaves like simple escape 194s handles \\a 194s behaves like simple escape 194s handles \\n 194s behaves like simple escape 194s handles \\e 194s behaves like simple escape 194s handles \\b 194s 194s RuboCop::Cop::Lint::DuplicateHashKey 194s behaves like duplicated non literal key 194s does not register an offense for duplicated `{ some_method_call => :sym }` hash keys 194s behaves like duplicated literal key 194s registers an offense for duplicated `!true` hash keys 194s behaves like duplicated literal key 194s registers an offense for duplicated `{ :a => 1, :b => 2 }` hash keys 194s behaves like duplicated literal key 194s registers an offense for duplicated `(false or true)` hash keys 194s behaves like duplicated literal key 194s registers an offense for duplicated `/./` hash keys 194s behaves like duplicated non literal key 194s does not register an offense for duplicated `some_method_call` hash keys 194s behaves like duplicated non literal key 194s does not register an offense for duplicated `(x && false)` hash keys 194s behaves like duplicated non literal key 194s does not register an offense for duplicated `%r{abx#{foo}}ixo` hash keys 194s behaves like duplicated literal key 194s registers an offense for duplicated `%r{abx}ixo` hash keys 194s When a key is duplicated three times in a hash literal 194s registers two offenses 194s behaves like duplicated non literal key 194s does not register an offense for duplicated `(x == false)` hash keys 194s When there is no duplicated key in the hash 194s does not register an offense 194s behaves like duplicated non literal key 194s does not register an offense for duplicated `[some_method_call]` hash keys 194s behaves like duplicated non literal key 194s does not register an offense for duplicated `{ :sym => some_method_call }` hash keys 194s target ruby version >= 2.6 194s behaves like duplicated literal key 194s registers an offense for duplicated `(42..)` hash keys 194s behaves like duplicated literal key 194s registers an offense for duplicated `nil` hash keys 194s behaves like duplicated literal key 194s registers an offense for duplicated `{ a: 1, b: 2 }` hash keys 194s behaves like duplicated literal key 194s registers an offense for duplicated `1.0` hash keys 194s behaves like duplicated literal key 194s registers an offense for duplicated `(false && true)` hash keys 194s behaves like duplicated non literal key 194s does not register an offense for duplicated `"#{some_method_call}"` hash keys 194s behaves like duplicated non literal key 194s does not register an offense for duplicated `(x or false)` hash keys 194s behaves like duplicated literal key 194s registers an offense for duplicated `"#{2}"` hash keys 194s behaves like duplicated literal key 194s registers an offense for duplicated `(1)` hash keys 194s behaves like duplicated non literal key 194s does not register an offense for duplicated `some_method_call(x, y)` hash keys 194s behaves like duplicated literal key 194s registers an offense for duplicated `false` hash keys 194s when there are two duplicated keys in a hash 194s registers two offenses 194s behaves like duplicated non literal key 194s does not register an offense for duplicated `/.#{some_method_call}/` hash keys 194s behaves like duplicated literal key 194s registers an offense for duplicated `1` hash keys 194s behaves like duplicated literal key 194s registers an offense for duplicated `[1, 2, 3]` hash keys 194s when there is a duplicated key in the hash literal 194s registers an offense 194s behaves like duplicated literal key 194s registers an offense for duplicated `'str'` hash keys 194s behaves like duplicated literal key 194s registers an offense for duplicated `(false <=> true)` hash keys 194s 194s RuboCop::Cop::Style::ConstantVisibility 194s does not register an offense when passing a string to the visibility declaration 194s does not register an offense in the top level scope 194s registers an offense for module definitions 194s when defining a constant in a class 194s with a single-statement body 194s registers an offense when not using a visibility declaration 194s with a multi-statement body 194s registers an offense when there is no matching visibility declaration 194s does not register an offense when using a visibility declaration 194s registers an offense when not using a visibility declaration 194s when defining a constant in a module 194s does not register an offense when using a visibility declaration 194s registers an offense when not using a visibility declaration 194s IgnoreModules 194s does not register an offense for class definitions 194s registers an offense for constants 194s 194s RuboCop::Cop::Gemspec::DuplicatedAssignment 194s registers an offense when using `name=` twice 194s does not register an offense when `name=` method call is not block value 194s registers an offense when using `version=` twice 194s does not register an offense when using `spec.add_dependency` twice 194s registers an offense when using `name=` twice with `cbase` 194s registers an offense when using `required_ruby_version=` twice 194s does not register an offense when using `<<` twice 194s 194s RuboCop::Cop::Bundler::OrderedGems 194s When a gem that starts with a capital letter is sorted 194s does not register an offense 194s When a gem that starts with a capital letter is not sorted 194s registers an offense 194s When a gem is sorted but not so when disregarding _- 194s by default 194s registers an offense 194s when ConsiderPunctuation is true 194s does not register an offense 194s When gems are alphabetically sorted 194s does not register any offenses 194s When gem groups is separated by multiline comment 194s with TreatCommentsAsGroupSeparators: false 194s registers an offense 194s with TreatCommentsAsGroupSeparators: true 194s accepts 194s When each individual group of line is sorted 194s does not register any offenses 194s When gems have an inline comment, and not sorted 194s registers an offense 194s When a gem declaration takes several lines 194s registers an offense 194s When gems are not alphabetically sorted 194s registers an offense 194s when a gem is referenced from a variable 194s ignores the line 194s resets the sorting to a new block 194s When gems are asciibetically sorted irrespective of _ 194s does not register an offense 194s When each individual group of line is not sorted 194s registers some offenses 194s When the gemfile is empty 194s does not register any offenses 194s When there are duplicated gems in group 194s registers an offense 194s 194s RuboCop::Cop::Style::Proc 194s accepts the ::Proc.new call without block 194s registers an offense for ::Proc.new 194s accepts the Proc.new call without block 194s registers an offense for a Proc.new call 194s Ruby 2.7 194s registers an offense for a Proc.new call 194s 194s RuboCop::Cop::Style::LineEndConcatenation 194s registers offenses only for the appropriate lines in chained concats 194s registers an offense for dynamic string concat at line end 194s autocorrects a + with \ to just \ 194s accepts string concat with a return value of method on a string 194s accepts string concat with a return value of method on an interpolated string 194s autocorrects only the lines that should be autocorrected 194s accepts string concat at line end for special strings like __FILE__ 194s accepts string concat on the same line 194s registers multiple offenses when there are chained concatenations 194s registers an offense for dynamic string concat with << at line end 194s registers an offense for string concat at line end 194s autocorrects a + with trailing whitespace to \ 194s accepts string concat at line end when followed by comment 194s registers an offense for string concat with << and \ at line ends 194s registers multiple offenses when there are chained concatenationscombined with << calls 194s registers multiple offenses when there are chained << methods 194s accepts string concat at line end when followed by a comment line 194s registers an offense for string concat with << at line end 194s accepts string concat at line end when % literals are involved 194s 194s RuboCop::Cop::Lint::NestedMethodDefinition 194s does not register offense for nested definition inside module_eval 194s does not register an offense for a lambda definition inside method 194s does not register offense for nested definition inside ::Module.new 194s does not register offense for nested definition inside Struct.new 194s does not register offense for nested definition inside Class.new 194s does not register offense for nested definition inside class shovel 194s does not register offense for nested definition inside class_eval 194s registers an offense for a nested class method definition 194s does not register offense for nested definition inside instance_eval 194s does not register offense for nested definition inside instance_exec 194s does not register offense for nested definition inside ::Struct.new 194s registers an offense for a nested singleton method definition 194s does not register offense for nested definition inside class_exec 194s does not register offense for nested definition inside module_exec 194s does not register offense for nested definition inside Module.new 194s does not register offense for nested definition inside ::Class.new 194s does not register offense for definition of method on local var 194s registers an offense for a nested method definition inside lambda 194s registers an offense for a nested method definition 194s when `AllowedPatterns: [baz]` 194s does not register offense for nested definition inside `do_baz` 194s registers offense for nested definition inside `do_qux` 194s when `AllowedMethods: [has_many]` 194s does not register offense for nested definition inside `has_many` 194s registers offense for nested definition inside `denied_method` 194s 194s RuboCop::Cop::Layout::InitialIndentation 194s registers an offense and corrects indented assignment disregarding comment 194s accepts empty file 195s accepts unindented comment + assignment 195s accepts unindented method definition 195s registers an offense for indented method definition 195s for a file with byte order mark 195s registers an offense and corrects indented method call 195s accepts unindented method call 195s registers an offense and corrects indented method call after comment 195s 195s RuboCop::Cop::Style::NumericLiterals 195s autocorrects negative numbers 195s does not count a leading minus sign as a digit 195s registers an offense for a long undelimited integer 195s accepts long numbers with underscore 195s registers an offense for a float with a long undelimited integer part 195s accepts a short integer without underscore 195s autocorrects numbers with spaces between leading minus and numbers 195s accepts integers with less than three places at the end 195s handles numeric literal with exponent 195s autocorrects numeric literal with exponent (large E) and dot 195s autocorrects numeric literal with exponent and dot 195s registers an offense for an integer with misplaced underscore 195s autocorrects negative floating-point numbers 195s accepts short numbers without underscore 195s ignores non-decimal literals 195s when `3000` is specified for `AllowedNumbers` 195s registers an offense 195s does not register an offense 195s AllowedPatterns 195s registers an offense for numbers that do not exactly match the pattern 195s corrects by inserting underscores every 3 digits 195s does not register an offense for numbers that exactly match the pattern 195s AllowedPatterns with repetition 195s does not register an offense for numbers that match the pattern 195s when `'3000'` is specified for `AllowedNumbers` 195s registers an offense 195s does not register an offense 195s for --auto-gen-config 195s with separators 195s does not disable the cop if the line is disabled 195s disables the cop 195s when the number is only digits 195s detects right value of MinDigits based on the longest number 195s sets the right value if one is disabled inline 195s strict 195s registers an offense for an integer with misplaced underscore 195s 195s RuboCop::Cop::Style::DocumentDynamicEvalDefinition 195s registers an offense when using eval-type method with string interpolation without comment docs 195s registers an offense when using eval-type method with interpolated string that is not heredoc without comment doc 195s does not register an offense when using eval-type method without string interpolation 195s does not register an offense when using eval-type method with string interpolation with comment docs 195s does not register an offense when using eval-type method with interpolated string that is not heredoc with comment doc 195s block comment outside heredoc 195s does not register an offense for a matching block comment before the heredoc 195s does not register an offense when using other text 195s does not register an offense when using multiple methods 195s registers an offense if the comment does not match the method 195s does not register an offense for a matching block comment after the heredoc 195s does not register an offense when using inline comments 195s block comment in heredoc 195s does not evaluate comments if there is no interpolation 195s does not register an offense when using multiple methods with split comments 195s registers an offense if the comment does not match the method 195s does not register an offense when using multiple methods 195s does not register an offense when using other text 195s does not register an offense when using inline comments 195s does not register an offense for a matching block comment 195s 195s RuboCop::Cop::Style::RedundantInitialize 195s registers and corrects an offense for an `initialize` method with arguments that only calls `super` 195s does not register an offense for an `initialize` method that calls `super` with a different argument list 195s does not register an offense for a method not named `initialize` that only calls super 195s does not register an offense for an `initialize` method with a default keyword argument that calls `super` 195s registers and corrects an offense for an `initialize` method with arguments that only calls `super` with explicit args 195s registers and corrects an offense for an `initialize` method with no arguments that calls `super` with no arguments 195s does not register an offense for an `initialize` method that calls another method 195s does not register an offense for an empty `initialize` method with a splat` 195s does not register an offense for an `initialize` method that calls another method before `super` 195s does not register an offense for an `initialize` method with only a comment 195s registers an offense for an `initialize` method with a default keyword argument that does nothing 195s does not register an offense for an empty `initialize` method with a splat` and super 195s registers and corrects an offense for an empty `initialize` method 195s does not register an offense for an empty method not named `initialize` 195s does not register an offense for an `initialize` method that calls `super` with no arguments 195s registers an offense for an `initialize` method with a default argument that does nothing 195s does not register an offense for an `initialize` method with a default argument that calls `super` 195s does not register an offense for an empty `initialize` method with a kwsplat` 195s does not register an offense for an `initialize` method that calls another method after `super` 195s registers and corrects an offense for an `initialize` method that only calls `super` 195s does not register an offense for an empty `initialize` method with a argument forwarding` 195s when `AllowComments: false` 195s registers and corrects an offense for an `initialize` method with only a comment 195s 195s RuboCop::Cop::Style::SymbolArray 195s with non-default MinSize 195s does not autocorrect array of one symbol if MinSize > 1 195s when EnforcedStyle is brackets 195s autocorrects multiline %i array 195s autocorrects an array has interpolations 195s autocorrects an array starting with %i 195s registers an offense for array starting with %i 195s registers an offense for empty array starting with %i 195s does not register an offense for arrays of symbols 195s when EnforcedStyle is percent 195s uses %I when appropriate 195s autocorrects arrays of symbols with embedded newlines and tabs 195s does not register an offense for array with non-syms 195s registers an offense for arrays of symbols 195s detects right value for MinSize to use for --auto-gen-config 195s doesn't break when a symbol contains ) 195s detects when the cop must be disabled to avoid offenses 195s registers an offense in a non-ambiguous block context 195s autocorrects arrays of one symbol 195s autocorrects arrays of symbols with new line 195s does not register an offense if symbol contains whitespace 195s does not register an offense for array starting with %i 195s when PreferredDelimiters is specified 195s autocorrects an array with delimiters 195s autocorrects an array in multiple lines 195s autocorrects an array using partial newlines 195s 195s RuboCop::Cop::Style::RedundantStringEscape 195s does not register an offense for a regexp literal 195s does not register an offense for a __dir__ literal 195s does not register an offense for a __FILE__ literal 195s does not register an offense for a x-str literal 195s with a %W(...) literal 195s does not register an offense for escaped spaces 195s behaves like a literal with interpolation 195s registers an offense and corrects an escaped } when escaping both brackets to avoid interpolation 195s does not register an offense for a @-escaped cvar interpolation 195s does not register a bracket-escaped lvar interpolation 195s does not register an offense for control characters 195s does not register an offense for an escaped interpolation 195s registers an offense and corrects an escaped double quote 195s does not register an offense for an octal escape 195s registers an offense and corrects a escaped nested delimiter in a double quoted string 195s does not register an offense for an escaped delimiter 195s does not register an offense for meta control characters 195s does not register an offense for a meta character 195s registers an offense and corrects an escaped # before interpolation 195s does not register an offense for an escaped ivar interpolation 195s does not register an offense for an escaped delimiter before interpolation 195s does not register an offense for multiple unicode escapes 195s does not register an offense for an ascii DEL 195s does not register an offense for a @-escaped ivar interpolation 195s does not register an offense for an escaped gvar interpolation 195s does not register an offense for a $-escaped gvar interpolation 195s registers an offense and corrects an escaped single quote 195s does not register an offense for an escaped cvar interpolation 195s does not register an offense for an escaped backslash 195s registers an offense and corrects an escaped # without following { 195s does not register an offense for an escaped newline 195s does not register an offense for a technically-unnecessary escape 195s does not register an offense for a hex escape 195s does not register an offense for an escaped # followed { 195s does not register an offense for a unicode escape 195s does not register an offense for a newline 195s registers an offense and corrects an escaped # at end-of-string 195s does not register an offense for a bracket-escaped interpolation 195s does not register an offense without escapes 195s when using character literals 195s does not register an offense for `?\n` 195s does not register an offense for `?a` 195s with a single quoted string 195s behaves like a literal without interpolation 195s does not register an offense for an escaped backslash 195s does not register an offense for control characters 195s does not register an offense with escaped # at end-of-string 195s does not register an offense with escaped single quote 195s does not register an offense for multiple unicode escapes 195s does not register an offense without escapes 195s does not register an offense with escaped double quote 195s does not register an offense for an escaped gvar interpolation 195s does not register an offense for a hex escape 195s does not register an offense with escaped # without following { 195s does not register an offense for an escaped # followed { 195s does not register an offense for an escaped ivar interpolation 195s does not register an offense for a @-escaped cvar interpolation 195s does not register an offense for meta control characters 195s does not register an offense for an escaped newline 195s does not register an offense for an escaped # with following { 195s does not register an offense for a $-escaped gvar interpolation 195s does not register an offense for a @-escaped ivar interpolation 195s does not register an offense for an escaped cvar interpolation 195s does not register an offense for a bracket-escaped interpolation 195s does not register an offense for an escaped delimiter before interpolation 195s does not register a bracket-escaped lvar interpolation 195s does not register an offense for an octal escape 195s does not register an offense for an allowed escape inside multi-line literal 195s does not register an offense for a unicode escape 195s does not register an offense for an ascii DEL 195s does not register an offense for a meta character 195s does not register an offense for a newline 195s does not register an offense for a technically-unnecessary escape 195s does not register an offense for an escaped delimiter 195s does not register an offense for an escaped interpolation 195s with a %w(...) literal 195s does not register an offense for escaped spaces 195s behaves like a literal without interpolation 195s does not register an offense for an escaped newline 195s does not register an offense without escapes 195s does not register an offense for a unicode escape 195s does not register an offense with escaped single quote 195s does not register an offense for an escaped interpolation 195s does not register an offense for a $-escaped gvar interpolation 195s does not register an offense for an escaped delimiter before interpolation 195s does not register an offense for a @-escaped ivar interpolation 195s does not register an offense for meta control characters 195s does not register an offense for an allowed escape inside multi-line literal 195s does not register an offense for a bracket-escaped interpolation 195s does not register an offense for a hex escape 195s does not register an offense for an ascii DEL 195s does not register an offense with escaped # at end-of-string 195s does not register a bracket-escaped lvar interpolation 195s does not register an offense for an escaped delimiter 195s does not register an offense for an escaped backslash 195s does not register an offense for an escaped # followed { 195s does not register an offense for a newline 195s does not register an offense for multiple unicode escapes 195s does not register an offense for an escaped # with following { 195s does not register an offense for control characters 195s does not register an offense for an octal escape 195s does not register an offense for an escaped ivar interpolation 195s does not register an offense with escaped double quote 195s does not register an offense with escaped # without following { 195s does not register an offense for a meta character 195s does not register an offense for a @-escaped cvar interpolation 195s does not register an offense for an escaped cvar interpolation 195s does not register an offense for an escaped gvar interpolation 195s does not register an offense for a technically-unnecessary escape 195s with a %Q!...! literal 195s behaves like a literal with interpolation 195s does not register an offense for an escaped backslash 195s does not register an offense for an escaped newline 195s does not register an offense for meta control characters 195s does not register an offense for an escaped cvar interpolation 195s does not register an offense for an escaped delimiter 195s does not register an offense for an escaped ivar interpolation 195s registers an offense and corrects an escaped # without following { 195s does not register an offense for a $-escaped gvar interpolation 195s does not register an offense for a newline 195s does not register an offense for a hex escape 195s does not register an offense for a bracket-escaped interpolation 195s does not register an offense for an escaped interpolation 195s does not register an offense for an escaped # followed { 195s does not register an offense for a @-escaped ivar interpolation 195s registers an offense and corrects an escaped single quote 195s does not register an offense for an escaped delimiter before interpolation 195s does not register a bracket-escaped lvar interpolation 195s registers an offense and corrects an escaped double quote 195s registers an offense and corrects an escaped # before interpolation 195s does not register an offense for a @-escaped cvar interpolation 195s does not register an offense without escapes 195s does not register an offense for control characters 195s does not register an offense for multiple unicode escapes 195s does not register an offense for an octal escape 195s does not register an offense for a unicode escape 195s does not register an offense for an escaped gvar interpolation 195s registers an offense and corrects a escaped nested delimiter in a double quoted string 195s does not register an offense for a meta character 195s registers an offense and corrects an escaped # at end-of-string 195s does not register an offense for a technically-unnecessary escape 195s does not register an offense for an ascii DEL 195s registers an offense and corrects an escaped } when escaping both brackets to avoid interpolation 195s with a double quoted string 195s does not register an offense when escaping a quote in multi-line broken string 195s does not register an offense with escaped double quote 195s registers an offense and corrects an unnecessary escape in multi-line broken string 195s does not register an offense with multiple escaped backslashes 195s behaves like a literal with interpolation 195s does not register an offense for a hex escape 195s does not register an offense for multiple unicode escapes 195s does not register an offense for a unicode escape 195s does not register an offense for meta control characters 195s does not register an offense for an escaped delimiter 195s registers an offense and corrects an escaped # at end-of-string 195s does not register an offense for an escaped gvar interpolation 195s registers an offense and corrects an escaped # without following { 195s does not register an offense for a @-escaped ivar interpolation 195s does not register an offense for an ascii DEL 195s does not register an offense for a technically-unnecessary escape 195s does not register an offense for an escaped ivar interpolation 195s does not register an offense for a $-escaped gvar interpolation 195s registers an offense and corrects an escaped } when escaping both brackets to avoid interpolation 195s does not register an offense for a @-escaped cvar interpolation 195s does not register an offense for an escaped backslash 195s registers an offense and corrects an escaped single quote 195s registers an offense and corrects an escaped # before interpolation 195s does not register a bracket-escaped lvar interpolation 195s does not register an offense for a bracket-escaped interpolation 195s does not register an offense for an escaped newline 195s does not register an offense for an escaped # followed { 195s does not register an offense for an octal escape 195s does not register an offense for an escaped delimiter before interpolation 195s does not register an offense for a meta character 195s does not register an offense for a newline 195s does not register an offense without escapes 195s does not register an offense for control characters 195s does not register an offense for an escaped cvar interpolation 195s does not register an offense for an escaped interpolation 195s with an interpolation-enabled HEREDOC 195s does not register an offense for a @-escaped cvar interpolation 195s registers an offense and corrects an escaped # before interpolation 195s does not register an offense for a unicode escape 195s registers an offense and corrects an escaped single quote 195s does not register an offense for meta control characters 195s does not register an offense for a technically-unnecessary escape 195s registers an offense and corrects an escaped # without following { 195s does not register an offense for an escaped newline 195s does not register an offense for a bracket-escaped interpolation 195s does not register an offense for an escaped cvar interpolation 195s does not register an offense for a @-escaped ivar interpolation 195s does not register an offense for a hex escape 195s does not register an offense for an ascii DEL 195s does not register an offense for a newline 195s does not register an offense for an escaped # followed { 195s does not register an offense for control characters 195s does not register an offense for an octal escape 195s does not register an offense for an escaped ivar interpolation 195s does not register an offense for a $-escaped gvar interpolation 195s does not register a bracket-escaped lvar interpolation 195s does not register an offense for an escaped interpolation 195s does not register an offense for an escaped backslash 195s registers an offense and corrects an escaped # at end-of-string 195s does not register an offense for an escaped gvar interpolation 195s does not register an offense for a heredoc interpolating a string with an allowed escape 195s does not register an offense for a nested heredoc without interpolation 195s does not register an offense for multiple unicode escapes 195s does not register an offense without escapes 195s does not register an offense for a meta character 195s with an interpolation-disabled HEREDOC 195s behaves like a literal without interpolation 195s does not register an offense for an escaped newline 195s does not register an offense with escaped single quote 195s does not register an offense for a bracket-escaped interpolation 195s does not register an offense for an escaped # followed { 195s does not register an offense for a $-escaped gvar interpolation 195s does not register an offense for a @-escaped cvar interpolation 195s does not register an offense with escaped # without following { 195s does not register an offense for an escaped # with following { 195s does not register an offense for an escaped backslash 195s does not register an offense without escapes 195s does not register an offense for an escaped gvar interpolation 195s does not register an offense for meta control characters 195s does not register an offense for control characters 195s does not register an offense for an escaped ivar interpolation 195s does not register a bracket-escaped lvar interpolation 195s does not register an offense for a technically-unnecessary escape 195s does not register an offense for multiple unicode escapes 195s does not register an offense for an ascii DEL 195s does not register an offense for an escaped interpolation 195s does not register an offense for an allowed escape inside multi-line literal 195s does not register an offense with escaped # at end-of-string 195s does not register an offense for a newline 195s does not register an offense for an octal escape 195s does not register an offense for a meta character 195s does not register an offense with escaped double quote 195s does not register an offense for a unicode escape 195s does not register an offense for an escaped cvar interpolation 195s does not register an offense for a @-escaped ivar interpolation 195s does not register an offense for a hex escape 195s with a %Q(...) literal 195s behaves like a literal with interpolation 195s does not register an offense for an escaped cvar interpolation 195s does not register an offense for an escaped delimiter 196s does not register an offense for multiple unicode escapes 196s registers an offense and corrects an escaped } when escaping both brackets to avoid interpolation 196s does not register an offense for an escaped # followed { 196s does not register an offense for an escaped newline 196s registers an offense and corrects an escaped double quote 196s does not register an offense without escapes 196s does not register an offense for meta control characters 196s does not register an offense for an ascii DEL 196s does not register an offense for control characters 196s does not register an offense for a unicode escape 196s does not register an offense for a @-escaped cvar interpolation 196s registers an offense and corrects an escaped # at end-of-string 196s does not register an offense for a $-escaped gvar interpolation 196s registers an offense and corrects an escaped # without following { 196s does not register an offense for a technically-unnecessary escape 196s does not register an offense for an escaped gvar interpolation 196s registers an offense and corrects an escaped single quote 196s does not register an offense for an escaped delimiter before interpolation 196s does not register an offense for an escaped backslash 196s does not register an offense for an octal escape 196s does not register an offense for a bracket-escaped interpolation 196s registers an offense and corrects a escaped nested delimiter in a double quoted string 196s does not register an offense for a meta character 196s registers an offense and corrects an escaped # before interpolation 196s does not register an offense for an escaped interpolation 196s does not register an offense for a hex escape 196s does not register an offense for a newline 196s does not register a bracket-escaped lvar interpolation 196s does not register an offense for a @-escaped ivar interpolation 196s does not register an offense for an escaped ivar interpolation 196s with a %q(...) literal 196s behaves like a literal without interpolation 196s does not register an offense for an allowed escape inside multi-line literal 196s does not register an offense for an escaped cvar interpolation 196s does not register an offense for a $-escaped gvar interpolation 196s does not register an offense for an escaped ivar interpolation 196s does not register an offense for an ascii DEL 196s does not register an offense for control characters 196s does not register an offense for meta control characters 196s does not register an offense for an escaped delimiter 196s does not register an offense for an escaped newline 196s does not register an offense for a technically-unnecessary escape 196s does not register an offense for multiple unicode escapes 196s does not register an offense with escaped single quote 196s does not register an offense with escaped double quote 196s does not register an offense for a unicode escape 196s does not register an offense for a meta character 196s does not register a bracket-escaped lvar interpolation 196s does not register an offense for an escaped # followed { 196s does not register an offense for a hex escape 196s does not register an offense for a bracket-escaped interpolation 196s does not register an offense for an escaped delimiter before interpolation 196s does not register an offense for an escaped backslash 196s does not register an offense for an escaped # with following { 196s does not register an offense for an escaped gvar interpolation 196s does not register an offense for an octal escape 196s does not register an offense with escaped # without following { 196s does not register an offense without escapes 196s does not register an offense with escaped # at end-of-string 196s does not register an offense for an escaped interpolation 196s does not register an offense for a @-escaped cvar interpolation 196s does not register an offense for a newline 196s does not register an offense for a @-escaped ivar interpolation 196s with a %(...) literal 196s behaves like a literal with interpolation 196s does not register an offense for an escaped gvar interpolation 196s does not register an offense for a bracket-escaped interpolation 196s does not register an offense for multiple unicode escapes 196s does not register an offense for an escaped interpolation 196s registers an offense and corrects an escaped } when escaping both brackets to avoid interpolation 196s registers an offense and corrects an escaped # at end-of-string 196s does not register an offense for an ascii DEL 196s registers an offense and corrects an escaped double quote 196s does not register an offense for a technically-unnecessary escape 196s does not register an offense for meta control characters 196s does not register an offense for an escaped delimiter before interpolation 196s does not register an offense for control characters 196s registers an offense and corrects an escaped single quote 196s does not register an offense for a @-escaped ivar interpolation 196s does not register an offense for a meta character 196s does not register an offense for an escaped ivar interpolation 196s does not register an offense for an octal escape 196s does not register an offense without escapes 196s does not register an offense for a hex escape 196s registers an offense and corrects an escaped # without following { 196s registers an offense and corrects a escaped nested delimiter in a double quoted string 196s does not register an offense for a @-escaped cvar interpolation 196s does not register a bracket-escaped lvar interpolation 196s registers an offense and corrects an escaped # before interpolation 196s does not register an offense for a $-escaped gvar interpolation 196s does not register an offense for an escaped newline 196s does not register an offense for an escaped backslash 196s does not register an offense for an escaped delimiter 196s does not register an offense for an escaped # followed { 196s does not register an offense for an escaped cvar interpolation 196s does not register an offense for a newline 196s does not register an offense for a unicode escape 196s 196s RuboCop::Cop::Style::EachWithObject 196s ignores inject and reduce with passed in, but not returned hash 196s ignores inject and reduce with empty body 196s correctly autocorrects with return value only 196s ignores inject and reduce passed in symbol 196s ignores inject/reduce with assignment to accumulator param in block 196s ignores inject and reduce with condition as body 196s correctly autocorrects 196s does not blow up for reduce with no arguments 196s finds inject and reduce with passed in and returned hash 196s Ruby 2.7 196s finds inject and reduce with passed in and returned hash and numblock 196s when a simple literal is passed as initial value 196s ignores inject/reduce 196s 196s RuboCop::Cop::Style::ParallelAssignment 196s corrects parallel assignment inside rescue statements within method definitions 196s corrects when using parallel assignment in singleton method 196s registers an offense with indices and attributes when assignments must be reordered to preserve meaning 196s registers an offense when left hand side ends with an implicit variable 196s corrects when the expression uses a modifier rescue statement 196s corrects parallel assignment in until statements 196s corrects when using single indentation 196s allows more right variables than left variables 196s registers an offense with indices of different variables 196s registers an offense with indices 196s corrects parallel assignment in while statements 196s registers an offense when the right side has methods with/without blocks 196s corrects when the expression uses a modifier rescue statement as the only thing inside of a method 196s corrects parallel assignment in unless statements 196s corrects when the expression uses a modifier if statement 196s corrects when the expression uses a modifier if statement inside a method 196s corrects when assigning from multiple methods with blocks 196s registers an offense when assignments must be reordered to preserve meaning 196s allows more left variables than right variables 196s corrects when using constants 196s corrects when assigning to method returns 196s corrects parallel assignment in if statements 196s corrects when the right variable is a symbol array 196s corrects when the expression uses a modifier while statement 196s registers an offense with attributes when assignments must be reordered to preserve meaning 196s corrects when the right variable is a word array 196s corrects when assignments must be reordered to avoid changing meaning 196s corrects when the expression is missing spaces 196s registers an offense when the right side has mulitiple arrays 196s registers an offense when assigning to namespaced constants 196s corrects parallel assignment in rescue statements within begin ... rescue 196s corrects when the expression uses a modifier until statement 196s registers an offense when right hand side has maps with blocks 196s corrects when the expression uses a modifier rescue statement inside of a method 196s registers an offense when the right side has constants 196s registers an offense when the right side has mixed expressions 196s registers an offense when the right side has multiple hashes 196s corrects when using nested indentation 196s registers an offense when assigning to same variables in same order 196s corrects when the right variable is an array 196s corrects when the expression uses a modifier unless statement 196s registers an offense when right hand side has namespaced constants 196s corrects when the number of left hand variables matches the number of right hand variables 196s allows expanding an assigned var 196s behaves like allowed 196s allows assignment of: a, = 1 196s behaves like allowed 196s allows assignment of: a, b, c = *node, 1, 2 196s behaves like allowed 196s allows assignment of: a, = a 196s behaves like allowed 196s allows assignment of: CONSTANT, = 1, 2 196s behaves like allowed 196s allows assignment of: self.a, self.b = self.b, self.a 196s behaves like allowed 196s allows assignment of: foo = [1, 2, 3]; a, b, c = foo; 196s behaves like allowed 196s allows assignment of: a[0], a[1] = a[1], a[0] 196s behaves like allowed 196s allows assignment of: a, b = foo.map { |e| e.id } 196s behaves like allowed 196s allows assignment of: self.a, self.b = b, a 196s behaves like allowed 196s allows assignment of: a, *b = [1, 2, 3] 196s behaves like allowed 196s allows assignment of: a, b = (a + b), (a - b) 196s behaves like allowed 196s allows assignment of: *a, b = [1, 2, 3] 196s behaves like allowed 196s allows assignment of: a = 1 196s behaves like allowed 196s allows assignment of: a, b, c = b, c, a 196s behaves like allowed 196s allows assignment of: obj.attr1, obj.attr2 = obj.attr2, obj.attr1 196s behaves like allowed 196s allows assignment of: a = a 196s behaves like allowed 196s allows assignment of: a, b = *foo 196s behaves like allowed 196s allows assignment of: a = 1; b = 2; 196s behaves like allowed 196s allows assignment of: a, = 1, 2, 3 196s behaves like allowed 196s allows assignment of: a = *'foo' 196s behaves like allowed 196s allows assignment of: a, = *'foo' 196s behaves like allowed 196s allows assignment of: a, b = foo() 196s behaves like allowed 196s allows assignment of: a, b = b, a 196s behaves like allowed 196s allows assignment of: begin_token, end_token = CONSTANT 196s behaves like allowed 196s allows assignment of: ary[0], ary[1], ary[2] = ary[1], ary[2], ary[0] 196s behaves like allowed 196s allows assignment of: obj.attr1, ary[0] = ary[0], obj.attr1 196s behaves like allowed 196s allows assignment of: a, b = Float::INFINITY 196s behaves like allowed 196s allows assignment of: array = [1, 2, 3]; a, = array; 196s behaves like allowed 196s allows assignment of: a, b, c = 1, 2, *node 196s behaves like allowed 196s allows assignment of: a, = *foo 196s using custom indentation width 196s works with rescue 196s works with nesting 196s works with guard clauses 196s works with standard correction 196s 196s RuboCop::Cop::Style::Documentation 196s does not raise an error for an implicit match conditional 196s accepts non-empty class with annotation comment followed by other comment 196s accepts empty class without documentation 196s registers an offense for compact-style nested module 196s registers an offense for non-empty class 196s does not consider comment followed by empty line to be class documentation 196s accepts namespace module without documentation 196s registers an offense if the comment line contains code 196s accepts non-empty class with comment that ends with an annotation 196s registers an offense for non-empty class with encoding comment 196s registers an offense for non-empty class with directive comment 196s accepts namespace class without documentation 196s registers an offense for non-namespace 196s registers an offense for empty module without documentation 196s accepts namespace class which defines constants 196s registers offense for non-empty class with frozen string comment 196s registers an offense for a deeply nested class 196s accepts namespace module which defines constants 196s registers an offense for non-empty cbase class 196s registers an offense for compact-style nested class 196s registers an offense for non-empty class with annotation comment 196s accepts non-empty module with documentation 196s accepts non-empty class with documentation 196s sparse and trailing comments 196s ignores comments after module node end 196s ignores sparse comments inside module node 196s ignores comments after class node end 196s ignores sparse comments inside class node 196s without documentation 196s macro-only class 196s does not register offense with multiple macros 196s does not register offense with single macro 196s registers offense for macro with other methods 196s with non-empty class 196s with constants visibility declaration content 196s does not register an offense 196s with non-empty module 196s with constants visibility declaration content 196s does not register an offense 196s with # :nodoc: 196s accepts compact-style nested module without documentation 196s registers an offense for nested class without documentation 196s accepts non-namespace class without documentation 196s accepts non-namespace module without documentation 196s accepts compact-style nested class without documentation 196s registers an offense for nested module without documentation 196s on a subclass 196s accepts non-namespace subclass without documentation 196s registers an offense for nested subclass without documentation 196s with `all` modifier 196s accepts nested subclass without documentation 196s when AllowedConstants is configured 196s ignores the constants in the config 196s with `all` modifier 196s accepts nested module without documentation 196s with `all` modifier 196s accepts nested class without documentation 196s 196s RuboCop::Cop::Layout::MultilineMethodCallIndentation 196s when EnforcedStyle is indented 196s accepts any indentation of method parameters 196s accepts alignment inside a grouped expression 196s accepts no extra indentation of third line 196s registers an offense and corrects the emacs ruby-mode 1.1 indentation of an expression in an array 196s accepts indentation of assignment to obj.a[:key] with newline after = 196s accepts indented methods in unless body 196s accepts indented methods in if condition 196s accepts correctly indented methods in operation 196s accepts indentation of assignment to a with rhs on same line 196s accepts normal indentation of method parameters 196s accepts indented methods in while body 196s registers an offense and corrects 3 spaces indentation of 2nd line 196s registers an offense and corrects one space indentation of 2nd line 196s registers an offense and corrects aligned operators in assignment 196s registers an offense for a 2 space indentation of until condition 196s doesn't crash on unaligned multiline lambdas 196s registers an offense and corrects correct + unrecognized style 196s accepts special indentation of return if condition 196s accepts indented methods in if body 196s accepts alignment of method with assignment and operator-like method 196s accepts double indentation of unless condition 196s accepts special indentation of return unless condition 196s registers an offense and corrects 1 space indentation of 3rd line 196s accepts indented methods in LHS of []= assignment 196s registers an offense and corrects no indentation of second line 196s accepts indentation of assignment to a[:key] with rhs on same line 196s accepts special indentation of for expression 196s accepts double indentation of until condition 196s accepts indented methods in for body 196s registers an offense and corrects aligned methods in if condition 196s accepts double indentation of if condition 196s accepts any indentation of parameters to #[] 196s registers an offense and corrects extra indentation of third line 196s accepts indented methods inside and outside a block 196s registers an offense and corrects proc call without a selector 196s accepts indented methods in until body 196s registers an offense and corrects 0 space indentation inside square brackets 196s accepts indented methods in ordinary statement 196s accepts indentation of assignment to a[:key] with newline after = 196s accepts double indentation of while condition 196s registers an offense for a 2 space indentation of unless condition 196s registers an offense for a 2 space indentation of while condition 196s accepts indentation of assignment to a with newline after = 196s registers an offense and corrects extra indentation of 3rd line in typical RSpec code 196s registers an offense and corrects wrong indentation of for expression 196s doesn't fail on unary operators 196s accepts indentation of assignment to obj.a with newline after = 196s registers an offense for a 2 space indentation of if condition 196s accepts an expression where the first method spans multiple lines 196s accepts indentation relative to first receiver 196s accepts normal indentation inside grouped expression 196s accepts even indentation of consecutive lines in typical RSpec code 196s when indentation width is overridden for this cop 196s registers an offense for a 4 space indentation of while condition 196s accepts indentation of while condition which is offset by a single normal indentation step 196s accepts indented methods in until body 196s accepts indentation of unless condition which is offset by a single normal indentation step 196s accepts correctly indented methods in operation 196s registers an offense for a 4 space indentation of if condition 196s accepts indentation of if condition which is offset by a single normal indentation step 196s accepts indented methods in while body 196s registers an offense for a 4 space indentation of unless condition 196s accepts indented methods 196s accepts indented methods in if condition 196s accepts indented methods in if body 196s accepts indentation of assignment 196s registers an offense for a 4 space indentation of until condition 196s accepts indented methods in unless body 196s accepts indentation of until condition which is offset by a single normal indentation step 196s for possible semantic alignment 196s accepts indented methods 196s when EnforcedStyle is aligned 196s doesn't crash on unaligned multiline lambdas 196s accepts indented methods in ordinary statement 196s accepts indented and aligned methods in binary operation 197s registers an offense and corrects one space indentation of 2nd line 197s accepts alignment inside a grouped expression 197s does not check binary operations when string wrapped with backslash 197s registers an offense and corrects 3 spaces indentation of 2nd line 197s accepts aligned method in assignment + block + assignment 197s accepts aligned methods in operator assignment 197s accepts alignment of method with assignment and operator-like method 197s registers an offense and corrects misaligned methods in local variable assignment 197s registers an offense and corrects misaligned method in []= call 197s doesn't fail on unary operators 197s accepts aligned methods in constant assignment 197s accepts correctly aligned methods in assignment 197s accepts aligned methods in a begin..end block 197s accepts an expression where the first method spans multiple lines 197s registers an offense and corrects misaligned methods in if condition 197s registers an offense and corrects no indentation of second line 197s accepts aligned methods in assignment 197s accepts aligned methods in if + assignment 197s accepts even indentation of consecutive lines in typical RSpec code 197s registers an offense and corrects misaligned methods in while condition 197s accepts indented method when there is nothing to align with 197s accepts indented methods in LHS of []= assignment 197s registers an offense and corrects extra indentation of 3rd line in typical RSpec code 197s registers an offense and corrects one space indentation of 3rd line 197s does not check binary operations when string wrapped with + 197s registers an offense and corrects the emacs ruby-mode 1.1 indentation of an expression in an array 197s accepts indented methods inside and outside a block 197s accepts correctly aligned methods in operands 197s registers an offense and corrects extra indentation of third line 197s accepts indentation relative to first receiver 197s accepts any indentation of parameters to #[] 197s accepts aligned method in return 197s accepts no extra indentation of third line 197s registers an offense and corrects unaligned methods in assignment 197s accepts indented methods in for body 197s accepts aligned methods in if condition 197s registers an offense and corrects misaligned methods in until condition 197s registers an offense and corrects misaligned methods in unless condition 197s registers an offense and corrects proc call without a selector 197s for semantic alignment 197s registers an offense and corrects unaligned method in block body 197s accepts aligned method even when an aref is in the chain 197s accepts nested method calls 197s accepts methods being aligned with method that is an argument in assignment 197s doesn't fail on a chain of aref calls 197s accepts 3 aligned methods 197s accepts aligned method with blocks in operation assignment 197s accepts aligned method even when an aref is first in the chain 197s accepts methods being aligned with method that is an argument 197s accepts method being aligned with method 197s accepts key access to hash 197s registers an offense and corrects unaligned methods 197s accepts method being aligned with method in assignment 197s >= Ruby 2.7 197s accepts methods being aligned with method that is an argumentwhen using numbered parameter 197s when EnforcedStyle is indented_relative_to_receiver 197s accepts no extra indentation of third line 197s accepts indented methods in LHS of []= assignment 197s accepts correctly indented methods in operation 197s does not register an offense when multiline method chain has expected indent width and the method is preceded by splat 197s accepts indented methods in for body 197s accepts alignment of method with assignment and operator-like method 197s accepts indentation of consecutive lines in typical RSpec code 197s accepts an expression where the first method spans multiple lines 197s registers an offense and corrects proc call without a selector 197s registers an offense and corrects extra indentation of 3rd line in typical RSpec code 197s accepts any indentation of parameters to #[] 197s registers an offense and corrects no indentation of second line 197s accepts indentation relative to first receiver 197s accepts alignment inside a grouped expression 197s registers an offense and corrects 3 spaces indentation of second line 197s doesn't fail on unary operators 197s accepts indented methods inside and outside a block 197s registers an offense and corrects the emacs ruby-mode 1.1 indentation of an expression in an array 197s registers an offense and corrects one space indentation of 2nd line 197s accepts indented methods in ordinary statement 197s registers an offense and corrects extra indentation of 3rd line 197s does not register an offense when multiline method chain has expected indent width and the method is preceded by double splat 197s doesn't crash on unaligned multiline lambdas 197s for possible semantic alignment 197s accepts indented methods 197s 197s RuboCop::Runner 197s #run 197s if -s/--stdin is used with an offense 197s sends the offense to a formatter 197s returns false 197s if a cop crashes 197s does not call ResultCache#save 197s if there are no offenses in inspected files 197s returns true 197s if there is an offense in an inspected file 197s returns false 197s sends the offense to a formatter 197s #run with cops autocorrecting each-other 197s with two conflicting cops 197s if there is an offense in an inspected file 197s aborts because of an infinite loop 197s if there are multiple offenses in an inspected file 197s aborts because of an infinite loop 197s with two pairs of conflicting cops 197s with display options 197s --display-only-correctable 197s returns false 197s ommits uncorrectable `Layout/LineLength` 197s --display-only-safe-correctable 197s returns false 197s ommits unsafe correctable `Style/FrozenStringLiteral` 197s if there is an offense in an inspected file 197s aborts because of an infinite loop 197s with three cop cycle 197s if there is an offense in an inspected file 197s aborts because of an infinite loop 197s #run when interrupted 197s with SIGINT 197s returns false 197s 197s RuboCop::Cop::Style::HashLikeCase 197s MinBranchesCount: 3 197s does not register an offense when branches count is less than required 197s MinBranchesCount: 2 197s does not register an offense when using `case-when` with literal bodies of different types 198s registers an offense when using `case-when` with string conditions and literal bodies of the same type 198s does not register an offense when using `case-when` with non-literal bodies 198s does not register an offense when using `case-when` with non-literals in conditions 198s does not register an offense when using `case-when` with literals of different types as conditions 198s registers an offense when using `case-when` with symbol conditions and literal bodies of the same type 198s does not register an offense when `case` has an `else` branch 198s 198s RuboCop::Cop::Metrics::MethodLength 198s does not count blank lines 198s properly counts lines when method ends with block 198s accepts empty methods 198s is not fooled by one-liner methods, syntax #1 198s is not fooled by one-liner methods, syntax #2 198s accepts a method with multiline arguments and less than 5 lines of body 198s accepts a method with less than 5 lines 198s does not count commented lines by default 198s when methods to allow are defined 198s AllowedMethods is enabled 198s accepts the foo method with more than 5 lines 198s still rejects other methods with more than 5 lines 198s AllowedPatterns is enabled 198s accepts the user_name method 198s raises offense for firstname 198s when using numbered parameter 198s when method is defined with `define_method` 198s registers an offense 198s when method is defined on a singleton class 198s registers an offense 198s when `CountAsOne` is not empty 198s folds array into one line 198s when method is a class method 198s registers an offense 198s when method is defined with `define_method` 198s registers an offense 198s when method is an instance method 198s registers an offense 198s when CountComments is enabled 198s also counts commented lines 198s 198s RuboCop::Config 198s #file_to_exclude? 198s when the passed path matches any of patterns to exclude 198s returns true 198s when the passed path does not match any of patterns to exclude 198s returns false 198s #for_department 198s accepts a Symbol 198s always returns the department's config 198s #make_excludes_absolute 198s when config is in subdirectory 198s generates valid absolute directory 198s when config is in root directory 198s generates valid absolute directory 198s #file_to_include? 198s when the passed path does not match any of patterns to include 198s returns false 198s when the passed path matches any of patterns to include 198s returns true 198s #patterns_to_include 198s when config file has AllCops => Include key 198s returns the Include value 198s #possibly_include_hidden? 198s returns true when Include config includes a regex 198s returns true when Include config only includes regular paths 198s returns true when Include config includes a toplevel dotfile 198s returns true when Include config includes a dotfile in a path 198s #check 198s when a deprecated configuration is detected 198s prints a warning message for the loaded path 198s #deprecation_check 198s when there is no AllCops configuration 198s does not yield 198s when there is AllCops configuration 198s if there are no Excludes or Includes keys 198s does not yield 198s if there are is an Includes key 198s yields 198s if there are is an Excludes key 198s yields 198s #validate 198s when the configuration includes a valid enforced style 198s does not raise validation error 198s when the configuration includes any unrecognized cop name 198s raises an validation error 198s when the configuration includes multiple invalid enforced styles 198s raises validation error 198s when the configuration includes an empty section 198s raises validation error 198s when the configuration includes multiple valid enforced styles 198s does not raise validation error 198s when the configuration includes an obsolete cop 198s raises validation error 198s when the configuration includes Lint/Syntax cop 198s when the configuration does not match the default 198s raises validation error 198s when the configuration matches the default 198s does not raise validation error 198s when the empty section is AllCops 198s raises validation error 198s when the configuration includes the obsolete Style/WhileUntilModifier: MaxLineLength parameter 198s raises validation error 198s when the configuration includes an invalid EnforcedStyle 198s raises validation error 198s when the configuration includes multiple but config does not allow 198s raises validation error 198s when the configuration includes the obsolete Style/IfUnlessModifier: MaxLineLength parameter 198s raises validation error 198s when the configuration includes multiple valid enforced styles and one invalid style 198s raises validation error 198s conflicting Safe settings 198s when the configuration includes an unsafe cop that is explicitly declared to have a safe autocorrection 198s raises validation error 198s when the configuration includes an unsafe cop without a declaration of its autocorrection 198s does not raise validation error 198s when the configuration includes an obsolete EnforcedStyle parameter 198s raises validation error 198s when all cops are both Enabled and Disabled by default 198s raises validation error 198s when the configuration includes any common parameter 198s does not raise validation error 198s when the configuration includes any unrecognized parameter 198s prints a warning message 198s when the configuration includes an invalid enforced style 198s raises validation error 198s when the configuration is in the base RuboCop config folder 198s is not validated 198s when the configuration includes a valid EnforcedStyle 198s does not raise validation error 198s when the configuration includes obsolete parameters and cops 198s raises validation error 198s when the configuration includes an obsolete parameter 198s raises validation error 198s when the configuration includes any unrecognized cop name and given `--ignore-unrecognized-cops` option 198s there is unrecognized cop 198s prints a warning about the cop 198s there are no unrecognized cops 198s does not print any warnings 198s #patterns_to_exclude 198s when config file has AllCops => Exclude key 198s returns the Exclude value 198s #for_badge 198s takes into account the department 198s works if department has no config 198s #allowed_camel_case_file? 198s when the passed path does not match allowed camel case patterns to include 198s is expected to equal false 198s when the passed path matches allowed camel case patterns to include 198s is expected to equal true 198s when the passed path is a gemspec 198s is expected to equal true 198s whether the cop is enabled 198s when an nested cop department is disabled 198s and an individual cop is not specified 198s the cop setting overrides the department 198s but an individual cop is enabled 198s the cop setting overrides the department 198s when an entire cop department is enabled 198s but an individual cop is disabled 198s still disables the cop 198s when an entire cop department is disabled 198s but an individual cop is enabled 198s the cop setting overrides the department 198s when configuration has no mention of a cop 198s enables the cop that is not mentioned 198s when all cops are explicitly enabled by default 198s enables the cop that is not mentioned 198s when all cops are disabled by default 198s disables the cop that is not mentioned 198s when a cop has configuration but no explicit Enabled setting 198s enables the cop by default 198s 198s RuboCop::Cop::Style::BeginBlock 198s reports an offense for a BEGIN block 198s 198s RuboCop::Cop::Naming::FileName 198s with non-snake-case file names with a shebang 198s does not register an offense 198s when IgnoreExecutableScripts is disabled 198s registers an offense 198s with snake_case file names with non-rb extension 198s does not register an offense 198s with snake_case file names without file extension 198s does not register an offense 198s with snake_case names which use ? and ! 198s does not register an offense 198s with camelCase file names ending in .rb 198s registers an offense 198s with non-ascii characters in filename 198s does not register an offense 198s with acronym namespace 198s does not register an offense 198s with include acronym name 198s does not register an offense 198s with dotfiles 198s does not register an offense 198s when Regex is set 198s with a matching name 198s does not register an offense 198s with a non-matching name 198s registers an offense 198s when the file is specified in AllCops/Include 198s with a non-snake_case file name 198s does not register an offense 198s when ExpectMatchingDefinition is true 198s on a file which defines a nested class 198s in a matching directory under src 198s does not register an offense 198s in a directory elsewhere which only matches the module name 198s does not register an offense 198s in a directory elsewhere which does not match the module name 198s registers an offense 198s in a non-matching directory under test 198s registers an offense 198s in a non-matching directory under lib 198s registers an offense 198s in a non-matching directory under spec 198s registers an offense 198s in a matching directory under lib 198s does not register an offense 198s in a directory with multiple instances of spec 198s does not register an offense 198s in a directory with multiple instances of test 198s does not register an offense 198s in a matching directory under test 198s does not register an offense 198s in a directory with multiple instances of lib 198s does not register an offense 198s in a non-matching directory under src 198s registers an offense 198s in a matching directory under spec 198s does not register an offense 198s in a directory with multiple instances of src 198s does not register an offense 198s on a file which defines no class or module at all 198s under spec 198s registers an offense 198s under test 198s registers an offense 198s under src 198s registers an offense 198s under some other random directory 198s registers an offense 198s under lib 198s registers an offense 198s under lib when not added to root 198s registers an offense 198s on a file which defines a nested module 198s in a matching directory under spec 198s does not register an offense 198s in a directory with multiple instances of lib 198s does not register an offense 198s in a non-matching directory under test 198s registers an offense 198s in a non-matching directory under lib 198s registers an offense 198s in a non-matching directory under src 198s registers an offense 198s in a matching directory under src 198s does not register an offense 198s in a matching directory under test 198s does not register an offense 198s in a directory with multiple instances of src 198s does not register an offense 198s in a non-matching directory under spec 198s registers an offense 198s in a directory with multiple instances of spec 198s does not register an offense 198s in a directory elsewhere which does not match the module name 198s registers an offense 198s in a directory with multiple instances of test 198s does not register an offense 198s in a matching directory under lib 198s does not register an offense 198s in a directory elsewhere which only matches the module name 198s does not register an offense 198s on a file which defines multiple classes 198s in a non-matching directory under spec 198s registers an offense 198s in a non-matching directory under test 198s registers an offense 198s in a matching directory under test 198s does not register an offense 198s in a matching directory under spec 198s does not register an offense 198s in a matching directory under lib 198s does not register an offense 198s in a directory with multiple instances of spec 198s does not register an offense 198s in a directory elsewhere which only matches the module name 198s does not register an offense 198s in a directory elsewhere which does not match the module name 198s registers an offense 198s in a non-matching directory under lib 198s registers an offense 198s in a matching directory under src 198s does not register an offense 198s in a directory with multiple instances of src 198s does not register an offense 198s in a directory with multiple instances of test 198s does not register an offense 198s in a directory with multiple instances of lib 198s does not register an offense 198s in a non-matching directory under src 198s registers an offense 198s on an empty file with a space in its filename 198s registers an offense 198s on a file which defines a Struct without a block 198s in a directory with multiple instances of src 198s does not register an offense 198s in a directory with multiple instances of test 198s does not register an offense 198s in a non-matching directory under spec 198s registers an offense 198s in a non-matching directory under test 198s registers an offense 198s in a matching directory under spec 198s does not register an offense 198s in a directory elsewhere which only matches the module name 198s does not register an offense 198s in a directory with multiple instances of lib 198s does not register an offense 198s in a non-matching directory under src 198s registers an offense 198s in a directory elsewhere which does not match the module name 198s registers an offense 198s in a matching directory under src 198s does not register an offense 198s in a directory with multiple instances of spec 198s does not register an offense 198s in a matching directory under test 198s does not register an offense 198s in a matching directory under lib 198s does not register an offense 198s in a non-matching directory under lib 198s registers an offense 198s on a file which uses Name::Spaced::Module syntax 198s in a matching directory under spec 198s does not register an offense 198s in a directory with multiple instances of src 198s does not register an offense 198s in a directory elsewhere which does not match the module name 198s registers an offense 198s in a matching directory under test 198s does not register an offense 198s in a directory with multiple instances of spec 198s does not register an offense 198s in a non-matching directory under src 198s registers an offense 198s in a non-matching directory under lib 198s registers an offense 198s in a directory with multiple instances of test 198s does not register an offense 198s in a directory with multiple instances of lib 198s does not register an offense 198s in a non-matching directory under spec 198s registers an offense 198s in a non-matching directory under test 198s registers an offense 198s in a directory elsewhere which only matches the module name 198s does not register an offense 198s in a matching directory under lib 198s does not register an offense 198s in a matching directory under src 198s does not register an offense 198s on a file which defines a Struct with a block 198s in a matching directory under spec 198s does not register an offense 198s in a directory with multiple instances of spec 198s does not register an offense 198s in a matching directory under lib 198s does not register an offense 198s in a directory with multiple instances of src 198s does not register an offense 198s in a non-matching directory under lib 198s registers an offense 198s in a directory with multiple instances of lib 198s does not register an offense 198s in a directory with multiple instances of test 198s does not register an offense 198s in a directory elsewhere which only matches the module name 198s does not register an offense 198s in a directory elsewhere which does not match the module name 198s registers an offense 198s in a non-matching directory under src 198s registers an offense 198s in a non-matching directory under test 198s registers an offense 198s in a non-matching directory under spec 198s registers an offense 198s in a matching directory under src 198s does not register an offense 198s in a matching directory under test 198s does not register an offense 198s on an empty file 198s registers an offense 198s with snake_case file names with multiple extensions 198s does not register an offense 198s when CheckDefinitionPathHierarchy is false 198s with a matching module containing a non-matching struct 198s does not register an offense 198s with a non-matching module containing a matching struct 198s does not register an offense 198s on an empty file 198s registers an offense 198s in a non-matching directory, but with a matching class 198s does not register an offense 198s with a non-matching module containing a matching class 198s does not register an offense 198s on a file with a non-matching struct 198s registers an offense 198s on a file with a matching struct 198s does not register an offense 198s on a file with a matching class 198s does not register an offense 198s on a file with a non-matching class 198s registers an offense 198s with a matching module containing a non-matching class 198s does not register an offense 198s with camelCase file names without file extension 198s registers an offense 198s with snake_case file names ending in .rb 198s does not register an offense 198s with snake_case names which use + 198s does not register an offense 198s with acronym class name 198s does not register an offense 198s 198s RuboCop::Cop::Layout::FirstMethodParameterLineBreak 199s registers an offense and corrects params listed on the first line 199s registers an offense and corrects params with default values 199s registers an offense and corrects params on first line of singleton method 199s accepts methods without params 199s accepts single-line methods 199s accepts params listed on a single line 199s accepts params without parens 199s 199s RuboCop::Cop::Lint::AmbiguousRegexpLiteral 199s Ruby <= 2.7 199s with `match_with_lvasgn` node 199s without parentheses 199s registers an offense and corrects 199s with parentheses 199s does not register an offense 199s with different parentheses 199s does not register an offense 199s with parentheses 199s accepts 199s without parentheses 199s registers an offense and corrects when sending method without receiver takes a regexp argument 199s registers an offense and corrects when sending method to regexp without argument 199s registers an offense and corrects when sending method chain to regexp 199s registers an offense and corrects when using block argument 199s registers an offense and corrects when multiple arguments 199s registers an offense and corrects when using regexp without method call in a nested structure 199s registers an offense and corrects when sending method to regexp with argument 199s registers an offense and corrects when using nested method arguments without parentheses 199s registers an offense and corrects when nesting 199s registers an offense and corrects when single argument 199s registers an offense and corrects when sending method inside parens without receiver takes a regexp argument 199s Ruby >= 3.0 199s with parentheses 199s accepts 199s without parentheses 199s registers an offense and corrects when using regexp without method call in a nested structure 199s registers an offense and corrects when sending method without receiver takes a regexp argument 199s registers an offense and corrects when using block argument 199s registers an offense and corrects when nesting 199s registers an offense and corrects when sending method to regexp without argument 199s registers an offense and corrects when multiple arguments 199s registers an offense and corrects when using nested method arguments without parentheses 199s registers an offense and corrects when single argument 199s registers an offense and corrects when sending method chain to regexp 199s registers an offense and corrects when sending method to regexp with argument 199s registers an offense and corrects when sending method inside parens without receiver takes a regexp argument 199s with `match_with_lvasgn` node 199s without parentheses 199s registers an offense and corrects 199s with parentheses 199s does not register an offense 199s with different parentheses 199s does not register an offense 199s 199s RuboCop::Cop::Lint::PercentStringArray 199s with binary encoded source 199s adds an offense and corrects when tokens contain quotes 199s accepts if tokens contain no quotes 199s with invalid byte sequence in UTF-8 199s accepts if tokens contain invalid byte sequence only 199s add an offense and corrects when tokens contain quotes 199s detecting quotes or commas in a %w/%W string 199s adds an offense and corrects when tokens contain quotes and are comma separated 199s accepts likely false positive :"#{a}" 199s accepts likely false positive %W(#{a} b) 199s accepts likely false positive :"#{a}" 199s adds an offense and corrects when there are no quotes but one comma 199s accepts tokens without quotes or commas 199s adds an offense and corrects when tokens contain both types of quotes 199s adds an offense and corrects when tokens contain both types of quotes 199s accepts likely false positive %w(' ") 199s adds an offense and corrects when tokens contain quotes and are comma separated 199s accepts likely false positive %w(#{a} b) 199s accepts tokens without quotes or commas 199s adds an offense and corrects when one token is quoted but there are no commas 199s accepts likely false positive %w(' " ! = # ,) 199s accepts likely false positive %W(' " ! = # ,) 199s accepts likely false positive %W(' ") 199s adds an offense and corrects when one token is quoted but there are no commas 199s adds an offense and corrects when there are no quotes but one comma 199s 199s RuboCop::Cop::Team 199s #forces 199s returns force instances 199s when multiple cops joined a same force 199s returns only one force instance 199s when a cop joined a force 199s returns the force 199s when no cops joined force 199s returns nothing 199s when incompatible cops are correcting together 199s autocorrects without SyntaxError 199s #external_dependency_checksum 199s does not error with no cops 199s when cop with different checksum joins 200s has a different checksum for the whole team 200s when multiple cops join 200s returns string 200s when a cop joins 200s returns string 200s #inspect_file 200s returns offenses 200s when autocorrection is enabled 200s does autocorrection 200s still returns offenses 200s when autocorrection is enabled and file encoding is mismatch 200s no error occurs 200s when a correction raises an error 200s records Team#errors 200s when done twice 200s allows cops to get ready 200s when Parser reports non-fatal warning for the file 200s returns offenses from cops 201s returns Parser warning offenses 201s when a cop has no interest in the file 201s returns all offenses except the ones of the cop 201s when Cop#on_* raises an error 201s records Team#errors 201s .new 201s calls mobilize when passed classes 201s accepts cops directly classes 201s #debug? 201s when the option argument of .new is omitted 201s is expected to be falsey 201s when { debug: true } is passed to .new 201s is expected to be truthy 201s #cops 201s returns cop instances 201s when some classes are disabled with config 201s does not return instances of the classes 201s when only some cop classes are passed to .new 202s returns only instances of the classes 202s #autocorrect? 202s when the option argument of .new is omitted 202s is expected to be falsey 202s when { autocorrect: true } is passed to .new 202s is expected to be truthy 202s 202s RuboCop::Cop::Lint::BooleanSymbol 202s registers an offense when using `:false` 202s registers an offense when using `:true` 202s does not register an offense when used inside percent-literal symbol array 202s does not register an offense when using `false` 202s does not register an offense when using `true` 202s does not register an offense when using regular symbol 202s when using the new hash syntax 202s registers an offense when using `false:` 202s registers an offense when using `key: :false` 202s registers an offense when using `true:` 202s 202s RuboCop::Cop::Style::StringHashKeys 202s does not register an offense when string key is used in IO.popen 202s does not register an offense when string key is used in Open3.capture3 202s does not register an offense when string key is used in gsub 202s registers an offense when using strings as keys 202s does not register an offense when string key is used in Open3.pipeline 202s does not register an offense when string key is used in gsub! 202s does not register an offense when not using strings as keys 202s registers an offense when using strings as keys mixed with other keys 202s autocorrects strings as keys into symbols with the correct syntax 202s 202s RuboCop::Cop::Layout::EmptyLineAfterMultilineCondition 202s does not register an offense for `rescue` with singleline exceptions 202s does not register an offense for `if` with single line condition 202s registers an offense when no new line after `elsif` with multiline condition 202s does not register an offense when modifier `if` with multiline conditionis the last child of its parent 202s does not register an offense when new line after `when` with multiline condition 202s registers an offense when no new line after `if` with multiline condition 202s does not register an offense when new line after modifier `while` with multiline condition 202s does not register an offense for `while` with single line condition 202s does not register an offense when modifier `while` with multiline conditionis the last child of its parent 202s registers an offense when no new line after modifier `while` with multiline condition 202s registers an offense when no new line after `rescue` with multiline exceptions 202s does not register an offense when new line after `if` with multiline condition 202s registers an offense when no new line after `while` with multiline condition 202s registers an offense when no new line after modifier `if` with multiline condition 202s does not register an offense when new line after `elsif` with multiline condition 202s registers an offense when no new line after `when` with multiline condition 202s does not register an offense when new line after `rescue` with multiline exceptions 202s does not register an offense for `when` with singleline condition 202s does not register an offense when new line after `while` with multiline condition 202s does not register an offense when `if` at the top level 202s registers an offense when no new line after `until` with multiline condition 202s does not register an offense when new line after modifier `if` with multiline condition 202s 202s RuboCop::Formatter::TextUtil 202s pluralize 202s will change 0 to no when configured 202s will pluralize quantities greater than 1 202s will pluralize fractions 202s will pluralize -1 202s will pluralize negative quantities less than -1 202s will not change 0 to no 202s will not pluralize 1 202s 202s RuboCop::Cop::Style::TrailingCommaInArrayLiteral 202s with single line list of values 202s when EnforcedStyleForMultiline is consistent_comma 202s accepts single element literal without trailing comma 202s accepts empty literal 202s accepts rescue clause 202s registers an offense for trailing comma 202s accepts literal without trailing comma 202s when EnforcedStyleForMultiline is comma 202s accepts single element literal without trailing comma 202s accepts rescue clause 202s registers an offense for trailing comma 202s accepts literal without trailing comma 202s accepts empty literal 202s when EnforcedStyleForMultiline is no_comma 202s accepts single element literal without trailing comma 202s accepts rescue clause 202s accepts literal without trailing comma 202s accepts empty literal 202s registers an offense for trailing comma 202s with multi-line list of values 202s when EnforcedStyleForMultiline is comma 202s accepts an empty array being passed as a method argument 202s accepts a multiline array with a single item and trailing comma 202s accepts trailing comma 202s accepts literal with two of the values on the same line 202s registers an offense for a literal with two of the values on the same line and a trailing comma 202s accepts a multiline word array 202s when closing bracket is on same line as last value 202s accepts literal with no trailing comma 202s when EnforcedStyleForMultiline is consistent_comma 202s accepts a multiline word array 202s registers an offense for literal with two of the values on the same line and no trailing comma 202s accepts a multiline array with items on a single line andtrailing comma 202s accepts two values on the same line 202s accepts trailing comma 202s accepts a multiline array with a single item and trailing comma 202s when closing bracket is on same line as last value 202s registers an offense for no trailing comma 202s when EnforcedStyleForMultiline is no_comma 202s registers an offense for trailing comma 202s accepts HEREDOC with commas 202s autocorrects unwanted comma where HEREDOC has commas 202s accepts a literal with no trailing comma 202s 202s RuboCop::Cop::Layout::EndAlignment 202s can handle ternary if 202s registers an offense for mismatched case a when b end and autocorrects 202s registers an offense for mismatched if test end and autocorrects 202s accepts matching while ... end 202s registers an offense for mismatched puts 1; class Test end and autocorrects 202s registers an offense for mismatched puts 1; unless test end and autocorrects 202s accepts matching until ... end 202s accepts matching puts 1; if ... end 202s accepts matching class ... end 202s accepts matching module ... end 202s registers an offense for mismatched puts 1; case a when b end and autocorrects 202s registers an offense for mismatched module Test end and autocorrects 202s accepts matching puts 1; class ... end 202s accepts matching puts 1; module ... end 202s accepts matching puts 1; case ... end 202s registers an offense for mismatched until test end and autocorrects 202s registers an offense for mismatched puts 1; until test end and autocorrects 202s accepts matching puts 1; while ... end 202s accepts matching class ... end 202s accepts matching puts 1; unless ... end 202s registers an offense for mismatched while test end and autocorrects 202s registers an offense for mismatched puts 1; class Test end and autocorrects 202s accepts matching if ... end 202s accepts matching puts 1; until ... end 202s registers an offense for mismatched module Test end and autocorrects 202s registers an offense for mismatched puts 1; if test end and autocorrects 202s accepts matching case ... end 202s registers an offense for mismatched puts 1; while test end and autocorrects 202s can handle modifier if 202s registers an offense for mismatched unless test end and autocorrects 202s accepts matching unless ... end 202s case as argument 202s when EnforcedStyleAlignWith is variable 202s registers an offense for mismatched test case a when b end and autocorrects 202s accepts matching test case ... end 202s when EnforcedStyleAlignWith is keyword 202s registers an offense for mismatched test case a when b end and autocorrects 202s accepts matching test case ... end 202s when EnforcedStyleAlignWith is start_of_line 202s registers an offense for mismatched test case a when b end and autocorrects 202s accepts matching test case a when b ... end 202s when end is preceded by something else than whitespace 202s does not register an offense 202s correct + opposite 202s registers an offense and corrects 202s when EnforcedStyleAlignWith is variable 202s registers an offense for mismatched puts 1; case a when b end and autocorrects 202s registers an offense for mismatched puts 1; if test end and autocorrects 202s registers an offense for mismatched puts 1; module Test end and autocorrects 202s accepts matching while ... end 202s registers an offense for mismatched case a when b end and autocorrects 202s accepts matching module ... end 202s registers an offense for mismatched while test end and autocorrects 202s registers an offense for mismatched module Test end and autocorrects 202s register an offense when using `+` operator method and `end` is not aligned 202s registers an offense for mismatched class Test end and autocorrects 202s accepts matching case ... end 202s accepts matching puts 1; class ... end 202s accepts matching if ... end 202s accepts matching puts 1; module ... end 202s accepts matching puts 1; case ... end 202s accepts matching puts 1; unless ... end 202s registers an offense for mismatched until test end and autocorrects 202s registers an offense for mismatched puts 1; class Test end and autocorrects 202s accepts matching unless ... end 202s registers an offense for mismatched unless test end and autocorrects 202s accepts matching class ... end 202s accepts matching puts 1; while ... end 202s registers an offense for mismatched if test end and autocorrects 202s accepts matching puts 1; if ... end 202s registers an offense for mismatched puts 1; while test end and autocorrects 202s registers an offense for mismatched puts 1; until test end and autocorrects 202s register an offense when using a conditional statement in a method argument and `end` is not aligned 202s registers an offense for mismatched puts 1; unless test end and autocorrects 202s register an offense when using `-` operator method and `end` is not aligned 202s accepts matching puts 1; until ... end 202s accepts matching until ... end 202s regarding assignment 202s when EnforcedStyleAlignWith is keyword 202s accepts matching var = case ... end 202s registers an offense for mismatched var << until test end and autocorrects 202s accepts matching var = if ... end 202s accepts matching var = until ... end 202s accepts matching var = unless ... end 202s accepts matching var = while ... end 202s registers an offense for mismatched var = unless test end and autocorrects 202s registers an offense for mismatched var = if test end and autocorrects 202s registers an offense for mismatched var = while test end and autocorrects 202s registers an offense for mismatched var = until test end and autocorrects 202s accepts matching var[0] = case ... end 202s when EnforcedStyleAlignWith is variable 202s accepts matching CNST = if ... end 202s registers an offense for mismatched var += if test end and autocorrects 202s registers an offense for mismatched var = # comment while test end and autocorrects 202s accepts matching h[k] = if ... end 202s registers an offense for mismatched a, b = if test end and autocorrects 202s accepts matching @var = if ... end 202s accepts matching var = until ... end 202s accepts matching var = case ... end 202s registers an offense for mismatched var = until test do_something end and autocorrects 202s registers an offense for mismatched var = if test end and autocorrects 202s accepts matching var += if ... end 202s registers an offense for mismatched var = if test end and autocorrects 202s accepts matching var = if ... end 202s registers an offense for mismatched var = until test end and autocorrects 202s accepts matching a, b = if ... end 202s registers an offense for mismatched var << if test end and autocorrects 202s accepts matching var ||= if ... end 202s registers an offense for mismatched var[x] = while test end and autocorrects 202s accepts matching var = if ... end 202s registers an offense for mismatched var ||= if test end and autocorrects 202s accepts matching var = unless ... end 202s registers an offense for mismatched @var = if test end and autocorrects 202s accepts matching var &&= if ... end 202s registers an offense for mismatched CNST = if test end and autocorrects 202s registers an offense for mismatched var << case a when b end and autocorrects 202s registers an offense for mismatched var = until test end.j and autocorrects 202s registers an offense for mismatched h[k] << if test end and autocorrects 202s accepts matching $var = if ... end 202s accepts matching var << if ... end 202s accepts matching h.k = if ... end 202s registers an offense for mismatched h.k = if test end and autocorrects 202s registers an offense for mismatched @var << if test end and autocorrects 202s registers an offense for mismatched var << unless test end and autocorrects 202s registers an offense for mismatched h[k] = if test end and autocorrects 202s registers an offense for mismatched @@var = if test end and autocorrects 202s registers an offense for mismatched @@var << if test end and autocorrects 202s registers an offense for mismatched CNST << if test end and autocorrects 202s accepts matching var = while ... end 202s registers an offense for mismatched $var = if test end and autocorrects 202s registers an offense for mismatched $var << if test end and autocorrects 202s registers an offense for mismatched var = case a when b end and autocorrects 202s accepts matching var = until ... end 202s registers an offense for mismatched var = unless test end and autocorrects 202s registers an offense for mismatched var = while test end and autocorrects 202s registers an offense for mismatched var << until test end and autocorrects 202s accepts matching var = until ... end 202s registers an offense for mismatched var = unless test end and autocorrects 202s registers an offense for mismatched var &&= if test end and autocorrects 202s accepts matching @@var = if ... end 202s when EnforcedStyleAlignWith is start_of_line 202s accepts matching puts 1; while ... end 202s registers an offense for mismatched var = if test end and autocorrects 202s registers an offense for mismatched puts 1; while test end and autocorrects 202s accepts matching var = if ... end 202s registers an offense for mismatched puts 1; class Test end and autocorrects 202s registers an offense for mismatched puts(if test end) and autocorrects 202s registers an offense for mismatched var << until test end and autocorrects 202s accepts matching var << while ... end 202s accepts matching var = until ... end 202s registers an offense for mismatched puts 1; if test end and autocorrects 202s registers an offense for mismatched module Test end and autocorrects 202s accepts matching var = if ... end 202s registers an offense for mismatched var = if test end and autocorrects 202s registers an offense for mismatched puts 1; module Test end and autocorrects 202s registers an offense for mismatched var << if test end and autocorrects 202s registers an offense for mismatched var << unless test end and autocorrects 202s registers an offense for mismatched var = unless test end and autocorrects 202s accepts matching puts 1; case ... end 202s registers an offense for mismatched puts 1; unless test end and autocorrects 202s registers an offense for mismatched if test end and autocorrects 202s registers an offense for mismatched var << while test end and autocorrects 202s registers an offense for mismatched unless test end and autocorrects 202s registers an offense for mismatched puts 1; until test end and autocorrects 202s accepts matching puts 1; if ... end 202s registers an offense for mismatched while test end and autocorrects 203s registers an offense for mismatched var = case a when b end and autocorrects 203s registers an offense for mismatched var << case a when b end and autocorrects 203s accepts matching puts 1; module ... end 203s accepts matching puts 1; until ... end 203s registers an offense for mismatched var = until test end and autocorrects 203s registers an offense for mismatched var = while test end and autocorrects 203s accepts matching puts 1; unless ... end 203s registers an offense for mismatched class Test end and autocorrects 203s registers an offense for mismatched until test end and autocorrects 203s accepts matching puts 1; class ... end 203s accepts matching var = while ... end 203s accepts matching var = case ... end 203s accepts matching var = unless ... end 203s registers an offense for mismatched puts 1; case a when b end and autocorrects 203s registers an offense for mismatched case a when b end and autocorrects 203s 203s RuboCop::Cop::Style::RedundantRegexpCharacterClass 203s with a character class containing a character requiring escape outside 203s does not register an offense 203s with a character class containing a space meta-character 203s registers an offense and corrects 203s with consecutive escaped square brackets inside a character class 203s does not register an offense 203s with a character class containing a space 203s when not using free-spaced mode 203s registers an offense and corrects 203s with an unnecessary-character-class after a comment 203s registers an offense and corrects 203s when using free-spaced mode 203s with a commented single-element character class 203s does not register an offense 203s with a single space character class 203s does not register an offense with only /x 203s does not register an offense with /iux 203s does not register an offense with /ix 203s with a character class containing an escaped-# 203s registers an offense and corrects 203s with a character class containing an escaped-b 203s does not register an offense 203s with a character class containing escaped character requiring escape outside 203s registers an offense and corrects 203s with a character class containing a negated-space meta-character 203s registers an offense and corrects 203s with an array index inside an interpolation 203s does not register an offense 203s with a redundant character class after an interpolation 203s registers an offense and corrects 203s with a character class containing an escaped ] 203s registers an offense and corrects 203s with a character class containing set intersection 203s does not register an offense 203s with a character class containing a single character before `{n,m}` quantifier 203s registers an offense and corrects 203s with consecutive escaped square brackets 203s does not register an offense 203s with a character class containing an interpolation 203s does not register an offense 203s with a character class containing a single unicode character property 203s registers an offense and corrects 203s with a character class containing a posix bracket expression 203s does not register an offense 203s with a regexp containing invalid g escape 203s registers an offense and corrects 203s with %r{} regexp 203s with a character class containing a single character before `{n,m}` quantifier 203s registers an offense and corrects 203s with multiple character classes containing single characters 203s registers an offense and corrects 203s with a character class containing a single character before `+` quantifier 203s registers an offense and corrects 203s with a character class containing a single character 203s registers an offense and corrects 203s with a character class containing a single character inside a group 203s registers an offense and corrects 203s with multiple character classes containing single characters 203s registers an offense and corrects 203s with a character class containing a single character 203s registers an offense and corrects 203s with a character class containing a single negated unicode character property 203s registers an offense and corrects 203s with a character class containing a negated posix bracket expression 203s does not register an offense 203s with a character class containing an escaped-0 203s does not register an offense (FAILED - 1) 203s with an interpolated unnecessary-character-class regexp 203s registers an offense and corrects 203s with escaped square brackets surrounding a single character 203s does not register an offense 203s with a character class containing a single unicode code-point 203s registers an offense and corrects 203s with a character class containing an unescaped-# 203s registers an offense and corrects 203s with a character class containing an escaped [ 203s registers an offense and corrects 203s with a negated character class with a single element 203s does not register an offense 203s with a multi-line interpolation 203s ignores offenses in the interpolated expression 203s with a character class containing a single range 203s does not register an offense 203s with a character class containing multiple unicode code-points 203s does not register an offense and corrects 203s with a character class with first element an escaped ] 203s does not register an offense 203s with a character class containing two characters 203s does not register an offense 203s with a character class containing a single character before `+` quantifier 203s registers an offense and corrects 203s with a character class containing a single character inside a group 203s registers an offense and corrects 203s 203s RuboCop::Cop::Lint::DuplicateBranch 203s does not register an offense for simple `if` without other branches 203s registers an offense when `if` has multiple duplicate branches 203s does not register an offense when `if` has no duplicate branches 203s does not register an offense when `unless` has no duplicate branches 203s registers an offense when `rescue` has duplicate `resbody` branch 203s does not register an offense for simple `unless` without other branches 203s does not register an offense for empty `if` 203s registers an offense when ternary has duplicate branches 203s does not register an offense when `rescue` has no duplicate branches 203s registers an offense when `if` has duplicate `else` branch 203s does not register an offense for modifier `unless` 203s does not register an offense when ternary has no duplicate branches 203s registers an offense when `case` has duplicate `else` branch 203s does not register an offense for modifier `if` 203s registers an offense when `case` has duplicate `when` branch 203s registers an offense when `unless` has duplicate `else` branch 203s registers an offense when `rescue` has duplicate `else` branch 203s registers an offense when `if` has duplicate `elsif` branch 203s registers an offense when `case` has multiple duplicate branches 203s does not register an offense for empty `unless` 203s registers an offense when `rescue` has multiple duplicate `resbody` branches 203s does not register an offense when `case` has no duplicate branches 203s with IgnoreLiteralBranches: true 203s with `case` 203s behaves like literal case disallowed 203s when returning a dsym in multiple branches 203s registers an offense 203s behaves like literal case allowed 203s when returning a simple irange in multiple branches 203s allows branches to be duplicated 203s behaves like literal case disallowed 203s when returning a complex array in multiple branches 203s registers an offense 203s behaves like literal case allowed 203s when returning a false in multiple branches 203s allows branches to be duplicated 203s and IgnoreConstBranches: true 203s behaves like literal case allowed 203s when returning a hash of constants in multiple branches 203s allows branches to be duplicated 203s behaves like literal case allowed 203s when returning a array of constants in multiple branches 203s allows branches to be duplicated 203s behaves like literal case allowed 203s when returning a integer in multiple branches 203s allows branches to be duplicated 203s behaves like literal case disallowed 203s when returning a complex hash in multiple branches 203s registers an offense 203s behaves like literal case allowed 203s when returning a regexp with modifier in multiple branches 203s allows branches to be duplicated 203s behaves like literal case allowed 203s when returning a hash of literals in multiple branches 203s allows branches to be duplicated 203s behaves like literal case allowed 203s when returning a empty hash in multiple branches 203s allows branches to be duplicated 203s behaves like literal case disallowed 203s when returning a complex regexp in multiple branches 203s registers an offense 203s behaves like literal case allowed 203s when returning a rational in multiple branches 203s allows branches to be duplicated 203s and IgnoreConstBranches: false 203s behaves like literal case disallowed 203s when returning a array of constants in multiple branches 203s registers an offense 203s behaves like literal case disallowed 203s when returning a hash of constants in multiple branches 203s registers an offense 203s behaves like literal case allowed 203s when returning a string in multiple branches 203s allows branches to be duplicated 203s behaves like literal case allowed 203s when returning a complex in multiple branches 203s allows branches to be duplicated 203s behaves like literal case disallowed 203s when returning a complex erange in multiple branches 203s registers an offense 203s behaves like literal case allowed 203s when returning a float in multiple branches 203s allows branches to be duplicated 203s behaves like literal case allowed 203s when returning a array of literals in multiple branches 203s allows branches to be duplicated 203s behaves like literal case allowed 203s when returning a simple erange in multiple branches 203s allows branches to be duplicated 203s behaves like literal case disallowed 203s when returning a method call in multiple branches 203s registers an offense 203s behaves like literal case disallowed 203s when returning a variable in multiple branches 203s registers an offense 203s behaves like literal case allowed 203s when returning a symbol in multiple branches 203s allows branches to be duplicated 203s behaves like literal case allowed 203s when returning a empty array in multiple branches 203s allows branches to be duplicated 203s behaves like literal case allowed 203s when returning a nil in multiple branches 203s allows branches to be duplicated 203s behaves like literal case allowed 203s when returning a regexp in multiple branches 203s allows branches to be duplicated 203s behaves like literal case allowed 203s when returning a true in multiple branches 203s allows branches to be duplicated 203s behaves like literal case disallowed 203s when returning a dstr in multiple branches 203s registers an offense 203s behaves like literal case disallowed 203s when returning a complex irange in multiple branches 203s registers an offense 203s behaves like literal case disallowed 203s when returning a xstr in multiple branches 203s registers an offense 203s with `if` 203s behaves like literal if allowed 203s when returning a nil in multiple branches 203s allows branches to be duplicated 203s behaves like literal if disallowed 203s when returning a method call in multiple branches 203s registers an offense 203s and IgnoreConstBranches: true 203s behaves like literal if allowed 203s when returning a hash of constants in multiple branches 203s allows branches to be duplicated 203s behaves like literal if allowed 203s when returning a array of constants in multiple branches 203s allows branches to be duplicated 203s behaves like literal if disallowed 203s when returning a complex hash in multiple branches 203s registers an offense 203s behaves like literal if allowed 203s when returning a empty hash in multiple branches 203s allows branches to be duplicated 203s behaves like literal if allowed 203s when returning a rational in multiple branches 203s allows branches to be duplicated 203s behaves like literal if disallowed 203s when returning a variable in multiple branches 203s registers an offense 203s behaves like literal if allowed 203s when returning a true in multiple branches 203s allows branches to be duplicated 203s behaves like literal if allowed 203s when returning a array of literals in multiple branches 203s allows branches to be duplicated 203s behaves like literal if allowed 203s when returning a integer in multiple branches 203s allows branches to be duplicated 203s behaves like literal if disallowed 203s when returning a xstr in multiple branches 203s registers an offense 203s behaves like literal if allowed 203s when returning a hash of literals in multiple branches 203s allows branches to be duplicated 203s behaves like literal if allowed 203s when returning a regexp with modifier in multiple branches 203s allows branches to be duplicated 203s behaves like literal if allowed 203s when returning a float in multiple branches 203s allows branches to be duplicated 203s behaves like literal if disallowed 203s when returning a complex regexp in multiple branches 203s registers an offense 203s behaves like literal if disallowed 203s when returning a complex irange in multiple branches 203s registers an offense 203s and IgnoreConstBranches: false 203s behaves like literal if disallowed 203s when returning a hash of constants in multiple branches 203s registers an offense 203s behaves like literal if disallowed 203s when returning a array of constants in multiple branches 203s registers an offense 203s behaves like literal if disallowed 203s when returning a complex erange in multiple branches 203s registers an offense 203s behaves like literal if allowed 203s when returning a complex in multiple branches 203s allows branches to be duplicated 203s behaves like literal if allowed 203s when returning a string in multiple branches 203s allows branches to be duplicated 203s behaves like literal if disallowed 203s when returning a dsym in multiple branches 203s registers an offense 203s behaves like literal if allowed 203s when returning a empty array in multiple branches 203s allows branches to be duplicated 203s behaves like literal if disallowed 203s when returning a dstr in multiple branches 203s registers an offense 203s behaves like literal if allowed 203s when returning a false in multiple branches 203s allows branches to be duplicated 203s behaves like literal if allowed 203s when returning a simple erange in multiple branches 203s allows branches to be duplicated 203s behaves like literal if allowed 203s when returning a regexp in multiple branches 203s allows branches to be duplicated 203s behaves like literal if allowed 203s when returning a simple irange in multiple branches 203s allows branches to be duplicated 203s behaves like literal if allowed 203s when returning a symbol in multiple branches 203s allows branches to be duplicated 203s behaves like literal if disallowed 203s when returning a complex array in multiple branches 203s registers an offense 203s with `rescue` 203s behaves like literal rescue allowed 203s when returning a nil in multiple branches 203s allows branches to be duplicated 203s and IgnoreConstBranches: true 203s behaves like literal rescue allowed 203s when returning a array of constants in multiple branches 203s allows branches to be duplicated 203s behaves like literal rescue allowed 203s when returning a hash of constants in multiple branches 203s allows branches to be duplicated 203s behaves like literal rescue allowed 203s when returning a integer in multiple branches 203s allows branches to be duplicated 203s behaves like literal rescue allowed 203s when returning a false in multiple branches 203s allows branches to be duplicated 203s behaves like literal rescue allowed 203s when returning a string in multiple branches 203s allows branches to be duplicated 203s behaves like literal rescue allowed 203s when returning a simple irange in multiple branches 203s allows branches to be duplicated 203s behaves like literal rescue disallowed 203s when returning a dsym in multiple branches 203s registers an offense 203s behaves like literal rescue allowed 203s when returning a simple erange in multiple branches 203s allows branches to be duplicated 203s behaves like literal rescue allowed 203s when returning a regexp in multiple branches 203s allows branches to be duplicated 203s behaves like literal rescue allowed 203s when returning a hash of literals in multiple branches 203s allows branches to be duplicated 203s behaves like literal rescue allowed 203s when returning a regexp with modifier in multiple branches 203s allows branches to be duplicated 203s behaves like literal rescue allowed 203s when returning a float in multiple branches 203s allows branches to be duplicated 203s behaves like literal rescue allowed 203s when returning a rational in multiple branches 203s allows branches to be duplicated 203s behaves like literal rescue disallowed 203s when returning a complex erange in multiple branches 203s registers an offense 203s behaves like literal rescue disallowed 203s when returning a xstr in multiple branches 203s registers an offense 203s behaves like literal rescue disallowed 203s when returning a dstr in multiple branches 203s registers an offense 203s behaves like literal rescue allowed 203s when returning a true in multiple branches 203s allows branches to be duplicated 203s and IgnoreConstBranches: false 203s behaves like literal rescue disallowed 203s when returning a hash of constants in multiple branches 203s registers an offense 203s behaves like literal rescue disallowed 203s when returning a array of constants in multiple branches 203s registers an offense 203s behaves like literal rescue disallowed 203s when returning a complex regexp in multiple branches 203s registers an offense 203s behaves like literal rescue disallowed 203s when returning a complex irange in multiple branches 203s registers an offense 203s behaves like literal rescue allowed 203s when returning a empty array in multiple branches 203s allows branches to be duplicated 203s behaves like literal rescue allowed 203s when returning a symbol in multiple branches 203s allows branches to be duplicated 203s behaves like literal rescue disallowed 203s when returning a variable in multiple branches 203s registers an offense 203s behaves like literal rescue allowed 203s when returning a array of literals in multiple branches 203s allows branches to be duplicated 203s behaves like literal rescue disallowed 203s when returning a complex array in multiple branches 203s registers an offense 203s behaves like literal rescue disallowed 203s when returning a method call in multiple branches 203s registers an offense 203s behaves like literal rescue allowed 203s when returning a complex in multiple branches 203s allows branches to be duplicated 203s behaves like literal rescue allowed 203s when returning a empty hash in multiple branches 203s allows branches to be duplicated 203s behaves like literal rescue disallowed 203s when returning a complex hash in multiple branches 203s registers an offense 203s with IgnoreConstantBranches: true 203s with `rescue` 203s behaves like literal rescue disallowed 203s when returning a object in multiple branches 203s registers an offense 203s behaves like literal rescue allowed 203s when returning a constant in multiple branches 203s allows branches to be duplicated 203s with `case` 203s behaves like literal case disallowed 203s when returning a object in multiple branches 203s registers an offense 203s behaves like literal case allowed 203s when returning a constant in multiple branches 203s allows branches to be duplicated 203s with `if` 203s behaves like literal if disallowed 203s when returning a object in multiple branches 203s registers an offense 203s behaves like literal if allowed 203s when returning a constant in multiple branches 203s allows branches to be duplicated 203s with `case-match` 203s behaves like literal case-match allowed 203s when returning a constant in multiple branches 203s allows branches to be duplicated 203s behaves like literal case-match disallowed 203s when returning a object in multiple branches 203s registers an offense 203s 203s RuboCop::Cop::InternalAffairs::CreateEmptyFile 203s does not register an offense when using `create_file(path, ['foo', 'bar'])` 203s does not register an offense when using `create_file(path)` 203s does not register an offense when using `receiver.create_file(path, '')` 203s registers an offense when using `create_file(path, "") 203s does not register an offense when using `create_file(path, 'hello')` 203s registers an offense when using `create_file(path, '') 203s 203s RuboCop::Cop::Lint::RescueException 203s does not crash when the splat operator is used in a rescue 203s does not register an offense for rescue with no class 203s does not register an offense for rescue with no class and => e 203s registers an offense for rescue from Exception 203s registers an offense for rescue with ::Exception 203s does not register an offense for rescue with other classes 203s does not register an offense for rescue with a module prefix 203s does not register an offense for rescue with other class 203s does not crash when the namespace of a rescued class is in a local variable 203s registers an offense for rescue with Exception => e 203s registers an offense for rescue with StandardError, Exception 203s 203s RuboCop::Cop::InternalAffairs::NumblockHandler 203s does not register an offense for cops with on_numblock alias 203s does not register an offense for cops with on_numblock alias_method 203s registers an offense for cops with forgotten numblock handlers 203s does not register an offense for cops with on_numblock method 203s 203s RuboCop::Cop::Style::YodaCondition 203s enforce yoda 203s accepts string literal on right of case equality check 203s accepts arrays of numbers on both sides 203s registers an offense for number on right of comparison 203s accepts safe navigation on right 203s accepts numbers on both sides 203s accepts accessor and variable on right in boolean expression 203s accepts method call on receiver on right 203s accepts assignment 203s accepts global variable on right 203s accepts negation 203s accepts variable on right after assignment 203s registers an offense for nil on right 203s registers an offense for boolean literal on right 203s accepts class variable on right 203s registers an offense for string literal on right 203s accepts instance variable on right 203s accepts number on left of <=> 203s accepts string literal on left 203s accepts subtraction on right of comparison 203s registers an offense for number on right 203s with EnforcedStyle: require_for_equality_operators_only 203s accepts mixed order in comparisons 203s registers an offense for equality check 203s accepts nil on right of comparison 203s accepts number on right of comparison 203s registers an offense for negated equality check 203s within an if or ternary statement 203s registers an offense for nil on right in ternary condition 203s registers an offense for number on right in modifier if 203s registers an offense for number on right of <= in ternary condition 203s registers an offense for number on right of >= in ternary condition 203s registers an offense number on right of comparison in if condition 203s registers an offense number on right in if condition 203s enforce not yoda 203s accepts method call on receiver on left 203s accepts interpolated string on left 203s accepts string literal on left of case equality check 203s accepts interpolated regex on left 203s accepts class variable on left 203s accepts variable on left after assign 203s accepts string literal on right 203s accepts __FILE__ on left in program name check 203s accepts safe navigation on left 203s accepts global variable on left 203s registers an offense number on left 203s accepts number on both sides 203s accepts accessor and variable on left in boolean expression 203s accepts subtraction expression on left of comparison 203s registers an offense for boolean literal on left 203s accepts instance variable on left 203s registers an offense number on left of comparison 203s accepts number on left of <=> 203s registers an offense for string literal on left 203s accepts negation 203s accepts assignment 203s accepts __FILE__ on left in negated program name check 203s registers an offense for nil on left 203s accepts array of numbers on both sides 203s with EnforcedStyle: forbid_for_equality_operators_only 203s accepts nil on left of comparison 203s accepts mixed order in comparisons 203s registers an offense for negated equality check 203s registers an offense for equality check 203s accepts number on left of comparison 203s within an if or ternary statement 203s registers an offense for number on left of comparison in if condition 203s registers an offense for number on left in if condition 203s registers an offense for nil on left in ternary condition 203s registers an offense for number on left in modifier if 203s registers an offense for number on left of >= in ternary condition 203s registers an offense for number on left of <= in ternary condition 203s 203s RuboCop::Cop::Layout::IndentationStyle 203s when EnforcedStyle is spaces 203s accepts a line with a tab between string literals 203s registers and corrects an offense for a line indented with mixed whitespaces 203s registers offenses before __END__ but not after 203s accepts a line which begins with tab in a multiline heredoc 203s accepts a line with tab in a string 204s registers and corrects an offense for a line with tab in a string indented with tab 204s accepts a line which begins with tab in a heredoc 204s registers and corrects an offense for a line indented with tab 204s accepts a line which begins with tab in a string 204s accepts a line with a tab other than indentation 204s registers and corrects an offense for a line indented with multiple tabs 204s custom indentation width 204s uses the configured number of spaces to replace a tab 204s when EnforcedStyle is tabs 204s accepts a line a tab other than indentation 204s registers and corrects an offense for a line indented with space 204s accepts a line with tab in a string 204s accepts a line with tabs between string literals 204s accepts a line which begins with tab in a string 204s registers an offense for a line indented with mixed whitespace 204s registers offenses before __END__ but not after 204s accepts a line which begins with tab in a multiline heredoc 204s registers and corrects an offense for a line indented with fractional number ofindentation groups by rounding down 204s registers and corrects an offense for a line indented with multiple spaces 204s registers and corrects an offense for a line with tab in a string indented with space 204s accepts a line which begins with tab in a heredoc 204s custom indentation width 204s uses the configured number of spaces to replace with a tab 204s 204s RuboCop::Cop::Style::TrailingBodyOnClass 204s accepts class inheritance 204s autocorrects with comment after body 204s registers an offense when body trails after class definition 204s accepts regular class 204s registers offense with multi-line class 204s when class is not on first line of processed_source 204s autocorrect offense 204s 204s RuboCop::Cop::Style::ClassMethods 204s does not register an offense outside class/module bodies 204s does not register an offense for methods using self 204s registers an offense for methods using a module name 204s registers an offense for methods using a class name 204s does not register an offense for other top-level singleton methods 204s 204s RuboCop::Cop::Lint::TopLevelReturnWithArgument 204s Code segment with method-level return statements 204s expects offense when method-level & top-level return co-exist 204s Code segment with block level returns other than the top-level return 204s expects no offense from the return without arguments 204s expects offense from the return with arguments 204s Code segment with only top-level return statement 204s expects offense from the return with arguments 204s expects multiple offenses from the return with arguments statements 204s expects no offense from the return without arguments 204s Code segment with inline if along with top-level return 204s expects no offense from the return without arguments 204s expects multiple offense from the return with arguments 204s Code segment containing semi-colon separated statements 204s expects an offense from the return with arguments and multi-line code 204s expects no offense from the return with arguments and multi-line code 204s 204s RuboCop::Cop::Lint::SafeNavigationConsistency 204s registers an offense and corrects using safe navigation on the left of || 204s allows safe navigation when different variables are used 204s registers an offense and corrects using unsafe navigation with grouped conditions 204s registers and corrects multiple offenses 204s allows calls to methods that nil responds to 204s registers an offense and corrects using safe navigation on the right of || 204s registers an offense and corrects using unsafe navigation and the safe navigation appears in a group 204s allows || without safe navigation 204s registers an offense and corrects unsafe navigation that appears before safe navigation 204s registers a single offense and corrects when safe navigation is used multiple times 204s registers an offense and corrects assignment 204s allows && without safe navigation 204s registers an offense and corrects when there is code before or after the condition 204s registers an offense but does not correct non dot method calls 204s registers an offense and corrects using safe navigation inside of separated conditions 204s registers an offense and corrects using unsafe navigation with both && and || 204s registers an offense and corrects using safe navigation on the left of && 204s registers an offense and corrects using safe navigation in conditions on the right hand side 204s registers an offense and corrects using safe navigation on the right of && 204s 204s RuboCop::Cop::Style::Next 204s doesn't reindent heredoc bodies when autocorrecting 204s allows empty blocks 204s does not blow up on empty body while block 204s allows super nodes 204s does not blow up on empty body for block 204s handles nested autocorrections 204s handles `then` when autocorrecting 204s keeps comments when autocorrecting 204s does not blow up on empty body until block 204s does not crash with an empty body branch 204s does not crash with empty brackets 204s allows loops with conditions at the end with ternary op 204s behaves like iterators 204s allows loops with unless with else at the end 204s registers an offense for unless inside of nested iterators 204s allows loops with unless with else, nested in another condition 204s registers an offense for a condition at the end of an iterator when there is more in the iterator than the condition 204s registers an offense for unless inside of downto 204s registers an offense for unless inside of each 204s registers an offense for unless inside of nested iterators 204s allows loops with conditional break 204s allows loops with conditional return 204s registers an offense for unless inside of map 204s registers an offense for unless inside of reject 204s registers an offense for unless inside of times 204s autocorrects a misaligned end 204s registers an offense for unless inside of loop 204s registers an offense for unless inside of for 204s registers an offense for unless inside of each_with_object 204s registers an offense for unless inside of reject! 204s reports an offense for unless whose body has 3 lines 204s registers an offense for unless inside of collect 204s registers an offense for unless inside of select! 204s registers an offense when line break before condition 204s registers an offense for unless inside of select 204s allows loops with unless being the entire body with else 204s EnforcedStyle: skip_modifier_ifs 204s allows modifier unless 204s EnforcedStyle: always 204s registers an offense for modifier unless 204s Ruby 2.7 204s registers an offense for unless inside of downto numblock 204s MinBodyLength: 3 204s accepts if whose body has 1 line 204s Invalid MinBodyLength 204s fails with an error 204s behaves like iterators 204s allows loops with conditional break 204s autocorrects a misaligned end 204s registers an offense for if inside of for 204s allows loops with conditional return 204s registers an offense for a condition at the end of an iterator when there is more in the iterator than the condition 204s registers an offense for if inside of reject 204s registers an offense for if inside of map 204s registers an offense for if inside of each 204s registers an offense for if inside of collect 204s registers an offense for if inside of times 204s registers an offense for if inside of each_with_object 204s allows loops with if with else at the end 204s registers an offense for if inside of nested iterators 204s registers an offense for if inside of loop 204s registers an offense when line break before condition 204s reports an offense for if whose body has 3 lines 204s registers an offense for if inside of downto 204s registers an offense for if inside of reject! 204s registers an offense for if inside of nested iterators 204s allows loops with if with else, nested in another condition 204s registers an offense for if inside of select! 204s registers an offense for if inside of select 204s allows loops with if being the entire body with else 204s Ruby 2.7 204s registers an offense for if inside of downto numblock 204s EnforcedStyle: always 204s registers an offense for modifier if 204s EnforcedStyle: skip_modifier_ifs 204s allows modifier if 204s 204s RuboCop::Cop::Metrics::ParameterLists 204s registers an offense when optargs count exceeds the maximum 204s does not register an offense when method has no args 204s does not register an offense when method has allowed amount of args with block arg 204s registers an offense for a method def with 5 parameters 204s accepts a lambda with more than 4 parameters 204s does not register an offense when method has allowed amount of optargs 204s accepts a method def with 4 parameters 204s accepts a proc with more than 4 parameters 204s When CountKeywordArgs is false 204s does not count keyword arguments 204s does not count keyword arguments without default values 204s When CountKeywordArgs is true 204s counts keyword arguments as well 204s 204s RuboCop::Cop::Security::YAMLLoad 204s does not register an offense for YAML.dump 204s registers an offense and corrects a fully qualified ::YAML.load 204s registers an offense and corrects load with a literal string 204s does not register an offense for YAML.load under a different namespace 204s Ruby >= 3.1 204s does not register an offense and corrects a fully qualified `::YAML.load` 204s does not register an offense and corrects load with a literal string 204s 204s RuboCop::Cop::Style::RedundantArgument 204s does not register an offense when method called with no receiver 204s registers an offense and corrects when method called on literals 204s registers an offense and corrects when method called without parenthesis on variable 204s does not register an offense when method called with different argument 204s registers an offense and corrects when method called on variable 204s registers an offense and corrects when method called without parenthesis on literals 204s does not register an offense when method called with no arguments 204s works with double-quoted strings when configuration is single-quotes 204s does not register an offense when method called with more than one arguments 204s non-builtin method 204s registers an offense and corrects with configured argument 204s does not register an offense with other argument 204s 204s RuboCop::Cop::Lint::ErbNewArguments 204s >= Ruby 2.6 204s does not register an offense when using `ERB.new` without optional arguments 204s does not register an offense when using `ERB.new` with keyword arguments 204s registers an offense when using `ERB.new` with non-keyword 2nd, 3rd and 4th arguments andkeyword 5th argument 204s registers an offense when using `::ERB.new` with non-keyword 2nd, 3rd and 4th arguments 204s registers an offense when using `ERB.new` with non-keyword 2nd and 3rd arguments andkeyword 4th argument 204s registers an offense when using `ERB.new` with non-keyword 2nd and 3rd arguments 204s registers an offense when using `ERB.new` with non-keyword 2nd argument 204s registers an offense when using `ERB.new` with non-keyword 2nd, 3rd and 4th arguments 204s when using `ActionView::Template::Handlers::ERB.new` 204s does not register an offense when using `ERB.new` without arguments 204s <= Ruby 2.5 204s does not register an offense when using `ERB.new` with non-keyword arguments 204s 204s RuboCop::Cop::Style::EndBlock 204s does not report offenses for other blocks 204s reports an offense and corrects END block 204s 204s RuboCop::Cop::Style::FloatDivision 204s EnforcedStyle is left_coerce 204s registers offense and corrects for right coerce 204s registers offense and corrects for both coerce 204s registers offense and corrects for right coerce with calculations 204s does not register offense for left coerce 204s EnforcedStyle is single_coerce 204s registers offense and corrects for left coerce with calculations 204s does not register offense for right coerce only 204s registers offense and corrects for both coerce 204s does not register offense for left coerce only 204s EnforcedStyle is right_coerce 204s does not register offense for right coerce 204s registers offense and corrects for left coerce 204s registers offense and corrects for left coerce with calculations 204s registers offense and corrects for both coerce 204s EnforcedStyle is fdiv 204s does not register offense on usage of fdiv 204s registers offense and corrects for right coerce 204s registers offense and corrects for both coerce 204s registers offense and corrects for left coerce with calculations 204s registers offense and corrects for left coerce 204s 204s RuboCop::Cop::Naming::ConstantName 204s registers 1 offense if rhs is offending const assignment 204s does not check names if rhs is a method call 204s does not check names if rhs is a method call with block 204s registers an offense for snake case in const name 204s checks qualified const names 204s does not check names if rhs is a `Class.new` 204s does not check if rhs is another constant 204s does not check names if rhs is a `Struct.new` 204s does not check if rhs is a non-offensive const assignment 204s registers an offense for camel case in const namewhen using frozen object assignment 204s does not check names if rhs is a `Struct.new` with conditional assign 204s registers an offense for non-POSIX upper case in const name 204s allows screaming snake case in const name 204s allows screaming snake case with POSIX upper case characters 204s registers an offense for camel case in const name 204s allows screaming snake case in multiple const assignment 204s does not check names if rhs is a `Class.new` with conditional assign 204s registers an offense for camel case in const namewhen using frozen range assignment 204s does not check names if rhs is a method call with conditional assign 204s registers offenses for camel case in multiple const assignment 204s when a rhs is a conditional expression 204s when conditional branches contain only constants 204s does not check names 204s when conditional branches contain a value other than a constant 204s does not check names 204s when conditional branches contain only string values 204s registers an offense 204s 204s RuboCop::Cop::Style::ReturnNil 204s when enforced style is `return` 204s does not register an offense for return nil from iterators 204s registers an offense for return nil 204s does not register an offense for returning others 204s when enforced style is `return_nil` 204s does not register an offense for returning others 204s registers an offense for return 204s 204s RuboCop::Formatter::OffenseCountFormatter 204s #file_finished 204s when any offenses are detected 204s increments the count for the cop in offense_counts 204s when no offenses are detected 204s does not add to offense_counts 204s #report_summary 204s when an offense is detected 204s shows the cop and the offense count 204s #finished 204s when there are many offenses 204s when --display-style-guide was not given 204s sorts by offense count first and then by cop name 204s when --display-style-guide was given 204s shows links and sorts by offense count first and then by cop name 204s when output tty is true 204s has a progress bar 204s 204s RuboCop::Cop::Style::GuardClause 204s registers an error with next in the else branch 204s registers an error if non-control-flow branch has multiple lines 204s registers an error with next in the if branch 204s does not report an offense if raise "error" is inside elsif 204s registers an offense when using `|| raise` in `then` branch 204s registers an error if non-control-flow branch has multiple lines 204s does not report an offense if next is inside elsif 204s accepts a method which body is if / unless with else 204s doesn't register an error if control flow expr has multiple lines 204s does not report an offense if break is inside elsif 204s registers an offense when using `and return` in `else` branch 204s doesn't register an error if condition has multiple lines 204s registers an error with raise "error" in the else branch 204s does not report an offense if raise "error" is inside if..elsif..else..end 204s registers an offense when using `and return` in `then` branch 204s registers an error with break in the else branch 204s doesn't report an offense if condition has multiple lines 204s accepts a method which body does not end with if / unless 204s does not report an offense if body is if..elsif..end 204s registers an error with return in the if branch 204s does not register an offense when assigning the result of a guard condition with `else` 204s doesn't register an error if condition has multiple lines 204s doesn't register an error if control flow expr has multiple lines 204s registers an error with return in the else branch 204s accepts a method whose body is a modifier if / unless 204s does not report an offense if return is inside if..elsif..else..end 204s does not report an offense if return is inside elsif 204s accepts a method with empty parentheses as its body 204s registers an error with break in the if branch 204s does not report an offense if break is inside if..elsif..else..end 204s does not report an offense if next is inside if..elsif..else..end 204s doesn't register an error if condition has multiple lines 204s registers an error with raise "error" in the if branch 204s doesn't register an error if control flow expr has multiple lines 204s registers an offense when using `|| raise` in `else` branch 204s registers an error if non-control-flow branch has multiple lines 204s doesn't register an error if control flow expr has multiple lines 204s doesn't register an error if condition has multiple lines 204s registers an error if non-control-flow branch has multiple lines 204s with Metrics/MaxLineLength disabled 204s registers an offense with modifier example code regardless of length 204s method in module 205s registers an offense for instance method 205s registers an offense for singleton methods 205s behaves like reports offense 205s reports an offense if method body is if / unless without else 205s reports an offense if method body ends with if / unless without else 205s behaves like reports offense 205s reports an offense if method body is if / unless without else 205s reports an offense if method body ends with if / unless without else 205s AllowConsecutiveConditionals: false 205s reports an offense when not allowed same depth multiple if statement andpreceding expression is a conditional at the same depth 205s MinBodyLength: 4 205s accepts a method whose body has 3 lines 205s with Metrics/MaxLineLength enabled 205s when the correction is too long for a single line 205s with a nested `begin` node 205s does registers an offense 205s with a nested `if` node 205s does registers an offense 205s with a trivial body 205s does not register an offense 205s AllowConsecutiveConditionals: true 205s reports an offense when allowed same depth multiple if statement andpreceding expression is not a conditional at the same depth 205s does not register an offense when allowed same depth multiple if statement andpreceding expression is not a conditional at the same depth 205s Invalid MinBodyLength 205s fails with an error 205s MinBodyLength: 1 205s reports an offense for if whose body has 1 line 205s 205s RuboCop::Cop::Layout::SpaceBeforeComma 205s registers an offense and corrects block argument with space before comma 205s handles more than one space before a comma 205s does not register an offense for no spaces before comma 205s registers an offense and corrects array index with space before comma 205s registers an offense and corrects method call arg with space before comma 205s heredocs 205s registers an offense and corrects 205s 205s RuboCop::Cop::Style::CollectionMethods 205s accepts member? without a block 205s accepts inject without a block 205s registers an offense for collect with an argument and proc param 205s registers an offense for member? with an argument and proc param 205s registers an offense for member? with proc param 205s registers an offense for find_all with block 205s registers an offense for find_all with an argument and proc param 205s registers an offense for find_all with proc param 205s registers an offense for inject with block 205s registers an offense for detect with an argument and proc param 205s registers an offense for inject with an argument and proc param 205s registers an offense for detect with proc param 205s registers an offense for collect with proc param 205s registers an offense for collect with block 205s registers an offense for detect with block 205s accepts detect without a block 205s accepts collect without a block 205s accepts find_all without a block 205s registers an offense for member? with block 205s registers an offense for inject with proc param 205s Ruby 2.7 205s registers an offense for collect with numblock 205s for methods that accept a symbol as implicit block 205s registers an offense with an argument and final symbol param 205s registers an offense with a final symbol param 205s Ruby 2.7 205s registers an offense for find_all with numblock 205s Ruby 2.7 205s registers an offense for detect with numblock 205s Ruby 2.7 205s registers an offense for member? with numblock 205s for methods that do not accept a symbol as implicit block 205s does not register an offense for a final symbol param 205s does not register an offense for a final symbol param with extra args 205s Ruby 2.7 205s registers an offense for inject with numblock 205s 205s RuboCop::Cop::Style::MixinUsage 205s does not register an offense when using inside nested module 205s extend 205s does not register an offense when using inside class 205s registers an offense when using outside class 205s include 205s does not register an offense when using inside block and `if` condition is after `include` 205s does not register an offense when using outside class 205s does not register an offense when using `include` in method definition inside class 205s registers an offense when using `include` in method definition outside class or module 205s registers an offense when using only `include` statement 205s registers an offense when using outside class (used below) 205s registers an offense when using outside class (used above) 205s doesn't register an offense when `include` call is a method argument 205s does not register an offense when using inside class 205s does not register an offense when using `include` in method definition inside module 205s does not register an offense when using inside block 205s Multiple definition classes in one 205s does not register an offense when using inside class 205s Nested module 205s registers an offense when using outside class 205s prepend 205s registers an offense when using outside class 205s does not register an offense when using inside class 205s 205s RuboCop::Cop::Style::CaseEquality 205s when AllowOnSelfClass is false 205s does not fail when the receiver is implicit 205s registers an offense and corrects for === when the receiver is self.class 205s registers an offense and does not correct for === when receiver is of some other type 205s does not register an offense for === when the receiver is not a camel cased constant 205s registers an offense and corrects for === when the receiver is a range 205s registers an offense and corrects for === when the receiver is a regexp 205s when AllowOnSelfClass is true 205s registers an offense and corrects for === when the receiver is self.klass 205s does not register an offense for === when the receiver is not a camel cased constant 205s registers an offense and does not correct for === when receiver is of some other type 205s registers an offense and corrects for === when the receiver is a regexp 205s does not register an offense for === when the receiver is self.class 205s does not fail when the receiver is implicit 205s registers an offense and corrects for === when the receiver is a range 205s when AllowOnConstant is false 205s registers an offense and corrects for === when the receiver is a range 205s does not fail when the receiver is implicit 205s registers an offense and does not correct for === when receiver is of some other type 205s registers an offense and corrects for === when the receiver is a regexp 205s registers an offense and corrects for === when the receiver is a constant 205s does not register an offense for === when the receiver is not a camel cased constant 205s when AllowOnConstant is true 205s registers an offense and does not correct for === when receiver is of some other type 205s does not register an offense for === when the receiver is a constant 205s does not register an offense for === when the receiver is not a camel cased constant 205s registers an offense and corrects for === when the receiver is a range 205s does not fail when the receiver is implicit 205s registers an offense and corrects for === when the receiver is a regexp 205s 205s RuboCop::Cop::Style::HashAsLastArrayItem 205s when EnforcedStyle is no_braces 205s registers an offense and corrects when hash with braces 205s registers an offense and corrects when hash with braces and trailing comma 205s does not register an offense when the hash is empty 205s does not register an offense when hash is not the last element 205s registers an offense and corrects when hash with braces and trailing comma and new line 205s does not register an offense when hash is not inside array 205s does not register an offense when hash without braces 205s does not register an offense when passing an implicit array to a setter 205s does not register an offense when the array is all hashes 205s when EnforcedStyle is braces 205s does not register an offense when using double splat operator 205s does not register an offense when hash is not inside array 205s does not register an offense when hash with braces 205s does not register an offense when the hash is empty 205s registers an offense and corrects when hash without braces 205s does not register an offense when the array is all hashes 205s 205s RuboCop::Cop::Layout::SingleLineBlockChain 205s registers an offense for method call chained on the same line as a block 205s registers an offense for no selector method call chained on the same line as a block 205s does not register an offense for method call chained on a new line after a single line block with trailing dot 205s does not register an offense for method call chained without a dot 205s does not register an offense for method call chained on the same line as a multiline block 205s does not register an offense for method call chained on a new line after a single line block 205s 205s RuboCop::Cop::Lint::RedundantCopDisableDirective 205s .check 205s with a disabled department 205s removes cop duplicated by department and leaves free text as a comment 205s removes redundant department 205s removes cop duplicated by department on previous line 205s does not remove correct department 205s removes cop duplicated by department 205s removes entire comment 205s when there are disabled lines 205s and there are two offenses 205s and a comment disables 205s one cop twice 205s returns an offense 205s one cop and then all cops 205s returns an offense 205s and there are no offenses 205s and a comment disables 205s when using a directive comment after a non-directive comment 205s returns an offense 205s misspelled cops 205s returns an offense 205s comment is not at the beginning of the file 205s and not all cops have offenses 205s returns an offense 205s itself and another cop 205s and the other cop is disabled a second time 205s returns no offense 205s disabled on the same range 205s returns no offense 205s disabled on different ranges 205s returns no offense 205s an unknown cop 205s returns an offense 205s a cop that is disabled in the config 205s returns an offense 205s when that cop was previously enabled 205s returns no offense 205s if that cop has offenses 205s returns an offense 205s itself and all cops 205s disabled on different ranges 205s returns no offense 205s multiple cops, and the leftmost one has no offenses 205s returns an offense 205s multiple cops 205s returns an offense 205s one cop 205s returns an offense 205s multiple cops, with abbreviated names 205s one of them has offenses 205s returns an offense 205s multiple cops, and one of them has offenses 205s returns an offense 205s all cops 205s returns an offense 205s and there is an offense 205s and a comment disables 205s that cop 205s returns no offense 205s that cop but on other lines 205s returns an offense 205s all cops 205s returns no offense 205s when there are no disabled lines 205s returns no offense 205s autocorrecting whitespace 205s nested inside a namespace 205s preserves indentation 205s when the comment is the first line of the file 205s followed by another comment 205s removes the comment and newline 205s followed by code 205s removes the comment 205s followed by a newline 205s removes the comment and newline 205s when the comment is not the first line of the file 205s preserves whitespace before the comment 205s when there is only whitespace before the comment 205s leaves the whitespace 205s inline comment 205s removes the comment and preceding whitespace 205s when there is a blank line before inline comment 205s removes the comment and preceding whitespace 205s 205s RuboCop::Cop::Layout::LineLength 205s registers an offense for a line that's 81 characters wide 205s accepts the first line if it is a shebang line 205s registers an offense for long line before __END__ but not after 205s highlights excessive characters 205s accepts a line that's 80 characters wide 205s when AllowURI option is enabled 205s and the URI is assigned 205s does not register an offense 205s and an error other than URI::InvalidURIError is raised while validating a URI-ish string 205s does not crash 205s and the excessive characters include part of a URL and another word 205s registers an offense for the line 205s and all the excessive characters are part of a URL 205s accepts the line 205s and the URL is wrapped in braces with title 205s accepts the line 205s and the URL is wrapped in braces 205s accepts the line 205s and the URL is wrapped in double quotes 205s accepts the line 205s and the URL is wrapped in single quotes 205s accepts the line 205s and the URI is an argument 205s does not register an offense 205s and the excessive characters include part of a URL in double quotes 205s does not include the quote as part of the offense 205s and the excessive characters include part of a URL and trailing whitespace 205s registers an offense for the line 205s and the URL does not have a http(s) scheme 205s rejects the line 205s and the scheme has been configured 205s does not register an offense 205s and the excessive characters include part of a URL in braces and another word 205s registers an offense for the line 205s and the URL fits within the max allowed characters 205s registers an offense for the line 205s and the excessive characters include a complete URL 205s registers an offense for the line 205s when line is indented with tabs 205s accepts a short line 205s registers an offense for a long line 205s when IgnoreCopDirectives is disabled 205s and the source is acceptable length 205s with an inline comment 205s highlights the excess comment 205s with a trailing RuboCop directive 205s registers an offense for the line 205s and the source is too long and has a trailing cop directive 205s highlights the excess source and cop directive 205s when IgnoreCopDirectives is enabled 205s and the source is too long 205s highlights only the non-directive part 205s and the source contains non-directive #s as non-comment 205s registers an offense for the line 205s and the source contains non-directive # as comment 205s highlights only the non-directive part 205s and the Rubocop directive causes an excessive line length 205s accepts the line 205s and has explanatory text 205s does not register an offense 205s and the Rubocop directive is excessively long 205s accepts the line 205s when AllowHeredoc option is enabled 205s accepts long lines in heredocs 205s and only certain heredoc delimiters are permitted 205s rejects long lines in heredocs with not permitted delimiters 205s when the source has no AST 205s does not crash 205s when AllowedPatterns option is set 205s only registers an offense for lines not matching the pattern 205s autocorrection 205s no breakable collections 205s adds an offense and does not autocorrect it 205s HEREDOC 205s when over limit with semicolon 205s adds offense and does not autocorrect 205s semicolon 205s when over limit and one semicolon at the end 205s adds offense and does not autocorrectbefore the hash 205s when over limit and many semicolons at the end 205s adds offense and does not autocorrectbefore the hash 205s when under limit 205s does not add any offenses 205s when over limit and semicolon at end of line 205s adds offense and autocorrects it by breaking the first semicolonbefore the hash 205s when over limit and many semicolons 205s adds offense and autocorrects it by breaking the semicolonbefore the hash 205s semicolons inside string literal 205s adds offense and autocorrects elsewhere 205s when over limit 205s adds offense and autocorrects it by breaking the semicolonbefore the hash 205s when over limit and many spaces around semicolon 205s adds offense and autocorrects it by breaking the semicolonbefore the hash 205s semicolon inside string literal 205s adds offense and autocorrects elsewhere 205s comments 205s when over limit with semicolon 205s adds offense and does not autocorrect 205s method call 205s when two method calls 205s adds an offense only to outer and autocorrects it 205s when two together 205s does not add any offenses 205s with a heredoc argument 205s does not break up the line when a heredoc is used as the first element of an array 205s does not break up the line when parentheses are omitted 205s does not break up the line 205s and other arguments before the heredoc 205s can break up the line before the heredoc argument 205s and the heredoc is after the line should split 205s can break up the line before the heredoc argument 205s with a hash with a too long first item 205s when the hash is parenthesized 205s corrects 205s when not parenthesized 205s when on multiple lines 205s does not correct 205s when there is only one element 205s does not autocorrect 205s when there are multiple elements 205s moves the 2nd element to a new line 205s when parenthesized 206s corrects 206s when over limit 206s adds an offense and autocorrects it 206s when unparenthesized 206s when there are multiple arguments 206s splits the line after the first element 206s when there is one argument 206s does not autocorrect 206s when under limit 206s does not add any offenses 206s when nested method calls allows outer to get broken up first 206s adds offense and does not autocorrect 206s when call with hash on same line 206s adds an offense only to outer and autocorrects it 206s with long argument list 206s registers an offense and autocorrects it 206s array 206s when two arrays on two lines allows outer to get broken first 206s adds an offense only to inner and does not autocorrect it 206s when over limit 206s adds an offense and autocorrects it 206s when under limit 206s does not add any offenses 206s when has inside array 206s adds an offense only to outer and autocorrects it 206s when already on two lines 206s does not add any offenses 206s long blocks 206s lambda syntax 206s when argument is not enclosed in parentheses 206s registers an offense and corrects 206s when argument is enclosed in parentheses 206s registers an offense and corrects 206s let block 206s adds an offense and does correct it 206s braces 206s adds an offense and does correct it 206s no spaces 206s adds an offense and does correct it 206s Ruby 2.7 206s adds an offense for {} block does correct it 206s adds an offense for do-end block and does correct it 206s do/end 206s adds an offense for block with arguments and does correct it 206s adds an offense for block without arguments and does correct it 206s hash 206s when nested hashes on same line 206s adds an offense only to outer and autocorrects it 206s when hash in method call 206s adds an offense only to outer and autocorrects it 206s when over limit 206s adds an offense and autocorrects it 206s when over limit and keys already on multiple lines 206s adds an offense and does not autocorrect 206s when over limit because of a comment 206s adds an offense and does not autocorrect 206s when over limit rocket 206s adds an offense and autocorrects it 206s when over limit rocket symbol 206s adds an offense and autocorrects it 206s when over limit and already on multiple lines long key 206s adds an offense and does not autocorrect 206s when under limit 206s does not add any offenses 206s multiple assignment 206s when over limit at right hand side 206s registers and corrects an offense 206s method definition 206s when under limit 206s does not add any offenses 206s when over limit 206s adds an offense and autocorrects it 206s when AllowURI option is disabled 206s and all the excessive characters are part of a URL 206s registers an offense for the line 206s affecting by IndentationWidth from Layout\Tab 206s without AllowURI option 206s behaves like with tabs indentation 206s accepts a line that's including 1 tab with size 2 and 28 other characters 206s registers an offense for a line that's including 2 tab with size 2 and 28 other characters 206s with AllowURI option 206s accepts a line that's including URI with text 206s accepts a line that's including URI and exceeds by 1 char 206s accepts a line that's including URI 206s accepts a line that's including URI in quotes with text 206s behaves like with tabs indentation 206s registers an offense for a line that's including 2 tab with size 2 and 28 other characters 206s accepts a line that's including 1 tab with size 2 and 28 other characters 206s 206s RuboCop::Cop::Naming::BlockParameterName 206s can register multiple offenses in one block 206s registers offense when param contains uppercase characters 206s registers offense when param with prefix is less than minimum length 206s does not register offense for valid parameter names 206s does not register for brace block without parameters 206s registers offense when param is less than minimum length 206s registers offense when param ends in number 206s does not register for block without parameters 206s with AllowNamesEndingInNumbers 206s accept params that end in numbers 206s with AllowedNames 206s registers unlisted offensive names 206s accepts specified block param names 206s with ForbiddenNames 206s accepts param that uses a forbidden name's letters 206s registers offense for param listed as forbidden 206s 206s RuboCop::Cop::Style::PreferredHashMethods 206s with enforced `verbose` style 206s registers an offense for value? with one arg 206s accepts value? with no args 206s accepts key? with no args 206s registers an offense for key? with one arg 206s with enforced `short` style 206s registers an offense for has_value? with one arg 206s registers an offense for has_key? with one arg 206s accepts has_value? with no args 206s accepts has_key? with no args 206s when using safe navigation operator 206s registers an offense for has_value? with one arg 206s 206s RuboCop::Cop::Lint::EachWithObjectArgument 206s registers an offense for bignum argument 206s registers an offense for fixnum argument 206s registers an offense for float argument 206s accepts two arguments 206s accepts a string argument 206s accepts a variable argument 206s when using safe navigation operator 206s registers an offense for fixnum argument 206s 206s RuboCop::Cop::Style::RedundantParentheses 206s accepts parentheses around a constant passed to when 206s accepts parentheses in yield call with hash 206s registers an offense for parens around an integer exponentiation base 206s registers an offense for parens around a block body 206s registers an offense for parens around a receiver of a method call with an argument 206s registers an offense for parens around a literal in array 206s registers an offense when there is space around the parentheses 206s registers an offense for parens around last expressions in block body 206s accepts parentheses around an erange 206s accepts parentheses when they touch the preceding keyword 206s accepts parentheses when enclosed in parentheses at `while-post` 206s registers an offense for parens around a literal in array and following newline 206s registers an offense for parens around last expressions in method body 206s registers an offense for parens around a variable after semicolon 206s registers an offense for parens around a float exponentiation base 206s registers an offense and corrects when method arguments are unnecessarily parenthesized 206s registers an offense for parens around an interpolated expression 206s accepts parentheses around operator keywords 206s registers an offense for parens around a literal hash value 206s accepts parentheses when they touch the following keyword 206s registers an offense for parens around a literal hash value and following newline 206s registers an offense for parens around a negative exponent 206s registers an offense for parens around method body 206s registers an offense and corrects for a parenthesized item in a hash where the comma is on a line with the closing parens 206s accepts parentheses around a method call with unparenthesized arguments 206s accepts parentheses in super call with hash 206s accepts parentheses around an irange 206s accepts parentheses inside an irange 206s accepts parentheses inside an erange 206s registers an offense and corrects an array of multiple heredocs 206s accepts parentheses when enclosed in parentheses at `until-post` 206s accepts parentheses around the error passed to rescue 206s registers an offense for parens around a positive exponent 206s behaves like keyword with arguments 206s behaves like plausible 206s accepts parentheses when arguments are unparenthesized 206s behaves like redundant 206s registers an offense for parentheses around a keyword 206s behaves like redundant 206s registers an offense for parentheses around a keyword 206s behaves like redundant 206s registers an offense for parentheses around a keyword 206s when a non-parenthesized call has an arg and a block 206s accepts parens around the arg 206s behaves like redundant 206s registers an offense for parentheses around a literal 206s behaves like redundant 206s registers an offense for parentheses around a keyword 206s behaves like redundant 206s registers an offense for parentheses around a method call 206s pin operator 206s behaves like allowed parentheses 206s accepts parentheses on a method call on a local variable 206s behaves like redundant parentheses 206s registers an offense and corrects a global variable 206s behaves like redundant parentheses 206s registers an offense and corrects a class variable 206s behaves like redundant parentheses 206s registers an offense and corrects a local variable 206s behaves like redundant parentheses 206s registers an offense and corrects an instance variable 206s behaves like allowed parentheses 206s accepts parentheses on a hash literal 206s behaves like allowed parentheses 206s accepts parentheses on an int literal 206s behaves like allowed parentheses 206s accepts parentheses on a method call on a class variable 206s behaves like allowed parentheses 206s accepts parentheses on an expression 206s behaves like allowed parentheses 206s accepts parentheses on an array literal 206s behaves like allowed parentheses 206s accepts parentheses on a function call with no arguments 206s behaves like allowed parentheses 206s accepts parentheses on a function call with arguments 206s behaves like allowed parentheses 206s accepts parentheses on a method call on a global variable 206s behaves like allowed parentheses 206s accepts parentheses on a method call on an instance variable 206s behaves like allowed parentheses 206s accepts parentheses on a range literal 206s behaves like redundant 206s registers an offense for parentheses around a literal 206s literals in an array 206s when there is a comma on the same line as the closing parentheses 206s registers an offense and corrects when there is a trailing comma 206s registers an offense and corrects when there is no subsequent item 206s registers an offense and corrects when there is assignment 206s registers an offense and corrects when there is a subsequent item 206s behaves like plausible 206s accepts parentheses when arguments are unparenthesized 206s behaves like redundant 206s registers an offense for parentheses around a method call 206s behaves like redundant 206s registers an offense for parentheses around a literal 206s behaves like redundant 206s registers an offense for parentheses around a literal 206s behaves like redundant 206s registers an offense for parentheses around a literal 206s behaves like redundant 206s registers an offense for parentheses around a literal 206s behaves like redundant 206s registers an offense for parentheses around a literal 206s behaves like plausible 206s accepts parentheses when arguments are unparenthesized 206s behaves like plausible 206s accepts parentheses when arguments are unparenthesized 206s behaves like plausible 206s accepts parentheses when arguments are unparenthesized 206s behaves like keyword with return value 206s behaves like redundant 206s registers an offense for parentheses around a keyword 206s behaves like plausible 206s accepts parentheses when arguments are unparenthesized 206s behaves like redundant 206s registers an offense for parentheses around a keyword 206s behaves like redundant 206s registers an offense for parentheses around a keyword 206s behaves like redundant 206s registers an offense for parentheses around a method call 206s behaves like redundant 206s registers an offense for parentheses around a literal 206s behaves like plausible 206s accepts parentheses when arguments are unparenthesized 206s behaves like redundant 206s registers an offense for parentheses around a literal 206s behaves like redundant 206s registers an offense for parentheses around a method call 206s ternaries 206s when Style/TernaryParentheses has EnforcedStyle: require_parentheses_when_complex 206s behaves like plausible 206s accepts parentheses when arguments are unparenthesized 206s when Style/TernaryParentheses is not enabled 206s registers an offense for parens around constant ternary condition 206s when Style/TernaryParentheses has EnforcedStyle: require_parentheses 206s behaves like plausible 206s accepts parentheses when arguments are unparenthesized 206s when Style/TernaryParentheses has EnforcedStyle: require_no_parentheses 206s registers an offense for parens around ternary condition 206s behaves like redundant 206s registers an offense for parentheses around an unary operation 206s behaves like plausible 206s accepts parentheses when arguments are unparenthesized 206s behaves like redundant 206s registers an offense for parentheses around a literal 206s when the first argument in a method call begins with a hash literal 206s accepts parentheses if the argument list is not parenthesized 206s registers an offense if the argument list is parenthesized 206s behaves like redundant 206s registers an offense for parentheses around a keyword 206s behaves like plausible 206s accepts parentheses when arguments are unparenthesized 206s behaves like redundant 206s registers an offense for parentheses around a keyword 206s behaves like redundant 206s registers an offense for parentheses around a method call 206s behaves like redundant 206s registers an offense for parentheses around a method call 206s when parentheses are used like method argument parentheses 206s accepts parens around the arg 206s behaves like redundant 206s registers an offense for parentheses around a variable 206s behaves like redundant 206s registers an offense for parentheses around an unary operation 206s behaves like redundant 206s registers an offense for parentheses around a method call 206s behaves like redundant 206s registers an offense for parentheses around a literal 206s behaves like plausible 206s accepts parentheses when arguments are unparenthesized 206s behaves like redundant 206s registers an offense for parentheses around a method call 206s behaves like redundant 206s registers an offense for parentheses around a keyword 206s behaves like redundant 206s registers an offense for parentheses around a literal 206s behaves like redundant 206s registers an offense for parentheses around a method call 206s behaves like plausible 206s accepts parentheses when arguments are unparenthesized 206s behaves like plausible 206s accepts parentheses when arguments are unparenthesized 206s behaves like redundant 206s registers an offense for parentheses around a keyword 206s behaves like keyword with return value 206s behaves like redundant 206s registers an offense for parentheses around a keyword 206s behaves like redundant 206s registers an offense for parentheses around a keyword 206s behaves like redundant 206s registers an offense for parentheses around a keyword 206s behaves like plausible 206s accepts parentheses when arguments are unparenthesized 206s behaves like redundant 206s registers an offense for parentheses around a literal 206s behaves like keyword with arguments 206s behaves like redundant 206s registers an offense for parentheses around a keyword 206s behaves like redundant 206s registers an offense for parentheses around a keyword 206s behaves like plausible 206s accepts parentheses when arguments are unparenthesized 206s behaves like redundant 206s registers an offense for parentheses around a keyword 206s behaves like plausible 206s accepts parentheses when arguments are unparenthesized 206s when a hash literal is the second argument in a method call 206s registers an offense 206s behaves like redundant 206s registers an offense for parentheses around a variable 206s behaves like plausible 206s accepts parentheses when arguments are unparenthesized 206s behaves like redundant 206s registers an offense for parentheses around a constant 206s behaves like keyword with return value 206s behaves like redundant 206s registers an offense for parentheses around a keyword 206s behaves like plausible 206s accepts parentheses when arguments are unparenthesized 206s behaves like redundant 206s registers an offense for parentheses around a keyword 206s behaves like redundant 206s registers an offense for parentheses around a keyword 206s behaves like redundant 206s registers an offense for parentheses around an unary operation 206s behaves like redundant 206s registers an offense for parentheses around an unary operation 206s behaves like plausible 206s accepts parentheses when arguments are unparenthesized 206s behaves like plausible 206s accepts parentheses when arguments are unparenthesized 206s behaves like redundant 206s registers an offense for parentheses around a literal 206s behaves like redundant 206s registers an offense for parentheses around a variable 206s behaves like plausible 206s accepts parentheses when arguments are unparenthesized 206s behaves like plausible 206s accepts parentheses when arguments are unparenthesized 206s behaves like redundant 206s registers an offense for parentheses around a literal 206s behaves like redundant 206s registers an offense for parentheses around a keyword 206s behaves like redundant 206s registers an offense for parentheses around a literal 206s behaves like plausible 206s accepts parentheses when arguments are unparenthesized 206s behaves like redundant 206s registers an offense for parentheses around a keyword 206s behaves like plausible 206s accepts parentheses when arguments are unparenthesized 206s 206s RuboCop::Cop::Lint::EnsureReturn 206s registers an offense when returning multiple values in `ensure` 206s registers an offense and corrects for return in ensure 206s does not check when ensure block has no body 206s registers an offense and corrects for return with argument in ensure 206s does not register an offense for return outside ensure 206s 206s RuboCop::Cop::Style::IfUnlessModifierOfIfUnless 206s provides a good error message 206s conditional with modifier 206s registers an offense and corrects 206s ternary with modifier 206s registers an offense and corrects 206s `unless` / `else` with modifier 206s registers an offense and corrects 206s conditional with modifier in body 206s accepts 206s nested conditionals 206s accepts 206s 206s RuboCop::Cop::Style::NestedParenthesizedCalls 206s on a call to a setter method 206s doesn't register an offense 206s on an aref, nested in a parenthesized method call 206s doesn't register an offense 206s on a call with no arguments, nested in a parenthesized one 206s doesn't register an offense 206s on a non-parenthesized call nested in a parenthesized one 206s with multiple arguments to the nested call 206s registers an offense 206s with a single argument to the nested call 206s registers an offense 206s when using safe navigation operator 206s registers an offense 206s on a deeply nested argument 206s doesn't register an offense 206s on a method call with no arguments 206s doesn't register an offense 206s on a non-parenthesized method call 206s doesn't register an offense 206s on a permitted method 206s doesn't register an offense 206s on a nested, parenthesized method call 206s doesn't register an offense 206s backslash newline in method call 206s registers an offense 206s 206s RuboCop::Cop::Style::EndlessMethod 206s Ruby >= 3.0 206s EnforcedStyle: allow_always 206s does not register an offense for a multiline endless method with begin 206s does not register an offense for an endless method with arguments 206s does not register an offense for a multiline endless method with arguments 206s does not register an offense for an endless method 206s does not register an offense for a multiline endless method 206s EnforcedStyle: disallow 206s registers an offense for an endless method 206s registers an offense for an endless method with arguments 206s EnforcedStyle: allow_single_line 206s registers an offense and corrects for a multiline endless method 206s does not register an offense for an endless method with arguments 206s does not register an offense for an endless method 206s registers an offense and corrects for a multiline endless method with arguments 206s registers an offense and corrects for a multiline endless method with begin 206s 206s RuboCop::Cop::Style::Not 206s autocorrects "not" followed by parens with ! 206s parenthesizes when `not` is applied to or 206s does not register an offense for ! 206s parenthesizes when `not` is applied to and 206s parenthesizes when `not` would change the meaning of a binary exp 206s parenthesizes when `not` is applied to a ternary op 206s autocorrects "not" with ! 206s registers an offense for not 206s uses the reverse operator when `not` is applied to a comparison 206s 206s RuboCop::Cop::Style::StringChars 206s does not register an offense when using `split` 206s registers and corrects an offense when using `split` without parentheses 206s registers and corrects an offense when using `split("")` 206s registers and corrects an offense when using `split('')` 206s does not register an offense when using `chars` 206s registers and corrects an offense when using `split(//)` 206s does not register an offense when using `split(/ /)` 206s 206s RuboCop::Server::Cache 206s .cache_path 206s when cache root path is specified path 206s is the specified path 206s when `RUBOCOP_CACHE_ROOT` environment variable is set 206s when cache root path is not specified path and `XDG_CACHE_HOME` environment variable is specified 206s contains the root from `RUBOCOP_CACHE_ROOT` 206s when cache root path is specified path 206s contains the root from cache root path 206s when cache root path is not specified path 206s contains the root from `RUBOCOP_CACHE_ROOT` 206s when .rubocop.yml is empty 206s when cache root path is not specified path 206s does not raise an error 206s when ERB pre-processing of the configuration file 206s when cache root path is not specified path 206s does not raise an error 206s when `XDG_CACHE_HOME` environment variable is set 206s when cache root path is not specified path 206s contains the root from `XDG_CACHE_HOME` 206s when cache root path is specified path 206s contains the root from cache root path 206s when `CacheRootDirectory` configure value is set 206s when cache root path is not specified path and `XDG_CACHE_HOME` environment variable is spacified 206s contains the root from `CacheRootDirectory` configure value 206s when cache root path is not specified path 206s contains the root from `CacheRootDirectory` configure value 206s when cache root path is specified path 206s contains the root from cache root path 206s when cache root path is not specified as default 206s is the default path 206s .pid_running? 207s works properly when concurrency with server stopping and cleaning cache dir 207s 207s RuboCop::Formatter::PacmanFormatter 207s #update_progress_line 207s when total_files is greater than columns in the terminal 207s updates the progress_line properly 207s when need to change the line 207s updates the progress_line properly 207s when total_files less than columns in the terminal 207s updates the progress_line properly 207s #step 207s character is a Pacdot 207s leaves the progress_line as it is 207s character is normal dot 207s removes the first • and puts a . 207s character is ghost 207s removes the first • and puts a ghosts 207s character is Pacman 207s removes the first • and puts a ᗧ 207s #next_step 207s when no offenses are detected 207s calls the step function with a dot 207s when a offense is detected in a file 207s calls the step function with a dot 207s 207s RuboCop::Cop::Layout::EmptyLineBetweenDefs 207s registers an offense for adjacent one-liners by default 207s doesn't allow more than the required number of newlines 207s accepts a nested def 207s autocorrects when there are too many new lines 207s finds offenses in inner classes 207s treats lines with whitespaces as blank 207s accepts a def that follows code and a comment 207s accepts a def that is the first of a module 207s accepts a def that follows an empty line and then a comment 207s accepts a def that follows a line with code 207s registers an offense for multiple one-liners on the same line 207s accepts the first def without leading empty line in a class 207s when multiple lines between defs are allowed 207s treats lines with whitespaces as blank 207s registers an offense and corrects when there are too many new lines 207s when a maximum of empty lines is specified 207s finds no offense for one empty line 207s finds no offense for no empty line 207s finds an offense for two empty lines 207s class methods 207s adjacent class methods 207s registers an offense for missing blank line between methods 207s mixed instance and class methods 207s registers an offense for missing blank line between methods 207s conditional method definitions 207s registers an offense for consecutive defs inside a conditional 207s accepts defs inside a conditional without blank lines in between 207s EmptyLineBetweenClassDefs 207s registers offense when no empty lines between class and method definitions 207s with AllowAdjacentOneLineDefs enabled 207s does not register offense 207s when disabled 207s does not register offense 207s EmptyLineBetweenModuleDefs 207s registers offense when no empty lines between module and method definitions 207s when disabled 207s does not register offense 207s endless methods 207s with AllowAdjacentOneLineDefs: false 207s registers an offense and corrects 207s between endless class method and regular methods 207s registers an offense and corrects 207s between endless class method and regular class methods 207s registers an offense and corrects 207s between endless and regular methods 207s registers an offense and corrects 207s with AllowAdjacentOneLineDefs: true 207s does not register an offense 207s between regular and endless methods 207s registers an offense and corrects 207s when empty lines between classes and modules together 207s registers offense when no empty lines between module and method definitions 207s when there are only comments between defs 207s registers an offense 207s when AllowAdjacentOneLineDefs is enabled 207s registers an offense for adjacent defs if some are multi-line 207s accepts adjacent one-liners 207s 207s RuboCop::Cop::Style::DocumentationMethod 207s when declaring methods outside a class 207s with both public and private methods 207s when required for non-public methods 207s registers an offense 207s when the public method has no documentation 207s registers an offense 207s when the public method has documentation 207s does not register an offense 207s when declaring methods for class instance 207s with documentation comment 207s does not register an offense with `end` on the same line 207s does not register an offense 207s when method is private 207s does not register an offense with inline `private` 207s does not register an offense with inline `private` and `end` 207s does not register an offense 207s does not register an offense with `end` on the same line 207s when required for non-public methods 207s registers an offense with `end` on the same line 207s registers an offense with inline `private` 207s registers an offense 207s registers an offense with inline `private` and `end` 207s with both public and private methods 207s when the public method has documentation 207s does not register an offense 207s when required for non-public methods 207s registers an offense 207s when the public method has no documentation 207s registers an offense 207s without documentation comment 207s registers an offense with `end` on the same line 207s registers an offense 207s when declaring methods in a class 207s without documentation comment 207s when method is public 207s registers an offense 207s registers an offense with `end` on the same line 207s when method is private 207s does not register an offense with inline `private` 207s does not register an offense 207s does not register an offense with inline `private` and `end` 207s does not register an offense with `end` on the same line 207s when required for non-public methods 207s registers an offense with inline `private` 207s registers an offense with inline `private` and `end` 207s registers an offense with `end` on the same line 207s registers an offense 207s with documentation comment 207s when method is public 207s does not register an offense with `end` on the same line 207s does not register an offense 207s with directive comment 207s registers an offense 207s with annotation comment 207s registers an offense 207s with both public and private methods 207s when the public method has no documentation 207s registers an offense 207s when the public method has documentation 207s does not register an offense 207s when required for non-public methods 207s registers an offense 207s without documentation comment 207s when method is public 207s registers an offense 207s registers an offense with `end` on the same line 207s registers an offense when method is public, but there were private methods before 207s when method is protected 207s does not register an offense with inline `protected` 207s does not register an offense 207s when required for non-public methods 207s registers an offense 207s registers an offense with inline `protected` 207s when method is private 207s does not register an offense 207s does not register an offense with inline `private` and `end` 207s does not register an offense with `end` on the same line 207s does not register an offense with inline `private` 207s when required for non-public methods 207s registers an offense with `end` on the same line 207s registers an offense 207s registers an offense with inline `private` and `end` 207s registers an offense with inline `private` 207s with documentation comment 207s does not register an offense 207s does not register an offense with `end` on the same line 207s when declaring methods in a module 207s with documentation comment 207s when method is public 207s does not register an offense 207s does not register an offense with `end` on the same line 207s when method is module_function 207s does not register an offense for separate def 207s does not register an offense for inline def 207s without documentation comment 207s when method is public 207s registers an offense 207s registers an offense with `end` on the same line 207s when method is module_function 207s registers an offense for inline def 207s registers an offense for separate def 207s when method is private 207s does not register an offense with inline `private` and `end` 207s does not register an offense 207s does not register an offense with inline `private` 207s does not register an offense with `end` on the same line 207s when required for non-public methods 207s registers an offense with inline `private` and `end` 207s registers an offense with `end` on the same line 207s registers an offense with inline `private` 207s registers an offense 207s with both public and private methods 207s when the public method has documentation 207s does not register an offense 207s when the public method has no documentation 207s registers an offense 207s when required for non-public methods 207s registers an offense 207s 207s RuboCop::Cop::Lint::MultipleComparison 207s registers an offense for x > y >= z 207s registers an offense for x <= y > z 207s accepts to use `^` operator 207s registers an offense for x <= y <= z 207s registers an offense for x >= y > z 207s registers an offense for x <= y >= z 207s registers an offense for x <= y < z 207s registers an offense for x < y < z 207s accepts to use `|` operator 207s registers an offense for x > y <= z 207s registers an offense for x < y <= z 207s registers an offense for x >= y >= z 207s registers an offense for x >= y <= z 207s registers an offense for x >= y < z 207s registers an offense for x > y > z 207s accepts to use one compare operator 207s registers an offense for x < y >= z 207s registers an offense for x > y < z 207s accepts to use `&` operator 207s registers an offense for x < y > z 207s 207s RuboCop::Cop::Layout::MultilineMethodParameterLineBreaks 207s when many parameters are on multiple lines, three on same line 207s registers an offense and corrects 207s when parameter's default value starts on same line but ends on different line 207s registers an offense and corrects 207s when many parameters including hash are on multiple lines, three on same line 207s registers an offense and corrects 207s when there are multiple parameters on the first line 207s registers an offense and corrects starting from the 2nd argument 207s when two parameters are on next line 207s does not add any offenses 207s when one parameter on same line 207s does not add any offenses 207s when there are no parameters 207s does not add any offenses 207s when many parameter are on multiple lines, two on same line 207s registers an offense and corrects 207s when second parameter starts on same line as end of first 207s registers an offense and corrects 207s 207s RuboCop::Cop::Metrics::Utils::AbcSizeCalculator 207s #calculate 207s when counting repeated calls 207s is expected to eq "<1, 4, 0>" 207s with &.foo 207s is expected to eq "<0, 4, 2>" 207s with repeated lvar receivers 207s is expected to eq "<3, 5, 3>" 207s if and arithmetic operations 207s is expected to eq "<2, 8, 4>" 207s same with extra condition 207s is expected to eq "<2, 9, 5>" 207s same but with 7 arguments 207s is expected to eq "<9, 3, 0>" 207s with &&= 207s is expected to eq "<2, 0, 1>" 207s with a block 207s is expected to eq "<2, 3, 0>" 207s multiple assignment 207s is expected to eq "<3, 1, 0>" 207s with .foo = 207s is expected to eq "<1, 2, 0>" 207s with a for 207s is expected to eq "<2, 1, 1>" 207s equivalent to multiple assignment with method setters 207s is expected to eq "<3, 5, 0>" 207s when discounting repeated calls 207s when some calls have arguments 207s is expected to eq "<1, 7, 0>" 207s when root receiver is self/nil 207s is expected to eq "<2, 9, 1>" 207s when root receiver is a var 207s is expected to eq "<3, 9, 0>" 207s with unused assignments 207s is expected to eq "<2, 1, 0>" 207s assignment with ternary operator 207s is expected to eq "<2, 6, 2>" 207s with []= 207s is expected to eq "<2, 1, 0>" 207s with a known iterating block 207s is expected to eq "<2, 4, 2>" 207s with += 207s is expected to eq "<2, 0, 0>" 207s elsif vs else if 207s elsif 207s is expected to eq "<0, 5, 3>" 207s else if 207s is expected to eq "<0, 5, 4>" 207s with a yield 207s is expected to eq "<0, 1, 0>" 207s method with arguments 207s is expected to eq "<4, 0, 0>" 207s multiple assignment with method setters 207s is expected to eq "<3, 5, 0>" 207s with += for setters 207s is expected to eq "<1, 2, 0>" 207s with ||= on a constant 207s is expected to eq "<1, 0, 1>" 207s with ||= 207s is expected to eq "<2, 0, 1>" 207s multiple calls with return 207s is expected to eq "<0, 3, 0>" 207s 207s RuboCop::Cop::Style::CharacterLiteral 207s registers an offense for character literals 207s registers an offense for literals like \n 207s accepts literals like ?\C-\M-d 207s autocorrects ?' to "'" 207s accepts ? in a %w literal 207s 207s RuboCop::Cop::Layout::EmptyComment 207s registers an offense and corrects an empty comment without space next to code 207s registers an offense and corrects using single line empty comment 207s registers an offense and corrects using multiline empty comments 207s register offenses and correct multiple empty comments next to code 207s does not register an offense when using comment text with leading and trailing blank lines 207s register offenses and correct multiple aligned empty comments next to code 207s registers an offense and corrects using an empty comment next to code 207s does not register an offense when using comment text 207s disallow border comment 207s registers an offense and corrects using border comment 207s registers an offense and corrects using single line empty comment 207s allow border comment (default) 207s does not register an offense when using border comment 207s disallow margin comment 207s registers an offense and corrects using margin comment 207s allow margin comment (default) 207s does not register an offense when using margin comment 207s 207s RuboCop::Cop::Style::SpecialGlobalVars 207s when style is use_perl_names 207s registers an offense for $LOADED_FEATURES 207s does not register an offense for backrefs like $1 207s autocorrects $INPUT_RECORD_SEPARATOR to $/ 207s registers an offense for $LOAD_PATH 207s registers an offense for $PROGRAM_NAME 207s registers an offense for $PROCESS_ID 207s autocorrects #{$LOAD_PATH} to #$: 207s registers an offense for $PID 207s when style is use_builtin_english_names 207s does not register an offense for backrefs like $1 207s does not register an offenses for builtin names 207s autocorrects non-preffered builtin names 207s does not register an offense for Perl names 207s generates correct auto-config when Perl variable names are used 207s generates correct auto-config when mixed styles are used 207s when style is use_english_names 207s when add require English is enabled 207s when English has not been required at top-level 207s does not add for replacement outside of English lib 207s adds require English for twice `$*` in nested code 207s adds require English for $$ 207s adds require English for $$ in nested code 207s when English is already required at top-level 207s leaves require English alone for $$ 207s moves require English above replacement 207s when add require English is disabled 207s generates correct auto-config when Perl variable names are used 207s does not register an offense for backrefs like $1 207s registers an offense for $: 207s autocorrects #{$!} to #{$ERROR_INFO} 207s is clear about variables from the English library vs those not 207s registers an offense for $" 207s generates correct auto-config when mixed styles are used 207s autocorrects $/ to $INPUT_RECORD_SEPARATOR 207s registers an offense for $$ 207s autocorrects #$: to #{$LOAD_PATH} 207s registers an offense for $0 207s 207s RuboCop::Cop::Lint::DeprecatedConstants 207s registers and corrects an offense when using deprecated methods that have no deprecated version 207s registers and corrects an offense when using `::Triple::Nested::Constant` 207s registers and corrects an offense when using `::NIL` 207s registers and corrects an offense when using `NIL` 207s registers and corrects an offense when using `FALSE` 207s registers and corrects an offense when using `::FALSE` 207s registers and corrects an offense when using `TRUE` 207s does not register an offense when not using deprecated constant 207s registers and corrects an offense when using `::TRUE` 207s registers and corrects an offense when using deprecated methods that have no alternative 207s does not register an offense when using `__ENCODING__ 207s Ruby <= 2.5 207s does not register an offense when using `Net::HTTPServerException` 207s Ruby >= 2.6 207s registers and corrects an offense when using `Net::HTTPServerException` 207s Ruby >= 3.0 207s registers and corrects an offense when using `::Random::DEFAULT` 207s registers and corrects an offense when using `Random::DEFAULT` 207s Ruby <= 2.7 207s does not register an offense when using `Random::DEFAULT` 207s 207s RuboCop::Cop::Style::RedundantException 207s reports an offense for a fail with ::RuntimeError and () 208s reports an offense for a raise with ::RuntimeError and () 208s accepts rescue w/ non redundant error 208s reports an offense for a raise with ::RuntimeError 208s reports an offense for a raise with RuntimeError and () 208s accepts a fail with ::RuntimeError if it does not have 2 args 208s reports an offense for a fail with RuntimeError.new 208s accepts rescue w/ non redundant error 208s accepts a raise with RuntimeError if it does not have 2 args 208s reports an offense for a raise with ::RuntimeError.new 208s reports an offense for a fail with RuntimeError 208s accepts a fail with RuntimeError if it does not have 2 args 208s reports an offense for a raise with RuntimeError.new 208s reports an offense for a raise with RuntimeError.new 208s reports an offense for a fail with RuntimeError.new 208s reports an offense for a fail with ::RuntimeError.new 208s accepts a raise with ::RuntimeError if it does not have 2 args 208s reports an offense for a fail with RuntimeError and () 208s accepts rescue w/ non redundant error 208s reports an offense for a raise with RuntimeError 208s accepts rescue w/ non redundant error 208s reports an offense for a fail with ::RuntimeError 208s reports an offense for a raise with ::RuntimeError.new 208s reports an offense for a fail with ::RuntimeError.new 208s 208s RuboCop::Cop::Style::StringMethods 208s registers an offense 208s when using safe navigation operator 208s registers an offense 208s 208s RuboCop::Cop::Style::FormatStringToken 208s ignores http links 208s works inside hashes 208s ignores time format and unrelated `format` method using 208s handles dstrs 208s ignores __FILE__ 208s ignores time format (when used as argument to strptime) 208s ignores percent escapes 208s ignores xstr 208s ignores time format (when used as argument to strftime) 208s ignores regexp 208s ignores placeholder arguments 208s ignores `%r` regexp 208s ignores time format when it is stored in a variable 208s supports flags and modifiers 208s behaves like enforced styles for format string tokens 208s when enforced style is template 208s detects when the cop must be disabled to avoid offenses 208s supports dynamic string with interpolation 208s configures the enforced style to template after inspecting "%{a}" 208s #correctable_sequence? 208s does not register offenses for annotated style 208s behaves like maximum allowed unannotated 208s when MaxUnannotatedPlaceholdersAllowed is 1 208s does not register offenses for single unannotated 208s does not register offenses for dual unannotated 208s when MaxUnannotatedPlaceholdersAllowed is 2 208s does not register offenses for dual unannotated 208s does not register offenses for single unannotated 208s when enforced style is unannotated 208s #correctable_sequence? 208s when enforced style is annotated 208s sets the enforced style to annotated after inspecting "%s" 208s supports dynamic string with interpolation 208s #correctable_sequence? 208s detects when the cop must be disabled to avoid offenses 208s registers offenses for template style 208s behaves like maximum allowed unannotated 208s when MaxUnannotatedPlaceholdersAllowed is 2 208s does not register offenses for dual unannotated 208s does not register offenses for single unannotated 208s when MaxUnannotatedPlaceholdersAllowed is 1 208s registers offense for dual unannotated 208s does not register offenses for single unannotated 208s behaves like enforced styles for format string tokens 208s when enforced style is annotated 208s #correctable_sequence? 208s detects when the cop must be disabled to avoid offenses 208s sets the enforced style to annotated after inspecting "%s" 208s supports dynamic string with interpolation 208s registers offenses for template style 208s behaves like maximum allowed unannotated 208s when MaxUnannotatedPlaceholdersAllowed is 2 208s does not register offenses for single unannotated 208s does not register offenses for dual unannotated 208s when MaxUnannotatedPlaceholdersAllowed is 1 208s does not register offenses for single unannotated 208s registers offense for dual unannotated 208s when enforced style is unannotated 208s #correctable_sequence? 208s when enforced style is template 208s supports dynamic string with interpolation 208s #correctable_sequence? 208s configures the enforced style to template after inspecting "%{a}" 208s does not register offenses for annotated style 208s detects when the cop must be disabled to avoid offenses 208s behaves like maximum allowed unannotated 208s when MaxUnannotatedPlaceholdersAllowed is 1 208s does not register offenses for dual unannotated 208s does not register offenses for single unannotated 208s when MaxUnannotatedPlaceholdersAllowed is 2 208s does not register offenses for dual unannotated 208s does not register offenses for single unannotated 208s behaves like enforced styles for format string tokens 208s when enforced style is unannotated 208s #correctable_sequence? 208s when enforced style is template 208s supports dynamic string with interpolation 208s configures the enforced style to template after inspecting "%{a}" 208s #correctable_sequence? 208s does not register offenses for annotated style 208s detects when the cop must be disabled to avoid offenses 208s behaves like maximum allowed unannotated 208s when MaxUnannotatedPlaceholdersAllowed is 2 208s does not register offenses for dual unannotated 208s does not register offenses for single unannotated 208s when MaxUnannotatedPlaceholdersAllowed is 1 208s does not register offenses for single unannotated 208s does not register offenses for dual unannotated 208s when enforced style is annotated 208s supports dynamic string with interpolation 208s #correctable_sequence? 208s registers offenses for template style 208s sets the enforced style to annotated after inspecting "%s" 208s detects when the cop must be disabled to avoid offenses 208s behaves like maximum allowed unannotated 208s when MaxUnannotatedPlaceholdersAllowed is 2 208s does not register offenses for dual unannotated 208s does not register offenses for single unannotated 208s when MaxUnannotatedPlaceholdersAllowed is 1 208s does not register offenses for single unannotated 208s registers offense for dual unannotated 208s behaves like enforced styles for format string tokens 208s when enforced style is unannotated 208s #correctable_sequence? 208s when enforced style is template 208s configures the enforced style to template after inspecting "%{a}" 208s does not register offenses for annotated style 208s #correctable_sequence? 208s supports dynamic string with interpolation 208s detects when the cop must be disabled to avoid offenses 208s behaves like maximum allowed unannotated 208s when MaxUnannotatedPlaceholdersAllowed is 2 208s does not register offenses for dual unannotated 208s does not register offenses for single unannotated 208s when MaxUnannotatedPlaceholdersAllowed is 1 208s does not register offenses for single unannotated 208s does not register offenses for dual unannotated 208s when enforced style is annotated 208s supports dynamic string with interpolation 208s detects when the cop must be disabled to avoid offenses 208s sets the enforced style to annotated after inspecting "%s" 208s registers offenses for template style 208s #correctable_sequence? 208s behaves like maximum allowed unannotated 208s when MaxUnannotatedPlaceholdersAllowed is 1 208s registers offense for dual unannotated 208s does not register offenses for single unannotated 208s when MaxUnannotatedPlaceholdersAllowed is 2 208s does not register offenses for dual unannotated 208s does not register offenses for single unannotated 208s behaves like enforced styles for format string tokens 208s when enforced style is unannotated 208s #correctable_sequence? 208s when enforced style is template 208s does not register offenses for annotated style 208s detects when the cop must be disabled to avoid offenses 208s #correctable_sequence? 208s configures the enforced style to template after inspecting "%{a}" 208s supports dynamic string with interpolation 208s behaves like maximum allowed unannotated 208s when MaxUnannotatedPlaceholdersAllowed is 2 208s does not register offenses for single unannotated 208s does not register offenses for dual unannotated 208s when MaxUnannotatedPlaceholdersAllowed is 1 208s does not register offenses for single unannotated 208s does not register offenses for dual unannotated 208s when enforced style is annotated 208s sets the enforced style to annotated after inspecting "%s" 208s supports dynamic string with interpolation 208s detects when the cop must be disabled to avoid offenses 208s registers offenses for template style 208s #correctable_sequence? 208s behaves like maximum allowed unannotated 208s when MaxUnannotatedPlaceholdersAllowed is 1 208s does not register offenses for single unannotated 208s registers offense for dual unannotated 208s when MaxUnannotatedPlaceholdersAllowed is 2 208s does not register offenses for dual unannotated 208s does not register offenses for single unannotated 208s behaves like enforced styles for format string tokens 208s when enforced style is unannotated 208s #correctable_sequence? 208s when enforced style is template 208s configures the enforced style to template after inspecting "%{a}" 208s detects when the cop must be disabled to avoid offenses 208s supports dynamic string with interpolation 208s does not register offenses for annotated style 208s #correctable_sequence? 208s behaves like maximum allowed unannotated 208s when MaxUnannotatedPlaceholdersAllowed is 2 208s does not register offenses for single unannotated 208s does not register offenses for dual unannotated 208s when MaxUnannotatedPlaceholdersAllowed is 1 208s does not register offenses for dual unannotated 208s does not register offenses for single unannotated 208s when enforced style is annotated 208s #correctable_sequence? 208s sets the enforced style to annotated after inspecting "%s" 208s detects when the cop must be disabled to avoid offenses 208s supports dynamic string with interpolation 208s registers offenses for template style 208s behaves like maximum allowed unannotated 208s when MaxUnannotatedPlaceholdersAllowed is 1 208s registers offense for dual unannotated 208s does not register offenses for single unannotated 208s when MaxUnannotatedPlaceholdersAllowed is 2 208s does not register offenses for single unannotated 208s does not register offenses for dual unannotated 208s behaves like enforced styles for format string tokens 208s when enforced style is unannotated 208s #correctable_sequence? 208s when enforced style is annotated 208s supports dynamic string with interpolation 208s detects when the cop must be disabled to avoid offenses 208s #correctable_sequence? 208s sets the enforced style to annotated after inspecting "%s" 208s registers offenses for template style 208s behaves like maximum allowed unannotated 208s when MaxUnannotatedPlaceholdersAllowed is 2 208s does not register offenses for dual unannotated 208s does not register offenses for single unannotated 208s when MaxUnannotatedPlaceholdersAllowed is 1 208s does not register offenses for single unannotated 208s registers offense for dual unannotated 208s when enforced style is template 208s supports dynamic string with interpolation 208s registers offenses for annotated style 208s #correctable_sequence? 208s configures the enforced style to template after inspecting "%{a}" 208s detects when the cop must be disabled to avoid offenses 208s behaves like maximum allowed unannotated 208s when MaxUnannotatedPlaceholdersAllowed is 2 208s does not register offenses for dual unannotated 208s does not register offenses for single unannotated 208s when MaxUnannotatedPlaceholdersAllowed is 1 208s does not register offenses for single unannotated 208s registers offense for dual unannotated 208s behaves like enforced styles for format string tokens 208s when enforced style is template 208s #correctable_sequence? 208s supports dynamic string with interpolation 208s configures the enforced style to template after inspecting "%{a}" 208s detects when the cop must be disabled to avoid offenses 208s does not register offenses for annotated style 208s behaves like maximum allowed unannotated 208s when MaxUnannotatedPlaceholdersAllowed is 2 208s does not register offenses for dual unannotated 208s does not register offenses for single unannotated 208s when MaxUnannotatedPlaceholdersAllowed is 1 208s does not register offenses for single unannotated 208s does not register offenses for dual unannotated 208s when enforced style is unannotated 208s #correctable_sequence? 208s when enforced style is annotated 208s detects when the cop must be disabled to avoid offenses 208s sets the enforced style to annotated after inspecting "%s" 208s #correctable_sequence? 208s registers offenses for template style 208s supports dynamic string with interpolation 208s behaves like maximum allowed unannotated 208s when MaxUnannotatedPlaceholdersAllowed is 2 208s does not register offenses for single unannotated 208s does not register offenses for dual unannotated 208s when MaxUnannotatedPlaceholdersAllowed is 1 208s does not register offenses for single unannotated 208s registers offense for dual unannotated 208s behaves like enforced styles for format string tokens 208s when enforced style is unannotated 208s #correctable_sequence? 208s when enforced style is annotated 208s registers offenses for template style 208s sets the enforced style to annotated after inspecting "%s" 208s supports dynamic string with interpolation 208s detects when the cop must be disabled to avoid offenses 208s #correctable_sequence? 208s behaves like maximum allowed unannotated 208s when MaxUnannotatedPlaceholdersAllowed is 1 208s does not register offenses for single unannotated 208s registers offense for dual unannotated 208s when MaxUnannotatedPlaceholdersAllowed is 2 208s does not register offenses for dual unannotated 208s does not register offenses for single unannotated 208s when enforced style is template 208s does not register offenses for annotated style 208s #correctable_sequence? 208s supports dynamic string with interpolation 208s configures the enforced style to template after inspecting "%{a}" 208s detects when the cop must be disabled to avoid offenses 208s behaves like maximum allowed unannotated 208s when MaxUnannotatedPlaceholdersAllowed is 1 208s does not register offenses for single unannotated 208s does not register offenses for dual unannotated 208s when MaxUnannotatedPlaceholdersAllowed is 2 208s does not register offenses for dual unannotated 208s does not register offenses for single unannotated 208s when enforced style is annotated 208s gives a helpful error message 208s when AllowedMethods is enabled 208s does not register an offense for value in nested structure 208s does not register an offense 208s registers an offense for different method call within ignored method 208s when AllowedPatterns is disabled 208s registers an offense 208s when AllowedMethods is disabled 208s registers an offense 208s when AllowedPatterns is enabled 208s does not register an offense for value in nested structure 208s does not register an offense 208s registers an offense for different method call within ignored method 208s behaves like enforced styles for format string tokens 208s when enforced style is unannotated 208s #correctable_sequence? 208s when enforced style is annotated 208s registers offenses for template style 208s #correctable_sequence? 208s sets the enforced style to annotated after inspecting "%s" 208s detects when the cop must be disabled to avoid offenses 208s supports dynamic string with interpolation 208s behaves like maximum allowed unannotated 208s when MaxUnannotatedPlaceholdersAllowed is 1 208s registers offense for dual unannotated 208s does not register offenses for single unannotated 208s when MaxUnannotatedPlaceholdersAllowed is 2 208s does not register offenses for single unannotated 208s does not register offenses for dual unannotated 208s when enforced style is template 208s does not register offenses for annotated style 208s supports dynamic string with interpolation 208s configures the enforced style to template after inspecting "%{a}" 208s #correctable_sequence? 208s detects when the cop must be disabled to avoid offenses 208s behaves like maximum allowed unannotated 208s when MaxUnannotatedPlaceholdersAllowed is 1 208s does not register offenses for single unannotated 208s does not register offenses for dual unannotated 208s when MaxUnannotatedPlaceholdersAllowed is 2 208s does not register offenses for dual unannotated 208s does not register offenses for single unannotated 208s behaves like enforced styles for format string tokens 208s when enforced style is annotated 208s registers offenses for template style 208s supports dynamic string with interpolation 208s detects when the cop must be disabled to avoid offenses 208s sets the enforced style to annotated after inspecting "%s" 208s #correctable_sequence? 208s behaves like maximum allowed unannotated 208s when MaxUnannotatedPlaceholdersAllowed is 1 208s registers offense for dual unannotated 208s does not register offenses for single unannotated 208s when MaxUnannotatedPlaceholdersAllowed is 2 208s does not register offenses for single unannotated 208s does not register offenses for dual unannotated 208s when enforced style is template 208s detects when the cop must be disabled to avoid offenses 208s #correctable_sequence? 208s configures the enforced style to template after inspecting "%{a}" 208s supports dynamic string with interpolation 208s does not register offenses for annotated style 208s behaves like maximum allowed unannotated 208s when MaxUnannotatedPlaceholdersAllowed is 1 208s does not register offenses for single unannotated 208s does not register offenses for dual unannotated 208s when MaxUnannotatedPlaceholdersAllowed is 2 208s does not register offenses for dual unannotated 208s does not register offenses for single unannotated 208s when enforced style is unannotated 208s #correctable_sequence? 208s when enforced style is unannotated 208s gives a helpful error message 208s behaves like enforced styles for format string tokens 208s when enforced style is template 208s supports dynamic string with interpolation 208s does not register offenses for annotated style 208s configures the enforced style to template after inspecting "%{a}" 208s #correctable_sequence? 208s detects when the cop must be disabled to avoid offenses 208s behaves like maximum allowed unannotated 208s when MaxUnannotatedPlaceholdersAllowed is 2 208s does not register offenses for single unannotated 208s does not register offenses for dual unannotated 208s when MaxUnannotatedPlaceholdersAllowed is 1 208s does not register offenses for single unannotated 208s does not register offenses for dual unannotated 208s when enforced style is annotated 209s sets the enforced style to annotated after inspecting "%s" 209s detects when the cop must be disabled to avoid offenses 209s supports dynamic string with interpolation 209s #correctable_sequence? 209s registers offenses for template style 209s behaves like maximum allowed unannotated 209s when MaxUnannotatedPlaceholdersAllowed is 2 209s does not register offenses for dual unannotated 209s does not register offenses for single unannotated 209s when MaxUnannotatedPlaceholdersAllowed is 1 209s does not register offenses for single unannotated 209s registers offense for dual unannotated 209s when enforced style is unannotated 209s #correctable_sequence? 209s when enforced style is template 209s gives a helpful error message 209s behaves like enforced styles for format string tokens 209s when enforced style is unannotated 209s #correctable_sequence? 209s when enforced style is template 209s configures the enforced style to template after inspecting "%{a}" 209s #correctable_sequence? 209s detects when the cop must be disabled to avoid offenses 209s does not register offenses for annotated style 209s supports dynamic string with interpolation 209s behaves like maximum allowed unannotated 209s when MaxUnannotatedPlaceholdersAllowed is 2 209s does not register offenses for single unannotated 209s does not register offenses for dual unannotated 209s when MaxUnannotatedPlaceholdersAllowed is 1 209s does not register offenses for single unannotated 209s does not register offenses for dual unannotated 209s when enforced style is annotated 209s detects when the cop must be disabled to avoid offenses 209s supports dynamic string with interpolation 209s sets the enforced style to annotated after inspecting "%s" 209s registers offenses for template style 209s #correctable_sequence? 209s behaves like maximum allowed unannotated 209s when MaxUnannotatedPlaceholdersAllowed is 1 209s registers offense for dual unannotated 209s does not register offenses for single unannotated 209s when MaxUnannotatedPlaceholdersAllowed is 2 209s does not register offenses for single unannotated 209s does not register offenses for dual unannotated 209s behaves like enforced styles for format string tokens 209s when enforced style is unannotated 209s #correctable_sequence? 209s when enforced style is template 209s #correctable_sequence? 209s supports dynamic string with interpolation 209s does not register offenses for annotated style 209s configures the enforced style to template after inspecting "%{a}" 209s detects when the cop must be disabled to avoid offenses 209s behaves like maximum allowed unannotated 209s when MaxUnannotatedPlaceholdersAllowed is 2 209s does not register offenses for dual unannotated 209s does not register offenses for single unannotated 209s when MaxUnannotatedPlaceholdersAllowed is 1 209s does not register offenses for single unannotated 209s does not register offenses for dual unannotated 209s when enforced style is annotated 209s supports dynamic string with interpolation 209s detects when the cop must be disabled to avoid offenses 209s registers offenses for template style 209s sets the enforced style to annotated after inspecting "%s" 209s #correctable_sequence? 209s behaves like maximum allowed unannotated 209s when MaxUnannotatedPlaceholdersAllowed is 2 209s does not register offenses for single unannotated 209s does not register offenses for dual unannotated 209s when MaxUnannotatedPlaceholdersAllowed is 1 209s does not register offenses for single unannotated 209s registers offense for dual unannotated 209s behaves like enforced styles for format string tokens 209s when enforced style is annotated 209s sets the enforced style to annotated after inspecting "%s" 209s #correctable_sequence? 209s detects when the cop must be disabled to avoid offenses 209s supports dynamic string with interpolation 209s registers offenses for template style 209s behaves like maximum allowed unannotated 209s when MaxUnannotatedPlaceholdersAllowed is 1 209s does not register offenses for single unannotated 209s registers offense for dual unannotated 209s when MaxUnannotatedPlaceholdersAllowed is 2 209s does not register offenses for single unannotated 209s does not register offenses for dual unannotated 209s when enforced style is unannotated 209s #correctable_sequence? 209s when enforced style is template 209s detects when the cop must be disabled to avoid offenses 209s #correctable_sequence? 209s does not register offenses for annotated style 209s supports dynamic string with interpolation 209s configures the enforced style to template after inspecting "%{a}" 209s behaves like maximum allowed unannotated 209s when MaxUnannotatedPlaceholdersAllowed is 2 209s does not register offenses for single unannotated 209s does not register offenses for dual unannotated 209s when MaxUnannotatedPlaceholdersAllowed is 1 209s does not register offenses for single unannotated 209s does not register offenses for dual unannotated 209s behaves like enforced styles for format string tokens 209s when enforced style is unannotated 209s #correctable_sequence? 209s when enforced style is annotated 209s sets the enforced style to annotated after inspecting "%s" 209s supports dynamic string with interpolation 209s #correctable_sequence? 209s registers offenses for template style 209s detects when the cop must be disabled to avoid offenses 209s behaves like maximum allowed unannotated 209s when MaxUnannotatedPlaceholdersAllowed is 2 209s does not register offenses for single unannotated 209s does not register offenses for dual unannotated 209s when MaxUnannotatedPlaceholdersAllowed is 1 209s does not register offenses for single unannotated 209s registers offense for dual unannotated 209s when enforced style is template 209s does not register offenses for annotated style 209s supports dynamic string with interpolation 209s configures the enforced style to template after inspecting "%{a}" 209s detects when the cop must be disabled to avoid offenses 209s #correctable_sequence? 209s behaves like maximum allowed unannotated 209s when MaxUnannotatedPlaceholdersAllowed is 2 209s does not register offenses for single unannotated 209s does not register offenses for dual unannotated 209s when MaxUnannotatedPlaceholdersAllowed is 1 209s does not register offenses for single unannotated 209s does not register offenses for dual unannotated 209s behaves like enforced styles for format string tokens 209s when enforced style is annotated 209s sets the enforced style to annotated after inspecting "%s" 209s #correctable_sequence? 209s supports dynamic string with interpolation 209s detects when the cop must be disabled to avoid offenses 209s registers offenses for template style 209s behaves like maximum allowed unannotated 209s when MaxUnannotatedPlaceholdersAllowed is 2 209s does not register offenses for single unannotated 209s does not register offenses for dual unannotated 209s when MaxUnannotatedPlaceholdersAllowed is 1 209s registers offense for dual unannotated 209s does not register offenses for single unannotated 209s when enforced style is template 209s configures the enforced style to template after inspecting "%{a}" 209s detects when the cop must be disabled to avoid offenses 209s does not register offenses for annotated style 209s supports dynamic string with interpolation 209s #correctable_sequence? 209s behaves like maximum allowed unannotated 209s when MaxUnannotatedPlaceholdersAllowed is 1 209s does not register offenses for single unannotated 209s does not register offenses for dual unannotated 209s when MaxUnannotatedPlaceholdersAllowed is 2 209s does not register offenses for dual unannotated 209s does not register offenses for single unannotated 209s when enforced style is unannotated 209s #correctable_sequence? 209s behaves like enforced styles for format string tokens 209s when enforced style is unannotated 209s #correctable_sequence? 209s when enforced style is annotated 209s #correctable_sequence? 209s detects when the cop must be disabled to avoid offenses 209s supports dynamic string with interpolation 209s registers offenses for template style 209s sets the enforced style to annotated after inspecting "%s" 209s behaves like maximum allowed unannotated 209s when MaxUnannotatedPlaceholdersAllowed is 2 209s does not register offenses for dual unannotated 209s does not register offenses for single unannotated 209s when MaxUnannotatedPlaceholdersAllowed is 1 209s does not register offenses for single unannotated 209s registers offense for dual unannotated 209s when enforced style is template 209s detects when the cop must be disabled to avoid offenses 209s does not register offenses for annotated style 209s supports dynamic string with interpolation 209s #correctable_sequence? 209s configures the enforced style to template after inspecting "%{a}" 209s behaves like maximum allowed unannotated 209s when MaxUnannotatedPlaceholdersAllowed is 2 209s does not register offenses for single unannotated 209s does not register offenses for dual unannotated 209s when MaxUnannotatedPlaceholdersAllowed is 1 209s does not register offenses for single unannotated 209s does not register offenses for dual unannotated 209s 209s RuboCop::Cop::Lint::Syntax 209s .offenses_from_processed_source 209s with a parser error 209s returns an offense 209s with --display-cop-names option 209s returns an offense with cop name 209s with a diagnostic error 209s returns an offense 209s with --display-cop-names option 209s returns an offense with cop name 209s with --autocorrect --disable-uncorrectable options 209s returns an offense 209s 209s RuboCop::Cop::Style::MutableConstant 209s Strict: true 209s freezes a heredoc 209s allows calls to freeze 209s splat expansion 209s expansion of a range 209s registers an offense and corrects to use to_a.freeze 209s with parentheses 209s registers an offense and corrects to use to_a.freeze 209s behaves like mutable objects 209s when assigning with = 209s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 209s when assigning with ||= 209s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 209s behaves like immutable objects 209s allows OTHER_CONST to be assigned to a constant 209s allows OTHER_CONST to be ||= to a constant 209s behaves like mutable objects 209s when assigning with ||= 209s registers an offense for Something.new assigned to a constant and corrects by adding .freeze 209s when assigning with = 209s registers an offense for Something.new assigned to a constant and corrects by adding .freeze 209s behaves like immutable objects 209s allows ENV['foo'] to be ||= to a constant 209s allows ENV['foo'] to be assigned to a constant 209s behaves like immutable objects 209s allows Namespace::OTHER_CONST to be assigned to a constant 209s allows Namespace::OTHER_CONST to be ||= to a constant 209s operators that produce unfrozen objects 209s registers an offense when operating on multiple strings 209s registers an offense when operating on a constant and a string 209s when assigning with multiple operator calls 209s registers an offense and corrects with parens and freeze 209s behaves like mutable objects 209s when assigning with ||= 209s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 209s when assigning with = 209s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 209s when assigning an array without brackets 209s does not insert brackets for %w() arrays 209s adds brackets when autocorrecting 209s behaves like mutable objects 209s when assigning with ||= 209s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 209s when assigning with = 209s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 209s behaves like immutable objects 209s allows ::OTHER_CONST to be ||= to a constant 209s allows ::OTHER_CONST to be assigned to a constant 209s behaves like mutable objects 209s when assigning with ||= 209s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 209s when assigning with = 209s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 209s behaves like mutable objects 209s when assigning with = 209s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 209s when assigning with ||= 209s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 209s behaves like immutable objects 209s allows ::ENV['foo'] to be assigned to a constant 209s allows ::ENV['foo'] to be ||= to a constant 209s methods and operators that produce frozen objects 209s accepts operating on multiple floats 209s accepts comparison operators 209s accepts checking fixed size 209s accepts assigning to an environment variable with a fallback 209s accepts operating on a constant and an interger 209s accepts operating on multiple integers 209s accepts operating on a constant and a float 209s behaves like immutable objects 209s allows Struct.new(:node) do 209s def assignment? 209s true 209s end 209s end 209s to be ||= to a constant 209s allows Struct.new(:node) do 209s def assignment? 209s true 209s end 209s end 209s to be assigned to a constant 209s behaves like immutable objects 209s allows Struct.new(:a, :b) to be ||= to a constant 209s allows Struct.new(:a, :b) to be assigned to a constant 209s behaves like immutable objects 209s allows ::Namespace::OTHER_CONST to be ||= to a constant 209s allows ::Namespace::OTHER_CONST to be assigned to a constant 209s behaves like string literal 209s Ruby 3.0 or higher 209s when the frozen string literal comment is missing 209s behaves like mutable objects 209s when assigning with ||= 209s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 209s when assigning with = 209s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 209s when the frozen string literal comment is false 209s behaves like mutable objects 209s when assigning with = 209s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 209s when assigning with ||= 209s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 209s when the frozen string literal comment is true 209s does not register an offense when using a multiline string 209s registers an offense when using interpolated heredoc constant 209s registers an offense when using a multiline string with interpolation 209s behaves like mutable objects 209s when assigning with = 209s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 209s when assigning with ||= 209s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 209s behaves like immutable objects 209s allows <<~HERE 209s foo 209s bar 209s HERE 209s to be ||= to a constant 209s allows <<~HERE 209s foo 209s bar 209s HERE 209s to be assigned to a constant 209s Ruby 2.7 or lower 209s when the frozen string literal comment is false 209s behaves like mutable objects 209s when assigning with ||= 209s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 209s when assigning with = 209s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 209s when the frozen string literal comment is true 209s does not register an offense when using interpolated heredoc constant 209s does not register an offense when using a multiline string 209s behaves like immutable objects 209s allows "#{a}" to be ||= to a constant 209s allows "#{a}" to be assigned to a constant 209s behaves like immutable objects 209s allows <<~HERE 209s foo 209s bar 209s HERE 209s to be assigned to a constant 209s allows <<~HERE 209s foo 209s bar 209s HERE 209s to be ||= to a constant 209s when the frozen string literal comment is missing 209s behaves like mutable objects 209s when assigning with ||= 209s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 209s when assigning with = 209s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 209s behaves like immutable objects 209s allows 1.5 to be ||= to a constant 209s allows 1.5 to be assigned to a constant 209s behaves like immutable objects 209s allows Struct.new to be ||= to a constant 209s allows Struct.new to be assigned to a constant 209s behaves like immutable objects 209s allows :sym to be ||= to a constant 209s allows :sym to be assigned to a constant 209s behaves like immutable objects 209s allows ::Struct.new to be assigned to a constant 209s allows ::Struct.new to be ||= to a constant 209s behaves like immutable objects 209s allows 1 to be ||= to a constant 209s allows 1 to be assigned to a constant 209s when assigning with an operator 209s behaves like operator methods 209s registers an offense and corrects with parens and freeze 209s behaves like operator methods 209s registers an offense and corrects with parens and freeze 209s behaves like operator methods 209s registers an offense and corrects with parens and freeze 209s behaves like operator methods 209s registers an offense and corrects with parens and freeze 209s behaves like operator methods 209s registers an offense and corrects with parens and freeze 209s behaves like operator methods 209s registers an offense and corrects with parens and freeze 209s Strict: false 209s allows method call assignments 209s when assigning an array without brackets 209s adds brackets when autocorrecting 209s does not insert brackets for %w() arrays 209s behaves like immutable objects 209s allows ENV['foo'] to be assigned to a constant 209s allows ENV['foo'] to be ||= to a constant 209s behaves like immutable objects 209s allows 'foo' + 'bar' to be ||= to a constant 209s allows 'foo' + 'bar' to be assigned to a constant 209s behaves like immutable objects 209s allows ::ENV['foo'] to be assigned to a constant 209s allows ::ENV['foo'] to be ||= to a constant 209s behaves like mutable objects 209s when assigning with ||= 209s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 209s when assigning with = 209s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 209s behaves like immutable objects 209s allows :sym to be ||= to a constant 209s allows :sym to be assigned to a constant 209s behaves like immutable objects 209s allows FOO - BAR to be assigned to a constant 209s allows FOO - BAR to be ||= to a constant 209s behaves like mutable objects 209s when assigning with ||= 209s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 209s when assigning with = 209s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 209s behaves like immutable objects 209s allows 1 to be ||= to a constant 209s allows 1 to be assigned to a constant 209s Ruby 2.7 or lower 209s when assigning a range (irange) without parenthesis 209s adds parentheses when autocorrecting 209s does not insert parenthesis to range enclosed in parentheses 209s when assigning a range (erange) without parenthesis 209s does not insert parenthesis to range enclosed in parentheses 209s adds parentheses when autocorrecting 209s when using shareable_constant_values 209s behaves like literals that are not frozen 209s behaves like immutable objects 209s allows 1.5 to be ||= to a constant 209s allows 1.5 to be assigned to a constant 209s behaves like mutable objects 209s when assigning with ||= 209s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 209s when assigning with = 209s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 209s behaves like immutable objects 209s allows ENV['foo'] to be assigned to a constant 209s allows ENV['foo'] to be ||= to a constant 209s behaves like immutable objects 209s allows :sym to be ||= to a constant 209s allows :sym to be assigned to a constant 209s behaves like immutable objects 209s allows 1 to be assigned to a constant 209s allows 1 to be ||= to a constant 209s behaves like mutable objects 209s when assigning with ||= 209s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 209s when assigning with = 209s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 209s behaves like immutable objects 209s allows FOO + BAR to be assigned to a constant 209s allows FOO + BAR to be ||= to a constant 209s behaves like immutable objects 209s allows ::ENV['foo'] to be ||= to a constant 209s allows ::ENV['foo'] to be assigned to a constant 209s behaves like mutable objects 209s when assigning with ||= 209s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 209s when assigning with = 209s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 209s behaves like immutable objects 209s allows FOO - BAR to be assigned to a constant 209s allows FOO - BAR to be ||= to a constant 209s behaves like mutable objects 209s when assigning with ||= 209s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 209s when assigning with = 209s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 209s behaves like immutable objects 209s allows 'foo' + 'bar' to be ||= to a constant 209s allows 'foo' + 'bar' to be assigned to a constant 209s behaves like mutable objects 209s when assigning with = 209s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 209s when assigning with ||= 209s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 209s behaves like literals that are not frozen 209s behaves like immutable objects 209s allows 1 to be ||= to a constant 209s allows 1 to be assigned to a constant 209s behaves like immutable objects 209s allows :sym to be ||= to a constant 209s allows :sym to be assigned to a constant 209s behaves like mutable objects 209s when assigning with ||= 209s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 209s when assigning with = 209s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 209s behaves like mutable objects 209s when assigning with ||= 209s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 209s when assigning with = 209s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 209s behaves like immutable objects 209s allows 1.5 to be ||= to a constant 209s allows 1.5 to be assigned to a constant 209s behaves like mutable objects 209s when assigning with = 209s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 209s when assigning with ||= 209s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 209s behaves like immutable objects 209s allows FOO - BAR to be assigned to a constant 209s allows FOO - BAR to be ||= to a constant 209s behaves like immutable objects 209s allows ::ENV['foo'] to be ||= to a constant 209s allows ::ENV['foo'] to be assigned to a constant 209s behaves like mutable objects 209s when assigning with = 209s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 209s when assigning with ||= 209s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 209s behaves like immutable objects 209s allows ENV['foo'] to be assigned to a constant 209s allows ENV['foo'] to be ||= to a constant 209s behaves like immutable objects 209s allows FOO + BAR to be assigned to a constant 209s allows FOO + BAR to be ||= to a constant 209s behaves like mutable objects 209s when assigning with ||= 209s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 209s when assigning with = 210s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 210s behaves like immutable objects 210s allows 'foo' + 'bar' to be ||= to a constant 210s allows 'foo' + 'bar' to be assigned to a constant 210s behaves like literals that are not frozen 210s behaves like immutable objects 210s allows :sym to be ||= to a constant 210s allows :sym to be assigned to a constant 210s behaves like mutable objects 210s when assigning with = 210s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 210s when assigning with ||= 210s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 210s behaves like mutable objects 210s when assigning with ||= 210s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 210s when assigning with = 210s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 210s behaves like mutable objects 210s when assigning with = 210s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 210s when assigning with ||= 210s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 210s behaves like immutable objects 210s allows ::ENV['foo'] to be ||= to a constant 210s allows ::ENV['foo'] to be assigned to a constant 210s behaves like mutable objects 210s when assigning with = 210s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 210s when assigning with ||= 210s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 210s behaves like immutable objects 210s allows 'foo' + 'bar' to be assigned to a constant 210s allows 'foo' + 'bar' to be ||= to a constant 210s behaves like immutable objects 210s allows FOO - BAR to be assigned to a constant 210s allows FOO - BAR to be ||= to a constant 210s behaves like immutable objects 210s allows ENV['foo'] to be assigned to a constant 210s allows ENV['foo'] to be ||= to a constant 210s behaves like immutable objects 210s allows 1 to be ||= to a constant 210s allows 1 to be assigned to a constant 210s behaves like mutable objects 210s when assigning with = 210s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 210s when assigning with ||= 210s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 210s behaves like immutable objects 210s allows 1.5 to be ||= to a constant 210s allows 1.5 to be assigned to a constant 210s behaves like immutable objects 210s allows FOO + BAR to be assigned to a constant 210s allows FOO + BAR to be ||= to a constant 210s behaves like literals that are not frozen 210s behaves like immutable objects 210s allows FOO - BAR to be ||= to a constant 210s allows FOO - BAR to be assigned to a constant 210s behaves like mutable objects 210s when assigning with ||= 210s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 210s when assigning with = 210s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 210s behaves like immutable objects 210s allows ENV['foo'] to be ||= to a constant 210s allows ENV['foo'] to be assigned to a constant 210s behaves like immutable objects 210s allows 1 to be ||= to a constant 210s allows 1 to be assigned to a constant 210s behaves like mutable objects 210s when assigning with ||= 210s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 210s when assigning with = 210s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 210s behaves like immutable objects 210s allows ::ENV['foo'] to be ||= to a constant 210s allows ::ENV['foo'] to be assigned to a constant 210s behaves like mutable objects 210s when assigning with ||= 210s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 210s when assigning with = 210s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 210s behaves like mutable objects 210s when assigning with = 210s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 210s when assigning with ||= 210s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 210s behaves like mutable objects 210s when assigning with = 210s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 210s when assigning with ||= 210s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 210s behaves like immutable objects 210s allows 1.5 to be assigned to a constant 210s allows 1.5 to be ||= to a constant 210s behaves like immutable objects 210s allows :sym to be ||= to a constant 210s allows :sym to be assigned to a constant 210s behaves like immutable objects 210s allows FOO + BAR to be assigned to a constant 210s allows FOO + BAR to be ||= to a constant 210s behaves like immutable objects 210s allows 'foo' + 'bar' to be ||= to a constant 210s allows 'foo' + 'bar' to be assigned to a constant 210s when assigning a regexp 210s registers an offense 210s Ruby 3.0 or higher 210s raises offense when shareable_constant_value is specified as an inline comment 210s raises offense only for shareable_constant_value as none when set in the order of: literal, none and experimental_everything 210s when using shareable_constant_value 210s behaves like literals that are frozen 210s behaves like immutable objects 210s allows FOO - BAR to be ||= to a constant 210s allows FOO - BAR to be assigned to a constant 210s behaves like immutable objects 210s allows 1.5 to be ||= to a constant 210s allows 1.5 to be assigned to a constant 210s behaves like immutable objects 210s allows { a: 1, b: 2 } to be ||= to a constant 210s allows { a: 1, b: 2 } to be assigned to a constant 210s behaves like immutable objects 210s allows 1 to be ||= to a constant 210s allows 1 to be assigned to a constant 210s behaves like immutable objects 210s allows [1, 2, 3] to be assigned to a constant 210s allows [1, 2, 3] to be ||= to a constant 210s behaves like immutable objects 210s allows ENV['foo'] to be assigned to a constant 210s allows ENV['foo'] to be ||= to a constant 210s behaves like immutable objects 210s allows "top#{1 + 2}" to be assigned to a constant 210s allows "top#{1 + 2}" to be ||= to a constant 210s behaves like immutable objects 210s allows FOO + BAR to be ||= to a constant 210s allows FOO + BAR to be assigned to a constant 210s behaves like immutable objects 210s allows ::ENV['foo'] to be ||= to a constant 210s allows ::ENV['foo'] to be assigned to a constant 210s behaves like immutable objects 210s allows %w(a b c) to be ||= to a constant 210s allows %w(a b c) to be assigned to a constant 210s behaves like immutable objects 210s allows 'foo' + 'bar' to be assigned to a constant 210s allows 'foo' + 'bar' to be ||= to a constant 210s behaves like immutable objects 210s allows 'str' to be assigned to a constant 210s allows 'str' to be ||= to a constant 210s behaves like immutable objects 210s allows :sym to be assigned to a constant 210s allows :sym to be ||= to a constant 210s behaves like literals that are frozen 210s behaves like immutable objects 210s allows 'foo' + 'bar' to be assigned to a constant 210s allows 'foo' + 'bar' to be ||= to a constant 210s behaves like immutable objects 210s allows [1, 2, 3] to be assigned to a constant 210s allows [1, 2, 3] to be ||= to a constant 210s behaves like immutable objects 210s allows ::ENV['foo'] to be ||= to a constant 210s allows ::ENV['foo'] to be assigned to a constant 210s behaves like immutable objects 210s allows FOO + BAR to be ||= to a constant 210s allows FOO + BAR to be assigned to a constant 210s behaves like immutable objects 210s allows { a: 1, b: 2 } to be ||= to a constant 210s allows { a: 1, b: 2 } to be assigned to a constant 210s behaves like immutable objects 210s allows FOO - BAR to be assigned to a constant 210s allows FOO - BAR to be ||= to a constant 210s behaves like immutable objects 210s allows 1 to be assigned to a constant 210s allows 1 to be ||= to a constant 210s behaves like immutable objects 210s allows :sym to be ||= to a constant 210s allows :sym to be assigned to a constant 210s behaves like immutable objects 210s allows ENV['foo'] to be assigned to a constant 210s allows ENV['foo'] to be ||= to a constant 210s behaves like immutable objects 210s allows %w(a b c) to be assigned to a constant 210s allows %w(a b c) to be ||= to a constant 210s behaves like immutable objects 210s allows 1.5 to be assigned to a constant 210s allows 1.5 to be ||= to a constant 210s behaves like immutable objects 210s allows "top#{1 + 2}" to be assigned to a constant 210s allows "top#{1 + 2}" to be ||= to a constant 210s behaves like immutable objects 210s allows 'str' to be ||= to a constant 210s allows 'str' to be assigned to a constant 210s behaves like literals that are not frozen 210s behaves like immutable objects 210s allows ENV['foo'] to be ||= to a constant 210s allows ENV['foo'] to be assigned to a constant 210s behaves like mutable objects 210s when assigning with ||= 210s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 210s when assigning with = 210s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 210s behaves like mutable objects 210s when assigning with ||= 210s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 210s when assigning with = 210s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 210s behaves like immutable objects 210s allows FOO + BAR to be assigned to a constant 210s allows FOO + BAR to be ||= to a constant 210s behaves like mutable objects 210s when assigning with ||= 210s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 210s when assigning with = 210s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 210s behaves like immutable objects 210s allows 1 to be ||= to a constant 210s allows 1 to be assigned to a constant 210s behaves like immutable objects 210s allows 'foo' + 'bar' to be ||= to a constant 210s allows 'foo' + 'bar' to be assigned to a constant 210s behaves like immutable objects 210s allows :sym to be ||= to a constant 210s allows :sym to be assigned to a constant 210s behaves like immutable objects 210s allows FOO - BAR to be assigned to a constant 210s allows FOO - BAR to be ||= to a constant 210s behaves like immutable objects 210s allows 1.5 to be ||= to a constant 210s allows 1.5 to be assigned to a constant 210s behaves like mutable objects 210s when assigning with ||= 210s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 210s when assigning with = 210s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 210s behaves like immutable objects 210s allows ::ENV['foo'] to be ||= to a constant 210s allows ::ENV['foo'] to be assigned to a constant 210s behaves like mutable objects 210s when assigning with ||= 210s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 210s when assigning with = 210s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 210s behaves like literals that are frozen 210s behaves like immutable objects 210s allows ENV['foo'] to be assigned to a constant 210s allows ENV['foo'] to be ||= to a constant 210s behaves like immutable objects 210s allows FOO - BAR to be ||= to a constant 210s allows FOO - BAR to be assigned to a constant 210s behaves like immutable objects 210s allows 'foo' + 'bar' to be ||= to a constant 210s allows 'foo' + 'bar' to be assigned to a constant 210s behaves like immutable objects 210s allows 1 to be ||= to a constant 210s allows 1 to be assigned to a constant 210s behaves like immutable objects 210s allows "top#{1 + 2}" to be ||= to a constant 210s allows "top#{1 + 2}" to be assigned to a constant 210s behaves like immutable objects 210s allows ::ENV['foo'] to be ||= to a constant 210s allows ::ENV['foo'] to be assigned to a constant 210s behaves like immutable objects 210s allows FOO + BAR to be assigned to a constant 210s allows FOO + BAR to be ||= to a constant 210s behaves like immutable objects 210s allows %w(a b c) to be assigned to a constant 210s allows %w(a b c) to be ||= to a constant 210s behaves like immutable objects 210s allows 1.5 to be ||= to a constant 210s allows 1.5 to be assigned to a constant 210s behaves like immutable objects 210s allows :sym to be assigned to a constant 210s allows :sym to be ||= to a constant 210s behaves like immutable objects 210s allows { a: 1, b: 2 } to be assigned to a constant 210s allows { a: 1, b: 2 } to be ||= to a constant 210s behaves like immutable objects 210s allows 'str' to be ||= to a constant 210s allows 'str' to be assigned to a constant 210s behaves like immutable objects 210s allows [1, 2, 3] to be ||= to a constant 210s allows [1, 2, 3] to be assigned to a constant 210s when assigning a regexp 210s does not register an offense 210s when assigning a range (irange) 210s does not register an offense when with parenthesis 210s does not register an offense when without parenthesis 210s when assigning a range (erange) 210s does not register an offense when with parenthesis 210s does not register an offense when without parenthesis 210s behaves like mutable objects 210s when assigning with = 210s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 210s when assigning with ||= 210s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 210s behaves like mutable objects 210s when assigning with ||= 210s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 210s when assigning with = 210s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 210s behaves like immutable objects 210s allows 1.5 to be ||= to a constant 210s allows 1.5 to be assigned to a constant 210s splat expansion 210s expansion of a range 210s registers an offense and corrects to use to_a.freeze 210s with parentheses 210s registers an offense and corrects to use to_a.freeze 210s behaves like string literal 210s Ruby 2.7 or lower 210s when the frozen string literal comment is true 210s does not register an offense when using a multiline string 210s does not register an offense when using interpolated heredoc constant 210s behaves like immutable objects 210s allows <<~HERE 210s foo 210s bar 210s HERE 210s to be assigned to a constant 210s allows <<~HERE 210s foo 210s bar 210s HERE 210s to be ||= to a constant 210s behaves like immutable objects 210s allows "#{a}" to be assigned to a constant 210s allows "#{a}" to be ||= to a constant 210s when the frozen string literal comment is missing 210s behaves like mutable objects 210s when assigning with = 210s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 210s when assigning with ||= 210s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 210s when the frozen string literal comment is false 210s behaves like mutable objects 210s when assigning with ||= 210s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 210s when assigning with = 210s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 210s Ruby 3.0 or higher 210s when the frozen string literal comment is missing 210s behaves like mutable objects 210s when assigning with ||= 210s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 210s when assigning with = 210s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 210s when the frozen string literal comment is false 210s behaves like mutable objects 210s when assigning with = 210s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 210s when assigning with ||= 210s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 210s when the frozen string literal comment is true 210s registers an offense when using a multiline string with interpolation 210s registers an offense when using interpolated heredoc constant 210s does not register an offense when using a multiline string 210s behaves like immutable objects 210s allows <<~HERE 210s foo 210s bar 210s HERE 210s to be ||= to a constant 210s allows <<~HERE 210s foo 210s bar 210s HERE 210s to be assigned to a constant 210s behaves like mutable objects 210s when assigning with ||= 210s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 210s when assigning with = 210s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 210s behaves like immutable objects 210s allows FOO + BAR to be ||= to a constant 210s allows FOO + BAR to be assigned to a constant 210s behaves like mutable objects 210s when assigning with = 210s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 210s when assigning with ||= 210s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 210s 210s RuboCop::Cop::Style::RaiseArgs 210s when enforced style is exploded 210s ignores a raise with an exception argument 210s accepts a raise when exception object is assigned to a local variable 210s accepts exception constructor with more than 1 argument 210s accepts a raise with 3 args 210s accepts a raise with msg argument 210s accepts a raise with splatted arguments 210s accepts exception constructor with keyword arguments 210s accepts a raise with 2 args 210s accepts a raise with `new` method without receiver 210s with a raise with exception object 210s when used in a logical or expression 210s registers an offense and autocorrects 210s with no arguments 210s reports an offense 210s with one argument 210s reports an offense 210s when used in a ternary expression 210s registers an offense and autocorrects 210s when used in a logical and expression 210s registers an offense and autocorrects 210s when exception type is in AllowedCompactTypes 210s accepts exception constructor with no arguments 210s with more than one argument 210s accepts exception constructor 210s with one argument 210s accepts exception constructor 210s when an exception object is assigned to a local variable 210s autocorrects to exploded style 210s with opposite + correct 210s reports an offense for opposite + correct 210s reports multiple offenses 210s when enforced style is compact 210s accepts exception constructor with keyword arguments and message argument 210s accepts a raise with an exception argument 210s accepts a raise with msg argument 210s when used in a logical or expression 210s registers an offense and autocorrects 210s when used in a logical and expression 210s registers an offense and autocorrects 210s with a raise with 3 args 210s reports an offense 210s with a raise with exception instantiation and message arguments 210s reports an offense 210s with correct + opposite 210s reports an offense 210s reports multiple offenses 210s with a raise with 2 args 210s reports an offense 210s when used in a ternary expression 210s registers an offense and autocorrects 210s with a raise with 2 args and exception object is assigned to a local variable 210s reports an offense 210s 210s RuboCop::Cop::Style::MultilineMethodSignature 210s when arguments span a single line 210s when defining an class method 210s when method signature is on a single line 210s does not register an offense for unparameterized method 210s does not register an offense for parameterized method 210s when arguments span a single line 210s registers an offense and corrects when closing paren is on the following line 210s when defining an instance method 210s registers an offense and corrects when closing paren is on the following line 210s registers an offense and corrects when line break after opening parenthesis 210s when method signature is on a single line 210s does not register an offense for parameterized method 210s does not register an offense for unparameterized method 210s when arguments span multiple lines 210s when correction would exceed maximum line length 210s does not register an offense 210s when defining an instance method 210s registers an offense and corrects when `end` is on the following line 210s registers an offense and corrects when `end` is on the same line with only closing parentheses 210s registers an offense and corrects when `end` is on the same line with last argument 210s when correction would not exceed maximum line length 210s registers an offense and corrects 210s when defining an class method 210s registers an offense and corrects when `end` is on the same line 210s registers an offense and corrects when `end` is on the following line 210s registers an offense and corrects when `end` is on the same line with only closing parentheses 210s 210s RuboCop::Cop::Lint::HeredocMethodCallPosition 210s correct cases 210s ignores if no call 210s accepts simple correct case 210s accepts chained correct case 210s incorrect cases 210s chained case with multiple line args 210s detects 210s with trailing comma in method call 210s detects 210s simple incorrect case with paren 210s detects 210s chained case without args 210s detects 210s chained case no parens 210s detects 210s chained case with parens 210s detects 210s simple incorrect case 210s detects 210s 210s RuboCop::Cop::Lint::EmptyExpression 210s when used in a condition 210s registers an offense inside `if` 210s registers an offense in the return value of a ternary operator 210s registers an offense inside `case` 210s registers an offense inside `when` 210s registers an offense inside `elsif` 210s registers an offense in the condition of a ternary operator 210s when used as a standalone expression 210s registers an offense 210s with nested empty expressions 210s registers an offense 210s when used as a return value 210s registers an offense in the return value of a method 210s registers an offense in the return value of a condition 210s registers an offense in the return value of a case statement 210s when used as an assignment 210s registers an offense for the assigned value 210s 210s RuboCop::Cop::Style::TrivialAccessors 210s registers an offense on instance reader 210s accepts reader nested within a module 210s registers an offense on class writer 210s accepts an initialize method looking like a writer 210s registers an offense on class reader 210s accepts expressions within writer 210s registers an offense on one-liner reader 210s accepts reader using top level 211s accepts reader nested within an instance_eval call 211s registers an offense on writer without braces 211s accepts expressions within reader 211s accepts writer with different ivar name 211s accepts non-trivial reader 211s does not register an offense on DSL-style writer 211s accepts writer nested within a module 211s accepts splats 211s registers an offense on one-liner writer 211s registers an offense on reader with `private` 211s flags a reader inside a class, inside an instance_eval call 211s accepts blocks 211s registers an offense on reader with braces 211s accepts writer using top level 211s accepts writer nested within an instance_eval call 211s accepts reader with different ivar name 211s accepts writer in a module 211s accepts non-trivial writer 211s registers an offense on instance writer 211s disallow predicates 211s does not accept predicate-like reader 211s allow predicates 211s accepts predicate-like reader 211s exact name match disabled 211s registers an offense when names mismatch in writer 211s registers an offense when names mismatch in reader 211s ignore class methods 211s accepts class writer 211s accepts class reader 211s with allowed methods 211s accepts allowed reader 211s accepts allowed writer 211s with AllowPredicates: false 211s accepts allowed predicate 211s with DSL denied 211s registers an offense on DSL-style writer 211s 211s RuboCop::Cop::Style::Dir 211s when using `#dirname` and `#realpath` 211s registers an offense with ::File 211s registers an offense 211s when using `#expand_path` and `#dirname` 211s registers an offense with ::File 211s registers an offense 211s 211s RuboCop::Cop::Layout::EmptyLineAfterGuardClause 211s accepts multiple guard clauses 211s registers an offense and corrects a `raise` guard clause not followed by empty line when `unless` condition is after heredoc 211s registers an offense and corrects a guard clause not followed by empty line when guard clause including heredoc 211s accepts using guard clause is after `raise` 211s registers and corrects when using guard clause is after `rubocop:disable` comment 211s accepts a guard clause followed by end 211s registers an offense and corrects a `raise` guard clause not followed by empty line when `if` condition is after heredoc 211s accepts a `raise` guard clause not followed by empty line when guard clause is after condition without method invocation 211s registers an offense and corrects when using `or return` before guard condition 211s registers an offense and corrects a guard clause is before `begin` 211s registers an offense and corrects `next` guard clause not followed by empty line 211s accepts a guard clause when the next line is `ensure` 211s registers an offense and corrects a next guard clause not followed by empty line when guard clause is after heredoc including string interpolation 211s registers an offense and corrects using heredoc with `and return` before guard condition 211s accepts a guard clause that is after a multiline heredoc nested argument call 211s registers no offenses using heredoc with `and return` before guard condition with empty line 211s accepts a guard clause that is after multiline heredoc 211s registers an offense and corrects when using `and return` before guard condition 211s registers an offense when the clause ends with a semicolon but the next clause is on the next line 211s accepts a guard clause inside oneliner block 211s accepts a guard clause when the next line is `rescue` 211s accepts a guard clause that is after a multiline heredoc with chained calls 211s does not register an offense when there are multiple clauses on the same line 211s accepts a guard clause after a single line heredoc 211s accepts a guard clause followed by empty line when guard clause including heredoc 211s accepts a guard clause when the next line is `rescue`-`else` 211s accepts a guard clause when the next line is `elsif` 211s accepts using guard clause is after `rubocop:enable` comment 211s registers an offense and corrects a guard clause that is a ternary operator 211s does not register an offense when the clause ends with a semicolon but is followed by a newline 211s accepts a guard clause when the next line is `else` 211s does not register an offense when the clause is not followed by other code 211s registers an offense and corrects a guard clause not followed by empty line 211s registers an offense and corrects only the last guard clause 211s accepts a modifier if when the next line is `end` 211s registers an offense and corrects a method starting with end_ 211s registers an offense and corrects a `raise` guard clause not followed by empty line when guard clause is after method call with argument 211s registers and corrects when using guard clause is after `rubocop:enable` comment 211s accepts modifier if 211s 211s RuboCop::Cop::Layout::DotPosition 211s Leading dots style 211s registers an offense for trailing dot in multi-line call 211s does not err on method call without a method name 211s registers an offense for correct + opposite 211s does not err on method call with no dots 211s does not err on method call on same line 211s accepts leading do in multi-line method call 211s registers an offense for only dot line 211s when a method spans multiple lines 211s registers an offense 211s when the receiver is a heredoc 211s registers an offense 211s when there is an intervening blank line 211s does not register offense 211s with multiple offenses 211s registers all of them 211s when using safe navigation operator 211s registers an offense for correct + opposite 211s accepts leading do in multi-line method call 211s when the receiver has a heredoc argument 211s with multiple heredocs 211s registers an offense 211s as the last argument 211s registers an offense 211s with another method on the same line 211s does not register an offense 211s as the first argument 211s registers an offense 211s with a dynamic heredoc 211s registers an offense 211s when there is an intervening line comment 211s does not register offense 211s Trailing dots style 211s does not err on method call without a method name 211s does not err on method call with multi-line arguments 211s does not err on method call on same line 211s registers an offense for leading dot in multi-line call 211s does not get confused by several lines of chained methods 211s does not err on method call with no dots 211s accepts trailing dot in multi-line method call 211s when using safe navigation operator 211s accepts trailing dot in multi-line method call 211s registers an offense for correct + opposite 211s when the receiver has a heredoc argument 211s with multiple heredocs 211s registers an offense 211s as the first argument 211s registers an offense 211s with a dynamic heredoc 211s registers an offense 211s with another method on the same line 211s does not register an offense 211s as the last argument 211s registers an offense 211s when there is a heredoc with a following method 211s does not register an offense for a heredoc 211s when the receiver is a heredoc 211s registers an offense 211s 211s RuboCop::Cop::Util 211s #line_range 211s returns line range of the expression 211s #to_supported_styles 211s when EnforcedStyle 211s is expected to eq "SupportedStyles" 211s when EnforcedStyleInsidePipes 211s is expected to eq "SupportedStylesInsidePipes" 211s #same_line? 211s returns false when two nodes are not on the same line 211s returns false if an argument is not a node or range 211s can use ranges 211s returns true when two nodes are on the same line 211s 211s RuboCop::Cop::Lint::RedundantSplatExpansion 211s accepts expanding a variable as a method parameter 211s allows expanding a method call on an array literal 211s allows splat expansion inside of an array 211s allows an array using a constructor 211s allows expansions of an array that is assigned to a variable in rescue 211s allows assigning a variable to a splat expansion of a variable 211s allows assigning to a splat variable 211s allows assigning to a splat 211s registers an offense and corrects an array literal being expanded in a rescue 211s allows assigning to an expanded range 211s assignment to splat expansion 211s registers and corrects an array using top-level const 211s registers an offense and corrects an array using a constructor 211s when `AllowPercentLiteralArrayArgument: false` 211s registers an offense when using percent symbol literal array 211s registers an offense when using percent literal array 211s splat expansion of method parameters 211s registers an offense and corrects an array literal %i 211s registers an offense and corrects an array literal %I 211s behaves like array splat expansion 211s behaves like splat literal assignment 211s registers an offense and removes the splat from array 211s method parameters 211s registers an offense and converts to a list of arguments 211s behaves like array splat expansion 211s behaves like splat literal assignment 211s registers an offense and removes the splat from array 211s method parameters 211s registers an offense and converts to a list of arguments 211s behaves like array splat expansion 211s method parameters 211s registers an offense and converts to a list of arguments 211s behaves like splat literal assignment 211s registers an offense and removes the splat from array 211s behaves like array splat expansion 211s behaves like splat literal assignment 211s registers an offense and removes the splat from array 211s method parameters 211s registers an offense and converts to a list of arguments 211s behaves like splat expansion 211s method parameters 211s registers an offense and converts to an array 211s behaves like splat literal assignment 211s registers an offense and converts to an array 211s expanding Array.new call on method argument 211s registers an offense and corrects 211s behaves like splat expansion 211s behaves like splat literal assignment 211s registers an offense and converts to an array 211s method parameters 211s registers an offense and converts to an array 211s behaves like array splat expansion 211s behaves like splat literal assignment 211s registers an offense and removes the splat from array 211s method parameters 211s registers an offense and converts to a list of arguments 211s expanding Array.new call on array literal 211s with ::Array.new 211s when the array literal contains exactly one element 211s registers an offense and corrects 211s when the array literal contains more than one element 211s accepts 211s when the array literal contains exactly one element 211s registers an offense and corrects 211s behaves like splat expansion 211s behaves like splat literal assignment 211s registers an offense and converts to an array 211s method parameters 211s registers an offense and converts to an array 211s expanding an array literal in a when condition 211s registers an offense and corrects an array using %W 211s allows an array using a constructor 211s allows an array that is assigned to a variable 211s registers an offense and corrects an array using [] 211s registers an offense and corrects an array using %w 211s registers an offense and corrects %i to a list of symbols 211s registers an offense and corrects %I to a list of symbols 211s arrays being expanded with %i variants using splat expansion 211s splat expansion inside of an array 211s registers an offense and corrects %i to a list of symbols 211s registers an offense and changes %I to a list of symbols 211s behaves like splat expansion 211s method parameters 211s registers an offense and converts to an array 211s behaves like splat literal assignment 211s registers an offense and converts to an array 211s when `AllowPercentLiteralArrayArgument: true` 211s does not register an offense when using percent symbol literal array 211s does not register an offense when using percent string literal array 211s splat expansion inside of an array 211s registers an offense and corrects the expansion of an array literalinside of an array literal 211s registers an offense and corrects expansion of %w to a list of words 211s registers an offense and corrects expansion of %W to a list of words 211s 211s RuboCop::Cop::Layout::HeredocIndentation 211s quoted by ' 211s registers an offense for too deep indented with whitespace line 211s accepts for an empty line 211s accepts for indented, but without `~` 211s registers an offense for not indented, with `~` 211s accepts for indented, with `~` 211s accepts for include empty lines 211s registers an offense for too deep indented 211s registers an offense for not indented, without `~` 211s registers an offense for not indented 211s displays message to use `<<~` instead of `<<-` 211s registers an offense for too deep indented with empty line 211s registers an offense for not indented enough with whitespace line 211s accepts for indented, but with `-` 211s accepts for not indented but with whitespace 211s displays message to use `<<~` instead of `<<` 211s registers an offense for first line minus-level indented, with `-` 211s registers an offense for minus level indented 211s does not register an offense when not indented but with whitespace, with `-` 211s registers an offense for not indented enough with empty line 211s when Layout/LineLength is configured 211s accepts for long heredoc 211s quoted by " 211s accepts for not indented but with whitespace 211s registers an offense for first line minus-level indented, with `-` 211s accepts for an empty line 211s accepts for indented, but with `-` 211s registers an offense for too deep indented 211s registers an offense for not indented enough with empty line 211s displays message to use `<<~` instead of `<<-` 211s registers an offense for too deep indented with whitespace line 211s accepts for include empty lines 211s registers an offense for too deep indented with empty line 211s registers an offense for not indented, without `~` 211s displays message to use `<<~` instead of `<<` 211s accepts for indented, but without `~` 211s accepts for indented, with `~` 211s registers an offense for not indented 211s does not register an offense when not indented but with whitespace, with `-` 211s registers an offense for minus level indented 211s registers an offense for not indented, with `~` 211s registers an offense for not indented enough with whitespace line 211s when Layout/LineLength is configured 211s accepts for long heredoc 211s quoted by 211s accepts for indented, but without `~` 211s accepts for not indented but with whitespace 211s registers an offense for too deep indented with empty line 211s accepts for include empty lines 211s accepts for indented, but with `-` 211s registers an offense for not indented enough with whitespace line 211s registers an offense for first line minus-level indented, with `-` 211s does not register an offense when not indented but with whitespace, with `-` 211s registers an offense for too deep indented with whitespace line 211s accepts for an empty line 211s displays message to use `<<~` instead of `<<` 211s displays message to use `<<~` instead of `<<-` 211s registers an offense for not indented, without `~` 211s registers an offense for not indented, with `~` 211s accepts for indented, with `~` 211s registers an offense for too deep indented 211s registers an offense for not indented 211s registers an offense for minus level indented 211s registers an offense for not indented enough with empty line 211s when Layout/LineLength is configured 211s accepts for long heredoc 211s quoted by ` 211s accepts for an empty line 211s accepts for indented, but with `-` 211s registers an offense for too deep indented with empty line 211s registers an offense for first line minus-level indented, with `-` 211s registers an offense for not indented 211s registers an offense for too deep indented with whitespace line 211s registers an offense for not indented, with `~` 211s registers an offense for not indented, without `~` 211s displays message to use `<<~` instead of `<<-` 211s displays message to use `<<~` instead of `<<` 211s accepts for not indented but with whitespace 211s registers an offense for not indented enough with whitespace line 211s registers an offense for minus level indented 211s registers an offense for too deep indented 211s accepts for indented, with `~` 211s registers an offense for not indented enough with empty line 211s accepts for include empty lines 211s does not register an offense when not indented but with whitespace, with `-` 212s accepts for indented, but without `~` 212s when Layout/LineLength is configured 212s accepts for long heredoc 212s 212s RuboCop::Cop::Naming::RescuedExceptionsVariableName 212s with the `PreferredName` setup 212s registers offenses when using `foo` and `bar` in multiple rescues 212s registers an offense when using `e` 212s does not register an offense when using `exception` 212s registers an offense when using `_e` 212s does not register an offense when using `_exception` 212s with default config 212s with variable being referenced 212s renames the variable references when autocorrecting 212s with explicit rescue 212s with `Exception` variable 212s registers an offense when using `_exc` 212s registers offenses when using `foo` and `bar` in multiple rescues 212s does not register an offense when using `_e` 212s registers an offense when using `exc` 212s registers an offense when using `exc` and renames its usage 212s does not register an offense when using _e followed by e 212s does not register an offense when using `e` 212s with splat operator as `Exception` list 212s does not register an offense with expected variable name 212s registers an offense with unexpected variable name 212s does not register an offense without variable name 212s with lower letters class name 212s does not register an offense 212s shadowing an external variable 212s does not register an offense 212s without `Exception` variable 212s does not register an offense 212s with method as `Exception` 212s registers an offense with unexpected variable name 212s does not register an offense with expected variable name 212s does not register an offense without variable name 212s when the variable is reassigned 212s only corrects the exception variable 212s only corrects uses of the exception 212s when the variable is reassigned using multiple assignment 212s only corrects uses of the exception 212s with multiple branches 212s registers and corrects each offense 212s with nested rescues 212s handles it 212s with implicit rescue 212s without `Exception` variable 212s does not register an offense 212s with `Exception` variable 212s registers an offense when using `_exc` 212s registers an offense when using `exc` 212s does not register an offense when using `e` 212s does not register an offense when using `_e` 212s 212s RuboCop::Formatter::ProgressFormatter 212s #report_file_as_mark 212s when a refactor convention offense is detected 212s prints "C" 212s when a refactor severity offense is detected 212s prints "R" 212s when different severity offenses are detected 212s prints highest level mark 212s when no offenses are detected 212s prints "." 212s #finished 212s calls #report_summary 212s when any offenses are detected 212s reports all detected offenses for all failed files 212s when no offenses are detected 212s does not report offenses 212s #file_finished 212s when any offenses are detected 212s calls #report_as_with_mark 212s when no offenses are detected 212s calls #report_as_with_mark 212s 212s RuboCop::Cop::Lint::RequireRangeParentheses 212s does not register an offense when the end of the range (`..`) is line break and is enclosed in parentheses 212s does not register an offense when using `nil..42` 212s does not register an offense when begin and end of the range are on the same line 212s registers an offense when the end of the range (`...`) is line break 212s registers an offense when the end of the range (`..`) is line break 212s does not register an offense when using `42..nil` 212s Ruby >= 2.6 212s does not register an offense when using endless range only 212s Ruby >= 2.7 212s does not register an offense when using beginless range only 212s 212s RuboCop::Cop::Lint::UnexpectedBlockArity 212s registers multiple offenses 212s with a numblock 212s when given two parameters 212s does not register an offense 212s when given one parameter 212s registers an offense 212s when given no parameters 212s registers an offense 212s when given three parameters 212s does not register an offense 212s with no receiver 212s does not register an offense 212s when using enough parameters, but not all explicitly 212s does not register an offense 212s with a block 212s with optargs 212s with arity 2 212s does not register an offense 212s with arity 1 212s registers an offense 212s when given three parameters 212s does not register an offense 212s with keyword args 212s registers an offense 212s when destructuring 212s with arity 1 212s registers an offense 212s with arity 2 212s does not register an offense 212s when given one parameter 212s registers an offense 212s with a keyword splat 212s registers an offense 212s with no receiver 212s does not register an offense 212s when given two parameters 212s does not register an offense 212s when given a splat parameter 212s does not register an offense 212s with shadow args 212s registers an offense 212s when given no parameters 212s registers an offense 212s 212s RuboCop::Cop::Style::MissingRespondToMissing 212s allows method_missing and respond_to_missing? implemented as class methods 212s allows method_missing and respond_to_missing? when defined with inline access modifier and method_missing is not qualified by inline access modifier 212s allows method_missing and respond_to_missing? when defined with inline access modifier 212s allows method_missing and respond_to_missing? implemented as instance methods 212s registers an offense when method_missing is implemented as a class methods 212s registers an offense respond_to_missing? is implemented as an instance method and method_missing is implemented as a class method 212s registers an offense respond_to_missing? is implemented as a class method and method_missing is implemented as an instance method 212s registers an offense when respond_to_missing? is not implemented 212s 212s RuboCop::Cop::Layout::BeginEndAlignment 212s registers an offense for mismatched begin end and autocorrects 212s accepts matching puts 1; begin ... end 212s accepts matching begin ... end 212s when EnforcedStyleAlignWith is start_of_line 212s accepts matching puts 1; begin ... end 212s registers an offense for mismatched var << begin end and autocorrects 212s registers an offense for mismatched begin end and autocorrects 212s accepts matching var = begin ... end 212s 212s RuboCop::Cop::Style::FrozenStringLiteralComment 212s always 212s accepts a frozen string literal comment below shebang above an encoding comments 212s accepts an empty source 212s registers an offense for not having a frozen string literal comment when there is only a shebang 212s registers an offense for not having a frozen string literal comment under a shebang and an encoding comment 212s registers an offense for not having a frozen string literal comment under an encoding comment separated by a newline 212s accepts a frozen string literal below an encoding comment 212s accepts a disabled frozen string literal comment below shebang above an encoding comments 212s registers an offense for having a frozen string literal comment under ruby code 212s registers an offense for arbitrary tokens 212s registers an offense for not having a frozen string literal comment under an encoding comment 212s accepts a frozen string literal on the top line 212s accepts a disabled frozen string literal below an encoding comment 212s registers an offense for an extra first empty line 212s accepts a frozen string literal comment below newline-separated magic comments 212s registers an offense for not having a frozen string literal comment on the top line 212s accepts a source with no tokens 212s accepts an emacs style combined magic comment 212s accepts a frozen string literal comment after other comments 212s accepts a disabled frozen string literal below a shebang comment 212s accepts a frozen string literal comment below shebang and encoding comments 212s accepts a frozen string literal below a shebang comment 212s accepts a disabled frozen string literal on the top line 212s registers an offense with an empty line between magic comments and the code 212s registers an offense for not having a frozen string literal comment under a shebang 212s accepts a disabled frozen string literal comment below shebang and encoding comments 212s never 212s accepts not having not having a frozen string literal comment under a shebang 212s registers an offense for a disabled frozen string literal comment below shebang above an encoding comments 212s registers an offense for a frozen string literal comment below shebang above an encoding comments 212s accepts an empty source 212s accepts not having a frozen string literal comment on the top line 212s registers an offense for a frozen string literal comment on the top line 212s registers an offense for a disabled frozen string literal comment below shebang and encoding comments 212s registers an offense for a disabled frozen string literal below an encoding comment 212s registers an offense for a disabled frozen string literal below a shebang comment 212s registers an offense for having a frozen string literal comment after other comments 212s accepts a frozen string literal comment under ruby code 212s registers an offense for a frozen string literal comment below an encoding comment 212s allows not having a frozen string literal comment under a shebang and an encoding comment 212s registers an offense for a disabled frozen string literal comment on the top line 212s registers an offense for a frozen string literal comment below shebang and encoding comments 212s registers an offense for a frozen string literal comment below a shebang comment 212s accepts a source with no tokens 212s allows not having a frozen string literal comment under an encoding comment 212s always_true 212s registers an offense for a disabled frozen string literal comment below an encoding comment and extra space 212s registers an offense for not having a frozen string literal comment under shebang with no other code 212s accepts a frozen string literal comment under shebang with no other code 212s registers an offense for not having a frozen string literal comment under a shebang and an encoding comment 212s registers an offense for arbitrary tokens below a shebang comment 212s registers an offense for arbitrary tokens below shebang and encoding comments 212s registers an offense for a disabled frozen string literal comment below shebang and encoding comments 212s registers an offense for a disabled frozen string literal above an empty line 212s accepts a frozen string literal comment below shebang and encoding comments 212s accepts a frozen string literal on the top line 212s registers an offense for a disabled frozen string literal comment under shebang with no other code 212s accepts a frozen string literal comment below shebang above an encoding comments 212s registers an offense for arbitrary tokens under shebang with no other code 212s accepts a frozen string literal comment below shebang, an encoding comment, and extra space 212s registers an offense for arbitrary tokens 212s registers an offense for having a frozen string literal comment under ruby code 212s registers an offense for arbitrary tokens below shebang, an encoding comment, and extra space 212s registers an offense for a disabled frozen string literal comment below shebang, an encoding comment, and extra space 212s accepts an emacs style combined magic comment 212s registers an offense for a disabled frozen string literal 212s registers an offense for a disabled frozen string literal comment after other comments 212s accepts a source with no tokens 212s accepts a frozen string literal below an encoding comment 212s registers an offense for a disabled frozen string literal on the top line 212s accepts a frozen string literal comment after other comments 212s registers an offense for a disabled frozen string literal below an encoding comment 212s registers an offense for arbitrary tokens below shebang above an encoding comments 212s registers an offense for arbitrary tokens below an encoding comment and extra space 212s registers an offense for not having a frozen string literal comment under an encoding comment and extra space 212s registers an offense for an extra first empty line 212s registers an offense for a disabled frozen string literal below a shebang comment 212s registers an offense for arbitrary tokens below an encoding comment 212s registers an offense for not having a frozen string literal comment under an encoding comment 212s registers an offense for a disabled frozen string literal comment below shebang above an encoding comments 212s accepts a frozen string literal below a shebang comment 212s accepts an empty source 212s registers an offense for not having a frozen string literal comment under a shebang, an encoding comment, and extra space 212s registers an offense for arbitrary tokens above an empty line 212s registers an offense for not having a frozen string literal comment on the top line 212s accepts a frozen string literal comment below an encoding comment and extra space 212s target_ruby_version < 2.3 212s accepts calling << on a string with interpolation 212s accepts freezing a string with interpolation 212s accepts calling << on a string 212s accepts freezing a string 212s 212s RuboCop::Cop::Style::CollectionCompact 212s registers an offense and corrects when using `reject` on hash to reject nils 212s does not register an offense when using `reject` to not to rejecting nils 212s registers an offense and corrects when using `select/select!` to reject nils 212s registers an offense and corrects when using `reject` on array to reject nils 212s registers an offense and corrects when using `reject` with block pass arg and no parentheses 212s registers an offense and corrects when using `reject` with block pass arg on array to reject nils 212s registers an offense and corrects when using `reject` and receiver is a variable 212s does not register an offense when using `compact/compact!` 212s Ruby >= 3.1 213s registers an offense and corrects when using `lazy.reject` on array to reject nils 213s registers an offense and corrects when using `to_enum.reject` on array to reject nils 213s when without receiver 213s does not register an offense and corrects when using `reject` on array to reject nils 213s does not register an offense and corrects when using `select/select!` to reject nils 213s Ruby <= 3.0 213s does not register an offense and corrects when using `lazy.reject` on array to reject nils 213s does not register an offense and corrects when using `to_enum.reject` on array to reject nils 213s 213s RuboCop::Cop::Layout::ClassStructure 213s registers an offense and corrects when str heredoc constant is defined after public method 213s registers an offense and corrects when dstr heredoc constant is defined after public method 213s registers an offense and corrects when xstr heredoc constant is defined after public method 213s registers an offense and corrects when literal constant is after method definitions 213s registers an offense and corrects when there is a comment in the macro method 213s with attribute macros before after validations 213s is expected to eq class Person 213s include AnotherModule 213s extend SomeModule 213s 213s CustomError = Cla...rivate :other_public_method 213s 213s private 213s 213s def some_private_method 213s end 213s end 213s constant is not a literal 213s registers offense but does not autocorrect 213s with a complete ordered example 213s does not create offense 213s simple example 213s is expected to eq "class Person\n include AnotherModule\n extend SomeModule\n CONST = 'wrong place'\nend\n" 213s with protected methods declared before private 213s is expected to eq class MyClass 213s def public_method 213s end 213s 213s private 213s 213s def first_private...ar before `private_methods`. 213s end 213s 213s def second_protected_method 213s end 213s end 213s when def modifier is used 213s registers an offense and corrects public method with modifier declared after private method with modifier 213s registers an offense and corrects public method after private method marked by its name 213s registers an offense and corrects public method without modifier declared after private method with modifier 213s when the first line ends with a comment 213s reports an offense and swaps the lines 213s initializer is private and comes after attribute macro 213s registers an offense and autocorrects 213s 213s RuboCop::Cop::Style::MultipleComparison 213s registers an offense and corrects when `a` is compared three times, once on the righthand side 213s does not register an offense for Array#include? 213s does not register an offense for comparing multiple int literals 213s does not register an offense for comparing lvars when a string is on the lefthand side 213s does not register an offense when comparing two sides of the disjunction is unrelated 213s does not register an offense for comparing lvars 213s does not register an offense for comparing an lvar 213s does not register an offense for comparing multiple literal strings 213s registers an offense and corrects when `a` is compared twice 213s registers an offense and corrects when `a` is compared twice in `if` and `elsif` conditions 213s registers an offense and corrects when `a` is compared three times on the right hand side 213s does not register an offense for a duplicated condition 213s registers an offense and corrects when `a` is compared three times 213s does not register an offense for a == b || b == a 213s registers an offense and corrects when multiple comparison is not part of a conditional 213s when `AllowMethodComparison: true` 213s does not register an offense when using multiple method calls 213s when `AllowMethodComparison: false` 213s registers an offense and corrects when using multiple method calls 213s 213s RuboCop::CLI --auto-gen-config 213s --auto-gen-config 213s can generate Exclude properties with a given limit 213s overwrites an existing todo file 213s honors rubocop:disable comments 213s generates Exclude if no EnforcedStyle solves all offenses 214s does not generate configuration for the Syntax cop 214s generates EnforcedStyle parameter if it solves all offenses 214s can be called when there are no files to inspection 214s can generate a todo list 214s generates a todo list that removes the reports 215s generates Exclude instead of Max when --auto-gen-only-exclude is used 215s includes --auto-gen-only-exclude in the command comment when given 215s does not include a timestamp when --no-auto-gen-timestamp is used 215s does not include offense counts when --no-offense-counts is used 215s for existing configuration with Exclude 215s generates Excludes that appear in .rubocop.yml 216s leaves out Excludes that appear in .rubocop.yml but are merged globally 217s leaves out Excludes that appear in .rubocop.yml but are merged for the cop 217s when .rubocop.yml inherits only from .rubocop_todo.yml 217s bases other cops' configuration on the code base's current maximum line length 217s when working with a cop who do not support autocorrection 217s can generate a todo list 217s when different styles appear in different files 217s generates Exclude list if --exclude-limit is not exceeded 218s disables cop if --exclude-limit is exceeded 218s when inheriting from a URL 218s when there is a single entry 218s can generate a todo list 218s when there are multiple entries 218s can generate a todo list 218s when .rubocop.yml inherits from two other files 218s bases other cops' configuration on the code base's current maximum line length 218s when .rubocop.yml inherits from another file 218s bases other cops' configuration on the code base's current maximum line length 218s when .rubocop.yml inherits only from .rubocop_todo.yml in an array 219s bases other cops' configuration on the code base's current maximum line length 219s when duplicated default configuration parameter 219s parameters are displayed without duplication 219s when hash value omission enabled 219s generates Exclude if it solves all offenses 219s when --config is used 219s can generate a todo list if default .rubocop.yml exists 219s can generate a todo list 219s console output 220s displays report summary but no offenses 220s when .rubocop.yml inherits from another file and .rubocop_todo.yml 220s bases other cops' configuration on the code base's current maximum line length 220s when .rubocop.yml does not exist 220s bases other cops' configuration on the code base's current maximum line length 220s when cop is not safe to autocorrect 220s can generate a todo list, with the appropriate flag 220s when --no-exclude-limit is given 221s always prefers Exclude to Enabled 221s with Layout/LineLength:Max overridden 221s when .rubocop.yml has Layout/LineLength disabled 221s skips the cop from both phases of the run 221s when .rubocop.yml has Layout/LineLength:Max more than code base max 221s bases other cops' configuration on the overridden LineLength:Max 221s when .rubocop.yml has Layout/LineLength:Max less than code base max 221s bases other cops' configuration on the overridden LineLength:Max 221s when existing config file has a YAML document start header 221s inserts `inherit_from` key after hearder 221s when .rubocop.yml doesn't inherit 222s bases other cops' configuration on the code base's current maximum line length 222s when working in a subdirectory 222s can generate a todo list 222s when .rubocop.yml is empty 222s bases other cops' configuration on the code base's current maximum line length 222s 222s RuboCop::Cop::Style::GlobalVars 222s does not register an offense for built-in variable $ORS 222s does not register an offense for built-in variable $DEBUG 222s does not register an offense for built-in variable $PROCESS_ID 222s does not register an offense for built-in variable $" 222s does not register an offense for built-in variable $@ 222s does not register an offense for built-in variable $-i 222s does not register an offense for backrefs like $1 222s does not register an offense for built-in variable $= 222s does not register an offense for built-in variable $~ 222s does not register an offense for built-in variable $> 222s does not register an offense for built-in variable $stdout 222s does not register an offense for built-in variable $-w 222s does not register an offense for built-in variable $MATCH 222s does not register an offense for built-in variable $' 222s does not register an offense for built-in variable $ENV_JAVA 222s does not register an offense for built-in variable $+ 222s does not register an offense for built-in variable $INPUT_LINE_NUMBER 222s does not register an offense for built-in variable $PROGRAM_NAME 222s does not register an offense for built-in variable $INPUT_RECORD_SEPARATOR 222s does not register an offense for built-in variable $JRUBY_VERSION 222s does not register an offense for built-in variable $, 222s does not register an offense for built-in variable $OUTPUT_FIELD_SEPARATOR 222s does not register an offense for built-in variable $-a 222s does not register an offense for built-in variable $-d 222s does not register an offense for built-in variable $LAST_MATCH_INFO 222s does not register an offense for built-in variable $stderr 222s does not register an offense for built-in variable $CLASSPATH 222s does not register an offense for built-in variable $-0 222s does not register an offense for built-in variable $! 222s does not register an offense for built-in variable $/ 222s does not register an offense for built-in variable $IGNORECASE 222s does not register an offense for built-in variable $0 222s does not register an offense for built-in variable $OFS 222s does not register an offense for built-in variable $: 222s does not register an offense for built-in variable $& 222s does not register an offense for built-in variable $? 222s does not register an offense for built-in variable $DEFAULT_INPUT 222s does not register an offense for built-in variable $* 222s does not register an offense for built-in variable $. 222s does not register an offense for built-in variable $-p 222s does not register an offense for built-in variable $; 222s does not register an offense for built-in variable $-I 222s does not register an offense for built-in variable $OUTPUT_RECORD_SEPARATOR 222s does not register an offense for built-in variable $RS 222s does not register an offense for built-in variable $ERROR_POSITION 222s does not register an offense for built-in variable $VERBOSE 222s does not register an offense for built-in variable $DEFAULT_OUTPUT 222s does not register an offense for built-in variable $< 222s does not register an offense for built-in variable $LAST_PAREN_MATCH 222s does not register an offense for built-in variable $-F 222s does not register an offense for built-in variable $NR 222s does not register an offense for built-in variable $-l 222s does not register an offense for built-in variable $ERROR_INFO 222s does not register an offense for built-in variable $_ 222s does not register an offense for built-in variable $\ 222s does not register an offense for built-in variable $PID 222s does not register an offense for built-in variable $stdin 222s does not register an offense for built-in variable $FS 222s does not register an offense for built-in variable $-v 222s does not register an offense for built-in variable $` 222s does not register an offense for built-in variable $ARGV 222s does not register an offense for built-in variable $$ 222s does not register an offense for built-in variable $LOAD_PATH 222s registers an offense for $custom 222s does not register an offense for built-in variable $SAFE 222s does not register an offense for built-in variable $CHILD_STATUS 222s does not register an offense for built-in variable $LOADED_FEATURES 222s does not register an offense for built-in variable $LAST_READ_LINE 222s does not register an offense for built-in variable $PREMATCH 222s does not register an offense for built-in variable $POSTMATCH 222s does not register an offense for built-in variable $FIELD_SEPARATOR 222s does not register an offense for built-in variable $JRUBY_REVISION 222s does not register an offense for built-in variable $FILENAME 222s allows user permitted variables 222s 222s RuboCop::Cop::Metrics::BlockNesting 222s accepts `Max` levels of nesting 222s accepts if/elsif 222s nested modifier `while` 222s registers an offense 222s nested modifier `until` 222s registers an offense 222s nested `until` 222s registers an offense 222s when CountBlocks is false 222s accepts nested multiline blocks 222s accepts nested inline blocks 222s Multiple nested `ifs` at same level 222s registers 2 offenses 222s `Max + 1` levels of `if` nesting 222s registers an offense 222s nested `while` 222s registers an offense 222s nested `case` 222s registers an offense 222s nested `rescue` 222s registers an offense 222s nested `for` 222s registers an offense 222s when CountBlocks is true 222s nested inline block 222s registers an offense 222s nested multiline block 222s registers an offense 222s `Max + 2` levels of `if` nesting 222s registers an offense 222s 222s RuboCop::Cop::Naming::MethodName 222s accepts for non-ascii characters 222s when configured for snake_case 222s registers an offense for camel case in singleton method name 222s registers an offense for opposite + correct 222s accepts class emitter method in a class, even when it is defined inside another method 222s accepts class emitter method in a module 222s accepts one line methods 222s registers an offense for mixed snake case and camel case 222s accepts class emitter method in a module, even when it is defined inside another method 222s registers an offense for camel case method names in attr. 222s registers an offense for singleton camelCase method within class 222s accepts snake case in names 222s registers an offense for capitalized camel case 222s registers an offense for camel case in instance method name 222s accepts unary operator definitions 222s registers an offense for mixed snake case and camel case in attr. 222s registers an offense for capitalized camel case name in attr. 222s registers an offense for singleton upper case method without corresponding class 222s accepts class emitter method in a class 222s registers an offense for camel case methods names in attr. 222s registers an offense for mixed snake case and camel case in attr. 222s accepts snake case in attr. 222s accepts operator definitions 222s when specifying `AllowedPatterns` 222s does not register an offense for snake case method name in attr. 222s does not register an offense for snake case method name matching `AllowedPatterns` 222s does not register an offense for camel case method name matching `AllowedPatterns` 222s does not register an offense for camel case method name in attr. 222s when configured for camelCase 222s registers an offense for snake case in names 222s accepts class emitter method in a class 222s registers an offense for snake case name in attr. 222s registers an offense for singleton upper case method without corresponding class 222s registers an offense for camel case methods names in attr. 222s accepts unary operator definitions 222s accepts class emitter method in a module 222s registers an offense for mixed snake case and camel case in attr. 222s registers an offense for mixed snake case and camel case 222s registers an offense for capitalized camel case 222s accepts operator definitions 222s accepts class emitter method in a module, even when it is defined inside another method 222s accepts camel case names in attr. 222s registers an offense for mixed snake case and camel case in attr. 222s accepts class emitter method in a class, even when it is defined inside another method 222s registers an offense for singleton snake_case method within class 222s accepts camel case in instance method name 222s registers an offense for correct + opposite 222s accepts one line methods 222s accepts camel case in singleton method name 222s registers an offense for capitalized camel case name in attr. 222s when specifying `AllowedPatterns` 222s does not register an offense for camel case method name matching `AllowedPatterns` 222s does not register an offense for snake case method name in attr. 222s does not register an offense for camel case method name in attr. 222s does not register an offense for snake case method name matching `AllowedPatterns` 222s 222s RuboCop::Cop::Lint::NumberedParameterAssignment 222s registers an offense when using `_0` lvar 222s registers an offense when using `_10` lvar 222s does not register an offense when using non numbered parameter 222s does not register an offense when index assignment 222s when Ruby 2.7 or lower 222s registers an offense when using `_9` numbered parameter 222s registers an offense when using `_6` numbered parameter 222s registers an offense when using `_3` numbered parameter 222s registers an offense when using `_4` numbered parameter 222s registers an offense when using `_1` numbered parameter 222s registers an offense when using `_7` numbered parameter 222s registers an offense when using `_5` numbered parameter 222s registers an offense when using `_8` numbered parameter 222s registers an offense when using `_2` numbered parameter 222s 222s RuboCop::Cop::Layout::ArrayAlignment 222s when aligned with first parameter 222s accepts aligned array keys 222s does not indent heredoc strings when autocorrecting 222s registers an offense and corrects misaligned array elements 222s accepts the first element being on a new row 222s accepts several elements per line 222s accepts aligned array with fullwidth characters 222s autocorrects array within array with too little indentation 222s autocorrects misaligned array with the first element on a new row 222s autocorrects array within array with too much indentation 222s does not register an offense or try to correct parallel assignment 222s accepts single line array 222s when aligned with fixed indentation 222s registers an offense and corrects misaligned array elements 222s accepts the first element being on a new row 222s accepts single line array 222s does not register an offense or try to correct parallel assignment 222s autocorrects misaligned array with the first element on a new row 222s accepts several elements per line 222s accepts aligned array with fullwidth characters 222s autocorrects array within array with too little indentation 222s accepts aligned array keys 222s does not indent heredoc strings when autocorrecting 223s autocorrects array within array with too much indentation 223s 223s RuboCop::Cop::Style::MissingElse 223s UnlessElse enabled 223s given a case statement 223s with a completely empty else-clause 223s doesn't register an offense 223s with an else-clause containing only the literal nil 223s doesn't register an offense 223s with an else-clause with side-effects 223s doesn't register an offense 223s with no else-clause 223s registers an offense 223s >= Ruby 2.7 223s does not register an offense 223s given an unless-statement 223s with no else-clause 223s doesn't register an offense 223s with an else-clause with side-effects 223s doesn't register an offense 223s with an else-clause containing only the literal nil 223s doesn't register an offense 223s with a completely empty else-clause 223s doesn't register an offense 223s given an if-statement 223s with an else-clause with side-effects 223s doesn't register an offense 223s with an else-clause containing only the literal nil 223s doesn't register an offense 223s with a completely empty else-clause 223s doesn't register an offense 223s with no else-clause 223s registers an offense 223s UnlessElse disabled 223s >= Ruby 2.7 223s does not register an offense 223s given a case statement 223s with an else-clause with side-effects 223s doesn't register an offense 223s with an else-clause containing only the literal nil 223s doesn't register an offense 223s with no else-clause 223s registers an offense 223s with a completely empty else-clause 223s doesn't register an offense 223s given an if-statement 223s with no else-clause 223s registers an offense 223s with an else-clause with side-effects 223s doesn't register an offense 223s with an else-clause containing only the literal nil 223s doesn't register an offense 223s with a completely empty else-clause 223s doesn't register an offense 223s given an unless-statement 223s with an else-clause containing only the literal nil 223s doesn't register an offense 223s with a completely empty else-clause 223s doesn't register an offense 223s with an else-clause with side-effects 223s doesn't register an offense 223s with no else-clause 223s registers an offense 223s EmptyElse enabled and set to warn on nil 223s >= Ruby 2.7 223s does not register an offense 223s given an unless-statement 223s with no else-clause 223s registers an offense 223s with a completely empty else-clause 223s doesn't register an offense 223s with an else-clause containing only the literal nil 223s doesn't register an offense 223s with an else-clause with side-effects 223s doesn't register an offense 223s given a case statement 223s with no else-clause 223s registers an offense 223s with an else-clause containing only the literal nil 223s doesn't register an offense 223s with an else-clause with side-effects 223s doesn't register an offense 223s with a completely empty else-clause 223s doesn't register an offense 223s given an if-statement 223s with an else-clause with side-effects 223s doesn't register an offense 223s with an else-clause containing only the literal nil 223s doesn't register an offense 223s with a completely empty else-clause 223s doesn't register an offense 223s with no else-clause 223s registers an offense 223s configured to warn only on empty case 223s given an if-statement 223s with no else-clause 223s doesn't register an offense 223s with an else-clause containing only the literal nil 223s doesn't register an offense 223s with an else-clause with side-effects 223s doesn't register an offense 223s with a completely empty else-clause 223s doesn't register an offense 223s >= Ruby 2.7 223s does not register an offense 223s given a case statement 223s with no else-clause 223s registers an offense 223s with a completely empty else-clause 223s doesn't register an offense 223s with an else-clause containing only the literal nil 223s doesn't register an offense 223s with an else-clause with side-effects 223s doesn't register an offense 223s given an unless-statement 223s with a completely empty else-clause 223s doesn't register an offense 223s with no else-clause 223s doesn't register an offense 223s with an else-clause with side-effects 223s doesn't register an offense 223s with an else-clause containing only the literal nil 223s doesn't register an offense 223s EmptyElse enabled and set to warn on empty 223s given a case statement 223s with an else-clause with side-effects 223s doesn't register an offense 223s with a completely empty else-clause 223s doesn't register an offense 223s with no else-clause 223s registers an offense 223s with an else-clause containing only the literal nil 223s doesn't register an offense 223s >= Ruby 2.7 223s does not register an offense 223s given an unless-statement 223s with an else-clause with side-effects 223s doesn't register an offense 223s with an else-clause containing only the literal nil 223s doesn't register an offense 223s with no else-clause 223s registers an offense 223s with a completely empty else-clause 223s doesn't register an offense 223s given an if-statement 223s with an else-clause with side-effects 223s doesn't register an offense 223s with a completely empty else-clause 223s doesn't register an offense 223s with an else-clause containing only the literal nil 223s doesn't register an offense 223s with no else-clause 223s registers an offense 223s configured to warn only on empty if 223s given an unless-statement 223s with an else-clause with side-effects 223s doesn't register an offense 223s with an else-clause containing only the literal nil 223s doesn't register an offense 223s with no else-clause 223s registers an offense 223s with a completely empty else-clause 223s doesn't register an offense 223s given an if-statement 223s with no else-clause 223s registers an offense 223s with a completely empty else-clause 223s doesn't register an offense 223s with an else-clause containing only the literal nil 223s doesn't register an offense 223s with an else-clause with side-effects 223s doesn't register an offense 223s >= Ruby 2.7 223s does not register an offense 223s given a case statement 223s with an else-clause with side-effects 223s doesn't register an offense 223s with an else-clause containing only the literal nil 223s doesn't register an offense 223s with a completely empty else-clause 223s doesn't register an offense 223s with no else-clause 223s doesn't register an offense 223s 223s RuboCop::Cop::Lint::DuplicateMagicComment 223s registers an offense when frozen magic comments are duplicated 223s does not register an offense when frozen magic comments are not duplicated 223s registers an offense when encoding and frozen magic comments are duplicated 223s registers an offense when same encoding magic comments are duplicated 223s does not register an offense when encoding and frozen magic comments are not duplicated 223s registers an offense when different encoding magic comments are duplicated 223s does not register an offense when encoding magic comments are not duplicated 223s 223s RuboCop::Cop::Layout::SpaceBeforeBrackets 223s does not register an offense when assigning an array 223s does not register an offense when using percent array literal argument without parentheses 223s does not register an offense when using array literal argument without parentheses 223s when referencing 223s does not register an offense when using multiple arguments 223s registers an offense and corrects when using space between lvar receiver and left brackets 223s registers an offense and corrects when using space between ivar receiver and left brackets 223s registers an offense and corrects when using space between gvar receiver and left brackets 223s does not register an offense when call desugared `Hash#[]` to ivar receiver 223s does not register an offense when call desugared `Hash#[]` to lvar receiver 223s does not register an offense when call desugared `Hash#[]` to cvar receiver 223s does not register an offense when array literal argument is enclosed in parentheses 223s registers an offense and corrects when using space between cvar receiver and left brackets 223s does not register an offense when not using space between variable receiver and left brackets 223s does not register an offense when it is used as a method argument 223s does not register an offense when using space between method call and left brackets 223s does not register an offense when without receiver 223s does not register an offense when not using space between method call and left brackets 223s when assigning 223s does not register an offense when multiple spaces are inserted inside the left bracket 223s does not register an offense when not using space between receiver and left brackets 223s does not register an offense when space is used in left bracket 223s registers an offense and corrects when using space between receiver and left brackets 223s 223s RuboCop::Formatter::JUnitFormatter 223s #file_finished 223s displays start of parsable text 223s displays an offense for `classname='test_2` in parsable text 223s displays an offense for `classname='test_1` in parsable text 223s displays end of parsable text 223s displays a non-offense element in parsable text 223s 223s RuboCop::Cop::Style::NilComparison 223s configured with comparison preferred 223s registers an offense for nil? 223s registers and corrects an offense for `!x.nil?` 223s configured with predicate preferred 223s registers an offense for === nil 223s registers an offense for == nil 223s registers and corrects an offense when using `x == nil` as a guard condition 223s 223s RuboCop::Cop::Layout::SpaceAroundOperators 223s registers an offense and corrects singleton class operator` 223s accepts splat operator 223s accepts an operator at the beginning of a line 223s accepts an assignment with spaces 223s accepts an assignment by `for` statement 223s accepts an assignment followed by newline 223s accepts argument default values without space 223s accepts a unary 223s registers an offense and corrects exclamation point negation 223s accepts exclamation point definition 223s accepts some operators that are exceptions & don't need spaces 223s accepts unary operators without space 223s accepts the result of the ExtraSpacing Cop 223s accepts exponent operator without spaces 223s accepts an operator at the end of a line 223s accepts operator symbols 223s accepts def of operator 223s accepts rational 223s accepts an assignment with the same alignment margins 223s accepts [] without space 223s accepts [arg] without space 223s accepts ::Kernel::raise 223s accepts operators with spaces 223s accepts ranges 223s registers an offenses for exponent operator with spaces 223s accepts an operator called with method syntax 223s accepts []= without space 223s accepts scope operator 223s accepts an assignment with a blank line 223s accepts operator surrounded by tabs 223s >= Ruby 2.7 223s does not register an offenses for one-line pattern matching syntax (`in`) 223s missing space around operators 223s registers an offense and corrects hash rocket without space at rescue 223s registers an offense and corrects `-` without space with a negative lhs operand 223s registers an offense for binary operators that could be unary 223s registers an offense and corrects arguments to a method 223s registers an offense and corrects string concatenation without messing up new lines 223s registers an offense and corrects match operators without space 223s registers an offense and corrects various assignments without space 223s registers an offense for assignment without space on both sides 223s registers an offense and corrects equality operators without space 223s registers an offense and corrects a setter call without spaces 223s doesn't register an offense for operators with newline on right 223s registers an offense for operators without spaces 223s registers an offense and corrects inheritance < without space 223s behaves like modifier with missing space 223s registers an offense in presence of modifier unless statement 223s behaves like modifier with missing space 223s registers an offense in presence of modifier until statement 223s ternary operators 223s registers an offense and corrects operators with no spaces 223s registers an offense and corrects operators with just a trailing space 223s registers an offense and corrects operators with just a leading space 223s behaves like modifier with missing space 223s registers an offense in presence of modifier if statement 223s behaves like modifier with missing space 223s registers an offense in presence of modifier while statement 223s when a hash literal is on a single line 223s and Layout/HashAlignment:EnforcedHashRocketStyle is table 223s registers an offense and corrects a hash rocket without spaces 223s and Layout/HashAlignment:EnforcedHashRocketStyle is key 223s registers an offense and corrects a hash rocket without spaces 223s when a hash literal is on multiple lines 223s and Layout/HashAlignment:EnforcedHashRocketStyle is key 223s registers an offense and corrects a hash rocket without spaces 223s and Layout/HashAlignment:EnforcedHashRocketStyle is table 223s doesn't register an offense for a hash rocket without spaces 223s >= Ruby 3.0 223s registers an offenses for one-line pattern matching syntax (`=>`) 223s when EnforcedStyleForExponentOperator is space 223s registers an offenses for exponent operator without spaces 223s extra space around operators 223s registers an offense and corrects equality operators with too many spaces 223s registers an offense and corrects `-` with too many spaces with negative lhs operand 223s registers an offense and corrects arguments to a method 223s registers an offense and corrects ternary operator with too many spaces 223s does not register an offenses match operators between `<<` and `+=` 223s registers an offense and corrects hash rocket with too many spaces at rescue 223s registers an offense and corrects binary operators that could be unary 223s registers an offense and corrects assignment with too many spaces on either side 223s registers an offense and corrects various assignments with too many spaces 223s does not register an offenses match operators between `+=` and `<<` 223s registers an offense and corrects a setter call with too many spaces 223s registers an offense and corrects operators with too many spaces on the same line 223s registers an offense and corrects a hash rocket with too many spaces 223s registers an offense and corrects match operators with too many spaces 223s registers an offense and corrects a hash rocket with an extra spaceon multiple line 223s registers an offense and corrects operators with too many spaces 223s registers an offense and corrects inheritance < with too many spaces 223s accepts for a hash rocket with an extra space for alignment on multiple line 223s when does not allowed for alignment 223s registers an offense and corrects an extra space 223s behaves like modifier with extra space 223s registers an offense in presence of modifier if statement 223s behaves like modifier with extra space 223s registers an offense in presence of modifier unless statement 223s behaves like modifier with extra space 223s registers an offense in presence of modifier while statement 223s behaves like modifier with extra space 223s registers an offense in presence of modifier until statement 223s when Layout/ExtraSpacing has `ForceEqualSignAlignment` configured to true 223s allows variables to be aligned 223s allows constants to be aligned 223s 223s RuboCop::Cop::Style::NestedFileDirname 223s Ruby <= 3.0 223s does not register an offense when using `File.dirname(path)` nested two times 223s Ruby >= 3.1 223s does not register an offense when using `File.dirname(path, 2)` 223s registers and corrects an offense when using `File.dirname(path)` nested three times 223s registers and corrects an offense when using `File.dirname(path)` nested two times 223s does not register an offense when using non nested `File.dirname(path)` 223s 223s RuboCop::Cop::Style::InPatternThen 223s >= Ruby 2.7 223s registers an offense for `in b | c | d;` (alternative pattern) 223s registers an offense for `in b, c | d;` 223s accepts `;` separating statements in the body of `in` 223s registers an offense for `in b;` 223s registers an offense for `in b, c, d;` (array pattern) 223s when inspecting a case statement with an empty branch 223s does not register an offense 223s 223s RuboCop::Cop::Layout::HashAlignment 223s register no offense for yield without args 224s register no offense for superclass call without args 224s accepts several pairs per line 224s accepts pairs that don't start a line 224s accepts single line hash 224s with different settings for => and : 224s registers offenses and correct misaligned entries 224s accepts aligned entries 224s with `EnforcedHashRocketStyle`: `table` 224s and aligned keys but a double splat argument after 224s does not register an offense on the `kwsplat` 224s and a double splat argument after a hash key 224s registers an offense on the misaligned key and corrects 224s and misaligned keys 224s registers an offense and corrects 224s and a misaligned double splat argument 224s registers an offense and corrects 224s when the only item is a kwsplat 224s does not register an offense 224s with separator alignment configuration 224s accepts aligned hash keys 224s accepts an empty hash 224s accepts single line hash 224s registers an offense and corrects misaligned hash rockets 224s doesn't break code by moving long keys too far left 224s accepts pairs that don't start a line 224s registers an offense and corrects misaligned hash values 224s registers an offense and corrects mixed indentation and spacing 224s accepts several pairs per line 224s accepts hashes with different separators 224s when using hash value omission 224s accepts aligned hash keys 224s registers an offense and corrects mixed indentation and spacing 224s when using hash value omission 224s accepts several pairs per line 224s accepts single line hash 224s accepts pairs that don't start a line 224s when using hash value omission 224s accepts pairs that don't start a line 224s accepts single line hash 224s accepts several pairs per line 224s ignore implicit last argument hash 224s registers an offense and corrects misaligned keys in explicit hash for super 224s accepts misaligned keys in implicit hash for super 224s accepts misaligned keys in implicit hash 224s registers an offense and corrects misaligned keys in explicit hash for yield 224s registers an offense and corrects misaligned keys in explicit hash 224s accepts misaligned keys in implicit hash for yield 224s when `EnforcedStyle: with_fixed_indentation` of `ArgumentAlignment` 224s register and corrects an offense 224s does not register an offense using aligned hash literal 224s registers and corrects an offense when using misaligned keyword arguments 224s does not register an offense using aligned hash argument for `proc.()` 224s does not register an offense for an empty hash literal 224s when using hash value omission 224s does not register and corrects an offense when using aligned keyword arguments 224s register and corrects an offense 224s always ignore last argument hash 224s accepts misaligned keys in implicit hash for super 224s accepts misaligned keys in implicit hash for yield 224s accepts misaligned keys in implicit hash 224s accepts misaligned keys in explicit hash for yield 224s accepts misaligned keys in explicit hash for super 224s accepts misaligned keys in explicit hash 224s with multiple preferred(key and table) alignment configuration 224s accepts aligned hash keys, by table 224s registers an offense and corrects misaligned hash values, prefer key when least offenses 224s accepts an empty hash 224s registers an offense and corrects misaligned hash values, prefer table when least offenses 224s registers an offense and corrects misaligned hash keys with mixed hash style 224s registers an offense and corrects misaligned hash values, works separate for each hash 224s registers an offense and corrects misaligned hash values 224s accepts aligned hash keys, by both 224s accepts aligned hash keys with mixed hash style 224s accepts aligned hash keys, by keys 224s table and key config 224s registers an offense and corrects misaligned hash values, prefer table because it is specified first 224s always inspect last argument hash 224s registers offense and corrects misaligned keys in explicit hash 224s registers an offense and corrects misaligned keys in implicit hash for super 224s registers an offense and corrects misaligned keys in explicit hash for yield 224s registers an offense and corrects misaligned keys in explicit hash for super 224s registers an offense and corrects misaligned keys in implicit hash for yield 224s registers offense and corrects misaligned keys in implicit hash 224s when using hash value omission 224s registers offense and corrects misaligned keys in implicit hash 224s registers offense and corrects misaligned keys in explicit hash 224s with `EnforcedColonStyle`: `table` 224s and a misaligned double splat argument 224s registers an offense and corrects 224s and misaligned keys 224s registers an offense and corrects 224s and aligned keys but a double splat argument after 224s does not register an offense on the `kwsplat` 224s when the only item is a kwsplat 224s does not register an offense 224s and a double splat argument after a hash key 224s registers an offense on the misaligned key and corrects 224s when using hash value omission 224s and aligned keys 224s does not register an offense and corrects 224s ignore explicit last argument hash 224s accepts misaligned keys in explicit hash 224s registers an offense and corrects misaligned keys in implicit hash 224s registers an offense and corrects misaligned keys in implicit hash for super 224s accepts misaligned keys in explicit hash for yield 224s accepts misaligned keys in explicit hash for super 224s registers an offense and corrects misaligned keys in implicit hash for yield 224s when using hash value omission 224s accepts misaligned keys in explicit hash 224s registers an offense and corrects misaligned keys in implicit hash 224s with invalid configuration 224s fails 224s with table+separator alignment configuration 224s accepts a single method argument entry with colon 224s with table alignment configuration 224s registers an offense for misaligned hash values 224s registers an offense and corrects for misaligned hash keys 224s accepts hashes that use different separators and double splats 224s registers an offense and corrects misaligned hash rockets 224s accepts a keyword splat only hash 224s accepts pairs that don't start a line 224s accepts hashes that use different separators 224s accepts a multiline array of single line hashes 224s accepts a symbol only hash followed by a keyword splat 224s accepts several pairs per line 224s accepts an empty hash 224s accepts aligned hash keys and values 224s accepts single line hash 224s when using hash value omission 224s accepts single line hash 224s accepts pairs that don't start a line 224s accepts several pairs per line 224s when using hash value omission 224s accepts aligned hash keys and values 224s with default configuration 224s does not register an offense when value starts on next line 224s registers an offense and corrects alignment when using double splat in braces 224s registers an offense and corrects misaligned hash keys 224s registers an offense and corrects zero or multiple spaces 224s accepts left-aligned hash keys with single spaces 224s registers an offense and corrects mixed hash styles 224s registers an offense and corrects alignment when using double splat in an explicit hash 224s registers an offense and corrects misaligned mixed multiline hash keys 224s registers an offense and corrects table alignment 224s registers an offense and corrects multiline value starts in wrong place 224s registers an offense and corrects separator alignment 224s with implicit hash as last argument 224s registers an offense and corrects misaligned hash keys 224s accepts aligned hash keys 224s accepts an empty hash 224s registers an offense and corrects right alignment of keys 224s 224s RuboCop::Cop::Commissioner 224s #investigate 224s stores all errors raised by the cops 224s traverses the AST and invoke cops specific callbacks 224s when given a source with parsing errors 224s only calls on_other_file 224s when passed :raise_error option 224s re-raises the exception received while processing 224s when a cop reports offenses 224s returns all offenses found by the cops 224s when passed :raise_cop_error option 224s re-raises the exception received while processing 224s when given a force 224s passes the input params to all cops/forces that implement their own #investigate method 224s traverses the AST with on_send / on_csend 224s for a restricted cop 224s calls on_send for the right method calls 224s on both csend and send 224s calls on_send for the right method calls 224s for unrestricted cops 224s calls on_send all method calls 224s 224s RuboCop::Cop::Layout::IndentationWidth 224s with Width set to 4 224s registers and corrects offense for bad indentation 224s for a file with byte order mark 224s accepts correctly indented method definition 224s with ignored patterns set 224s accepts unindented lines for those keywords 224s with if statement 224s registers an offense for bad indentation of an if body 224s with Width set to 2 224s with class 224s registers an offense for bad indentation of a class body 224s leaves body unchanged if the first body line is on the same line with class keyword 224s accepts an empty class body 224s leaves body unchanged if the first body line is on the same line with an opening of singleton class 224s when consistency style is outdent 224s accepts access modifier is outdent 224s when consistency style is normal 224s accepts indented public, protected, and private 224s registers offenses for indented_internal_methods indentation 224s with access modifier 224s registers an offense and corrects for bad modifier indentation before good method definition 224s registers an offense for bad indentation of sections 224s when consistency style is indented_internal_methods 224s registers an offense for normal non-indented internal methods indentation 224s registers an offense for normal non-indented internal methods indentation when defined in a singleton class 224s with case match 224s accepts indented in/else plus indented body 224s accepts correctly indented case/in/else 224s accepts aligned values in `in` clause 224s accepts case/in/else with then beginning a line 224s accepts aligned value in `in` clause and `else` is empty 224s registers an offense for bad indentation in a case/else body 224s accepts case/in/else laid out as a table 224s registers an offense for bad indentation in a case/in body 224s with for 224s registers an offense for bad indentation of a for body 224s accepts an empty for 224s with while/until 224s registers an offense for bad indentation of an until body 224s accepts an empty while 224s registers an offense for bad indentation of a while body 224s registers an offense for bad indentation of begin/end/while 224s with begin/rescue/else/ensure/end 224s registers an offense for bad indentation of bodies 224s with module 224s leaves body unchanged if the first body line is on the same line with module keyword 224s when consistency style is normal 224s accepts an empty module body 224s registers an offense for bad indentation of a module body 224s when consistency style is indented_internal_methods 224s accepts normal non-indented internal methods of module functions 224s registers an offense for bad indentation of a module body 224s with if statement 224s accepts indentation after if on new line after assignment 224s accepts a correctly aligned if/elsif/else/end 224s does not correct in scopes that contain block comments 224s registers offense for bad indentation of modifier if in else 224s indents parenthesized expressions 224s accepts `ensure` after an empty def 224s accepts an empty if 224s registers an offense for bad indentation of an else body when if body contains no code 224s accepts if/then/else/end laid out as another table 224s registers an offense for bad indentation of an if body 224s accepts `rescue` after an empty body 224s accepts `rescue`/`ensure` after an empty def 224s does not raise any error with empty braces 224s does not indent heredoc strings 224s accepts if/elsif/else/end laid out as a table 224s registers an offense for bad indentation of an else body 224s accepts a one line if statement 224s leaves block unchanged if block end is not on its own line 224s accepts `ensure` after an empty body 224s accepts a correctly aligned if/elsif/else/end as a method argument 224s registers and corrects on offense for bad indentation 224s leaves rescue ; end unchanged 224s accepts an if/else branches with rescue clauses 224s handles lines with only whitespace 224s accepts `rescue` after an empty def 224s accepts `rescue`/`ensure` after an empty body 224s registers an offense for bad indentation of an elsif body 224s registers offense for bad indentation of ternary inside else 224s registers an offense for bad indentation of an else body when if and elsif body contains no code 224s with assignment 224s when alignment style is start_of_line 224s and end is aligned with variable 224s accepts an if with end aligned with setter 224s accepts an if with end aligned with variable 224s accepts an if with end aligned with element assignment 224s accepts an if/else with chaining with a block after the end 224s accepts an if/else with chaining after the end 224s accepts an if/else 224s and end is aligned with keyword 224s registers an offense for an if with setter 224s registers an offense for an if 224s registers an offense for an until 224s registers an offense for a while 224s registers an offense for an if with element assignment 224s accepts an if/else in assignment on next line 224s and end is aligned randomly 224s registers an offense for an until 224s registers an offense for a while 224s registers an offense for an if 224s when alignment style is variable 224s and end is aligned with variable 224s accepts an if with end aligned with setter 224s accepts an if with end aligned with variable 224s accepts an if with end aligned with element assignment 224s accepts an if/else 224s accepts an if/else with chaining after the end 224s accepts an if/else with chaining with a block after the end 224s and end is aligned with keyword 224s registers an offense for an if with setter 224s accepts an if/else in assignment on next line 224s registers an offense for an until 224s registers an offense for a while 224s registers an offense for an if with element assignment 224s registers an offense for an if 224s and end is aligned randomly 224s registers an offense for a while 224s registers an offense for an until 224s registers an offense for an if 224s when alignment style is keyword 224s and end is aligned with variable 224s registers and corrects bad indentation 224s registers an offense for a while 224s registers an offense for an if 224s and end is aligned with keyword 224s accepts an if in assignment 224s accepts an if/else in assignment on next line 224s accepts an if/else in assignment 224s accepts an until in assignment 224s accepts a while in assignment 224s with def/rescue/end 224s registers an offense for bad indent of defs bodies with a modifier 224s registers an offense for bad indentation of bodies 224s with block 224s accepts badly indented code if block end is not on separate line 224s registers an offense for bad indentation of `do` ... `ensure` ... `end` block 224s registers an offense for bad indentation of a {} body 224s does not register an offense for good indentation of `do` ... `ensure` ... `end` block 224s accepts an empty block body 224s accepts a correctly indented block body 224s registers an offense for bad indentation of a do/end body 224s when consistency style is indented_internal_methods 224s registers an offense for bad indentation in a do/end body 224s when using safe navigation operator 224s registers an offense for an if with setter 224s registers an offense for bad indentation of a {} body 224s Ruby 2.7 224s registers an offense for bad indentation of a do-end body 224s registers an offense for bad indentation of a {} body 224s with unless 224s registers an offense for bad indentation of an unless body 224s accepts an empty unless 224s with def/defs 224s when end is aligned with def 224s accepts an empty def body 224s registers an offense for bad indentation of a defs body 224s accepts an empty defs body 224s registers an offense for bad indentation of a def body 224s with an assignment 224s when modifier and def are on the same line 224s registers an offense for bad indentation of a def body 224s registers an offense for bad indentation of a defs body 224s accepts a correctly aligned body 224s when end is aligned with start of line 224s accepts an empty defs body 224s accepts an empty def body 224s with an assignment 224s registers an offense for bad indentation of a defs body 224s registers an offense for bad indentation of a def body 224s when modifier and def are on the same line 224s registers an offense for bad indentation of a def body 224s registers an offense for bad indentation of a defs body 224s accepts a correctly aligned body 224s when multiple modifiers and def are on the same line 224s accepts a correctly aligned body 224s registers an offense for bad indentation of a defs body 224s registers an offense for bad indentation of a def body 224s when multiple modifiers are used in a block anda method call is made at end of the block 225s registers an offense for bad indentation of a def body 225s accepts a correctly aligned body 225s registers an offense for bad indentation of a def 225s with case 225s accepts correctly indented case/when/else 225s registers an offense for bad indentation in a case/else body 225s accepts case/when/else laid out as a table 225s accepts indented when/else plus indented body 225s registers an offense for bad indentation in a case/when body 225s accepts case/when/else with then beginning a line 225s accepts aligned values in when clause 225s 225s RuboCop::Cop::Lint::OrderedMagicComments 225s does not register an offense when using `encoding` magic comment only 225s does not register an offense when using `frozen_string_literal` magic comment only 225s does not register an offense when using `encoding` magic comment is first line 225s registers an offense and corrects when using `frozen_string_literal` magic comment is next of shebang 225s does not register an offense when using `encoding: Encoding::SJIS` Hash notation after`frozen_string_literal` magic comment 225s registers an offense and corrects when `coding` magic comment does not precede all other magic comments 225s does not register an offense when using `encoding` magic comment is next of shebang 225s registers an offense and corrects when an `encoding` magic comment does not precede all other magic comments 225s registers an offense and corrects when `-*- encoding : ascii-8bit -*-` magic comment does not precede all other magic comments 225s 225s RuboCop::Cop::Lint::RequireParentheses 225s registers an offense for missing parentheses around expression in ternary 225s registers an offense for missing parentheses around expression with || operator 225s accepts method call with parentheses in ternary 225s accepts condition that is not a call 225s accepts missing parentheses when using ternary operator in square bracksts 225s accepts method calls without parentheses followed by keyword and/or 225s accepts calls to methods that are operators 225s accepts method calls that are all operations 225s accepts missing parentheses around expression with + operator 225s accepts missing parentheses when using ternary operator 225s accepts calls to methods that are setters 225s registers an offense for missing parentheses around expression with && operator 225s accepts parentheses around expression with boolean operator 225s accepts missing parentheses when method is not a predicate 225s when using safe navigation operator 225s registers an offense for missing parentheses around expression with && operator 225s 225s RuboCop::Cop::Lint::UnusedBlockArgument 225s inspection 225s when a block have a block local variable 225s and the variable is unused 225s registers an offense 225s and the variable is used 225s does not register offense 225s when an underscore-prefixed block argument is not used 225s accepts 225s when a block takes single argument 225s and the method call is `define_method` 225s registers an offense 225s and the argument is unused 225s registers an offense and suggests omitting that 225s when a block takes multiple arguments 225s and an argument with default value is unused 225s registers an offense and preserves default value 225s and one argument is assigned to another, whilst other's value is not used 225s registers an offense 225s and an argument is unused 225s registers an offense 225s and arguments are swap-assigned 225s accepts 225s and all the arguments are unused 225s registers offenses and suggests omitting them 225s and unused arguments span multiple lines 225s registers offenses and suggests omitting them 225s and a splat argument is unused 225s registers an offense and preserves splat 225s and all arguments are used 225s accepts 225s when a method argument is not used 225s does not care 225s in a method calling `binding` without arguments 225s accepts all arguments 225s inside a method definition 225s registers offenses 225s when an optional keyword argument is unused 225s when the method call is `define_method` 225s registers an offense 225s when AllowUnusedKeywordArguments set 225s does not care 225s when the method call is not `define_method` 225s registers an offense 225s when AllowUnusedKeywordArguments set 225s does not care 225s when a lambda block takes arguments 225s and all the arguments are unused 225s registers offenses and suggests using a proc 225s and an argument is unused 225s registers an offense 225s with an empty block 225s when not configured to ignore empty blocks 225s registers an offense 225s when configured to ignore empty blocks 225s does not register an offense 225s in a method calling `binding` with arguments 225s when a method argument is unused 225s registers an offense 225s when a variable is not used 225s does not care 225s when IgnoreEmptyBlocks config parameter is set 225s registers an offense for a non-empty block with an unused parameter 225s registers an offense for a non-empty block with multiple unused args 225s accepts an empty block with a single unused parameter 225s accepts an empty block with multiple unused parameters 225s 225s RuboCop::Cop::Gemspec::RequiredRubyVersion 225s registers an offense when `required_ruby_version` is blank 225s registers an offense when `required_ruby_version` is not specified 225s registers an offense when `required_ruby_version` is an empty array 225s target ruby version > 2.6 225s registers an offense when `required_ruby_version` is specified with ~> and is higher than `TargetRubyVersion` 225s registers an offense when `required_ruby_version` is specified with >= and is higher than `TargetRubyVersion` 225s target ruby version > 2.7 225s registers an offense when `required_ruby_version` is specified with ~> and is lower than `TargetRubyVersion` 225s recognizes Gem::Requirement and registers offense 225s registers an offense when `required_ruby_version` is specified with >= and is lower than `TargetRubyVersion` 225s recognizes a Gem::Requirement with multiple requirements and does not register an offense 225s registers an offense when `required_ruby_version` is specified in array and is lower than `TargetRubyVersion` 225s false negatives 225s does not register an offense when `required_ruby_version` is assigned as a variable (string literal) 225s does not register an offense when `required_ruby_version` is assigned as a variable (an array of string literal) 225s target ruby version > 2.7 225s registers an offense when `required_ruby_version` is specified with ~> without a minor version and is lower than `TargetRubyVersion` 225s does not register an offense when `required_ruby_version` is specified with >= and equals `TargetRubyVersion` 225s does not register an offense when `required_ruby_version` is specified with ~> without a patch version and equals `TargetRubyVersion` 225s does not register an offense when `required_ruby_version` is specified with ~> and equals `TargetRubyVersion` 225s does not register an offense when `required_ruby_version` is specified with >= without a patch version and equals `TargetRubyVersion` 225s registers an offense when `required_ruby_version` is specified with >= without a minor version and is lower than `TargetRubyVersion` 225s does not register an offense when lowest version of `required_ruby_version` equals `TargetRubyVersion` 225s 225s RuboCop::Cop::Style::SwapValues 225s handles comments when correcting 225s does not register an offense when assigning receiver object at `def` 225s does not register an offense when idiomatically swapping variables 225s does not register an offense when almost swapping variables 225s behaves like verbosely swapping 225s registers an offense and corrects when verbosely swapping instance variables 225s behaves like verbosely swapping 225s registers an offense and corrects when verbosely swapping mixed variables 225s behaves like verbosely swapping 225s registers an offense and corrects when verbosely swapping local variables 225s behaves like verbosely swapping 225s registers an offense and corrects when verbosely swapping constant variables 225s behaves like verbosely swapping 225s registers an offense and corrects when verbosely swapping global variables 225s behaves like verbosely swapping 225s registers an offense and corrects when verbosely swapping class variables 225s behaves like verbosely swapping 225s registers an offense and corrects when verbosely swapping constant with namespaces variables 225s 225s RuboCop::Cop::Style::MethodCallWithoutArgsParentheses 225s registers an offense for `obj.method &&= func()` 225s accepts parens in method call with args 225s accepts parens after not 225s registers an offense for `obj.method += func()` 225s autocorrects calls that could be empty literals 225s accepts parentheses for methods starting with an upcase letter 225s registers an offense for `obj.method ||= func()` 225s accepts special lambda call syntax 225s registers an offense for parens in method call without args 225s when AllowedPatterns is enabled 225s ignores method listed in AllowedMethods 225s when AllowedMethods is enabled 225s ignores method listed in AllowedMethods 225s assignment to a variable with the same name 225s accepts parens in shorthand assignment 225s accepts parens in complex assignment 225s accepts parens in local variable assignment 225s accepts parens in default argument assignment 225s accepts parens in parallel assignment 225s method call as argument 225s registers an empty parens offense for multiple assignment 225s registers an offense with empty parens 225s accepts without parens 225s 225s RuboCop::Cop::Naming::MethodParameterName 225s does not register offense for valid parameter names on self.method 225s registers offense when parameter contains uppercase characters 225s does not register offense for valid default parameters 225s can register multiple offenses in one method definition 225s registers offense for offensive default parameter 225s registers offense when parameter is less than minimum length 225s does not register for method without parameters 225s does not register offense for valid parameter names 225s does not register offense for valid keyword parameters 225s does not register offense for empty kwrestarg 225s registers offense when parameter ends in number 225s registers offense when parameter ends in number on class method 225s does not register offense for empty restarg 225s registers offense when parameter with prefix is less than minimum length 225s registers offense for offensive keyword parameters 225s with AllowNamesEndingInNumbers 225s accept parameters that end in numbers 225s with AllowedNames 225s accepts specified block param names 225s accepts underscore param names 225s registers unlisted offensive names 225s accepts param names prefixed with underscore 225s with ForbiddenNames 225s registers offense for parameter listed as forbidden 225s accepts parameter that uses a forbidden name's letters 225s when using argument forwarding 225s does not register an offense 225s 225s RuboCop::Cop::Layout::HeredocArgumentClosingParenthesis 225s correct cases 225s accepts double correct case nested 225s accepts method with heredoc argument of proc correct case 225s accepts hash correct case 225s accepts double correct case 225s accepts method chain with heredoc argument correct case 225s accepts correct case with other param before 225s accepts when there is an argument between a heredoc argument and the closing paretheses 225s accepts double correct case new line 225s accepts correct case with other param after 225s accepts simple correct case 225s invocation after the HEREDOC 225s ignores tr 225s ignores random call 225s ignores random call after 225s incorrect cases 225s incorrect case with other param before constructor 225s detects 225s incorrect case in array with spaced out comma 225s detects 225s incorrect case with other param before 225s detects 225s simple incorrect case comma 225s detects 225s complex chained incorrect case with multiple calls 225s detects and fixes the first 225s incorrect case in array with nested calls and double heredoc and spaced out comma 225s detects 225s simple incorrect case with call after 225s detects 225s incorrect case with other param before constructor and raise call 225s detects 225s simple incorrect case comma with spaces 225s detects 225s double incorrect case 225s detects 225s double incorrect case new line chained calls 225s detects 225s incorrect case with other param after 225s detects 225s simple incorrect case 225s detects 225s double case new line 225s detects and fixes 225s complex incorrect case with multiple calls 225s detects and fixes the first 225s detects and fixes the second 225s simple incorrect case with call after trailing comma 225s detects 225s simple incorrect case comma with spaces and comma in heredoc 225s detects 225s nested incorrect case 225s detects 225s simple incorrect case hash 225s detects 225s incorrect case nested method call with comma 225s detects 225s incorrect case in array with double heredoc and spaced out comma 225s detects 225s simple incorrect case squiggles 225s detects 225s 225s RuboCop::Cop::Style::EvalWithLocation 225s registers an offense when using correct file argument but incorrect line 225s registers an offense when using `#instance_eval` without any arguments 225s registers an offense when using `#eval` without any arguments 225s does not register an offense when using eval with block argument 225s registers an offense when using `class_eval` with improper arguments 225s registers an offense when using `#class_eval` with an incorrect lineno 225s registers an offense when using `#eval` without lineno 225s registers an offense when using `#module_eval` without any arguments 225s registers an offense when using `Kernel.eval` without any arguments 225s registers an offense when using `#eval` with an incorrect line number 225s registers an offense when using `eval` with improper arguments 225s registers an offense when using `::Kernel.eval` without any arguments 225s registers an offense when using `#class_eval` without any arguments 225s registers an offense when using `instance_eval` with improper arguments 225s registers an offense when using `#eval` with a heredoc and an incorrect line number 225s registers an offense when using `#instance_eval` with a string argument in parentheses 225s registers an offense when using `module_eval` with improper arguments 225s does not register an offense if `eval` is called on another object 225s accepts `eval` with a string, a filename and `__LINE__` 225s accepts `eval` with a heredoc, a filename and `__LINE__ + 1` 225s accepts `eval` with a string, a filename and `__LINE__` on a new line 225s registers an offense when using `#eval` with `binding` only 225s registers an offense when using `#eval` with a string on a new line 225s accepts `eval` with a code that is a variable 225s 225s RuboCop::Cop::Lint::UselessMethodDefinition 225s does not register an offense for empty constructor 225s does not register an offense for constructor with only comments 225s does not register an offense for method containing additional code to `super` 225s does not register an offense when method definition contains optional keyword argument 225s registers an offense and corrects for method containing only `super` call 225s does not register an offense for constructor containing additional code to `super` 225s does not register an offense when non-constructor contains only comments 225s does not register an offense when `super` arguments differ from method arguments 225s does not register an offense when method definition contains optional argument 225s does not register an offense for empty class level `initialize` method 225s 225s RuboCop::Cop::Style::ColonMethodDefinition 225s accepts a class method defined using . 225s using the class name 225s registers an offense for a class method defined using :: 225s using self 225s registers an offense for a class method defined using :: 225s 225s RuboCop::Cop::Metrics::Utils::CodeLengthCalculator 225s #calculate 225s raises when unknown foldable type is passed 225s when class 225s does not count lines of inner classes 225s does not count blank lines 225s folds heredocs if asked 225s counts comments if asked 225s calculates class length 225s folds hashes if asked 225s folds arrays if asked 225s when method 225s folds multiline hashes with line break before it as method args if asked 225s counts single line correctly if asked folding 225s counts single line hash with line breaks correctly if asked folding 225s counts single line without parentheses correctly if asked folding 225s folds multiline hashes with line break after it as method args if asked 225s folds hashes without braces as the one of method args if asked 225s folds hashes with comment if asked 225s counts single line hash with other args correctly if asked folding 225s calculates method length 225s counts single line hash as the one of method args if asked folding 225s folds multiline hashes without braces as method args if asked 225s folds hashes as method kwargs if asked 225s does not count blank lines 225s folds heredocs if asked 225s folds hashes as method args if asked 225s counts comments if asked 225s counts single line hash as the one of method args with safe navigation operator if asked folding 225s folds arrays if asked 225s folds hashes if asked 225s 225s RuboCop::FeatureLoader 225s .load 225s with normally loadable feature 225s loads it normally 225s with dot-prefixed namespaced feature 225s loads it as namespaced feature 225s with unexpected LoadError from require 225s raises LoadError 225s with dot-prefixed loadable feature 225s loads it as relative path 225s with namespaced feature 225s loads it as namespaced feature 225s with unloadable namespaced feature 225s raises LoadError with preferred message 225s 225s RuboCop::Cop::Lint::ToJSON 225s does not register an offense when using `#to_json` with arguments 225s registers an offense and corrects using `#to_json` without arguments 225s 225s RuboCop::Cop::Lint::NoReturnInBeginEndBlocks 225s accepts a block with no return when using -= 225s rejects a return statement inside a block when using *= 225s accepts a block with no return when using /= 225s accepts a block with no return when using *= 225s accepts a block with no return when using **= 225s rejects a return statement inside a block when using /= 225s rejects a return statement inside a block when using -= 225s rejects a return statement inside a block when using = 225s accepts a block with no return when using = 225s accepts a block with no return when using += 225s accepts a block with no return when using ||= 225s rejects a return statement inside a block when using += 225s rejects a return statement inside a block when using ||= 225s rejects a return statement inside a block when using **= 225s 225s RuboCop::Cop::InternalAffairs::SingleLineComparison 225s registers and corrects an offense when comparing `source_range.first_line` with `source_range.last_line` 225s registers and corrects an offense when comparing `loc.last_line` with `loc.line` 225s registers and corrects an offense when negative comparing `first_line` with `last_line` 225s registers and corrects an offense when comparing `loc.first_line` with `loc.last_line` 225s registers and corrects an offense when comparing `source_range.last_line` with `source_range.first_line` 225s registers and corrects an offense when comparing `loc.last_line` with `loc.first_line` 225s registers and corrects an offense when negative comparing `last_line` with `first_line` 225s does not register an offense when the receivers are not a match 225s does not register an offense when comparing the same line 225s registers and corrects an offense when comparing `loc.line` with `loc.last_line` 225s registers and corrects an offense when comparing `first_line` with `last_line` 225s registers and corrects an offense when comparing `last_line` with `first_line` 225s 225s RuboCop::TargetRuby 225s when TargetRubyVersion is not set 225s when .ruby-version is in a parent directory 225s reads it to determine the target ruby version 225s when .tool-versions is present 225s when .tool-versions contains a ruby version 225s does not read Gemfile.lock, gems.locked 225s reads it to determine the target ruby version 225s when .tool-versions does not contain a ruby version 225s uses the default ruby version 225s when .ruby-version is not present 225s and Gemfile.lock exists 225s uses MRI Ruby version when it is present in Gemfile.lock 225s uses MRI Ruby version when it has multiple digits 225s uses the default Ruby when rbx is in Gemfile.lock 225s uses the default Ruby when jruby is in Gemfile.lock 225s uses the default Ruby when Ruby is not in Gemfile.lock 225s gemspec file 225s when file contains `required_ruby_version` as an array 225s sets target_ruby from required_ruby_version with many requirements 225s sets target_ruby to the minimal version satisfying the requirements 225s when file contains `required_ruby_version` as a string 225s sets target_ruby from exclusive range 226s sets target_ruby from inclusive range 226s sets target_ruby from approximate version 226s when file contains `required_ruby_version` as a requirement 226s sets target_ruby from required_ruby_version from inclusive requirement range 226s sets first known ruby version that satisfies requirement 226s when file does not contain `required_ruby_version` 226s sets default target_ruby 226s when bundler lock files are not present 226s uses the default target ruby version 226s and gems.locked exists 226s uses MRI Ruby version when it has multiple digits 226s uses the default Ruby when jruby is in gems.locked 226s uses MRI Ruby version when it is present in gems.locked 226s uses the default Ruby when Ruby is not in gems.locked 226s uses the default Ruby when rbx is in gems.locked 226s when .ruby-version is not in a parent directory 226s when gems.locked is in a parent directory 226s does 226s when Gemfile.lock is in a parent directory 226s does 226s when .ruby-version is present 226s does not read .tool-versions, Gemfile.lock or gems.locked 226s when the MRI version contains multiple digits 226s reads it to determine the target ruby version 226s when .ruby-version contains "system" version 226s uses the default target ruby version 226s when .ruby-version contains a Rbx version 226s uses the default target ruby version 226s when .ruby-version contains a version prefixed by "ruby-" 226s correctly determines the target ruby version 226s when .ruby-version contains a JRuby version 226s uses the default target ruby version 226s when .ruby-version contains an MRI version 226s reads it to determine the target ruby version 226s when TargetRubyVersion is set 226s does not read .ruby-version 226s uses TargetRubyVersion 226s does not read Gemfile.lock or gems.locked 226s 226s RuboCop::Formatter::HTMLFormatter 226s outputs the result in HTML 226s outputs the cached result in HTML 226s 226s RuboCop::Cop::Style::StaticClass 226s registers an offense when class has assignments along with class methods 226s does not register an offense when class includes/prepends a module 226s does not register an offense when class has a parent 226s does not register an offense when class is empty 226s registers an offense when class has `class << self` with class methods 226s does not register an offense when class has macro-like method 226s does not register an offense when class has `class << self` with macro calls 226s does not register an offense for modules 226s registers an offense when class extends a module 226s does not register an offense when class has instance method 226s registers an offense when class has only class method 226s 226s RuboCop::Cop::Lint::TripleQuotes 226s does not register an offense for implicit concatenation 226s string interpolation 226s does not register an offense 226s with nested extra quotes 226s registers an offense and corrects 226s quintuple quotes 226s registers an offense and corrects 226s heredocs 226s does not register an offense 226s triple quotes 226s with only whitespace 226s does not register 226s when only quotes 226s registers an offense and corrects to a single empty quote 226s on one line 226s registers an offense and corrects 226s on multiple lines 226s registers an offense and corrects 226s 226s RuboCop::Cop::MessageAnnotator 226s #urls 226s returns style guide and reference url when they are specified 226s returns style guide url when it is specified 226s returns an empty array if the reference url is blank 226s returns reference url when it is specified 226s returns an empty array without StyleGuide URL 226s returns multiple reference urls 226s #annotate 226s when the output format is JSON 226s returns the message unannotated 226s with options on 226s returns an annotated message 226s with default options 226s returns the message 226s with style guide url 226s when StyleGuide is set in the config 226s adds style guide url 226s when StyleGuide is not set in the config 226s does not add style guide url 226s when a base URL is specified 226s combines correctly with a target-based setting 226s can use a path-based setting 226s does not specify a URL if a cop does not have one 226s allows absolute URLs in the cop config 226s can accept relative paths if base has a full path 226s when a nested department is specified 226s returns style guide url when it is specified 226s when a department other than AllCops is specified 226s returns style guide url when it is specified 226s 226s RuboCop::Cop::Style::TrailingUnderscoreVariable 226s configured to not allow named underscore variables 226s registers an offense for multiple underscore variables preceded by a splat underscore variable 226s does not register an offense for multiple named underscores preceded by a splat variable 226s registers an offense for complex nested assignments with trailing underscores 226s registers an offense for an underscore variable preceded by a named splat underscore variable 226s does not register an offense for an underscore preceded by a splat variable anywhere in the argument chain 226s does not register an offense for an underscore preceded by a splat variable 226s registers an offense when the last variable of parallel assignment is an underscore 226s registers an offense for splat underscore as the last variable 226s registers an offense for an underscore preceded by a named splat underscore 226s does not register an offense for multiple underscores preceded by a splat variable 226s registers an offense when underscore is the second to last variable and blank is the last variable 226s does not register an offense for a named underscore variable preceded by a splat variable 226s registers an offense for an underscore as the last param when there is also an underscore as the first param 226s registers an offense when multiple underscores are used as the last variables of parallel assignment 226s registers an offense for named variables that start with an underscore 226s registers an offense for nested assignments with trailing underscores 226s registers an offense for a named splat underscore as the last variable 226s registers an offense when underscore is the only variable in parallel assignment 226s does not register an offense when there are no underscores 226s does not register an offense for underscores at the beginning 226s does not register an offense for complex nested assignments without trailing underscores 226s does not register an offense for nested assignments without trailing underscores 226s does not register an offense for an underscore preceded by a splat variable and another underscore 226s does not register an offense for a named underscore preceded by a splat variable 226s does not register an offense for a named variable preceded by a names splat underscore variable 226s registers an offense for multiple underscore variables preceded by a named splat underscore variable 226s autocorrect 226s with parentheses 226s removes assignment part when it is the only variable 226s leaves parentheses but removes trailing underscores 226s removes assignment part when every assignment is to `_` 226s leaves parentheses but removes trailing underscores and commas 226s configured to allow named underscore variables 226s does not register an offense for an underscore variable preceded by a named splat underscore variable 226s does not register an offense for a named variable preceded by a names splat underscore variable 226s does not register an offense for an underscore preceded by a splat variable 226s does not register an offense for multiple named underscores preceded by a splat variable 226s does not register an offense for an underscore preceded by a splat variable and another underscore 226s does not register an offense for multiple underscore variables preceded by a named splat underscore variable 226s does not register an offense for an underscore preceded by a splat variable anywhere in the argument chain 226s does not register an offense for a named underscore variable preceded by a splat variable 226s does not register an offense for nested assignments without trailing underscores 226s registers an offense when underscore is the only variable in parallel assignment 226s registers an offense when multiple underscores are used as the last variables of parallel assignment 226s registers an offense when underscore is the second to last variable and blank is the last variable 226s does not register an offense for underscores at the beginning 226s registers an offense for splat underscore as the last variable 226s does not register an offense for named variables that start with an underscore 226s does not register an offense for complex nested assignments without trailing underscores 226s registers an offense when the last variable of parallel assignment is an underscore 226s registers an offense for nested assignments with trailing underscores 226s registers an offense for an underscore as the last param when there is also an underscore as the first param 226s does not register an offense for a named splat underscore as the last variable 226s does not register an offense for multiple underscores preceded by a splat variable 226s registers an offense for complex nested assignments with trailing underscores 226s does not register an offense when there are no underscores 226s registers an offense for multiple underscore variables preceded by a splat underscore variable 226s autocorrect 226s with parentheses 226s removes assignment part when every assignment is to `_` 226s leaves parentheses but removes trailing underscores 226s removes assignment part when it is the only variable 226s leaves parentheses but removes trailing underscores and commas 226s 226s RuboCop::Cop::Naming::MemoizedInstanceVariableName 226s does not register an offense when or-assignment-based memoization is used outside a method definition 226s EnforcedStyleForLeadingUnderscores: required 226s when defined?-based memoization is used 226s registers an offense when it has leading `_` but names do not match 226s registers an offense when names match but missing a leading _ 226s does not register an offense with a leading `_` for both names 226s with dynamically defined methods 226s when a singleton method is defined inside a module callback 226s when the method does not match 226s registers an offense 226s when the method matches 226s does not register an offense 226s when the variable name matches the method name 226s does not register an offense 226s when the variable name does not match the method name 226s registers an offense 226s when a method is defined inside a module callback 226s when the method matches 226s does not register an offense 226s when the method does not match 226s registers an offense 226s when or-assignment-based memoization is used 226s registers an offense when names match but missing a leading _ 226s registers an offense when it has leading `_` but names do not match 226s does not register an offense with a leading `_` for both names 226s with dynamically defined methods 226s when a method is defined inside a module callback 226s when the method does not match 226s registers an offense 226s when the method matches 226s does not register an offense 226s when the variable name does not match the method name 226s registers an offense 226s when the variable name matches the method name 226s does not register an offense 226s when a singleton method is defined inside a module callback 226s when the method matches 226s does not register an offense 226s when the method does not match 226s registers an offense 226s with default EnforcedStyleForLeadingUnderscores => disallowed 226s when defined?-based memoization is used 226s does not register an offense when some code after assignment 226s does not register an offense when some code before defined 226s registers an offense when memoized variable does not match method name 226s does not register an offense when there is no assignment 226s registers an offense when memoized variable does not match class method name 226s with dynamically defined methods 226s when the variable name matches the method name 226s does not register an offense 226s when a singleton method is defined inside a module callback 226s when the method does not match 226s registers an offense 226s when the method matches 226s does not register an offense 226s when the variable name does not match the method name 226s registers an offense 226s when a method is defined inside a module callback 226s when the method matches 226s does not register an offense 226s when the method does not match 226s registers an offense 226s memoized variable matches method name 226s does not register an offense when method has leading `_` 226s does not register an offense when memoized variable matches predicate method name 226s does not register an offense with a leading `_` for both names 226s does not register an offense when memoized variable matches bang method name 226s does not register an offense 226s non-memoized variable does not match method name 226s does not register an offense 226s when or-assignment-based memoization is used 226s with dynamically defined methods 226s when the variable name does not match the method name 226s registers an offense 226s when a singleton method is defined inside a module callback 226s when the method does not match 226s registers an offense 226s when the method matches 226s does not register an offense 226s when the variable name matches the method name 226s does not register an offense 226s when a method is defined inside a module callback 226s when the method does not match 226s registers an offense 226s when the method matches 226s does not register an offense 226s memoized variable after other code does not match method name 226s registers an offense for a bang method 226s registers an offense 226s registers an offense for a predicate method 226s memoized variable does not match method name for block 226s registers an offense 226s memoized variable does not match method name 226s registers an offense 226s memoized variable matches method name 226s does not register an offense when method has leading `_` 226s does not register an offense 226s does not register an offense with a leading `_` for both names 226s code follows memoized variable assignment 226s does not register an offense 226s instance variables in initialize methods 226s does not register an offense 226s memoized variable after other code 226s does not register an offense 226s memoized variable matches method name for block 226s does not register an offense 226s memoized variable matches bang method name 226s does not register an offense 226s memoized variable matches predicate method name 226s does not register an offense 226s non-memoized variable does not match method name 226s does not register an offense 226s memoized variable matches method name during assignment 226s does not register an offense 226s memoized variable does not match method name during assignment 226s registers an offense 226s memoized variable does not match class method name 226s registers an offense 226s EnforcedStyleForLeadingUnderscores: optional 226s when or-assignment-based memoization is used 226s when defined?-based memoization is used 226s memoized variable matches method name 226s does not register an offense with a leading underscore 226s does not register an offense without a leading underscore 226s does not register an offense with a leading `_` for method name 226s does not register an offense with a leading `_` for both names 226s memoized variable matches method name 226s does not register an offense with a leading `_` for method name 226s does not register an offense with a leading `_` for both names 226s does not register an offense without a leading underscore 226s does not register an offense with a leading underscore 226s 226s RuboCop::Cop::Style::SingleLineBlockParams 226s finds incorrectly named parameters with leading underscores 226s does not report if no block arguments are present 226s reports an offense if the arguments names are wrong and not all arguments are given 226s allows an unused parameter to have a leading underscore 226s ignores :reduce symbols 226s allows calls with proper argument names 226s finds wrong argument names in calls with different syntax 226s ignores do..end blocks 226s reports an offense if the names are in reverse order 226s does not report when destructuring is used 226s does not report if the right names are used but not all arguments are given 226s reports an offense if the names are partially correct 226s 226s RuboCop::Cop::Style::OptionalArguments 226s registers an offense when an optional argument is followed by a required argument 226s registers an offense for each optional argument when multiple optional arguments are followed by a required argument 226s allows methods with multiple optional arguments at the end 226s allows methods with only one optional argument 227s allows methods without arguments 227s allows methods with only required arguments 227s allows methods with only one required argument 227s allows methods with only optional arguments 227s named params 227s required params 227s allows optional arguments to come before a mix of required and optional named argument 227s registers an offense for optional arguments that come before required arguments where there are name arguments 227s allows optional arguments before required named arguments 227s with default values 227s allows optional arguments before an optional named argument 227s 227s RuboCop::Cop::Style::InfiniteLoop 227s registers an offense for a while loop with [1] as condition 227s accepts Kernel#loop 227s registers an offense for until false if loop {} would work because the assigned variable is not used afterwards 227s registers an offense for until false if loop {} would work because of previous assignment in a while loop 227s accepts while true if loop {} would change semantics 227s accepts modifier while true if loop {} would change semantics 227s registers an offense for while true or until false if loop {} would work because of an earlier assignment 227s registers an offense for while true if loop {} would work because it is an instance variable being assigned 227s registers an offense for a until loop with false as condition 227s registers an offense for modifier until false if loop {} would not change semantics 227s registers an offense for a while loop with 1 as condition 227s registers an offense for a while loop with {} as condition 227s registers an offense for a until loop with nil as condition 227s registers an offense for a while loop with 2.0 as condition 227s behaves like autocorrector 227s autocorrects the usage of until without do 227s autocorrects begin-end-until with two statements 227s autocorrects single line modifier until 227s autocorrects the usage of until with do 227s autocorrects begin-end-until with one statement 227s autocorrects single line modifier until with and 227s with non-default indentation width 227s autocorrects multi-line modifier until and indents correctly 227s behaves like autocorrector 227s autocorrects begin-end-while with two statements 227s autocorrects begin-end-while with one statement 227s autocorrects single line modifier while with and 227s autocorrects single line modifier while 227s autocorrects the usage of while without do 227s autocorrects the usage of while with do 227s with non-default indentation width 227s autocorrects multi-line modifier while and indents correctly 227s 227s RuboCop::Cop::Lint::FloatComparison 227s registers an offense when comparing with method on float receiver 227s registers an offense when comparing with float returning method 227s does not register an offense when comparing with float method that can return numeric and returns integer 227s does not register an offense when comparing with float using epsilon 227s registers an offense when comparing with float method that can return numeric and returns float 227s registers an offense when comparing with float 227s registers an offense when comparing with arightmetic operator on floats 227s 227s RuboCop::Cop::Layout::SpaceInLambdaLiteral 227s when configured to enforce spaces 227s registers an offense and corrects no space in both lambdas when nested 227s registers an offense and corrects no space in the inner nested lambda 227s does not register an offense for a space between -> and ( 227s registers an offense and corrects no space between -> and ( 227s does not register an offense for no space between -> and { 227s does not register an offense for multi-line lambdas 227s registers an offense and corrects no space in the outer nested lambda 227s when configured to enforce no space 227s registers an offense and corrects a space between -> and ( 227s does not register an offense for no space between -> and ( 227s registers an offense and corrects a space in the inner nested lambda 227s registers an offense and corrects spaces between -> and ( 227s registers an offense and corrects a space in the outer nested lambda 227s does not register an offense for a space between -> and { 227s register offenses and correct spaces in both lambdas when nested 227s does not register an offense for multi-line lambdas 227s 227s RuboCop::Cop::Style::RedundantCondition 227s when regular condition (if) 227s accepts different when the condition does not match the branch 227s accepts elsif 227s when condition and if_branch are same 227s does not register offenses when the branches contains assignment but target not matched 227s registers an offense and corrects when the branches contains parenthesized method call 227s registers an offense and corrects when `if` condition and `then` branch are the same and it has no `else` branch 227s does not register offenses when using `nil?` and the branches contains method which has multiple arguments 227s registers an offense and corrects when using operator method in `else` 227s registers an offense and corrects when the else branch contains an irange 227s registers an offense and corrects when defined inside method and the branches contains assignment 227s registers an offense and corrects when the branches contains arithmetic operation 227s registers an offense and corrects when the branches contains assignment method 227s registers an offense and corrects complex one liners 227s does not register an offense when using assignment by hash key access 227s registers an offense and corrects when the branches contains method call 227s does not register an offense when the branches are the same with different receivers 227s autocorrects when using `<<` method higher precedence than `||` operator 227s registers an offense and corrects when `raise` without argument parentheses in `else` 227s registers an offense and correct when the branches are the same with the same receivers 227s accepts an elsif branch 227s registers an offense and corrects when the branches contains method call with braced hash 227s accepts complex else branches 227s registers an offense and corrects when using modifier if 227s registers an offense and corrects when the branches contains assignment 227s does not register offenses when using `nil?` and the branches contains assignment 227s registers an offense and corrects modifier nodes offense 227s accepts when using ternary if in `else` branch 227s registers an offense and corrects when the branches contains method call with non-braced hash 227s registers an offense and corrects multiline nodes 227s registers an offense and corrects 227s registers an offense and corrects when a method without argument parentheses in `else` 227s does not register offenses when the branches contains hash key access 227s when inverted condition (unless) 227s registers no offense 227s when condition and else branch are same 227s accepts complex unless branches 227s registers an offense 227s ternary expression (?:) 227s accepts expressions when the condition and if branch do not match 227s when condition and if_branch are same 227s registers an offense and corrects nested vars 227s registers an offense and corrects with ternary expression and the branches contains parenthesized method call 227s registers an offense and corrects 227s registers an offense and corrects when the else branch contains an erange 227s registers an offense and corrects brackets accesses 227s registers an offense and corrects when the else branch contains `rescue` 227s registers an offense and corrects class vars 227s registers an offense and corrects with ternary expression and the branches contains chained parenthesized method call 227s registers an offense and corrects functions 227s registers an offense and corrects when the else branch contains an irange 227s registers an offense and corrects when the else branch contains `and` 227s 227s RuboCop::Cop::Style::MultilineMemoization 227s EnforcedStyle: keyword 227s with a single line memoization 227s allows expression on first line 227s allows expression on the following line 227s with a multiline memoization 227s without a `begin` and `end` block 227s allows with a conditional on the following line 227s allows with another block on the following line 227s allows with another block on the first line 227s allows with a conditional on the first line 227s with a multiline memoization 227s without a `begin` and `end` block 227s when the expression is wrapped in parentheses 227s registers an offense with multiline expression 227s registers an offense when expression starts on following line 227s registers an offense when expression starts on first line 227s EnforcedStyle: braces 227s with a single line memoization 227s allows expression on the following line 227s allows expression on first line 227s with a multiline memoization 227s without braces 227s when the expression is wrapped in `begin` and `end` keywords 227s registers an offense for begin...end block on following line 227s registers an offense for begin...end block on first line 227s with a multiline memoization 227s without a `begin` and `end` block 227s allows with another block on the following line 227s allows with a conditional on the first line 227s allows with another block on the first line 227s allows with a conditional on the following line 227s 227s RuboCop::Cop::Lint::RedundantCopEnableDirective 227s registers offense and corrects redundant enabling of same cop 227s registers correct offense when combined with necessary enable 227s registers multiple offenses and corrects the same comment 227s registers correct offense when combined with necessary enable, no white-space after comma 227s registers an offense and corrects when the first cop is unnecessarily enabled 227s registers offense and corrects unnecessary enable 227s when all department enabled 227s registers correct offense when combined with necessary enable 227s registers an offense and corrects when the first department is unnecessarily enabled 227s registers offense and corrects redundant enabling of department of same cop 227s registers offense and corrects redundant enabling of same department 227s registers offense and corrects unnecessary enable 227s registers offense and corrects redundant enabling of cop of same department 227s registers multiple offenses and corrects the same comment 227s all switch 227s registers offense and corrects unnecessary enable all 227s when at least one cop was disabled 227s does not register offense 227s when cop is disabled in the configuration 227s registers an offense if enabling it twice 227s registers no offense when enabling the cop 227s when all cops are unnecessarily enabled 227s on the same line 227s registers an offense and corrects 227s on separate lines 227s registers an offense and corrects when there is extra white space 227s when last cop is unnecessarily enabled 227s registers an offense and corrects 227s registers an offense and corrects when there is no space between the cops and the comma 227s when middle cop is unnecessarily enabled 227s registers an offense and corrects when there is extra white space 227s registers an offense and corrects 227s 227s RuboCop::Cop::Style::UnpackFirst 227s ruby version >= 2.4 227s registers offense 227s when using `#unpack` with dot and square brackets 227s when using `#unpack` with `#at` 227s when using `#unpack` with square brackets 227s when using `#unpack` with `#first` 227s when using `#unpack` with `#slice` 227s does not register offense 227s when using `#unpack` accessing second element 227s when using `#unpack1` 227s 227s RuboCop::Cop::Metrics::ClassLength 227s accepts empty classes 227s accepts a class with less than 5 lines 227s does not count blank lines 227s rejects a class with more than 5 lines 227s accepts a class with 5 lines 227s reports the correct beginning and end lines 227s when inspecting a class defined with Class.new 227s registers an offense 227s when inspecting a class defined with ::Class.new 227s registers an offense 227s when overlapping constant assignments 227s does not register an offense 227s when inspecting a class defined with Struct.new 227s registers an offense when multiple assignments to constants 227s registers an offense when inspecting or equals (`||=`) for constant 227s registers an offense 227s when using numbered parameter 227s when inspecting a class defined with Class.new 227s registers an offense 227s when inspecting a class defined with ::Class.new 227s registers an offense 227s when inspecting a class defined with Struct.new 227s registers an offense when multiple assignments to constants 227s registers an offense when inspecting or equals (`||=`) for constant 227s registers an offense 227s when `CountAsOne` is not empty 227s folds array into one line 227s when CountComments is disabled 227s accepts classes that only contain comments 227s when CountComments is enabled 227s registers an offense for a class that only contains comments 227s also counts commented lines 227s when a class has inner classes 227s does not count lines of inner classes 227s rejects a class with 6 lines that belong to the class directly 227s 227s RuboCop::Cop::Layout::MultilineMethodCallBraceLayout 227s ignores calls without arguments 227s ignores single-line calls 227s ignores calls with an empty brace 227s ignores calls with a multiline empty brace 227s ignores implicit calls 227s when EnforcedStyle is new_line 227s ignores single-line calls with multi-line receiver 227s ignores single-line calls with multi-line receiver with leading dot 227s still ignores single-line calls 227s behaves like multiline literal brace layout trailing comma 227s symmetrical style 227s opening brace on same line as first element 227s last element has a trailing comma 227s autocorrects closing brace on different line from last element 227s same_line style 227s opening brace on same line as first element 227s last element has a trailing comma 227s autocorrects closing brace on different line as last element 227s behaves like multiline literal brace layout 227s heredoc 227s ignores heredocs that could share a last line 227s detects heredoc structures that are safe to add to 227s symmetrical style 227s opening brace on separate line from first element 227s allows closing brace on separate line from last element 227s allows closing brace on separate line from last multiline element 227s detects closing brace on same line as last element 227s opening brace on same line as first element 227s detects closing brace on different line from last element 227s allows closing brace on same line as last multiline element 227s autocorrects closing brace on different line from last element 227s allows closing brace on same line as last element 227s with a chained call on the closing brace 227s but no comment after the last element 227s autocorrects the closing brace 227s and a comment after the last element 227s detects closing brace on separate line from last elementbut does not autocorrect the closing brace 227s new_line style 227s opening brace on same line as first element 227s allows closing brace on different line from last element 227s allows closing brace on different line from multi-line element 227s detects closing brace on same line as last multiline element 227s autocorrects closing brace on same line as last element 227s opening brace on separate line from first element 227s allows closing brace on separate line from last element 227s allows closing brace on separate line from last multiline element 227s detects closing brace on same line as last element 227s same_line style 227s opening brace on same line as first element 227s autocorrects closing brace on different line as last element 227s allows closing brace on same line as multi-line element 227s detects closing brace on different line from multiline element 227s allows closing brace on same line from last element 227s with a chained call on the closing brace 227s and a comment after the last element 227s detects closing brace on separate line from last elementbut does not autocorrect the closing brace 227s but no comment after the last element 227s autocorrects the closing brace 227s opening brace on separate line from first element 227s detects closing brace on different line from last element 227s allows closing brace on same line as last multiline element 227s allows closing brace on same line as last element 227s when comment present before closing brace 227s corrects closing brace without crashing 227s 227s RuboCop::Cop::Lint::SendWithMixinArgument 227s registers an offense when using `send` with `include` 227s registers an offense when using `public_send` method 227s registers an offense when using `send` with `extend` 227s registers an offense when using `__send__` method 227s does not register an offense when using `extend` 227s registers an offense when using `send` with `prepend` 227s does not register an offense when using `include` 227s does not register an offense when using `prepend` 227s does not register an offense when not using a mixin method 227s when specifying a mixin method as a string 227s registers an offense when using `send` with `extend` 227s registers an offense when using `send` with `prepend` 227s registers an offense when using `send` with `include` 227s when using namespace for module 227s registers an offense when using `send` with `include` 227s 227s RuboCop::Cop::Lint::LiteralInInterpolation 227s accepts interpolation of irange where endpoints are not literals 227s accepts empty interpolation 227s handles backslash in single quotes when autocorrecting 227s handles backslash in double quotes when autocorrecting 227s does not register an offense when space literal at the end of heredoc line 227s accepts interpolation of xstr 227s handles double quotes in single quotes when autocorrecting 227s handles nested interpolations when autocorrecting 227s accepts interpolation of erange where endpoints are not literals 227s behaves like literal interpolation 227s removes interpolation around 123_456_789_123_456_789 when there is more text 227s removes interpolation around multiple 123_456_789_123_456_789 227s registers an offense for 123_456_789_123_456_789 in interpolation and removes interpolation around it 227s registers an offense only for final 123_456_789_123_456_789 in interpolation 227s when there is non-literal and literal interpolation 227s when literal interpolation is after non-literal 227s only removes interpolation around literal 227s when literal interpolation is before non-literal 227s only removes interpolation around literal 227s behaves like special keywords 227s registers an offense and autocorrects interpolation after __LINE__ 227s accepts strings like __LINE__ 227s behaves like literal interpolation 227s removes interpolation around multiple {"a" => "b"} 227s registers an offense only for final {"a" => "b"} in interpolation 227s removes interpolation around {"a" => "b"} when there is more text 227s registers an offense for {"a" => "b"} in interpolation and removes interpolation around it 227s when there is non-literal and literal interpolation 227s when literal interpolation is before non-literal 227s only removes interpolation around literal 227s when literal interpolation is after non-literal 227s only removes interpolation around literal 227s behaves like literal interpolation 227s removes interpolation around multiple nil 227s removes interpolation around nil when there is more text 227s registers an offense for nil in interpolation and removes interpolation around it 227s registers an offense only for final nil in interpolation 227s when there is non-literal and literal interpolation 227s when literal interpolation is after non-literal 228s only removes interpolation around literal 228s when literal interpolation is before non-literal 228s only removes interpolation around literal 228s behaves like special keywords 228s registers an offense and autocorrects interpolation after __ENCODING__ 228s accepts strings like __ENCODING__ 228s behaves like literal interpolation 228s removes interpolation around %w[v1] when there is more text 228s registers an offense for %w[v1] in interpolation and removes interpolation around it 228s registers an offense only for final %w[v1] in interpolation 228s removes interpolation around multiple %w[v1] 228s when there is non-literal and literal interpolation 228s when literal interpolation is before non-literal 228s only removes interpolation around literal 228s when literal interpolation is after non-literal 228s only removes interpolation around literal 228s behaves like literal interpolation 228s registers an offense only for final :symbol in interpolation 228s removes interpolation around :symbol when there is more text 228s registers an offense for :symbol in interpolation and removes interpolation around it 228s removes interpolation around multiple :symbol 228s when there is non-literal and literal interpolation 228s when literal interpolation is before non-literal 228s only removes interpolation around literal 228s when literal interpolation is after non-literal 228s only removes interpolation around literal 228s behaves like literal interpolation 228s removes interpolation around multiple 1.2e-3 228s registers an offense for 1.2e-3 in interpolation and removes interpolation around it 228s removes interpolation around 1.2e-3 when there is more text 228s registers an offense only for final 1.2e-3 in interpolation 228s when there is non-literal and literal interpolation 228s when literal interpolation is before non-literal 228s only removes interpolation around literal 228s when literal interpolation is after non-literal 228s only removes interpolation around literal 228s behaves like literal interpolation 228s registers an offense for %i[ s1 s2 ] in interpolation and removes interpolation around it 228s removes interpolation around %i[ s1 s2 ] when there is more text 228s registers an offense only for final %i[ s1 s2 ] in interpolation 228s removes interpolation around multiple %i[ s1 s2 ] 228s when there is non-literal and literal interpolation 228s when literal interpolation is before non-literal 228s only removes interpolation around literal 228s when literal interpolation is after non-literal 228s only removes interpolation around literal 228s behaves like literal interpolation 228s removes interpolation around true when there is more text 228s registers an offense only for final true in interpolation 228s removes interpolation around multiple true 228s registers an offense for true in interpolation and removes interpolation around it 228s when there is non-literal and literal interpolation 228s when literal interpolation is after non-literal 228s only removes interpolation around literal 228s when literal interpolation is before non-literal 228s only removes interpolation around literal 228s behaves like literal interpolation 228s registers an offense only for final %i[s1 s2] in interpolation 228s removes interpolation around multiple %i[s1 s2] 228s removes interpolation around %i[s1 s2] when there is more text 228s registers an offense for %i[s1 s2] in interpolation and removes interpolation around it 228s when there is non-literal and literal interpolation 228s when literal interpolation is after non-literal 228s only removes interpolation around literal 228s when literal interpolation is before non-literal 228s only removes interpolation around literal 228s behaves like literal interpolation 228s removes interpolation around %w[v1 v2] when there is more text 228s registers an offense only for final %w[v1 v2] in interpolation 228s registers an offense for %w[v1 v2] in interpolation and removes interpolation around it 228s removes interpolation around multiple %w[v1 v2] 228s when there is non-literal and literal interpolation 228s when literal interpolation is before non-literal 228s only removes interpolation around literal 228s when literal interpolation is after non-literal 228s only removes interpolation around literal 228s behaves like special keywords 228s accepts strings like __END__ 228s registers an offense and autocorrects interpolation after __END__ 228s behaves like literal interpolation 228s removes interpolation around multiple %I[s1 s2] 228s removes interpolation around %I[s1 s2] when there is more text 228s registers an offense for %I[s1 s2] in interpolation and removes interpolation around it 228s registers an offense only for final %I[s1 s2] in interpolation 228s when there is non-literal and literal interpolation 228s when literal interpolation is before non-literal 228s only removes interpolation around literal 228s when literal interpolation is after non-literal 228s only removes interpolation around literal 228s behaves like literal interpolation 228s removes interpolation around -1 when there is more text 228s registers an offense for -1 in interpolation and removes interpolation around it 228s removes interpolation around multiple -1 228s registers an offense only for final -1 in interpolation 228s when there is non-literal and literal interpolation 228s when literal interpolation is before non-literal 228s only removes interpolation around literal 228s when literal interpolation is after non-literal 228s only removes interpolation around literal 228s behaves like literal interpolation in words literal 228s accepts interpolation of a string literal with space in %I[] 228s removes interpolation of a symbol literal without space in %I[] 228s accepts interpolation of an array literal containing a symbol with space in %I[] 228s removes interpolation of an array containing a string literal without space in %I[] 228s removes interpolation of a string literal without space in %I[] 228s accepts interpolation of a symbol literal with space in %I[] 228s removes interpolation of an array containing a symbol literal without space in %I[] 228s accepts interpolation of an array literal containing a string with space in %I[] 228s behaves like literal interpolation 228s removes interpolation around multiple 1 228s registers an offense only for final 1 in interpolation 228s registers an offense for 1 in interpolation and removes interpolation around it 228s removes interpolation around 1 when there is more text 228s when there is non-literal and literal interpolation 228s when literal interpolation is after non-literal 228s only removes interpolation around literal 228s when literal interpolation is before non-literal 228s only removes interpolation around literal 228s behaves like special keywords 228s accepts strings like __FILE__ 228s registers an offense and autocorrects interpolation after __FILE__ 228s behaves like literal interpolation 228s registers an offense for 0o377 in interpolation and removes interpolation around it 228s registers an offense only for final 0o377 in interpolation 228s removes interpolation around 0o377 when there is more text 228s removes interpolation around multiple 0o377 228s when there is non-literal and literal interpolation 228s when literal interpolation is after non-literal 228s only removes interpolation around literal 228s when literal interpolation is before non-literal 228s only removes interpolation around literal 228s behaves like literal interpolation 228s removes interpolation around multiple [] 228s registers an offense for [] in interpolation and removes interpolation around it 228s registers an offense only for final [] in interpolation 228s removes interpolation around [] when there is more text 228s when there is non-literal and literal interpolation 228s when literal interpolation is before non-literal 228s only removes interpolation around literal 228s when literal interpolation is after non-literal 228s only removes interpolation around literal 228s behaves like literal interpolation 228s removes interpolation around :"symbol" when there is more text 228s registers an offense for :"symbol" in interpolation and removes interpolation around it 228s registers an offense only for final :"symbol" in interpolation 228s removes interpolation around multiple :"symbol" 228s when there is non-literal and literal interpolation 228s when literal interpolation is after non-literal 228s only removes interpolation around literal 228s when literal interpolation is before non-literal 228s only removes interpolation around literal 228s in string-like contexts 228s removes interpolation in regular expressions 228s removes interpolation in backticks 228s removes interpolation in symbols 228s behaves like literal interpolation 228s removes interpolation around %i[s1 s2] when there is more text 228s registers an offense for %i[s1 s2] in interpolation and removes interpolation around it 228s removes interpolation around multiple %i[s1 s2] 228s registers an offense only for final %i[s1 s2] in interpolation 228s when there is non-literal and literal interpolation 228s when literal interpolation is before non-literal 228s only removes interpolation around literal 228s when literal interpolation is after non-literal 228s only removes interpolation around literal 228s behaves like non-special string literal interpolation 228s registers an offense for "foo" and removes the interpolation and quotes around "foo" 228s behaves like literal interpolation in words literal 228s accepts interpolation of an array literal containing a string with space in %W[] 228s accepts interpolation of a string literal with space in %W[] 228s removes interpolation of an array containing a string literal without space in %W[] 228s accepts interpolation of a symbol literal with space in %W[] 228s removes interpolation of an array containing a symbol literal without space in %W[] 228s accepts interpolation of an array literal containing a symbol with space in %W[] 228s removes interpolation of a symbol literal without space in %W[] 228s removes interpolation of a string literal without space in %W[] 228s behaves like literal interpolation 228s registers an offense only for final 0xaabb in interpolation 228s removes interpolation around multiple 0xaabb 228s removes interpolation around 0xaabb when there is more text 228s registers an offense for 0xaabb in interpolation and removes interpolation around it 228s when there is non-literal and literal interpolation 228s when literal interpolation is after non-literal 228s only removes interpolation around literal 228s when literal interpolation is before non-literal 228s only removes interpolation around literal 228s behaves like literal interpolation 228s removes interpolation around %w[] when there is more text 228s registers an offense only for final %w[] in interpolation 228s removes interpolation around multiple %w[] 228s registers an offense for %w[] in interpolation and removes interpolation around it 228s when there is non-literal and literal interpolation 228s when literal interpolation is after non-literal 228s only removes interpolation around literal 228s when literal interpolation is before non-literal 228s only removes interpolation around literal 228s behaves like literal interpolation 228s removes interpolation around 2.0 when there is more text 228s registers an offense for 2.0 in interpolation and removes interpolation around it 228s registers an offense only for final 2.0 in interpolation 228s removes interpolation around multiple 2.0 228s when there is non-literal and literal interpolation 228s when literal interpolation is before non-literal 228s only removes interpolation around literal 228s when literal interpolation is after non-literal 229s only removes interpolation around literal 229s behaves like literal interpolation 229s registers an offense for ["a", "b"] in interpolation and removes interpolation around it 229s removes interpolation around multiple ["a", "b"] 229s registers an offense only for final ["a", "b"] in interpolation 229s removes interpolation around ["a", "b"] when there is more text 229s when there is non-literal and literal interpolation 229s when literal interpolation is before non-literal 229s only removes interpolation around literal 229s when literal interpolation is after non-literal 229s only removes interpolation around literal 229s behaves like literal interpolation 229s registers an offense only for final 1_123 in interpolation 229s removes interpolation around multiple 1_123 229s registers an offense for 1_123 in interpolation and removes interpolation around it 229s removes interpolation around 1_123 when there is more text 229s when there is non-literal and literal interpolation 229s when literal interpolation is before non-literal 229s only removes interpolation around literal 229s when literal interpolation is after non-literal 229s only removes interpolation around literal 229s behaves like non-special string literal interpolation 229s registers an offense for 'foo' and removes the interpolation and quotes around 'foo' 229s behaves like literal interpolation 229s registers an offense for 1..2 in interpolation and removes interpolation around it 229s registers an offense only for final 1..2 in interpolation 229s removes interpolation around multiple 1..2 229s removes interpolation around 1..2 when there is more text 229s when there is non-literal and literal interpolation 229s when literal interpolation is before non-literal 229s only removes interpolation around literal 229s when literal interpolation is after non-literal 229s only removes interpolation around literal 229s behaves like literal interpolation 229s removes interpolation around false when there is more text 229s registers an offense only for final false in interpolation 229s registers an offense for false in interpolation and removes interpolation around it 229s removes interpolation around multiple false 229s when there is non-literal and literal interpolation 229s when literal interpolation is after non-literal 229s only removes interpolation around literal 229s when literal interpolation is before non-literal 229s only removes interpolation around literal 229s behaves like literal interpolation 229s registers an offense only for final 1...2 in interpolation 229s removes interpolation around 1...2 when there is more text 229s registers an offense for 1...2 in interpolation and removes interpolation around it 229s removes interpolation around multiple 1...2 229s when there is non-literal and literal interpolation 229s when literal interpolation is after non-literal 229s only removes interpolation around literal 229s when literal interpolation is before non-literal 229s only removes interpolation around literal 229s 229s RuboCop::Cop::Style::PercentQLiterals 229s when EnforcedStyle is lower_case_q 229s without interpolation 229s accepts double quotes 229s accepts single quotes 229s accepts %q 229s registers offense for %Q 229s with special characters 229s accepts %Q 229s accepts %q 229s with interpolation 229s accepts double quotes 229s accepts single quotes 229s accepts %q 229s accepts %Q 229s when EnforcedStyle is upper_case_q 229s with interpolation 229s accepts double quotes 229s accepts %Q 229s accepts single quotes 229s accepts %q 229s without interpolation 229s registers offense for %q 229s accepts single quotes 229s accepts %Q 229s accepts double quotes 229s with special characters 229s accepts %q 229s accepts %Q 229s 229s RuboCop::Cop::Layout::EmptyLinesAroundClassBody 229s when EnforcedStyle is empty_lines 229s does not register offenses 229s accepts classes with an empty body 229s registers an offense for singleton class body not starting or ending with a blank 229s registers an offense for class body not starting or ending with a blank 229s does not register offenses when specifying a superclass that breaks the line 229s accepts singleton classes with an empty body 229s when EnforcedStyle is ending_only 229s ignores empty lines at the beginning of a class 229s registers an offense for an empty line at the end of a class 229s when EnforcedStyle is no_empty_lines 229s registers an offense for class body ending with a blank 229s registers an offense for class body starting with a blank 229s registers an offense for singleton class body ending with a blank 229s autocorrects singleton class body containing only a blank 229s when EnforcedStyle is beginning_only 229s registers an offense for an empty line at the end of a class 229s ignores empty lines at the beginning of a class 229s when EnforcedStyle is empty_lines_except_namespace 229s when has multiple child classes 229s requires empty lines for namespace 229s registers offenses for namespace body starting and ending without a blank 229s when only child is class 229s registers offense for namespace body ending with a blank 229s registers offense for namespace body starting with a blank 229s registers offenses for namespaced class body not starting with a blank 229s requires no empty lines for namespace 229s autocorrects beginning and end 229s registers offenses for namespaced class body not ending with a blank 229s when only child is module 229s requires no empty lines for namespace 229s registers offense for namespace body starting with a blank 229s registers offense for namespace body ending with a blank 229s when EnforcedStyle is empty_lines_special 229s class with constant and child class 229s registers and autocorrects the offenses 229s when first child is a method 229s requires blank line at the beginning and ending of class body 229s source without blank lines 229s registers an offense for class not beginning and ending with a blank line 229s when class has a namespace 229s requires no empty lines for namespace but requires blank line at the beginning and ending of class body 229s source without blank lines 229s registers and autocorrects the offenses 229s source with blank lines 229s autocorrects the offenses 229s class with empty body 229s with empty line 229s does NOT register offenses 229s without empty line 229s does NOT register offenses 229s class with only constants 229s registers and autocorrects the offenses 229s when first child is NOT a method 229s 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 229s source without blank lines 229s registers an offense for class not ending with a blank line 229s source with blank lines 229s registers an offense for class beginning with a blank line 229s source with comment before method definition 229s registers an offense for class beginning with a blank line 229s when class has a namespace 229s 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 229s source with blank lines 229s registers and autocorrects the offenses 229s source without blank lines 229s registers and autocorrects the offenses 229s source with constants 229s registers and autocorrects the offenses 229s when first child is an access modifier 229s with no blank lines at the beginning and ending of class body 229s registers and corrects an offense 229s with blank lines at the beginning and ending of class body 229s registers no offense 229s when namespace has multiple children 229s requires empty lines for namespace 229s 229s RuboCop::Cop::VisibilityHelp 229s #node_visibility 229s with inline public 229s is expected to eq :public 229s with visibility block public 229s is expected to eq :public 229s with inline private 229s is expected to eq :private 229s with inline private with symbol 229s is expected to eq :private 229s without visibility block 229s is expected to eq :public 229s with visibility block private after public 229s is expected to eq :private 229s with visibility block private 229s is expected to eq :private 229s 229s RuboCop::Cop::Style::SelfAssignment 229s registers an offense for non-shorthand assignment * and @x 229s registers an offense for non-shorthand assignment + and x 229s registers an offense for non-shorthand assignment || and x 229s registers an offense for non-shorthand assignment - and @x 229s registers an offense for non-shorthand assignment && and x 229s registers an offense for non-shorthand assignment || and @@x 229s registers an offense for non-shorthand assignment * and @@x 229s registers an offense for non-shorthand assignment & and @x 229s registers an offense for non-shorthand assignment ** and @@x 229s registers an offense for non-shorthand assignment & and x 229s registers an offense for non-shorthand assignment / and x 229s registers an offense for non-shorthand assignment - and x 229s registers an offense for non-shorthand assignment & and @@x 229s registers an offense for non-shorthand assignment | and x 229s registers an offense for non-shorthand assignment ** and @x 229s registers an offense for non-shorthand assignment / and @@x 229s registers an offense for non-shorthand assignment && and @x 229s registers an offense for non-shorthand assignment + and @@x 229s registers an offense for non-shorthand assignment - and @@x 229s registers an offense for non-shorthand assignment / and @x 229s registers an offense for non-shorthand assignment && and @@x 229s registers an offense for non-shorthand assignment | and @x 229s registers an offense for non-shorthand assignment ** and x 229s registers an offense for non-shorthand assignment * and x 229s registers an offense for non-shorthand assignment || and @x 229s registers an offense for non-shorthand assignment + and @x 229s registers an offense for non-shorthand assignment | and @@x 229s 229s RuboCop::Cop::Lint::UnreachableCode 229s accepts `exit` is in `if` branch only 229s registers an offense for `next` in all `case` branches 229s accepts `break` as the final expression 229s registers an offense for `fail` in `begin` 229s registers an offense for `exit` in all `if` and `elsif` branches 229s accepts `exit!` is in `else` branch only 229s accepts `fail` as the final expression 229s accepts `exit!` as the final expression 229s accepts `retry` is in `else` branch only 229s registers an offense for `redo` in all `if` and `elsif` branches 229s registers an offense for `exit!` in all `if` branches with other expressions 229s accepts `throw` is in `else` branch only 229s accepts `exit!` is not in `elsif` branch 229s accepts `retry` is in all `if` branches 229s accepts `fail` is in `if` branch only 229s accepts `exit` is not in `elsif` branch 229s accepts `redo` is not in `elsif` branch 229s registers an offense for `retry` in `begin` 229s accepts `exit` is in `else` branch only 229s registers an offense for `retry` in all `if` and `elsif` branches 229s accepts `retry` is not in `elsif` branch 229s accepts `return` is in `if` branch only 229s accepts `break` is in `if` branch only 229s registers an offense for `exit!` in all `if` and `elsif` branches 229s accepts `break` is in all `if` branches 229s accepts code with conditional `fail` 229s registers an offense for `abort` in all `if` branches 229s accepts `exit` is in all `if` branches 229s accepts `return` is not in `elsif` branch 229s registers an offense for `redo` in all `if` branches 229s accepts code with conditional `retry` 229s registers an offense for `abort` in all `case` branches 229s accepts `retry` is in `case` branch without else 229s registers an offense for `throw` in all `if` and `elsif` branches 229s registers an offense for `exit` in all `if` branches 229s accepts `throw` is in all `if` branches 229s accepts `break` is in `else` branch only 229s accepts `fail` is in `if`, and without `else` 229s registers an offense for `throw` in `begin` 229s registers an offense for `exit!` before other statements 229s registers an offense for `next` in all `if` branches 229s accepts `redo` is in all `if` branches 229s accepts `exit!` is in all `if` branches 229s registers an offense for `next` before other statements 229s registers an offense for `redo` in `begin` 229s accepts `next` is in `case` branch without else 229s registers an offense for `return` in all `if` branches with other expressions 229s registers an offense for `break` in all `if` branches 229s accepts `next` is in all `if` branches 229s registers an offense for `break` in `begin` 229s accepts `retry` is in `if` branch only 229s accepts `raise` is not in `elsif` branch 229s registers an offense for `raise` in all `case` branches 229s registers an offense for `redo` before other statements 229s accepts `exit` as the final expression 229s registers an offense for `fail` in all `if` branches 229s accepts `break` is in `if`, and without `else` 229s registers an offense for `throw` in all `if` branches with other expressions 229s registers an offense for `raise` before other statements 229s registers an offense for `return` in `begin` 229s registers an offense for `retry` in all `if` branches with other expressions 229s registers an offense for `fail` in all `case` branches 229s accepts `redo` is in `if`, and without `else` 229s accepts code with conditional `exit!` 229s accepts `abort` is in all `if` branches 229s registers an offense for `exit!` in all `case` branches 229s accepts `throw` is not in `elsif` branch 229s registers an offense for `abort` in `begin` 229s accepts code with conditional `abort` 229s registers an offense for `retry` before other statements 229s accepts `next` is in `if` branch only 229s accepts `abort` is in `if`, and without `else` 229s registers an offense for `fail` in all `if` branches with other expressions 229s registers an offense for `break` in all `case` branches 229s accepts `raise` is in all `if` branches 229s registers an offense for `throw` in all `if` branches 229s registers an offense for `raise` in all `if` branches 229s registers an offense for `return` in all `case` branches 229s accepts code with conditional `redo` 229s accepts `next` is in `if`, and without `else` 229s accepts `retry` is in `if`, and without `else` 229s accepts `abort` is in `case` branch without else 229s registers an offense for `fail` in all `if` and `elsif` branches 229s accepts code with conditional `next` 229s registers an offense for `exit!` in `begin` 229s registers an offense for `next` in all `if` branches with other expressions 229s accepts `fail` is not in `elsif` branch 229s accepts `fail` is in `case` branch without else 229s accepts `break` is not in `elsif` branch 229s accepts `throw` is in `if`, and without `else` 229s registers an offense for `raise` in all `if` branches with other expressions 229s registers an offense for `return` in all `if` branches 229s registers an offense for `break` in all `if` and `elsif` branches 229s accepts code with conditional `break` 229s accepts `exit` is in `case` branch without else 229s registers an offense for `exit` before other statements 229s accepts `abort` as the final expression 229s accepts `raise` is in `if`, and without `else` 229s registers an offense for `next` in all `if` and `elsif` branches 229s registers an offense for `break` in all `if` branches with other expressions 229s registers an offense for `retry` in all `if` branches 229s registers an offense for `abort` in all `if` and `elsif` branches 229s registers an offense for `exit` in all `if` branches with other expressions 229s accepts `return` is in `else` branch only 229s accepts `return` is in all `if` branches 229s registers an offense for `fail` before other statements 229s accepts code with conditional `exit` 229s registers an offense for `return` before other statements 229s accepts `redo` as the final expression 229s registers an offense for `raise` in `begin` 229s accepts `throw` is in `if` branch only 229s accepts `abort` is in `else` branch only 229s registers an offense for `redo` in all `if` branches with other expressions 229s registers an offense for `abort` in all `if` branches with other expressions 229s accepts `abort` is not in `elsif` branch 229s accepts `exit` is in `if`, and without `else` 229s accepts `next` as the final expression 229s accepts `fail` is in all `if` branches 229s registers an offense for `raise` in all `if` and `elsif` branches 229s accepts `return` is in `if`, and without `else` 229s accepts code with conditional `raise` 229s registers an offense for `redo` in all `case` branches 229s registers an offense for `abort` before other statements 229s accepts code with conditional `throw` 229s registers an offense for `exit!` in all `if` branches 229s accepts `break` is in `case` branch without else 229s registers an offense for `next` in `begin` 229s accepts `throw` as the final expression 229s registers an offense for `exit` in `begin` 229s accepts `raise` is in `if` branch only 229s registers an offense for `throw` before other statements 229s accepts `redo` is in `else` branch only 229s accepts `exit!` is in `if` branch only 229s accepts `next` is in `else` branch only 229s accepts `raise` is in `case` branch without else 229s accepts `exit!` is in `if`, and without `else` 229s accepts `retry` as the final expression 229s accepts `throw` is in `case` branch without else 229s accepts `redo` is in `case` branch without else 229s registers an offense for `exit` in all `case` branches 229s accepts `raise` as the final expression 229s accepts `raise` is in `else` branch only 229s accepts `next` is not in `elsif` branch 230s accepts `redo` is in `if` branch only 230s registers an offense for `retry` in all `case` branches 230s registers an offense for `return` in all `if` and `elsif` branches 230s registers an offense for `break` before other statements 230s accepts `return` is in `case` branch without else 230s accepts `return` as the final expression 230s accepts `exit!` is in `case` branch without else 230s registers an offense for `throw` in all `case` branches 230s accepts `fail` is in `else` branch only 230s accepts code with conditional `return` 230s accepts `abort` is in `if` branch only 230s 230s RuboCop::Cop::InternalAffairs::UselessRestrictOnSend 230s does not register an offense when using `RESTRICT_ON_SEND` and defines `after_send` 230s does not register an offense when using `RESTRICT_ON_SEND` and defines `on_send` 230s does not register an offense when using `RESTRICT_ON_SEND` and defines `after_send` with alias_method 230s does not register an offense when using `RESTRICT_ON_SEND` and defines `on_send` with alias_method 230s registers an offense when using `RESTRICT_ON_SEND` and not defines send callback method 230s does not register an offense when using `RESTRICT_ON_SEND` and defines `after_send` with alias 230s does not register an offense when using `RESTRICT_ON_SEND` and defines `on_send` with alias 230s 230s RuboCop::Cop::Security::CompoundHash 230s registers an offense when using XOR assignment operator in the implementation of the hash method 230s registers an offense when using XOR involving super 230s does not register an offense when delegating to Array#hash 230s registers an offense when using XOR and bitshifts 230s registers an offense when using multiplication assignment operator in the implementation of the hash method 230s registers an offense when using addition assignment operator in the implementation of the hash method 230s registers an offense when using XOR operator in the implementation of the hash method, even if intermediate variable is used 230s registers an offense for complex usage 230s registers an offense when delegating to Array#hash for a single value 230s registers an offense when using multiplication in the implementation of the hash method 230s registers an offense when using XOR operator in the implementation of a dynamic hash singleton method 230s registers an offense when using XOR operator in the implementation of the hash singleton method 230s registers an offense when using XOR operator in the implementation of a dynamic hash method 230s registers an offense when using bitshift and OR 230s registers an offense when using XOR operator in the implementation of the hash method 230s registers an offense when using XOR operator in the implementation of the hash method, even without sub-calls to hash 230s registers an offense when using XOR between an array hash and a class 230s registers an offense when using addition in the implementation of the hash method 230s does not register an offense when delegating to a single object 230s registers an offense if .hash is called on any elements of a hashed array 230s 230s RuboCop::Cop::Style::MapCompactWithConditionalBlock 230s With multiline block 230s registers an offense and corrects to `select` if condition has not else branch 230s registers an offense and corrects to `select` with modifier form of `if` condition 230s registers an offense and corrects to `reject` with `unless` condition 230s registers an offense and corrects to `select` with guard clause of `if` and next explicitly nil 230s registers an offense and corrects to `reject` with modifier form of `unless` condition 230s registers an offense and corrects to `reject` with guard clause of `unless` and `next` has a value 230s registers an offense and corrects to `select` with `if` condition 230s registers an offense and corrects to `select` with multi-line `if` condition 230s does not register offenses if condition has elsif branch 230s registers an offense and corrects to `select` with guard clause of `if` and `next` has a value and return nil 230s registers an offense and corrects to `select` with guard clause of `if` 230s registers an offense and corrects to `select` with guard clause of `if` and `next` has a value 230s registers an offense and corrects to `reject` with ternary expression 230s registers an offense and corrects to `reject` if `next value` in else_branch and `nil` in if_branch 230s registers an offense and corrects to `reject` with guard clause of `unless` and `next` has a value and return nil 230s does not register offenses if `compact` is not chained to `map` 230s registers an offense and corrects to `select` if `next value` in if_branch and `nil` in else_branch 230s does not register offenses if there are multiple guard clauses 230s registers an offense and corrects to `reject` with `if` condition 230s does not register offenses if return value is not same as block argument 230s registers an offense and corrects to `reject` with guard clause of `unless` 230s registers an offense and corrects to `select` with ternary expression 230s registers an offense and corrects to `reject` with guard clause of `unless` and `next` explicitly nil 230s With single line block 230s does not register offenses if `compact` is not chained to `map` 230s registers an offense and corrects to `reject` with modifier form of `unless` condition 230s registers an offense and corrects to `select` with modifier form of `if` condition 230s registers an offense and corrects to `select` with ternary expression 230s registers an offense and corrects to `reject` with ternary expression 230s 230s RuboCop::FileFinder 230s #find_last_file_upwards 230s returns the last file found upwards 230s returns nil when file is not found 230s #find_file_upwards 230s returns nil when file is not found 230s returns a file to be found upwards 230s 230s RuboCop::Cop::Style::AccessModifierDeclarations 230s when `inline` is configured 230s offends when public is not inlined 230s offends when module_function is not inlined and has a comment 230s does not offend when private is inlined with a symbol 230s does not offend when module_function is inlined with a method 230s offends when module_function is not inlined 230s accepts when #{access_modifier} is a hash literal value 230s offends when private is not inlined and has a comment 230s does not offend when public is inlined with a symbol 230s offends when private is not inlined 230s does not offend when public is inlined with a method 230s registers an offense for correct + multiple opposite styles of #{access_modifier} usage 230s does not offend when module_function is inlined with a symbol 230s offends when public is not inlined and has a comment 230s accepts when #{access_modifier} is a hash literal value 230s registers an offense for correct + multiple opposite styles of #{access_modifier} usage 230s registers an offense for correct + multiple opposite styles of #{access_modifier} usage 230s registers an offense for correct + multiple opposite styles of #{access_modifier} usage 230s does not offend when protected is inlined with a symbol 230s does not offend when protected is inlined with a method 230s does not offend when private is inlined with a method 230s offends when protected is not inlined and has a comment 230s accepts when #{access_modifier} is a hash literal value 230s offends when protected is not inlined 230s accepts when #{access_modifier} is a hash literal value 230s allow access modifiers on symbols 230s accepts when argument to #{access_modifier} is a symbol 230s do not allow access modifiers on symbols 230s accepts when argument to #{access_modifier} is a symbol 230s allow access modifiers on symbols 230s accepts when argument to #{access_modifier} is a symbol 230s do not allow access modifiers on symbols 230s accepts when argument to #{access_modifier} is a symbol 230s when methods are modified by group modifier 230s registers and autocorrects an offense 230s do not allow access modifiers on symbols 230s accepts when argument to #{access_modifier} is a symbol 230s when methods are modified by group modifier 230s registers and autocorrects an offense 230s allow access modifiers on symbols 230s accepts when argument to #{access_modifier} is a symbol 230s when methods are modified by group modifier 230s registers and autocorrects an offense 230s do not allow access modifiers on symbols 230s accepts when argument to #{access_modifier} is a symbol 230s allow access modifiers on symbols 230s accepts when argument to #{access_modifier} is a symbol 230s when methods are modified by group modifier 230s registers and autocorrects an offense 230s when `group` is configured 230s offends when public is inlined with a method 230s accepts when #{access_modifier} is a hash literal value 230s does not offend when private is not inlined 230s does not offend when module_function is not inlined 230s accepts when #{access_modifier} is a hash literal value 230s accepts when using only #{access_modifier} 230s does not registers an offense when using #{access_modifier} in a block 230s does not registers an offense when using #{access_modifier} in a block 230s does not offend when protected is not inlined 230s offends when module_function is inlined with a method 230s accepts when using only #{access_modifier} 230s does not registers an offense when using #{access_modifier} in a block 230s does not offend when public is not inlined 230s does not offend when public is not inlined and has a comment 230s does not registers an offense when using #{access_modifier} in a block 230s does not offend when module_function is not inlined and has a comment 230s offends when protected is inlined with a method 230s accepts when using only #{access_modifier} 230s registers an offense for correct + multiple opposite styles of #{access_modifier} usage 230s does not offend when private is not inlined and has a comment 230s accepts when #{access_modifier} is a hash literal value 230s accepts when using only #{access_modifier} 230s does not offend when protected is not inlined and has a comment 230s registers an offense for correct + multiple opposite styles of #{access_modifier} usage 230s offends when private is inlined with a method 230s registers an offense for correct + multiple opposite styles of #{access_modifier} usage 230s registers an offense for correct + multiple opposite styles of #{access_modifier} usage 230s accepts when #{access_modifier} is a hash literal value 230s when non-existent method is modified by inline modifier with disallowed symbol 230s registers an offense but does not autocorrect it 230s when method is modified by inline modifier with disallowed symbol 230s registers and autocorrects an offense 230s when method is modified by inline modifier 230s registers and autocorrects an offense 230s do not allow access modifiers on symbols 230s accepts when argument to #{access_modifier} is a symbol 230s when method has comments 230s registers and autocorrects an offense 230s when method is modified by inline modifier with disallowed symbol 230s registers and autocorrects an offense 230s allow access modifiers on symbols 230s accepts when argument to #{access_modifier} is a symbol 230s when method is modified by inline modifier where group modifier already exists 230s registers and autocorrects an offense 230s when method has comments 230s registers and autocorrects an offense 230s when method is modified by inline modifier where group modifier already exists 230s registers and autocorrects an offense 230s when method has comments 230s registers and autocorrects an offense 230s when method has comments 230s registers and autocorrects an offense 230s do not allow access modifiers on symbols 230s accepts when argument to #{access_modifier} is a symbol 230s when non-existent method is modified by inline modifier with disallowed symbol 230s registers an offense but does not autocorrect it 230s when method is modified by inline modifier with disallowed symbol 230s registers and autocorrects an offense 230s do not allow access modifiers on symbols 230s accepts when argument to #{access_modifier} is a symbol 230s when method is modified by inline modifier 230s registers and autocorrects an offense 230s allow access modifiers on symbols 230s accepts when argument to #{access_modifier} is a symbol 230s allow access modifiers on symbols 230s accepts when argument to #{access_modifier} is a symbol 230s when method is modified by inline modifier 230s registers and autocorrects an offense 230s when method is modified by inline modifier where group modifier already exists 230s registers and autocorrects an offense 230s do not allow access modifiers on symbols 230s accepts when argument to #{access_modifier} is a symbol 230s when method is modified by inline modifier where group modifier already exists 230s registers and autocorrects an offense 230s when non-existent method is modified by inline modifier with disallowed symbol 230s registers an offense but does not autocorrect it 230s when method is modified by inline modifier 230s registers and autocorrects an offense 230s when method is modified by inline modifier with disallowed symbol 230s registers and autocorrects an offense 230s when non-existent method is modified by inline modifier with disallowed symbol 230s registers an offense but does not autocorrect it 230s allow access modifiers on symbols 230s accepts when argument to #{access_modifier} is a symbol 230s 230s RuboCop::Cop::Lint::UselessSetterCall 230s is not confused by operators ending with = 230s accepts exception assignments without exploding 230s when a lvar contains an object passed as argument at the end of the method 230s accepts the setter call on the lvar 230s when a lvar declared as an argument is no longer the passed object at the end of the method 230s registers an offense and corrects for the setter call on the lvar 230s when a lvar contains a non-local object returned by a method 230s accepts 230s with method ending with setter call on argument 230s accepts 230s with singleton method ending with setter call on local object 230s registers an offense and corrects 230s when a lvar contains an object passed as argument by multiple-assignment at the end of the method 230s accepts the setter call on the lvar 230s with method ending with square bracket setter on local object 230s registers an offense and corrects 230s when a lvar does not contain any object passed as argument by binary-operator-assignment at the end of the method 230s registers an offense and corrects 230s when a lvar does not contain any object passed as argument with multiple-assignment at the end of the method 230s registers an offense and corrects 230s when a lvar possibly contains an object passed as argument by logical-operator-assignment at the end of the method 230s accepts the setter call on the lvar 230s with method ending with ivar assignment 230s accepts 230s when a lvar contains a local object instantiated with literal 230s registers an offense and corrects for the setter call on the lvar 230s with method ending with setter call on ivar 230s accepts 230s with method ending with setter call on local object 230s registers an offense and corrects 230s 230s RuboCop::Cop::Style::RedundantConditional 230s registers an offense for if/elsif/else with negated boolean results 230s allows ternary with non-boolean results 230s registers an offense for ternary with negated boolean results 230s registers an offense for ternary with boolean results 230s registers an offense for if/else with negated boolean results 230s does not register an offense for if/else with non-boolean results 230s does not register an offense for if/elsif/else with non-boolean results 230s registers an offense for if/elsif/else with boolean results 230s registers an offense for if/else with boolean results 230s 230s RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier 230s EnforcedStyle is `around` 230s accepts missing blank line when at the beginning of sclass 230s accepts missing blank line when specifying a superclass that breaks the line 230s accepts missing blank line when at the beginning of class 230s requires blank line after, but not before, protected when at the beginning of class/module 230s ignores public with block argument 230s accepts missing blank line when at the beginning of filewhen specifying a superclass that breaks the line 230s accepts missing blank line when at the end of specifying a superclass 230s ignores module_function inside a method call 230s requires blank line when next line started with end 230s ignores protected deep inside a method call 230s requires blank line after module_function 230s accepts missing blank line when at the beginning of sclass 230s ignores public with a right-hand-side condition 230s accepts missing blank line when at the beginning of class 230s ignores private inside a method call 230s ignores an accessor with the same name as protected above a method definition 230s accepts missing blank line when at the beginning of filewhen specifying a superclass that breaks the line 230s accepts missing blank line when at the end of specifying `self` 230s accepts missing blank line when at the beginning of file and preceded by a comment 230s accepts missing blank line when specifying `self` that breaks the line 230s accepts missing blank line when at the beginning of module 230s accepts missing blank line when at the beginning of file and preceded by a comment 230s accepts missing blank line when at the beginning of file and preceded by a comment 230s accepts missing blank line when at the end of block 230s accepts missing blank line when at the beginning of module 230s accepts only using access modifier 230s recognizes blank lines with DOS style line endings 230s accepts missing blank line when specifying a superclass that breaks the line 230s ignores an accessor with the same name as public above a method definition 230s ignores module_function with a right-hand-side condition 230s requires blank line when next line started with end 230s ignores an accessor with the same name as private above a method definition 230s accepts only using access modifier 230s accepts missing blank line when at the end of specifying a superclass 230s requires blank line before private 230s ignores comment line before module_function 230s accepts missing blank line when at the beginning of class 230s accepts missing blank line when specifying `self` that breaks the line 230s accepts missing blank line when at the beginning of sclass 230s ignores comment line before protected 230s autocorrects blank line after #{access_modifier} with comment 230s ignores an accessor with the same name as module_function above a method definition 230s accepts missing blank line when specifying `self` that breaks the line 230s accepts missing blank line when at the end of block 230s ignores protected with a right-hand-side condition 230s ignores module_function with block argument 230s accepts missing blank line when at the end of block 230s requires blank line after, but not before, module_function when at the beginning of class/module 230s requires blank line before protected 230s autocorrects blank line after #{access_modifier} with comment 230s requires blank line when next line started with end 230s accepts missing blank line when at the beginning of module 230s accepts missing blank line when specifying a superclass that breaks the line 230s requires blank line after private 230s ignores module_function deep inside a method call 230s accepts missing blank line when at the beginning of module 230s accepts missing blank line when at the beginning of filewhen specifying a superclass that breaks the line 230s accepts missing blank line when at the end of specifying `self` 230s requires blank line after, but not before, public when at the beginning of class/module 230s accepts missing blank line when at the beginning of filewhen specifying a superclass that breaks the line 230s accepts missing blank line when at the beginning of file and preceded by a comment 230s accepts only using access modifier 230s ignores public deep inside a method call 230s autocorrects blank line after #{access_modifier} with comment 230s accepts missing blank line when at the end of specifying `self` 230s ignores private with a right-hand-side condition 230s ignores comment line before public 230s accepts missing blank line when at the beginning of class 230s requires blank line after, but not before, private when at the beginning of class/module 230s accepts missing blank line when specifying `self` that breaks the line 230s ignores protected inside a method call 230s accepts missing blank line when at the beginning of sclass 230s recognizes blank lines with DOS style line endings 230s accepts only using access modifier 230s requires blank line when next line started with end 230s requires blank line after protected 230s accepts missing blank line when at the end of block 230s recognizes blank lines with DOS style line endings 230s accepts missing blank line when at the end of specifying `self` 230s autocorrects blank line after #{access_modifier} with comment 230s recognizes blank lines with DOS style line endings 230s requires blank line after public 230s accepts missing blank line when at the end of specifying a superclass 230s ignores public inside a method call 230s ignores comment line before private 230s accepts missing blank line when specifying a superclass that breaks the line 230s accepts missing blank line when at the end of specifying a superclass 230s ignores private deep inside a method call 230s ignores private with block argument 231s ignores protected with block argument 231s requires blank line before module_function 231s requires blank line before public 231s at the beginning of block 231s for blocks defined with {} 231s accepts missing blank line 231s accepts missing blank line with arguments 231s for blocks defined with do 231s accepts missing blank line 231s requires blank line after, but not before, module_function 231s accepts missing blank line with arguments 231s at the beginning of block 231s for blocks defined with {} 231s accepts missing blank line with arguments 231s accepts missing blank line 231s for blocks defined with do 231s accepts missing blank line with arguments 231s requires blank line after, but not before, public 231s accepts missing blank line 231s at the beginning of block 231s for blocks defined with {} 231s accepts missing blank line 231s accepts missing blank line with arguments 231s for blocks defined with do 231s accepts missing blank line with arguments 231s requires blank line after, but not before, private 231s accepts missing blank line 231s at the beginning of block 231s for blocks defined with {} 231s accepts missing blank line 231s accepts missing blank line with arguments 231s for blocks defined with do 231s accepts missing blank line with arguments 231s requires blank line after, but not before, protected 231s accepts missing blank line 231s Ruby 2.7 231s registers an offense for missing around line before private 231s ignores private with numblock argument 231s ignores protected with numblock argument 231s ignores public with numblock argument 231s registers an offense for missing around line before module_function 231s ignores module_function with numblock argument 231s registers an offense for missing around line before protected 231s registers an offense for missing around line before public 231s EnforcedStyle is `only_before` 231s accepts blank line after module_function 231s registers an offense for missing blank line before protected 231s does not register an offense when `end` immediately after private 231s accepts blank line after public 231s accepts missing blank line after private 231s registers an offense for blank line after private 231s registers an offense for missing blank line before public 231s registers an offense for missing blank line before module_function 231s registers an offense for missing blank line before private 231s does not register an offense when `end` immediately after protected 231s registers an offense for blank line after protected 231s accepts missing blank line after protected 231s 231s RuboCop::Cop::Lint::ImplicitStringConcatenation 231s when in a method call's argument list 231s notes that the strings could be separated by a comma instead 231s on adjacent string literals on different lines 231s does not register an offense 231s when inside an array 231s notes that the strings could be separated by a comma instead 231s on adjacent string literals on the same line 231s registers an offense 231s on a single string literal 231s does not register an offense 231s on a string with interpolations 231s does register an offense 231s when the string literals contain newlines 231s does not register an offense for a single string 231s registers an offense 231s 231s RuboCop::Cop::Style::VariableInterpolation 231s registers an offense for interpolated global variables in string 231s registers an offense for interpolated global variables in backticks 231s registers an offense for interpolated regexp back references 231s registers an offense for interpolated global variables in regexp 231s registers an offense for interpolated instance variables 231s does not register an offense for variables in expressions 231s registers an offense for interpolated class variables 231s registers an offense for interpolated global variables in symbol 231s registers an offense for interpolated regexp nth back references 231s 231s RuboCop::Cop::Lint::OutOfRangeRegexpRef 231s does not register offense to a regexp with valid references for numbered captures 231s registers an offense when out of range references are used for mix of numbered and named captures 231s registers an offense when out of range references are used inside a when clause 231s uses the maximum number of captures for when clauses with multiple conditions 231s registers an offense when references are used before any regexp 231s does not register offense to a regexp with valid references for a mix named and numbered captures 231s does not register an offense when in range references are used inside a when clause 231s ignores `match` with no arguments 231s ignores calls to `match?` 231s only registers an offense for when clauses when the regexp is matched as a literal 231s only registers an offense when the regexp is matched as a literal 231s registers an offense when out of range references are used for non captures 231s registers an offense when the regexp is matched with `match` 231s does not register offense to a regexp with encoding option and valid references for numbered captures 231s registers an offense when the regexp is matched with `===` 231s ignores regexp when clause conditions that contain interpolations 231s does not register an offense regexp containing non literal 231s does not register offense to a regexp with valid references for named captures 231s ignores `match` with no receiver 231s registers an offense when the regexp appears on the right hand side of `=~` 231s registers an offense when out of range references are used for named captures 231s registers an offense when out of range references are used for numbered captures 231s matching with gsub! 231s only registers an offense when the regexp is matched as a literal 231s registers an offense when out of range references are used 231s does not register an offense when in range references are used 231s matching with sub! 231s does not register an offense when in range references are used 231s registers an offense when out of range references are used 231s only registers an offense when the regexp is matched as a literal 231s matching with index 231s only registers an offense when the regexp is matched as a literal 231s registers an offense when out of range references are used 231s does not register an offense when in range references are used 231s matching with scan 231s does not register an offense when in range references are used 231s registers an offense when out of range references are used 231s only registers an offense when the regexp is matched as a literal 231s matching with slice! 231s registers an offense when out of range references are used 231s does not register an offense when in range references are used 231s only registers an offense when the regexp is matched as a literal 231s matching with match 231s only registers an offense when the regexp is matched as a literal 231s registers an offense when out of range references are used 231s does not register an offense when in range references are used 231s matching with slice 231s registers an offense when out of range references are used 231s only registers an offense when the regexp is matched as a literal 231s does not register an offense when in range references are used 231s matching with partition 231s only registers an offense when the regexp is matched as a literal 231s does not register an offense when in range references are used 231s registers an offense when out of range references are used 231s when both the LHS and RHS use regexp 231s only considers the RHS regexp 231s matching with rindex 231s does not register an offense when in range references are used 231s registers an offense when out of range references are used 231s only registers an offense when the regexp is matched as a literal 231s matching with `grep` 231s does not register an offense when in range references are used 231s registers an offense when out of range references are used 231s only registers an offense when the regexp is matched as a literal 231s matching with rpartition 231s only registers an offense when the regexp is matched as a literal 231s registers an offense when out of range references are used 231s does not register an offense when in range references are used 231s matching with end_with? 231s only registers an offense when the regexp is matched as a literal 231s does not register an offense when in range references are used 231s registers an offense when out of range references are used 231s matching with start_with? 231s registers an offense when out of range references are used 231s only registers an offense when the regexp is matched as a literal 231s does not register an offense when in range references are used 231s matching with `[]` 231s registers an offense when out of range references are used 231s only registers an offense when the regexp is matched as a literal 231s does not register an offense when in range references are used 231s matching with gsub 231s only registers an offense when the regexp is matched as a literal 231s does not register an offense when in range references are used 231s registers an offense when out of range references are used 231s matching with sub 231s registers an offense when out of range references are used 231s only registers an offense when the regexp is matched as a literal 231s does not register an offense when in range references are used 231s when calling a regexp method on a nth-ref node 231s registers an offense when calling gsub on an invalid nth-ref 231s does not register an offense when calling gsub on a valid nth-ref 231s registers an offense if the capturing groups have changed 231s 231s RuboCop::Cop::Layout::SpaceAfterMethodName 231s registers offense and corrects class def with space before parenthesis 231s registers an offense and corrects def with space before the parenthesis 231s accepts a defs without arguments 231s accepts an assignment def with arguments but no parentheses 231s accepts class method def with arguments but no parentheses 231s accepts a def with arguments but no parentheses 231s registers offense and corrects assignment def with space before parenthesis 231s accepts a def without arguments 231s 231s RuboCop::Cop::Lint::AssignmentInCondition 231s accepts == in condition 231s registers an offense for clvar assignment in condition 231s accepts ||= in condition 231s registers an offense for collection element assignment in condition 231s registers an offense for gvar assignment in condition 231s accepts assignment in a block after || 231s registers an offense for assignment methods 231s registers an offense for assignment after == in condition 231s registers an offense for lvar assignment in condition 231s accepts = in a block that is called in a condition 231s registers an offense for assignment after ||= in condition 231s registers an offense for lvar assignment in while condition 231s registers an offense for lvar assignment in until condition 231s accepts = in a block followed by method call 231s registers an offense for ivar assignment in condition 231s does not blow up for empty if condition 231s registers an offense for constant assignment in condition 231s registers an offense for = in condition inside a block 231s does not blow up for empty unless condition 231s safe assignment is not allowed 231s does not accept []= in condition surrounded with braces 231s does not accept = in condition surrounded with braces 231s safe assignment is allowed 231s accepts []= in condition surrounded with braces 231s accepts = in condition surrounded with braces 231s 231s RuboCop::Cop::Naming::HeredocDelimiterNaming 231s with a squiggly heredoc 231s does not register an offense with a meaningful delimiter 231s registers an offense with a non-meaningful delimiter 231s when the delimiter contains non-letter characters 231s does not register an offense when delimiter contains an underscore 231s does not register an offense when delimiter contains a number 231s with a non-interpolated heredoc 231s when using non-word delimiters 231s registers an offense 231s when using single quoted delimiters 231s does not register an offense with a meaningful delimiter 231s registers an offense with a non-meaningful delimiter 231s when using back tick delimiters 231s registers an offense with a non-meaningful delimiter 231s does not register an offense with a meaningful delimiter 231s when using double quoted delimiters 231s does not register an offense with a meaningful delimiter 231s registers an offense with a non-meaningful delimiter 231s with a naked heredoc 231s does not register an offense with a meaningful delimiter 231s registers an offense with a non-meaningful delimiter 231s with multiple heredocs starting on the same line 231s registers an offense with a trailing non-meaningful delimiter 231s does not register an offense with meaningful delimiters 231s registers an offense with a leading non-meaningful delimiter 231s with an interpolated heredoc 231s registers an offense with a non-meaningful delimiter 231s does not register an offense with a meaningful delimiter 231s 231s RuboCop::Cop::Layout::MultilineMethodArgumentLineBreaks 231s when many arguments are on multiple lines, three on same line 231s registers an offense and corrects 231s when two arguments are on next line 231s does not add any offenses 231s when bracket hash assignment key on multiple lines 231s does not add any offenses 231s when one argument on same line 231s does not add any offenses 231s when argument starts on same line but ends on different line 231s registers an offense and corrects 231s when second argument starts on same line as end of first 231s registers an offense and corrects 231s when many arguments are on multiple lines, two on same line 231s registers an offense and corrects 231s when there are multiple arguments on the first line 231s registers an offense and corrects starting from the 2nd argument 231s when many arguments including hash are on multiple lines, three on same line 231s registers an offense and corrects 231s when bracket hash assignment on multiple lines 231s does not add any offenses 231s 231s RuboCop::Cop::Layout::SpaceInsideBlockBraces 231s registers an offense and corrects both left and right brace without inner space after success 231s accepts braces surrounded by spaces 231s register offenses and correct both braces without inner space 231s accepts left brace without outer space 231s registers an offense and corrects left brace without inner space 231s registers an offense and corrects right brace without inner space 231s with space inside empty braces allowed 231s accepts empty braces with space inside 231s registers an offense and corrects empty braces with no space inside 231s with passed in parameters 231s accepts new lambda syntax 231s for multi-line blocks 231s accepts left brace with inner space 231s registers an offense and corrects left brace without inner space 231s for single-line blocks 231s registers an offense and corrects left brace without inner space 231s accepts left brace with inner space 231s and space before block parameters not allowed 231s registers an offense and corrects left brace with inner space 231s accepts new lambda syntax 231s accepts left brace without inner space 231s and BlockDelimiters cop enabled 231s registers an offense and corrects for single-line blocks 231s registers an offense and corrects multi-line blocks 231s with space inside empty braces not allowed 231s accepts braces with something inside 231s accepts multiline braces with content 231s accepts empty braces with comment and line break inside 231s accepts braces that are not empty 231s accepts empty braces with line break inside 231s accepts empty braces with no space inside 231s registers an offense and corrects empty braces with space inside 231s Ruby >= 2.7 231s registers an offense for numblocks without inner space 231s with invalid value for EnforcedStyleForEmptyBraces 231s fails with an error 231s configured with no_space 231s accepts left brace without outer space 231s accepts braces without spaces inside 231s registers an offense and corrects left brace with inner space 231s registers an offense and corrects both left and right brace with inner space after success 231s registers an offense and corrects right brace with inner space 231s with passed in parameters 231s and space before block parameters not allowed 231s accepts when braces are aligned in multiline block 231s registers an offense when braces are not aligned in multiline block with bracket 231s accepts when braces are aligned in multiline block with bracket 231s registers an offense when braces are not aligned in multiline block 231s registers an offense and corrects left brace with inner space 231s accepts new lambda syntax 231s and space before block parameters allowed 231s registers an offense and corrects left brace without inner space 231s accepts left brace with inner space 231s accepts new lambda syntax 231s 231s RuboCop::Cop::Style::BisectedAttrAccessor 231s registers an offense and corrects when both accessors are in the same visibility scope 231s registers an offense and corrects when both accessors of the name exists 231s registers an offense for accessors with the same visibility in different scopes 231s does not register an offense when accessors are within different visibility scopes 231s registers an offense and corrects when within eigenclass 231s registers an offense and corrects when attr and attr_writer exists 231s registers an offense and corrects when both accessors of the splat exists 231s does not register an offense when only one accessor of the name exists 231s registers an offense and corrects when both accessors of the name exists and accessor contains multiple names 231s registers an offense and corrects properly when attr_writer is before attr_reader 231s does not register an offense when using `attr_accessor` 231s registers and corrects in a module 231s multiple bisected accessors 231s when some attr names are bisected 231s registers and retains non-bisected attrs 231s when all attr names are bisected 231s registers and replaces with attr_accessor 231s 231s RuboCop::Cop::Layout::SpaceAfterNot 231s accepts space after not keyword 231s registers an offense and corrects space after ! with the negated receiver wrapped in parentheses 231s accepts no space after ! 231s registers an offense and corrects multiple spaces after ! 231s registers an offense and corrects a single space after ! 231s 231s RuboCop::Cop::Gemspec::DeprecatedAttributeAssignment 231s behaves like deprecated attributes 231s registers and corrects an offense when using `spec.rubygems_version =` 231s registers and corrects an offense when using `s.rubygems_version =` 231s does not register an offense when using `rubygems_version =` and receiver is not `Gem::Specification.new` block variable 231s does not register an offense when using `s.rubygems_version =` outside `Gem::Specification.new` 231s behaves like deprecated attributes 231s registers and corrects an offense when using `spec.rubygems_version =` 231s does not register an offense when using `rubygems_version =` and receiver is not `Gem::Specification.new` block variable 231s registers and corrects an offense when using `s.rubygems_version =` 231s does not register an offense when using `s.rubygems_version =` outside `Gem::Specification.new` 231s behaves like deprecated attributes 231s registers and corrects an offense when using `spec.rubygems_version =` 231s registers and corrects an offense when using `s.rubygems_version =` 231s does not register an offense when using `rubygems_version =` and receiver is not `Gem::Specification.new` block variable 231s does not register an offense when using `s.rubygems_version =` outside `Gem::Specification.new` 231s behaves like deprecated attributes with addition 231s registers and corrects an offense when using `s.rubygems_version +=` 231s registers and corrects an offense when using `spec.rubygems_version +=` 231s behaves like deprecated attributes 231s registers and corrects an offense when using `s.rubygems_version =` 231s does not register an offense when using `rubygems_version =` and receiver is not `Gem::Specification.new` block variable 231s does not register an offense when using `s.rubygems_version =` outside `Gem::Specification.new` 231s registers and corrects an offense when using `spec.rubygems_version =` 232s 232s RuboCop::Cop::Style::TrailingCommaInBlockArgs 232s when `lambda` has multiple arguments 232s does not register an offense when more than one argument is present with no trailing comma 232s registers an offense and corrects when a trailing comma isn't needed 232s when `->` has multiple arguments 232s does not register an offense 232s do/end block format 232s ignores commas in default argument strings 232s does not register an offense when a trailing comma is required 232s registers an offense when a trailing comma is not needed 232s does not register an offense for keyword arguments 232s does not register an offense when no arguments are present 232s does not register an offense for default arguments 232s does not register an offense when more than one argument is present with no trailing comma 232s preserves semicolons in block/local variables 232s does not register an offense for an empty block 232s curly brace block format 232s does not register an offense for default arguments 232s does not register an offense when a trailing comma is required 232s registers an offense when a trailing comma is not needed 232s does not register an offense for keyword arguments 232s does not register an offense when no arguments are present 232s does not register an offense when more than one argument is present with no trailing comma 232s ignores commas in default argument strings 232s preserves semicolons in block/local variables 232s 232s RuboCop::Cop::Layout::SpaceInsideParens 232s when EnforcedStyle is no_space 232s accepts parentheses in block parameter list 232s accepts parentheses with no spaces 232s accepts parentheses with line break 232s accepts parentheses with comment and line break 232s registers an offense for space around heredoc start 232s registers an offense for spaces inside parens 232s when EnforcedStyle is space 232s accepts empty parentheses without spaces 232s accepts parentheses with spaces 232s registers an offense for no space around heredoc start 232s registers an offense in block parameter list with no spaces 232s accepts parentheses with comment and line break 232s accepts parentheses with line break 232s registers an offense for no spaces inside parens 232s registers an offense for space inside empty parens 232s when EnforcedStyle is compact 232s accepts parentheses with comment and line break 232s accepts three consecutive right parentheses 232s accepts parentheses with line break 232s registers an offense for no space around heredoc start 232s accepts parentheses with spaces 232s accepts three consecutive left parentheses 232s accepts empty parentheses without spaces 232s accepts two consecutive right parentheses 232s registers an offense for space between consecutive brackets 232s registers an offense for space inside empty parens 232s accepts two consecutive left parentheses 232s registers an offense in block parameter list with no spaces 232s registers multiple offense for a missing and extra space between consecutive brackets 232s registers an offense for no spaces inside parens 232s 232s RuboCop::Cop::Style::EmptyLiteral 232s Empty Array 232s registers an offense for Array.new 232s registers an offense for ::Array.new 232s does not register an offense for ::Array.new with block 232s autocorrects Array.new in block in block 232s registers an offense for Array.new() 232s does not register Array.new with block in other block 232s does not register an offense for Array.new(3) 232s does not register an offense Array.new with block 232s Empty String 232s does not register an offense for String.new("top") 232s registers an offense for String.new 232s registers an offense for String.new() 232s registers an offense for ::String.new 232s does not register an offense for ::String.new("top") 232s when frozen string literals is enabled 232s does not register an offense for String.new 232s when double-quoted string literals are preferred 232s registers an offense for String.new 232s registers an offense for ::String.new 232s when Style/FrozenStringLiteral is enabled 232s and there is a frozen_string_literal: false comment 232s registers an offense and corrects 232s and there is no magic comment 232s does not register an offense 232s Empty Hash 232s registers an offense for Hash.new 232s autocorrects Hash.new to {} in various contexts 232s autocorrects Hash.new in block 232s does not register an offense for ::Hash.new(3) 232s registers an offense for Hash.new() 232s registers an offense for ::Hash.new 232s does not register an offense for Hash.new(3) 232s autocorrects Hash.new to {} as the only parameter to a method 232s does not register an offense for Hash.new { block } 232s autocorrects Hash.new to {} and wraps all arguments in parentheses when it is the first argument to super 232s does not register an offense for ::Hash.new { block } 232s autocorrects Hash.new to {} and wraps it in parentheses when it is the only argument to super 232s autocorrects Hash.new to {} as the first parameter to a method 232s Ruby 2.7 232s does not register an offense for Hash.new { _1[_2] = [] } 232s does not register an offense for ::Hash.new { _1[_2] = [] } 232s 232s RuboCop::Cop::VariableForce::Scope 232s #include? 232s with descendant node the scope does not include 232s is expected to equal false 232s with child node the scope includes 232s is expected to equal true 232s with node of the scope itself 232s is expected to equal false 232s with child node the scope does not include 232s is expected to equal false 232s with ancestor node the scope does not include 232s is expected to equal false 232s #each_node 232s inner scope boundary handling 232s when there's a singleton method definition 232s yields only the defs node and the method host node 232s when there's a method invocation with block 232s yields only the block node and the child send node 232s outer scope boundary handling 232s when the scope is module 232s yields the body nodes 232s when the scope is singleton method 232s yields the argument and the body nodes 232s when the scope is top level 232s yields the body nodes 232s when the scope is singleton class 232s yields the body nodes 232s when the scope is instance method 232s yields the argument and the body nodes 232s when the scope is block 232s yields the argument and the body nodes 232s when the scope is class 232s yields the body nodes 232s #body_node 232s when the scope is singleton method 232s returns the body node 232s when the scope is top level 232s returns the body node 232s when the scope is module 232s returns the body node 232s when the scope is class 232s returns the body node 232s when the scope is singleton class 232s returns the body node 232s when the scope is block 232s returns the body node 232s when the scope is instance method 232s returns the body node 232s .new 232s when begin node is passed 232s accepts that as top level scope 232s when lvasgn node is passed 232s accepts that as top level scope 232s #name 232s when the scope is singleton method definition 232s returns the method name 232s when the scope is instance method definition 232s returns the method name 232s 232s RuboCop::ResultCache 232s .cleanup 232s removes the oldest files in the cache if needed 232s #save 232s when the default internal encoding is UTF-8 232s writes non UTF-8 encodable data to file with no exception 232s when the @path is not writable 232s behaves like invalid cache location 232s doesn't raise an exception 232s behaves like invalid cache location 232s doesn't raise an exception 232s cached result that was saved with no command line option 232s when --format is given 232s is valid and can be loaded 232s when --cache-root is given 232s takes the cache_root from the options 232s when --display-cop-names is given 232s is invalid 232s when a cache source is read 232s has utf8 encoding 232s when --only is given 232s is invalid 232s when no option is given 232s is valid and can be loaded 232s when team external_dependency_checksum is the same 232s is valid 232s when team external_dependency_checksum changes 232s is invalid 232s when a symlink is present in the cache location 232s and symlink attack protection is enabled 232s prevents caching and prints a warning 232s and symlink attack protection is disabled 232s permits caching and prints no warning 232s when end of line characters have changed 232s is invalid 232s when file permission have changed 232s is invalid 232s when file contents have changed 232s is invalid 232s when offenses are saved 232s an offense with status unsupported 232s serializes them with unsupported status 232s an offense with status corrected 232s serializes them with uncorrected status 232s an offense with status new_status 232s serializes them with new_status status 232s an offense with status corrected_with_todo 232s serializes them with uncorrected status 232s an offense with status uncorrected 232s serializes them with uncorrected status 232s the cache path 232s when CacheRootDirectory is set 232s contains the given root 232s and RUBOCOP_CACHE_ROOT is set 232s contains the root from RUBOCOP_CACHE_ROOT 232s when CacheRootDirectory not set 232s and XDG_CACHE_HOME is set 232s contains the given path and UID 232s and XDG_CACHE_HOME is not set 232s contains $HOME/.cache 232s 232s RuboCop::Cop::Style::TernaryParentheses 232s when configured to enforce parentheses inclusion 232s with an assignment condition 232s registers an offense for double assignment 232s registers an offense for triple assignment 232s registers an offense for double assignment with equality check in condition 232s accepts safe assignment in condition 232s with a simple condition 232s registers an offense for accessor in condition 232s registers an offense for query method in condition 232s registers an offense for yield in condition 232s with a complex condition 232s registers an offense for defined? with nested constant in condition 232s registers an offense for equality check 232s registers an offense for defined? with method chain in condition 232s registers an offense for boolean expression 232s registers an offense for defined? with class method in condition 232s registers an offense when calling method on a receiver 232s registers an offense for defined? with variable in condition 232s registers an offense for negated condition 232s registers an offense for boolean expression using keyword 232s registers an offense for arithmetic condition 232s registers an offense for boolean expression containing parens 232s when configured to enforce parentheses omission 232s accepts condition including a range 232s with one line pattern matching 232s does not register an offense 232s with an assignment condition 232s registers an offense for equality check 232s accepts safe assignment as part of multiple assignment 232s accepts safe assignment 232s accepts double safe assignment 232s behaves like safe assignment disabled 232s registers an offense for parens around inner assignment 232s registers an offense for parens around assignment 232s registers an offense for parens around outer assignment 232s with an unparenthesized method call condition 232s registers an offense when calling method with a parameter 232s registers an offense for defined check 232s when calling method on a literal receiver 232s registers an offense 232s when calling method on a receiver 232s registers an offense 232s when calling method on a constant receiver 232s registers an offense 232s when calling method with multiple arguments 232s registers an offense 232s with a simple condition 232s registers an offense for yield in condition 232s registers an offense for accessor in condition 232s registers an offense for query method in condition 232s registers an offense for multi-line boolean expression 232s accepts multi-line boolean expression starting on following line 232s with a complex condition 232s registers an offense for arithmetic expression 232s registers an offense for defined with nested constant in condition 232s registers an offense for defined with method chain in condition 232s registers an offense for equality check 232s accepts parens around inner boolean expression 232s registers an offense for boolean expression using keyword 232s registers an offense for defined with class method in condition 232s registers an offense for boolean expression 232s registers an offense for query method on object 232s registers an offense for negated condition 232s registers an offense for defined with variable in condition 232s with one line pattern matching 232s does not register an offense 232s with no space between the parentheses and question mark 232s registers an offense 232s configured for parentheses on complex and there are no parens 232s with an assignment condition 232s registers an offense for equality check 232s accepts safe assignment 232s with complex condition 232s registers an offense for comparison with method call on receiver 232s registers an offense comparison with exponentiation 232s registers an offense for compound boolean expression 232s registers an offense for boolean expression with inner parens 232s registers an offense for addition expression 232s registers an offense for comparison 232s registers an offense for comparison with multiplication 232s registers an offense for boolean expression 232s registers an offense for arithmetic and equality check 232s registers an offense for subtraction expression 232s configured for parentheses on complex and there are parens 232s accepts condition including a range 232s with a complex condition 232s registers an offense for defined with class method in condition 232s registers an offense for defined with variable in condition 232s registers an offense for defined with method chain in condition 232s registers an offense when calling method on a receiver 232s accepts boolean expression 232s registers an offense for defined with nested constant in condition 232s accepts boolean expression using keywords 232s with a simple condition 232s registers an offense for yield in condition 232s registers an offense for accessor in condition 232s registers an offense for query method in condition 232s registers an offense with preceding boolean keyword expression 232s registers an offense for save navigation 232s with method call condition 232s registers an offense when calling method with a parameter 232s registers an offense for defined check 232s registers an offense when calling method on a receiver 232s with accessor in method call parameters 232s registers an offense for array include? with multiple parameters without parens 232s registers an offense for array include? with multiple parameters with parens 232s registers an offense for array include? without parens 232s without accessor in method call parameters 232s registers an offense for array include? with parens 232s registers an offense for array include? without parens 232s with an assignment condition 232s accepts safe assignment as part of multiple assignment 232s accepts safe assignment 232s accepts equality check 232s accepts accepts safe multiple assignment 232s behaves like safe assignment disabled 232s registers an offense for parens around outer assignment 232s registers an offense for parens around inner assignment 232s registers an offense for parens around assignment 232s 232s RuboCop::Cop::Lint::EmptyConditionalBody 232s registers an offense for missing `elsif` body 232s does not register an offense for missing `if` body with a comment 232s registers an offense for missing `if` and `else` body with some indentation 232s registers an offense for missing `elsif` body that is not the one with a comment 232s registers an offense for missing all branches of `if` and multiple `elsif` body 232s does not register an offense for missing `elsif` body with an inline comment 232s registers an offense for missing `if` body 232s registers an offense for missing second `elsif` body without an inline comment 232s registers an offense for missing `if` and `else` body 232s does not register an offense for missing `elsif` body with a comment 232s autocorrects properly when the if is assigned to a variable 232s registers an offense for missing `if` body with `else` 232s registers an offense for missing `unless` and `else` body 232s registers an offense for missing `unless` body with `else` 232s registers an offense for missing `if` and `elsif` body 232s registers an offense for missing `if` body with present `else` body 232s registers an offense for missing all branches of `if` and `elsif` body 232s registers an offense for missing `unless` body 232s registers an offense for missing `if` body with `elsif` 232s does not register an offense for missing `unless` body with a comment 232s when AllowComments is false 232s registers an offense for missing `elsif` body with a comment 232s registers an offense for missing `unless` body with a comment 233s registers an offense for missing `if` body with a comment 233s 233s RuboCop::Cop::VariableForce::Reference 233s .new 233s when non variable reference node is passed 233s raises error 233s 233s RuboCop::Cop::Style::SlicingWithRange 233s >= Ruby 2.6 233s reports an offense for slicing to ..-1 233s reports no offense for excluding end 233s reports no offense for other methods 233s reports an offense for slicing from expression to ..-1 233s reports no offense for array with range inside 233s >= Ruby 2.7 233s reports no offense for startless 233s <= Ruby 2.5 233s reports no offense for array slicing with -1 233s 233s RuboCop::Cop::Style::MethodDefParentheses 233s require_parentheses 233s auto-adds required parens for a defs 233s auto-adds required parens to argument lists on multiple lines 233s accepts def with no args and no parens 233s reports an offense for def with parameters but no parens 233s auto-adds required parens for a defs after a passing method 233s reports an offense for class def with parameters but no parens 233s reports an offense for correct + opposite 233s behaves like endless methods 233s endless methods 233s accepts parens without args 233s accepts parens with args 233s accepts parens with `forward-arg` 233s accepts parens for method calls inside an endless method 233s require_no_parentheses 233s behaves like endless methods 233s endless methods 233s accepts parens with `forward-arg` 233s accepts parens without args 233s accepts parens with args 233s accepts parens for method calls inside an endless method 233s behaves like no parentheses 233s accepts a def with parameters but no parens 233s reports an offense for class def with parameters with parens 233s reports an offense for def with no args and parens 233s accepts a class def with parameters with parens 233s reports an offense for def with parameters with parens 233s requires parens for anonymous block forwarding 233s requires parens for forwarding 233s auto-removes the parens for defs 233s accepts def with no args and no parens 233s reports an offense for opposite + correct 233s require_no_parentheses_except_multiline 233s when args are all on a single line 233s behaves like no parentheses 233s accepts a def with parameters but no parens 233s reports an offense for class def with parameters with parens 233s reports an offense for opposite + correct 233s reports an offense for def with no args and parens 233s accepts a class def with parameters with parens 233s accepts def with no args and no parens 233s reports an offense for def with parameters with parens 233s requires parens for anonymous block forwarding 233s requires parens for forwarding 233s auto-removes the parens for defs 233s when args span multiple lines 233s auto-adds required parens to argument lists on multiple lines 233s reports an offense for correct + opposite 233s behaves like endless methods 233s endless methods 233s accepts parens with args 233s accepts parens without args 233s accepts parens for method calls inside an endless method 233s accepts parens with `forward-arg` 233s 233s RuboCop::Formatter::FormatterSet 233s responds to all formatter API methods 233s add_formatter 233s can add multiple formatters by being invoked multiple times 233s adds a formatter to itself 233s adds a formatter with specified formatter type 233s when output path is specified 233s adds a formatter outputs to the specified file 233s when parent directories don't exist 233s creates them 233s when output path is omitted 233s adds a formatter outputs to $stdout 233s #builtin_formatter_class 233s returns class which matches passed alias name exactly 233s returns class which matches single character alias name 233s returns class which matches double character alias name 233s #custom_formatter_class 233s can handle top level namespaced constant name 233s returns constant represented by the passed string 233s can handle namespaced constant name 233s when non-existent constant name is passed 233s raises error 233s #close_output_files 233s does not close non file output 233s closes all output files 233s formatter API method 233s invokes the same method of all containing formatters 233s 233s RuboCop::Cop::Style::OpenStructUse 233s when using custom namespaced OpenStruct 233s when inheriting from it 233s is expected to eq "class A < SomeNamespace::OpenStruct; end" 233s when used in assignments 233s registers no offense 233s when defined in custom namespace 233s when class 233s is expected to eq "module SomeNamespace\n class OpenStruct\n end\nend\n" 233s when module 233s is expected to eq "module SomeNamespace\n module OpenStruct\n end\nend\n" 233s when using OpenStruct 233s for OpenStruct 233s when used in assignments 233s registers an offense 233s when inheriting from it via Class.new 233s registers an offense 233s when inheriting from it via < 233s registers an offense 233s for ::OpenStruct 233s when inheriting from it via < 233s registers an offense 233s when inheriting from it via Class.new 233s registers an offense 233s when used in assignments 233s registers an offense 233s when not using OpenStruct 233s registers no offense 233s 233s RuboCop::Cop::Style::RedundantSelfAssignmentBranch 233s does not register an offense when not self-assigning redundant branches 233s registers and corrects an offense when self-assigning redundant if branch 233s registers and corrects an offense when self-assigning redundant if ternary branch 233s registers and corrects an offense when self-assigning redundant else branch and empty else branch 233s registers and corrects an offense when self-assigning redundant else ternary branch 233s does not register an offense when using only if branch 233s does not register an offense when using `elsif` and self-assigning the value of `then` branch 233s does not register an offense when self-assigning redundant else branch and multiline if branch 233s does not register an offense when self-assigning redundant else ternary branch for ivar 233s does not register an offense when using `elsif` and self-assigning the value of `else` branch 233s does not register an offense when self-assigning redundant else branch and multiline else branch 233s does not register an offense when self-assigning redundant else ternary branch for gvar 233s does not register an offense when multi assignment 233s does not register an offense when lhs is not variable 233s does not register an offense when self-assigning redundant else ternary branch for cvar 233s registers and corrects an offense when self-assigning redundant else branch and empty if branch 233s registers and corrects an offense when self-assigning redundant else branch 233s does not register an offense when using `elsif` and self-assigning the value of `elsif` branch 233s 233s RuboCop::Cop::Lint::DuplicateCaseCondition 233s registers an offense for repeated case conditionals 233s accepts similar but not equivalent && expressions 233s registers an offense for repeated logical operator when expressions 233s accepts non-redundant case expressions with an else expression 233s accepts non-redundant case expressions 233s registers an offense for subsequent repeated case conditionals 233s registers multiple offenses for multiple repeated case conditionals 233s registers multiple offenses for repeated multi-value conditionals 233s accepts trivial case expressions 233s 233s RuboCop::Cop::Style::EvenOdd 233s converts (y % 2) != 1 to #even? 233s accepts x % 3 != 0 233s converts complex examples 233s converts x % 2 != 0 to #odd? 233s accepts x % 2 == 2 233s converts (x % 2) == 0 to #even? 233s converts 1 % 2 != 1 to even? 233s converts x % 2 != 1 to #even? 233s converts (x(y) % 2) != 1 to #even? 233s converts (x._(y)) % 2 != 1 to even? 233s accepts x % 3 == 0 233s converts (x % 2) != 0 to #odd? 233s converts (x % 2) == 1 to #odd? 233s converts x % 2 == 0 to #even? 233s converts x % 2 == 1 to #odd? 233s converts (x._(y) % 2) != 1 to even? 233s converts (x.y % 2) != 1 to #even? 233s converts x._(y) % 2 != 1 to even? 233s 233s RuboCop::Cop::Layout::EmptyLinesAroundArguments 233s when extra lines 233s registers autocorrects empty line whetn args start on definition line 233s registers and autocorrects offense when empty line between normal arg & block arg 233s registers and autocorrects offense when args start on definition line 233s registers and autocorrects offense for empty line between args 233s registers and autocorrects offense on correct line for single offense example 233s registers and autocorrects offense for empty line before arg 233s registers and autocorrects offense for empty line after arg 233s registers and autocorrects offenses when multiple empty lines are detected 233s registers and autocorrects offense on correct lines for multi-offense example 233s when using safe navigation operator 233s registers and autocorrects offense for empty line before arg 233s when no extra lines 233s accepts method with no arguments that trails off block 233s accepts one line methods 233s accepts listed args starting on definition line 233s accepts method with argument that trails off heredoc 233s accepts when blank line is inserted between method with arguments and receiver 233s accepts method with argument that trails off block 233s accepts multiline style argument for method call without selector 233s accepts block argument with empty line 233s accepts multiple listed mixed args 233s with multiple arguments 233s ignores empty lines inside of method arguments 233s with one argument 233s ignores empty lines inside of method arguments 233s 233s RuboCop::Cop::Lint::ScriptPermission 233s with file permission 0755 233s accepts with shebang line 233s accepts without shebang line 233s accepts with blank 233s with file permission 0644 233s registers an offense for script permission 233s if autocorrection is off 233s leaves the file intact 233s with stdin 233s skips investigation 233s 233s RuboCop::Cop::Layout::FirstMethodArgumentLineBreak 233s registers an offense and corrects hash arg without a line break before the first pair 233s ignores arguments listed on a single line 233s ignores methods without arguments 233s ignores arguments without parens 233s ignores kwargs listed on a single line when the arguments are used in `super` 233s registers an offense and corrects hash arg spanning multiple lines 233s args listed on the first line 233s registers an offense and corrects 233s registers an offense and corrects using safe navigation operator 233s registers an offense and corrects using `super` 233s 233s RuboCop::Cop::Lint::RegexpAsCondition 233s registers an offense and corrects for a regexp literal in `if` condition 233s does not register an offense for a regexp literal outside conditions 233s does not register an offense for a regexp literal with `=~` operator 233s 233s RuboCop::Cop::Layout::SpaceInsidePercentLiteralDelimiters 233s accepts other percent literals 233s accepts execute-string literals 233s for x type and ["!", "!"] delimiters 233s registers an offense for literals with escaped and other spaces 233s accepts newlines and additional following alignment spaces 233s accepts literals without additional spaces 233s accepts multi-line literals 233s registers an offense for spaces after first delimiter 233s accepts spaces between entries 233s accepts literals with escaped spaces 233s registers an offense for unnecessary spaces 233s registers an offense for spaces before final delimiter 233s accepts multi-line literals within a method 233s with spaces in blank percent literals 233s registers and corrects an offense 233s with space in blank percent literals 233s registers and corrects an offense 233s with newline in blank percent literals 233s registers and corrects an offense 233s for W type and ["!", "!"] delimiters 233s registers an offense for spaces before final delimiter 233s registers an offense for spaces after first delimiter 233s accepts literals without additional spaces 233s accepts literals with escaped spaces 233s accepts newlines and additional following alignment spaces 233s accepts spaces between entries 233s accepts multi-line literals within a method 233s accepts multi-line literals 233s registers an offense for literals with escaped and other spaces 233s registers an offense for unnecessary spaces 233s with space in blank percent literals 233s registers and corrects an offense 233s with spaces in blank percent literals 233s registers and corrects an offense 233s with newline in blank percent literals 233s registers and corrects an offense 233s for x type and ["{", "}"] delimiters 233s accepts literals with escaped spaces 233s accepts literals without additional spaces 233s accepts spaces between entries 233s accepts newlines and additional following alignment spaces 233s registers an offense for spaces after first delimiter 233s registers an offense for literals with escaped and other spaces 233s registers an offense for spaces before final delimiter 233s accepts multi-line literals within a method 233s accepts multi-line literals 233s registers an offense for unnecessary spaces 233s with spaces in blank percent literals 233s registers and corrects an offense 233s with space in blank percent literals 233s registers and corrects an offense 233s with newline in blank percent literals 233s registers and corrects an offense 233s for w type and ["[", "]"] delimiters 233s accepts literals without additional spaces 233s accepts newlines and additional following alignment spaces 233s accepts literals with escaped spaces 233s accepts spaces between entries 233s accepts multi-line literals 233s registers an offense for spaces before final delimiter 233s registers an offense for literals with escaped and other spaces 233s registers an offense for unnecessary spaces 233s accepts multi-line literals within a method 233s registers an offense for spaces after first delimiter 233s with spaces in blank percent literals 233s registers and corrects an offense 233s with newline in blank percent literals 233s registers and corrects an offense 233s with space in blank percent literals 233s registers and corrects an offense 233s for i type and ["(", ")"] delimiters 233s accepts multi-line literals within a method 233s accepts literals without additional spaces 233s registers an offense for unnecessary spaces 233s accepts newlines and additional following alignment spaces 233s registers an offense for spaces before final delimiter 233s accepts multi-line literals 233s registers an offense for literals with escaped and other spaces 233s accepts spaces between entries 233s accepts literals with escaped spaces 233s registers an offense for spaces after first delimiter 233s with spaces in blank percent literals 233s registers and corrects an offense 233s with newline in blank percent literals 233s registers and corrects an offense 233s with space in blank percent literals 233s registers and corrects an offense 233s for I type and ["{", "}"] delimiters 233s accepts newlines and additional following alignment spaces 233s accepts spaces between entries 233s accepts multi-line literals within a method 233s accepts multi-line literals 233s registers an offense for spaces before final delimiter 233s registers an offense for literals with escaped and other spaces 233s registers an offense for spaces after first delimiter 233s registers an offense for unnecessary spaces 233s accepts literals with escaped spaces 233s accepts literals without additional spaces 233s with space in blank percent literals 233s registers and corrects an offense 233s with spaces in blank percent literals 233s registers and corrects an offense 233s with newline in blank percent literals 233s registers and corrects an offense 233s for I type and ["!", "!"] delimiters 233s registers an offense for literals with escaped and other spaces 233s registers an offense for spaces before final delimiter 233s accepts literals without additional spaces 233s registers an offense for spaces after first delimiter 233s accepts multi-line literals within a method 233s accepts spaces between entries 233s registers an offense for unnecessary spaces 233s accepts literals with escaped spaces 233s accepts newlines and additional following alignment spaces 233s accepts multi-line literals 233s with spaces in blank percent literals 233s registers and corrects an offense 233s with space in blank percent literals 233s registers and corrects an offense 233s with newline in blank percent literals 233s registers and corrects an offense 233s for i type and ["!", "!"] delimiters 233s registers an offense for spaces before final delimiter 233s registers an offense for spaces after first delimiter 233s accepts literals with escaped spaces 233s registers an offense for literals with escaped and other spaces 233s accepts multi-line literals 233s registers an offense for unnecessary spaces 233s accepts literals without additional spaces 233s accepts newlines and additional following alignment spaces 233s accepts multi-line literals within a method 233s accepts spaces between entries 233s with newline in blank percent literals 233s registers and corrects an offense 233s with spaces in blank percent literals 233s registers and corrects an offense 233s with space in blank percent literals 233s registers and corrects an offense 233s for w type and ["!", "!"] delimiters 233s accepts multi-line literals within a method 233s accepts newlines and additional following alignment spaces 233s registers an offense for spaces before final delimiter 233s accepts multi-line literals 233s registers an offense for spaces after first delimiter 233s accepts literals without additional spaces 233s registers an offense for unnecessary spaces 233s registers an offense for literals with escaped and other spaces 233s accepts spaces between entries 233s accepts literals with escaped spaces 233s with spaces in blank percent literals 233s registers and corrects an offense 233s with newline in blank percent literals 233s registers and corrects an offense 233s with space in blank percent literals 233s registers and corrects an offense 233s for i type and ["{", "}"] delimiters 233s accepts multi-line literals 233s accepts newlines and additional following alignment spaces 233s registers an offense for unnecessary spaces 233s accepts multi-line literals within a method 233s accepts literals with escaped spaces 233s registers an offense for spaces after first delimiter 233s accepts spaces between entries 233s registers an offense for literals with escaped and other spaces 233s accepts literals without additional spaces 233s registers an offense for spaces before final delimiter 233s with space in blank percent literals 233s registers and corrects an offense 233s with spaces in blank percent literals 233s registers and corrects an offense 233s with newline in blank percent literals 233s registers and corrects an offense 233s for i type and ["[", "]"] delimiters 233s registers an offense for spaces before final delimiter 233s accepts spaces between entries 233s accepts literals with escaped spaces 233s accepts literals without additional spaces 233s registers an offense for literals with escaped and other spaces 233s accepts multi-line literals 233s registers an offense for unnecessary spaces 233s accepts newlines and additional following alignment spaces 233s accepts multi-line literals within a method 233s registers an offense for spaces after first delimiter 233s with newline in blank percent literals 233s registers and corrects an offense 233s with spaces in blank percent literals 233s registers and corrects an offense 233s with space in blank percent literals 233s registers and corrects an offense 233s for I type and ["[", "]"] delimiters 233s registers an offense for spaces before final delimiter 234s registers an offense for literals with escaped and other spaces 234s accepts multi-line literals 234s accepts spaces between entries 234s accepts newlines and additional following alignment spaces 234s accepts literals without additional spaces 234s registers an offense for unnecessary spaces 234s accepts multi-line literals within a method 234s accepts literals with escaped spaces 234s registers an offense for spaces after first delimiter 234s with newline in blank percent literals 234s registers and corrects an offense 234s with space in blank percent literals 234s registers and corrects an offense 234s with spaces in blank percent literals 234s registers and corrects an offense 234s for w type and ["(", ")"] delimiters 234s registers an offense for literals with escaped and other spaces 234s registers an offense for spaces before final delimiter 234s registers an offense for unnecessary spaces 234s registers an offense for spaces after first delimiter 234s accepts literals without additional spaces 234s accepts newlines and additional following alignment spaces 234s accepts multi-line literals 234s accepts multi-line literals within a method 234s accepts spaces between entries 234s accepts literals with escaped spaces 234s with newline in blank percent literals 234s registers and corrects an offense 234s with space in blank percent literals 234s registers and corrects an offense 234s with spaces in blank percent literals 234s registers and corrects an offense 234s for W type and ["[", "]"] delimiters 234s registers an offense for spaces before final delimiter 234s registers an offense for unnecessary spaces 234s registers an offense for literals with escaped and other spaces 234s accepts multi-line literals within a method 234s accepts newlines and additional following alignment spaces 234s accepts literals with escaped spaces 234s accepts literals without additional spaces 234s registers an offense for spaces after first delimiter 234s accepts multi-line literals 234s accepts spaces between entries 234s with space in blank percent literals 234s registers and corrects an offense 234s with newline in blank percent literals 234s registers and corrects an offense 234s with spaces in blank percent literals 234s registers and corrects an offense 234s for x type and ["[", "]"] delimiters 234s accepts newlines and additional following alignment spaces 234s accepts multi-line literals 234s accepts literals with escaped spaces 234s accepts literals without additional spaces 234s registers an offense for unnecessary spaces 234s registers an offense for literals with escaped and other spaces 234s accepts multi-line literals within a method 234s registers an offense for spaces before final delimiter 234s registers an offense for spaces after first delimiter 234s accepts spaces between entries 234s with newline in blank percent literals 234s registers and corrects an offense 234s with spaces in blank percent literals 234s registers and corrects an offense 234s with space in blank percent literals 234s registers and corrects an offense 234s for I type and ["(", ")"] delimiters 234s accepts multi-line literals 234s accepts spaces between entries 234s accepts literals with escaped spaces 234s registers an offense for unnecessary spaces 234s accepts newlines and additional following alignment spaces 234s registers an offense for literals with escaped and other spaces 234s accepts literals without additional spaces 234s registers an offense for spaces before final delimiter 234s accepts multi-line literals within a method 234s registers an offense for spaces after first delimiter 234s with spaces in blank percent literals 234s registers and corrects an offense 234s with newline in blank percent literals 234s registers and corrects an offense 234s with space in blank percent literals 234s registers and corrects an offense 234s for W type and ["{", "}"] delimiters 234s accepts literals without additional spaces 234s accepts newlines and additional following alignment spaces 234s accepts multi-line literals 234s accepts multi-line literals within a method 234s accepts spaces between entries 234s accepts literals with escaped spaces 234s registers an offense for unnecessary spaces 234s registers an offense for spaces after first delimiter 234s registers an offense for spaces before final delimiter 234s registers an offense for literals with escaped and other spaces 234s with spaces in blank percent literals 234s registers and corrects an offense 234s with space in blank percent literals 234s registers and corrects an offense 234s with newline in blank percent literals 234s registers and corrects an offense 234s for W type and ["(", ")"] delimiters 234s accepts newlines and additional following alignment spaces 234s accepts literals without additional spaces 234s accepts multi-line literals within a method 234s accepts literals with escaped spaces 234s registers an offense for spaces before final delimiter 234s registers an offense for spaces after first delimiter 234s accepts spaces between entries 234s accepts multi-line literals 234s registers an offense for unnecessary spaces 234s registers an offense for literals with escaped and other spaces 234s with newline in blank percent literals 234s registers and corrects an offense 234s with space in blank percent literals 234s registers and corrects an offense 234s with spaces in blank percent literals 234s registers and corrects an offense 234s for w type and ["{", "}"] delimiters 234s accepts multi-line literals within a method 234s registers an offense for spaces after first delimiter 234s registers an offense for spaces before final delimiter 234s registers an offense for literals with escaped and other spaces 234s registers an offense for unnecessary spaces 234s accepts literals with escaped spaces 234s accepts literals without additional spaces 234s accepts spaces between entries 234s accepts multi-line literals 234s accepts newlines and additional following alignment spaces 234s with spaces in blank percent literals 234s registers and corrects an offense 234s with newline in blank percent literals 234s registers and corrects an offense 234s with space in blank percent literals 234s registers and corrects an offense 234s for x type and ["(", ")"] delimiters 234s accepts literals with escaped spaces 234s accepts spaces between entries 234s accepts multi-line literals 234s registers an offense for spaces before final delimiter 234s accepts newlines and additional following alignment spaces 234s accepts literals without additional spaces 234s registers an offense for literals with escaped and other spaces 234s accepts multi-line literals within a method 234s registers an offense for spaces after first delimiter 234s registers an offense for unnecessary spaces 234s with newline in blank percent literals 234s registers and corrects an offense 234s with space in blank percent literals 234s registers and corrects an offense 234s with spaces in blank percent literals 234s registers and corrects an offense 234s 234s RuboCop::Cop::Layout::MultilineHashKeyLineBreaks 234s with line break after opening bracket 234s registers an offense and corrects when key starts on same line as another 234s when key starts on same line as another with rockets 234s adds an offense 234s when on different lines than brackets but keys on one 234s does not add any offenses 234s when on all keys on one line different than brackets 234s does not add any offenses 234s without line break after opening bracket 234s registers an offense and corrects nested hashes 234s registers an offense and corrects when key starts on same line as another 234s when on same line 234s does not add any offenses 234s 234s RuboCop::Cop::Style::ImplicitRuntimeError 234s does not register an offense for `fail` with an error class 234s does not register an offense for `fail` without arguments 234s does not register an offense for `raise` without arguments 234s registers an offense for `raise` without error class 234s registers an offense for `fail` with a multiline string 234s registers an offense for `raise` with a multiline string 234s does not register an offense for `raise` with an error class 234s registers an offense for `fail` without error class 234s 234s RuboCop::Cop::Style::ModuleFunction 234s when enforced style is `forbidden` 234s registers an offense for `module_function` without an argument 234s accepts `extend self` in a class 234s registers an offense for `extend self` 234s in a module 234s in a module with private methods 234s in a module with declarative private 234s when enforced style is `extend_self` 234s registers an offense for `module_function` without an argument 234s accepts module_function with an argument 234s when enforced style is `module_function` 234s accepts for `extend self` in a module with private methods 234s accepts `extend self` in a class 234s accepts for `extend self` in a module with declarative private 234s registers an offense for `extend self` in a module 234s 234s RuboCop::Cop::Style::EachForSimpleLoop 234s does not register offense for character range 234s does not register offense if range endpoint is not constant 234s does not register offense if range startpoint is not constant 234s with multiline block with parameters 234s autocorrects an offense 234s when using an exclusive end range 234s autocorrects the source with multiline block 234s autocorrects the source with inline block 234s does not register offense for range not starting with zero and using param 234s autocorrects the range not starting with zero 234s with inline block with parameters 234s autocorrects an offense 234s when using an inclusive end range 234s does not register offense for range not starting with zero and using param 234s autocorrects the range not starting with zero 234s autocorrects the source with multiline block 234s autocorrects the source with inline block 234s 234s RuboCop::Cop::Style::StructInheritance 234s registers an offense when extending instance of Struct with do ... end 234s accepts assignment to ::Struct.new 234s accepts plain class 234s accepts assignment to Struct.new 234s registers an offense when extending instance of Struct 234s accepts assignment to block form of Struct.new 234s registers an offense when extending instance of `Struct` when there is a comment before class declaration 234s registers an offense when extending instance of ::Struct with do ... end 234s registers an offense when extending instance of Struct without `do` ... `end` and class body is empty 234s accepts extending DelegateClass 234s registers an offense when extending instance of Struct without `do` ... `end` and class body is empty and single line definition 234s registers an offense when extending instance of ::Struct 234s 234s RuboCop::Cop::Style::RedundantCapitalW 234s registers no offense for arrays with character constants 234s does not register an offense for array with one element 234s registers no offense for %w with interpolation-like syntax 234s does not register an offense for array containing non-string 234s registers no offense for normal arrays of strings 234s registers no offense for %w without interpolation 234s registers an offense for misused %W with different bracket 234s registers no offense for %W with interpolation 234s registers no offense for normal arrays of strings with interpolation 234s registers an offense for misused %W 234s does not register an offense for array with empty strings 234s registers no offense for %W with special characters 234s does not register an offense for array of non-words 234s 234s RuboCop::Cop::Lint::FlipFlop 234s registers an offense for exclusive flip-flops 234s registers an offense for inclusive flip-flops 234s 234s RuboCop::MagicComment 234s returns nil for encoding when comment is # shareable-constant-value: literal 234s returns nil for typed when comment is # -*- coding: ASCII-8BIT; typed: strict -*- 234s returns nil for typed when comment is # shareable_constant_value: literal 234s returns nil for typed when comment is # encoding: utf-8 234s returns nil for shareable_constant_value when comment is # vim:fileencoding=utf-8 234s returns true for frozen_string_literal when comment is # frozen-string-literal: true 234s returns nil for typed when comment is # vim: filetype=ruby, fileencoding=ascii-8bit 234s returns nil for encoding when comment is #typed:strict 234s returns nil for encoding when comment is # frozen_string_literal: false 234s returns nil for typed when comment is # coding: utf-8 vim: filetype=ruby, fileencoding=ascii-8bit 234s returns nil for encoding when comment is # frozen_string_literal: invalid 234s returns nil for typed when comment is # encoding: stateless-iso-2022-jp-kddi 234s returns nil for shareable_constant_value when comment is CSV.generate(encoding: Encoding::UTF_8) do |csv| 234s returns nil for frozen_string_literal when comment is # vim: filetype=ruby, fileencoding=ascii-8bit 234s returns true for frozen_string_literal when comment is # coding: utf-8 -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- 234s returns nil for frozen_string_literal when comment is # typed: true 234s returns nil for typed when comment is # incoding: utf-8 234s returns nil for frozen_string_literal when comment is # SHAREABLE-CONSTANT-VALUE: literal 234s returns "literal" for shareable_constant_value when comment is # shareable-constant-value: literal 234s returns nil for typed when comment is # -*- frozen-string-literal: true -*- 234s returns nil for shareable_constant_value when comment is # frozen-string-literal: true 234s returns nil for encoding when comment is # xyz shareable_constant_value: literal xyz 234s returns "ascii-8bit" for encoding when comment is # coding: utf-8 -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- 234s returns nil for shareable_constant_value when comment is # typed: strict 234s returns nil for shareable_constant_value when comment is #vim: filetype=ruby, fileencoding=ascii-8bit 234s returns nil for encoding when comment is # typed: true 234s returns nil for encoding when comment is # FROZEN-STRING-LITERAL: true 234s returns nil for shareable_constant_value when comment is # frozen_string_literal: true 234s returns "strict" for typed when comment is # typed:strict 234s returns nil for frozen_string_literal when comment is # @typed 234s returns nil for encoding when comment is # SHAREABLE-CONSTANT-VALUE: literal 234s returns nil for shareable_constant_value when comment is # vim: filetype=ruby, fileencoding=ascii-8bit 234s returns "ascii-8bit" for encoding when comment is # vim: filetype=python, fileencoding=ascii-8bit 234s returns nil for encoding when comment is # typed: strong 234s returns nil for shareable_constant_value when comment is # coding: utf-8 -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- 234s returns nil for typed when comment is # fRoZeN-sTrInG_lItErAl: true 234s returns nil for typed when comment is # SHAREABLE-CONSTANT-VALUE: literal 234s returns "ascii-8bit" for encoding when comment is # encoding: ascii-8bit frozen_string_literal: true 234s returns nil for frozen_string_literal when comment is # vim: filetype=ruby, fileencoding=ascii-8bit 234s returns nil for typed when comment is # frozen_string_literal: true encoding: ascii-8bit 234s returns nil for frozen_string_literal when comment is # frozen_string_literal: true encoding: ascii-8bit 234s returns nil for shareable_constant_value when comment is # typed: strong 234s returns "false" for typed when comment is # typed: false 234s returns "ascii-8bit" for encoding when comment is # frozen_string_literal: true encoding: ascii-8bit 234s returns nil for encoding when comment is # sHaReaBLE-CoNstANT-ValUE: literal 234s returns "utf-8" for encoding when comment is # coding: utf-8 234s returns nil for typed when comment is # vim:fileencoding=utf-8 234s returns "true" for typed when comment is # typed: true 234s returns nil for typed when comment is # FROZEN-STRING-LITERAL: true 234s returns "strict" for typed when comment is # typed: strict 234s returns nil for frozen_string_literal when comment is # 234s returns "none" for shareable_constant_value when comment is # shareable_constant_value: none 234s returns nil for encoding when comment is # frozen_string_literal:true 234s returns nil for encoding when comment is # frozen_string_literal: true 234s returns nil for shareable_constant_value when comment is # encoding: utf-8 234s returns nil for frozen_string_literal when comment is # encoding: ascii-8bit frozen_string_literal: true 234s returns "literal" for shareable_constant_value when comment is # shareable_constant_value:literal 234s returns nil for encoding when comment is # typed:strict 234s returns nil for shareable_constant_value when comment is # @typed 234s returns nil for shareable_constant_value when comment is # -*- encoding : ascii-8bit -*- 234s returns nil for shareable_constant_value when comment is # typed:strict 234s returns nil for typed when comment is # 234s returns nil for shareable_constant_value when comment is # eNcOdInG: utf-8 234s returns nil for shareable_constant_value when comment is # frozen_string_literal:true 234s returns nil for frozen_string_literal when comment is # typed: strong 234s returns nil for frozen_string_literal when comment is CSV.generate(encoding: Encoding::UTF_8) do |csv| 234s returns nil for typed when comment is # sHaReaBLE-CoNstANT-ValUE: literal 234s returns "utf-8" for encoding when comment is # coding: utf-8 234s returns nil for shareable_constant_value when comment is # xyz shareable_constant_value: literal 234s returns nil for frozen_string_literal when comment is # xyz shareable_constant_value: literal 234s returns nil for shareable_constant_value when comment is # 234s returns nil for frozen_string_literal when comment is # ENCODING: utf-8 234s returns nil for shareable_constant_value when comment is # vim: filetype=ruby, fileencoding=ascii-8bit 234s returns "invalid" for frozen_string_literal when comment is # frozen_string_literal: invalid 234s returns nil for encoding when comment is # typed: ignore 234s returns "strict" for typed when comment is #typed:strict 234s returns nil for frozen_string_literal when comment is # coding: utf-8 234s returns "utf-8" for encoding when comment is # encoding: utf-8 234s returns nil for typed when comment is # coding: utf-8 234s returns nil for encoding when comment is # shareable_constant_value: experimental_copy 234s returns nil for shareable_constant_value when comment is #vim: filetype=ruby, fileencoding=ascii-8bit, typed=strict 234s returns nil for shareable_constant_value when comment is # frozen_string_literal: false 234s returns nil for typed when comment is # -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- 234s returns nil for shareable_constant_value when comment is # encoding: stateless-iso-2022-jp-kddi 234s returns nil for encoding when comment is # shareable_constant_value: literal 234s returns nil for typed when comment is # frozen_string_literal: true 234s returns false for frozen_string_literal when comment is # frozen_string_literal: false 234s returns nil for shareable_constant_value when comment is # coding: utf-8 234s returns nil for frozen_string_literal when comment is # typed:strict 234s returns nil for shareable_constant_value when comment is # vim: filetype=ruby,fileencoding=ascii-8bit 234s returns nil for typed when comment is # encoding: ascii-8bit frozen_string_literal: true 234s returns nil for frozen_string_literal when comment is #vim: filetype=ruby, fileencoding=ascii-8bit 234s returns nil for typed when comment is # shareable_constant_value:literal 234s returns nil for frozen_string_literal when comment is # sHaReaBLE-CoNstANT-ValUE: literal 234s returns nil for shareable_constant_value when comment is # coding: utf-8 vim: filetype=ruby, fileencoding=ascii-8bit 234s returns nil for frozen_string_literal when comment is # shareable_constant_value: experimental_copy 234s returns nil for shareable_constant_value when comment is # incoding: utf-8 234s returns nil for shareable_constant_value when comment is # FROZEN-STRING-LITERAL: true 234s returns nil for frozen_string_literal when comment is # typed: strict 234s returns nil for shareable_constant_value when comment is #typed:strict 234s returns nil for frozen_string_literal when comment is # incoding: utf-8 234s returns nil for frozen_string_literal when comment is # typed: false 234s returns nil for typed when comment is # frozen_string_literal: invalid 234s returns nil for shareable_constant_value when comment is # coding: utf-8 234s returns nil for typed when comment is #vim: filetype=ruby, fileencoding=ascii-8bit, typed=strict 234s returns "utf-8" for encoding when comment is # coding: utf-8 vim: filetype=ruby, fileencoding=ascii-8bit 234s returns "ascii-8bit" for encoding when comment is # -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- 234s returns nil for shareable_constant_value when comment is # encoding: ascii-8bit frozen_string_literal: true 234s returns true for frozen_string_literal when comment is # fRoZeN-sTrInG_lItErAl: true 234s returns nil for shareable_constant_value when comment is # -*- frozen-string-literal: true -*- 234s returns true for frozen_string_literal when comment is # FROZEN-STRING-LITERAL: true 234s returns "ignore" for typed when comment is # typed: ignore 234s returns nil for shareable_constant_value when comment is # typed: false 234s returns nil for frozen_string_literal when comment is # vim: filetype=ruby,fileencoding=ascii-8bit 234s returns nil for frozen_string_literal when comment is # coding: utf-8 234s returns nil for frozen_string_literal when comment is # xyz shareable_constant_value: literal xyz 234s returns nil for typed when comment is CSV.generate(encoding: Encoding::UTF_8) do |csv| 234s returns nil for encoding when comment is # shareable_constant_value:literal 234s returns "ascii-8bit" for encoding when comment is # -*- coding: ASCII-8BIT; typed: strict -*- 234s returns nil for encoding when comment is # vim: filetype=ruby,fileencoding=ascii-8bit 234s returns "ascii-8bit" for encoding when comment is # vim: filetype=ruby, fileencoding=ascii-8bit 234s returns nil for typed when comment is # frozen_string_literal: true 234s returns nil for encoding when comment is # -*- frozen-string-literal: true -*- 234s returns nil for typed when comment is # shareable_constant_value: experimental_everything 234s returns "experimental_copy" for shareable_constant_value when comment is # shareable_constant_value: experimental_copy 234s returns nil for frozen_string_literal when comment is # encoding: stateless-iso-2022-jp-kddi 234s returns nil for typed when comment is # coding: utf-8 234s returns nil for encoding when comment is # 234s returns nil for frozen_string_literal when comment is # shareable_constant_value:literal 234s returns nil for encoding when comment is # typed: false 234s returns nil for shareable_constant_value when comment is # typed: true 234s returns nil for typed when comment is #vim: filetype=ruby, fileencoding=ascii-8bit 234s returns "utf-8" for encoding when comment is # ENCODING: utf-8 234s returns "stateless-iso-2022-jp-kddi" for encoding when comment is # encoding: stateless-iso-2022-jp-kddi 234s returns nil for encoding when comment is # shareable_constant_value: experimental_everything 234s returns nil for shareable_constant_value when comment is # frozen_string_literal: true encoding: ascii-8bit 234s returns nil for frozen_string_literal when comment is # vim:fileencoding=utf-8 234s returns nil for typed when comment is # vim: filetype=python, fileencoding=ascii-8bit 234s returns nil for typed when comment is # shareable_constant_value: none 234s returns nil for typed when comment is # xyz shareable_constant_value: literal xyz 234s returns nil for typed when comment is # xyz shareable_constant_value: literal 234s returns nil for frozen_string_literal when comment is # eNcOdInG: utf-8 234s returns nil for shareable_constant_value when comment is # ENCODING: utf-8 234s returns "strong" for typed when comment is # typed: strong 234s returns nil for frozen_string_literal when comment is # shareable-constant-value: literal 234s returns nil for typed when comment is # vim: filetype=ruby,fileencoding=ascii-8bit 234s returns nil for shareable_constant_value when comment is # -*- coding: ASCII-8BIT; typed: strict -*- 234s returns nil for encoding when comment is # vim:fileencoding=utf-8 234s returns nil for frozen_string_literal when comment is # vim: filetype=python, fileencoding=ascii-8bit 234s returns nil for typed when comment is # frozen_string_literal: false 234s returns nil for typed when comment is # eNcOdInG: utf-8 234s returns nil for frozen_string_literal when comment is # typed: ignore 234s returns nil for typed when comment is # shareable-constant-value: literal 234s returns "literal" for shareable_constant_value when comment is # SHAREABLE-CONSTANT-VALUE: literal 234s returns nil for encoding when comment is # shareable_constant_value: none 234s returns "utf-8" for encoding when comment is # eNcOdInG: utf-8 234s returns nil for shareable_constant_value when comment is # fRoZeN-sTrInG_lItErAl: true 234s returns nil for encoding when comment is # xyz shareable_constant_value: literal 234s returns nil for encoding when comment is # fRoZeN-sTrInG_lItErAl: true 234s returns nil for encoding when comment is # incoding: utf-8 234s returns nil for frozen_string_literal when comment is #vim: filetype=ruby, fileencoding=ascii-8bit, typed=strict 234s returns nil for shareable_constant_value when comment is # xyz shareable_constant_value: literal xyz 234s returns "ascii-8bit" for encoding when comment is # -*- encoding : ascii-8bit -*- 234s returns nil for shareable_constant_value when comment is # frozen_string_literal: invalid 234s returns nil for typed when comment is # shareable_constant_value: experimental_copy 234s returns nil for encoding when comment is # frozen_string_literal: true 234s returns nil for frozen_string_literal when comment is # -*- encoding : ascii-8bit -*- 234s returns nil for encoding when comment is # @typed 234s returns nil for encoding when comment is # typed: strict 234s returns nil for frozen_string_literal when comment is # shareable_constant_value: experimental_everything 234s returns true for frozen_string_literal when comment is # frozen_string_literal: true 234s returns "ascii-8bit" for encoding when comment is # vim: filetype=ruby, fileencoding=ascii-8bit 234s returns true for frozen_string_literal when comment is # -*- frozen-string-literal: true -*- 234s returns nil for typed when comment is # ENCODING: utf-8 234s returns nil for typed when comment is # vim: filetype=ruby, fileencoding=ascii-8bit 234s returns nil for shareable_constant_value when comment is # typed: ignore 234s returns nil for typed when comment is # frozen_string_literal:true 234s returns "experimental_everything" for shareable_constant_value when comment is # shareable_constant_value: experimental_everything 234s returns nil for shareable_constant_value when comment is # frozen_string_literal: true 234s returns "literal" for shareable_constant_value when comment is # shareable_constant_value: literal 234s returns true for frozen_string_literal when comment is # frozen_string_literal: true 234s returns nil for shareable_constant_value when comment is # -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- 234s returns nil for typed when comment is # @typed 234s returns nil for frozen_string_literal when comment is # encoding: utf-8 234s returns nil for frozen_string_literal when comment is #typed:strict 234s returns "literal" for shareable_constant_value when comment is # sHaReaBLE-CoNstANT-ValUE: literal 234s returns nil for shareable_constant_value when comment is # vim: filetype=python, fileencoding=ascii-8bit 234s returns nil for typed when comment is # coding: utf-8 -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- 234s returns "ascii-8bit" for encoding when comment is #vim: filetype=ruby, fileencoding=ascii-8bit 234s returns nil for frozen_string_literal when comment is # shareable_constant_value: none 234s returns true for frozen_string_literal when comment is # -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- 234s returns nil for encoding when comment is CSV.generate(encoding: Encoding::UTF_8) do |csv| 234s returns nil for frozen_string_literal when comment is # shareable_constant_value: literal 234s returns nil for typed when comment is # frozen-string-literal: true 234s returns nil for frozen_string_literal when comment is # coding: utf-8 vim: filetype=ruby, fileencoding=ascii-8bit 234s returns nil for typed when comment is # -*- encoding : ascii-8bit -*- 234s returns nil for frozen_string_literal when comment is # -*- coding: ASCII-8BIT; typed: strict -*- 234s returns "ascii-8bit" for encoding when comment is #vim: filetype=ruby, fileencoding=ascii-8bit, typed=strict 234s returns true for frozen_string_literal when comment is # frozen_string_literal:true 234s returns nil for encoding when comment is # frozen-string-literal: true 234s #valid? 234s with an shareable constant value comment 234s is expected to equal true 234s with an encoding comment 234s is expected to equal true 234s with an empty string 234s is expected to equal false 234s with a non magic comment 234s is expected to equal false 234s with an frozen string literal comment 234s is expected to equal true 234s #without 234s simple format 234s when the entire comment is a single value 234s is expected to eq "" 234s when the comment contains a different magic value 234s is expected to eq "# frozen-string-literal: true" 234s vim format 234s when the comment has multiple tokens 234s is expected to eq "# vim: filetype=ruby" 234s emacs format 234s with multiple tokens 234s is expected to eq "# -*- frozen_string_literal: true -*-" 234s with one token 234s is expected to eq "" 234s #valid_shareable_constant_value? 234s when given comment specified as unknown value 234s is expected to equal false 234s when given comment specified as `experimental_everything` 234s is expected to equal true 234s when given comment is not specified 234s is expected to equal false 234s when given comment specified as `experimental_copy` 234s is expected to equal true 234s when given comment specified as `none` 234s is expected to equal true 234s when given comment specified as `literal` 234s is expected to equal true 234s 234s RuboCop::Cop::Style::SignalException 234s when enforced style is `semantic` 234s registers one offense for each raise 234s accepts raise in def rescue section 234s registers an offense for raise in def body 234s accepts raise in def with multiple rescues 234s registers an offense for raise in begin section 234s registers an offense for fail in def rescue section 234s registers an offense for `raise` and `fail` with `::Kernel` as explicit receiver 234s registers only offense for one raise that should be fail 234s is not confused by nested begin/rescue 234s registers an offense for `raise` and `fail` with `Kernel` as explicit receiver 234s accepts raise in rescue section 234s registers an offense for fail in second rescue 234s registers an offense for fail in rescue section 234s registers an offense for raise not in a begin/rescue/end 234s accepts `raise` and `fail` with explicit receiver 234s when enforced style is `raise` 234s registers an offense for `fail` with `Kernel` as explicit receiver 234s registers an offense for fail in begin section 234s accepts `fail` with explicit receiver 234s registers an offense for fail in def body 234s accepts `fail` if a custom `fail` instance method is defined 234s registers an offense for fail in rescue section 234s accepts `fail` if a custom `fail` singleton method is defined 234s when enforced style is `fail` 234s registers an offense for raise in def body 234s registers an offense for raise in begin section 234s registers an offense for raise in rescue section 234s registers an offense for `raise` with `Kernel` as explicit receiver 234s accepts `raise` with explicit receiver 234s 234s RuboCop::Cop::Naming::PredicateName 234s with method definition macros 234s registers an offense when using `define_method` 234s accepts method name when corrected name is invalid identifier 234s registers an offense when using an internal affair macro 234s with restricted prefixes 234s accepts method name that starts with unknown prefix 234s accepts method name that is an assignment 234s accepts method name when corrected name is invalid identifier 234s registers an offense when method name starts with "is" 234s registers an offense when method name starts with "has" 234s with permitted predicate names 234s accepts method name which is in permitted list 234s without method definition macros 234s registers an offense when using `define_method` 234s accepts method name when corrected name is invalid identifier 234s does not register any offenses when using an internal affair macro 234s without restricted prefixes 234s accepts method name that starts with unknown prefix 234s accepts method name when corrected name is invalid identifier 234s registers an offense when method name starts with "has" 234s registers an offense when method name starts with "is" 234s 234s RuboCop::Cop::InternalAffairs::RedundantLetRuboCopConfigNew 234s registers an offense when using `let(:config)` with no argument `RuboCop::Config.new` and `:config` is specified 234s registers an offense when using `let(:config)` and `:config` is not specified in `describe` 234s does not register an offense when using `let(:config)` with arguments to `RuboCop::Config.new` 234s registers an offense when using `let(:config)` and `:config` is already specified in `describe` 234s 234s RuboCop::Cop::InternalAffairs::CopDescription 234s The description starts with `This cop ...` 234s registers an offense and corrects if using just a verb 234s registers an offense if the description like `This cop is ...` 234s registers an offense if using an auxiliary verb 234s There is no description comment 234s does not register offense 234s The description starts with a word such as verb 234s does not register if the description like `Checks` 234s does not register if the description starts with non-verb word 234s 234s RuboCop::Cop::Style::MultilineIfThen 234s does not get confused by a postfix unless 234s accepts table style if/then/elsif/ends 234s does not raise an error for an implicit match if 234s does not raise an error for an implicit match unless 234s does not get confused by empty elsif branch 234s registers an offense for then in multiline unless 234s does not get confused by a then in a when 234s does not get confused by a commented-out then 234s does not get confused by a nested postfix unless 234s registers an offense for then in multiline if 234s registers an offense for then in multiline elsif 234s 234s RuboCop::Cop::InternalAffairs::NodeTypePredicate 234s does not register an offense for a predicate node type check 234s comparison node type check 234s registers an offense and autocorrects 234s 234s RuboCop::Cop::Style::IfWithSemicolon 234s registers an offense and corrects for one line if/;/end 234s can handle modifier conditionals 234s accepts without `else` branch 234s when elsif is present 234s accepts without `else` branch 234s accepts with `else` branch 234s accepts second elsif block 234s 234s RuboCop::Cop::Layout::SpaceInsideHashLiteralBraces 234s accepts hashes with spaces by default 234s can handle interpolation in a braceless hash literal 234s registers an offense for hashes with no spaces if so configured 234s registers an offense for correct + opposite 234s accepts hash literals with no braces 234s with space inside empty braces allowed 234s registers an offense for empty braces with no space inside 234s accepts empty braces with space inside 234s when using method argument that both key and value are hash literals 234s registers hashes with no spaces 234s on Hash[{ x: 1 } => [1]] 235s does not register an offense 235s when EnforcedStyle is compact 235s registers offenses for hashes with no spaces 235s registers an offense for opposite + correct 235s accepts multiline hash 235s registers an offense for nested hashes with spaces 235s accepts multiline hash with comment 235s doesn't register an offense for non-nested hashes with spaces 235s on { key: "{" } 235s does not register an offense 235s offending hash following empty hash 235s registers an offense on both sides 235s with newline inside empty braces not allowed 235s registers an offense 235s when EnforcedStyle is no_space 235s accepts multiline hash with comment 235s registers an offense for opposite + correct 235s accepts hashes with no spaces 235s registers an offense for hashes with spaces 235s accepts multiline hash 235s when using method argument that both key and value are hash literals 235s accepts hashes with no spaces 235s with space inside empty braces not allowed 235s accepts empty braces with no space inside 235s registers an offense for empty braces with space inside 235s 235s RuboCop::Cop::Lint::SuppressedException 235s with AllowComments set to false 235s does not register an offense for rescue with body 235s registers an offense for empty rescue block 235s when empty rescue for defs 235s registers an offense for empty rescue without comment 235s registers an offense for empty rescue with comment 235s Ruby 2.5 or higher 235s when empty rescue for `do` block 235s registers an offense for empty rescue without comment 235s registers an offense for empty rescue with comment 235s when empty rescue for `def` 235s registers an offense for empty rescue with comment 235s registers an offense for empty rescue without comment 235s with AllowNil set to false 235s registers an offense for rescue block with nil 235s registers an offense for inline nil rescue 235s with AllowNil set to true 235s does not register an offense for inline nil rescue 235s does not register an offense for rescue block with nil 235s with AllowComments set to true 235s registers an offense for empty rescue on single line with a comment after it 235s does not register an offense for empty rescue with comment 235s Ruby 2.5 or higher 235s when empty rescue for `do` block 235s does not register an offense for empty rescue with comment 235s registers an offense for empty rescue without comment 235s when empty rescue for `defs` 235s registers an offense for empty rescue without comment 235s does not register an offense for empty rescue with comment 235s Ruby 2.7 or higher 235s when empty rescue for `do` block with a numbered parameter 235s registers an offense for empty rescue without comment 235s does not register an offense for empty rescue with comment 235s when empty rescue for `def` 235s does not register an offense for empty rescue with comment 235s registers an offense for empty rescue without comment 235s 235s RuboCop::Cop::Lint::DuplicateRequire 235s registers and corrects an offense when duplicate requires are interleaved with some other code 235s registers and corrects an offense for duplicate non top-level requires 235s does not register an offense when calling user-defined `require` method 235s registers and corrects an offense when duplicate `require_relative` is detected 235s registers and corrects an offense when duplicate `require` through `Kernel` is detected 235s registers and corrects an offense for multiple duplicate requires 235s registers and corrects an offense when duplicate `require` is detected 235s does not register an offense when same feature argument but different require method 235s does not register an offense when using single `require` 235s does not register an offense when there are no duplicate `require`s 235s 235s RuboCop::Cop::Lint::ElseLayout 235s does not register an offense for an elsif with no body 235s accepts modifier forms 235s accepts empty braces 235s does not register an offense if the entire if is on a single line 235s accepts ternary ops 235s registers an offense and corrects for the entire else body being on the same line 235s registers an offense and corrects for elsifs 235s registers and corrects an offense when using multiple `elsif`s 235s accepts proper else 235s registers an offense and corrects for expr on same line as else 235s 235s RuboCop::PathUtil 235s #absolute? 235s returns a truthy value for a path beginning with slash 235s returns a falsey value for a path beginning with a directory name 235s #relative_path 235s supports custom base paths 235s builds paths relative to PWD by default as a stop-gap 235s #match_path? 235s does not match file in a subdirectory 235s matches regexps 235s matches glob expressions 235s does not match dir/** for file in hidden dir 235s matches strings to the full path 235s matches dir/** for hidden file 235s does not match invalid UTF-8 paths 235s 235s RuboCop::Formatter::EmacsStyleFormatter 235s #file_finished 235s displays parsable text 235s when the offense is automatically corrected 235s prints [Corrected] along with message 235s when the offense message contains a newline 235s strips newlines out of the error message 235s when the offense is marked as todo 235s prints [Todo] along with message 235s #finished 235s does not report summary 235s 235s RuboCop::Cop::Style::PercentLiteralDelimiters 235s `%s` symbol 235s does not register an offense for preferred delimiters 235s registers an offense for other delimiters 235s autocorrect 235s preserves irregular indentation when correcting a multiline array 235s preserves line breaks when fixing a multiline array 235s preserves indentation when correcting a multiline array 235s fixes a string array in a scope 235s behaves like escape characters 235s corrects %i with \n in it 235s corrects %i with \t in it 235s behaves like escape characters 235s corrects %x with \t in it 235s corrects %x with \n in it 235s behaves like escape characters 235s corrects %q with \t in it 235s corrects %q with \n in it 235s behaves like escape characters 235s corrects %r with \n in it 235s corrects %r with \t in it 235s behaves like escape characters 235s corrects %W with \n in it 235s corrects %W with \t in it 235s behaves like escape characters 235s corrects %w with \t in it 235s corrects %w with \n in it 235s behaves like escape characters 235s corrects %s with \t in it 235s corrects %s with \n in it 235s behaves like escape characters 235s corrects %Q with \n in it 235s corrects %Q with \t in it 235s behaves like escape characters 235s corrects % with \n in it 235s corrects % with \t in it 235s `%i` symbol array 235s does not register an offense for preferred delimiters 235s registers an offense for other delimiters 235s does not register an offense for non-preferred delimiters enclosing escaped delimiters 235s `%q` string 235s does not register an offense for other delimiters when containing preferred delimiter characters 235s registers an offense for other delimiters 235s does not register an offense for preferred delimiters 235s `%x` interpolated system call 235s does not register an offense for preferred delimiters 235s registers an offense for other delimiters 235s registers an offense for other delimiters when containing preferred delimiter characters in interpolation 235s does not register an offense for other delimiters when containing preferred delimiter characters 235s `default` override 235s allows all preferred delimiters to be set with one key 235s allows individual preferred delimiters to override `default` 235s `%I` interpolated symbol array 235s registers an offense for other delimiters when containing preferred delimiter characters in interpolation 235s registers an offense for other delimiters 235s does not register an offense for preferred delimiters 235s `%W` interpolated string array 235s registers an offense for other delimiters 235s registers an offense for other delimiters when containing preferred delimiter characters in interpolation 235s does not register an offense for preferred delimiters 235s does not register an offense for other delimiters when containing preferred delimiter characters 235s `%w` string array 235s registers an offense for other delimiters 235s does not register an offense for other delimiters when containing preferred delimiter characters 235s does not register an offense for preferred delimiters with only a closing delimiter 235s does not register an offense for preferred delimiters 235s does not register an offense for preferred delimiters with a pairing delimiters 235s does not register an offense for preferred delimiters with not a pairing delimiter 235s `%r` interpolated regular expression 235s does not register an offense for other delimiters when containing preferred delimiter characters 235s registers an offense for other delimiters 235s registers an offense for a regular expression with option 235s does not register an offense for preferred delimiters 235s registers an offense for other delimiters when containing preferred delimiter characters in interpolation 235s invalid cop config 235s raises an error when invalid configuration is specified 235s `%Q` interpolated string 235s registers an offense for other delimiters when containing preferred delimiter characters in interpolation 235s does not register an offense for preferred delimiters 235s registers an offense for other delimiters 235s does not register an offense for other delimiters when containing preferred delimiter characters 235s `%` interpolated string 235s registers an offense when the source contains invalid characters 235s does not register an offense for preferred delimiters 235s registers an offense for other delimiters when containing preferred delimiter characters in interpolation 235s does not register an offense for other delimiters when containing preferred delimiter characters 235s registers an offense for other delimiters 235s registers an offense for a string with no content 235s 235s RuboCop::Cop::Style::RescueModifier 235s handles more complex expression with modifier rescue 235s registers an offense for modifier rescue 235s does not register an offense for normal rescue with ensure 235s does not register an offense for normal rescue 235s handles parentheses around a rescue modifier 235s does not register an offense for nested normal rescue 235s handles modifier rescue in a method 235s handles modifier rescue in normal rescue 235s registers an offense for modifier rescue around parallel assignment 235s when a singleton method has implicit begin 235s handles modifier rescue in body of implicit begin 235s accepts normal rescue 235s excluded file 235s processes excluded files with issue 235s when an instance method has implicit begin 235s handles modifier rescue in body of implicit begin 235s accepts normal rescue 235s autocorrect 235s corrects complex rescue modifier 235s corrects doubled rescue modifiers 235s 235s RuboCop::Cop::Metrics::CyclomaticComplexity 235s when AllowedMethods is enabled 235s does not register an offense when defining an instance method 235s does not register an offense when using `define_method` 235s does not register an offense when defining a class method 235s when Max is 2 235s counts stupid nested if and else blocks 235s when AllowedPatterns is enabled 235s does not register an offense when using `define_method` 235s does not register an offense when defining an instance method 235s does not register an offense when defining a class method 235s when Max is 1 235s registers an offense for an unless modifier 235s registers an offense for a case/when block 235s counts repeated &. on same untouched local variable as 1 235s counts enumerating methods with block-pass as +1 235s registers an offense for or 235s registers an offense for && 235s registers an offense for || 235s accepts complex code outside of methods 235s registers an offense for &&= 235s registers an offense for an until block 235s registers an offense for ||= 235s registers an offense for a for block 235s counts only a single method 235s registers an offense for a while block 235s accepts an empty `define_method` 235s does not count blocks in general 235s accepts an empty method 235s registers an offense for and 235s registers an offense for an elsif block 235s registers an offense for a ternary operator 235s accepts a method with no decision points 235s registers an offense for &. 235s registers an offense for an if modifier 235s counts enumerating methods with blocks as +1 235s deals with nested if blocks containing && and || 235s registers an offense for a rescue block 235s registers an offense for a `define_method` 235s Ruby 2.7 235s counts enumerating methods with numblocks as +1 235s 235s RuboCop::Cop::Layout::LineContinuationLeadingSpace 235s EnforcedStyle: trailing 235s marks the correct range when string is a positional method argument 235s registers offense in the right location when 1st line is not the string 235s registers an offense when 2nd line has multiple leading spaces 235s registers offenses when 2nd and 3rd line has leading spaces 235s marks the correct range when string is a block method argument 235s puts the offense message in correct position also on indented line 235s registers an offense when 2nd line has one leading space 235s interpolated strings 235s registers offenses when 2nd line has leading spaces and 1st line is interpolated 235s registers no offense on interpolated string alone 235s registers an offense for incorrectly formatted multiline interpolated string 235s registers no offense on doubly interpolated string alone 235s registers no offense for correctly formatted multiline interpolation 235s registers no offense for correctly formatted multiline interpolated string 235s registers offenses when 2nd line has leading spaces and 2nd line is interpolated 235s EnforcedStyle: leading 235s marks the correct range when string is a positional method argument 235s puts the offense message in correct position also on indented line 235s marks the correct range when string is a block method argument 235s registers offense in the right location when 1st line is not the string 235s registers an offense when 1st line has one trailing space 235s registers an offense when 1st line has multiple trailing spaces 235s registers offenses when 1st and 2nd line has trailing spaces 235s interpolated strings 235s registers offenses when 1st line has leading spaces and 1st line is interpolated 235s registers no offense on interpolated string alone 235s registers offenses when 1st line has trailing spaces and 2nd line is interpolated 235s registers no offense for correctly formatted multiline interpolation 235s registers an offense for incorrectly formatted multiline interpolated string 235s registers no offense for correctly formatted multiline interpolated string 235s registers no offense on doubly interpolated string alone 235s 235s RuboCop::Cop::Layout::ClosingHeredocIndentation 235s does not register an offense for correctly indented empty heredocs 235s accepts correctly indented closing heredoc when aligned at the beginning of method definition and using `strip_indent` 235s accepts correctly indented closing heredoc when aligned at the beginning of method definition and content is empty 235s accepts correctly indented closing heredoc when heredoc contents with blank line 235s registers an offense for incorrectly indented empty heredocs 235s accepts correctly indented closing heredoc when aligned at the beginning of method definition 235s accepts correctly indented closing heredoc when heredoc contents is after closing heredoc 235s accepts correctly indented closing heredoc 235s accepts correctly indented closing heredoc when heredoc contents is before closing heredoc 235s registers an offense for bad indentation of a closing heredoc 235s does not register an offense for a << heredoc 235s 235s RuboCop::Cop::Style::Copyright 235s does not register an offense when the notice is in a block comment 235s does not register an offense when the notice is present 235s does not register an offense when the notice is not the first comment 235s when the copyright notice is missing and the source code file starts with shebang and an encoding comment 235s adds an offense 235s when the copyright notice comes after any code 235s adds an offense 235s when the copyright notice is missing 235s adds an offense 235s fails to autocorrect when the AutocorrectNotice does not match the Notice pattern 235s fails to autocorrect if no AutocorrectNotice is given 235s when the source code file is empty 235s adds an offense 235s when the copyright notice is missing and the source code file starts with a shebang 235s adds an offense 235s when the copyright notice is missing and the source code file starts with an encoding comment 235s adds an offense 235s 235s RuboCop::Cop::Lint::RedundantWithIndex 235s registers an offense for `ary.each_with_index { |v| v }` and corrects to `ary.each` 235s accepts an index is used as a block argument 235s registers an offense when using `ary.each.with_index(1) { |v| v }` and correct to `ary.each { |v| v }` 235s registers an offense when using `ary.each.with_index { |v| v }` and corrects to `ary.each` 235s registers an offense when using `ary.each_with_object([]).with_index { |v| v }` and corrects to `ary.each_with_object([]) { |v| v }` 235s Ruby 2.7 235s registers an offense when using `ary.each.with_index { _1 }` and corrects to `ary.each` 235s accepts an index is used as a numblock argument 235s registers an offense for `ary.each_with_index { _1 }` and corrects to `ary.each` 235s 235s RuboCop::Cop::Style::StringConcatenation 235s does not register an offense when using `+` with all non string arguments 235s correctly handles nested concatenable parts 235s registers an offense and corrects for string concatenation as part of other expression 235s registers an offense and corrects for string concatenation 235s correctly handles strings with special characters 235s inline block 235s registers an offense but does not correct 235s nested interpolation 235s registers an offense and corrects 235s Mode = conservative 235s when first operand is string literal 235s registers offense 235s when first operand is not string literal 235s does not register offense 235s empty quotes 235s registers offense and corrects 235s heredoc 235s registers an offense but does not correct 235s registers an offense but does not correct when string concatenation with multiline heredoc text 235s multiline 235s simple expressions 235s registers an offense and corrects 235s multiline block 235s registers an offense but does not correct 235s string continuation 235s does not register an offense 235s if condition 235s registers an offense but does not correct 235s double quotes inside string surrounded single quotes 235s registers an offense and corrects with double quotes 235s double quotes inside string 235s registers an offense and corrects with percentage quotes 235s registers an offense and corrects with double quotes 235s 235s RuboCop::Cop::Style::Lambda 235s when using safe navigation operator 235s does not break 235s with enforced `literal` style 235s with a single line lambda method call 235s without arguments 235s registers an offense 235s with arguments 235s registers an offense 235s with a multiline lambda method call 235s with arguments 235s registers an offense 235s without arguments 235s registers an offense 235s with default `line_count_dependent` style 235s with a multiline do-end lambda literal as a keyword argument 235s registers an offense 235s with a single line lambda method call 235s without arguments 235s registers an offense 235s with arguments 235s registers an offense 235s with a multiline lambda method call 235s does not register an offense 235s unusual lack of spacing 235s with a multiline lambda literal 235s with empty arguments 235s registers an offense 235s without parentheses 236s registers an offense 236s with no arguments and no spacing 236s registers an offense 236s with no parentheses and bad spacing 236s registers an offense 236s with no arguments and bad spacing 236s registers an offense 236s with no parentheses and many args 236s registers an offense 236s without any spacing 236s registers an offense 236s without spacing after arguments 236s registers an offense 236s without spacing before arguments 236s registers an offense 236s with a multiline do-end lambda as a parenthesized kwarg 236s registers an offense 236s with a multiline lambda literal as an argument 236s registers an offense 236s with a multiline braces lambda literal as a keyword argument 236s registers an offense 236s when calling a lambda method without a block 236s does not register an offense 236s with a multiline lambda literal 236s with arguments 236s registers an offense 236s without arguments 236s registers an offense 236s >= Ruby 2.7 236s when using numbered parameter 236s with a single line lambda method call 236s registers an offense 236s with a single line lambda literal 236s does not register an offense 236s with a multiline lambda method call 236s does not register an offense 236s with a single line lambda literal 236s does not register an offense 236s with enforced `lambda` style 236s with a single line lambda literal 236s with arguments 236s registers an offense 236s without argument parens and spaces 236s registers an offense 236s without arguments 236s registers an offense 236s with a multiline lambda literal 236s without arguments 236s registers an offense 236s with arguments 236s registers an offense 236s 236s RuboCop::Cop::Style::RedundantAssignment 236s accepts empty method body 236s reports an offense for def ending with assignment and returning 236s accepts empty if body 236s accepts empty when nodes 236s does not register an offense when ensure block present 236s when inside begin-end body 236s registers an offense and autocorrects 236s when inside a when-branch 236s registers an offense and autocorrects 236s when inside an if-branch 236s registers an offense and autocorrects 236s when rescue blocks present 236s registers an offense and autocorrects when inside function or rescue block 236s 236s RuboCop::Formatter::ClangStyleFormatter 236s #report_file 236s displays text containing the offending source line 236s when the source contains multibyte characters 236s displays text containing the offending source line 236s when the offending source spans multiple lines 236s displays the first line with ellipses 236s when the offense is correctable 236s prints message as-is 236s when the source line is blank 236s does not display offending source line 236s when the offense is automatically corrected 236s prints [Corrected] along with message 236s when the offense is not corrected 236s prints message as-is 236s 236s RuboCop::Cop::InternalAffairs::RedundantDescribedClassAsSubject 236s does not register an offense when using `subject(:cop)` with multiple arguments to `described_class.new` 236s registers an offense when using `subject(:cop)` and `:config` is not specified in `describe` 236s registers an offense when using `subject(:cop)` and `:config` is already specified in `describe` 236s registers an offense when using `subject(:cop)` with no argument `described_class.new` and `:config` is specified 236s 236s RuboCop::Cop::Style::MultilineIfModifier 236s unless guard clause 236s registers an offense when indented 236s allows a one liner 236s registers an offense 236s allows a multiline condition 236s if guard clause 236s allows a multiline condition 236s registers an offense 236s registers an offense when indented 236s allows a one liner 236s 236s RuboCop::Cop::Lint::UselessRuby2Keywords 236s when `ruby2_keywords` is given a `def` node 236s registers an offense for a method with only keyword args 236s registers an offense for a method with only `kwrestarg` 236s registers an offense for a method with only positional args 236s registers an offense for a method with a `restarg` and `kwoptarg` 236s does not register an offense for a method with a `restarg` and no `kwrestarg` 236s registers an offense for a method without arguments 236s does not register an offense for a method with a `restarg` other positional args 236s registers an offense for a method with a `restarg` and `kwrestarg` 236s registers an offense for a method with a `restarg` and keyword args 236s does not register an offense for a method with a `restarg` and `blockarg` 236s does not register an offense for a method with a `restarg` other optional args 236s when `ruby2_keywords` is given a symbol 236s does not register an offense when the `def` is at a different depth 236s does not register an offense when there is no `def` 236s does not register an offense for an allowed def 236s registers an offense for an unnecessary `ruby2_keywords` 236s with a dynamically defined method 236s does not register an offense for an allowed `ruby2_keywords` 236s registers an offense for a numblock 236s registers an offense when the method has a `shadowarg` 236s does not register an offense when the method has a `restarg` and a `shadowarg` 236s registers an offense for an unnecessary `ruby2_keywords` 236s 236s RuboCop::YAMLDuplicationChecker 236s when yaml has duplicated keys in the second level 236s calls block with keys 236s calls block 236s when yaml has duplicated keys in the top level 236s calls block 236s calls block with keys 236s when yaml does not have any duplication 236s does not call block 236s 236s RuboCop::Server::CLI 236s when not using any server options and specifying `--server` in .rubocop file 236s returns exit status 0 and display an information message 236s when using exclusive `--restart-server` option 236s returns exit status 2 and display an error message 236s when using exclusive `--server-status` option 236s returns exit status 2 and display an error message 236s when using server option with `--cache-root path` option 236s returns exit status 0 and display an error message 236s when using `--server` option 236s returns exit status 0 and display an information message 236s when not using any server options and specifying `--server` in `RUBOCOP_OPTS` environment variable 236s returns exit status 0 and display an information message 236s when using multiple server options 236s returns exit status 2 and display an error message 236s when using `--start-server` option 237s returns exit status 0 and display an information message 237s when using `--stop-server` option 237s returns exit status 0 and display a warning message 237s when using `--server-status` option 237s returns exit status 0 and display an information message 237s when not using any server options 237s returns exit status 0 237s when using exclusive `--start-server` option 237s returns exit status 2 and display an error message 237s when using `--no-server` option 237s returns exit status 0 237s when using server option with `--cache-root=path` option 237s returns exit status 0 and display an information message 237s when using exclusive `--stop-server` option 237s returns exit status 2 and display an error message 237s when using `--restart-server` option 237s returns exit status 0 and display an information and a warning messages 237s 237s RuboCop::Cop::Lint::DeprecatedOpenSSLConstant 237s registers an offense with AES + blocksize constant and corrects 237s registers an offense with cipher constant and no arguments and corrects 237s registers an offense with cipher constant and two arguments and corrects 237s registers an offense with cipher constant and no arguments and corrects 237s registers an offense with cipher constant and no arguments and corrects 237s registers an offense with cipher constant and `cbc` argument and corrects 237s registers an offense with cipher constant and double quoted string argument and corrects 237s registers an offense when using an digest constant with chained methods and corrects 237s does not register an offense with cipher constant and argument is a variable 237s does not register an offense with cipher constant and send argument is a method 237s registers an offense when using ::Digest class methods on an algorithm constant and corrects 237s registers an offense with cipher constant and no arguments and corrects 237s registers an offense when building an instance using an digest constant and corrects 237s does not register an offense when using ::Digest class methods with an algorithm string and value 237s does not register an offense with cipher constant and argument is a constant 237s does not register an offense when using cipher with a string 237s registers an offense with cipher constant and one argument and corrects 237s registers an offense with AES + blocksize constant and mode argument and corrects 237s does not register an offense when building digest using an algorithm string and nested digest constants 237s does not register an offense when building digest using an algorithm string 237s when used in a block 237s registers an offense when using ::Digest class methods on an algorithm constant and corrects 237s 237s RuboCop::Cop::Style::EmptyLambdaParameter 237s accepts a keyword lambda 237s does not crash on a super 237s registers an offense for an empty block parameter with a lambda 237s 237s RuboCop::Cop::Style::InverseMethods 237s registers an offense for !(foo != bar) 237s registers an offense for !(foo == bar) 237s registers an offense for !(foo > bar) 237s allows a method call without a not 237s registers an offense for not (foo !~ bar) 237s registers an offense for !foo.include? 237s allows an inverse method with a block when double negation is used 237s registers an offense for !(foo !~ bar) 237s registers an offense for !foo.blank? 237s registers an offense for not (foo =~ bar) 237s allows an inverse method when double negation is used 237s registers an offense for not (foo != bar) 237s registers an offense for !foo.odd? 237s registers an offense for calling !.none? with a symbol proc 237s registers an offense for comparing snake case constants on the right 237s allows comparing camel case constants on the left 237s registers an offense for !foo.none? 237s registers an offense for not (foo == bar) 237s registers an offense for !(foo =~ bar) 237s registers an offense for !foo.any? 237s registers an offense for calling !.any? inside parens 237s allows comparing camel case constants on the right 237s registers an offense for calling !.none? with a block 237s registers an offense for !(foo < bar) 237s registers an offense for !foo.even? 237s registers an offense for not (foo > bar) 237s registers an offense for !foo.present? 237s registers an offense for not (foo < bar) 237s registers an offense for !foo.exclude? 237s registers an offense for comparing snake case constants on the left 237s allows an inverse method in a block with next 237s behaves like all variable types 237s registers an offense for calling !@@foo.none? 237s registers an offense for calling not @@foo.none? 237s behaves like all variable types 237s registers an offense for calling not foo.bar.none? 237s registers an offense for calling !foo.bar.none? 237s behaves like all variable types 237s registers an offense for calling not foo["bar"].none? 237s registers an offense for calling !foo["bar"].none? 237s behaves like all variable types 237s registers an offense for calling not FOO.none? 237s registers an offense for calling !FOO.none? 237s Ruby 2.7 237s registers an offense for calling !.none? with a numblock 237s behaves like all variable types 237s registers an offense for calling !FOO::BAR.none? 237s registers an offense for calling not FOO::BAR.none? 237s behaves like all variable types 237s registers an offense for calling !$foo.none? 237s registers an offense for calling not $foo.none? 237s behaves like all variable types 237s registers an offense for calling !@foo.none? 237s registers an offense for calling not @foo.none? 237s inverse blocks 237s corrects an inverted method call when using `BasicObject#!` 237s registers a single offense for nested inverse method calls 237s registers an offense for an inverted equality block 237s registers an offense for a multiline inverted equality block 237s corrects an inverted method call when using `BasicObject#!` 237s registers a single offense for nested inverse method calls 237s registers an offense for foo.select! { |e| !e } 237s corrects an inverted method call when using `BasicObject#!` 237s corrects an inverted method call 237s registers an offense for foo.select { |e| !e } 237s corrects a complex inverted method call 237s registers an offense for a multiline method call where the last method is inverted 237s registers an offense for a multiline method call where the last method is inverted 237s corrects an inverted do end method call 237s registers an offense for an inverted equality block 237s registers an offense for a multiline inverted equality block 237s registers an offense for an inverted equality block 237s corrects an inverted method call when using `BasicObject#!` with spaces before the method call 237s corrects an inverted method call when using `BasicObject#!` with spaces before the method call 237s registers an offense for a multiline inverted equality block 237s registers a single offense for nested inverse method calls 237s corrects an inverted do end method call 237s registers an offense for foo.reject! { |e| !e } 237s corrects a complex inverted method call 237s registers an offense for a multiline method call where the last method is inverted 237s registers an offense for a multiline inverted equality block 237s corrects an inverted do end method call 237s corrects a complex inverted method call 237s corrects a complex inverted method call 237s registers an offense for a multiline method call where the last method is inverted 237s corrects an inverted method call 237s registers a single offense for nested inverse method calls 237s corrects an inverted method call 237s corrects an inverted method call when using `BasicObject#!` with spaces before the method call 237s corrects an inverted method call 237s registers an offense for foo.reject { |e| !e } 237s registers an offense for an inverted equality block 237s corrects an inverted method call when using `BasicObject#!` 237s corrects an inverted do end method call 237s corrects an inverted method call when using `BasicObject#!` with spaces before the method call 237s behaves like all variable types 237s registers an offense for calling !foo.none? 237s registers an offense for calling not foo.none? 237s 237s RuboCop::Cop::Style::WordArray 237s when EnforcedStyle is percent 237s autocorrects an array of words in multiple lines 237s autocorrects an array of words and character constants 237s autocorrects an array of words 237s registers an offense for arrays of single quoted strings 237s does not register an offense for array containing non-string 237s uses %W when autocorrecting strings with embedded newlines and tabs 237s registers an offense for an array with comments outside of it 237s registers an offense for a %w() array containing spaces 237s detects right value of MinSize to use for --auto-gen-config 237s registers an offense for arrays of strings containing hyphens 237s does not register an offense on non-word strings 238s does not register an offense for array with empty strings 238s registers an offense in a non-ambiguous block context 238s registers an offense for arrays of double quoted strings 238s does not register an offense for array starting with %w 238s detects when the cop must be disabled to avoid offenses 238s keeps the line breaks in place after autocorrect 238s does not register an offense for a %w() array containing non word characters 238s registers an offense for arrays with character constants 238s autocorrects an array with one element 238s does not register an offense for an array with comments in it 238s corrects properly when there is an extra trailing comma 238s registers an offense for strings with newline and tab escapes 238s does not register an offense for array of non-words 238s autocorrects an array of words using partial newlines 238s doesn't fail in wacky ways when multiple cop instances are used 238s does not register offense for array with allowed number of strings 238s when the default external encoding is UTF-8 238s registers an offense for arrays of unicode word characters 238s when the default external encoding is US-ASCII 238s registers an offense for arrays of unicode word characters 238s when EnforcedStyle is array 238s does not register an offense for arrays of double quoted strings 238s registers an offense for a %w() array 238s does not register an offense for arrays of strings with spaces 238s autocorrects multiline %w() array 238s does not register an offense for arrays of strings with hyphens 238s autocorrects a %W() array which uses string interpolation 238s does not register an offense for arrays of single quoted strings 238s doesn't fail on strings which are not valid UTF-8 238s doesn't fail with `encoding: binary 238s registers an offense for an empty %w() array 238s autocorrects a %W() array which uses escapes 238s autocorrects a %W() array which uses string with hyphen 238s autocorrects a %w() array which uses single quotes 238s autocorrects a %w() array which uses string with hyphen 238s with a custom WordRegex configuration 238s registers an offense for arrays of email addresses 238s when the WordRegex configuration is not a Regexp 238s still parses the code without raising an error 238s with non-default MinSize 238s does not autocorrect arrays of one symbol if MinSize > 1 238s with a treacherous WordRegex configuration 238s doesn't break when words contain delimiters 238s doesn't break when words contain whitespace 238s when PreferredDelimiters is specified 238s autocorrects an array with delimiters 238s with a WordRegex configuration which accepts almost anything 238s uses %W when autocorrecting strings with non-printable chars 238s uses %w for strings which only appear to have an escape 238s 238s RuboCop::Cop::Gemspec::DependencyVersion 238s with `EnforcedStyle: forbidden` 238s using add_runtime_dependency 238s does not register an offense when adding runtime dependency by parenthesized call without version specification 238s registers an offense when adding runtime dependency by parenthesized call with tag specification 238s registers an offense when adding runtime dependency with version specification 238s does not register an offense when adding runtime dependency using git option by parenthesized call without version specification 238s registers an offense when adding runtime dependency with branch specification 238s registers an offense when adding runtime dependency by parenthesized call with branch specification 238s registers an offense when adding runtime dependency with tag specification 238s registers an offense when adding runtime dependency by parenthesized call with version specification 238s registers an offense when adding runtime dependency by parenthesized call with commit ref specification 238s registers an offense when adding runtime dependency with commit ref specification 238s does not register an offense when adding runtime dependency without version specification 238s does not register an offense when adding runtime dependency using git option without version specification 238s with `AllowedGems` 238s registers an offense when adding dependency by parenthesized call without version specification 238s registers an offense when adding dependency without version specification 238s using add_development_dependency 238s registers an offense when adding development dependency by parenthesized call with commit ref specification 238s does not register an offense when adding development dependency using git option without version specification 238s registers an offense when adding development dependency by parenthesized call with tag specification 238s does not register an offense when adding development dependency without version specification 238s does not register an offense when adding development dependency by parenthesized call without version specification 238s registers an offense when adding development dependency with version specification 238s registers an offense when adding development dependency by parenthesized call with branch specification 238s registers an offense when adding development dependency with branch specification 238s registers an offense when adding development dependency with tag specification 238s registers an offense when adding development dependency by parenthesized call with version specification 238s registers an offense when adding development dependency with commit ref specification 238s does not register an offense when adding development dependency using git option by parenthesized call without version specification 238s using add_dependency 238s registers an offense when adding dependency by parenthesized call with commit ref specification 238s does not register an offense when adding dependency without version specification 238s registers an offense when adding dependency with branch specification 238s does not register an offense when adding dependency using git option without version specification 238s registers an offense when adding dependency by parenthesized call with branch specification 238s registers an offense when adding dependency by parenthesized call with tag specification 238s does not register an offense when adding dependency by parenthesized call without version specification 238s registers an offense when adding dependency with commit ref specification 238s does not register an offense when adding dependency using git option by parenthesized call without version specification 238s registers an offense when adding dependency with tag specification 238s registers an offense when adding dependency with version specification 238s registers an offense when adding dependency by parenthesized call with version specification 238s with `EnforcedStyle: required` 238s using add_development_dependency 238s does not register an offense when adding development dependency by parenthesized call with commit ref specification 238s does not register an offense when adding development dependency with branch specification 238s does not register an offense when adding development dependency by parenthesized call with version specification 238s registers an offense when adding development dependency without version specification 238s does not register an offense when adding development dependency by parenthesized call with tag specification 238s registers an offense when adding development dependency by parenthesized call without version specification 238s registers an offense when adding development dependency using git option by parenthesized call without version specification 238s does not register an offense when adding development dependency with tag specification 238s does not register an offense when adding development dependency by parenthesized call with branch specification 238s registers an offense when adding development dependency using git option without version specification 238s does not register an offense when adding development dependency with version specification 238s does not register an offense when adding development dependency with commit ref specification 238s using add_dependency 238s does not register an offense when adding dependency by parenthesized call with tag specification 238s does not register an offense when adding dependency by parenthesized call with branch specification 238s does not register an offense when adding dependency with branch specification 238s registers an offense when adding dependency using git option by parenthesized call without version specification 238s does not register an offense when adding dependency with tag specification 238s registers an offense when adding dependency using git option without version specification 238s registers an offense when adding dependency without version specification 238s does not register an offense when adding dependency by parenthesized call with version specification 238s does not register an offense when adding dependency with version specification 238s does not register an offense when adding dependency by parenthesized call with commit ref specification 238s registers an offense when adding dependency by parenthesized call without version specification 238s does not register an offense when adding dependency with commit ref specification 238s using add_runtime_dependency 238s does not register an offense when adding runtime dependency with version specification 238s registers an offense when adding runtime dependency without version specification 238s registers an offense when adding runtime dependency by parenthesized call without version specification 238s registers an offense when adding runtime dependency using git option by parenthesized call without version specification 238s does not register an offense when adding runtime dependency by parenthesized call with branch specification 238s does not register an offense when adding runtime dependency by parenthesized call with tag specification 238s does not register an offense when adding runtime dependency with branch specification 238s does not register an offense when adding runtime dependency with tag specification 238s does not register an offense when adding runtime dependency by parenthesized call with version specification 238s registers an offense when adding runtime dependency using git option without version specification 238s does not register an offense when adding runtime dependency by parenthesized call with commit ref specification 238s does not register an offense when adding runtime dependency with commit ref specification 238s with `AllowedGems` 238s registers an offense when adding dependency by parenthesized call without version specification excepts allowed gems 238s registers an offense when adding dependency without version specification excepts allowed gems 238s 238s RuboCop::Cop::Layout::LeadingEmptyLines 238s accepts not having a blank line before a class 238s allows blank lines without any comments or code 238s accepts not having a blank line before code 238s registers an offense and corrects a new line before code 238s registers an offense and corrects a new line before a comment 238s allows an empty input 238s registers an offense and corrects multiple new lines before a class 238s accepts not having a blank line before a comment 238s registers an offense and corrects a new line before a class 238s autocorrect 238s in collaboration 238s does not invoke conflicts with other cops 238s 238s RuboCop::Ext::RegexpNode 238s #parsed_tree 238s with a regexp containing a multi-line interpolation 238s returns the expected blanked tree 238s with an extended mode regexp with comment 238s returns the expected tree 238s with a regexp containing interpolation 238s returns the expected blanked tree 238s with a regexp not containing interpolation 238s returns the expected tree 238s with a regexp with subexpressions 238s has location information 238s #each_capture 238s when called without argument 238s is expected to match [(be an instance of Regexp::Expression::Group::Capture), (be an instance of Regexp::Expression::Group::Named)] 238s when called with a `named: false` 238s is expected to match [(be an instance of Regexp::Expression::Group::Capture)] 238s when called with a `named: true` 238s is expected to match [(be an instance of Regexp::Expression::Group::Named)] 238s 238s RuboCop::Cop::Lint::StructNewOverride 238s registers an offense using `Struct.new(symbol, string)` 238s registers an offense using `Struct.new(...)` with an option argument 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(...symbols)` 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(string, ...symbols)` 238s does not register an offense with an override within a given block 238s registers an offense using `Struct.new(symbol)` 238s 238s RuboCop::Cop::Security::Open 238s accepts open with string that has a prefixed interpolation 238s registers an offense for `::URI.open` with string that starts with a pipe 238s registers an offense for open with dynamic string that is not prefixed 238s registers an offense for open with mode argument 238s registers an offense for `URI.open` with string that starts with a pipe 238s accepts open on a literal string 238s registers an offense for open 238s accepts File.open as method 238s registers an offense for open with a block 238s accepts open with a literal string starting with a pipe 238s registers an offense for `URI.open` with a block 238s registers an offense for open with string that starts with a pipe 238s accepts open with prefix string literal plus something 238s accepts open with a string that interpolates a literal 238s accepts open as variable 238s accepts open with no arguments 238s 238s RuboCop::Cop::Style::RegexpLiteral 238s when PercentLiteralDelimiters is configured with slashes 238s respects the configuration when autocorrecting 238s when `EnforcedStyle: omit_parentheses` of `Style/MethodCallWithArgsParentheses` cop 238s when using `%r` regexp with `EnforcedStyle: slashes` 238s does not register an offense when used as a method argument 238s does not register an offense when used as a safe navigation method argument 238s registers an offense when not used as a method argument 238s when using `%r` regexp with `EnforcedStyle: mixed` 238s registers an offense when not used as a method argument 238s does not register an offense when used as a safe navigation method argument 238s does not register an offense when used as a method argument 238s %r regex with other delimiters than curly braces 238s registers an offense 238s when PercentLiteralDelimiters is configured with brackets 238s respects the configuration when autocorrecting 238s when `EnforcedStyle: require_parentheses` of `Style/MethodCallWithArgsParentheses` cop 238s when using `%r` regexp with `EnforcedStyle: mixed` 238s registers an offense when using a regexp starts with a blank 238s does not register an offense when using a regexp starts with a blank as a method argument 238s registers an offense when not used as a method argument 238s registers an offense when used as a safe navigation method argument 238s does not register an offense when using a regexp starts with a blank as a safe navigation method argument 238s registers an offense when used as a method argument 238s when using `%r` regexp with `EnforcedStyle: slashes` 238s registers an offense when used as a safe navigation method argument 238s registers an offense when used as a method argument 238s does not register an offense when using a regexp starts with a blank as a safe navigation method argument 238s registers an offense when using a regexp starts with a blank 238s registers an offense when not used as a method argument 238s does not register an offense when using a regexp starts with a blank as a method argument 238s when EnforcedStyle is set to mixed 238s a single-line %r regex with slashes 238s is accepted 238s when configured to allow inner slashes 238s registers an offense 238s a multi-line %r regex with slashes 238s is accepted 238s a single-line %r regex without slashes 238s registers an offense 238s a single-line `//` regex without slashes 238s is accepted 238s a multi-line `//` regex with slashes 238s registers an offense 238s a multi-line `//` regex without slashes 238s registers an offense 238s a single-line `//` regex with slashes 238s registers an offense 238s when configured to allow inner slashes 238s is accepted 238s a multi-line %r regex without slashes 238s is accepted 238s when regex contains slashes in interpolation 238s ignores the slashes that do not belong // regex 238s when EnforcedStyle is set to slashes 238s a single-line `//` regex with slashes and interpolation 238s registers an offense 238s when configured to allow inner slashes 238s is accepted 238s a multi-line %r regex with slashes 238s is accepted 238s when configured to allow inner slashes 238s registers an offense 238s a single-line `%r//` regex with slashes 238s is accepted 238s when configured to allow inner slashes 238s preserves slashes after autocorrection 238s a single-line `//` regex with slashes 238s registers an offense 238s when configured to allow inner slashes 238s is accepted 238s a single-line `//` regex without slashes 238s is accepted 238s a single-line %r regex without slashes 238s registers an offense 238s a multi-line %r regex without slashes 238s registers an offense 238s a single-line %r regex with slashes 238s is accepted 238s when configured to allow inner slashes 238s registers an offense 238s a multi-line `//` regex without slashes 238s is accepted 238s a multi-line `//` regex with slashes 238s registers an offense 238s when configured to allow inner slashes 238s is accepted 238s when EnforcedStyle is set to percent_r 238s a multi-line %r regex without slashes 238s is accepted 238s a single-line `//` regex without slashes 238s registers an offense 238s a single-line %r regex without slashes 238s is accepted 238s a multi-line `//` regex with slashes 238s registers an offense 238s a single-line %r regex with slashes 238s is accepted 238s a single-line `//` regex with slashes 238s registers an offense 238s a multi-line `//` regex without slashes 238s registers an offense 238s a multi-line %r regex with slashes 238s is accepted 238s 238s RuboCop::Cop::Style::AsciiComments 238s registers an offense for a comment with non-ascii chars 238s registers an offense for comments with mixed chars 238s accepts comments with only ascii chars 238s when certain non-ascii chars are allowed 238s registers an offense for comments with non-allowed non-ascii chars 238s accepts comment with allowed non-ascii chars 238s 238s RuboCop::Cop::Style::NilLambda 238s block lambda 238s does not register an offense when not returning nil 238s does not register an offense when doing more than returning nil 238s registers an offense when returning nil with `break` 238s registers an offense when returning nil with `return` 238s properly corrects single line 238s does not remove block params or change spacing 238s registers an offense when returning nil implicitly 238s registers an offense when returning nil with `next` 238s Proc.new 238s registers an offense when returning nil with `next` 238s registers an offense when returning nil with `return` 238s does not register an offense when not returning nil 238s registers an offense when returning nil with `break` 238s does not remove block params or change spacing 238s does not register an offense when doing more than returning nil 238s registers an offense when returning nil implicitly 238s properly corrects single line 238s stabby lambda 238s does not register an offense when doing more than returning nil 238s registers an offense when returning nil implicitly 238s registers an offense when returning nil with `return` 238s registers an offense when returning nil with `next` 238s properly corrects multiline 238s registers an offense when returning nil with `break` 238s does not register an offense when not returning nil 238s proc 238s registers an offense when returning nil with `return` 238s registers an offense when returning nil with `next` 238s does not register an offense when doing more than returning nil 238s registers an offense when returning nil with `break` 238s does not register an offense when not returning nil 238s registers an offense when returning nil implicitly 238s does not remove block params or change spacing 238s properly corrects single line 238s 238s RuboCop::Cop::Naming::VariableNumber 238s when configured for normal 238s registers an offense for snake case numbering in symbol 238s does not register an offense for normal case numbering in symbol 238s registers an offense for snake case numbering in method parameter 238s registers an offense for snake case numbering in method camel case parameter 238s registers an offense for snake case numbering in a global variable name 238s registers an offense for snake case numbering in method name 238s behaves like accepts integer symbols 238s accepts integer symbol 238s accepts integer symbol array literal 238s behaves like accepts 238s accepts target_u2f_device in normalcase 238s behaves like offense 238s registers an offense for @myAttribute_1 in normalcase 238s behaves like offense 238s registers an offense for @@local_1 in normalcase 238s behaves like accepts 238s accepts _ in normalcase 238s behaves like accepts 238s accepts local_ in normalcase 238s behaves like accepts 238s accepts _1 in normalcase 238s behaves like offense 238s registers an offense for @local_1 in normalcase 238s behaves like accepts 238s accepts @foo in normalcase 238s behaves like offense 239s registers an offense for myAttribute_1 in normalcase 239s behaves like accepts 239s accepts user1_id in normalcase 239s behaves like accepts 239s accepts @__foo__ in normalcase 239s behaves like offense 239s registers an offense for _myLocal_1 in normalcase 239s behaves like accepts 239s accepts emparejó in normalcase 239s behaves like offense 239s registers an offense for sha_256 in normalcase 239s behaves like offense 239s registers an offense for local_1 in normalcase 239s behaves like accepts 239s accepts local1 in normalcase 239s behaves like offense_array 239s registers an offense for ["a_1", "a2"] in normalcase 239s behaves like accepts 239s accepts foo10_bar in normalcase 239s behaves like accepts 239s accepts user_1_id in normalcase 239s behaves like accepts 239s accepts snake_case in normalcase 239s behaves like offense 239s registers an offense for local_FOO_1 in normalcase 239s behaves like offense 239s registers an offense for localFOO_1 in normalcase 239s behaves like accepts 239s accepts localFOO1 in normalcase 239s behaves like accepts 239s accepts _foo in normalcase 239s behaves like accepts 239s accepts sha256 in normalcase 239s when configured for snake_case 239s registers an offense for normal case numbering in symbol 239s registers an offense for normal case numbering in method camel case parameter 239s registers an offense for normal case numbering in method parameter 239s registers an offense for normal case numbering in method name 239s registers an offense for normal case numbering in a global variable name 239s does not register an offense for snake case numbering in symbol 239s behaves like accepts 239s accepts _ in snake_case 239s behaves like offense 239s registers an offense for @@local1 in snake_case 239s behaves like accepts 239s accepts local_1 in snake_case 239s behaves like accepts 239s accepts a_1_b_1 in snake_case 239s behaves like accepts 239s accepts a_1_b in snake_case 239s behaves like offense 239s registers an offense for camelCase1 in snake_case 239s behaves like accepts 239s accepts @__foo__ in snake_case 239s behaves like accepts 239s accepts aB_1 in snake_case 239s behaves like offense 239s registers an offense for @local1 in snake_case 239s behaves like accepts 239s accepts local_12 in snake_case 239s behaves like offense 239s registers an offense for local1 in snake_case 239s behaves like accepts 239s accepts emparejó in snake_case 239s behaves like accepts 239s accepts _foo in snake_case 239s behaves like offense 239s registers an offense for aB1 in snake_case 239s behaves like accepts integer symbols 239s accepts integer symbol 239s accepts integer symbol array literal 239s behaves like offense_array 239s registers an offense for ["a1", "a_2"] in snake_case 239s behaves like offense 239s registers an offense for @camelCase1 in snake_case 239s behaves like accepts 239s accepts _1 in snake_case 239s behaves like accepts 239s accepts local_123 in snake_case 239s behaves like offense 239s registers an offense for _unused1 in snake_case 239s behaves like accepts 239s accepts local_ in snake_case 239s behaves like accepts 239s accepts @foo in snake_case 239s when configured for non integer 239s registers an offense for normal case numbering in symbol 239s registers an offense for snake case numbering in method parameter 239s registers an offense for snake case numbering in method name 239s registers an offense for normal case numbering in method name 239s registers an offense for snake case numbering in symbol 239s registers an offense for snake case numbering in method camel case parameter 239s registers an offense for normal case numbering in method camel case parameter 239s registers an offense for normal case numbering in method parameter 239s behaves like offense_array 239s registers an offense for ["a_1", "aone"] in non_integer 239s behaves like offense 239s registers an offense for @myAttribute1 in non_integer 239s behaves like offense 239s registers an offense for myAttribute_1 in non_integer 239s behaves like accepts 239s accepts _ in non_integer 239s behaves like offense 239s registers an offense for @local1 in non_integer 239s behaves like offense 239s registers an offense for local1 in non_integer 239s behaves like accepts 239s accepts @@foo in non_integer 239s behaves like accepts integer symbols 239s accepts integer symbol 239s accepts integer symbol array literal 239s behaves like accepts 239s accepts fooBar in non_integer 239s behaves like accepts 239s accepts localone in non_integer 239s behaves like offense 239s registers an offense for _myLocal1 in non_integer 239s behaves like offense 239s registers an offense for myAttribute1 in non_integer 239s behaves like accepts 239s accepts _foo in non_integer 239s behaves like offense 239s registers an offense for local_1 in non_integer 239s behaves like accepts 239s accepts local_one in non_integer 239s behaves like offense 239s registers an offense for @myAttribute_1 in non_integer 239s behaves like offense 239s registers an offense for @local_1 in non_integer 239s behaves like accepts 239s accepts emparejó in non_integer 239s behaves like accepts 239s accepts @__foo__ in non_integer 239s behaves like accepts 239s accepts local_ in non_integer 239s behaves like accepts 239s accepts _1 in non_integer 239s behaves like accepts 239s accepts @foo in non_integer 239s behaves like offense 239s registers an offense for _myLocal_1 in non_integer 239s when CheckMethodNames is false 239s does not register an offense for snake case numbering in method name 239s when CheckSymbols is false 239s does not register an offense for snake case numbering in symbol 239s when AllowedIdentifiers is set 239s does not register an offense for a method name that is allowed 239s does not register an offense for a instance variable name that is allowed 239s does not register an offense for a local variable name that is allowed 239s does not register an offense for a class variable name that is allowed 239s does not register an offense for a global variable name that is allowed 239s does not register an offense for a symbol that is allowed 239s when AllowedPatterns is set 239s does not register an offense for a method name that matches an allowed pattern 239s registers an offense for a symbol that does not match an allowed pattern 239s does not register an offense for a symbol that matches an allowed pattern 239s does not register an offense for a global variable name that matches an allowed pattern 239s registers an offense for a method name that does not match an allowed pattern 239s does not register an offense for a local variable name that matches an allowed pattern 239s does not register an offense for a class variable name that matches an allowed pattern 239s does not register an offense for a instance variable name that matches an allowed pattern 239s registers an offense for a local variable name that does not match an allowed pattern 239s registers an offense for a class variable name that does not match an allowed pattern 239s registers an offense for a instance variable name that does not match an allowed pattern 239s registers an offense for a global variable name that does not match an allowed pattern 239s 239s RuboCop::Cop::Style::FileWrite 239s registers an offense for and corrects the `File.open` with multiline write block (mode 'wb') with heredoc 239s registers an offense for and corrects the `File.open` with multiline write block (mode 'w') 239s registers an offense for and corrects `::File.open(filename, 'wb').write(content)` 239s registers an offense for and corrects the `File.open` with multiline write block (mode 'wt') 239s registers an offense for and corrects `File.open(filename, 'w+b').write(content)` 239s registers an offense for and corrects the `File.open` with multiline write block (mode 'w+') 239s registers an offense for and corrects `File.open(filename, 'w').write(content)` 239s registers an offense for and corrects the `File.open` with inline write block (mode 'w+b') 239s registers an offense for and corrects `File.open(filename, 'wb').write(content)` 239s registers an offense for and corrects the `File.open` with multiline write block (mode 'w') with heredoc 239s registers an offense for and corrects the `File.open` with multiline write block (mode 'w+b') 239s registers an offense for and corrects `::File.open(filename, 'w').write(content)` 239s registers an offense for and corrects the `File.open` with multiline write block (mode 'w+t') with heredoc 239s registers an offense for and corrects `File.open(filename, 'wt').write(content)` 239s registers an offense for and corrects `File.open(filename, 'w+').write(content)` 239s does not register an offense for the `File.open` with multiline write block when not writing to the block variable 239s registers an offense for and corrects the `File.open` with inline write block (mode 'w+') 239s registers an offense for and corrects the `File.open` with multiline write block (mode 'wt') with heredoc 239s registers an offense for and corrects `::File.open(filename, 'wt').write(content)` 239s registers an offense for and corrects `::File.open(filename, 'w+t').write(content)` 239s registers an offense for and corrects `::File.open(filename, 'w+b').write(content)` 239s registers an offense for and corrects the `File.open` with multiline write block (mode 'w+t') 239s registers an offense for and corrects the `File.open` with multiline write block (mode 'wb') 239s registers an offense for and corrects `File.open(filename, 'w+t').write(content)` 239s registers an offense for and corrects the `File.open` with inline write block (mode 'w+t') 239s registers an offense for and corrects the `File.open` with inline write block (mode 'wb') 239s does not register an offense when a splat argument is passed to `f.write` 239s registers an offense for and corrects the `File.open` with multiline write block (mode 'w+') with heredoc 239s registers an offense for and corrects `::File.open(filename, 'w+').write(content)` 239s registers an offense for and corrects the `File.open` with inline write block (mode 'w') 239s registers an offense for and corrects the `File.open` with multiline write block (mode 'w+b') with heredoc 239s registers an offense for and corrects the `File.open` with inline write block (mode 'wt') 239s 239s RuboCop::ConfigObsoletion::RenamedCop 239s #message 239s when the cop has been moved to a new department 239s is expected to start with "The `Style/MyCop` cop has been moved to `Layout/MyCop`" 239s when the cop has changed names but in the same department 239s is expected to start with "The `Style/MyCop` cop has been renamed to `Style/NewCop`" 239s when the cop has changed names but in a new department 239s is expected to start with "The `Style/MyCop` cop has been renamed to `Layout/NewCop`" 239s 239s RuboCop::Cop::Lint::EmptyInPattern 239s when a `in` body is present 239s accepts `case` with `in` bodies 239s accepts `case` with `in` ... `then` statements 239s accepts `case` with `in` bodies and `else` clause 239s accepts `case` with `in` ... `then` statements and else clause 239s when a `in` body is missing 239s registers an offense for missing `in` body followed by `else` 239s registers an offense for missing `in` ... then `body` followed by `else` 239s registers an offense for missing `in` body with a comment followed by `else` 239s registers an offense for a missing `in` body 239s registers an offense for missing `in` body with a comment 239s registers an offense for missing `in` ... `then` body 239s when `AllowComments: false` 239s registers an offense for empty `in` body with a comment 239s when `AllowComments: true` 239s accepts an empty `in` body with a comment 239s registers an offense for empty `in` when comment is in another branch 239s 239s RuboCop::Cop::Style::EmptyHeredoc 239s does not register an offense when using not empty heredoc 239s registers an offense when using empty `<= Ruby 2.7 239s with case match 239s registers an offense for misaligned else 239s accepts correctly aligned case/when/else 239s accepts correctly aligned empty else 239s accepts case match without else 239s with def/defs 239s accepts an empty def body 239s accepts an empty defs body 239s when modifier and def are on the same line 239s accepts a correctly aligned body 239s registers an offense for else not aligned with private 239s with begin/rescue/else/ensure/end 239s registers an offense for misaligned else 239s accepts a correctly aligned else 239s with def/rescue/else/ensure/end 239s registers an offense for misaligned else 239s accepts a correctly aligned else 239s with def/rescue/else/end 239s registers an offense for misaligned else 239s accepts a correctly aligned else 239s ensure/rescue/else in Block Argument 239s accepts a correctly aligned else 239s accepts a correctly aligned else with assignment 239s registers an offense for misaligned else 239s with unless 239s accepts a correctly aligned else in an otherwise empty unless 239s accepts an empty unless 239s registers an offense for misaligned else 239s with if statement 239s accepts a one line if statement 239s accepts an if/else branches with rescue clauses 239s accepts indentation after else when if is on new line after assignment 239s registers an offense for misaligned else 239s registers an offense for misaligned elsif 240s accepts a correctly aligned if/elsif/else/end 240s for a file with byte order mark 240s accepts a correctly aligned if/elsif/else/end 240s with assignment 240s when alignment style is variable 240s and end is aligned with variable 240s accepts an if/else with chaining with a block after the end 240s accepts an if-elsif-else with end aligned with setter 240s accepts an if-else with end aligned with setter 240s accepts an if/else with chaining after the end 240s accepts an if/else 240s accepts an if with end aligned with element assignment 240s and end is aligned with keyword 240s registers an offense for an if with element assignment 240s registers offenses for an if with setter 240s registers an offense for an if 240s when alignment style is keyword by choice 240s and end is aligned with keyword 240s accepts a while in assignment 240s accepts an if/else in assignment on next line 240s accepts an if/else in assignment 240s accepts an until in assignment 240s accepts an if in assignment 240s and end is aligned with variable 240s registers an offense for an if 240s 240s RuboCop::Cop::Severity 240s has a few required attributes 240s overrides #to_s 240s redefines == to compare severities 240s is frozen 240s #code 240s convention 240s is expected to eq "C" 240s info 240s is expected to eq "I" 240s warning 240s is expected to eq "W" 240s refactor 240s is expected to eq "R" 240s error 240s is expected to eq "E" 240s fatal 240s is expected to eq "F" 240s constructs from code 240s E 240s is expected to eq # 240s W 240s is expected to eq # 240s C 240s is expected to eq # 240s F 240s is expected to eq # 240s I 240s is expected to eq # 240s R 240s is expected to eq # 240s Comparable 240s error 240s is expected to be < fatal 240s convention 240s is expected to be < warning 240s info 240s is expected to be < refactor 240s refactor 240s is expected to be < convention 240s warning 240s is expected to be < error 240s #level 240s fatal 240s is expected to eq 6 240s error 240s is expected to eq 5 240s refactor 240s is expected to eq 2 240s warning 240s is expected to eq 4 240s convention 240s is expected to eq 3 240s info 240s is expected to eq 1 240s 240s RuboCop::Cop::Lint::NonLocalExitFromIterator 240s allows return with value 240s allows return in define_method 240s allows return in define_singleton_method 240s when block is lambda 240s allows 240s when the return is within a nested method definition 240s allows return in a class method definition 240s allows return in an instance method definition 240s when block is not followed by method chain 240s allows 240s when block is followed by method chain 240s and has no argument 240s allows 240s and has single argument 240s registers an offense 240s and has multiple arguments 240s registers an offense 240s when lambda is inside of block followed by method chain 240s allows 240s when block in middle of nest is followed by method chain 240s registers offenses 240s 240s RuboCop::Cop::Lint::Debugger 240s does not register an offense for a pry_remote in comments 240s does not register an offense for a remote_byebug method 240s does not register an offense for a pry_remote method 240s does not register an offense for a pry in comments 240s does not register an offense for a save_and_open_screenshot method 240s does not register an offense for a save_and_open_screenshot in comments 240s does not register an offense for a console method 240s does not register an offense for a irb in comments 240s does not register an offense for a save_and_open_page method 240s does not register an offense for a save_and_open_page in comments 240s does not register an offense for a debugger method 240s does not register an offense for a irb method 240s does not register an offense for a remote_pry in comments 240s does not register an offense for a binding method that is not disallowed 240s does not register an offense for a byebug in comments 240s does not register an offense for a pry method 240s does not register an offense for a byebug method 240s does not register an offense for a remote_pry method 240s does not register an offense for a console in comments 240s does not register an offense for a debugger in comments 240s does not register an offense for a remote_byebug in comments 240s RubyJard 240s registers an offense for a jard call 240s web console 240s registers an offense for a `binding.console` call 240s does not register an offense for `console` without a receiver 240s when a method group is disabled with false 240s does not register an offense for a Pry debugger call 240s does register an offense for another group 240s debug.rb 240s registers an offense for a `binding.break` with `Kernel` call 240s registers an offense for a `break` binding call 240s registers an offense for a `b` binding call 240s registers an offense for a `binding.b` with `Kernel` call 240s when a method group is disabled with nil 240s does register an offense for another group 240s does not register an offense for a Pry debugger call 240s built-in methods 240s registers an offense for a irb binding call 240s registers an offense for a binding.irb with Kernel call 240s rails 240s registers an offense for a debugger with ::Kernel call 240s registers an offense for a debugger with Kernel call 240s registers an offense for a debugger with an argument call 240s registers an offense for a debugger call 240s capybara 240s registers an offense for save_and_open_page 240s registers an offense for save_and_open_screenshot 240s with an argument 240s registers an offense for save_and_open_page 240s registers an offense for save_and_open_screenshot 240s with the DebuggerMethods configuration 240s does not register an offense for a byebug call 240s registers an offense for a `custom_debugger` call 240s with a method chain 240s registers an offense for a `debugger.foo.bar` call 240s nested custom configurations 240s registers an offense for a `custom_debugger call 240s with a const chain and a method chain 240s registers an offense for a `Foo::Bar::Baz.debug.this.code` call 240s with a const chain 240s registers an offense for a `Foo::Bar::Baz.debug` call 240s byebug 240s registers an offense for a Kernel.remote_byebug call 240s registers an offense for a byebug call 240s registers an offense for a remote_byebug call 240s registers an offense for a Kernel.byebug call 240s registers an offense for a byebug with an argument call 240s pry 240s does not register an offense for a `rescue` call without Pry 240s registers an offense for a binding.pry with Kernel call 240s does not register an offense for a `pry` call without binding 240s registers an offense for a remote_pry binding call 240s registers an offense for a pry_remote binding with an argument call 240s registers an offense for a pry_remote binding call 240s registers an offense for a pry binding with an argument call 240s registers an offense for a remote_pry binding with an argument call 240s registers an offense for a pry binding call 240s registers an offense for a Pry.rescue call 240s 240s RuboCop::Cop::Style::TrailingCommaInArguments 240s with multi-line list of values 240s when EnforcedStyleForMultiline is no_comma 240s accepts comma inside a modified heredoc parameter 240s accepts comma inside a heredoc parameter at the end 240s accepts comma inside a heredoc with comments inside 240s accepts comma inside a heredoc in brackets 240s registers an offense for trailing comma in a method call with hash parameters at the end 240s autocorrects unwanted comma after modified heredoc parameter 240s accepts comma inside a heredoc with method and comments inside 240s accepts a method call with hash parameters at the end and no trailing comma 240s when there is string interpolation inside heredoc parameter 240s accepts comma inside a heredoc parameter 240s accepts comma inside a heredoc parameter when on a single line 240s autocorrects unwanted comma inside string interpolation 240s when EnforcedStyleForMultiline is comma 240s does not break when a safe method call is chained on the offending simple one 240s accepts missing comma after heredoc with comments 240s does not break when a safe method call is chained on the offending more complex one 240s accepts trailing comma in a method call with hash parameters at the end 240s accepts a multiline call with a single argument and trailing comma 240s does not break when a method call is chained on the offending one 240s accepts no trailing comma in a method call with a multiline braceless hash at the end with more than one parameter on a line 240s accepts a trailing comma in a method call with single line hashes 240s accepts a method call with two parameters on the same line 240s accepts an empty hash being passed as a method argument 240s registers an offense for no trailing comma in a method call with hash parameters at the end 240s when closing bracket is on same line as last value 240s accepts a method call with Hash as last parameter split on multiple lines 240s when EnforcedStyleForMultiline is consistent_comma 240s accepts a trailing comma in a method call with single line hashes 240s accepts a trailing comma in a method call with a single hash parameter to a receiver object 240s autocorrects missing comma after a heredoc 240s registers an offense for no trailing comma in a method call with hash parameters at the end 240s accepts a multiline call with a single argument and trailing comma 240s accepts a multiline call with single argument on multiple lines 240s accepts a trailing comma in a method call with a single hash parameter 240s accepts no trailing comma in a method call with a block parameter at the end 240s accepts a multiline call with arguments on a single line and trailing comma 240s accepts trailing comma in a method call with hash parameters at the end 240s registers an offense for no trailing comma in a method call withtwo parameters on the same line 240s when closing bracket is on same line as last value 240s registers an offense for a method call, with a Hash as the last parameter, split on multiple lines 240s with a single argument spanning multiple lines 240s when EnforcedStyleForMultiline is consistent_comma 240s accepts a single argument with no trailing comma 240s with a single argument of anonymous function spanning multiple lines 240s when EnforcedStyleForMultiline is consistent_comma 240s accepts a single argument with no trailing comma 240s with single line list of values 240s when EnforcedStyleForMultiline is consistent_comma 240s registers an offense for trailing comma in a method call 240s accepts heredoc without trailing comma 240s accepts method call without parameters 240s accepts method call without trailing comma with single element hash parameters at the end 240s accepts method call without trailing comma 240s accepts chained single-line method calls 240s registers an offense for trailing comma in a method call with hash parameters at the end 240s accepts method call without trailing comma when a line break before a method call 240s registers an offense for trailing comma preceded by whitespace in a method call 240s when using safe navigation operator 240s registers an offense for trailing comma in a method call 240s registers an offense for trailing comma in a method call with hash parameters at the end 240s when EnforcedStyleForMultiline is no_comma 240s accepts heredoc without trailing comma 240s accepts method call without parameters 240s registers an offense for trailing comma in a method call 240s accepts method call without trailing comma 240s registers an offense for trailing comma in a method call with hash parameters at the end 240s accepts chained single-line method calls 240s accepts method call without trailing comma when a line break before a method call 240s registers an offense for trailing comma preceded by whitespace in a method call 240s accepts method call without trailing comma with single element hash parameters at the end 240s when using safe navigation operator 240s registers an offense for trailing comma in a method call 240s registers an offense for trailing comma in a method call with hash parameters at the end 240s when EnforcedStyleForMultiline is comma 240s accepts chained single-line method calls 240s accepts heredoc without trailing comma 240s accepts method call without trailing comma 240s registers an offense for trailing comma in a method call 240s accepts method call without trailing comma when a line break before a method call 240s registers an offense for trailing comma in a method call with hash parameters at the end 240s registers an offense for trailing comma preceded by whitespace in a method call 240s accepts method call without parameters 240s accepts method call without trailing comma with single element hash parameters at the end 240s when using safe navigation operator 240s registers an offense for trailing comma in a method call with hash parameters at the end 240s registers an offense for trailing comma in a method call 240s 240s RuboCop::Cop::Layout::MultilineOperationIndentation 240s when EnforcedStyle is aligned 240s registers an offense and corrects an unindented multiline operation that is the left operand in another operation 240s registers an offense and corrects misaligned string operand when plus is used 240s accepts aligned operands in assignment 240s accepts indented code on LHS of equality operator 240s accepts indented operands with ternary operators 240s registers an offense for misaligned operands in while condition 240s accepts two spaces indentation in assignment of local variable 240s registers an offense and corrects extra indentation of third line 240s accepts two spaces indentation of second line 240s accepts an expression where the first operand spans multiple lines 240s registers an offense and corrects misaligned operands in unless condition 240s accepts no extra indentation of third line 240s accepts two spaces indentation in assignment of array element 240s accepts indented operands inside block + assignment 240s accepts any indentation of parameters to #[] 240s registers an offense and corrects indented operands in if condition 240s accepts aligned or:ed operands in assignment 240s registers an offense and corrects no indentation of second line 240s registers an offense for misaligned operands in unless condition 240s accepts indented operands inside and outside a block 240s registers an offense and corrects one space indentation of second line 240s accepts indented operands in for body 240s accepts indented operands in an array 240s accepts indented operands in ordinary statement 240s registers an offense for misaligned operands in until condition 240s accepts alignment inside a grouped expression 240s accepts unary operations 240s registers an offense and corrects misaligned string operand when the first operand has backslash continuation 240s accepts aligned operands in if condition 240s registers an offense for misaligned operands in if condition 240s registers an offense and corrects indented operand in second argument 240s registers an offense and corrects unaligned operands in op-assignment 240s registers an offense and corrects emacs ruby-mode 1.1 indentation of an expression in an array 240s registers an offense and corrects indented second part of string 240s does not check method calls 240s registers an offense and corrects three space indentation of second line 240s when EnforcedStyle is indented 240s accepts indentation of return unless condition 240s accepts no extra indentation of third line 240s accepts indentation of assignment 240s registers an offense and corrects correct + unrecognized style 240s accepts indentation of next unless condition 240s accepts indented operands in unless body 240s registers an offense and corrects aligned operators in assignment 240s accepts normal indentation inside grouped expression 240s accepts indented operands in ordinary statement 240s accepts double indentation of while condition 240s accepts indented operands inside and outside a block 240s accepts normal indentation of method parameters 240s accepts the indentation of a broken string 240s registers an offense and corrects aligned operands in if conditions 240s accepts indented operands in an array 240s registers an offense and corrects an unindented multiline operation that is the left operand in another operation 240s registers an offense for a 2 space indentation of unless condition 240s accepts alignment inside a grouped expression 240s accepts double indentation of if condition 240s registers an offense and corrects extra indentation of third line 240s registers an offense and corrects emacs ruby-mode 1.1 indentation of an expression in an array 240s accepts special indentation of for expression 240s accepts an expression where the first operand spans multiple lines 240s accepts two spaces indentation in assignment of local variable 240s accepts indented operands in while body 240s accepts unary operations 240s registers an offense and corrects three space indentation of second line 240s registers an offense for a 2 space indentation of while condition 240s registers an offense and corrects no indentation of second line 240s registers an offense and corrects aligned code on LHS of equality operator 240s registers an offense for a 2 space indentation of until condition 240s accepts any indentation of parameters to #[] 240s registers an offense and corrects one space indentation of second line 240s registers an offense for a 2 space indentation of if condition 240s accepts indentation of return if condition 240s accepts double indentation of until condition 240s accepts indentation of next if condition 240s accepts indented operands in if body 240s registers an offense and corrects wrong indentation of for expression 240s does not check method calls 240s accepts indented operands in for body 240s accepts indented operands in until body 240s accepts any indentation of method parameters 240s accepts indented operands in if condition 240s accepts two spaces indentation in assignment of array element 240s accepts two spaces indentation of second line 240s accepts double indentation of unless condition 240s when indentation width is overridden for this cop 240s accepts indentation of if condition which is offset by a single normal indentation step 240s accepts indented operands in if body 240s accepts indented operands in if condition 240s registers an offense for a 4 space indentation of until condition 240s registers an offense for a 4 space indentation of unless condition 240s accepts indentation of while condition which is offset by a single normal indentation step 240s registers an offense for a 4 space indentation of while condition 240s accepts indented operands in unless body 240s registers an offense for a 4 space indentation of if condition 240s accepts indentation of until condition which is offset by a single normal indentation step 240s registers an offense and corrects 240s accepts indented operands in while body 240s accepts indented operands in until body 240s accepts indentation of unless condition which is offset by a single normal indentation step 240s 240s RuboCop::Cop::Lint::NonDeterministicRequireOrder 240s when requiring files 240s with sorted glob 240s does not register an offense 240s when Ruby 3.0 or higher 240s with direct block glob 240s does not register an offense 240s with require block passed as parameter 240s does not register an offense 240s with top-level ::Dir 240s does not register an offense 240s with `Dir.glob` 240s does not register an offense 240s with require block passed as parameter 240s does not register an offense 240s with `sort: false` keyword option 240s does not register an offense 240s with top-level ::Dir 240s does not register an offense 240s with `Dir[]` 240s does not register an offense 240s with extra logic 240s does not register an offense 240s with require block passed as parameter 240s does not register an offense 240s with top-level ::Dir 240s does not register an offense 240s when Ruby 2.7 or lower 240s with unsorted glob 240s registers an offense and autocorrects to add .sort 240s with require block passed as parameter 240s registers an offense an autocorrects to add sort 240s with top-level ::Dir 240s registers an offense and corrects to add .sort 240s with unsorted index 240s registers an offense and autocorrects to add .sort when the block has `require_relative` 240s registers an offense with extra logic 240s registers an offense and autocorrects to add .sort when the block has `require` 240s registers an offense and autocorrects to add .sort when the numblock has `require` 240s with top-level ::Dir 240s registers an offense and corrects to add .sort 240s with require_relative block passed as parameter 240s registers an offense an autocorrects to add sort 240s with require block passed as parameter 240s registers an offense an autocorrects to add sort 240s with direct block glob 240s registers an offense and autocorrects to add .sort.each 240s with require_relative block passed as parameter 241s registers an offense and autocorrects to add sort 241s with top-level ::Dir 241s registers an offense and corrects to add .sort.each 241s with require block passed as parameter 241s registers an offense and autocorrects to add sort 241s with sorted index 241s does not register an offense 241s when not requiring files 241s does not register an offense 241s 241s RuboCop::Cop::Style::StringLiteralsInInterpolation 241s when configured with a bad value 241s fails 241s configured with double quotes preferred 241s registers an offense for single quotes within embedded expression 241s registers an offense for single quotes within embedded expression in a heredoc string 241s configured with single quotes preferred 241s accepts double quotes on a static string 241s registers an offense for double quotes within embedded expression 241s accepts double quotes on a broken static string 241s accepts double quotes on static strings within a method 241s can handle a built-in constant parsed as string 241s can handle character literals 241s registers an offense for double quotes within embedded expression in a heredoc string 241s 241s RuboCop::Cop::Style::IdenticalConditionalBranches 241s on case without else 241s doesn't register an offense 241s on case with identical leading lines 241s registers and corrects an offense 241s on case..when with identical bodies and assigning to a variable used in `case` condition 241s doesn't register an offense 241s with a ternary 241s registers an offense 241s with empty brace 241s does not raise any error 241s on case with empty when 241s doesn't register an offense 241s when using pattern matching 241s on case-match with identical leading lines 241s registers and corrects an offense 241s on case-match without else 241s doesn't register an offense 241s on case-match with identical trailing lines 241s registers and corrects an offense 241s on case-match with identical bodies 241s registers an offense and corrects 241s on case..in with identical bodies and assigning to a variable used in `case` condition 241s doesn't register an offense 241s when one of the case-match branches is empty 241s does not register an offense 241s on case-match with empty when 241s doesn't register an offense 241s on if..else with identical bodies and assigning to a variable used in `if` condition 241s doesn't register an offense 241s on case with identical bodies 241s registers an offense and corrects 241s on case with identical trailing lines 241s registers and corrects an offense 241s when one of the case branches is empty 241s does not register an offense 241s on if..elsif with no else 241s doesn't register an offense 241s on if..else with identical trailing lines 241s registers and corrects an offense 241s on if..else with identical bodies 241s registers and corrects an offense 241s on if..else with slightly different trailing lines 241s doesn't register an offense 241s on if..else with identical leading lines 241s registers and corrects an offense 241s 241s RuboCop::Cop::Style::PerlBackrefs 241s autocorrects $LAST_PAREN_MATCH to Regexp.last_match(-1) 241s autocorrects $1 to ::Regexp.last_match(1) in namespace 241s autocorrects $9 to Regexp.last_match(9) 241s autocorrects $PREMATCH to Regexp.last_match.pre_match 241s autocorrects $+ to Regexp.last_match(-1) 241s autocorrects $` to Regexp.last_match.pre_match 241s autocorrects $& to Regexp.last_match(0) 241s autocorrects puts $1 to puts Regexp.last_match(1) 241s autocorrects $MATCH to Regexp.last_match(0) 241s autocorrects /#$1/ to /#{Regexp.last_match(1)}/ 241s autocorrects $POSTMATCH to Regexp.last_match.post_match 241s autocorrects "#$1" to "#{Regexp.last_match(1)}" 241s autocorrects `#$1` to `#{Regexp.last_match(1)}` 241s autocorrects $' to Regexp.last_match.post_match 241s 241s RuboCop::Cop::Lint::BigDecimalNew 241s registers an offense and corrects using `BigDecimal.new()` 241s registers an offense and corrects using `::BigDecimal.new()` 241s does not register an offense when using `BigDecimal()` 241s 241s RuboCop::Cop::InternalAffairs::UndefinedConfig 241s can handle an empty file 241s works with deeper nested cop names 241s registers an offense when the cop has no configuration at all 241s works when the base class is `Cop` instead of `Base` 241s registers an offense when the cop inherits `RuboCop::Cop::Base` 241s does not register an offense if using `cop_config` outside of a cop class 241s ignores `cop_config` in non-cop subclasses 241s ignores `cop_config` in non-cop classes 241s registers an offense when the cop inherits `Cop::Base` 241s does not register an offense for implicit configuration keys 241s registers an offense when the cop is not within the `RuboCop::Cop` namespace 241s registers an offense when the cop inherits `::RuboCop::Cop::Base` 241s fetch 241s does not register an offense for defined configuration keys 241s registers an offense for missing configuration keys 241s with a default value 241s does not register an offense for defined configuration keys 241s registers an offense for missing configuration keys 241s element lookup 241s registers an offense for missing configuration keys 241s does not register an offense for defined configuration keys 241s 241s RuboCop::Cop::Style::AndOr 241s when style is conditionals 241s registers an offense for "or" in post-until condition 241s registers an offense for "and" in until condition 241s accepts || outside of conditional 241s registers an offense for "and" in while condition 241s accepts "or" in post-while body 241s accepts "or" in if body 241s accepts "and" outside of conditional 241s registers an offense for "or" in until condition 241s accepts || inside of conditional 241s accepts "or" in while body 241s accepts && inside of conditional 241s accepts "or" outside of conditional 241s registers an offense for "and" in post-until condition 241s accepts && outside of conditional 241s registers an offense for "or" in if condition 241s accepts "or" in post-until body 241s registers an offense for "and" in if condition 241s accepts "and" in post-until body 241s registers an offense for "or" in post-while condition 241s registers an offense for "and" in post-while condition 241s registers an offense for "or" in while condition 241s accepts "and" in until body 241s accepts "and" in if body 241s accepts "and" in while body 241s accepts "or" in until body 241s accepts "and" in post-while body 241s when style is always 241s also warns on until (and) 241s autocorrects "or" with || and doesn't add extra parentheses 241s also warns on while (or) 241s autocorrects "or" with an assignment on the right 241s registers an offense for "and" 241s autocorrects "and" with an Enumerable accessor on either side 241s also warns on non short-circuit (and) (unless) 241s also warns on non short-circuit (or) (unless) 241s also warns on non short-circuit (or) 241s autocorrects "and" with && in method calls (3) 241s autocorrects "or" with || in method calls (4) 241s autocorrects "or" with || and adds parentheses to expr 241s autocorrects "and" with && and doesn't add extra parentheses 241s autocorrects "and" with && in method calls 241s autocorrects "or" with an assignment on the left 241s autocorrects "or" with || in method calls (3) 241s autocorrects "and" with && and adds parentheses to expr 241s autocorrects "or" inside def 241s autocorrects "or" with || in method calls 241s warns on short-circuit (and) 241s also warns on until (or) 241s autocorrects "and" with && in method calls (4) 241s also warns on non short-circuit (and) 241s autocorrects "and" with && in method calls (2) 241s also warns on while (and) 241s registers an offense for "or" 241s autocorrects "and" inside def 241s autocorrects "or" with || in method calls (2) 241s warns on short-circuit (or) 241s with obj.method = arg on left 241s autocorrects "and" with && and adds parens 241s with !obj.method arg on right 241s autocorrects "and" with && and adds parens 241s with !obj.method arg on left 241s autocorrects "and" with && and adds parens 241s with !variable on left 241s doesn't crash and burn 241s with two predicate methods with args without spaces on right 241s autocorrects "or" with || and adds parens 241s autocorrects "and" with && and adds parens 241s when `and` precedes `||` 241s registers an offense and corrects 241s when `or` precedes `&&` 241s registers an offense and corrects 241s with one predicate method without space on right and another method 241s autocorrects "or" with || and adds parens 241s autocorrects "and" with && and adds parens 241s when left hand side is a comparison method 241s autocorrects "and" with && and adds parens 241s when `or` precedes `and` 241s registers an offense and corrects 241s with `not` expression on left 241s autocorrects "and" with && and adds parens 241s with predicate method with arg without space on right 241s autocorrects "and" with && and adds parens 241s autocorrects "or" with || and adds parens 241s within a nested begin node with one child only 241s autocorrects "and" with && and adds parens 241s with `not` expression on right 241s autocorrects "and" with && and adds parens 241s with obj.method= arg on left 241s autocorrects "and" with && and adds parens 241s with a file which contains __FILE__ 241s autocorrects "or" with || 241s within a nested begin node 241s autocorrects "and" with && and adds parens 241s when `and` precedes `or` 241s registers an offense and corrects 241s 241s RuboCop::DirectiveComment 241s #disabled_all? 241s when enabled all cops 241s is expected to equal false 241s when enabled specific cops 241s is expected to equal false 241s when disabled specific cops 241s is expected to equal false 241s when disabled all cops 241s is expected to equal true 241s #match? 241s when cop names are same as in the comment 241s is expected to equal true 241s when cop names are same but have duplicated names 241s is expected to equal true 241s when disabled all cops 241s is expected to equal true 241s when cop names are same but in a different order 241s is expected to equal true 241s when cop names are superset of names 241s is expected to equal false 241s when cop names are subset of names 241s is expected to equal false 241s when there are no cop names 241s is expected to equal false 241s #overridden_by_department? 241s when cop is not overridden by it's department 241s is expected to equal false 241s when there are no departments 241s is expected to equal false 241s when there are no cops 241s is expected to equal false 241s when cop is overridden by it's department 241s is expected to equal true 241s #enabled_all? 241s when enabled specific cops 241s is expected to equal false 241s when enabled all cops 241s is expected to equal true 241s when disabled specific cops 241s is expected to equal false 241s when disabled all cops 241s is expected to equal false 241s #disabled? 241s when todo 241s is expected to equal true 241s when disable 241s is expected to equal true 241s when enable 241s is expected to equal false 241s #department_names 241s when all cops mentioned 241s is expected to eq [] 241s when couple departments specified 241s is expected to eq ["Foo", "Baz"] 241s when only department specified 241s is expected to eq ["Foo"] 241s when only cop specified 241s is expected to eq [] 241s when department and cops specified 241s is expected to eq ["Foo"] 241s #directive_count 241s when few cops used 241s is expected to eq 2 241s when cops and departments used 241s is expected to eq 4 241s when few department used 241s is expected to eq 3 241s #single_line? 241s when does NOT relate to single line 241s is expected to equal false 241s when relates to single line 241s is expected to equal true 241s #enabled? 241s when enable 241s is expected to equal true 241s when disable 241s is expected to equal false 241s when todo 241s is expected to equal false 241s .before_comment 241s when line has NO code 241s is expected to eq "" 241s when line has code 241s is expected to eq "def foo " 241s #line_number 241s returns line number for directive 241s #match_captures 241s when typo 241s is expected to be nil 241s when todo 241s is expected to eq ["todo", "all", nil, nil] 241s when enable 241s is expected to eq ["enable", "Foo/Bar", nil, "Foo/"] 241s when disable 241s is expected to eq ["disable", "all", nil, nil] 241s #all_cops? 241s when mentioned all 241s is expected to equal true 241s when mentioned specific cops 241s is expected to equal false 241s #in_directive_department? 241s when cop department disabled 241s is expected to equal true 241s when cop disabled 241s is expected to equal false 241s when another department disabled 241s is expected to equal false 241s #cop_names 241s when only department specified 241s is expected to eq ["Foo/Bar", "Foo/Baz"] 241s when all cops mentioned 241s is expected to eq ["all_names"] 241s when redundant directive cop department specified 241s is expected to eq ["Lint/One", "Lint/Two"] 241s when department and cops specified 241s is expected to eq ["Foo/Bar", "Foo/Baz", "Baz/Cop"] 241s when only cop specified 241s is expected to eq ["Foo/Bar"] 241s when couple departments specified 241s is expected to eq ["Foo/Bar", "Foo/Baz", "Baz/Bar"] 241s 241s RuboCop::Cop::Lint::EmptyClass 241s does not register an offense when class is not empty 241s does not register an offense when empty has a parent 241s registers an offense for empty class metaclass 241s registers an offense for empty class 241s registers an offense for empty object metaclass 241s registers an offense when empty metaclass contains only comments 241s does not register an offense when metaclass is not empty 241s when AllowComments is true 241s does not register an offense when empty metaclass contains only comments 241s does not register an offense when empty class contains only comments 241s 241s RuboCop::Cop::Layout::SpaceInsideStringInterpolation 241s when EnforcedStyle is space 241s accepts empty interpolation 241s for "no_space" style formatted string interpolations 241s registers offenses and autocorrects 241s for well-formatted string interpolations 241s does not register an offense for excess literal spacing 241s for ill-formatted string interpolations 241s registers offenses and autocorrects 241s when EnforcedStyle is no_space 241s does not touch spaces inside the interpolated expression 241s accepts empty interpolation 241s for ill-formatted string interpolations 241s finds interpolations in string-like contexts 241s registers offenses and autocorrects 241s for well-formatted string interpolations 241s accepts excess literal spacing 241s for "space" style formatted string interpolations 241s registers offenses and autocorrects 241s when interpolation starts or ends with a line break 241s ignores comments and whitespace when looking for line breaks 241s does not register an offense 241s 241s RuboCop::Cop::Metrics::ModuleLength 241s accepts empty modules 241s does not count blank lines 241s reports the correct beginning and end lines 241s rejects a module with more than 5 lines 241s accepts a module with 5 lines 241s accepts a module with less than 5 lines 241s when inspecting a class defined with Module.new 241s registers an offense 241s when `CountAsOne` is not empty 241s folds array into one line 241s when a module has inner modules 241s does not count lines of inner modules 241s rejects a module with 6 lines that belong to the module directly 241s when CountComments is enabled 241s also counts commented lines 241s when using numbered parameter 241s when inspecting a class defined with ::Module.new 241s registers an offense 241s when inspecting a class defined with Module.new 241s registers an offense 241s when inspecting a class defined with ::Module.new 241s registers an offense 241s when a module has inner classes 241s rejects a module with 6 lines that belong to the module directly 241s does not count lines of inner classes 241s 241s RuboCop::Cop::Layout::ExtraSpacing 241s when AllowForAlignment is true 241s accepts aligned values of an implicit hash literal 241s ignores whitespace at the beginning of the line 241s ignores trailing whitespace 241s registers an offense and corrects extra space before a float 241s registers an offense and corrects extra spacing in class inheritance 241s registers an offense and corrects extra spacing before a unary plus in an argument list 241s ignores whitespace inside a string 241s accepts space between key and value in a hash with hash rockets 241s registers an offense and corrects double extra spacing in variable assignment 241s registers an offense and corrects alignment with token not preceded by space 241s when spaces are present in a single-line hash literal 241s registers an offense and corrects hashes with symbol keys 241s registers an offense and corrects hashes with hash rockets 241s with extra spacing for alignment purposes 241s such as lining up assignments with empty lines and comments in between 241s allows it 241s such as lining up different kinds of assignments 241s allows it 241s such as aligning long assignment expressions that include line breaks 241s allows it 241s such as aligning with the same character 241s allows it 241s such as lining up assignments 241s allows it 241s such as aligning trailing comments 241s allows it 241s such as aligning tokens with empty line between 241s allows it 241s such as aligning comments on non-adjacent lines 241s allows it 241s such as aligning = on lines where there are trailing comments 241s allows it 241s when AllowBeforeTrailingComments is 241s true 241s allows it 241s doesn't interfere with AllowForAlignment 241s being false 241s such as aligning trailing comments 241s does not register an offense 241s such as lining up different kinds of assignments 241s registers offense(s) 241s such as aligning long assignment expressions that include line breaks 241s registers offense(s) 241s such as lining up assignments with empty lines and comments in between 241s registers offense(s) 241s such as aligning = on lines where there are trailing comments 241s registers offense(s) 241s such as aligning comments on non-adjacent lines 241s registers offense(s) 241s such as aligning tokens with empty line between 241s does not register an offense 241s such as lining up assignments 241s registers offense(s) 241s such as aligning with the same character 241s registers offense(s) 241s being true 241s such as aligning comments on non-adjacent lines 241s allows it 241s such as aligning long assignment expressions that include line breaks 241s allows it 241s such as aligning tokens with empty line between 241s allows it 241s such as lining up assignments with empty lines and comments in between 241s allows it 241s such as aligning trailing comments 241s allows it 241s such as lining up assignments 241s allows it 241s such as aligning with the same character 241s allows it 241s such as lining up different kinds of assignments 241s allows it 241s such as aligning = on lines where there are trailing comments 242s allows it 242s false 242s does not trigger on only one space before comment 242s regsiters offense 242s when AllowForAlignment is false 242s registers an offense and corrects double extra spacing in variable assignment 242s registers an offense and corrects extra spacing in class inheritance 242s registers an offense and corrects extra space before a float 242s accepts space between key and value in a hash with hash rockets 242s ignores whitespace inside a string 242s accepts aligned values of an implicit hash literal 242s registers an offense and corrects extra spacing before a unary plus in an argument list 242s ignores trailing whitespace 242s registers an offense and corrects alignment with token not preceded by space 242s ignores whitespace at the beginning of the line 242s with extra spacing for alignment purposes 242s such as lining up assignments with empty lines and comments in between 242s registers offense(s) 242s such as aligning long assignment expressions that include line breaks 242s registers offense(s) 242s such as aligning = on lines where there are trailing comments 242s registers offense(s) 242s such as aligning trailing comments 242s registers offense(s) 242s such as aligning comments on non-adjacent lines 242s registers offense(s) 242s such as aligning tokens with empty line between 242s registers offense(s) 242s such as lining up different kinds of assignments 242s registers offense(s) 242s such as lining up assignments 242s registers offense(s) 242s such as aligning with the same character 242s registers offense(s) 242s when spaces are present in a single-line hash literal 242s registers an offense and corrects hashes with hash rockets 242s registers an offense and corrects hashes with symbol keys 242s when ForceEqualSignAlignment is true 242s registers an offense and corrects consecutive assignments that are not aligned 242s register offenses and correct consecutive attribute assignments which are not aligned 242s does not register an offense when optarg equals is not aligned with assignment equals sign 242s registers an offense and corrects consecutive aref assignments which are not aligned 242s does not register an offense if assignments are aligned 242s does not register offenses for multiple complex nested assignments 242s aligns the first assignment with the following assignment 242s does not register alignment errors on outdented lines 242s does not register an offense if assignments are separated by blanks 242s register offenses and correct complex nested assignments 242s register offenses and correct consecutive operator assignments which are not aligned 242s 242s RuboCop::Cop::InternalAffairs::MethodNameEndWith 242s registers an offense if there is potentially usage of `assignment_method?` 242s registers offense if there is potentially usage of `bang_method?` 242s registers an offense if `method_name` is a variable and there is potentially usage of `assignment_method?` 242s registers offense if there is potentially usage of `bang_method?` with safe navigation operator 242s does not register offense if argument for end_with? is some other string 242s registers offense if there is potentially usage of `predicate_method?` 242s Ruby >= 2.7 242s does not register offense if argument for Symbol#end_with? is some other string 242s registers offense if argument for Symbol#end_with? is '!' with safe navigation operator 242s registers an offense if method_name is symbol 242s registers offense if argument for Symbol#end_with? is '?' with safe navigation operator 242s registers offense if argument for Symbol#end_with? is '!' 242s registers an offense if method_name is symbol with safe navigation operator 242s registers offense if argument for Symbol#end_with? is '?' 242s 242s RuboCop::Cop::Style::ConditionalAssignment 242s SingleLineConditionsOnly false 242s corrects assignment to an unless else condition 242s corrects assignment to a multiline if elsif else condition 242s corrects assignment to a multiline if else condition 242s corrects assignment to a case when else condition 242s corrects assignment to a case when else with multiple whens 242s corrects assignment to an if elsif else with multiple elsifs 242s behaves like multiline all variable types offense 242s assigning any variable type to an if else with multiline in one branch 242s assigning any variable type to a multiline case when 242s assigning any variable type to a multiline if elsif else 242s assigning any variable type to a multiline if else 242s assigning any variable type to a multiline unless else 242s behaves like multiline all assignment types offense 242s any assignment to a multiline if else 242s any assignment to a multiline unless else 242s any assignment to a multiline case when 242s behaves like multiline all assignment types offense 242s any assignment to a multiline if else 242s any assignment to a multiline case when 242s any assignment to a multiline unless else 242s behaves like multiline all assignment types offense 242s any assignment to a multiline unless else 242s any assignment to a multiline if else 242s any assignment to a multiline case when 242s behaves like multiline all assignment types offense 242s any assignment to a multiline case when 242s any assignment to a multiline unless else 242s any assignment to a multiline if else 242s behaves like multiline all assignment types offense 242s any assignment to a multiline if else 242s any assignment to a multiline unless else 242s any assignment to a multiline case when 242s behaves like multiline all variable types offense 242s assigning any variable type to an if else with multiline in one branch 242s assigning any variable type to a multiline if else 242s assigning any variable type to a multiline unless else 242s assigning any variable type to a multiline case when 242s assigning any variable type to a multiline if elsif else 242s behaves like multiline all assignment types offense 242s any assignment to a multiline if else 242s any assignment to a multiline unless else 242s any assignment to a multiline case when 242s behaves like multiline all variable types offense 242s assigning any variable type to a multiline case when 242s assigning any variable type to an if else with multiline in one branch 242s assigning any variable type to a multiline if elsif else 242s assigning any variable type to a multiline unless else 242s assigning any variable type to a multiline if else 242s behaves like all assignment types 242s registers an offense for any assignment to ternary 242s registers an offense for any assignment to unless else 242s registers an offense any assignment to case when 242s does not crash when used inside rescue 242s allows any assignment to if without else 242s registers an offense any assignment to if else 242s behaves like all assignment types 242s does not crash when used inside rescue 242s registers an offense for any assignment to ternary 242s allows any assignment to if without else 242s registers an offense any assignment to if else 242s registers an offense for any assignment to unless else 242s registers an offense any assignment to case when 242s behaves like multiline all assignment types offense 242s any assignment to a multiline if else 242s any assignment to a multiline unless else 242s any assignment to a multiline case when 242s behaves like all variable types 242s registers an offense assigning any variable type to unless else 242s registers an offense assigning any variable type to if elsif else 242s registers an offense assigning any variable type to ternary 242s allows assignment to if without else 242s does not crash for rescue assignment 242s registers an offense assigning any variable type to if elsewith multiple assignment 242s registers an offense assigning any variable type to if else 242s registers an offense for assigning any variable type to case when 242s >= Ruby 2.7 242s registers an offense for assigning any variable type to case in 242s behaves like multiline all variable types offense 242s assigning any variable type to a multiline unless else 242s assigning any variable type to a multiline case when 242s assigning any variable type to an if else with multiline in one branch 242s assigning any variable type to a multiline if else 242s assigning any variable type to a multiline if elsif else 242s behaves like multiline all assignment types offense 242s any assignment to a multiline case when 242s any assignment to a multiline if else 242s any assignment to a multiline unless else 242s behaves like all assignment types 242s registers an offense any assignment to case when 242s registers an offense any assignment to if else 242s allows any assignment to if without else 242s registers an offense for any assignment to unless else 242s registers an offense for any assignment to ternary 242s does not crash when used inside rescue 242s behaves like multiline all variable types offense 242s assigning any variable type to a multiline case when 242s assigning any variable type to a multiline unless else 242s assigning any variable type to a multiline if else 242s assigning any variable type to an if else with multiline in one branch 242s assigning any variable type to a multiline if elsif else 242s behaves like all assignment types 242s registers an offense for any assignment to ternary 242s allows any assignment to if without else 242s registers an offense any assignment to if else 242s does not crash when used inside rescue 242s registers an offense for any assignment to unless else 242s registers an offense any assignment to case when 242s behaves like all assignment types 242s registers an offense for any assignment to unless else 242s does not crash when used inside rescue 242s registers an offense any assignment to if else 242s allows any assignment to if without else 242s registers an offense for any assignment to ternary 242s registers an offense any assignment to case when 242s behaves like all variable types 242s registers an offense assigning any variable type to if elsif else 242s registers an offense assigning any variable type to unless else 242s registers an offense assigning any variable type to if elsewith multiple assignment 242s does not crash for rescue assignment 242s allows assignment to if without else 242s registers an offense for assigning any variable type to case when 242s registers an offense assigning any variable type to ternary 242s registers an offense assigning any variable type to if else 242s >= Ruby 2.7 242s registers an offense for assigning any variable type to case in 242s behaves like multiline all assignment types offense 242s any assignment to a multiline if else 242s any assignment to a multiline case when 242s any assignment to a multiline unless else 242s behaves like all variable types 242s does not crash for rescue assignment 242s registers an offense assigning any variable type to unless else 242s registers an offense assigning any variable type to if elsif else 242s registers an offense assigning any variable type to if elsewith multiple assignment 242s allows assignment to if without else 242s registers an offense assigning any variable type to if else 242s registers an offense assigning any variable type to ternary 242s registers an offense for assigning any variable type to case when 242s >= Ruby 2.7 242s registers an offense for assigning any variable type to case in 242s behaves like all assignment types 242s does not crash when used inside rescue 242s registers an offense for any assignment to unless else 242s registers an offense any assignment to case when 242s registers an offense for any assignment to ternary 242s registers an offense any assignment to if else 242s allows any assignment to if without else 242s behaves like multiline all assignment types offense 242s any assignment to a multiline if else 242s any assignment to a multiline case when 242s any assignment to a multiline unless else 242s behaves like all assignment types 242s registers an offense for any assignment to unless else 242s does not crash when used inside rescue 242s registers an offense any assignment to case when 242s registers an offense any assignment to if else 242s registers an offense for any assignment to ternary 242s allows any assignment to if without else 242s behaves like all assignment types 242s allows any assignment to if without else 242s registers an offense any assignment to if else 242s registers an offense for any assignment to ternary 242s does not crash when used inside rescue 242s registers an offense any assignment to case when 242s registers an offense for any assignment to unless else 242s behaves like multiline all assignment types offense 242s any assignment to a multiline unless else 242s any assignment to a multiline if else 242s any assignment to a multiline case when 242s behaves like multiline all assignment types offense 242s any assignment to a multiline unless else 242s any assignment to a multiline if else 242s any assignment to a multiline case when 242s behaves like all assignment types 242s registers an offense for any assignment to unless else 242s registers an offense any assignment to case when 242s registers an offense any assignment to if else 242s does not crash when used inside rescue 242s allows any assignment to if without else 242s registers an offense for any assignment to ternary 242s behaves like all assignment types 242s registers an offense any assignment to if else 242s allows any assignment to if without else 242s registers an offense for any assignment to unless else 242s registers an offense any assignment to case when 242s registers an offense for any assignment to ternary 242s does not crash when used inside rescue 242s behaves like all variable types 242s registers an offense assigning any variable type to if elsewith multiple assignment 242s registers an offense assigning any variable type to ternary 242s does not crash for rescue assignment 242s registers an offense assigning any variable type to if elsif else 242s registers an offense assigning any variable type to if else 242s registers an offense assigning any variable type to unless else 242s allows assignment to if without else 242s registers an offense for assigning any variable type to case when 242s >= Ruby 2.7 242s registers an offense for assigning any variable type to case in 242s behaves like all variable types 242s registers an offense assigning any variable type to if elsewith multiple assignment 242s registers an offense assigning any variable type to if else 242s does not crash for rescue assignment 242s registers an offense assigning any variable type to if elsif else 242s registers an offense assigning any variable type to ternary 242s registers an offense for assigning any variable type to case when 242s allows assignment to if without else 242s registers an offense assigning any variable type to unless else 242s >= Ruby 2.7 242s registers an offense for assigning any variable type to case in 242s behaves like multiline all variable types offense 242s assigning any variable type to a multiline case when 243s assigning any variable type to a multiline if elsif else 243s assigning any variable type to a multiline unless else 243s assigning any variable type to an if else with multiline in one branch 243s assigning any variable type to a multiline if else 243s behaves like all assignment types 243s does not crash when used inside rescue 243s registers an offense any assignment to case when 243s registers an offense for any assignment to unless else 243s allows any assignment to if without else 243s registers an offense for any assignment to ternary 243s registers an offense any assignment to if else 243s behaves like all assignment types 243s registers an offense for any assignment to ternary 243s registers an offense any assignment to if else 243s registers an offense any assignment to case when 243s does not crash when used inside rescue 243s allows any assignment to if without else 243s registers an offense for any assignment to unless else 243s behaves like all variable types 243s registers an offense assigning any variable type to if elsif else 243s registers an offense for assigning any variable type to case when 243s does not crash for rescue assignment 243s registers an offense assigning any variable type to if else 243s registers an offense assigning any variable type to ternary 243s registers an offense assigning any variable type to if elsewith multiple assignment 243s registers an offense assigning any variable type to unless else 243s allows assignment to if without else 243s >= Ruby 2.7 243s registers an offense for assigning any variable type to case in 243s behaves like multiline all assignment types offense 243s any assignment to a multiline if else 243s any assignment to a multiline unless else 243s any assignment to a multiline case when 243s behaves like multiline all assignment types offense 243s any assignment to a multiline case when 243s any assignment to a multiline unless else 243s any assignment to a multiline if else 243s behaves like multiline all variable types offense 243s assigning any variable type to a multiline case when 243s assigning any variable type to a multiline if elsif else 243s assigning any variable type to an if else with multiline in one branch 243s assigning any variable type to a multiline if else 243s assigning any variable type to a multiline unless else 243s behaves like multiline all assignment types offense 243s any assignment to a multiline case when 243s any assignment to a multiline unless else 243s any assignment to a multiline if else 243s behaves like all assignment types 243s registers an offense for any assignment to ternary 243s registers an offense any assignment to case when 243s registers an offense any assignment to if else 243s does not crash when used inside rescue 243s registers an offense for any assignment to unless else 243s allows any assignment to if without else 243s behaves like all variable types 243s registers an offense assigning any variable type to unless else 243s allows assignment to if without else 243s registers an offense for assigning any variable type to case when 243s registers an offense assigning any variable type to ternary 243s does not crash for rescue assignment 243s registers an offense assigning any variable type to if else 243s registers an offense assigning any variable type to if elsewith multiple assignment 243s registers an offense assigning any variable type to if elsif else 243s >= Ruby 2.7 243s registers an offense for assigning any variable type to case in 243s behaves like multiline all assignment types offense 243s any assignment to a multiline case when 243s any assignment to a multiline if else 243s any assignment to a multiline unless else 243s behaves like multiline all assignment types offense 243s any assignment to a multiline case when 243s any assignment to a multiline unless else 243s any assignment to a multiline if else 243s behaves like all assignment types 243s registers an offense any assignment to if else 243s registers an offense any assignment to case when 243s does not crash when used inside rescue 243s registers an offense for any assignment to ternary 243s allows any assignment to if without else 243s registers an offense for any assignment to unless else 243s behaves like all assignment types 243s allows any assignment to if without else 243s registers an offense any assignment to case when 243s registers an offense any assignment to if else 243s registers an offense for any assignment to unless else 243s does not crash when used inside rescue 243s registers an offense for any assignment to ternary 243s behaves like multiline all assignment types offense 243s any assignment to a multiline case when 243s any assignment to a multiline if else 243s any assignment to a multiline unless else 243s behaves like multiline all assignment types offense 243s any assignment to a multiline if else 243s any assignment to a multiline case when 243s any assignment to a multiline unless else 243s behaves like all assignment types 243s registers an offense for any assignment to unless else 243s allows any assignment to if without else 243s registers an offense for any assignment to ternary 243s does not crash when used inside rescue 243s registers an offense any assignment to if else 243s registers an offense any assignment to case when 243s behaves like all assignment types 243s registers an offense any assignment to case when 243s does not crash when used inside rescue 243s allows any assignment to if without else 243s registers an offense any assignment to if else 243s registers an offense for any assignment to unless else 243s registers an offense for any assignment to ternary 243s behaves like all assignment types 243s allows any assignment to if without else 243s registers an offense for any assignment to unless else 243s registers an offense any assignment to case when 243s registers an offense for any assignment to ternary 243s does not crash when used inside rescue 243s registers an offense any assignment to if else 243s behaves like all assignment types 243s registers an offense any assignment to if else 243s registers an offense for any assignment to ternary 243s does not crash when used inside rescue 243s registers an offense any assignment to case when 243s registers an offense for any assignment to unless else 243s allows any assignment to if without else 243s behaves like single line condition autocorrect 243s corrects assignment to an if else condition 243s corrects assignment to a case when else with multiple whens 243s corrects assignment to an if elsif else with multiple elsifs 243s corrects assignment to an unless else condition 243s corrects assignment to an if elsif else condition 243s corrects assignment to a ternary operator 243s corrects assignment to a case when else condition 243s SingleLineConditionsOnly true 243s registers an offense for assignment to case when then else 243s registers an offense for assignment using []= 243s corrects assignment to a namespaced constant 243s registers an offense for assignment to an if then else 243s allows a method call in the subject of a ternary operator 243s registers an offense for assignment using a method that ends with an equal sign 243s corrects assignment when without `else` branch 243s behaves like multiline all variable types allow 243s assigning any variable type to a multiline if elsif else 243s assigning any variable type to a multiline case when 243s assigning any variable type to an if else with multiline in one branch 243s assigning any variable type to a multiline unless else 243s assigning any variable type to a multiline if else 243s behaves like multiline all assignment types allow 243s any assignment to a multiline if else 243s any assignment to a multiline unless else 243s any assignment to a multiline case when 243s behaves like all assignment types 243s registers an offense for any assignment to unless else 243s registers an offense any assignment to if else 243s does not crash when used inside rescue 243s registers an offense for any assignment to ternary 243s allows any assignment to if without else 243s registers an offense any assignment to case when 243s behaves like all variable types 243s registers an offense assigning any variable type to if else 243s registers an offense assigning any variable type to unless else 243s registers an offense assigning any variable type to ternary 243s registers an offense assigning any variable type to if elsewith multiple assignment 243s does not crash for rescue assignment 243s registers an offense for assigning any variable type to case when 243s allows assignment to if without else 243s registers an offense assigning any variable type to if elsif else 243s >= Ruby 2.7 243s registers an offense for assigning any variable type to case in 243s behaves like multiline all assignment types allow 243s any assignment to a multiline if else 243s any assignment to a multiline unless else 243s any assignment to a multiline case when 243s behaves like multiline all assignment types allow 243s any assignment to a multiline if else 243s any assignment to a multiline unless else 243s any assignment to a multiline case when 243s behaves like all assignment types 243s registers an offense for any assignment to ternary 243s allows any assignment to if without else 243s registers an offense for any assignment to unless else 243s registers an offense any assignment to if else 243s registers an offense any assignment to case when 243s does not crash when used inside rescue 243s behaves like multiline all assignment types allow 243s any assignment to a multiline if else 243s any assignment to a multiline unless else 243s any assignment to a multiline case when 243s behaves like multiline all assignment types allow 243s any assignment to a multiline case when 243s any assignment to a multiline if else 243s any assignment to a multiline unless else 243s behaves like all assignment types 243s registers an offense for any assignment to unless else 243s registers an offense for any assignment to ternary 243s does not crash when used inside rescue 243s registers an offense any assignment to case when 243s registers an offense any assignment to if else 243s allows any assignment to if without else 243s behaves like all assignment types 243s registers an offense for any assignment to ternary 243s allows any assignment to if without else 243s registers an offense any assignment to case when 243s does not crash when used inside rescue 243s registers an offense for any assignment to unless else 243s registers an offense any assignment to if else 243s behaves like all assignment types 243s registers an offense any assignment to case when 243s registers an offense for any assignment to unless else 243s registers an offense for any assignment to ternary 243s registers an offense any assignment to if else 243s allows any assignment to if without else 243s does not crash when used inside rescue 243s behaves like multiline all assignment types allow 243s any assignment to a multiline unless else 243s any assignment to a multiline if else 243s any assignment to a multiline case when 243s behaves like all variable types 243s registers an offense assigning any variable type to if elsewith multiple assignment 243s allows assignment to if without else 243s registers an offense assigning any variable type to if else 243s registers an offense assigning any variable type to ternary 243s registers an offense assigning any variable type to if elsif else 243s registers an offense assigning any variable type to unless else 243s registers an offense for assigning any variable type to case when 243s does not crash for rescue assignment 243s >= Ruby 2.7 243s registers an offense for assigning any variable type to case in 243s behaves like all variable types 243s registers an offense for assigning any variable type to case when 243s registers an offense assigning any variable type to if else 243s registers an offense assigning any variable type to if elsif else 243s does not crash for rescue assignment 243s registers an offense assigning any variable type to ternary 243s registers an offense assigning any variable type to if elsewith multiple assignment 243s registers an offense assigning any variable type to unless else 243s allows assignment to if without else 243s >= Ruby 2.7 243s registers an offense for assigning any variable type to case in 243s for loop 243s ignores pseudo assignments in a for loop 243s behaves like all assignment types 243s registers an offense for any assignment to ternary 243s registers an offense any assignment to if else 243s registers an offense any assignment to case when 243s does not crash when used inside rescue 243s allows any assignment to if without else 243s registers an offense for any assignment to unless else 243s behaves like multiline all variable types allow 243s assigning any variable type to a multiline case when 243s assigning any variable type to an if else with multiline in one branch 243s assigning any variable type to a multiline if else 243s assigning any variable type to a multiline if elsif else 243s assigning any variable type to a multiline unless else 243s behaves like all assignment types 243s registers an offense for any assignment to ternary 243s registers an offense any assignment to case when 243s does not crash when used inside rescue 243s registers an offense for any assignment to unless else 243s allows any assignment to if without else 243s registers an offense any assignment to if else 243s behaves like multiline all assignment types allow 243s any assignment to a multiline case when 243s any assignment to a multiline if else 243s any assignment to a multiline unless else 243s behaves like multiline all assignment types allow 243s any assignment to a multiline if else 243s any assignment to a multiline case when 243s any assignment to a multiline unless else 243s behaves like multiline all assignment types allow 243s any assignment to a multiline case when 243s any assignment to a multiline if else 243s any assignment to a multiline unless else 243s behaves like multiline all variable types allow 243s assigning any variable type to a multiline if elsif else 243s assigning any variable type to a multiline case when 243s assigning any variable type to an if else with multiline in one branch 243s assigning any variable type to a multiline unless else 243s assigning any variable type to a multiline if else 243s behaves like all assignment types 243s registers an offense for any assignment to ternary 243s allows any assignment to if without else 243s registers an offense for any assignment to unless else 243s does not crash when used inside rescue 243s registers an offense any assignment to if else 243s registers an offense any assignment to case when 243s behaves like multiline all assignment types allow 243s any assignment to a multiline case when 243s any assignment to a multiline unless else 243s any assignment to a multiline if else 243s behaves like multiline all assignment types allow 243s any assignment to a multiline if else 243s any assignment to a multiline case when 243s any assignment to a multiline unless else 243s behaves like multiline all assignment types allow 243s any assignment to a multiline unless else 243s any assignment to a multiline if else 243s any assignment to a multiline case when 243s behaves like multiline all assignment types allow 244s any assignment to a multiline if else 244s any assignment to a multiline unless else 244s any assignment to a multiline case when 244s behaves like all assignment types 244s allows any assignment to if without else 244s does not crash when used inside rescue 244s registers an offense any assignment to if else 244s registers an offense for any assignment to ternary 244s registers an offense for any assignment to unless else 244s registers an offense any assignment to case when 244s behaves like multiline all assignment types allow 244s any assignment to a multiline unless else 244s any assignment to a multiline case when 244s any assignment to a multiline if else 244s behaves like all assignment types 244s allows any assignment to if without else 244s registers an offense for any assignment to ternary 244s registers an offense for any assignment to unless else 244s registers an offense any assignment to if else 244s does not crash when used inside rescue 244s registers an offense any assignment to case when 244s behaves like multiline all assignment types allow 244s any assignment to a multiline if else 244s any assignment to a multiline case when 244s any assignment to a multiline unless else 244s behaves like all assignment types 244s registers an offense any assignment to case when 244s registers an offense for any assignment to ternary 244s allows any assignment to if without else 244s does not crash when used inside rescue 244s registers an offense for any assignment to unless else 244s registers an offense any assignment to if else 244s behaves like multiline all assignment types allow 244s any assignment to a multiline if else 244s any assignment to a multiline unless else 244s any assignment to a multiline case when 244s behaves like all variable types 244s registers an offense assigning any variable type to if elsif else 244s does not crash for rescue assignment 244s allows assignment to if without else 244s registers an offense assigning any variable type to if else 244s registers an offense assigning any variable type to ternary 244s registers an offense assigning any variable type to if elsewith multiple assignment 244s registers an offense assigning any variable type to unless else 244s registers an offense for assigning any variable type to case when 244s >= Ruby 2.7 244s registers an offense for assigning any variable type to case in 244s behaves like all assignment types 244s registers an offense for any assignment to ternary 244s allows any assignment to if without else 244s registers an offense for any assignment to unless else 244s registers an offense any assignment to case when 244s does not crash when used inside rescue 244s registers an offense any assignment to if else 244s behaves like multiline all variable types allow 244s assigning any variable type to a multiline if elsif else 244s assigning any variable type to a multiline if else 244s assigning any variable type to an if else with multiline in one branch 244s assigning any variable type to a multiline case when 244s assigning any variable type to a multiline unless else 244s behaves like all variable types 244s registers an offense assigning any variable type to ternary 244s registers an offense assigning any variable type to if elsif else 244s allows assignment to if without else 244s registers an offense assigning any variable type to if else 244s registers an offense assigning any variable type to if elsewith multiple assignment 244s registers an offense assigning any variable type to unless else 244s registers an offense for assigning any variable type to case when 244s does not crash for rescue assignment 244s >= Ruby 2.7 244s registers an offense for assigning any variable type to case in 244s behaves like all assignment types 244s registers an offense for any assignment to unless else 244s registers an offense for any assignment to ternary 244s allows any assignment to if without else 244s registers an offense any assignment to if else 244s does not crash when used inside rescue 244s registers an offense any assignment to case when 244s behaves like multiline all variable types allow 244s assigning any variable type to a multiline if else 244s assigning any variable type to a multiline case when 244s assigning any variable type to a multiline unless else 244s assigning any variable type to a multiline if elsif else 244s assigning any variable type to an if else with multiline in one branch 244s behaves like all assignment types 244s registers an offense any assignment to case when 244s registers an offense for any assignment to unless else 244s registers an offense any assignment to if else 244s allows any assignment to if without else 244s registers an offense for any assignment to ternary 244s does not crash when used inside rescue 244s behaves like multiline all assignment types allow 244s any assignment to a multiline case when 244s any assignment to a multiline if else 244s any assignment to a multiline unless else 244s behaves like multiline all assignment types allow 244s any assignment to a multiline case when 244s any assignment to a multiline if else 244s any assignment to a multiline unless else 244s behaves like all variable types 244s registers an offense assigning any variable type to unless else 244s registers an offense assigning any variable type to if else 244s registers an offense for assigning any variable type to case when 244s does not crash for rescue assignment 244s registers an offense assigning any variable type to if elsewith multiple assignment 244s registers an offense assigning any variable type to ternary 244s allows assignment to if without else 244s registers an offense assigning any variable type to if elsif else 244s >= Ruby 2.7 244s registers an offense for assigning any variable type to case in 244s behaves like all assignment types 244s allows any assignment to if without else 244s registers an offense any assignment to if else 244s does not crash when used inside rescue 244s registers an offense for any assignment to ternary 244s registers an offense any assignment to case when 244s registers an offense for any assignment to unless else 244s behaves like multiline all variable types allow 244s assigning any variable type to a multiline case when 244s assigning any variable type to a multiline unless else 244s assigning any variable type to a multiline if elsif else 244s assigning any variable type to an if else with multiline in one branch 244s assigning any variable type to a multiline if else 244s behaves like all assignment types 244s allows any assignment to if without else 244s registers an offense for any assignment to unless else 244s does not crash when used inside rescue 244s registers an offense any assignment to if else 244s registers an offense any assignment to case when 244s registers an offense for any assignment to ternary 244s behaves like all assignment types 244s registers an offense for any assignment to ternary 244s registers an offense any assignment to if else 244s allows any assignment to if without else 244s does not crash when used inside rescue 244s registers an offense for any assignment to unless else 244s registers an offense any assignment to case when 244s behaves like single line condition autocorrect 244s corrects assignment to an if elsif else condition 244s corrects assignment to an unless else condition 244s corrects assignment to a case when else with multiple whens 244s corrects assignment to a case when else condition 244s corrects assignment to an if else condition 244s corrects assignment to an if elsif else with multiple elsifs 244s corrects assignment to a ternary operator 244s behaves like all assignment types 244s allows any assignment to if without else 244s registers an offense for any assignment to unless else 244s registers an offense any assignment to case when 244s registers an offense for any assignment to ternary 244s registers an offense any assignment to if else 244s does not crash when used inside rescue 244s behaves like all assignment types 244s registers an offense any assignment to if else 244s registers an offense any assignment to case when 244s registers an offense for any assignment to ternary 244s allows any assignment to if without else 244s does not crash when used inside rescue 244s registers an offense for any assignment to unless else 244s behaves like multiline all assignment types allow 244s any assignment to a multiline if else 244s any assignment to a multiline case when 244s any assignment to a multiline unless else 244s behaves like multiline all variable types allow 244s assigning any variable type to a multiline case when 244s assigning any variable type to a multiline if else 244s assigning any variable type to an if else with multiline in one branch 244s assigning any variable type to a multiline if elsif else 244s assigning any variable type to a multiline unless else 244s behaves like all variable types 244s registers an offense assigning any variable type to if elsewith multiple assignment 244s registers an offense assigning any variable type to if elsif else 244s allows assignment to if without else 244s registers an offense assigning any variable type to ternary 244s registers an offense for assigning any variable type to case when 244s registers an offense assigning any variable type to if else 244s registers an offense assigning any variable type to unless else 244s does not crash for rescue assignment 244s >= Ruby 2.7 244s registers an offense for assigning any variable type to case in 244s IncludeTernaryExpressions false 244s allows assigning any variable type to ternary 244s 244s RuboCop::Cop::Style::NegatedIfElseCondition 244s moves comments to correct branches during autocorrect 244s registers an offense and corrects when negating condition with `not` for ternary 244s correctly moves comments at the end of branches 244s does not register an offense when both branches are empty 244s registers an offense and corrects when negating condition with `!` for `if-else` 244s works with comments when neither branch is a begin node 244s works with duplicate nodes 244s does not register an offense when only part of the condition is negated 244s registers an offense and corrects a multiline ternary 244s works with comments when one branch is a begin and the other is not 244s does not register an offense when `if` with negated condition has no `else` branch 244s does not register an offense when the `else` branch is empty 244s registers an offense when using negated condition and `if` branch body is empty 244s registers an offense and corrects when negating condition with `not` for `if-else` 244s does not register an offense when `if` with `!!` condition 244s does not register an offense when negating condition for `if-elsif` 244s registers an offense and corrects nested `if-else` with negated condition 244s works with comments and multiple statements 244s behaves like negation method 244s registers an offense and corrects when negating condition with `!=` for `if-else` 244s registers an offense and corrects when negating condition with `!=` in parentheses for `if-else` 244s registers an offense and corrects when negating condition with `!=` for ternary 244s registers an offense and corrects when negating condition with `!=` in begin-end for ternary 244s registers an offense and corrects when negating condition with `!=` in begin-end for `if-else` 244s registers an offense and corrects when negating condition with `!=` in parentheses for ternary 244s behaves like negation method 244s registers an offense and corrects when negating condition with `!~` in parentheses for `if-else` 244s registers an offense and corrects when negating condition with `!~` in begin-end for ternary 244s registers an offense and corrects when negating condition with `!~` in parentheses for ternary 244s registers an offense and corrects when negating condition with `!~` for ternary 244s registers an offense and corrects when negating condition with `!~` for `if-else` 244s registers an offense and corrects when negating condition with `!~` in begin-end for `if-else` 244s 244s RuboCop::Cop::Lint::EmptyInterpolation 244s registers an offense and corrects #{} in interpolation 244s finds interpolations in string-like contexts 244s registers an offense and corrects #{ } in interpolation 244s accepts non-empty interpolation 244s 244s RuboCop::Cop::Lint::UnifiedInteger 244s when Integer 244s without any decorations 244s does not register an offense 244s with MyNamespace 244s does not register an offense 244s when explicitly specified as toplevel constant 244s does not register an offense 244s target ruby version < 2.4 244s when Fixnum 244s without any decorations 244s registers an offense and autocorrects 244s with MyNamespace 244s does not register an offense 244s when explicitly specified as toplevel constant 244s registers an offense 244s target ruby version >= 2.4 244s when Bignum 244s when explicitly specified as toplevel constant 244s registers an offense 244s without any decorations 244s registers an offense 244s with MyNamespace 244s does not register an offense 244s target ruby version < 2.4 244s when Bignum 244s when explicitly specified as toplevel constant 244s registers an offense 244s with MyNamespace 244s does not register an offense 244s without any decorations 244s registers an offense and autocorrects 244s target ruby version >= 2.4 244s when Fixnum 244s with MyNamespace 244s does not register an offense 244s when explicitly specified as toplevel constant 244s registers an offense 244s without any decorations 244s registers an offense 244s 244s RuboCop::Options 244s options precedence 244s .rubocop file 244s has lower precedence then command line options 244s has lower precedence then options from RUBOCOP_OPTS env variable 244s .rubocop directory 244s is ignored and command line options are used 244s RUBOCOP_OPTS environment variable 244s has lower precedence then command line options 244s has higher precedence then options from .rubocop file 244s option 244s incompatible cli options 244s rejects using -V with --show-cops 244s rejects using -v with --show-cops 244s mentions all incompatible options when more than two are used 244s rejects using -v with -V 244s --autocorrect 244s Specify --autocorrect and --autocorrect-all 244s emits a warning and sets some autocorrect options 244s Specify only --autocorrect 244s sets some autocorrect options 244s --cache-root 244s accepts a path as argument 244s fails if also `--cache false` is given 244s fails if no argument is given 244s --require 244s requires the passed path 244s --disable-uncorrectable 244s fails if given without an autocorrect argument 244s accepts together with a safe autocorrect argument 244s accepts together with an unsafe autocorrect argument 244s --cache 244s fails if no argument is given 244s accepts false as argument 244s accepts true as argument 244s fails if unrecognized argument is given 244s --raise-cop-error 244s raises cop errors 244s -h/--help 244s exits cleanly 244s shows help text 244s lists all builtin formatters 244s --parallel 244s combined with two incompatible arguments 244s ignores --parallel and lists both incompatible arguments 244s combined with an autocorrect argument 244s combined with --fix-layout 244s allows --parallel 244s combined with --autocorrect-all 244s allows --parallel 244s combined with --autocorrect 244s allows --parallel 244s combined with --auto-gen-config 244s ignores --parallel 244s combined with --fail-fast 244s ignores --parallel 244s combined with --cache false 244s ignores --parallel 244s --regenerate-todo 244s when todo options are overridden after --regenerate-todo 244s is expected to eq {:auto_gen_config=>true, :exclude_limit=>"50", :offense_counts=>false, :regenerate_todo=>true} 244s when todo options are overridden before --regenerate-todo 244s is expected to eq {:auto_gen_config=>true, :exclude_limit=>"50", :offense_counts=>false, :regenerate_todo=>true} 244s when disabled options are overridden to be enabled 245s is expected to eq {:auto_gen_config=>true, :exclude_limit=>"100", :offense_counts=>true, :regenerate_todo=>true} 245s when no other options are given 245s is expected to eq {:auto_gen_config=>true, :exclude_limit=>"100", :offense_counts=>false, :regenerate_todo=>true} 245s deprecated options 245s --auto-correct 245s emits a warning and sets the correct options instead 245s --safe-auto-correct 245s emits a warning and sets the correct options instead 245s --auto-correct-all 245s emits a warning and sets the correct options instead 245s --autocorrect-all 245s sets some autocorrect options 245s --exclude-limit 245s fails if given without --auto-gen-config 245s fails if given alone without argument 245s fails if given first without argument 245s fails if given last without argument 245s -s/--stdin 245s succeeds with exactly one path 245s fails if more than one path is given 245s fails if no paths are given 245s --no-parallel 245s disables parallel from file 245s --display-only-failed 245s fails if given without --format junit 245s works if given with --format junit 245s --display-only-fail-level-offenses 245s fails if given with an autocorrect argument 245s --fail-level 245s accepts severity initial letters 245s accepts the "fake" severities A/autocorrect 245s accepts full severity names 245s --auto-gen-config 245s accepts other options 245s --display-only-correctable 245s fails if given with an autocorrect argument 245s fails if given with --display-only-failed 245s --auto-gen-only-exclude 245s fails if given without --auto-gen-config 245s --fix-layout 245s sets some autocorrect options 245s 245s RuboCop::Cop::Layout::EmptyLinesAroundExceptionHandlingKeywords 245s accepts empty lines around begin body 245s registers an offense for rescue section starting with a blank 245s registers an offense for rescue section ending for method definition a blank 245s with complex method definition - registers many offenses 245s registers an offense for rescue section ending with a blank 245s accepts empty begin 245s accepts last `rescue` and `end` are on the same line 245s accepts `begin` and `rescue` are on the same line 245s accepts empty method definition 245s registers an offense for above rescue keyword with a blank 245s accepts no empty line 245s with complex begin-end - registers many offenses 245s accepts `rescue` and `end` are on the same line 245s accepts `def` and `rescue` are on the same line 245s 245s RuboCop::Cop::Lint::UnmodifiedReduceAccumulator 245s behaves like reduce/inject 245s does not affect inject called with no block args 245s does not affect inject called without a block 245s given a inject block 245s does not register an offense when comparing 245s does not register an offense when shovelling the accumulator 245s registers an offense when returning an index of the accumulator 245s does not register an offense when or-assigning the accumulator 245s does not register an offense when and-assigning the accumulator 245s does not register an offense when returning the accumulator in an expression 245s registers an offense when called with no argument 245s registers an offense for values returned with `next` 245s does not register an offense with the accumulator in heredoc 245s allows the element to be the return value if the accumulator is returned in any branch 245s registers an offense with the element in interpolation 245s does not register an offense when returning the accumulator 245s registers an offense for values returned with `break` 245s does not register an offense when assigning the accumulator 245s does not register an offense when returning a method called on the accumulator 245s registers an offense when returning an index setter on the accumulator 245s registers an offense when returning accumulator[element]= 245s registers an offense when returning an expression with the element 245s registers an offense when returning the element 245s does not register an offense with the accumulator in interpolation 245s registers an offense for every violating return value 245s does not register an offense when mutating the element with the accumulator 245s does not look inside inner blocks 245s does not register an offense when returning accumulator[element] 245s does not register an offense when op-assigning the accumulator 245s does not register an offense when mutating the element with the another value 245s does not register an offense when returning the accumulator in a boolean statement 245s registers an offense when mutating the accumulator with the element but not returning it 245s does not register an offense if the return value cannot be determined 245s registers an offense with the element in heredoc 245s does not register an offense when returning a literal 245s allows break with no value 245s does not register an offense when returning a method called with the accumulator 245s does not register an offense when calling a method on the accumulator with the element 245s argument count 245s ignores when there are not enough block arguments 245s registers an offense when there are more than two arguments but the element is returned 245s ignores when there is a splat argument 245s numblocks 245s registers an offense when returning the element 245s does not register an offense when when returning the accumulator 245s behaves like reduce/inject 245s does not affect reduce called without a block 245s does not affect reduce called with no block args 245s given a reduce block 245s does not register an offense when returning accumulator[element] 245s does not register an offense when returning the accumulator 245s does not look inside inner blocks 245s registers an offense with the element in heredoc 245s does not register an offense when comparing 245s registers an offense when returning the element 245s does not register an offense when or-assigning the accumulator 245s registers an offense with the element in interpolation 245s does not register an offense with the accumulator in interpolation 245s allows break with no value 245s does not register an offense when op-assigning the accumulator 245s does not register an offense when mutating the element with the another value 245s registers an offense for values returned with `next` 245s registers an offense when returning an index setter on the accumulator 245s does not register an offense when calling a method on the accumulator with the element 245s does not register an offense when mutating the element with the accumulator 245s does not register an offense when assigning the accumulator 245s does not register an offense when shovelling the accumulator 245s does not register an offense when returning the accumulator in an expression 245s registers an offense when mutating the accumulator with the element but not returning it 245s does not register an offense when and-assigning the accumulator 245s does not register an offense when returning a literal 245s registers an offense when called with no argument 245s registers an offense for every violating return value 245s registers an offense when returning accumulator[element]= 245s registers an offense when returning an index of the accumulator 245s allows the element to be the return value if the accumulator is returned in any branch 245s registers an offense when returning an expression with the element 245s does not register an offense when returning a method called on the accumulator 245s does not register an offense with the accumulator in heredoc 245s registers an offense for values returned with `break` 245s does not register an offense if the return value cannot be determined 245s does not register an offense when returning the accumulator in a boolean statement 245s does not register an offense when returning a method called with the accumulator 245s numblocks 245s registers an offense when returning the element 245s does not register an offense when when returning the accumulator 245s argument count 245s registers an offense when there are more than two arguments but the element is returned 245s ignores when there is a splat argument 245s ignores when there are not enough block arguments 245s 245s RuboCop::Cop::Offense 245s overrides #to_s 245s does not blow up if a message contains % 245s is frozen 245s redefines == to compare offenses based on their contents 245s has a few required attributes 245s #message 245s is frozen 245s offenses that span multiple lines 245s highlights the first line 245s #severity 245s is frozen 245s offenses that span part of a line 245s highlights the first line 245s #severity_level 245s when severity is :refactor 245s is 2 245s when severity is :info 245s is 1 245s when severity is :fatal 245s is 6 245s when unknown severity is passed 245s raises error 245s #<=> 245s when receiver has {:line=>6, :col=>4} and other has {:line=>5, :col=>5} 245s returns 1 245s when receiver has {:cop=>"B"} and other has {:cop=>"A"} 245s returns 1 245s when receiver has {:line=>6} and other has {:line=>5} 245s returns 1 245s when receiver has {:line=>5, :col=>6} and other has {:line=>5, :col=>5} 245s returns 1 245s when receiver has {:col=>6, :cop=>"A"} and other has {:col=>5, :cop=>"B"} 245s returns 1 245s when receiver has {:line=>6, :cop=>"A"} and other has {:line=>5, :cop=>"B"} 245s returns 1 245s when receiver has {} and other has {} 245s returns 0 245s when the location is pseudo 245s returns the last line 245s returns a source line 245s returns a column 245s returns a line 245s returns a column length 245s returns a real column 245s returns the last column 245s returns a location with valid size and length 245s returns a column range 245s returns the first line 245s #location 245s is frozen 245s #cop_name 245s is frozen 245s 245s RuboCop::Cop::Lint::ReturnInVoidContext 245s with an initialize method containing a return with a value 245s registers an offense 245s with a non initialize method containing a return 245s accepts 245s with a setter method containing a return without a value 245s accepts 245s with a class method called initialize containing a return 245s accepts 245s with an initialize method containing a return without a value 245s accepts 245s with a setter method containing a return with a value 245s registers an offense 245s when return is in top scope 245s accepts 245s 245s RuboCop::Cop::Style::RedundantFreeze 245s allows .freeze on method call 245s behaves like immutable objects 245s registers an offense for frozen 1 245s behaves like mutable objects 245s allows ('a' + 'b') with freeze 245s behaves like mutable objects 245s allows ([42] * 42) with freeze 245s behaves like mutable objects 245s allows [1, 2, 3] with freeze 245s behaves like immutable objects 245s registers an offense for frozen (2 > 1) 245s behaves like immutable objects 245s registers an offense for frozen :"" 245s behaves like immutable objects 245s registers an offense for frozen (a > b) 245s behaves like mutable objects 245s allows "top#{1 + 2}" with freeze 245s behaves like mutable objects 245s allows 'str' with freeze 245s behaves like immutable objects 245s registers an offense for frozen :sym 245s behaves like immutable objects 245s registers an offense for frozen ('a' > 'b') 245s behaves like immutable objects 245s registers an offense for frozen (1 + 2) 245s when the receiver is a string literal 245s Ruby 3.0 or higher 245s when the frozen string literal comment is true 245s behaves like mutable objects 245s allows "#{a}" with freeze 245s when the frozen string literal comment is missing 245s behaves like mutable objects 245s allows "#{a}" with freeze 245s when the frozen string literal comment is false 245s behaves like mutable objects 245s allows "#{a}" with freeze 245s Regexp and Range literals 245s Ruby 3.0 or higher 245s behaves like immutable objects 245s registers an offense for frozen (1...5) 245s behaves like immutable objects 245s registers an offense for frozen (1..5) 245s behaves like immutable objects 245s registers an offense for frozen /./ 245s Ruby 2.7 or lower 245s behaves like mutable objects 245s allows (1..5) with freeze 245s behaves like mutable objects 245s allows /./ with freeze 245s behaves like mutable objects 245s allows (1...5) with freeze 245s Ruby 2.7 or lower 245s when the frozen string literal comment is true 245s behaves like immutable objects 245s registers an offense for frozen "#{a}" 245s when the frozen string literal comment is false 245s behaves like mutable objects 245s allows "#{a}" with freeze 245s when the frozen string literal comment is missing 245s behaves like mutable objects 245s allows "#{a}" with freeze 245s behaves like immutable objects 245s registers an offense for frozen 1.5 245s behaves like mutable objects 245s allows { a: 1, b: 2 } with freeze 245s behaves like mutable objects 245s allows ENV['foo'] with freeze 245s behaves like mutable objects 245s allows ('a' * 20) with freeze 245s behaves like immutable objects 245s registers an offense for frozen [1, 2, 3].size 245s behaves like mutable objects 245s allows (a + b) with freeze 245s behaves like mutable objects 245s allows ::ENV['foo'] with freeze 245s behaves like immutable objects 245s registers an offense for frozen 'foo'.count 245s 245s RuboCop::Cop::InternalAffairs::RedundantMessageArgument 245s does not register an offense when formatted `MSG` is passed 245s does not register an offense when `#message` with another node is passed 245s when `MSG` is passed 245s registers an offense 245s when `#message` is passed 245s registers an offense 245s when `#message` with offending node is passed 245s when message is the only keyword argument 245s registers an offense 245s when there are others keyword arguments 245s registers an offense 245s 245s RuboCop::Cop::Lint::EmptyBlock 245s does not register an offense for empty block with inner comments 245s registers an offense for an empty block given to a non-Kernel `proc` method 245s does not register an offense for empty block with inline comments 245s does not register an offense on an empty proc 245s does not register an offense on an empty ::Proc.new 245s does not register an offense on an empty Proc.new 245s does not register an offense on an empty lambda 245s does not register an offense on an empty stabby lambda 245s does not register an offense when block is not empty 245s registers an offense for empty block within method call 245s when AllowComments is false 245s registers an offense for empty block with inline comments 245s registers an offense for empty block with inner comments 245s when AllowEmptyLambdas is false 245s registers an offense on an empty Proc.new 245s registers an offense for an empty lambda 245s registers an offense on an empty ::Proc.new 245s registers an offense on an empty proc 245s registers an offense for an empty stabby lambda 245s 245s RuboCop::Cop::Style::HashEachMethods 245s when node matches a keys#each or values#each 245s when `AllowedReceivers: ['execute']` 245s registers an offense when receiver is not allowed name 245s does not register an offense when receiver is `execute` method 245s does not register an offense when receiver is `execute` variable 245s does not register an offense when receiver is `execute` method with a symbol proc argument 245s when receiver is a send 245s registers offense, autocorrects foo#keys.each to foo#each_key with a symbol proc argument 245s registers offense, autocorrects foo#values.each to foo#each_value 245s does not register an offense for foo#each_key 245s registers offense, autocorrects foo#values.each to foo#each_value with a symbol proc argument 245s does not register an offense for Hash#each_value 245s registers offense, autocorrects foo#keys.each to foo#each_key 245s Ruby 2.7 245s registers offense, autocorrects foo#keys.each to foo#each_key with numblock 245s when receiver is implicit 245s does not register an offense for `keys.each` 245s does not register an offense for each_value 245s does not register an offense for each_key 245s does not register an offense for `values.each` with a symbol proc argument 245s does not register an offense for `keys.each` with a symbol proc argument 245s does not register an offense for `values.each` 245s when receiver is a hash literal 245s registers offense, autocorrects {}#keys.each with {}#each_key 245s registers offense, autocorrects {}#values.each with {}#each_value 245s registers offense, autocorrects {}#values.each to {}#each_value with a symbol proc argument 245s does not register an offense for {}#each_value 245s does not register an offense for {}#each_key 245s registers offense, autocorrects {}#keys.each to {}#each_key with a symbol proc argument 245s 245s RuboCop::Cop::Style::WhileUntilDo 245s registers an offense for do in multiline until 245s accepts do in single-line until 245s accepts do in single-line while 245s registers an offense for do in multiline while 245s accepts multi-line while without do 245s accepts multi-line until without do 245s 245s RuboCop::Cop::Lint::UselessAssignment 245s when a unreferenced variable is reassigned on the right side of && and referenced after the && 245s accepts 245s when a variable is not used and the name starts with _ 245s accepts 245s when a setter is invoked with operator assignment in loop body 245s accepts 245s when a variable is assigned at the end of rescue and would be referenced with retry 245s accepts 245s when a variable is assigned with ||= before the last expression of the scope 245s registers an offense 245s when a variable is assigned and assigned again in a modifier condition 245s accepts without parentheses 245s accepts with parentheses 245s when there's an unreferenced assignment in top level if branch while the variable is referenced in the paired else branch 245s registers an offense for the assignment in the if branch 245s when a variable is reassigned at the end of loop body and would be referenced in loop condition 245s accepts 245s when a variable is assigned with operator assignment in rescue and would be referenced with retry 245s accepts 245s when a rescued error variable is wrongly tried to be referenced in another rescue body 245s registers an offense 245s when a variable is assigned in main body of begin, rescue and else then referenced after the begin 245s accepts 245s when a block local variable is assigned and unreferenced 245s registers offenses for the assignment 245s when a variable is reassigned with multiple assignment while referencing itself in rhs and referenced 245s accepts 245s when a variable is assigned with multiple assignment and unreferenced 245s registers an offense 245s when an anonymous keyword splat method argument is defined 245s accepts 245s when a variable is assigned in each branch of if and referenced in the else branch 245s registers an offense for the assignment in the if branch 245s when there is only one AST node and it is unused variable 245s registers an offense 245s when a variable is assigned and unreferenced in a class subclassing another class stored in local variable 245s registers an offense 245s inside a `case-match` node 245s does not register an offense when the variable is used 245s when a variable is assigned and unreferenced in a class 245s registers an offense 245s when a variable is assigned and unreferenced in a method 245s registers an offense 245s when a unreferenced variable is reassigned on the left side of && and referenced after the && 245s registers an offense for the unreferenced assignment 245s when a keyword splat method argument is used 245s accepts 245s when a block method argument is not used 245s accepts 245s when a referenced variable is reassigned in a block 246s accepts 246s when a local variable is unreferenced and zero arity super is called 246s registers an offense 246s when a variable is assigned multiple times but unreferenced 246s registers offenses for each assignment 246s when a variable is assigned and passed to a method followed by method taking block 246s accepts 246s when a method argument is reassigned and zero arity super is called 246s accepts 246s when an assignment in a if branch is referenced in another if branch 246s accepts 246s when a variable is assigned and referenced when defining a module 246s does not register an offense 246s when a variable is assigned in loop body and referenced in post until condition 246s accepts 246s when a variable is reassigned while referencing itself in rhs and referenced 246s accepts 246s when a variable is referenced in rhs of named capture expression 246s accepts 246s when a variable is reassigned and unreferenced in a if branch while the variable is referenced in the paired else branch 246s registers an offense for the reassignment in the if branch 246s when an unreferenced variable is reassigned in a block 246s accepts 246s when a variable is reassigned with binary operator assignment while assigning to itself in rhs then referenced 246s registers an offense for the assignment in rhs 246s when a splat method argument is not used 246s accepts 246s when a variable is assigned and unreferenced in a module 246s registers an offense 246s when a variable is assigned with ||= at the last expression of the scope 246s registers an offense 246s when a variable that has same name as outer scope variable is not referenced in a method defined in loop 246s registers an offense 246s when a variable is reassigned multiple times in main body of begin then referenced in ensure 246s accepts 246s when a block local variable is declared but not assigned 246s accepts 246s when a variable is assigned in main body of begin, rescue and else and reassigned in ensure then referenced after the begin 246s registers offenses for each assignment before ensure 246s when a variable is assigned while being passed to a method taking block 246s and the variable is not used 246s registers an offense 246s and the variable is used 246s accepts 246s when there's an unreferenced reassignment in a if branch while the variable is referenced in the paired elsif branch 246s registers an offense for the reassignment in the if branch 246s when a variable is reassigned with logical operator assignment and referenced 246s accepts 246s when a variable is reassigned multiple times in main body of begin then referenced in rescue 246s accepts 246s when there's an unreferenced reassignment in a if branch while the variable is referenced in a case branch in the paired else branch 246s registers an offense for the reassignment in the if branch 246s when a keyword splat method argument is not used 246s accepts 246s when a variable is assigned and unreferenced in a singleton class 246s registers an offense 246s when an unreferenced variable is reassigned and re-referenced 246s registers an offense for the unreferenced assignment 246s when a variable is reassigned multiple times in rescue and referenced after the begin 246s registers an offense 246s when an optional method argument is not used 246s accepts 246s when a variable is reassigned with binary operator assignment and referenced 246s accepts 246s when a variable is assigned in each branch of if and referenced after the branching 246s accepts 246s when a variable is assigned in main body of begin with rescue but unreferenced 246s registers an offense 246s when a referenced variable is reassigned but not re-referenced 246s registers an offense for the non-re-referenced assignment 246s when a named capture is unreferenced in top level 246s registers an offense 246s when a referenced variable is reassigned but not re-referenced in a method defined in loop 246s registers an offense 246s when a variable is reassigned in single branch if and referenced after the branching 246s accepts 246s when a variable is reassigned in a loop 246s while loop 246s accepts 246s post until loop 246s accepts 246s for loop 246s accepts 246s post while loop 246s accepts 246s until loop 246s accepts 246s when a variable is assigned in branch of modifier if that references the variable in its conditional clauseand unreferenced 246s registers an offense 246s when a variable is reassigned multiple times in ensure with rescue then referenced after the begin 246s registers an offense 246s when a variable is assigned with operator assignment in top level 246s registers an offense 246s when a variable is reassigned at the end of loop body and would be referenced in next iteration 246s accepts 246s when a named capture is unreferenced in other than top level 246s registers an offense 246s when a variable is reassigned in single branch if and referenced in the branch 246s registers an offense for the unreferenced assignment 246s when a variable is assigned in branch of modifier if that references the variable in its conditional clauseand referenced after the branching 246s accepts 246s when a method argument is reassigned but not passed to super 246s registers an offense 246s when a unreferenced variable is reassigned in same branch and referenced after the branching 246s registers an offense for the unreferenced assignment 246s when a variable is assigned in loop body and referenced in post while condition 246s accepts 246s when a variable is assigned in single branch if and unreferenced 246s registers an offense 246s when a variable is assigned on each side of && and referenced after the && 246s accepts 246s when a optional keyword method argument is not used 246s accepts 246s when a variable is assigned and unreferenced in a singleton method defined with self keyword 246s registers an offense 246s when a variable is assigned and unreferenced in a singleton method defined with variable name 246s registers an offense 246s when a method argument is not used 246s accepts 246s when a variable is assigned in begin and referenced outside 246s accepts 246s when a variable is assigned first with ||= and referenced 246s accepts 246s when a variable is assigned in loop body and unreferenced 246s registers an offense 246s when a named capture is referenced 246s accepts 246s similar name suggestion 246s when there's a similar method invocation with arguments 246s does not suggest any name 246s when there's a similar variable 246s suggests the variable name 246s when there's a similar name but it's in inner scope 246s does not suggest any name 246s when there's a similar variable-like method invocation 246s suggests the method name 246s when there are only less similar names 246s does not suggest any name 246s when there's a similar method invocation with explicit receiver 246s does not suggest any name 246s when a variable is reassigned multiple times in rescue with ensure then referenced after the begin 246s registers an offense 246s when a variable is assigned and unreferenced in top level 246s registers an offense 246s when a variable is reassigned multiple times in main body of begin then referenced after the begin 246s accepts 246s when a variable is assigned in 2 identical if branches 246s doesn't think 1 of the 2 assignments is useless 246s when a block argument is not used 246s accepts 246s when a variable is reassigned in loop body but won't be referenced either next iteration or loop condition 246s registers an offense (PENDING: Requires an advanced logic that checks whether the return value of an operator assignment is used or not.) 246s when a variable is shadowed by a block argument and unreferenced 246s registers an offense 246s 246s RuboCop::Cop::Layout::MultilineMethodDefinitionBraceLayout 246s ignores defs without params 246s ignores implicit defs 246s ignores single-line defs 246s symmetrical style 246s opening brace on same line as first element 246s allows closing brace on same line as last multiline element 246s autocorrects closing brace on different line from last element 246s detects closing brace on different line from last element 246s allows closing brace on same line as last element 246s opening brace on separate line from first element 246s allows closing brace on separate line from last element 246s allows closing brace on separate line from last multiline element 246s detects closing brace on same line as last element 246s same_line style 246s opening brace on separate line from first element 246s allows closing brace on same line as last multiline element 246s allows closing brace on same line as last element 246s detects closing brace on different line from last element 246s opening brace on same line as first element 246s detects closing brace on different line from multiline element 246s autocorrects closing brace on different line as last element 246s allows closing brace on same line from last element 246s allows closing brace on same line as multi-line element 246s new_line style 246s opening brace on separate line from first element 246s allows closing brace on separate line from last element 246s detects closing brace on same line as last element 246s allows closing brace on separate line from last multiline element 246s opening brace on same line as first element 246s allows closing brace on different line from last element 246s detects closing brace on same line as last multiline element 246s autocorrects closing brace on same line as last element 246s allows closing brace on different line from multi-line element 246s heredoc 246s ignores heredocs that could share a last line 246s detects heredoc structures that are safe to add to 246s 246s RuboCop::Cop::Lint::ShadowedArgument 246s block argument shadowing 246s when a single argument is shadowed 246s registers an offense 246s and shadowed within a block 246s registers an offense without specifying where the reassignment took place 246s and the argument was not shadowed outside the block 246s accepts 246s and the block is nested within a conditional 246s registers an offense without specifying where the reassignment took place 246s and the argument was used before shadowing 246s accepts 246s and the block is nested within a block 246s registers an offense without specifying where the reassignment took place 246s and the argument was used before shadowing 246s accepts 246s and was used before shadowing 246s accepts 246s and the block occurs after the reassignment 246s registers an offense 246s and shadowed within a conditional 246s registers an offense without specifying where the reassignment took place 246s and the conditional occurs after the reassignment 246s registers an offense 246s and the conditional is nested within a lambda 246s registers an offense without specifying where the reassignment took place 246s and the argument was used before shadowing 246s accepts 246s and the conditional is nested within a conditional 246s registers an offense without specifying where the reassignment took place 246s and the argument was used before shadowing 246s accepts 246s and the argument was not shadowed outside the conditional 246s accepts 246s and was used before shadowing 246s accepts 246s and the argument is not used 246s accepts 246s when binding is used 246s registers an offense 246s when IgnoreImplicitReferences config option is set to true 246s accepts 246s when zsuper is used 246s accepts 246s when a block local variable is assigned but no argument is shadowed 246s accepts 246s when multiple arguments are shadowed 246s and one of them shadowed within a lambda while another is shadowed outside 246s registers an offense 246s method argument shadowing 246s when a single argument is shadowed 246s registers an offense 246s when argument was used in shorthand assignment 246s does not register an offense 246s when binding is used 246s registers an offense 246s when IgnoreImplicitReferences config option is set to true 246s accepts 246s when zsuper is used 246s registers an offense 246s when argument was shadowed by zsuper 246s registers an offense 246s when IgnoreImplicitReferences config option is set to true 246s accepts 246s when argument was shadowed by zsuper 246s does not register an offense 246s and the argument is not used 246s accepts 246s when reassigning to splat variable 246s does not register an offense 246s when a splat argument is shadowed 246s registers an offense 246s and shadowed within a conditional 246s registers an offense without specifying where the reassignment took place 246s and the conditional is nested within a conditional 246s registers an offense without specifying where the reassignment took place 246s and the argument was used before shadowing 246s accepts 246s and the conditional is nested within a lambda 246s registers an offense without specifying where the reassignment took place 246s and the argument was used before shadowing 246s accepts 246s and was used before shadowing 246s accepts 246s and the argument was not shadowed outside the conditional 246s accepts 246s and the conditional occurs after the reassignment 246s registers an offense 246s and shadowed within a block 246s registers an offense without specifying where the reassignment took place 246s and was used before shadowing 246s accepts 246s and the block is nested within a block 246s registers an offense without specifying where the reassignment took place 246s and the argument was used before shadowing 246s accepts 246s and the block occurs after the reassignment 246s registers an offense 246s and the block is nested within a conditional 246s registers an offense without specifying where the reassignment took place 246s and the argument was used before shadowing 246s accepts 246s and the argument was not shadowed outside the block 246s accepts 246s when multiple arguments are shadowed 246s and one of them shadowed within a lambda while another is shadowed outside 246s registers an offense 246s 246s RuboCop::Cop::Layout::SpaceAroundKeyword 246s behaves like missing before 246s registers an offense for missing space before keyword in `case a; when b; ""else end` 246s behaves like missing before 246s registers an offense for missing space before keyword in `a do "a"end` 246s >= Ruby 2.7 246s behaves like missing after 246s registers an offense for missing space after keyword in `case""; in 1; end` and autocorrects 246s behaves like missing after 246s registers an offense for missing space after keyword in `next""` and autocorrects 246s behaves like missing after 246s registers an offense for missing space after keyword in `super{}` and autocorrects 246s behaves like accept after 246s accepts `(` after keyword in `defined?(1)` 246s behaves like missing before 246s registers an offense for missing space before keyword in `a "b"do end` 246s &. 246s behaves like accept after 246s accepts `&.` after keyword in `yield&.foo` 246s behaves like accept after 246s accepts `&.` after keyword in `super&.foo` 246s behaves like accept before 246s accepts `||` before keyword in `a||begin end` 246s behaves like missing after 246s registers an offense for missing space after keyword in `super""` and autocorrects 246s behaves like missing before 246s registers an offense for missing space before keyword in `begin rescue; ""else end` 246s behaves like accept before 246s accepts `-` before keyword in `a-begin end` 246s behaves like missing after 246s registers an offense for missing space after keyword in `BEGIN{}` and autocorrects 246s behaves like missing after 246s registers an offense for missing space after keyword in `begin+1 end` and autocorrects 246s behaves like missing before 246s registers an offense for missing space before keyword in `1until ""` 246s >= Ruby 3.0 246s behaves like accept after 246s accepts `=>` after keyword in `a =>""` 246s behaves like accept before 246s accepts `=>` before keyword in `""=> a` 246s behaves like missing after 246s registers an offense for missing space after keyword in `1 and(2)` and autocorrects 246s behaves like accept before 246s accepts `=*` before keyword in `a=*begin end` 246s behaves like missing after 246s registers an offense for missing space after keyword in `not""` and autocorrects 246s behaves like accept after 246s accepts `{` after keyword in `loop{}` 246s behaves like missing after 246s registers an offense for missing space after keyword in `begin"" end` and autocorrects 246s behaves like accept after 246s accepts `::` after keyword in `super::ModuleName` 246s behaves like accept before 246s accepts `*` before keyword in `a*begin end` 246s behaves like accept after 246s accepts `(` after keyword in `return(1)` 246s behaves like missing after 246s registers an offense for missing space after keyword in `if""; end` and autocorrects 246s behaves like accept before 246s accepts `**` before keyword in `a**begin end` 246s behaves like missing after 246s registers an offense for missing space after keyword in `break""` and autocorrects 246s behaves like missing after 246s registers an offense for missing space after keyword in `case a; when b; else"" end` and autocorrects 246s behaves like accept after 246s accepts `\` after keyword in `test do\ 246s end` 246s behaves like accept after 246s accepts `(` after keyword in `not(1)` 246s behaves like missing before 246s registers an offense for missing space before keyword in `begin ""ensure end` 246s behaves like missing after 246s registers an offense for missing space after keyword in `a rescue""` and autocorrects 246s behaves like missing before 246s registers an offense for missing space before keyword in `for x in []do end` 246s behaves like missing before 246s registers an offense for missing space before keyword in `1while ""` 246s behaves like missing before 246s registers an offense for missing space before keyword in `until 1 do "x"end` 246s behaves like accept after 246s accepts `#` after keyword in `next#comment` 246s behaves like missing before 246s registers an offense for missing space before keyword in `1or 2` 246s behaves like missing before 246s registers an offense for missing space before keyword in `if a; "b"end` 246s behaves like accept after 246s accepts `(` after keyword in `super(1)` 246s behaves like missing after 246s registers an offense for missing space after keyword in `1 or(2)` and autocorrects 246s behaves like missing before 246s registers an offense for missing space before keyword in `begin "a"end` 246s behaves like missing after 246s registers an offense for missing space after keyword in `a do|x| end` and autocorrects 246s behaves like accept before 246s accepts `<` before keyword in `a= Ruby 2.7 246s behaves like missing before 246s registers an offense for missing space before keyword in `case a; in b; ""else end` 246s behaves like missing after 246s registers an offense for missing space after keyword in `case a; in "pattern" if"condition"; else "" end` and autocorrects 246s behaves like missing after 246s registers an offense for missing space after keyword in `case a; in b; else"" end` and autocorrects 246s behaves like missing before 246s registers an offense for missing space before keyword in `case a; in "pattern"if "condition"; else "" end` 246s behaves like missing before 246s registers an offense for missing space before keyword in `case a; in "pattern"unless "condition"; else "" end` 246s behaves like missing after 246s registers an offense for missing space after keyword in `case a; in "pattern" unless"condition"; else "" end` and autocorrects 246s behaves like accept after 246s accepts `.` after keyword in `yield.method` 246s behaves like missing after 246s registers an offense for missing space after keyword in `while 1 do"x" end` and autocorrects 246s behaves like accept before 246s accepts `!` before keyword in `!super.method` 246s behaves like accept after 246s accepts `[` after keyword in `super[1]` 246s behaves like accept before 246s accepts `!` before keyword in `!yield.method` 246s behaves like accept after 246s accepts `[` after keyword in `yield[1]` 246s behaves like missing after 246s registers an offense for missing space after keyword in `begin ensure"" end` and autocorrects 246s behaves like accept before 246s accepts `|` before keyword in `loop { |x|break }` 246s behaves like accept before 246s accepts `/` before keyword in `a/begin end` 246s behaves like accept around 246s accepts `{}` around keyword in `loop {next}` 246s behaves like missing before 246s registers an offense for missing space before keyword in `if a; ""elsif b; end` 246s behaves like accept around 246s accepts `;` around keyword in `test do;end` 246s behaves like missing after 246s registers an offense for missing space after keyword in `if a; else"" end` and autocorrects 246s behaves like accept after 246s accepts `(` after keyword in `break(1)` 246s behaves like missing before 246s registers an offense for missing space before keyword in `1and 2` 246s behaves like accept around 246s accepts `,` around keyword in `a 1,next,1` 246s behaves like missing after 246s registers an offense for missing space after keyword in `defined?1` and autocorrects 246s behaves like missing before 246s registers an offense for missing space before keyword in `while 1 do "x"end` 246s behaves like accept before 246s accepts `>` before keyword in `a>begin end` 246s behaves like accept after 246s accepts `(` after keyword in `next(1)` 246s behaves like accept before 246s accepts `==` before keyword in `a==begin end` 246s behaves like missing after 246s registers an offense for missing space after keyword in `1 while""` and autocorrects 246s behaves like accept after 246s accepts `(` after keyword in `yield(1)` 246s behaves like missing before 246s registers an offense for missing space before keyword in `if ""then a end` 246s behaves like missing after 246s registers an offense for missing space after keyword in `case"" when 1; end` and autocorrects 246s behaves like accept after 246s accepts `.` after keyword in `begin end.inspect` 246s behaves like accept around 246s accepts `{}` around keyword in `"#{begin end}"` 246s behaves like accept after 246s accepts `+` after keyword in `+begin end` 246s >= Ruby 2.7 246s behaves like missing after 246s registers an offense for missing space after keyword in `case a; in""; end` and autocorrects 246s behaves like missing after 246s registers an offense for missing space after keyword in `a in""` and autocorrects 246s behaves like missing before 246s registers an offense for missing space before keyword in `""in a` 246s behaves like accept around 246s accepts `{}` around keyword in `{a: begin end}` 246s behaves like missing after 246s registers an offense for missing space after keyword in `if a then"" end` and autocorrects 246s behaves like accept before 246s accepts `+` before keyword in `a+begin end` 246s behaves like accept around 246s accepts `[]` around keyword in `[begin end]` 246s behaves like missing before 246s registers an offense for missing space before keyword in `""rescue a` 246s behaves like accept after 246s accepts `\n` after keyword in `test do 246s end` 246s behaves like accept around 246s accepts `[]` around keyword in `a[begin end]` 246s behaves like accept around 246s accepts `()` around keyword in `(next)` 246s behaves like missing after 246s registers an offense for missing space after keyword in `END{}` and autocorrects 246s behaves like missing before 246s registers an offense for missing space before keyword in `case ""when a; end` 246s behaves like missing after 246s registers an offense for missing space after keyword in `until 1 do"x" end` and autocorrects 246s behaves like missing after 246s registers an offense for missing space after keyword in `yield""` and autocorrects 246s behaves like accept before 246s accepts `&&` before keyword in `a&&begin end` 246s behaves like missing after 246s registers an offense for missing space after keyword in `1 until""` and autocorrects 246s behaves like missing before 246s registers an offense for missing space before keyword in `until 1do end` 246s behaves like accept before 246s accepts `=` before keyword in `a=begin end` 246s behaves like accept after 246s accepts `rescue` after keyword in `begin; rescue(Error); end` 246s behaves like missing after 246s registers an offense for missing space after keyword in `begin rescue; else"" end` and autocorrects 246s behaves like accept before 246s accepts `!` before keyword in `!yield` 246s behaves like missing after 246s registers an offense for missing space after keyword in `case a when""; end` and autocorrects 246s behaves like missing after 246s registers an offense for missing space after keyword in `return""` and autocorrects 246s behaves like accept before 246s accepts `+` before keyword in `a+begin; end.method` 246s behaves like missing before 246s registers an offense for missing space before keyword in `for x in [] do "x"end` 246s behaves like missing after 246s registers an offense for missing space after keyword in `if a; elsif""; end` and autocorrects 246s behaves like missing after 246s registers an offense for missing space after keyword in `unless""; end` and autocorrects 246s 246s RuboCop::Cop::Style::HashConversion 246s registers and corrects an offense when using argumentless `zip` with parentheses in `Hash[]` 246s reports different offense for Hash[(a && b)] 246s reports different offense for multi-argument Hash[] 246s registers and corrects an offense when using `zip` with argument in `Hash[]` 246s registers and corrects an offense when using multi-argument `Hash[]` as a method argument 246s reports an offense for single-argument Hash[] 246s reports different offense for Hash[a || b] 246s reports different offense for hash argument Hash[] as a method argument with parentheses 246s registers and corrects an offense when using argumentless `zip` without parentheses in `Hash[]` 246s does not try to correct multi-argument Hash with odd number of arguments 247s reports different offense for empty Hash[] 247s wraps complex statements in parens if needed 247s reports different offense for Hash[(a || b)] 247s reports different offense for hash argument Hash[] as a method argument without parentheses 247s reports different offense for hash argument Hash[] 247s reports different offense for Hash[a && b] 247s AllowSplatArgument: true 247s does not register an offense for unpacked array 247s AllowSplatArgument: false 247s reports uncorrectable offense for unpacked array 247s 247s RuboCop::Cop::RangeHelp 247s source indicated by #range_with_surrounding_comma 247s when side is :left 247s is expected to eq ",Error" 247s when side is :right 247s is expected to eq "Error," 247s when side is :both 247s is expected to eq ",Error," 247s source indicated by #range_by_whole_lines 247s with a whole line plus beginning of next line 247s with include_final_newline 247s is expected to eq "puts 'example'\nputs 'another example'\n" 247s without include_final_newline 247s is expected to eq "puts 'example'\nputs 'another example'" 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 when source doesn't end with a newline 247s with include_final_newline 247s is expected to eq "newline_at_end" 247s is expected to eq 30 247s without include_final_newline 247s is expected to eq "newline_at_end" 247s with parts of two lines 247s with include_final_newline 247s is expected to eq "puts 'example'\nputs 'another example'\n" 247s without include_final_newline 247s is expected to eq "puts 'example'\nputs 'another example'" 247s with end of one line 247s without include_final_newline 247s is expected to eq "puts 'example'" 247s with include_final_newline 247s is expected to eq "puts 'example'\n" 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 beginning of one line 247s with include_final_newline 247s is expected to eq "puts 'another example'\n" 247s without include_final_newline 247s is expected to eq "puts 'another example'" 247s with parts of four lines 247s with include_final_newline 247s is expected to eq "puts 'example'\nputs 'another example'\n\nsomething_else\n" 247s without include_final_newline 247s is expected to eq "puts 'example'\nputs 'another example'\n\nsomething_else" 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 :right 247s is expected to eq "a(2) " 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 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 #range_with_comments_and_lines 247s returns a range that includes related comments and whole lines 247s 247s RuboCop::Cop::Style::SafeNavigation 247s allows an object check before a negated predicate 247s allows calls to methods not safeguarded by respond_to 247s allows calls on nil 247s allows object checks in the condition of an elsif statement and a method call on that object in the body 247s allows a method call safeguarded when using `unless nil?` 247s allows an object check before a nil check on a long chain 247s allows a method call safeguarded with a negative check for the object when using `if` 247s allows an object check before a method call that is used with `empty?` 247s allows an object check before a negated method call with a safe navigation 247s allows an object check before a blank check 247s allows an object check before a method call that is used in a comparison 247s allows an object check before a method call that is used in a negated regex comparison 247s allows method call that is used in a regex comparison safe guarded by an object check 247s allows an object check before a method call that is used in a regex comparison 247s allows an object check before a method chain longer than 2 methods 247s allows an object check before a negated predicate method chain 247s allows an object check before hash access 247s allows method call that is used in a comparison safe guarded by an object check 247s allows method calls that do not get called using . safe guarded by an object check 247s allows a method call as a parameter when the parameter is safe guarded with an object check 247s allows an object check before a long chain with a block 247s allows an object check before a method call that is used in a spaceship comparison 247s allows a method chain that is used in a comparison safe guarded by an object check 247s allows an object check before a method chain that is used in a comparison 247s allows an object check before a nil check on a short chain 247s allows a method call safeguarded with a negative check for the object when using `unless` 247s allows for empty if blocks with comments 247s allows chained method calls during arithmetic operations safe guarded by an object check 247s does not move comments that are inside an inner block 247s allows method call that is used in a negated regex comparison safe guarded by an object check 247s allows chained method calls during assignment safe guardedby an object check 247s allows method call that is used in a spaceship comparison safe guarded by an object check 247s allows calls using safe navigation 247s behaves like all variable types 247s object check before method call 247s allows a nil object check followed by a method call with a block 247s allows a nil object check followed by a method call with params 247s 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 allows a non object check followed by a method call with params 247s allows a nil object check followed by a method call with params and a block 247s allows a nil object check followed by a method call 247s allows a non object check followed by a method call 247s ConvertCodeThatCanStartToReturnNil true 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 an 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 params 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 corrects an object check followed by a method call and another check 247s registers an offense for a non-nil object check followed by a method call 247s registers an offense for an object check followed by a method call with a block 247s registers an offense for a non-nil object check followed by a method call with a block 247s registers an offense for a check for the object followed by a method call in the condition for an if expression 247s method chaining 247s registers an offense for an object check followed by chained method calls with blocks 247s MaxChainLength: 3 247s registers an offense for an object check followed by 3 chained method calls 247s allows an object check followed by 4 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: 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 ConvertCodeThatCanStartToReturnNil false 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 247s registers an offense for an object check followed by a method calls that nil responds to 247s registers an offense for a check for the object followed by a method call in the condition for an if expression 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 registers an offense for an object check followed by a method call with 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 method chaining 247s corrects an object check followed by a chained method call with params 247s corrects an object check followed by a chained method call 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 with a symbol proc 247s modifier if 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 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 an object check followed by a method call with a comment at EOL 247s registers an offense for a method call safeguarded with a nil 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 with params safeguarded with a negative 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 a method call safeguarded with a negative check for the object 247s registers an offense for a method call with params safeguarded with a negative 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 method call on an accessor safeguarded by a check for the accessed variable 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 a block safeguarded with a negative 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 method call with params 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 and a block safeguarded with a negative nil check for the object 247s registers an offense when safe guard check and safe navigation method call are connected with `&&` condition 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 a block safeguarded with a check for the object 247s registers an offense for a chained method call safeguarded with a negative nil 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 fail 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 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 yield 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 if expression 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 params inside of an unless negative 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 with params inside of a 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 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 and a block inside of a non-nil check for the object 247s does not lose comments within if expression 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 params and 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 a 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 only moves comments that fall within the expression 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 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 and a block inside of a check for the object 247s registers an offense for a single method call with a block inside of a non-nil check for the object 247s ternary expression 247s allows ternary expression 247s behaves like all variable types 247s modifier if 247s registers an offense for a method call with params safeguarded with a negative 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 safeguarded with a negative nil check for the object 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 and 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 check for the object 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 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 chained method call safeguarded with an unless nil 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 when safe guard check and safe navigation method call are connected with `&&` condition 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 with params safeguarded with a 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 safeguarded with a nil 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 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 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 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 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 throw 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 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 next safe guarded by an object check 247s behaves like safe guarding logical break keywords 247s allows a method call being passed to raise safe guarded by an object check 247s if expression 247s does not lose comments within if expression 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 params and 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 nil check for the object 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 and a block inside of a 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 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 an unless negative 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 non-nil 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 inside of an unless negative 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 inside of a non-nil check for the object 247s only moves comments that fall within the expression 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 an unless negative check for the object 247s registers an offense for a single method call inside of a check for the object 247s ternary expression 247s allows ternary expression 247s object check before method call 247s allows a nil object check followed by a method call 247s allows a non object check followed by a method call with params and a block 247s allows a nil object check followed by a method call with params and a block 247s allows a non object check followed by a method call with params 247s allows a nil object check followed by a method call with a block 247s allows a non object check followed by a method call 247s allows a nil object check followed by a method call with params 247s allows a non object check followed by a method call with a block 247s ConvertCodeThatCanStartToReturnNil true 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 with a block 247s registers an offense for an 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 247s registers an offense for a non-nil object check followed by a method call with a block 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 247s corrects an object check followed by a method call and another check 247s method chaining 247s registers an offense for an object check followed by chained method calls with blocks 247s MaxChainLength: 1 247s allows an object check followed by 2 chained method calls 247s registers an offense for an object check followed by 1 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 ConvertCodeThatCanStartToReturnNil false 247s registers an offense for an object check followed by a method call 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 registers an offense for an object check followed by a method call with a block 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 params 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 allows a non-nil object check followed by a method call with params and a block 247s registers an offense for a check for the object followed by a method call in the condition for an if expression 247s method chaining 247s corrects an object check followed by a chained method call 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 params 247s corrects an object check followed by a chained method call with a block 247s behaves like all variable types 247s if expression 247s registers an offense for a single method call with a block inside of an unless negative check for the object 247s only moves comments that fall within the expression 247s registers an offense for a single method call with params inside of an unless negative check for the object 247s does not lose comments within if expression 247s registers an offense for a single method call with params and a block inside of a 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 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 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 an unless nil check for the object 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 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 with params inside of an unless nil check for the object 248s registers an offense for a single method call with a block inside of a non-nil check for the object 248s registers an offense for a single method call with a block inside of a check for the object 248s registers an offense for a single method call with params inside of a non-nil check for the object 248s registers an offense for a single method call with params and a block inside of a non-nil check for the object 248s registers an offense for a single method call with params inside of a check for the object 248s ternary expression 248s allows ternary expression 248s object check before method call 248s allows a nil object check followed by a method call with params 248s allows a non object check followed by a method call 248s allows a non object check followed by a method call with params and a block 248s allows a nil object check followed by a method call with params and a block 248s allows a non object check followed by a method call with params 248s allows a nil object check followed by a method call with a block 248s allows a nil object check followed by a method call 248s allows a non object check followed by a method call with a block 248s ConvertCodeThatCanStartToReturnNil true 248s registers an offense for an object check followed by a method call 248s corrects an object check followed by a method call and another check 248s registers an offense for a non-nil object check followed by a method call with params 248s registers an offense for an object check followed by a method call with params and a block 248s registers an offense for an object check followed by a method call with a block 248s registers an offense for a non-nil object check followed by a method call with params and a block 248s registers an offense for an object check followed by a method call with params 248s registers an offense for a non-nil object check followed by a method call 248s registers an offense for a check for the object followed by a method call in the condition for an if expression 248s registers an offense for a non-nil object check followed by a method call with a block 248s method chaining 248s registers an offense for an object check followed by chained method calls with blocks 248s with Lint/SafeNavigationChain disabled 248s allows an object check followed by chained method calls with blocks 248s allows an object check followed by chained method calls 248s MaxChainLength: 3 248s allows an object check followed by 4 chained method calls 248s registers an offense for an object check followed by 3 chained method calls 248s MaxChainLength: 1 248s registers an offense for an object check followed by 1 chained method calls 248s allows an object check followed by 2 chained method calls 248s ConvertCodeThatCanStartToReturnNil false 248s allows a non-nil object check followed by a method call with a block 248s registers an offense for an object check followed by a method call 248s allows a non-nil object check followed by a method call with params and a block 248s registers an offense for an object check followed by a method calls that nil responds to 248s registers an offense for an object check followed by a method call with params and a block 248s registers an offense for an object check followed by a method call with params 248s registers an offense for an object check followed by a method call with a block 248s registers an offense for a check for the object followed by a method call in the condition for an if expression 248s allows a non-nil object check followed by a method call 248s allows a non-nil object check followed by a method call with params 248s method chaining 248s corrects an object check followed by a chained method call with params 248s corrects an object check followed by a chained method call with a symbol proc 248s corrects an object check followed by a chained method call 248s corrects an object check followed by a chained method call with a block 248s modifier if 248s registers an offense for a method call with a block safeguarded with a negative nil check for the object 248s registers an offense for a method call with a block safeguarded with a check for the object 248s registers an offense for a method call with params and a block safeguarded with a nil check for the object 248s registers an offense for a chained method call safeguarded with an unless nil check for the object 248s registers an offense for a method call with params safeguarded with a negative nil check for the object 248s registers an offense for a method call with params safeguarded with a check for the object 248s registers an offense for a method call safeguarded with a check for the object 248s registers an offense for a method call safeguarded with a negative nil check for the object 248s registers an offense for a method call with params and a block safeguarded with a negative nil check for the object 248s registers an offense for a method call on an accessor safeguarded by a check for the accessed variable 248s registers an offense for a method call with a block safeguarded with a negative check for the object 248s registers an offense for a method call that nil responds to safe guarded by an object check 248s registers an offense for a chained method call safeguarded with a check for the object 248s registers an offense for an object check followed by a method call with a comment at EOL 248s registers an offense for a method call with params and a block safeguarded with a check for the object 248s registers an offense for a chained method call safeguarded with a negative nil check for the object 248s registers an offense for a method call safeguarded with a nil check for the object 248s registers an offense for a method call with params safeguarded with a nil check for the object 248s registers an offense for a method call with params safeguarded with a negative check for the object 248s registers an offense when safe guard check and safe navigation method call are connected with `&&` condition 248s registers an offense for a method call with a block safeguarded with a nil check for the object 248s registers an offense for a method call safeguarded with a negative check for the object 248s registers an offense for a method call with params and a block safeguarded with a negative check for the object 248s behaves like safe guarding logical break keywords 248s allows a method call being passed to fail safe guarded by an object check 248s behaves like safe guarding logical break keywords 248s allows a method call being passed to return safe guarded by an object check 248s behaves like safe guarding logical break keywords 248s allows a method call being passed to break safe guarded by an object check 248s behaves like safe guarding logical break keywords 248s allows a method call being passed to throw safe guarded by an object check 248s behaves like safe guarding logical break keywords 248s allows a method call being passed to yield safe guarded by an object check 248s behaves like safe guarding logical break keywords 248s allows a method call being passed to next safe guarded by an object check 248s behaves like safe guarding logical break keywords 248s allows a method call being passed to raise safe guarded by an object check 248s behaves like all variable types 248s modifier if 248s registers an offense for a method call with params safeguarded with a nil check for the object 248s registers an offense for a method call with params and a block safeguarded with a negative check for the object 248s registers an offense for a chained method call safeguarded with an unless nil check for the object 248s registers an offense for a method call with params and a block safeguarded with a nil check for the object 248s registers an offense for a chained method call safeguarded with a check for the object 248s registers an offense for a method call safeguarded with a negative nil check for the object 248s registers an offense for a method call with a block safeguarded with a negative check for the object 248s registers an offense for a method call with params safeguarded with a negative check for the object 248s registers an offense for a method call with params safeguarded with a negative nil check for the object 248s registers an offense for an object check followed by a method call with a comment at EOL 248s registers an offense for a method call with a block safeguarded with a check for the object 248s registers an offense for a method call with params safeguarded with a check for the object 248s registers an offense when safe guard check and safe navigation method call are connected with `&&` condition 248s registers an offense for a method call with a block safeguarded with a negative nil check for the object 248s registers an offense for a method call that nil responds to safe guarded by an object check 248s registers an offense for a method call with params and a block safeguarded with a negative nil check for the object 248s registers an offense for a chained method call safeguarded with a negative nil check for the object 248s registers an offense for a method call with params and a block safeguarded with a check for the object 248s registers an offense for a method call with a block safeguarded with a nil check for the object 248s registers an offense for a method call safeguarded with a check for the object 248s registers an offense for a method call on an accessor safeguarded by a check for the accessed variable 248s registers an offense for a method call safeguarded with a negative check for the object 248s registers an offense for a method call safeguarded with a nil check for the object 248s behaves like safe guarding logical break keywords 248s allows a method call being passed to next safe guarded by an object check 248s behaves like safe guarding logical break keywords 248s allows a method call being passed to raise safe guarded by an object check 248s behaves like safe guarding logical break keywords 248s allows a method call being passed to return safe guarded by an object check 248s behaves like safe guarding logical break keywords 248s allows a method call being passed to yield safe guarded by an object check 248s behaves like safe guarding logical break keywords 248s allows a method call being passed to break safe guarded by an object check 248s behaves like safe guarding logical break keywords 248s allows a method call being passed to fail safe guarded by an object check 248s behaves like safe guarding logical break keywords 248s allows a method call being passed to throw safe guarded by an object check 248s if expression 248s does not lose comments within if expression 248s registers an offense for a single method call with params and a block inside of an unless nil check for the object 248s registers an offense for a single method call inside of an unless negative check for the object 248s registers an offense for a single method call with a block inside of an unless nil check for the object 248s registers an offense for a single method call with params inside of a non-nil check for the object 248s registers an offense for a single method call with params inside of an unless negative check for the object 248s registers an offense for a single method call with params inside of an unless nil check for the object 248s registers an offense for a single method call with a block inside of a check for the object 248s registers an offense for a single method call with params and a block inside of an unless negative check for the object 248s registers an offense for a single method call with a block inside of an unless negative check for the object 248s registers an offense for a single method call with a block inside of a non-nil check for the object 248s registers an offense for a single method call inside of a non-nil check for the object 248s registers an offense for a single method call inside of an unless nil check for the object 248s allows a single method call inside of a check for the object with an else 248s registers an offense for a single method call with params and a block inside of a check for the object 248s only moves comments that fall within the expression 248s registers an offense for a single method call with params and a block inside of a non-nil check for the object 248s registers an offense for a single method call inside of a check for the object 248s registers an offense for a single method call with params inside of a check for the object 248s ternary expression 248s allows ternary expression 248s object check before method call 248s allows a nil object check followed by a method call 248s allows a non object check followed by a method call with a block 248s allows a nil object check followed by a method call with a block 248s allows a nil object check followed by a method call with params 248s allows a non object check followed by a method call with params 248s allows a non object check followed by a method call 248s allows a nil object check followed by a method call with params and a block 248s allows a non object check followed by a method call with params and a block 248s ConvertCodeThatCanStartToReturnNil true 248s registers an offense for an object check followed by a method call with params and a block 248s registers an offense for an object check followed by a method call 248s registers an offense for an object check followed by a method call with a block 248s registers an offense for a non-nil object check followed by a method call with a block 248s registers an offense for a non-nil object check followed by a method call with params 248s registers an offense for an object check followed by a method call with params 248s registers an offense for a non-nil object check followed by a method call with params and a block 248s registers an offense for a check for the object followed by a method call in the condition for an if expression 248s registers an offense for a non-nil object check followed by a method call 248s corrects an object check followed by a method call and another check 248s method chaining 248s registers an offense for an object check followed by chained method calls with blocks 248s MaxChainLength: 1 248s registers an offense for an object check followed by 1 chained method calls 248s allows an object check followed by 2 chained method calls 248s MaxChainLength: 3 248s allows an object check followed by 4 chained method calls 248s registers an offense for an object check followed by 3 chained method calls 248s with Lint/SafeNavigationChain disabled 248s allows an object check followed by chained method calls with blocks 248s allows an object check followed by chained method calls 248s ConvertCodeThatCanStartToReturnNil false 248s registers an offense for an object check followed by a method call with a block 248s registers an offense for an object check followed by a method call with params 248s registers an offense for an object check followed by a method call 248s allows a non-nil object check followed by a method call with params 248s allows a non-nil object check followed by a method call 248s allows a non-nil object check followed by a method call with a block 248s allows a non-nil object check followed by a method call with params and a block 248s registers an offense for an object check followed by a method call with params and a block 248s registers an offense for an object check followed by a method calls that nil responds to 248s registers an offense for a check for the object followed by a method call in the condition for an if expression 248s method chaining 248s corrects an object check followed by a chained method call 248s corrects an object check followed by a chained method call with a block 248s corrects an object check followed by a chained method call with a symbol proc 248s corrects an object check followed by a chained method call with params 248s when Ruby <= 2.2 248s does not register an offense when a method call that nil responds to safe guarded by an object check 248s respond_to? 248s allows method calls safeguarded by a respond_to check 248s allows method calls safeguarded by a respond_to check on adifferent variable but the same method 248s allows method calls safeguarded by a respond_to check on adifferent variable and method 248s allows enumerable accessor method calls safeguarded by a respond_to check 248s allows method calls safeguarded by a respond_to check to a different method 248s behaves like all variable types 248s object check before method call 248s allows a non object check followed by a method call with params 248s allows a nil object check followed by a method call with params 248s allows a non object check followed by a method call with params and a block 248s allows a non object check followed by a method call 248s allows a non object check followed by a method call with a block 248s allows a nil object check followed by a method call with params and a block 248s allows a nil object check followed by a method call with a block 248s allows a nil object check followed by a method call 248s ConvertCodeThatCanStartToReturnNil false 248s registers an offense for an object check followed by a method call with a block 248s registers an offense for an object check followed by a method call with params 248s allows a non-nil object check followed by a method call with params and a block 248s registers an offense for an object check followed by a method call 248s allows a non-nil object check followed by a method call with a block 248s allows a non-nil object check followed by a method call 248s registers an offense for an object check followed by a method calls that nil responds to 248s registers an offense for a check for the object followed by a method call in the condition for an if expression 248s allows a non-nil object check followed by a method call with params 248s registers an offense for an object check followed by a method call with params and a block 248s method chaining 248s corrects an object check followed by a chained method call with a block 248s corrects an object check followed by a chained method call with a symbol proc 248s corrects an object check followed by a chained method call 248s corrects an object check followed by a chained method call with params 248s ConvertCodeThatCanStartToReturnNil true 248s registers an offense for an object check followed by a method call 248s registers an offense for a check for the object followed by a method call in the condition for an if expression 248s registers an offense for a non-nil object check followed by a method call with params and a block 248s registers an offense for an object check followed by a method call with params 248s registers an offense for a non-nil object check followed by a method call with a block 248s registers an offense for an object check followed by a method call with a block 248s registers an offense for a non-nil object check followed by a method call with params 248s registers an offense for a non-nil object check followed by a method call 248s registers an offense for an object check followed by a method call with params and a block 248s corrects an object check followed by a method call and another check 248s method chaining 248s registers an offense for an object check followed by chained method calls with blocks 248s MaxChainLength: 3 248s registers an offense for an object check followed by 3 chained method calls 248s allows an object check followed by 4 chained method calls 248s with Lint/SafeNavigationChain disabled 248s allows an object check followed by chained method calls with blocks 248s allows an object check followed by chained method calls 248s MaxChainLength: 1 248s registers an offense for an object check followed by 1 chained method calls 248s allows an object check followed by 2 chained method calls 248s if expression 248s registers an offense for a single method call with params and a block inside of a non-nil check for the object 248s registers an offense for a single method call inside of a non-nil check for the object 248s does not lose comments within if expression 248s registers an offense for a single method call inside of an unless negative check for the object 248s registers an offense for a single method call inside of a check for the object 248s registers an offense for a single method call with params and a block inside of a check for the object 248s registers an offense for a single method call with a block inside of an unless nil check for the object 248s registers an offense for a single method call with a block inside of an unless negative check for the object 248s registers an offense for a single method call with params inside of a non-nil check for the object 248s registers an offense for a single method call with a block inside of a check for the object 248s only moves comments that fall within the expression 248s allows a single method call inside of a check for the object with an else 248s registers an offense for a single method call with params and a block inside of an unless negative check for the object 248s registers an offense for a single method call with params inside of an unless nil check for the object 248s registers an offense for a single method call with params and a block inside of an unless nil check for the object 248s registers an offense for a single method call with params inside of a check for the object 248s registers an offense for a single method call with a block inside of a non-nil check for the object 248s registers an offense for a single method call with params inside of an unless negative check for the object 248s registers an offense for a single method call inside of an unless nil check for the object 248s ternary expression 248s allows ternary expression 248s modifier if 248s registers an offense for a method call on an accessor safeguarded by a check for the accessed variable 248s registers an offense for a chained method call safeguarded with a check for the object 248s registers an offense for a method call safeguarded with a negative nil check for the object 248s registers an offense for a method call with a block safeguarded with a check for the object 248s registers an offense for a method call safeguarded with a nil check for the object 248s registers an offense for an object check followed by a method call with a comment at EOL 248s registers an offense for a method call with params safeguarded with a negative check for the object 248s registers an offense for a method call with params and a block safeguarded with a nil check for the object 248s registers an offense for a method call with params and a block safeguarded with a check for the object 248s registers an offense for a method call with params safeguarded with a check for the object 248s registers an offense for a method call safeguarded with a check for the object 248s registers an offense for a method call that nil responds to safe guarded by an object check 248s registers an offense for a method call with a block safeguarded with a negative check for the object 248s registers an offense for a chained method call safeguarded with an unless nil check for the object 248s registers an offense for a chained method call safeguarded with a negative nil check for the object 248s registers an offense for a method call with params safeguarded with a nil check for the object 248s registers an offense for a method call with params and a block safeguarded with a negative nil check for the object 248s registers an offense for a method call with params and a block safeguarded with a negative check for the object 248s registers an offense for a method call with params safeguarded with a negative nil check for the object 248s registers an offense when safe guard check and safe navigation method call are connected with `&&` condition 248s registers an offense for a method call with a block safeguarded with a nil check for the object 248s registers an offense for a method call safeguarded with a negative check for the object 248s registers an offense for a method call with a block safeguarded with a negative nil check for the object 248s behaves like safe guarding logical break keywords 248s allows a method call being passed to fail safe guarded by an object check 248s behaves like safe guarding logical break keywords 248s allows a method call being passed to throw safe guarded by an object check 248s behaves like safe guarding logical break keywords 248s allows a method call being passed to next safe guarded by an object check 248s behaves like safe guarding logical break keywords 248s allows a method call being passed to break safe guarded by an object check 248s behaves like safe guarding logical break keywords 248s allows a method call being passed to yield safe guarded by an object check 248s behaves like safe guarding logical break keywords 248s allows a method call being passed to raise safe guarded by an object check 248s behaves like safe guarding logical break keywords 248s allows a method call being passed to return safe guarded by an object check 248s behaves like all variable types 248s if expression 248s registers an offense for a single method call with a block inside of an unless negative check for the object 248s registers an offense for a single method call with params inside of a check for the object 248s registers an offense for a single method call with params and a block inside of a non-nil check for the object 248s registers an offense for a single method call inside of a non-nil check for the object 248s allows a single method call inside of a check for the object with an else 248s registers an offense for a single method call inside of an unless negative check for the object 248s does not lose comments within if expression 248s registers an offense for a single method call with params inside of an unless negative check for the object 248s registers an offense for a single method call inside of a check for the object 248s registers an offense for a single method call with params and a block inside of an unless nil check for the object 249s registers an offense for a single method call with a block inside of a check for the object 249s registers an offense for a single method call inside of an unless nil check for the object 249s registers an offense for a single method call with params inside of a non-nil check for the object 249s only moves comments that fall within the expression 249s registers an offense for a single method call with params and a block inside of an unless negative check for the object 249s registers an offense for a single method call with a block inside of an unless nil check for the object 249s registers an offense for a single method call with params and a block inside of a check for the object 249s registers an offense for a single method call with params inside of an unless nil check for the object 249s registers an offense for a single method call with a block inside of a non-nil check for the object 249s ternary expression 249s allows ternary expression 249s modifier if 249s registers an offense for a method call with a block safeguarded with a negative nil check for the object 249s registers an offense for a method call with params safeguarded with a negative nil check for the object 249s registers an offense for a method call that nil responds to safe guarded by an object check 249s registers an offense for a method call with params and a block safeguarded with a nil check for the object 249s registers an offense for a method call with params and a block safeguarded with a check for the object 249s registers an offense when safe guard check and safe navigation method call are connected with `&&` condition 249s registers an offense for a method call safeguarded with a negative check for the object 249s registers an offense for a method call with params safeguarded with a negative check for the object 249s registers an offense for a method call safeguarded with a nil check for the object 249s registers an offense for an object check followed by a method call with a comment at EOL 249s registers an offense for a method call safeguarded with a negative nil check for the object 249s registers an offense for a method call with params safeguarded with a check for the object 249s registers an offense for a chained method call safeguarded with a check for the object 249s registers an offense for a chained method call safeguarded with an unless nil check for the object 249s registers an offense for a method call with a block safeguarded with a negative check for the object 249s registers an offense for a method call with a block safeguarded with a check for the object 249s registers an offense for a chained method call safeguarded with a negative nil check for the object 249s registers an offense for a method call with params safeguarded with a nil check for the object 249s registers an offense for a method call with a block safeguarded with a nil check for the object 249s registers an offense for a method call with params and a block safeguarded with a negative nil check for the object 249s registers an offense for a method call safeguarded with a check for the object 249s registers an offense for a method call with params and a block safeguarded with a negative check for the object 249s registers an offense for a method call on an accessor safeguarded by a check for the accessed variable 249s behaves like safe guarding logical break keywords 249s allows a method call being passed to throw safe guarded by an object check 249s behaves like safe guarding logical break keywords 249s allows a method call being passed to raise safe guarded by an object check 249s behaves like safe guarding logical break keywords 249s allows a method call being passed to yield safe guarded by an object check 249s behaves like safe guarding logical break keywords 249s allows a method call being passed to fail safe guarded by an object check 249s behaves like safe guarding logical break keywords 249s allows a method call being passed to next safe guarded by an object check 249s behaves like safe guarding logical break keywords 249s allows a method call being passed to return safe guarded by an object check 249s behaves like safe guarding logical break keywords 249s allows a method call being passed to break safe guarded by an object check 249s object check before method call 249s allows a nil object check followed by a method call with params and a block 249s allows a non object check followed by a method call with params and a block 249s allows a nil object check followed by a method call with a block 249s allows a nil object check followed by a method call 249s allows a non object check followed by a method call 249s allows a non object check followed by a method call with params 249s allows a nil object check followed by a method call with params 249s allows a non object check followed by a method call with a block 249s ConvertCodeThatCanStartToReturnNil false 249s registers an offense for an object check followed by a method call with params and a block 249s registers an offense for an object check followed by a method calls that nil responds to 249s registers an offense for an object check followed by a method call 249s allows a non-nil object check followed by a method call with params 249s allows a non-nil object check followed by a method call 249s allows a non-nil object check followed by a method call with params and a block 249s allows a non-nil object check followed by a method call with a block 249s registers an offense for a check for the object followed by a method call in the condition for an if expression 249s registers an offense for an object check followed by a method call with params 249s registers an offense for an object check followed by a method call with a block 249s method chaining 249s corrects an object check followed by a chained method call with params 249s corrects an object check followed by a chained method call with a block 249s corrects an object check followed by a chained method call with a symbol proc 249s corrects an object check followed by a chained method call 249s ConvertCodeThatCanStartToReturnNil true 249s registers an offense for an object check followed by a method call with params and a block 249s registers an offense for an object check followed by a method call with params 249s registers an offense for a check for the object followed by a method call in the condition for an if expression 249s registers an offense for a non-nil object check followed by a method call with params 249s registers an offense for an object check followed by a method call 249s registers an offense for a non-nil object check followed by a method call with a block 249s registers an offense for a non-nil object check followed by a method call with params and a block 249s registers an offense for a non-nil object check followed by a method call 249s corrects an object check followed by a method call and another check 249s registers an offense for an object check followed by a method call with a block 249s method chaining 249s registers an offense for an object check followed by chained method calls with blocks 249s MaxChainLength: 1 249s registers an offense for an object check followed by 1 chained method calls 249s allows an object check followed by 2 chained method calls 249s MaxChainLength: 3 249s allows an object check followed by 4 chained method calls 249s registers an offense for an object check followed by 3 chained method calls 249s with Lint/SafeNavigationChain disabled 249s allows an object check followed by chained method calls with blocks 249s allows an object check followed by chained method calls 249s 249s RuboCop::Cop::Style::RedundantReturn 249s does not blow up on empty method body 249s reports an offense for defs ending with return 249s reports an offense for def with only a return 249s reports an offense for defs with only a return 249s autocorrects by removing redundant returns 249s reports an offense for def ending with return with splat argument 249s accepts return in a non-final position 249s reports an offense for def ending with return 249s does not blow up on empty if body 249s when return is inside an if-branch 249s registers an offense and autocorrects 249s when rescue and return blocks present 249s registers an offense and autocorrects when rescue has else clause 249s registers an offense and autocorrects when inside function or rescue block 249s when return has no arguments 249s behaves like common behavior 249s registers an offense for return and autocorrects replacing return with nil 249s behaves like common behavior 249s registers an offense for return() and autocorrects replacing return() with nil 249s when return is inside begin-end body 249s registers an offense and autocorrects 249s when return is inside a when-branch 249s registers an offense and autocorrects 249s when multi-value returns are not allowed 249s reports an offense for defs with only a return 249s autocorrects by making an implicit hash explicit 249s reports an offense for def with only a return 249s reports an offense for defs ending with return 249s reports an offense when multiple return values have a parenthesized return value 249s autocorrects by removing return when using an explicit hash 249s reports an offense for def ending with return 249s when multi-value returns are allowed 249s accepts def with only a return 249s accepts def ending with return 249s accepts defs ending with return 249s accepts defs with only a return 249s when case nodes are empty 249s accepts empty when nodes 249s 249s RuboCop::Cop::Style::MinMax 249s with an array literal containing calls to `#min` and `#max` 249s when the expression stands alone 249s registers an offense if the receivers match 249s does not register an offense if there are additional elements 249s does not register an offense if the receivers do not match 249s does not register an offense if the receiver is implicit 249s when the expression is used in a parallel assignment 249s registers an offense if the receivers match 249s does not register an offense if the receiver is implicit 249s does not register an offense if there are additional elements 249s does not register an offense if the receivers do not match 249s when the expression is used as a return value 249s does not register an offense if there are additional elements 249s does not register an offense if the receiver is implicit 249s does not register an offense if the receivers do not match 249s registers an offense if the receivers match 249s 249s RuboCop::Cop::Lint::AmbiguousOperatorPrecedence 249s corrects a super long expression in reverse precedence order 249s does not register an offense when boolean expressions are wrapped in parens 249s registers an offense for expressions containing booleans and operators 249s registers an offense when an expression with mixed precedence has no parens 249s does not register an offense when all operators in the expression have the same precedence 249s does not register an offense when expressions are wrapped in parentheses by reverse precedence 249s does not register an offense when there is only one operator in the expression 249s does not register an offense when expressions are wrapped in parentheses by precedence 249s registers an offense when an expression with mixed boolean operators has no parens 249s allows an operator with `or` 249s corrects a super long expression in precedence order 249s registers an offense when the entire expression is wrapped in parentheses 249s allows an operator with `and` 249s 249s RuboCop::Cop::Style::InlineComment 249s registers an offense for a trailing inline comment 249s does not register an offense for a standalone comment 249s does not register an offense for special rubocop inline comments 249s 249s RuboCop::Cop::Lint::RequireRelativeSelfPath 249s registers an offense when using `require_relative` with self file path argument 249s does not register an offense when using `require_relative` without argument 249s does not register an offense when the filename is the same but the extension does not match 249s does not register an offense when using `require_relative` without self file path argument 249s does not register an offense when using a variable as an argument of `require_relative` 249s registers an offense when using `require_relative` with self file path argument (with ext) 249s 249s RuboCop::Cop::Security::Eval 249s registers an offense for eval with string that has an interpolation 249s accepts eval with no arguments 249s accepts eval with a multiline string 249s registers an offense for eval as command 249s accepts eval as method 249s accepts eval on a literal string 249s registers an offense `Binding#eval` 249s registers an offense for eval as function 249s accepts eval with a string that interpolates a literal 249s accepts eval as variable 249s with an explicit binding, filename, and line number 249s accepts eval on a literal string 249s registers an offense for eval as function 249s registers an offense for eval as command 249s 249s RuboCop::Cop::Style::MultilineTernaryOperator 249s accepts a single line ternary operator expression 249s registers an offense and corrects when condition is multiline 249s registers offense and corrects when the if branch and the else branch are on a separate line from the condition 249s registers an offense and corrects when everything is on a separate line 249s registers an offense and corrects when condition is multiline and using assignment method 249s registers an offense and corrects when the false branch is on a separate line and assigning a return value 249s register an offense and corrects when returning a multiline ternary operator expression with `return` 249s register an offense and corrects when returning a multiline ternary operator expression with `next` 249s register an offense and corrects when returning a multiline ternary operator expression with method call 249s registers an offense and corrects when condition is multiline and using hash key assignment 249s registers an offense and corrects when the false branch is on a separate line 249s register an offense and corrects when returning a multiline ternary operator expression with `break` 249s 249s RuboCop::Cop::Layout::FirstHashElementLineBreak 249s ignores implicit hashes in method calls with parens 249s ignores implicit hashes in method calls without parens 249s registers an offense and corrects hash nested in a method call 249s ignores implicit hashes in method calls that are improperly formatted 249s ignores elements listed on a single line 249s registers an offense and corrects single element multi-line hash 249s registers an offense and corrects elements listed on the first line 249s 249s RuboCop::Cop::Layout::SpaceAfterSemicolon 249s does not crash if semicolon is the last character of the file 249s registers an offense and corrects semicolon without space after it 249s inside block braces 249s when EnforcedStyle for SpaceInsideBlockBraces is no_space 249s accepts no space between a semicolon and a closing brace 249s behaves like common behavior 249s accepts a space between a semicolon and a closing brace 249s when EnforcedStyle for SpaceInsideBlockBraces is space 249s registers an offense and corrects no space between a semicolon and a closing brace 249s behaves like common behavior 249s accepts a space between a semicolon and a closing brace 249s 249s RuboCop::Cop::Style::NumericLiteralPrefix 249s binary literals 249s registers an offense for uppercase prefix 249s does not register offense for lowercase prefix 249s octal literals 249s when config is zero_only 249s does not register offense for prefix `0` 249s registers an offense for prefix `0O` and `0o` 249s when config is zero_with_o 249s does not register offense for lowercase prefix 249s registers an offense for prefixes `0` and `0O` 249s decimal literals 249s registers an offense for prefixes 249s does not register offense for no prefix 249s hex literals 249s does not register offense for lowercase prefix 249s registers an offense for uppercase prefix 249s 249s RuboCop::Cop::InternalAffairs::OffenseLocationKeyword 249s does not register an offense when the `loc` is on a different node 249s does not register an offense when the `loc` is on a child node 249s when `node.loc.selector` is passed 249s registers an offense if message argument is passed 249s registers an offense 249s 249s RuboCop::Cop::Lint::NestedPercentLiteral 249s registers no offense for percent modifier character in isolation 249s registers no offense for nestings under percent 249s registers no offense for array 249s registers offense for multiply nested percent literals 249s registers offense for repeated nested percent literals 249s registers offense for nested percent literals 249s registers no offense for empty array 249s registers no offense for percents in the middle of literals 249s when handling invalid UTF8 byte sequence 249s registers offense for nested percent literal 249s registers no offense for array 249s 249s RuboCop::Cop::Style::DefWithParentheses 249s accepts empty parentheses in one liners 249s accepts def without arguments 249s reports an offense for class def with empty parens 249s accepts def with arg and parens 249s reports an offense for def with empty parens 249s Ruby >= 3.0 249s reports an offense for endless method definition with empty parens 249s 249s RuboCop::Cop::Lint::DuplicateElsifCondition 249s does not register an offense for non-repeated elsif conditions 249s registers multiple offenses for multiple repeated elsif conditions 249s registers an offense for repeated elsif conditions 249s registers an offense for subsequent repeated elsif conditions 249s does not register an offense for partially repeated elsif conditions 249s 249s RuboCop::Cop::Lint::RandOne 249s behaves like offenses 249s rand(-1.0) 249s registers an offense 249s behaves like no offense 249s ::Kernel.rand 249s does not register an offense 249s behaves like no offense 249s rand 249s does not register an offense 249s behaves like offenses 249s Kernel.rand(-1) 249s registers an offense 249s behaves like offenses 249s Kernel.rand 1.0 249s registers an offense 249s behaves like no offense 249s Kernel.rand 2 249s does not register an offense 249s behaves like offenses 249s rand(-1) 249s registers an offense 249s behaves like no offense 249s rand(2) 249s does not register an offense 249s behaves like offenses 249s ::Kernel.rand(1) 249s registers an offense 249s behaves like offenses 249s rand(1.0) 249s registers an offense 249s behaves like no offense 249s Kernel.rand(-1..1) 249s does not register an offense 249s behaves like offenses 249s rand 1 249s registers an offense 249s behaves like offenses 249s Kernel.rand(1) 249s registers an offense 249s behaves like no offense 249s Kernel.rand 249s does not register an offense 249s behaves like offenses 249s Kernel.rand(-1.0) 249s registers an offense 249s behaves like no offense 249s rand(-1..1) 249s does not register an offense 249s 249s RuboCop::Cop::Style::MultilineBlockChain 249s accepts a chain of blocks spanning one line 249s accepts a multi-line block chained with calls on one line 249s accepts a chain of calls followed by a multi-line block 249s with multi-line block chaining 249s registers two offenses for a chain of three blocks 249s registers an offense for a simple case 249s registers an offense for a chain where the second block is single-line 249s registers an offense for a slightly more complicated case 249s accepts a chain where the first block is single-line 249s Ruby 2.7 249s registers an offense for a slightly more complicated case 249s 249s RuboCop::Cop::Layout::SpaceAfterColon 249s accepts required keyword arguments 249s accepts if 249s accepts hashes with a space after colons 249s accepts colon in ternary followed by space 249s accepts colons in symbols 249s accepts hash rockets 249s registers an offense and corrects a keyword optional argument without a space 249s registers an offense and corrects colon without space after it 249s accepts colons in strings 249s accepts colons denoting required keyword argument 249s Ruby >= 3.1 249s accepts colons denoting hash value omission argument 249s does not register an offense colon without space after it when using hash value omission 249s 249s RuboCop::Cop::Lint::ConstantResolution 249s registers no offense when qualifying a const 249s registers an offense not qualifying a const 249s registers an offense not qualifying a namespace const 249s registers no offense qualifying a namespace const 249s module & class definitions 249s does not register offense 249s with Ignore set 249s registers an offense not qualifying another const 249s registers no offense qualifying a namespace const 249s registers no offense when qualifying a const 249s registers no offense with an unqualified const 249s registers an with a namespace const 249s registers no offense when an unqualified namespace const 249s with Only set 249s registers no offense qualifying a namespace const 249s registers no with a namespace const 249s registers an offense when an unqualified namespace const 249s registers no offense not qualifying another const 249s registers an offense with an unqualified const 249s registers no offense when qualifying a const 249s 249s RuboCop::Cop::Lint::AmbiguousAssignment 249s does not register an offense when no mistype assignments 249s registers an offense when using `-` with `x` 249s does not register an offense when no mistype assignments 249s registers an offense when using `!` with `X` 249s registers an offense when using `*` with `X` 249s does not register an offense when no mistype assignments 249s registers an offense when using `+` with `@x` 249s registers an offense when using `*` with `@@x` 249s does not register an offense when no mistype assignments 249s registers an offense when using `-` with `@@x` 249s registers an offense when using `*` with `@x` 249s registers an offense when using `!` with `$x` 249s does not register an offense when no mistype assignments 249s does not register an offense when no mistype assignments 249s does not register an offense when no mistype assignments 249s does not register an offense when no mistype assignments 249s registers an offense when using `-` with `$x` 249s registers an offense when using `+` with `@@x` 249s registers an offense when using `*` with `$x` 250s registers an offense when using `+` with `X` 250s does not register an offense when no mistype assignments 250s does not register an offense when no mistype assignments 250s registers an offense when using `*` with `x` 250s does not register an offense when no mistype assignments 250s does not register an offense when no mistype assignments 250s registers an offense when using `-` with `X` 250s registers an offense when using `!` with `x` 250s does not register an offense when no mistype assignments 250s registers an offense when using `-` with `@x` 250s does not register an offense when no mistype assignments 250s does not register an offense when no mistype assignments 250s does not register an offense when no mistype assignments 250s registers an offense when using `+` with `x` 250s does not register an offense when no mistype assignments 250s registers an offense when using `!` with `@x` 250s does not register an offense when no mistype assignments 250s registers an offense when using `!` with `@@x` 250s registers an offense when using `+` with `$x` 250s does not register an offense when no mistype assignments 250s does not register an offense when no mistype assignments 250s 250s RuboCop::Cop::Layout::FirstArrayElementIndentation 250s when array is method argument 250s and argument are not surrounded by parentheses 250s 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 250s registers an offense and corrects incorrectly indented multi-line array with brackets 250s accepts bracketless array 250s accepts a correctly indented multi-line array with brackets 250s accepts single line array with brackets 250s accepts indent based on the left bracket when the outer hash key and the left bracket is not on the same line 250s 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 250s registers an offense for incorrectly indented multi-line array that is the value of a single pair hash 250s and arguments are surrounded by parentheses 250s and EnforcedStyle is special_inside_parentheses 250s accepts normal indentation for array within array 250s accepts special indentation for second argument 250s accepts special indentation for first argument 250s registers an offense and corrects 'consistent' indentation 250s registers an offense for incorrectly indented multi-line array that is the value of a single pair hash 250s accepts indent based on the left brace when the outer hash key and the left bracket is not on the same line 250s 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 250s accepts indent based on the preceding left parenthesis when the right bracket and its following pair is on the same line 250s registers an offense and corrects 'align_brackets' indentation 250s when using safe navigation operator 250s registers an offense and corrects 'consistent' indentation 250s and EnforcedStyle is consistent 250s registers an offense for incorrectly indented multi-line array that is the value of a single pair hash 250s 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 250s registers an offense and corrects incorrect indentation 250s accepts normal indentation for second argument 250s 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 250s accepts indent based on the left brace when the outer hash key and the left bracket is not on the same line 250s accepts normal indentation for first argument 250s when array is right hand side in assignment 250s accepts multi-assignments with no brackets 250s accepts multi-assignments with brackets 250s accepts correctly indented first element 250s registers an offense and corrects incorrectly indented first element 250s accepts a first element on the same line as the left bracket 250s accepts several elements per line 250s accepts single line array 250s accepts an empty array 250s when array is operand 250s accepts correctly indented first element 250s registers an offense and corrects incorrectly indented first element 250s registers an offense and corrects incorrectly indented ] 250s when indentation width is overridden for this cop 250s registers an offense and corrects incorrectly indented 1st element 250s accepts correctly indented first element 250s when EnforcedStyle is align_brackets 250s accepts multi-assignments with brackets 250s accepts a first element on the same line as the left bracket 250s accepts single line array 250s accepts correctly indented first element 250s accepts multi-assignments with no brackets 250s accepts several elements per line 250s registers an offense and corrects incorrectly indented ] 250s accepts an empty array 250s when 'special_inside_parentheses' style is used 250s registers an offense and corrects incorrect indentation 250s when 'consistent' style is used 250s registers an offense and corrects incorrect indentation 250s registers an offense and corrects incorrectly indented 1st element 250s when indentation width is overridden for this cop 250s accepts correctly indented first element 250s registers an offense and corrects indentation that does not match IndentationWidth 250s when array is argument to setter 250s registers an offense and corrects incorrectly indented first element 250s accepts correctly indented first element 250s 250s RuboCop::Cop::Style::RedundantFileExtensionInRequire 250s does not register an offense when requiring filename without an extension 250s does not register an offense when requiring filename ending with `.so` 250s does not register an offense when requiring variable as a filename 250s registers an offense and corrects when requiring filename ending with `.rb` 250s 250s RuboCop::Cop::Style::ClassCheck 250s when enforced style is is_a? 250s registers an offense for kind_of? and corrects to is_a? 250s when enforced style is kind_of? 250s registers an offense for is_a? and corrects to kind_of? 250s 250s RuboCop::Cop::Style::ParenthesesAroundCondition 250s is not confused by parentheses in subexpression 250s allows parens if the condition node is a modifier while op 250s does not blow up for empty if condition 250s allows parens if the condition node is a modifier until op 250s accepts parentheses if there is no space between the keyword and (. 250s allows parens if the condition node is a modifier if op 250s does not register an offense when parentheses in multiple expressions separated by semicolon 250s allows parens if the condition node is a modifier rescue op 250s is not confused by leading parentheses in subexpression 250s does not blow up for empty unless condition 250s does not blow up when the condition is a ternary op 250s accepts parentheses around condition in a ternary 250s allows parens if the condition node is a modifier unless op 250s registers an offense for parentheses around condition 250s parentheses in multiline conditions are allowed 250s registers an offense for parentheses in single line condition 250s accepts parentheses around multiline condition 250s safe assignment is allowed 250s accepts element assignment in condition surrounded with parentheses 250s accepts setter in condition surrounded with parentheses 250s accepts variable assignment in condition surrounded with parentheses 250s safe assignment is not allowed 250s does not accept element assignment in condition surrounded with parentheses 250s does not accept variable assignment in condition surrounded with parentheses 250s parentheses in multiline conditions are not allowed 250s registers an offense for parentheses around multiline condition 250s 250s RuboCop::Cop::Lint::PercentSymbolArray 250s detecting colons or commas in a %i/%I string 250s registers an offense and corrects when one symbol has a colon but there are no commas 250s registers an offense and corrects when there are no colons but one comma 250s registers an offense and corrects when there are no colons but one comma 250s registers an offense and corrects when symbols contain colons and are comma separated 250s registers an offense and corrects when one symbol has a colon but there are no commas 250s accepts likely false positive $, 250s accepts tokens without colons or commas 250s accepts likely false positive $, 250s registers an offense and corrects when symbols contain colons and are comma separated 250s accepts tokens without colons or commas 250s with binary encoded source 250s registers an offense and corrects when tokens contain quotes 250s accepts if tokens contain no quotes 250s 250s RuboCop::Cop::Style::RedundantFetchBlock 250s with SafeForConstants: false 250s does not register an offense when using `#fetch` with constant in the block 250s with SafeForConstants: true 250s registers an offense and corrects when using `#fetch` with constant in the block 250s registers an offense and corrects when using `#fetch` with empty block 250s registers an offense and corrects when using `#fetch` with Rational in the block 250s registers an offense and corrects when using `#fetch` with Float in the block 250s does not register an offense when using `#fetch` with interpolated Symbol in the block 250s registers an offense and corrects when using `#fetch` with Complex in the block 250s does not register an offense when using `#fetch` with argument fallback 250s registers an offense and corrects when using `#fetch` with Symbol in the block 250s registers an offense and corrects when using `#fetch` with String in the block and strings are frozen 250s does not register an offense when using `#fetch` with String in the block and strings are not frozen 250s does not register an offense when using `#fetch` with `Rails.cache` 250s does not register an offense when using `#fetch` with an argument in the block 250s registers an offense and corrects when using `#fetch` with Integer in the block 250s 250s RuboCop::Cop::Lint::DuplicateMethods 250s registers an offense for duplicate attr in module 250s registers offenses for duplicate assignable attr in class 250s registers an offense for duplicate alias_method in dynamic module 250s understands nested modules 250s registers an offense for duplicate alias in module 250s registers an offense for duplicate method in class_eval block 250s registers an offense for duplicate class methods in class_eval block 250s registers an offense for duplicate nested method in module 250s registers an offense for duplicate class methods in dynamic module 250s registers an offense for duplicate method in class 250s only registers an offense for the second instance of a duplicate instance method in separate files 250s registers offenses for duplicate attr_accessor in class 250s doesn't register an offense for non-duplicate method in class 250s accepts for attr_reader and setter in class_eval block 250s registers an offense for duplicate nested method in class 250s registers an offense for duplicate private self methods in module 250s registers an offense when class << exp is used 250s accepts for non-duplicate alias_method in class_eval block 250s registers an offense for duplicate attr_writer in module 250s registers an offense for a duplicate instance method in separate module blocks 250s registers an offense for duplicate class methods with `self` and named receiver in module 250s does not register an offense for same method name defined in different self methods 250s accepts for attr_writer and getter in module 250s only registers an offense for the second instance of a duplicate instance method in separate files 250s understands nested modules 250s understands class << self 250s registers an offense for duplicate attr_writer in dynamic module 250s registers an offense for duplicate protected methods in dynamic class 250s registers an offense for a duplicate instance method in separate dynamic class blocks 250s doesn't register an offense for alias for gvar in dynamic class 250s doesn't register an offense for alias for gvar in dynamic module 250s registers an offense for duplicate private methods in module 250s doesn't register offense for non-duplicate class methods in dynamic module 250s registers an offense for duplicate attr in dynamic module 250s registers an offense when class << exp is used 250s registers an offense for duplicate class methods with `<<` and named receiver in class 250s doesn't register offense for non-duplicate class methods in class_eval block 250s registers an offense when class << exp is used 250s doesn't register an offense for non-duplicate alias in class_eval block 250s only registers an offense for the second instance of a duplicate instance method in separate files 250s understands class << self 250s registers an offense for duplicate private self methods in dynamic module 250s understands nested modules 250s registers an offense for a duplicate class method in separate class_eval block blocks 250s registers an offense for duplicate attr_writer in dynamic class 250s registers offenses for duplicate attr_accessor in module 250s registers an offense for duplicate private self methods in class 250s registers an offense for duplicate class methods in module 250s registers an offense for a duplicate class method in separate module blocks 250s registers an offense for duplicate methods at top level 250s registers an offense for a duplicate class method in separate dynamic module blocks 250s recognizes difference between instance and class methods in dynamic module 250s registers an offense for duplicate protected methods in dynamic module 250s registers offenses for duplicate assignable attr in class_eval block 250s doesn't register offense for non-duplicate class methods in class 250s accepts for attr_reader and setter in module 250s accepts for non-duplicate alias_method in module 250s accepts for attr_reader and setter in dynamic class 250s understands class << A 250s registers an offense for duplicate protected methods in class_eval block 250s doesn't register an offense for different private methods in class 250s doesn't register an offense for alias for gvar in module 250s does not register for the same method in different scopes within `class << self` 250s registers offenses for duplicate assignable attr in module 250s registers an offense for a duplicate class method in separate class blocks 250s registers an offense for duplicate nested method in dynamic class 250s registers an offense for duplicate class methods in class 250s registers an offense for duplicate nested method in class_eval block 250s accepts for attr_writer and getter in dynamic module 250s understands nested modules 250s does not register an offense for same method name defined in different methods 250s registers an offense for duplicate class methods with named receiver in class 250s doesn't register an offense for different private methods in dynamic class 250s registers an offense for duplicate private self methods in class_eval block 250s accepts for attr_reader and setter in class 250s registers an offense for duplicate alias in dynamic module 250s registers an offense for duplicate alias in class 250s registers an offense for duplicate private methods in dynamic module 250s registers an offense for duplicate class methods with `<<` and named receiver in module 250s registers an offense for duplicate nested method in self method of class_eval block 250s registers an offense for duplicate alias_method in module 250s registers an offense for duplicate alias in class_eval block 250s does not register an offense for same method name defined in different methods 250s recognizes difference between instance and class methods in dynamic class 250s registers 2 offenses for pair of duplicate methods in dynamic class 250s doesn't register an offense for non-duplicate alias in module 250s doesn't register offense for non-duplicate class methods in module 250s registers an offense when class << exp is used 250s doesn't register an offense for different private methods in class_eval block 250s doesn't register an offense for alias for gvar in class_eval block 250s registers an offense for duplicate attr in class 250s ignores Class.new blocks which are assigned to local variables 250s registers an offense for duplicate private self methods in dynamic class 250s registers an offense for duplicate method in dynamic class 250s only registers an offense for the second instance of a duplicate instance method in separate files 250s recognizes difference between instance and class methods in class 250s understands nested modules 250s registers an offense for duplicate alias in dynamic class 250s registers offenses for duplicate attr_accessor in dynamic class 250s understands class << self 250s only registers an offense for the second instance of a duplicate instance method in separate files 250s registers an offense for duplicate protected methods in module 250s registers 2 offenses for pair of duplicate methods in class_eval block 250s registers an offense for duplicate nested method in self method of class 250s registers an offense for a duplicate class method in separate dynamic class blocks 250s registers an offense for a duplicate instance method in separate class_eval block blocks 250s accepts for non-duplicate alias_method in dynamic class 250s accepts for non-duplicate alias_method in class 250s properly registers and offense when deeply nested 250s registers an offense for duplicate attr_writer in class_eval block 250s registers an offense for duplicate private methods in class_eval block 250s registers an offense for duplicate attr_reader in module 250s does not register an offense for same method name defined in different self methods 250s doesn't register an offense for alias for gvar in class 250s registers an offense for duplicate attr_reader in class 250s doesn't register an offense for non-duplicate method in class_eval block 250s registers offenses for duplicate assignable attr in dynamic module 250s accepts for non-duplicate alias_method in dynamic module 250s registers offenses for duplicate attr_accessor in dynamic module 250s registers an offense for duplicate nested method in self method of dynamic class 250s accepts for attr_writer and getter in dynamic class 250s registers an offense for duplicate class methods in dynamic class 250s registers offenses for duplicate assignable attr in dynamic class 250s does not register an offense for same method name defined in different self methods 250s registers an offense for duplicate alias_method in dynamic class 250s doesn't register an offense for non-duplicate method in module 250s doesn't register an offense for non-duplicate method in dynamic module 250s registers 2 offenses for pair of duplicate methods in class 250s doesn't register an offense for non-duplicate alias in dynamic class 250s registers an offense for duplicate class methods with named receiver in module 250s registers an offense for duplicate class methods with `self` and named receiver in class 250s registers an offense for a duplicate instance method in separate dynamic module blocks 250s registers an offense for a duplicate instance method in separate class blocks 250s doesn't register offense for non-duplicate class methods in dynamic class 250s accepts for attr_reader and setter in dynamic module 250s doesn't register an offense for different private methods in dynamic module 250s registers an offense when class << exp is used 250s doesn't register an offense for non-duplicate alias in dynamic module 250s registers an offense for duplicate method in dynamic module 250s registers an offense for duplicate alias_method in class_eval block 250s registers an offense for duplicate nested method in self method of module 250s does not register an offense for same method name defined in different methods 250s registers an offense for duplicate alias_method in class 250s registers offenses for duplicate attr_accessor in class_eval block 250s does not register an offense for same method name defined in different self methods 250s does not register an offense for same method name defined in different methods 250s accepts for attr_writer and getter in class 250s doesn't register an offense for non-duplicate alias in class 250s registers an offense for duplicate private methods in class 250s registers an offense for duplicate nested method in self method of dynamic module 250s registers an offense for duplicate attr in dynamic class 250s does not register an offense for same method name defined in different methods 250s does not register an offense for same method name defined in different self methods 251s registers 2 offenses for pair of duplicate methods in dynamic module 251s recognizes difference between instance and class methods in module 251s doesn't register an offense for different private methods in module 251s registers an offense for duplicate attr_reader in dynamic class 251s registers an offense for duplicate method in module 251s registers 2 offenses for pair of duplicate methods in module 251s understands class << self 251s registers an offense for duplicate attr_reader in class_eval block 251s registers an offense for duplicate attr_writer in class 251s handles class_eval with implicit receiver 251s registers an offense for duplicate attr in class_eval block 251s ignores method definitions in RSpec `describe` blocks 251s understands class << self 251s registers an offense for duplicate protected methods in class 251s doesn't register an offense for non-duplicate method in dynamic class 251s recognizes difference between instance and class methods in class_eval block 251s registers an offense for duplicate nested method in dynamic module 251s registers an offense for duplicate attr_reader in dynamic module 251s accepts for attr_writer and getter in class_eval block 251s registers an offense for duplicate private methods in dynamic class 251s when path is not in the project root 251s adds a message with absolute path 251s when path is in the project root 251s adds a message with relative path 251s 251s RuboCop::Cop::Style::SymbolLiteral 251s accepts string syntax when symbol start with a digit 251s accepts string syntax when symbols have special chars in them 251s registers an offense for word-line symbols using string syntax 251s accepts string syntax when symbols have whitespaces in them 251s 251s RuboCop::Cop::Lint::EmptyEnsure 251s registers an offense and corrects empty ensure 251s does not register an offense for non-empty ensure 251s 251s RuboCop::Formatter::DisabledConfigFormatter 251s when no files are inspected 251s creates a .rubocop_todo.yml even in such case 251s when any offenses are detected 251s displays YAML configuration disabling all cops with offenses 251s with autocorrect supported cop 251s adds a comment about --autocorrect option 251s when exclude_limit option is passed 251s respects the file exclusion list limit 251s when there's .rubocop.yml 251s merges in excludes from .rubocop.yml 251s when exclude_limit option is omitted 251s disables the cop with 15 offending files 251s 251s RuboCop::Cop::Style::DisableCopsWithinSourceCodeDirective 251s registers an offense for disabled cop within source code 251s registers an offense for enabled cop within source code 251s registers an offense for disabling all cops 251s with AllowedCops 251s when an allowed cop is disabled 251s does not register an offense 251s when an non-allowed cop is disabled 251s registers an offense and corrects 251s when using leading source comment 251s does not register an offense 251s when an mix of cops are disabled 251s registers an offense and corrects 251s 251s RuboCop::Cop::Naming::ClassAndModuleCamelCase 251s allows module_parent method 251s accepts CamelCase names 251s is not fooled by qualified names 251s registers an offense for underscore in class and module name 251s custom allowed names 251s does not register offense for multiple allowed names 251s 251s RuboCop::Cop::Lint::EmptyFile 251s does not register an offense when the file contains comments 251s registers an offense when the file is empty 251s does not register an offense when the file contains code 251s when AllowComments is false 251s registers an offense when the file contains comments 251s 251s RuboCop::Cop::EnforceSuperclass 251s registers an offense for single-line definitions 251s registers an offense for top-level constant ::Class.new definition 251s registers an offense for models that subclass ActiveRecord::Base 251s registers an offense for models that subclass ::ActiveRecord::Base 251s registers an offense for model defined using top-level 251s registers an offense for Class.new definition 251s when MyModel subclasses ApplicationRecord 251s behaves like no offense 251s registers no offenses for `class MyModel < ApplicationRecord; end` 251s behaves like no offense 251s registers no offenses for `MyModel = ::Class.new(::ApplicationRecord) do 251s end 251s MyModel = ::Class.new(::ApplicationRecord) 251s ` 251s behaves like no offense 251s registers no offenses for `class MyModel < ::ApplicationRecord; end` 251s behaves like no offense 251s registers no offenses for `MyModel = Class.new(ApplicationRecord) do 251s end 251s MyModel = Class.new(ApplicationRecord) 251s ` 251s when ApplicationRecord subclasses ActiveRecord::Base 251s behaves like no offense 251s registers no offenses for `ApplicationRecord = Class.new(::ActiveRecord::Base) do; end 251s ` 251s behaves like no offense 251s registers no offenses for `ApplicationRecord = Class.new(ActiveRecord::Base) 251s ` 251s behaves like no offense 251s registers no offenses for `::ApplicationRecord = Class.new(ActiveRecord::Base) do; end 251s ` 251s behaves like no offense 251s registers no offenses for `class ApplicationRecord < ActiveRecord::Base; end` 251s behaves like no offense 251s registers no offenses for `class ::ApplicationRecord < ActiveRecord::Base; end` 251s behaves like no offense 251s registers no offenses for `ApplicationRecord = Class.new(ActiveRecord::Base) do; end 251s ` 251s behaves like no offense 251s registers no offenses for `::ApplicationRecord = ::Class.new(::ActiveRecord::Base) do; end 251s ` 251s behaves like no offense 251s registers no offenses for `::ApplicationRecord = ::Class.new(::ActiveRecord::Base) 251s ` 251s 251s RuboCop::Cop::Layout::SpaceAroundBlockParameters 251s when EnforcedStyleInsidePipes is no_space 251s accepts line break after closing pipe 251s registers an offense and corrects a lambda for space before first parameter 251s skips lambda without args 251s registers an offense and corrects multiple spaces before parameter 251s accepts an empty block 251s skips lambda without parens 251s accepts a lambda with spaces in the right places 251s registers an offense and corrects a lambda for space after the last parameter 251s registers an offense and corrects space before first parameter 251s registers an offense and corrects for space with parens 251s registers an offense and corrects space after last parameter 251s accepts block parameters with surrounding space that includes line breaks 251s accepts a block with parameters but no body 251s registers an offense and corrects all types of spacing issues for a lambda 251s accepts a block with spaces in the right places 251s registers an offense and corrects no space after closing pipe 251s accepts a block parameter without preceding space 251s registers an offense and corrects all types of spacing issues 251s trailing comma 251s registers an offense for space after the last comma 251s registers an offense for space before and after the last comma 251s when EnforcedStyleInsidePipes is space 251s registers an offense and corrects a lambda for no space after last parameter 251s registers an offense and corrects a lambda for multiple spacesafter last parameter 251s registers an offense and corrects spacing in lambda args 251s registers an offense and corrects missing space before first argument and after last argument 251s accepts a block parameter without preceding space 251s accepts a lambda with spaces in the right places 251s registers an offense and corrects extra space before first parameter 251s registers an offense and corrects no space after closing pipe 251s registers an offense and corrects multiple spaces after last parameter 251s registers an offense and corrects a lambda for extra spacebefore first parameter 251s registers an offense for no space before first parameter 251s registers an offense and corrects no space after last parameter 251s accepts line break after closing pipe 251s registers an offense and corrects space with parens at middle 251s accepts an empty block 251s skips lambda without parens 251s skips lambda without args 251s registers an offense and corrects multiple spaces before parameter 251s registers an offense and corrects block arguments inside Hash#each 251s accepts a block with parameters but no body 251s registers an offense and corrects a lambda for no space before first parameter 251s accepts a block with spaces in the right places 251s trailing comma 251s registers an offense and corrects no space after the last comma 251s accepts space after the last comma 251s accepts space both before and after the last comma 251s 251s RuboCop::Cop::Layout::IndentationConsistency 251s with def/defs 251s accepts an empty def body 251s registers an offense and corrects bad indentation in a defs body 251s registers an offense and corrects bad indentation in a def body 251s accepts an empty defs body 251s with if statement 251s registers an offense and corrects bad indentation in an if body 251s accepts an empty if 251s accepts if/elsif/else/end laid out as a table 251s accepts an if/else in assignment with end aligned with variable and chaining after the end 251s registers an offense and corrects bad indentation in an else body 251s accepts an if/else in assignment with end aligned with variable 251s accepts if/elsif/else/end with fullwidth characters 251s accepts a correctly aligned if/elsif/else/end 251s accepts an if/else branches with rescue clauses 251s accepts an if/else in assignment with end aligned with if 251s accepts an if/else in assignment with end aligned with variable and chaining with a block after the end 251s accepts if/then/else/end laid out as another table 251s registers an offense and corrects bad indentation in an elsif body 251s accepts an if in assignment with end aligned with variable 251s accepts a one line if statement 251s accepts an if/else in assignment on next line with end aligned with if 251s accepts an if in assignment with end aligned with if 251s with top-level code 251s accepts when using access modifier at the top level 251s accepts an empty expression string interpolation 251s registers and corrects an offense when using access modifier and indented method definition at the top level 251s with block 251s does not autocorrect an offense within another offense 251s accepts a correctly indented block body 251s accepts an empty block body 251s registers an offense and correct bad indentation in a do/end body 251s registers an offense and corrects bad indentation in a {} body 251s with while/until 251s registers an offense and corrects bad indentation in an until body 251s registers an offense and corrects bad indentation in a while body 251s registers an offense and corrects bad indentation in begin/end/while 251s accepts an empty while 251s with module 251s registers an offense and corrects bad indentation of private methods 251s registers an offense and corrects bad indentation in a module body 251s accepts an empty module body 251s even when there are no public methods 251s registers an offense and corrects bad indentation of private methods 251s with case 251s accepts correctly indented case/when/else 251s registers an offense and corrects bad indentation in a case/else body 251s registers an offense and corrects bad indentation in a case/when body 251s accepts case/when/else laid out as a table 251s accepts indented when/else plus indented body 251s accepts case/when/else with then beginning a line 251s with for 251s registers an offense and corrects bad indentation in a for body 251s accepts an empty for 251s with unless 251s accepts an empty unless 251s registers an offense and corrects bad indentation in an unless body 251s with class 251s with normal style configured 251s registers an offense and corrects bad indentation in a class body 251s accepts an empty class body 251s registers an offense and corrects bad indentation in def but not for outdented public, protected, and private 251s accepts indented public, protected, and private 251s with indented_internal_methods style configured 251s accepts different indentation in different visibility sections when using `Struct.new` 251s accepts different indentation in different visibility sections 251s 251s RuboCop::Cop::Style::UnlessLogicalOperators 251s EnforcedStyle is `forbid_mixed_logical_operators` 251s does not register an offense when using `||` operator and invoked method name includes "or" in the conditional branch 251s does not register an offense when using only `||`s 251s registers an offense when using parentheses 251s does not register an offense when not using logical operator 251s does not register an offense when not used in unless 251s does not register an offense when using only `and`s 251s registers an offense when using `&&` and `or` 251s does not register an offense when using only `or`s 251s registers an offense when using `||` and `or` 251s does not register an offense when using if 251s does not register an offense when using `&&` operator and invoked method name includes "and" in the conditional branch 251s registers an offense when using `||` and `and` 251s does not register an offense when using only `&&`s 251s registers an offense when using `&&` and `and` 251s registers an offense when using `&&` and `||` 251s EnforcedStyle is `forbid_logical_operators` 251s does not register an offense when not used in unless 251s registers an offense when using only `||` 251s does not register an offense when not using logical operator 251s registers an offense when using `&&` followed by || 251s registers an offense when using only `&&` 251s registers an offense when using only `or` 251s does not register an offense when using if 251s registers an offense when using only `and` 251s 251s RuboCop::Cop::Bundler::InsecureProtocolSource 251s registers an offense when using `source :rubygems` 251s registers an offense when using `source :gemcutter` 251s does not register an offense when using `source 'https://rubygems.org'` 251s registers an offense when using `source :rubyforge` 251s when `AllowHttpProtocol: true` 251s does not register an offense when using `source 'http://rubygems.org'` 251s when `AllowHttpProtocol: false` 251s registers an offense when using `source 'http://rubygems.org'` 251s 251s RuboCop::TargetFinder 251s #find_files 251s resolves symlinks when looking for excluded directories 251s prevents infinite loops when traversing symlinks 251s works also if a folder is named "**" 251s works also if a folder is named "," 251s does not search excluded top level directories 251s works also if a folder is named "{}" 251s can exclude symlinks as well as directories 251s #target_files_in_dir 251s does not pick files with no extension and no ruby shebang 251s picks files with extension .rb 251s picks files specified to be included in config 251s picks ruby executable files with no extension 251s does not pick directories 251s does not pick files specified to be excluded in config 251s when an exception is raised while reading file 251s and debug mode is enabled 251s outputs error message 251s and debug mode is disabled 251s outputs nothing 251s w/ --fail-fast option 251s works with the expected number of .rb files 251s #find(..., :all_file_types) 251s returns absolute paths 251s does not find hidden files 251s when no argument is passed 251s finds files under the current directory 251s when a directory path is passed 251s finds files under the specified directory 251s when files with ruby interpreters are passed 251s picks all the ruby files 251s when a file with a ruby filename is passed 251s picks all the ruby files 251s when files with a ruby extension are passed 251s picks all the ruby files 251s when local AllCops/Include lists two patterns 251s picks all the ruby files 251s when a subdirectory AllCops/Include only lists one pattern 251s picks all the ruby files 251s when a non-ruby file is passed 251s picks the file 251s when same paths are passed 251s does not return duplicated file paths 251s when a hidden directory path is passed 251s finds files under the specified directory 251s when some non-known Ruby files are specified in the configuration Include and they are explicitly passed as arguments 251s includes them 251s when some paths are specified in the configuration Exclude and they are explicitly passed as arguments 251s normally 251s does not exclude them 251s when it's forced to adhere file exclusion configuration 251s excludes them 251s when a pattern is passed 251s finds files which match the pattern 251s when some non-known Ruby files are specified in the configuration Include and they are not explicitly passed as arguments 251s includes them 251s when input is passed on stdin 251s includes the file 251s #find(..., :only_recognized_file_types) 251s does not find hidden files 251s returns absolute paths 251s when files with a ruby extension are passed 251s picks all the ruby files 251s when local AllCops/Include lists two patterns 251s picks two files 251s when a subdirectory AllCops/Include only lists one pattern 252s picks two files 252s when a non-ruby file is passed 252s doesn't pick the file 252s when files with ruby interpreters are passed 252s picks all the ruby files 252s when some paths are specified in the configuration Exclude and they are explicitly passed as arguments 252s normally 252s does not exclude them 252s when it's forced to adhere file exclusion configuration 252s excludes them 252s when no argument is passed 252s finds files under the current directory 252s when a hidden directory path is passed 252s finds files under the specified directory 252s when a directory path is passed 252s finds files under the specified directory 252s when same paths are passed 252s does not return duplicated file paths 252s when a hidden directory path is passed 252s finds files under the specified directory 252s when some non-known Ruby files are specified in the configuration Include and they are not explicitly passed as arguments 252s includes them 252s when input is passed on stdin 252s includes the file 252s when a pattern is passed 252s finds files which match the pattern 252s when some non-known Ruby files are specified in the configuration Include and they are explicitly passed as arguments 252s includes them 252s when a file with a ruby filename is passed 252s picks all the ruby files 252s 252s RuboCop::Cop::Bundler::GemVersion 252s when EnforcedStyle is set to required (default) 252s does not flag gems with a specified version 252s does not flag gems included in AllowedGems metadata 252s flags gems that do not specify a version 252s when EnforcedStyle is set to forbidden 252s does not flag gems without a specified version 252s does not flag gems included in AllowedGems metadata 252s flags gems that specify a gem version 252s 252s RuboCop::Cop::Style::DoubleCopDisableDirective 252s does not register an offense for cops with single cop directive 252s registers an offense for duplicate todo directives 252s registers an offense for duplicate disable directives 252s 252s RuboCop::Cop::VariableForce::VariableTable 252s #find_variable with an empty scope stack 252s returns nil 252s #find_variable 252s when current scope is block 252s when a variable with the target name exists in current scope 252s and does not exist in outer scope 252s returns the current scope variable 252s and also exists in outer scope 252s returns the current scope variable 252s when a variable with the target name does not exist in current scope 252s but exists in the direct outer scope 252s returns the direct outer scope variable 252s but exists in a indirect outer scope 252s when the direct outer scope is not block 252s returns nil 252s when the direct outer scope is block 252s returns the indirect outer scope variable 252s and does not exist in all outer scopes 252s returns nil 252s when current scope is not block 252s when a variable with the target name exists in current scope 252s and does not exist in outer scope 252s returns the current scope variable 252s and also exists in outer scope 252s returns the current scope variable 252s when a variable with the target name does not exist in current scope 252s and does not exist in all outer scopes 252s returns nil 252s but exists in the direct outer scope 252s returns nil 252s #current_scope_level 252s increases by pushing scope 252s decreases by popping scope 252s #declare_variable 252s returns the added variable 252s adds variable to current scope with its name as key 252s #accessible_variables 252s when the direct outer scope has some variables 252s and the current scope is block 252s returns the current and direct outer scope variables 252s and the current scope is not block 252s returns only the current scope variables 252s when there are no variables 252s returns empty array 252s when the current scope has some variables 252s returns all the variables 252s #pop_scope 252s returns popped scope object 252s #push_scope 252s returns pushed scope object 252s 252s RuboCop::Cop::Style::IfInsideElse 252s ignores nested ternary expressions 252s ignores if inside unless 252s catches an if..elsif..else nested inside an else 252s handles a nested `if...then...else...end` 252s handles a nested `if...then...end` 252s catches an `if..else` nested inside an `else` and nested inside `if` branch code is empty 252s isn't offended by if..elsif..else 252s catches an if..else nested inside an else 252s catches a modifier if nested inside an else after elsif 252s ignores unless inside else 252s handles a nested `if...then...elsif...else...end` 252s catches an if node nested inside an else 252s ignores ternary inside if..else 252s isn't offended if there is a statement preceding the if node 252s handles a nested `if...then...elsif...end` 252s isn't offended if there is a statement following the if node 252s handles a nested multiline `if...then...elsif...else...end` 252s when AllowIfModifier is false 252s catches a modifier if nested inside an else 252s when AllowIfModifier is true 252s accepts a modifier if nested inside an else 252s 252s Pending: (Failures listed here are expected and do not affect your suite's status) 252s 252s 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 252s # Requires an advanced logic that checks whether the return value of an operator assignment is used or not. 252s Failure/Error: 252s expect_offense(<<~RUBY) 252s def some_method 252s total = 0 252s foo = 0 252s 252s while total < 100 252s total += 1 252s foo += 1 252s ^^^ Useless assignment to variable - `foo`. 252s end 252s 252s Diff: 252s @@ -5,7 +5,6 @@ 252s while total < 100 252s total += 1 252s foo += 1 252s - ^^^ Useless assignment to variable - `foo`. 252s end 252s 252s total 252s # /usr/share/rubygems-integration/all/gems/rubocop-1.39.0/lib/rubocop/rspec/expect_offense.rb:123:in `expect_offense' 252s # ./spec/rubocop/cop/lint/useless_assignment_spec.rb:341:in `block (3 levels) in ' 252s # /usr/share/rubygems-integration/all/gems/webmock-3.25.1/lib/webmock/rspec.rb:39:in `block (2 levels) in ' 252s 252s Failures: 252s 252s 1) RuboCop::Cop::Style::RedundantRegexpCharacterClass with a character class containing an escaped-0 does not register an offense 252s Failure/Error: expect_no_offenses('foo = /[\032]/') 252s 252s expected: "foo = /[\\032]/" 252s got: "foo = /[\\032]/ ^^^^^^ Redundant single-element character class, `[\\032]` can be replaced with `\\032`.\n" 252s 252s (compared using ==) 252s 252s Diff: 252s @@ -1 +1 @@ 252s -foo = /[\032]/ 252s +foo = /[\032]/ ^^^^^^ Redundant single-element character class, `[\032]` can be replaced with `\032`. 252s # /usr/share/rubygems-integration/all/gems/rubocop-1.39.0/lib/rubocop/rspec/expect_offense.rb:184:in `expect_no_offenses' 252s # ./spec/rubocop/cop/style/redundant_regexp_character_class_spec.rb:315:in `block (3 levels) in ' 252s # /usr/share/rubygems-integration/all/gems/webmock-3.25.1/lib/webmock/rspec.rb:39:in `block (2 levels) in ' 252s 252s Finished in 2 minutes 2.2 seconds (files took 5.48 seconds to load) 252s 19119 examples, 1 failure, 1 pending 252s 252s Failed examples: 252s 252s 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 252s 252s Randomized with seed 59049 252s 253s /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 253s mv ./.gem2deb.lib lib 253s autopkgtest [18:46:22]: test gem2deb-test-runner: -----------------------] 254s autopkgtest [18:46:23]: test gem2deb-test-runner: - - - - - - - - - - results - - - - - - - - - - 254s gem2deb-test-runner FAIL non-zero exit status 1 254s autopkgtest [18:46:23]: @@@@@@@@@@@@@@@@@@@@ summary 254s gem2deb-test-runner FAIL non-zero exit status 1