0s autopkgtest [11:01:21]: starting date: 2024-03-11 0s autopkgtest [11:01:21]: git checkout: d9c0295 adt_testbed.py: supress warnings from apt using a shell pipeline 0s autopkgtest [11:01:21]: host juju-7f2275-prod-proposed-migration-environment-3; command line: /home/ubuntu/autopkgtest/runner/autopkgtest --output-dir /tmp/autopkgtest-work.f8dj86p6/out --timeout-copy=6000 --setup-commands /home/ubuntu/autopkgtest-cloud/worker-config-production/setup-canonical.sh --setup-commands /home/ubuntu/autopkgtest/setup-commands/setup-testbed --apt-pocket=proposed=src:ruby3.1,src:openssl --apt-upgrade rubocop --timeout-short=300 --timeout-copy=20000 --timeout-build=20000 '--env=ADT_TEST_TRIGGERS=ruby3.1/3.1.2-7ubuntu5 openssl/3.0.13-0ubuntu1' -- ssh -s /home/ubuntu/autopkgtest/ssh-setup/nova -- --flavor autopkgtest --security-groups autopkgtest-juju-7f2275-prod-proposed-migration-environment-3@bos03-arm64-24.secgroup --name adt-noble-arm64-rubocop-20240311-110120-juju-7f2275-prod-proposed-migration-environment-3 --image adt/ubuntu-noble-arm64-server --keyname testbed-juju-7f2275-prod-proposed-migration-environment-3 --net-id=net_prod-proposed-migration -e TERM=linux -e ''"'"'http_proxy=http://squid.internal:3128'"'"'' -e ''"'"'https_proxy=http://squid.internal:3128'"'"'' -e ''"'"'no_proxy=127.0.0.1,127.0.1.1,login.ubuntu.com,localhost,localdomain,novalocal,internal,archive.ubuntu.com,ports.ubuntu.com,security.ubuntu.com,ddebs.ubuntu.com,changelogs.ubuntu.com,launchpadlibrarian.net,launchpadcontent.net,launchpad.net,10.24.0.0/24,keystone.ps5.canonical.com,objectstorage.prodstack5.canonical.com'"'"'' --mirror=http://ftpmaster.internal/ubuntu/ 105s autopkgtest [11:03:06]: @@@@@@@@@@@@@@@@@@@@ test bed setup 106s Get:1 http://ftpmaster.internal/ubuntu noble-proposed InRelease [117 kB] 106s Get:2 http://ftpmaster.internal/ubuntu noble-proposed/main Sources [434 kB] 106s Get:3 http://ftpmaster.internal/ubuntu noble-proposed/universe Sources [2621 kB] 106s Get:4 http://ftpmaster.internal/ubuntu noble-proposed/restricted Sources [3976 B] 106s Get:5 http://ftpmaster.internal/ubuntu noble-proposed/multiverse Sources [37.3 kB] 106s Get:6 http://ftpmaster.internal/ubuntu noble-proposed/main arm64 Packages [581 kB] 107s Get:7 http://ftpmaster.internal/ubuntu noble-proposed/main arm64 c-n-f Metadata [3144 B] 107s Get:8 http://ftpmaster.internal/ubuntu noble-proposed/restricted arm64 Packages [20.3 kB] 107s Get:9 http://ftpmaster.internal/ubuntu noble-proposed/restricted arm64 c-n-f Metadata [116 B] 107s Get:10 http://ftpmaster.internal/ubuntu noble-proposed/universe arm64 Packages [2966 kB] 107s Get:11 http://ftpmaster.internal/ubuntu noble-proposed/universe arm64 c-n-f Metadata [8528 B] 107s Get:12 http://ftpmaster.internal/ubuntu noble-proposed/multiverse arm64 Packages [39.6 kB] 107s Get:13 http://ftpmaster.internal/ubuntu noble-proposed/multiverse arm64 c-n-f Metadata [116 B] 108s Fetched 6832 kB in 1s (4664 kB/s) 108s Reading package lists... 110s Reading package lists... 111s Building dependency tree... 111s Reading state information... 111s Calculating upgrade... 111s The following packages will be REMOVED: 111s libssl3 111s The following NEW packages will be installed: 111s libssl3t64 111s The following packages will be upgraded: 111s openssl 112s 1 upgraded, 1 newly installed, 1 to remove and 0 not upgraded. 112s Need to get 2753 kB of archives. 112s After this operation, 72.7 kB of additional disk space will be used. 112s Get:1 http://ftpmaster.internal/ubuntu noble-proposed/main arm64 openssl arm64 3.0.13-0ubuntu1 [983 kB] 112s Get:2 http://ftpmaster.internal/ubuntu noble-proposed/main arm64 libssl3t64 arm64 3.0.13-0ubuntu1 [1770 kB] 112s Fetched 2753 kB in 1s (4104 kB/s) 113s (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 ... 74748 files and directories currently installed.) 113s Preparing to unpack .../openssl_3.0.13-0ubuntu1_arm64.deb ... 113s Unpacking openssl (3.0.13-0ubuntu1) over (3.0.10-1ubuntu4) ... 113s dpkg: libssl3:arm64: dependency problems, but removing anyway as you requested: 113s wget depends on libssl3 (>= 3.0.0). 113s u-boot-tools depends on libssl3 (>= 3.0.0). 113s tnftp depends on libssl3 (>= 3.0.0). 113s tcpdump depends on libssl3 (>= 3.0.0). 113s systemd-resolved depends on libssl3 (>= 3.0.0). 113s systemd depends on libssl3 (>= 3.0.0). 113s sudo depends on libssl3 (>= 3.0.0). 113s sbsigntool depends on libssl3 (>= 3.0.0). 113s rsync depends on libssl3 (>= 3.0.0). 113s python3-cryptography depends on libssl3 (>= 3.0.0). 113s openssh-server depends on libssl3 (>= 3.0.10). 113s openssh-client depends on libssl3 (>= 3.0.10). 113s mtd-utils depends on libssl3 (>= 3.0.0). 113s mokutil depends on libssl3 (>= 3.0.0). 113s linux-headers-6.8.0-11-generic depends on libssl3 (>= 3.0.0). 113s libsystemd-shared:arm64 depends on libssl3 (>= 3.0.0). 113s libssh-4:arm64 depends on libssl3 (>= 3.0.0). 113s libsasl2-modules:arm64 depends on libssl3 (>= 3.0.0). 113s libsasl2-2:arm64 depends on libssl3 (>= 3.0.0). 113s libpython3.12-minimal:arm64 depends on libssl3 (>= 3.0.0). 113s libnvme1 depends on libssl3 (>= 3.0.0). 113s libkrb5-3:arm64 depends on libssl3 (>= 3.0.0). 113s libkmod2:arm64 depends on libssl3 (>= 3.0.0). 113s libfido2-1:arm64 depends on libssl3 (>= 3.0.0). 113s libcurl4:arm64 depends on libssl3 (>= 3.0.0). 113s libcryptsetup12:arm64 depends on libssl3 (>= 3.0.0). 113s kmod depends on libssl3 (>= 3.0.0). 113s dhcpcd-base depends on libssl3 (>= 3.0.0). 113s bind9-libs:arm64 depends on libssl3 (>= 3.0.0). 113s 113s (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 ... 74748 files and directories currently installed.) 113s Removing libssl3:arm64 (3.0.10-1ubuntu4) ... 113s Selecting previously unselected package libssl3t64:arm64. 113s (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 ... 74737 files and directories currently installed.) 113s Preparing to unpack .../libssl3t64_3.0.13-0ubuntu1_arm64.deb ... 113s Unpacking libssl3t64:arm64 (3.0.13-0ubuntu1) ... 113s Setting up libssl3t64:arm64 (3.0.13-0ubuntu1) ... 113s Setting up openssl (3.0.13-0ubuntu1) ... 113s Processing triggers for man-db (2.12.0-3) ... 114s Processing triggers for libc-bin (2.39-0ubuntu2) ... 114s Reading package lists... 114s Building dependency tree... 114s Reading state information... 115s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 117s sh: Attempting to set up Debian/Ubuntu apt sources automatically 117s sh: Distribution appears to be Ubuntu 118s Reading package lists... 118s Building dependency tree... 118s Reading state information... 119s eatmydata is already the newest version (131-1). 119s dbus is already the newest version (1.14.10-4ubuntu1). 119s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 119s Reading package lists... 119s Building dependency tree... 119s Reading state information... 119s rng-tools-debian is already the newest version (2.4). 119s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 120s Reading package lists... 120s Building dependency tree... 120s Reading state information... 120s haveged is already the newest version (1.9.14-1ubuntu1). 120s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 120s Reading package lists... 121s Building dependency tree... 121s Reading state information... 121s The following packages will be REMOVED: 121s cloud-init* python3-configobj* python3-debconf* 121s 0 upgraded, 0 newly installed, 3 to remove and 0 not upgraded. 121s After this operation, 3248 kB disk space will be freed. 121s (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 ... 74750 files and directories currently installed.) 121s Removing cloud-init (24.1-0ubuntu1) ... 122s Removing python3-configobj (5.0.8-3) ... 122s Removing python3-debconf (1.5.86) ... 122s Processing triggers for man-db (2.12.0-3) ... 122s (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 ... 74361 files and directories currently installed.) 122s Purging configuration files for cloud-init (24.1-0ubuntu1) ... 123s dpkg: warning: while removing cloud-init, directory '/etc/cloud/cloud.cfg.d' not empty so not removed 123s Processing triggers for rsyslog (8.2312.0-3ubuntu3) ... 123s Reading package lists... 124s Building dependency tree... 124s Reading state information... 124s linux-generic is already the newest version (6.8.0-11.11+1). 124s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 125s Hit:1 http://ftpmaster.internal/ubuntu noble InRelease 125s Hit:2 http://ftpmaster.internal/ubuntu noble-updates InRelease 125s Hit:3 http://ftpmaster.internal/ubuntu noble-security InRelease 125s Hit:4 http://ftpmaster.internal/ubuntu noble-proposed InRelease 126s Reading package lists... 126s Reading package lists... 126s Building dependency tree... 126s Reading state information... 127s Calculating upgrade... 127s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 127s Reading package lists... 127s Building dependency tree... 127s Reading state information... 128s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 128s autopkgtest [11:03:29]: rebooting testbed after setup commands that affected boot 176s autopkgtest-virt-ssh: WARNING: ssh connection failed. Retrying in 3 seconds... 191s autopkgtest [11:04:32]: testbed running kernel: Linux 6.8.0-11-generic #11-Ubuntu SMP PREEMPT_DYNAMIC Wed Feb 14 02:53:31 UTC 2024 191s autopkgtest [11:04:32]: testbed dpkg architecture: arm64 193s autopkgtest [11:04:34]: @@@@@@@@@@@@@@@@@@@@ apt-source rubocop 195s Get:1 http://ftpmaster.internal/ubuntu noble/universe rubocop 1.39.0+dfsg-1 (dsc) [2430 B] 195s Get:2 http://ftpmaster.internal/ubuntu noble/universe rubocop 1.39.0+dfsg-1 (tar) [1029 kB] 195s Get:3 http://ftpmaster.internal/ubuntu noble/universe rubocop 1.39.0+dfsg-1 (diff) [11.0 kB] 195s gpgv: Signature made Tue Dec 20 23:20:36 2022 UTC 195s gpgv: using RSA key 8ED6C3F8BAC9DB7FC130A870F823A2729883C97C 195s gpgv: issuer "kanashiro@debian.org" 195s gpgv: Can't check signature: No public key 195s dpkg-source: warning: cannot verify inline signature for ./rubocop_1.39.0+dfsg-1.dsc: no acceptable signature found 196s autopkgtest [11:04:37]: testing package rubocop version 1.39.0+dfsg-1 196s autopkgtest [11:04:37]: build not needed 198s autopkgtest [11:04:39]: test gem2deb-test-runner: preparing testbed 201s Reading package lists... 201s Building dependency tree... 201s Reading state information... 202s Correcting dependencies...Starting pkgProblemResolver with broken count: 0 202s Starting 2 pkgProblemResolver with broken count: 0 202s Done 202s Done 203s Starting pkgProblemResolver with broken count: 0 203s Starting 2 pkgProblemResolver with broken count: 0 203s Done 204s The following additional packages will be installed: 204s gem2deb-test-runner libjs-jquery libjs-jquery-easing libjs-jquery-fancybox 204s libjs-jquery-mousewheel libjs-jquery-ui libruby libruby3.1 pry rake rubocop 204s ruby ruby-addressable ruby-ast ruby-coderay ruby-crack ruby-diff-lcs 204s ruby-docile ruby-hashdiff ruby-method-source ruby-net-telnet ruby-parallel 204s ruby-progressbar ruby-public-suffix ruby-rainbow ruby-regexp-parser 204s ruby-rspec ruby-rspec-core ruby-rspec-expectations ruby-rspec-mocks 204s ruby-rspec-support ruby-rubocop-ast ruby-rubygems ruby-sdbm ruby-simplecov 204s ruby-simplecov-html ruby-unicode-display-width ruby-webmock ruby-webrick 204s ruby-whitequark-parser ruby-xmlrpc ruby3.1 rubygems-integration 204s Suggested packages: 204s libjs-jquery-ui-docs ri ruby-dev bundler 204s Recommended packages: 204s javascript-common zip fonts-lato 204s The following NEW packages will be installed: 204s gem2deb-test-runner libjs-jquery libjs-jquery-easing libjs-jquery-fancybox 204s libjs-jquery-mousewheel libjs-jquery-ui libruby libruby3.1 pry rake rubocop 204s ruby ruby-addressable ruby-ast ruby-coderay ruby-crack ruby-diff-lcs 204s ruby-docile ruby-hashdiff ruby-method-source ruby-net-telnet ruby-parallel 204s ruby-progressbar ruby-public-suffix ruby-rainbow ruby-regexp-parser 204s ruby-rspec ruby-rspec-core ruby-rspec-expectations ruby-rspec-mocks 204s ruby-rspec-support ruby-rubocop-ast ruby-rubygems ruby-sdbm ruby-simplecov 204s ruby-simplecov-html ruby-unicode-display-width ruby-webmock ruby-webrick 204s ruby-whitequark-parser ruby-xmlrpc ruby3.1 rubygems-integration 205s 0 upgraded, 43 newly installed, 0 to remove and 0 not upgraded. 205s 1 not fully installed or removed. 205s Need to get 8556 kB of archives. 205s After this operation, 50.2 MB of additional disk space will be used. 205s Get:1 http://ftpmaster.internal/ubuntu noble/main arm64 rubygems-integration all 1.18 [5336 B] 205s Get:2 http://ftpmaster.internal/ubuntu noble/main arm64 rake all 13.0.6-3 [61.6 kB] 205s Get:3 http://ftpmaster.internal/ubuntu noble/main arm64 ruby-net-telnet all 0.2.0-1 [13.3 kB] 205s Get:4 http://ftpmaster.internal/ubuntu noble/main arm64 ruby-webrick all 1.8.1-1 [52.3 kB] 205s Get:5 http://ftpmaster.internal/ubuntu noble/main arm64 ruby-xmlrpc all 0.3.2-2 [24.8 kB] 205s Get:6 http://ftpmaster.internal/ubuntu noble/main arm64 libruby arm64 1:3.1+1 [4640 B] 205s Get:7 http://ftpmaster.internal/ubuntu noble/main arm64 ruby-sdbm arm64 1.0.0-5build3 [17.9 kB] 205s Get:8 http://ftpmaster.internal/ubuntu noble-proposed/main arm64 libruby3.1 arm64 3.1.2-7ubuntu5 [5116 kB] 207s Get:9 http://ftpmaster.internal/ubuntu noble-proposed/main arm64 ruby3.1 arm64 3.1.2-7ubuntu5 [49.0 kB] 207s Get:10 http://ftpmaster.internal/ubuntu noble/main arm64 ruby-rubygems all 3.4.20-1 [238 kB] 207s Get:11 http://ftpmaster.internal/ubuntu noble/main arm64 ruby arm64 1:3.1+1 [3464 B] 207s Get:12 http://ftpmaster.internal/ubuntu noble/universe arm64 ruby-progressbar all 1.11.0-1 [16.3 kB] 207s Get:13 http://ftpmaster.internal/ubuntu noble/universe arm64 ruby-parallel all 1.22.1-2 [12.3 kB] 207s Get:14 http://ftpmaster.internal/ubuntu noble/universe arm64 ruby-ast all 2.4.2-1 [10.7 kB] 207s Get:15 http://ftpmaster.internal/ubuntu noble/universe arm64 ruby-whitequark-parser all 3.1.3.0-1 [433 kB] 207s Get:16 http://ftpmaster.internal/ubuntu noble/universe arm64 ruby-rainbow all 3.1.1-1 [12.4 kB] 207s Get:17 http://ftpmaster.internal/ubuntu noble/universe arm64 ruby-regexp-parser all 2.6.1-1 [54.5 kB] 207s Get:18 http://ftpmaster.internal/ubuntu noble/universe arm64 ruby-rubocop-ast all 1.24.0-2 [50.3 kB] 207s Get:19 http://ftpmaster.internal/ubuntu noble/universe arm64 ruby-unicode-display-width all 1.6.1-1 [8904 B] 207s Get:20 http://ftpmaster.internal/ubuntu noble/universe arm64 rubocop all 1.39.0+dfsg-1 [456 kB] 207s Get:21 http://ftpmaster.internal/ubuntu noble/universe arm64 ruby-coderay all 1.1.3-8 [78.5 kB] 207s Get:22 http://ftpmaster.internal/ubuntu noble/universe arm64 ruby-method-source all 1.0.0-2 [8904 B] 207s Get:23 http://ftpmaster.internal/ubuntu noble/universe arm64 pry all 0.14.2-1 [121 kB] 207s Get:24 http://ftpmaster.internal/ubuntu noble/universe arm64 ruby-rspec-support all 3.12.0c0e1m1s0-1 [28.8 kB] 207s Get:25 http://ftpmaster.internal/ubuntu noble/universe arm64 ruby-rspec-core all 3.12.0c0e1m1s0-1 [163 kB] 207s Get:26 http://ftpmaster.internal/ubuntu noble/universe arm64 ruby-diff-lcs all 1.5.0-1 [23.9 kB] 207s Get:27 http://ftpmaster.internal/ubuntu noble/universe arm64 ruby-rspec-expectations all 3.12.0c0e1m1s0-1 [89.2 kB] 207s Get:28 http://ftpmaster.internal/ubuntu noble/universe arm64 ruby-rspec-mocks all 3.12.0c0e1m1s0-1 [79.4 kB] 207s Get:29 http://ftpmaster.internal/ubuntu noble/universe arm64 ruby-rspec all 3.12.0c0e1m1s0-1 [3506 B] 207s Get:30 http://ftpmaster.internal/ubuntu noble/universe arm64 ruby-docile all 1.1.5-2.1 [5708 B] 207s Get:31 http://ftpmaster.internal/ubuntu noble/main arm64 libjs-jquery all 3.6.1+dfsg+~3.5.14-1 [328 kB] 207s Get:32 http://ftpmaster.internal/ubuntu noble/universe arm64 libjs-jquery-easing all 12-4 [6970 B] 207s Get:33 http://ftpmaster.internal/ubuntu noble/universe arm64 libjs-jquery-mousewheel all 1:3.1.13-5 [6324 B] 207s Get:34 http://ftpmaster.internal/ubuntu noble/universe arm64 libjs-jquery-fancybox all 12-4 [45.7 kB] 207s Get:35 http://ftpmaster.internal/ubuntu noble/universe arm64 libjs-jquery-ui all 1.13.2+dfsg-1 [252 kB] 207s Get:36 http://ftpmaster.internal/ubuntu noble/universe arm64 ruby-simplecov-html all 0.12.3-2 [477 kB] 207s Get:37 http://ftpmaster.internal/ubuntu noble/universe arm64 ruby-simplecov all 0.22.0-1 [40.7 kB] 207s Get:38 http://ftpmaster.internal/ubuntu noble/universe arm64 ruby-public-suffix all 4.0.6+ds-2 [14.1 kB] 207s Get:39 http://ftpmaster.internal/ubuntu noble/universe arm64 ruby-addressable all 2.8.5-1 [55.3 kB] 207s Get:40 http://ftpmaster.internal/ubuntu noble/universe arm64 ruby-crack all 0.4.4-4 [8764 B] 207s Get:41 http://ftpmaster.internal/ubuntu noble/universe arm64 ruby-hashdiff all 1.1.0-1 [12.9 kB] 207s Get:42 http://ftpmaster.internal/ubuntu noble/universe arm64 ruby-webmock all 3.18.1-2 [47.1 kB] 207s Get:43 http://ftpmaster.internal/ubuntu noble/universe arm64 gem2deb-test-runner arm64 2.2.2 [18.2 kB] 209s Fetched 8556 kB in 3s (2909 kB/s) 209s Selecting previously unselected package rubygems-integration. 209s (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 ... 74306 files and directories currently installed.) 209s Preparing to unpack .../00-rubygems-integration_1.18_all.deb ... 209s Unpacking rubygems-integration (1.18) ... 209s Selecting previously unselected package rake. 209s Preparing to unpack .../01-rake_13.0.6-3_all.deb ... 209s Unpacking rake (13.0.6-3) ... 209s Selecting previously unselected package ruby-net-telnet. 209s Preparing to unpack .../02-ruby-net-telnet_0.2.0-1_all.deb ... 209s Unpacking ruby-net-telnet (0.2.0-1) ... 209s Selecting previously unselected package ruby-webrick. 209s Preparing to unpack .../03-ruby-webrick_1.8.1-1_all.deb ... 209s Unpacking ruby-webrick (1.8.1-1) ... 210s Selecting previously unselected package ruby-xmlrpc. 210s Preparing to unpack .../04-ruby-xmlrpc_0.3.2-2_all.deb ... 210s Unpacking ruby-xmlrpc (0.3.2-2) ... 210s Selecting previously unselected package libruby:arm64. 210s Preparing to unpack .../05-libruby_1%3a3.1+1_arm64.deb ... 210s Unpacking libruby:arm64 (1:3.1+1) ... 210s Selecting previously unselected package ruby-sdbm:arm64. 210s Preparing to unpack .../06-ruby-sdbm_1.0.0-5build3_arm64.deb ... 210s Unpacking ruby-sdbm:arm64 (1.0.0-5build3) ... 210s Selecting previously unselected package libruby3.1:arm64. 210s Preparing to unpack .../07-libruby3.1_3.1.2-7ubuntu5_arm64.deb ... 210s Unpacking libruby3.1:arm64 (3.1.2-7ubuntu5) ... 210s Selecting previously unselected package ruby3.1. 210s Preparing to unpack .../08-ruby3.1_3.1.2-7ubuntu5_arm64.deb ... 210s Unpacking ruby3.1 (3.1.2-7ubuntu5) ... 210s Selecting previously unselected package ruby-rubygems. 210s Preparing to unpack .../09-ruby-rubygems_3.4.20-1_all.deb ... 210s Unpacking ruby-rubygems (3.4.20-1) ... 210s Selecting previously unselected package ruby. 210s Preparing to unpack .../10-ruby_1%3a3.1+1_arm64.deb ... 210s Unpacking ruby (1:3.1+1) ... 210s Selecting previously unselected package ruby-progressbar. 211s Preparing to unpack .../11-ruby-progressbar_1.11.0-1_all.deb ... 211s Unpacking ruby-progressbar (1.11.0-1) ... 211s Selecting previously unselected package ruby-parallel. 211s Preparing to unpack .../12-ruby-parallel_1.22.1-2_all.deb ... 211s Unpacking ruby-parallel (1.22.1-2) ... 211s Selecting previously unselected package ruby-ast. 211s Preparing to unpack .../13-ruby-ast_2.4.2-1_all.deb ... 211s Unpacking ruby-ast (2.4.2-1) ... 211s Selecting previously unselected package ruby-whitequark-parser. 211s Preparing to unpack .../14-ruby-whitequark-parser_3.1.3.0-1_all.deb ... 211s Unpacking ruby-whitequark-parser (3.1.3.0-1) ... 211s Selecting previously unselected package ruby-rainbow. 211s Preparing to unpack .../15-ruby-rainbow_3.1.1-1_all.deb ... 211s Unpacking ruby-rainbow (3.1.1-1) ... 211s Selecting previously unselected package ruby-regexp-parser. 211s Preparing to unpack .../16-ruby-regexp-parser_2.6.1-1_all.deb ... 211s Unpacking ruby-regexp-parser (2.6.1-1) ... 211s Selecting previously unselected package ruby-rubocop-ast. 211s Preparing to unpack .../17-ruby-rubocop-ast_1.24.0-2_all.deb ... 211s Unpacking ruby-rubocop-ast (1.24.0-2) ... 211s Selecting previously unselected package ruby-unicode-display-width. 211s Preparing to unpack .../18-ruby-unicode-display-width_1.6.1-1_all.deb ... 211s Unpacking ruby-unicode-display-width (1.6.1-1) ... 211s Selecting previously unselected package rubocop. 211s Preparing to unpack .../19-rubocop_1.39.0+dfsg-1_all.deb ... 211s Unpacking rubocop (1.39.0+dfsg-1) ... 211s Selecting previously unselected package ruby-coderay. 211s Preparing to unpack .../20-ruby-coderay_1.1.3-8_all.deb ... 211s Unpacking ruby-coderay (1.1.3-8) ... 211s Selecting previously unselected package ruby-method-source. 211s Preparing to unpack .../21-ruby-method-source_1.0.0-2_all.deb ... 211s Unpacking ruby-method-source (1.0.0-2) ... 211s Selecting previously unselected package pry. 211s Preparing to unpack .../22-pry_0.14.2-1_all.deb ... 211s Unpacking pry (0.14.2-1) ... 211s Selecting previously unselected package ruby-rspec-support. 211s Preparing to unpack .../23-ruby-rspec-support_3.12.0c0e1m1s0-1_all.deb ... 211s Unpacking ruby-rspec-support (3.12.0c0e1m1s0-1) ... 212s Selecting previously unselected package ruby-rspec-core. 212s Preparing to unpack .../24-ruby-rspec-core_3.12.0c0e1m1s0-1_all.deb ... 212s Unpacking ruby-rspec-core (3.12.0c0e1m1s0-1) ... 212s Selecting previously unselected package ruby-diff-lcs. 212s Preparing to unpack .../25-ruby-diff-lcs_1.5.0-1_all.deb ... 212s Unpacking ruby-diff-lcs (1.5.0-1) ... 212s Selecting previously unselected package ruby-rspec-expectations. 212s Preparing to unpack .../26-ruby-rspec-expectations_3.12.0c0e1m1s0-1_all.deb ... 212s Unpacking ruby-rspec-expectations (3.12.0c0e1m1s0-1) ... 212s Selecting previously unselected package ruby-rspec-mocks. 212s Preparing to unpack .../27-ruby-rspec-mocks_3.12.0c0e1m1s0-1_all.deb ... 212s Unpacking ruby-rspec-mocks (3.12.0c0e1m1s0-1) ... 212s Selecting previously unselected package ruby-rspec. 212s Preparing to unpack .../28-ruby-rspec_3.12.0c0e1m1s0-1_all.deb ... 212s Unpacking ruby-rspec (3.12.0c0e1m1s0-1) ... 212s Selecting previously unselected package ruby-docile. 212s Preparing to unpack .../29-ruby-docile_1.1.5-2.1_all.deb ... 212s Unpacking ruby-docile (1.1.5-2.1) ... 212s Selecting previously unselected package libjs-jquery. 212s Preparing to unpack .../30-libjs-jquery_3.6.1+dfsg+~3.5.14-1_all.deb ... 212s Unpacking libjs-jquery (3.6.1+dfsg+~3.5.14-1) ... 213s Selecting previously unselected package libjs-jquery-easing. 213s Preparing to unpack .../31-libjs-jquery-easing_12-4_all.deb ... 213s Unpacking libjs-jquery-easing (12-4) ... 213s Selecting previously unselected package libjs-jquery-mousewheel. 213s Preparing to unpack .../32-libjs-jquery-mousewheel_1%3a3.1.13-5_all.deb ... 213s Unpacking libjs-jquery-mousewheel (1:3.1.13-5) ... 213s Selecting previously unselected package libjs-jquery-fancybox. 213s Preparing to unpack .../33-libjs-jquery-fancybox_12-4_all.deb ... 213s Unpacking libjs-jquery-fancybox (12-4) ... 213s Selecting previously unselected package libjs-jquery-ui. 213s Preparing to unpack .../34-libjs-jquery-ui_1.13.2+dfsg-1_all.deb ... 213s Unpacking libjs-jquery-ui (1.13.2+dfsg-1) ... 213s Selecting previously unselected package ruby-simplecov-html. 213s Preparing to unpack .../35-ruby-simplecov-html_0.12.3-2_all.deb ... 213s Unpacking ruby-simplecov-html (0.12.3-2) ... 214s Selecting previously unselected package ruby-simplecov. 214s Preparing to unpack .../36-ruby-simplecov_0.22.0-1_all.deb ... 214s Unpacking ruby-simplecov (0.22.0-1) ... 214s Selecting previously unselected package ruby-public-suffix. 214s Preparing to unpack .../37-ruby-public-suffix_4.0.6+ds-2_all.deb ... 214s Unpacking ruby-public-suffix (4.0.6+ds-2) ... 214s Selecting previously unselected package ruby-addressable. 214s Preparing to unpack .../38-ruby-addressable_2.8.5-1_all.deb ... 214s Unpacking ruby-addressable (2.8.5-1) ... 214s Selecting previously unselected package ruby-crack. 214s Preparing to unpack .../39-ruby-crack_0.4.4-4_all.deb ... 214s Unpacking ruby-crack (0.4.4-4) ... 214s Selecting previously unselected package ruby-hashdiff. 214s Preparing to unpack .../40-ruby-hashdiff_1.1.0-1_all.deb ... 214s Unpacking ruby-hashdiff (1.1.0-1) ... 214s Selecting previously unselected package ruby-webmock. 214s Preparing to unpack .../41-ruby-webmock_3.18.1-2_all.deb ... 214s Unpacking ruby-webmock (3.18.1-2) ... 214s Selecting previously unselected package gem2deb-test-runner. 214s Preparing to unpack .../42-gem2deb-test-runner_2.2.2_arm64.deb ... 214s Unpacking gem2deb-test-runner (2.2.2) ... 214s Setting up ruby-rainbow (3.1.1-1) ... 214s Setting up ruby-regexp-parser (2.6.1-1) ... 214s Setting up ruby-hashdiff (1.1.0-1) ... 214s Setting up ruby-public-suffix (4.0.6+ds-2) ... 214s Setting up libjs-jquery-mousewheel (1:3.1.13-5) ... 214s Setting up rubygems-integration (1.18) ... 214s Setting up ruby-method-source (1.0.0-2) ... 214s Setting up ruby-ast (2.4.2-1) ... 214s Setting up ruby-net-telnet (0.2.0-1) ... 214s Setting up ruby-rspec-support (3.12.0c0e1m1s0-1) ... 214s Setting up ruby-webrick (1.8.1-1) ... 214s Setting up ruby-progressbar (1.11.0-1) ... 214s Setting up libjs-jquery (3.6.1+dfsg+~3.5.14-1) ... 214s Setting up ruby-xmlrpc (0.3.2-2) ... 214s Setting up libjs-jquery-easing (12-4) ... 214s Setting up ruby-addressable (2.8.5-1) ... 214s Setting up libjs-jquery-fancybox (12-4) ... 214s Setting up ruby-parallel (1.22.1-2) ... 214s Setting up libjs-jquery-ui (1.13.2+dfsg-1) ... 214s Setting up rake (13.0.6-3) ... 214s Setting up libruby:arm64 (1:3.1+1) ... 214s Setting up ruby-rubygems (3.4.20-1) ... 214s Setting up ruby-sdbm:arm64 (1.0.0-5build3) ... 214s Setting up libruby3.1:arm64 (3.1.2-7ubuntu5) ... 214s Setting up ruby3.1 (3.1.2-7ubuntu5) ... 214s Setting up ruby (1:3.1+1) ... 214s Setting up ruby-coderay (1.1.3-8) ... 214s Setting up ruby-rspec-core (3.12.0c0e1m1s0-1) ... 214s Setting up ruby-docile (1.1.5-2.1) ... 214s Setting up ruby-unicode-display-width (1.6.1-1) ... 214s Setting up pry (0.14.2-1) ... 214s Setting up ruby-diff-lcs (1.5.0-1) ... 214s Setting up ruby-whitequark-parser (3.1.3.0-1) ... 214s Setting up ruby-simplecov-html (0.12.3-2) ... 214s Setting up ruby-crack (0.4.4-4) ... 214s Setting up gem2deb-test-runner (2.2.2) ... 214s Setting up ruby-rubocop-ast (1.24.0-2) ... 214s Setting up ruby-simplecov (0.22.0-1) ... 214s Setting up ruby-rspec-expectations (3.12.0c0e1m1s0-1) ... 214s Setting up rubocop (1.39.0+dfsg-1) ... 214s Setting up ruby-rspec-mocks (3.12.0c0e1m1s0-1) ... 214s Setting up ruby-webmock (3.18.1-2) ... 214s Setting up ruby-rspec (3.12.0c0e1m1s0-1) ... 214s Setting up autopkgtest-satdep (0) ... 214s Processing triggers for libc-bin (2.39-0ubuntu2) ... 214s Processing triggers for man-db (2.12.0-3) ... 220s (Reading database ... 79840 files and directories currently installed.) 220s Removing autopkgtest-satdep (0) ... 221s autopkgtest [11:05:02]: test gem2deb-test-runner: gem2deb-test-runner --autopkgtest --check-dependencies 2>&1 221s autopkgtest [11:05:02]: test gem2deb-test-runner: [----------------------- 222s 222s ┌──────────────────────────────────────────────────────────────────────────────┐ 222s │ Checking Rubygems dependency resolution on ruby3.1 │ 222s └──────────────────────────────────────────────────────────────────────────────┘ 222s 222s RUBYLIB=. GEM_PATH= ruby3.1 -e gem\ \"rubocop\" 222s mv lib ./.gem2deb.lib 222s mv ./.gem2deb.lib lib 222s 222s ┌──────────────────────────────────────────────────────────────────────────────┐ 222s │ Run tests for ruby3.1 from debian/ruby-tests.rake │ 222s └──────────────────────────────────────────────────────────────────────────────┘ 222s 222s RUBYLIB=. GEM_PATH= ruby3.1 -S rake --rakelibdir /gem2deb-nonexistent -f debian/ruby-tests.rake 222s mv lib ./.gem2deb.lib 222s /usr/bin/ruby3.1 -I/usr/share/rubygems-integration/all/gems/rspec-support-3.12.0/lib:/usr/share/rubygems-integration/all/gems/rspec-core-3.12.0/lib /usr/share/rubygems-integration/all/gems/rspec-core-3.12.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 228s 228s Randomized with seed 12602 228s 228s RuboCop::Cop::Style::YodaCondition 228s enforce yoda 228s accepts assignment 228s accepts method call on receiver on right 228s accepts safe navigation on right 228s accepts variable on right after assignment 228s accepts numbers on both sides 228s accepts arrays of numbers on both sides 228s accepts class variable on right 228s registers an offense for boolean literal on right 228s registers an offense for string literal on right 228s accepts string literal on right of case equality check 228s accepts accessor and variable on right in boolean expression 228s registers an offense for nil on right 228s registers an offense for number on right 228s accepts negation 228s accepts instance variable on right 228s registers an offense for number on right of comparison 228s accepts global variable on right 228s accepts subtraction on right of comparison 228s accepts string literal on left 228s accepts number on left of <=> 228s with EnforcedStyle: require_for_equality_operators_only 228s accepts nil on right of comparison 228s accepts mixed order in comparisons 228s registers an offense for equality check 228s accepts number on right of comparison 228s registers an offense for negated equality check 228s within an if or ternary statement 228s registers an offense for number on right of >= in ternary condition 228s registers an offense for number on right of <= in ternary condition 228s registers an offense for nil on right in ternary condition 228s registers an offense number on right of comparison in if condition 228s registers an offense number on right in if condition 228s registers an offense for number on right in modifier if 228s enforce not yoda 228s accepts variable on left after assign 228s accepts interpolated regex on left 228s accepts subtraction expression on left of comparison 228s registers an offense for string literal on left 228s registers an offense number on left of comparison 228s accepts negation 228s accepts global variable on left 228s accepts method call on receiver on left 228s registers an offense number on left 228s accepts accessor and variable on left in boolean expression 228s accepts assignment 228s accepts safe navigation on left 228s accepts number on both sides 228s accepts array of numbers on both sides 228s accepts instance variable on left 228s accepts class variable on left 228s accepts string literal on right 228s accepts number on left of <=> 228s accepts interpolated string on left 228s accepts __FILE__ on left in program name check 228s registers an offense for nil on left 228s accepts string literal on left of case equality check 228s accepts __FILE__ on left in negated program name check 228s registers an offense for boolean literal on left 228s with EnforcedStyle: forbid_for_equality_operators_only 228s accepts nil on left of comparison 228s accepts number on left of comparison 228s accepts mixed order in comparisons 228s registers an offense for negated equality check 228s registers an offense for equality check 228s within an if or ternary statement 228s registers an offense for number on left in modifier if 228s registers an offense for number on left of <= in ternary condition 228s registers an offense for number on left of comparison in if condition 228s registers an offense for nil on left in ternary condition 228s registers an offense for number on left of >= in ternary condition 228s registers an offense for number on left in if condition 228s 228s RuboCop::TargetRuby 228s when TargetRubyVersion is not set 228s when .ruby-version is not present 228s and gems.locked exists 228s uses MRI Ruby version when it is present in gems.locked 228s uses the default Ruby when Ruby is not in gems.locked 228s uses the default Ruby when rbx is in gems.locked 228s uses the default Ruby when jruby is in gems.locked 228s uses MRI Ruby version when it has multiple digits 228s gemspec file 228s when file contains `required_ruby_version` as a string 228s sets target_ruby from exclusive range 228s sets target_ruby from approximate version 228s sets target_ruby from inclusive range 228s when file contains `required_ruby_version` as an array 228s sets target_ruby to the minimal version satisfying the requirements 228s sets target_ruby from required_ruby_version with many requirements 228s when file does not contain `required_ruby_version` 228s sets default target_ruby 228s when file contains `required_ruby_version` as a requirement 228s sets target_ruby from required_ruby_version from inclusive requirement range 228s sets first known ruby version that satisfies requirement 228s and Gemfile.lock exists 228s uses the default Ruby when jruby is in Gemfile.lock 228s uses the default Ruby when Ruby is not in Gemfile.lock 228s uses MRI Ruby version when it has multiple digits 228s uses the default Ruby when rbx is in Gemfile.lock 228s uses MRI Ruby version when it is present in Gemfile.lock 228s when bundler lock files are not present 228s uses the default target ruby version 228s when .ruby-version is not in a parent directory 228s when gems.locked is in a parent directory 228s does 228s when Gemfile.lock is in a parent directory 228s does 228s when .ruby-version is in a parent directory 228s reads it to determine the target ruby version 228s when .tool-versions is present 228s when .tool-versions does not contain a ruby version 228s uses the default ruby version 228s when .tool-versions contains a ruby version 228s reads it to determine the target ruby version 228s does not read Gemfile.lock, gems.locked 228s when .ruby-version is present 228s does not read .tool-versions, Gemfile.lock or gems.locked 228s when .ruby-version contains "system" version 228s uses the default target ruby version 228s when .ruby-version contains a JRuby version 228s uses the default target ruby version 228s when the MRI version contains multiple digits 228s reads it to determine the target ruby version 228s when .ruby-version contains a Rbx version 228s uses the default target ruby version 228s when .ruby-version contains an MRI version 228s reads it to determine the target ruby version 228s when .ruby-version contains a version prefixed by "ruby-" 228s correctly determines the target ruby version 228s when TargetRubyVersion is set 228s does not read Gemfile.lock or gems.locked 228s uses TargetRubyVersion 228s does not read .ruby-version 228s 228s RuboCop::Cop::Style::CaseEquality 228s when AllowOnConstant is true 228s registers an offense and corrects for === when the receiver is a regexp 228s does not register an offense for === when the receiver is not a camel cased constant 228s does not register an offense for === when the receiver is a constant 228s registers an offense and does not correct for === when receiver is of some other type 228s does not fail when the receiver is implicit 228s registers an offense and corrects for === when the receiver is a range 228s when AllowOnConstant is false 228s does not fail when the receiver is implicit 228s registers an offense and corrects for === when the receiver is a constant 228s does not register an offense for === when the receiver is not a camel cased constant 228s registers an offense and corrects for === when the receiver is a regexp 228s registers an offense and corrects for === when the receiver is a range 228s registers an offense and does not correct for === when receiver is of some other type 228s when AllowOnSelfClass is true 228s does not register an offense for === when the receiver is not a camel cased constant 228s registers an offense and corrects for === when the receiver is a range 228s registers an offense and does not correct for === when receiver is of some other type 228s registers an offense and corrects for === when the receiver is self.klass 228s does not fail when the receiver is implicit 228s registers an offense and corrects for === when the receiver is a regexp 228s does not register an offense for === when the receiver is self.class 228s when AllowOnSelfClass is false 228s registers an offense and does not correct for === when receiver is of some other type 228s registers an offense and corrects for === when the receiver is self.class 228s registers an offense and corrects for === when the receiver is a range 228s does not register an offense for === when the receiver is not a camel cased constant 228s registers an offense and corrects for === when the receiver is a regexp 228s does not fail when the receiver is implicit 228s 228s RuboCop::Cop::Style::Not 228s autocorrects "not" with ! 228s parenthesizes when `not` is applied to and 228s autocorrects "not" followed by parens with ! 228s parenthesizes when `not` is applied to or 228s uses the reverse operator when `not` is applied to a comparison 228s parenthesizes when `not` is applied to a ternary op 228s parenthesizes when `not` would change the meaning of a binary exp 228s registers an offense for not 228s does not register an offense for ! 228s 228s RuboCop::Cop::Style::RedundantFileExtensionInRequire 228s registers an offense and corrects when requiring filename ending with `.rb` 228s does not register an offense when requiring filename ending with `.so` 228s does not register an offense when requiring filename without an extension 228s does not register an offense when requiring variable as a filename 228s 228s RuboCop::Cop::Naming::AccessorMethodName 228s accepts method set_something with blockarg 228s accepts method set_something with kwarg 228s registers an offense for singleton method set_something with one args 228s accepts method set_something with restarg 228s accepts method set_something with kwoptarg 228s accepts method get_something with args 228s accepts method set_something with two args 228s registers an offense for singleton method get_something with no args 228s accepts method set_something with kwrestarg 228s accepts singleton method set_something with no args 228s accepts singleton method get_something with args 228s accepts method set_something with optarg 228s accepts singleton method set_something with two args 228s registers an offense for method get_something with no args 228s accepts method set_something with no args 228s registers an offense for method set_something with one arg 228s >= Ruby 2.7 228s accepts method set_something with arguments forwarding 228s 228s RuboCop::Cop::Style::MissingRespondToMissing 229s registers an offense respond_to_missing? is implemented as a class method and method_missing is implemented as an instance method 229s registers an offense respond_to_missing? is implemented as an instance method and method_missing is implemented as a class method 229s allows method_missing and respond_to_missing? when defined with inline access modifier and method_missing is not qualified by inline access modifier 229s allows method_missing and respond_to_missing? when defined with inline access modifier 229s allows method_missing and respond_to_missing? implemented as instance methods 229s allows method_missing and respond_to_missing? implemented as class methods 229s registers an offense when method_missing is implemented as a class methods 229s registers an offense when respond_to_missing? is not implemented 229s 229s RuboCop::Cop::Gemspec::DuplicatedAssignment 229s registers an offense when using `name=` twice with `cbase` 229s registers an offense when using `version=` twice 229s does not register an offense when `name=` method call is not block value 229s does not register an offense when using `spec.add_dependency` twice 229s registers an offense when using `name=` twice 229s does not register an offense when using `<<` twice 229s registers an offense when using `required_ruby_version=` twice 229s 229s RuboCop::Cop::Style::RedundantBegin 229s reports an offense for defs with redundant begin block 229s does not register an offense when using `begin` with `until` 229s doesn't modify spacing when autocorrecting 229s does not register an offense when using `begin` for logical operator conditions 229s registers and corrects an offense when using modifier `if` single statement in `begin` block 229s reports an offense when multi-line `begin` block has single statement and it is inside condition 229s accepts a def with a begin block after a statement 229s registers and corrects an offense when using multi-line `if` in `begin` block 229s accepts a def with required begin block 229s does not register an offense when using `begin` with `rescue` 229s reports an offense when one-liner `begin` block has single statement with modifier condition 229s does not register an offense when using `begin` with `ensure` 229s does not register an offense when using `begin` for assignment 229s does not register an offense when using `begin` for semantic operator conditions 229s does not register an offense when using `begin` with `while` 229s accepts when one-liner `begin` block has multiple statements with modifier condition 229s does not register an offense when using `begin` for method argument 229s does not register an offense when using `begin` with multiple statement for or assignment 229s reports an offense when assigning nested `begin` blocks 229s reports an offense when assigning nested blocks which contain `begin` blocks 229s reports an offense when multi-line `begin` block has single statement with modifier condition 229s registers and corrects an offense when using `begin` with single statement for or assignment 229s does not register an offense when using body of `begin` is empty 229s registers and corrects an offense when using `begin` with single statement that called a block for or assignment 229s accepts a defs with required begin block 229s does not register an offense when using `begin` for or assignment and method call 229s does not register an offense when using `begin` with no statements for or assignment 229s accepts when multi-line `begin` block has multiple statements with modifier condition 229s registers an offense and corrects when using `begin` without `rescue` or `ensure` 229s reports an offense for single line def with redundant begin block 229s autocorrects when there are trailing comments 229s reports an offense for def with redundant begin block 229s Ruby 2.7 229s reports an offense when assigning nested blocks which contain `begin` blocks 229s >= ruby 2.5 229s accepts a stabby lambda with a begin-end 229s accepts a block with a begin block after a statement 229s registers an offense for a do-end block with redundant begin-end 229s accepts a {} block with a begin-end 229s accepts super with block 229s < Ruby 2.5 229s accepts a do-end block with a begin-end 229s when using endless method definition 229s registers when `begin` block has a single statement 229s accepts when `begin` block has no statements 229s accepts when `begin` block has multiple statements 229s 229s RuboCop::Cop::Lint::Loop 229s accepts loop/break unless 229s registers an offense and corrects for begin/end/while 229s accepts loop/break if 229s registers an offense for begin/end/until 229s 229s RuboCop::Formatter::EmacsStyleFormatter 229s #file_finished 229s displays parsable text 229s when the offense is marked as todo 229s prints [Todo] along with message 229s when the offense is automatically corrected 229s prints [Corrected] along with message 229s when the offense message contains a newline 229s strips newlines out of the error message 229s #finished 229s does not report summary 229s 229s RuboCop::Cop::AlignmentCorrector 229s #correct 229s within string literals 229s does not insert whitespace 229s simple indentation 229s with a positive column delta 229s indents 229s with a negative column delta 229s outdents 229s with large column deltas 229s with heredoc in backticks (<<``) 229s behaves like heredoc indenter 229s does not change indentation of here doc bodies and end markers 229s with plain heredoc (<<) 229s behaves like heredoc indenter 229s does not change indentation of here doc bodies and end markers 229s with single-line here docs 229s does not indent body and end marker 229s 229s RuboCop::Cop::Layout::EmptyLines 229s does not register an offense for heredocs with empty lines inside 229s does not register an offense for empty lines in a string 229s does not register an offense when there are no tokens 229s registers an offense for consecutive empty lines 229s does not register an offense for comments 229s 229s RuboCop::Server::CLI 229s when using exclusive `--restart-server` option 229s returns exit status 2 and display an error message 229s when not using any server options and specifying `--server` in `RUBOCOP_OPTS` environment variable 229s returns exit status 0 and display an information message 229s when using `--stop-server` option 229s returns exit status 0 and display a warning message 229s when using `--restart-server` option 230s returns exit status 0 and display an information and a warning messages 230s when using server option with `--cache-root=path` option 230s returns exit status 0 and display an information message 230s when using exclusive `--start-server` option 230s returns exit status 2 and display an error message 230s when using `--start-server` option 230s returns exit status 0 and display an information message 230s when using server option with `--cache-root path` option 230s returns exit status 0 and display an error message 230s when using multiple server options 230s returns exit status 2 and display an error message 230s when using `--server` option 230s returns exit status 0 and display an information message 230s when not using any server options and specifying `--server` in .rubocop file 230s returns exit status 0 and display an information message 230s when using exclusive `--server-status` option 230s returns exit status 2 and display an error message 230s when using `--no-server` option 230s returns exit status 0 230s when using exclusive `--stop-server` option 230s returns exit status 2 and display an error message 230s when using `--server-status` option 230s returns exit status 0 and display an information message 230s when not using any server options 230s returns exit status 0 230s 230s RuboCop::Cop::Lint::UselessRuby2Keywords 230s with a dynamically defined method 230s registers an offense for an unnecessary `ruby2_keywords` 230s registers an offense for a numblock 230s registers an offense when the method has a `shadowarg` 230s does not register an offense for an allowed `ruby2_keywords` 230s does not register an offense when the method has a `restarg` and a `shadowarg` 230s when `ruby2_keywords` is given a `def` node 230s registers an offense for a method with only `kwrestarg` 230s registers an offense for a method with only keyword args 230s registers an offense for a method with a `restarg` and `kwoptarg` 230s does not register an offense for a method with a `restarg` other positional args 230s registers an offense for a method with a `restarg` and `kwrestarg` 230s does not register an offense for a method with a `restarg` and `blockarg` 230s does not register an offense for a method with a `restarg` other optional args 230s registers an offense for a method with only positional args 230s registers an offense for a method without arguments 230s registers an offense for a method with a `restarg` and keyword args 230s does not register an offense for a method with a `restarg` and no `kwrestarg` 230s when `ruby2_keywords` is given a symbol 230s does not register an offense when the `def` is at a different depth 230s does not register an offense for an allowed def 230s registers an offense for an unnecessary `ruby2_keywords` 230s does not register an offense when there is no `def` 230s 230s RuboCop::Cop::AnnotationComment 230s #correct? 230s when no colon is required 230s behaves like correct 230s is expected to be truthy 230s behaves like incorrect 230s is expected to be falsey 230s behaves like incorrect 230s is expected to be falsey 230s behaves like incorrect 230s is expected to be falsey 230s behaves like incorrect 230s is expected to be falsey 230s behaves like incorrect 230s is expected to be falsey 230s behaves like incorrect 230s is expected to be falsey 230s behaves like incorrect 231s is expected to be falsey 231s behaves like correct 231s is expected to be truthy 231s behaves like incorrect 231s is expected to be falsey 231s behaves like incorrect 231s is expected to be falsey 231s behaves like incorrect 231s is expected to be falsey 231s behaves like incorrect 231s is expected to be falsey 231s behaves like correct 231s is expected to be truthy 231s when there is duplication in the keywords 231s when the longer keyword is given first 231s behaves like correct 231s is expected to be truthy 231s behaves like incorrect 231s is expected to be falsey 231s behaves like correct 231s is expected to be truthy 231s behaves like incorrect 231s is expected to be falsey 231s when the shorter keyword is given first 231s behaves like incorrect 231s is expected to be falsey 231s behaves like correct 231s is expected to be truthy 231s behaves like incorrect 231s is expected to be falsey 231s behaves like correct 231s is expected to be truthy 231s when a colon is required 231s behaves like incorrect 231s is expected to be falsey 231s behaves like incorrect 231s is expected to be falsey 231s behaves like incorrect 231s is expected to be falsey 231s behaves like correct 231s is expected to be truthy 231s behaves like incorrect 231s is expected to be falsey 231s behaves like incorrect 231s is expected to be falsey 231s behaves like incorrect 231s is expected to be falsey 231s behaves like incorrect 231s is expected to be falsey 231s behaves like correct 231s is expected to be truthy 231s behaves like incorrect 231s is expected to be falsey 231s behaves like incorrect 231s is expected to be falsey 231s behaves like incorrect 231s is expected to be falsey 231s behaves like incorrect 231s is expected to be falsey 231s behaves like correct 231s is expected to be truthy 231s #annotation? 231s when annotated with a non keyword 231s is expected to be falsey 231s when the keyword is multiple words 231s is expected to equal true 231s when it includes a keyword 231s is expected to be falsey 231s when given a keyword followed by a space 231s is expected to equal true 231s when given a keyword followed by a colon 231s is expected to equal true 231s when given as the first word of a sentence 231s is expected to be falsey 231s when the keyword is not capitalized properly 231s is expected to equal true 231s 231s RuboCop::Runner 231s how formatter is invoked 231s #file_finished 231s sends a file path 231s sends an array of detected offenses for the file 231s the passed path 231s is frozen 231s #started 231s sends all file paths 231s the passed files paths 231s is frozen 231s #file_started 232s sends file specific information hash 232s sends a file path 232s the passed path 232s is frozen 232s invocation order 232s is called in the proper sequence 232s #finished 232s when RuboCop is interrupted by user 232s sends only processed file paths 232s when RuboCop finished inspecting all files normally 232s sends all file paths 232s the passed files paths 233s is frozen 233s 233s RuboCop::Cop::Style::WordArray 233s when EnforcedStyle is percent 233s registers an offense in a non-ambiguous block context 233s keeps the line breaks in place after autocorrect 233s autocorrects an array of words and character constants 233s does not register an offense on non-word strings 233s registers an offense for arrays of double quoted strings 233s does not register an offense for array containing non-string 233s autocorrects an array of words 233s doesn't fail in wacky ways when multiple cop instances are used 233s detects right value of MinSize to use for --auto-gen-config 233s registers an offense for an array with comments outside of it 233s autocorrects an array with one element 233s detects when the cop must be disabled to avoid offenses 233s registers an offense for arrays with character constants 233s does not register an offense for a %w() array containing non word characters 233s uses %W when autocorrecting strings with embedded newlines and tabs 233s corrects properly when there is an extra trailing comma 233s registers an offense for a %w() array containing spaces 233s does not register an offense for array of non-words 233s registers an offense for arrays of strings containing hyphens 233s registers an offense for strings with newline and tab escapes 233s does not register an offense for array starting with %w 233s does not register offense for array with allowed number of strings 233s registers an offense for arrays of single quoted strings 233s does not register an offense for an array with comments in it 233s autocorrects an array of words using partial newlines 233s autocorrects an array of words in multiple lines 233s does not register an offense for array with empty strings 233s when the default external encoding is US-ASCII 233s registers an offense for arrays of unicode word characters 233s when the default external encoding is UTF-8 233s registers an offense for arrays of unicode word characters 233s with non-default MinSize 233s does not autocorrect arrays of one symbol if MinSize > 1 233s with a custom WordRegex configuration 233s registers an offense for arrays of email addresses 233s with a treacherous WordRegex configuration 233s doesn't break when words contain whitespace 233s doesn't break when words contain delimiters 233s when PreferredDelimiters is specified 233s autocorrects an array with delimiters 233s with a WordRegex configuration which accepts almost anything 233s uses %w for strings which only appear to have an escape 233s uses %W when autocorrecting strings with non-printable chars 233s when EnforcedStyle is array 233s does not register an offense for arrays of double quoted strings 233s autocorrects a %W() array which uses string interpolation 233s does not register an offense for arrays of strings with hyphens 233s autocorrects a %w() array which uses string with hyphen 233s doesn't fail on strings which are not valid UTF-8 233s does not register an offense for arrays of single quoted strings 233s autocorrects a %W() array which uses escapes 233s autocorrects a %w() array which uses single quotes 233s registers an offense for an empty %w() array 233s doesn't fail with `encoding: binary 233s autocorrects multiline %w() array 233s does not register an offense for arrays of strings with spaces 233s autocorrects a %W() array which uses string with hyphen 233s registers an offense for a %w() array 233s when the WordRegex configuration is not a Regexp 233s still parses the code without raising an error 233s 233s RuboCop::Formatter::Colorizable 233s #white 233s invokes #colorize(string, white 233s #cyan 233s invokes #colorize(string, cyan 233s #yellow 233s invokes #colorize(string, yellow 233s #red 233s invokes #colorize(string, red 233s #green 233s invokes #colorize(string, green 233s #black 233s invokes #colorize(string, black 233s #magenta 233s invokes #colorize(string, magenta 233s #blue 233s invokes #colorize(string, blue 233s #colorize 233s when the global Rainbow.enabled is true 233s and the formatter's output is a tty 233s colorizes the passed string 233s and the formatter's output is not a tty 233s does nothing 233s and output is not a tty, but --color option was provided 233s colorizes the passed string 233s when the global Rainbow.enabled is false 233s and the formatter's output is not a tty 233s does nothing 233s and the formatter's output is a tty 233s does nothing 233s 233s RuboCop::Cop::Style::FormatStringToken 233s works inside hashes 233s ignores time format (when used as argument to strptime) 233s ignores time format (when used as argument to strftime) 233s ignores percent escapes 233s handles dstrs 233s ignores time format when it is stored in a variable 233s ignores placeholder arguments 233s ignores __FILE__ 233s supports flags and modifiers 233s ignores time format and unrelated `format` method using 233s ignores `%r` regexp 233s ignores regexp 233s ignores xstr 233s ignores http links 233s behaves like enforced styles for format string tokens 233s when enforced style is template 233s does not register offenses for annotated style 233s #correctable_sequence? 233s configures the enforced style to template after inspecting "%{a}" 233s supports dynamic string with interpolation 233s detects when the cop must be disabled to avoid offenses 233s behaves like maximum allowed unannotated 233s when MaxUnannotatedPlaceholdersAllowed is 1 233s does not register offenses for single unannotated 233s does not register offenses for dual unannotated 233s when MaxUnannotatedPlaceholdersAllowed is 2 233s does not register offenses for single unannotated 233s does not register offenses for dual unannotated 233s when enforced style is annotated 233s #correctable_sequence? 233s sets the enforced style to annotated after inspecting "%s" 233s supports dynamic string with interpolation 233s registers offenses for template style 233s detects when the cop must be disabled to avoid offenses 233s behaves like maximum allowed unannotated 233s when MaxUnannotatedPlaceholdersAllowed is 2 233s does not register offenses for dual unannotated 233s does not register offenses for single unannotated 233s when MaxUnannotatedPlaceholdersAllowed is 1 233s does not register offenses for single unannotated 233s registers offense for dual unannotated 233s when enforced style is unannotated 233s #correctable_sequence? 233s behaves like enforced styles for format string tokens 233s when enforced style is template 233s #correctable_sequence? 233s does not register offenses for annotated style 233s detects when the cop must be disabled to avoid offenses 233s configures the enforced style to template after inspecting "%{a}" 233s supports dynamic string with interpolation 233s behaves like maximum allowed unannotated 233s when MaxUnannotatedPlaceholdersAllowed is 1 233s does not register offenses for dual unannotated 233s does not register offenses for single unannotated 233s when MaxUnannotatedPlaceholdersAllowed is 2 233s does not register offenses for dual unannotated 233s does not register offenses for single unannotated 233s when enforced style is annotated 233s registers offenses for template style 233s supports dynamic string with interpolation 233s #correctable_sequence? 233s sets the enforced style to annotated after inspecting "%s" 233s detects when the cop must be disabled to avoid offenses 233s behaves like maximum allowed unannotated 233s when MaxUnannotatedPlaceholdersAllowed is 2 233s does not register offenses for single unannotated 233s does not register offenses for dual unannotated 233s when MaxUnannotatedPlaceholdersAllowed is 1 233s registers offense for dual unannotated 233s does not register offenses for single unannotated 233s when enforced style is unannotated 233s #correctable_sequence? 233s behaves like enforced styles for format string tokens 233s when enforced style is template 233s supports dynamic string with interpolation 233s does not register offenses for annotated style 233s detects when the cop must be disabled to avoid offenses 233s #correctable_sequence? 233s configures the enforced style to template after inspecting "%{a}" 233s behaves like maximum allowed unannotated 233s when MaxUnannotatedPlaceholdersAllowed is 2 233s does not register offenses for single unannotated 233s does not register offenses for dual unannotated 233s when MaxUnannotatedPlaceholdersAllowed is 1 233s does not register offenses for dual unannotated 233s does not register offenses for single unannotated 233s when enforced style is annotated 233s registers offenses for template style 233s supports dynamic string with interpolation 233s #correctable_sequence? 233s detects when the cop must be disabled to avoid offenses 233s sets the enforced style to annotated after inspecting "%s" 233s behaves like maximum allowed unannotated 233s when MaxUnannotatedPlaceholdersAllowed is 2 233s does not register offenses for single unannotated 233s does not register offenses for dual unannotated 233s when MaxUnannotatedPlaceholdersAllowed is 1 233s registers offense for dual unannotated 233s does not register offenses for single unannotated 233s when enforced style is unannotated 233s #correctable_sequence? 233s when enforced style is unannotated 233s gives a helpful error message 233s when enforced style is annotated 233s gives a helpful error message 233s when AllowedPatterns is disabled 233s registers an offense 233s when AllowedMethods is disabled 233s registers an offense 233s when AllowedMethods is enabled 233s registers an offense for different method call within ignored method 233s does not register an offense 233s does not register an offense for value in nested structure 233s when AllowedPatterns is enabled 233s registers an offense for different method call within ignored method 233s does not register an offense for value in nested structure 233s does not register an offense 233s behaves like enforced styles for format string tokens 233s when enforced style is unannotated 233s #correctable_sequence? 233s when enforced style is template 233s configures the enforced style to template after inspecting "%{a}" 233s detects when the cop must be disabled to avoid offenses 233s supports dynamic string with interpolation 233s does not register offenses for annotated style 233s #correctable_sequence? 233s behaves like maximum allowed unannotated 233s when MaxUnannotatedPlaceholdersAllowed is 1 233s does not register offenses for single unannotated 233s does not register offenses for dual unannotated 233s when MaxUnannotatedPlaceholdersAllowed is 2 233s does not register offenses for single unannotated 233s does not register offenses for dual unannotated 233s when enforced style is annotated 233s supports dynamic string with interpolation 233s sets the enforced style to annotated after inspecting "%s" 233s registers offenses for template style 233s #correctable_sequence? 233s detects when the cop must be disabled to avoid offenses 233s behaves like maximum allowed unannotated 233s when MaxUnannotatedPlaceholdersAllowed is 2 233s does not register offenses for single unannotated 233s does not register offenses for dual unannotated 233s when MaxUnannotatedPlaceholdersAllowed is 1 233s registers offense for dual unannotated 233s does not register offenses for single unannotated 233s behaves like enforced styles for format string tokens 233s when enforced style is template 233s configures the enforced style to template after inspecting "%{a}" 233s supports dynamic string with interpolation 233s does not register offenses for annotated style 233s detects when the cop must be disabled to avoid offenses 233s #correctable_sequence? 233s behaves like maximum allowed unannotated 233s when MaxUnannotatedPlaceholdersAllowed is 2 233s does not register offenses for dual unannotated 233s does not register offenses for single unannotated 233s when MaxUnannotatedPlaceholdersAllowed is 1 233s does not register offenses for dual unannotated 233s does not register offenses for single unannotated 233s when enforced style is unannotated 233s #correctable_sequence? 233s when enforced style is annotated 233s sets the enforced style to annotated after inspecting "%s" 233s detects when the cop must be disabled to avoid offenses 233s supports dynamic string with interpolation 233s registers offenses for template style 233s #correctable_sequence? 233s behaves like maximum allowed unannotated 233s when MaxUnannotatedPlaceholdersAllowed is 2 233s does not register offenses for single unannotated 233s does not register offenses for dual unannotated 233s when MaxUnannotatedPlaceholdersAllowed is 1 233s does not register offenses for single unannotated 233s registers offense for dual unannotated 233s behaves like enforced styles for format string tokens 233s when enforced style is template 233s configures the enforced style to template after inspecting "%{a}" 233s does not register offenses for annotated style 233s detects when the cop must be disabled to avoid offenses 233s #correctable_sequence? 233s supports dynamic string with interpolation 233s behaves like maximum allowed unannotated 233s when MaxUnannotatedPlaceholdersAllowed is 2 233s does not register offenses for single unannotated 233s does not register offenses for dual unannotated 233s when MaxUnannotatedPlaceholdersAllowed is 1 233s does not register offenses for dual unannotated 233s does not register offenses for single unannotated 233s when enforced style is annotated 233s #correctable_sequence? 233s supports dynamic string with interpolation 233s registers offenses for template style 233s detects when the cop must be disabled to avoid offenses 233s sets the enforced style to annotated after inspecting "%s" 233s behaves like maximum allowed unannotated 233s when MaxUnannotatedPlaceholdersAllowed is 2 233s does not register offenses for dual unannotated 233s does not register offenses for single unannotated 233s when MaxUnannotatedPlaceholdersAllowed is 1 233s registers offense for dual unannotated 233s does not register offenses for single unannotated 233s when enforced style is unannotated 233s #correctable_sequence? 233s behaves like enforced styles for format string tokens 233s when enforced style is template 233s #correctable_sequence? 233s supports dynamic string with interpolation 233s registers offenses for annotated style 233s configures the enforced style to template after inspecting "%{a}" 233s detects when the cop must be disabled to avoid offenses 233s behaves like maximum allowed unannotated 233s when MaxUnannotatedPlaceholdersAllowed is 2 233s does not register offenses for single unannotated 233s does not register offenses for dual unannotated 233s when MaxUnannotatedPlaceholdersAllowed is 1 233s does not register offenses for single unannotated 233s registers offense for dual unannotated 233s when enforced style is annotated 233s supports dynamic string with interpolation 233s detects when the cop must be disabled to avoid offenses 233s sets the enforced style to annotated after inspecting "%s" 233s #correctable_sequence? 233s registers offenses for template style 233s behaves like maximum allowed unannotated 233s when MaxUnannotatedPlaceholdersAllowed is 2 233s does not register offenses for single unannotated 233s does not register offenses for dual unannotated 233s when MaxUnannotatedPlaceholdersAllowed is 1 233s registers offense for dual unannotated 233s does not register offenses for single unannotated 233s when enforced style is unannotated 233s #correctable_sequence? 233s behaves like enforced styles for format string tokens 233s when enforced style is unannotated 233s #correctable_sequence? 233s when enforced style is template 233s supports dynamic string with interpolation 233s does not register offenses for annotated style 233s configures the enforced style to template after inspecting "%{a}" 233s detects when the cop must be disabled to avoid offenses 233s #correctable_sequence? 233s behaves like maximum allowed unannotated 233s when MaxUnannotatedPlaceholdersAllowed is 2 233s does not register offenses for single unannotated 233s does not register offenses for dual unannotated 233s when MaxUnannotatedPlaceholdersAllowed is 1 233s does not register offenses for single unannotated 233s does not register offenses for dual unannotated 233s when enforced style is annotated 233s #correctable_sequence? 233s sets the enforced style to annotated after inspecting "%s" 233s registers offenses for template style 233s detects when the cop must be disabled to avoid offenses 233s supports dynamic string with interpolation 233s behaves like maximum allowed unannotated 233s when MaxUnannotatedPlaceholdersAllowed is 2 233s does not register offenses for single unannotated 233s does not register offenses for dual unannotated 233s when MaxUnannotatedPlaceholdersAllowed is 1 233s does not register offenses for single unannotated 233s registers offense for dual unannotated 233s behaves like enforced styles for format string tokens 233s when enforced style is template 233s does not register offenses for annotated style 233s supports dynamic string with interpolation 233s configures the enforced style to template after inspecting "%{a}" 233s #correctable_sequence? 233s detects when the cop must be disabled to avoid offenses 233s behaves like maximum allowed unannotated 233s when MaxUnannotatedPlaceholdersAllowed is 1 233s does not register offenses for dual unannotated 233s does not register offenses for single unannotated 233s when MaxUnannotatedPlaceholdersAllowed is 2 233s does not register offenses for dual unannotated 233s does not register offenses for single unannotated 233s when enforced style is annotated 233s sets the enforced style to annotated after inspecting "%s" 233s detects when the cop must be disabled to avoid offenses 233s registers offenses for template style 233s #correctable_sequence? 233s supports dynamic string with interpolation 233s behaves like maximum allowed unannotated 233s when MaxUnannotatedPlaceholdersAllowed is 1 233s does not register offenses for single unannotated 233s registers offense for dual unannotated 233s when MaxUnannotatedPlaceholdersAllowed is 2 233s does not register offenses for dual unannotated 233s does not register offenses for single unannotated 233s when enforced style is unannotated 233s #correctable_sequence? 233s behaves like enforced styles for format string tokens 233s when enforced style is unannotated 233s #correctable_sequence? 233s when enforced style is template 233s configures the enforced style to template after inspecting "%{a}" 233s supports dynamic string with interpolation 233s detects when the cop must be disabled to avoid offenses 233s does not register offenses for annotated style 233s #correctable_sequence? 233s behaves like maximum allowed unannotated 233s when MaxUnannotatedPlaceholdersAllowed is 1 233s does not register offenses for dual unannotated 233s does not register offenses for single unannotated 233s when MaxUnannotatedPlaceholdersAllowed is 2 233s does not register offenses for dual unannotated 233s does not register offenses for single unannotated 233s when enforced style is annotated 233s detects when the cop must be disabled to avoid offenses 233s sets the enforced style to annotated after inspecting "%s" 233s supports dynamic string with interpolation 233s registers offenses for template style 233s #correctable_sequence? 233s behaves like maximum allowed unannotated 233s when MaxUnannotatedPlaceholdersAllowed is 2 233s does not register offenses for dual unannotated 233s does not register offenses for single unannotated 233s when MaxUnannotatedPlaceholdersAllowed is 1 233s registers offense for dual unannotated 233s does not register offenses for single unannotated 233s behaves like enforced styles for format string tokens 233s when enforced style is unannotated 233s #correctable_sequence? 233s when enforced style is template 233s does not register offenses for annotated style 233s configures the enforced style to template after inspecting "%{a}" 233s detects when the cop must be disabled to avoid offenses 233s supports dynamic string with interpolation 233s #correctable_sequence? 233s behaves like maximum allowed unannotated 233s when MaxUnannotatedPlaceholdersAllowed is 1 233s does not register offenses for dual unannotated 233s does not register offenses for single unannotated 233s when MaxUnannotatedPlaceholdersAllowed is 2 233s does not register offenses for dual unannotated 233s does not register offenses for single unannotated 233s when enforced style is annotated 233s sets the enforced style to annotated after inspecting "%s" 233s #correctable_sequence? 233s detects when the cop must be disabled to avoid offenses 233s registers offenses for template style 233s supports dynamic string with interpolation 233s behaves like maximum allowed unannotated 233s when MaxUnannotatedPlaceholdersAllowed is 1 233s does not register offenses for single unannotated 233s registers offense for dual unannotated 233s when MaxUnannotatedPlaceholdersAllowed is 2 233s does not register offenses for dual unannotated 233s does not register offenses for single unannotated 233s behaves like enforced styles for format string tokens 233s when enforced style is unannotated 233s #correctable_sequence? 233s when enforced style is annotated 233s detects when the cop must be disabled to avoid offenses 233s supports dynamic string with interpolation 233s sets the enforced style to annotated after inspecting "%s" 233s #correctable_sequence? 233s registers offenses for template style 233s behaves like maximum allowed unannotated 233s when MaxUnannotatedPlaceholdersAllowed is 2 233s does not register offenses for dual unannotated 233s does not register offenses for single unannotated 233s when MaxUnannotatedPlaceholdersAllowed is 1 233s does not register offenses for single unannotated 233s registers offense for dual unannotated 233s when enforced style is template 233s #correctable_sequence? 233s configures the enforced style to template after inspecting "%{a}" 233s detects when the cop must be disabled to avoid offenses 233s supports dynamic string with interpolation 233s does not register offenses for annotated style 233s behaves like maximum allowed unannotated 233s when MaxUnannotatedPlaceholdersAllowed is 2 233s does not register offenses for single unannotated 233s does not register offenses for dual unannotated 233s when MaxUnannotatedPlaceholdersAllowed is 1 233s does not register offenses for single unannotated 233s does not register offenses for dual unannotated 233s behaves like enforced styles for format string tokens 233s when enforced style is annotated 233s detects when the cop must be disabled to avoid offenses 233s registers offenses for template style 233s #correctable_sequence? 233s sets the enforced style to annotated after inspecting "%s" 233s supports dynamic string with interpolation 233s behaves like maximum allowed unannotated 233s when MaxUnannotatedPlaceholdersAllowed is 2 233s does not register offenses for dual unannotated 234s does not register offenses for single unannotated 234s when MaxUnannotatedPlaceholdersAllowed is 1 234s does not register offenses for single unannotated 234s registers offense for dual unannotated 234s when enforced style is template 234s does not register offenses for annotated style 234s #correctable_sequence? 234s supports dynamic string with interpolation 234s configures the enforced style to template after inspecting "%{a}" 234s detects when the cop must be disabled to avoid offenses 234s behaves like maximum allowed unannotated 234s when MaxUnannotatedPlaceholdersAllowed is 1 234s does not register offenses for single unannotated 234s does not register offenses for dual unannotated 234s when MaxUnannotatedPlaceholdersAllowed is 2 234s does not register offenses for dual unannotated 234s does not register offenses for single unannotated 234s when enforced style is unannotated 234s #correctable_sequence? 234s behaves like enforced styles for format string tokens 234s when enforced style is unannotated 234s #correctable_sequence? 234s when enforced style is template 234s #correctable_sequence? 234s detects when the cop must be disabled to avoid offenses 234s does not register offenses for annotated style 234s supports dynamic string with interpolation 234s configures the enforced style to template after inspecting "%{a}" 234s behaves like maximum allowed unannotated 234s when MaxUnannotatedPlaceholdersAllowed is 2 234s does not register offenses for single unannotated 234s does not register offenses for dual unannotated 234s when MaxUnannotatedPlaceholdersAllowed is 1 234s does not register offenses for dual unannotated 234s does not register offenses for single unannotated 234s when enforced style is annotated 234s detects when the cop must be disabled to avoid offenses 234s registers offenses for template style 234s #correctable_sequence? 234s sets the enforced style to annotated after inspecting "%s" 234s supports dynamic string with interpolation 234s behaves like maximum allowed unannotated 234s when MaxUnannotatedPlaceholdersAllowed is 2 234s does not register offenses for single unannotated 234s does not register offenses for dual unannotated 234s when MaxUnannotatedPlaceholdersAllowed is 1 234s registers offense for dual unannotated 234s does not register offenses for single unannotated 234s when enforced style is template 234s gives a helpful error message 234s behaves like enforced styles for format string tokens 234s when enforced style is annotated 234s sets the enforced style to annotated after inspecting "%s" 234s supports dynamic string with interpolation 234s registers offenses for template style 234s #correctable_sequence? 234s detects when the cop must be disabled to avoid offenses 234s behaves like maximum allowed unannotated 234s when MaxUnannotatedPlaceholdersAllowed is 2 234s does not register offenses for dual unannotated 234s does not register offenses for single unannotated 234s when MaxUnannotatedPlaceholdersAllowed is 1 234s does not register offenses for single unannotated 234s registers offense for dual unannotated 234s when enforced style is template 234s configures the enforced style to template after inspecting "%{a}" 234s supports dynamic string with interpolation 234s detects when the cop must be disabled to avoid offenses 234s #correctable_sequence? 234s does not register offenses for annotated style 234s behaves like maximum allowed unannotated 234s when MaxUnannotatedPlaceholdersAllowed is 1 234s does not register offenses for dual unannotated 234s does not register offenses for single unannotated 234s when MaxUnannotatedPlaceholdersAllowed is 2 234s does not register offenses for single unannotated 234s does not register offenses for dual unannotated 234s when enforced style is unannotated 234s #correctable_sequence? 234s behaves like enforced styles for format string tokens 234s when enforced style is annotated 234s supports dynamic string with interpolation 234s sets the enforced style to annotated after inspecting "%s" 234s detects when the cop must be disabled to avoid offenses 234s #correctable_sequence? 234s registers offenses for template style 234s behaves like maximum allowed unannotated 234s when MaxUnannotatedPlaceholdersAllowed is 1 234s does not register offenses for single unannotated 234s registers offense for dual unannotated 234s when MaxUnannotatedPlaceholdersAllowed is 2 234s does not register offenses for dual unannotated 234s does not register offenses for single unannotated 234s when enforced style is template 234s #correctable_sequence? 234s detects when the cop must be disabled to avoid offenses 234s supports dynamic string with interpolation 234s does not register offenses for annotated style 234s configures the enforced style to template after inspecting "%{a}" 234s behaves like maximum allowed unannotated 234s when MaxUnannotatedPlaceholdersAllowed is 1 234s does not register offenses for single unannotated 234s does not register offenses for dual unannotated 234s when MaxUnannotatedPlaceholdersAllowed is 2 234s does not register offenses for single unannotated 234s does not register offenses for dual unannotated 234s when enforced style is unannotated 234s #correctable_sequence? 234s behaves like enforced styles for format string tokens 234s when enforced style is annotated 234s supports dynamic string with interpolation 234s detects when the cop must be disabled to avoid offenses 234s registers offenses for template style 234s #correctable_sequence? 234s sets the enforced style to annotated after inspecting "%s" 234s behaves like maximum allowed unannotated 234s when MaxUnannotatedPlaceholdersAllowed is 1 234s registers offense for dual unannotated 234s does not register offenses for single unannotated 234s when MaxUnannotatedPlaceholdersAllowed is 2 234s does not register offenses for single unannotated 234s does not register offenses for dual unannotated 234s when enforced style is unannotated 234s #correctable_sequence? 234s when enforced style is template 234s configures the enforced style to template after inspecting "%{a}" 234s supports dynamic string with interpolation 234s does not register offenses for annotated style 234s detects when the cop must be disabled to avoid offenses 234s #correctable_sequence? 234s behaves like maximum allowed unannotated 234s when MaxUnannotatedPlaceholdersAllowed is 1 234s does not register offenses for dual unannotated 234s does not register offenses for single unannotated 234s when MaxUnannotatedPlaceholdersAllowed is 2 234s does not register offenses for single unannotated 234s does not register offenses for dual unannotated 234s behaves like enforced styles for format string tokens 234s when enforced style is annotated 234s detects when the cop must be disabled to avoid offenses 234s supports dynamic string with interpolation 234s #correctable_sequence? 234s sets the enforced style to annotated after inspecting "%s" 234s registers offenses for template style 234s behaves like maximum allowed unannotated 234s when MaxUnannotatedPlaceholdersAllowed is 2 234s does not register offenses for dual unannotated 234s does not register offenses for single unannotated 234s when MaxUnannotatedPlaceholdersAllowed is 1 234s registers offense for dual unannotated 234s does not register offenses for single unannotated 234s when enforced style is unannotated 234s #correctable_sequence? 234s when enforced style is template 234s detects when the cop must be disabled to avoid offenses 234s supports dynamic string with interpolation 234s #correctable_sequence? 234s configures the enforced style to template after inspecting "%{a}" 234s does not register offenses for annotated style 234s behaves like maximum allowed unannotated 234s when MaxUnannotatedPlaceholdersAllowed is 1 234s does not register offenses for dual unannotated 234s does not register offenses for single unannotated 234s when MaxUnannotatedPlaceholdersAllowed is 2 234s does not register offenses for dual unannotated 234s does not register offenses for single unannotated 234s 234s RuboCop::Cop::Style::NestedFileDirname 234s Ruby >= 3.1 234s does not register an offense when using `File.dirname(path, 2)` 234s registers and corrects an offense when using `File.dirname(path)` nested two times 234s does not register an offense when using non nested `File.dirname(path)` 234s registers and corrects an offense when using `File.dirname(path)` nested three times 234s Ruby <= 3.0 234s does not register an offense when using `File.dirname(path)` nested two times 234s 234s RuboCop::Cop::Layout::FirstMethodArgumentLineBreak 234s ignores arguments without parens 234s ignores methods without arguments 234s ignores arguments listed on a single line 234s registers an offense and corrects hash arg spanning multiple lines 234s ignores kwargs listed on a single line when the arguments are used in `super` 234s registers an offense and corrects hash arg without a line break before the first pair 234s args listed on the first line 234s registers an offense and corrects using safe navigation operator 234s registers an offense and corrects using `super` 234s registers an offense and corrects 234s 234s RuboCop::Cop::Style::MagicCommentFormat 234s snake case style 234s does not register an offense for dashes in other comments 234s registers an offense for mixed case 234s registers an offense for kebab case 234s registers an offense for kebab case in emacs style 234s accepts a source with no tokens 234s accepts an empty source 234s does not register an offense for incorrect style in comments after the first statement 234s accepts a frozen string literal in snake case in emacs style 234s accepts a magic comments in snake case 234s kebab case style 234s does not register an offense for dashes in other comments 234s accepts a source with no tokens 234s does not register an offense for incorrect style in comments after the first statement 234s accepts a frozen string literal in snake case in emacs style 234s registers an offense for snake case in emacs style 234s accepts a magic comments in kebab case 234s accepts an empty source 234s registers an offense for snake case 234s registers an offense for mixed case 234s ValueCapitalization 234s when uppercase 234s registers an offense and corrects when the case does not match 234s when not set 234s does not change the case of magic comment directives 234s when lowercase 234s registers an offense and corrects when the case does not match 234s invalid config 234s ValueCapitalization 234s raises an error 234s DirectiveCapitalization 234s raises an error 234s all issues at once 234s registers and corrects multiple issues 234s DirectiveCapitalization 234s when lowercase 234s registers an offense and corrects when the case does not match 234s when not set 234s does not change the case of magic comment directives 234s when uppercase 234s registers an offense and corrects when the case does not match 234s 234s RuboCop::Cop::Style::NegatedWhile 234s autocorrects by replacing while not with until 234s registers an offense for while with "not" condition 234s autocorrects by replacing until not with while 234s does not blow up for empty while condition 234s registers an offense for while with exclamation point condition 234s accepts a while where the condition is doubly negated 234s accepts a while where only part of the condition is negated 234s registers an offense for until with exclamation point condition 234s does not blow up for empty until condition 234s 234s RuboCop::Cop::Style::DoubleNegation 234s when `EnforcedStyle: forbidden` 234s registers an offense for `!!` when return location and using `ensure` 234s registers an offense and corrects for `!!` when return location 234s does not register an offense for ! 234s registers an offense for `!!` when return location and using `rescue`, `else`, and `ensure` 234s registers an offense and corrects for `!!` when using `return` keyword 234s registers an offense and corrects for `!!` when not a return location 234s registers an offense for `!!` when return location and using `rescue` and `ensure` 234s registers an offense and corrects for `!!` 234s does not register an offense for `not not` 234s registers an offense for `!!` when return location and using `rescue` 234s when `EnforcedStyle: allowed_in_returns` 234s does not register an offense for `!!` when return location and using `if`, `elsif`, and `else` 234s does not register an offense for `!!` with array when return location and using `if`, `elsif`, and `else` 234s does not register an offense for ! 234s registers an offense and corrects for `!!` when not a return location 234s registers an offense and corrects for `!!` when not return locationand using `case`, `when`, and `else` 234s does not register an offense for `!!` when return location by `define_singleton_method` 234s does not register an offense for `!!` with hash when return location and using `if`, `elsif`, and `else` 234s does not register an offense for `!!` when return location and using `ensure` 234s registers an offense and corrects for `!!` with nested hash at return location 234s does not register an offense for `!!` when return location and using `rescue` 234s registers an offense and corrects for `!!` 234s does not register an offense for `!!` when return location and using `rescue`, `else`, and `ensure` 234s does not register an offense for `!!` when return location 234s does not register an offense for `!!` with array when return location and using `case`, `when`, and `else` 234s registers an offense and corrects for `!!` with array when not return locationand using `if`, `elsif`, and `else` 234s registers an offense and corrects for `!!` when not return locationand using `if`, `elsif`, and `else` 234s does not register an offense for `!!` with hash when return location and using `case`, `when`, and `else` 234s registers an offense and corrects for `!!` with hash when not return locationand using `case`, `when`, and `else` 234s registers an offense and corrects for `!!` with complex array at return location 234s registers an offense and corrects for `!!` with hash when not return locationand using `if`, `elsif`, and `else` 234s does not register an offense for `!!` when return location and using `case`, `when`, and `else` 234s registers an offense and corrects for `!!` with single-line array at return location 234s does not register an offense for `!!` when return location and using `unless` 234s does not register an offense for `!!` when return location and using `rescue` and `ensure` 234s registers an offense and corrects for `!!` with nested array at return location 234s registers an offense and corrects for `!!` with multi-line array at return location 234s does not register an offense for `!!` when return location by `define_method` 234s registers an offense and corrects for `!!` when not return location and using `unless` 234s registers an offense and corrects for `!!` with array when not return locationand using `case`, `when`, and `else` 234s does not register an offense for `not not` 234s does not register an offense for `!!` when using `return` keyword 234s registers an offense and corrects for `!!` with single-line hash at return location 234s registers an offense and corrects for `!!` with multi-line hash at return location 234s Ruby >= 2.7 234s does not register an offense for `!!` when return location and using `case`, `in`, and `else` 234s Ruby >= 2.7 234s registers an offense and corrects for `!!` when not return locationand using `case`, `in`, and `else` 234s 234s RuboCop::Cop::Lint::ToJSON 234s does not register an offense when using `#to_json` with arguments 234s registers an offense and corrects using `#to_json` without arguments 234s 234s RuboCop::Cop::Lint::RegexpAsCondition 234s does not register an offense for a regexp literal with `=~` operator 234s registers an offense and corrects for a regexp literal in `if` condition 234s does not register an offense for a regexp literal outside conditions 234s 234s RuboCop::Cop::Layout::SpaceBeforeFirstArg 234s for method calls without parentheses 234s accepts multiple space containing line break 234s registers an offense and corrects method call with two spaces before the first arg 234s accepts a method call with one space before the first arg 234s accepts setter call 234s registers an offense for method call with no spaces before the first arg 234s accepts + operator 234s when AllowForAlignment is true 234s accepts method calls with aligned first arguments 234s when using safe navigation operator 234s registers an offense and corrects method call with two spaces before the first arg 234s when a vertical argument positions are aligned 234s registers an offense 234s when AllowForAlignment is false 234s registers an offense and corrects method calls with aligned first arguments 234s for method calls with parentheses 234s accepts a method call with space after the left parenthesis 234s accepts a method call without space 234s 234s RuboCop::Cop::Lint::DeprecatedClassMethods 234s prefer `Addrinfo#getaddrinfo` over `Socket.gethostbyname` 234s registers an offense for Socket.gethostbyname 234s does not register an offense for method `gethostbyname` on other receivers 234s registers an offense for ::Socket.gethostbyname 234s prefer `block_given?` over `iterator?` 234s does not register an offense for offensive method `iterator?`on other receivers 234s registers an offense and corrects iterator? 234s does not register an offense for block_given? 234s prefer `Dir.exist?` over `Dir.exists?` 234s does not register an offense for offensive method `exists?`on other receivers 234s does not register an offense for Dir.exist? 234s registers an offense and corrects ::Dir.exists? 234s registers an offense and corrects Dir.exists? 234s when using `ENV.dup` 234s registers an offense 234s does not register an offense for method calls to `ENV` other than `dup` 234s prefer `Addrinfo#getnameinfo` over `Socket.gethostbyaddr` 234s registers an offense for Socket.gethostbyaddr 234s does not register an offense for method `gethostbyaddr` on other receivers 234s registers an offense for ::Socket.gethostbyaddr 234s when using `ENV.freeze` 234s does not register an offense for method calls to `ENV` other than `freeze` 234s registers an offense 234s prefer `File.exist?` over `File.exists?` 234s registers an offense and corrects File.exists? 234s does not register an offense for File.exist? 234s registers an offense and corrects ::File.exists? 234s when using `ENV.clone` 234s does not register an offense for method calls to `ENV` other than `clone` 234s registers an offense 234s 234s RuboCop::Cop::Lint::FloatComparison 234s does not register an offense when comparing with float using epsilon 234s registers an offense when comparing with arightmetic operator on floats 234s registers an offense when comparing with method on float receiver 234s registers an offense when comparing with float 234s does not register an offense when comparing with float method that can return numeric and returns integer 234s registers an offense when comparing with float method that can return numeric and returns float 234s registers an offense when comparing with float returning method 234s 234s RuboCop::Cop::Metrics::BlockLength 234s properly counts nested blocks 234s does not count blank lines 234s reports the correct beginning and end lines 234s rejects a block with more than 5 lines 234s does not count commented lines by default 234s accepts a block with multiline receiver and less than 3 lines of body 234s rejects brace blocks too 234s accepts empty blocks 234s accepts a block with less than 3 lines 234s when using numbered parameter 234s rejects a block with more than 5 lines 234s does not count blank lines 234s accepts a block with less than 3 lines 234s reports the correct beginning and end lines 234s when defining a Struct 234s does not register an offense 234s when CountComments is enabled 234s also counts commented lines 234s when defining a class 234s does not register an offense 234s when defining a module 234s does not register an offense 234s when `CountAsOne` is not empty 234s folds array into one line 234s when methods to allow are defined 234s when AllowedPatterns is enabled 234s does not report an offense 234s that does not match 234s reports an offense 234s when ExcludedMethods is enabled 234s does not report an offense 234s that does not match 234s reports an offense 234s when IgnoredMethods is enabled 234s when string 234s does not report an offense 234s that does not match 234s reports an offense 234s when regex 234s does not report an offense 234s that does not match 234s reports an offense 234s when AllowedMethods is enabled 234s behaves like allow an offense on an allowed method 234s accepts the foo method with a long block 234s still rejects other methods with long blocks 234s when receiver contains whitespaces 234s allows whitespaces 234s behaves like allow an offense on an allowed method 234s still rejects other methods with long blocks 234s accepts the foo method with a long block 234s when a method is allowed, but receiver is a module 234s does not report an offense 234s 234s RuboCop::Cop::Layout::SpaceAfterColon 234s accepts colons in symbols 234s accepts hashes with a space after colons 234s accepts colon in ternary followed by space 234s accepts colons denoting required keyword argument 234s accepts colons in strings 234s registers an offense and corrects a keyword optional argument without a space 234s accepts if 234s accepts required keyword arguments 234s registers an offense and corrects colon without space after it 234s accepts hash rockets 234s Ruby >= 3.1 234s does not register an offense colon without space after it when using hash value omission 234s accepts colons denoting hash value omission argument 234s 234s RuboCop::Cop::Lint::SafeNavigationConsistency 234s registers an offense and corrects using safe navigation on the left of && 234s registers an offense and corrects assignment 234s registers an offense and corrects using safe navigation inside of separated conditions 234s registers an offense and corrects using unsafe navigation with grouped conditions 234s registers an offense and corrects using safe navigation on the right of && 234s registers an offense and corrects unsafe navigation that appears before safe navigation 234s registers an offense and corrects using safe navigation in conditions on the right hand side 234s registers an offense and corrects when there is code before or after the condition 234s registers and corrects multiple offenses 234s registers an offense and corrects using unsafe navigation with both && and || 234s allows calls to methods that nil responds to 234s allows || without safe navigation 234s registers an offense and corrects using safe navigation on the left of || 234s allows && without safe navigation 234s allows safe navigation when different variables are used 234s registers an offense but does not correct non dot method calls 235s registers an offense and corrects using safe navigation on the right of || 235s registers a single offense and corrects when safe navigation is used multiple times 235s registers an offense and corrects using unsafe navigation and the safe navigation appears in a group 235s 235s RuboCop::Cop::Layout::MultilineHashKeyLineBreaks 235s with line break after opening bracket 235s registers an offense and corrects when key starts on same line as another 235s when on all keys on one line different than brackets 235s does not add any offenses 235s when on different lines than brackets but keys on one 235s does not add any offenses 235s when key starts on same line as another with rockets 235s adds an offense 235s without line break after opening bracket 235s registers an offense and corrects nested hashes 235s registers an offense and corrects when key starts on same line as another 235s when on same line 235s does not add any offenses 235s 235s RuboCop::Cop::InternalAffairs::NumblockHandler 235s does not register an offense for cops with on_numblock method 235s does not register an offense for cops with on_numblock alias 235s does not register an offense for cops with on_numblock alias_method 235s registers an offense for cops with forgotten numblock handlers 235s 235s RuboCop::Cop::Lint::ElseLayout 235s registers an offense and corrects for the entire else body being on the same line 235s registers and corrects an offense when using multiple `elsif`s 235s does not register an offense for an elsif with no body 235s registers an offense and corrects for expr on same line as else 235s accepts proper else 235s registers an offense and corrects for elsifs 235s accepts ternary ops 235s accepts modifier forms 235s accepts empty braces 235s does not register an offense if the entire if is on a single line 235s 235s RuboCop::Cop::Lint::ParenthesesAsGroupedExpression 235s registers an offense and corrects for method call with space before the parenthesis 235s accepts a method call without arguments 235s does not register an offense for expression followed by an operator 235s does not register an offense for math expression 235s accepts a method call with arguments but no parentheses 235s does not register an offense for ternary operator 235s accepts a space inside opening paren followed by left paren 235s does not register an offense when method argument parentheses are omitted and hash argument key is enclosed in parentheses 235s does not register an offense for expression followed by chained expression 235s accepts a chain of method calls 235s does not register an offense for math expression with `to_i` 235s does not register an offense for a call with multiple arguments 235s does not register an offense for expression followed by chained expression with safe navigation operator 235s accepts an operator call with argument in parentheses 235s accepts method with parens as arg to method without 235s does not register an offesne when heredoc has a space between the same string as the method name and `(` 235s registers an offense and corrects for predicate method call with space before the parenthesis 235s when using safe navigation operator 235s registers an offense and corrects for method call with space before the parenthesis 235s 235s RuboCop::Cop::Layout::MultilineOperationIndentation 235s when EnforcedStyle is indented 235s accepts indented operands in while body 235s accepts double indentation of if condition 235s accepts double indentation of unless condition 235s registers an offense for a 2 space indentation of if condition 235s accepts two spaces indentation in assignment of array element 235s accepts normal indentation inside grouped expression 235s accepts the indentation of a broken string 235s registers an offense and corrects aligned code on LHS of equality operator 235s accepts any indentation of method parameters 235s accepts double indentation of until condition 235s accepts indentation of next if condition 235s registers an offense and corrects aligned operators in assignment 235s accepts indentation of next unless condition 235s accepts indented operands in if body 235s accepts indented operands inside and outside a block 235s registers an offense and corrects extra indentation of third line 235s registers an offense and corrects one space indentation of second line 235s accepts double indentation of while condition 235s registers an offense and corrects an unindented multiline operation that is the left operand in another operation 235s registers an offense and corrects aligned operands in if conditions 235s accepts indentation of return unless condition 235s registers an offense and corrects no indentation of second line 235s accepts alignment inside a grouped expression 235s registers an offense and corrects emacs ruby-mode 1.1 indentation of an expression in an array 235s accepts an expression where the first operand spans multiple lines 235s registers an offense and corrects correct + unrecognized style 235s accepts indentation of return if condition 235s accepts two spaces indentation in assignment of local variable 235s accepts special indentation of for expression 235s accepts indented operands in unless body 235s accepts indented operands in if condition 235s accepts any indentation of parameters to #[] 235s accepts normal indentation of method parameters 235s accepts indented operands in for body 235s accepts two spaces indentation of second line 235s registers an offense for a 2 space indentation of unless condition 235s accepts no extra indentation of third line 235s accepts indented operands in until body 235s registers an offense and corrects wrong indentation of for expression 235s accepts unary operations 235s accepts indented operands in ordinary statement 235s registers an offense for a 2 space indentation of until condition 235s registers an offense and corrects three space indentation of second line 235s does not check method calls 235s accepts indentation of assignment 235s registers an offense for a 2 space indentation of while condition 235s accepts indented operands in an array 235s when indentation width is overridden for this cop 235s registers an offense for a 4 space indentation of while condition 235s accepts indented operands in if condition 235s registers an offense for a 4 space indentation of until condition 235s accepts indented operands in while body 235s accepts indented operands in if body 235s accepts indentation of until condition which is offset by a single normal indentation step 235s registers an offense for a 4 space indentation of unless condition 235s accepts indented operands in unless body 235s registers an offense and corrects 235s registers an offense for a 4 space indentation of if condition 235s accepts indentation of if condition which is offset by a single normal indentation step 235s accepts indented operands in until body 235s accepts indentation of while condition which is offset by a single normal indentation step 235s accepts indentation of unless condition which is offset by a single normal indentation step 235s when EnforcedStyle is aligned 235s does not check method calls 235s accepts no extra indentation of third line 235s accepts alignment inside a grouped expression 235s registers an offense and corrects misaligned string operand when plus is used 235s accepts two spaces indentation of second line 235s registers an offense and corrects three space indentation of second line 235s accepts aligned operands in assignment 235s accepts aligned operands in if condition 235s registers an offense and corrects indented second part of string 235s accepts two spaces indentation in assignment of local variable 235s registers an offense and corrects misaligned operands in unless condition 235s registers an offense and corrects emacs ruby-mode 1.1 indentation of an expression in an array 235s registers an offense and corrects extra indentation of third line 235s accepts indented operands in for body 235s registers an offense and corrects indented operand in second argument 235s accepts aligned or:ed operands in assignment 235s accepts indented operands inside block + assignment 235s accepts indented operands with ternary operators 235s accepts indented code on LHS of equality operator 235s accepts any indentation of parameters to #[] 235s registers an offense for misaligned operands in unless condition 235s registers an offense for misaligned operands in until condition 235s accepts indented operands in an array 235s registers an offense and corrects indented operands in if condition 235s accepts indented operands inside and outside a block 235s accepts an expression where the first operand spans multiple lines 235s registers an offense and corrects one space indentation of second line 235s registers an offense and corrects no indentation of second line 235s registers an offense and corrects an unindented multiline operation that is the left operand in another operation 235s registers an offense for misaligned operands in if condition 235s accepts two spaces indentation in assignment of array element 235s accepts indented operands in ordinary statement 235s accepts unary operations 235s registers an offense and corrects misaligned string operand when the first operand has backslash continuation 235s registers an offense and corrects unaligned operands in op-assignment 235s registers an offense for misaligned operands in while condition 235s 235s RuboCop::Formatter::JSONFormatter 235s #finished 235s sets inspected file count in summary 235s outputs #output_hash as JSON 235s #hash_for_offense 235s sets Offense#severity value for :severity key 235s sets Offense#corrected? value for :corrected key 235s sets value of #hash_for_location for :location key 235s sets Offense#cop_name value for :cop_name key 235s sets Offense#correctable? value for :correctable key 235s sets Offense#message value for :message key 235s #file_finished 235s adds value of #hash_for_file to #output_hash[:files] 235s adds detected offense count in summary 235s #started 235s sets target file count in summary 235s #hash_for_file 235s sets an array of #hash_for_offense values for :offenses key 235s sets relative file path for :path key 235s #hash_for_location 235s sets line value for :line key 235s sets length value for :length key 235s sets column value for :column key 235s when the location is pseudo 235s returns a valid hash 235s 235s RuboCop::Formatter::FormatterSet 235s responds to all formatter API methods 235s formatter API method 235s invokes the same method of all containing formatters 235s #close_output_files 235s closes all output files 235s does not close non file output 235s add_formatter 235s can add multiple formatters by being invoked multiple times 235s adds a formatter with specified formatter type 235s adds a formatter to itself 235s when output path is specified 235s adds a formatter outputs to the specified file 235s when parent directories don't exist 235s creates them 235s when output path is omitted 235s adds a formatter outputs to $stdout 235s #custom_formatter_class 235s can handle namespaced constant name 235s returns constant represented by the passed string 235s can handle top level namespaced constant name 235s when non-existent constant name is passed 235s raises error 235s #builtin_formatter_class 235s returns class which matches double character alias name 235s returns class which matches passed alias name exactly 235s returns class which matches single character alias name 235s 235s RuboCop::Cop::Style::MethodDefParentheses 235s require_parentheses 235s reports an offense for class def with parameters but no parens 235s auto-adds required parens for a defs 235s accepts def with no args and no parens 235s auto-adds required parens for a defs after a passing method 235s reports an offense for correct + opposite 235s reports an offense for def with parameters but no parens 235s auto-adds required parens to argument lists on multiple lines 235s behaves like endless methods 235s endless methods 235s accepts parens with `forward-arg` 235s accepts parens for method calls inside an endless method 235s accepts parens without args 235s accepts parens with args 235s require_no_parentheses_except_multiline 235s behaves like endless methods 235s endless methods 235s accepts parens for method calls inside an endless method 235s accepts parens with `forward-arg` 235s accepts parens without args 235s accepts parens with args 235s when args span multiple lines 235s auto-adds required parens to argument lists on multiple lines 235s reports an offense for correct + opposite 235s when args are all on a single line 235s behaves like no parentheses 235s requires parens for anonymous block forwarding 235s reports an offense for def with parameters with parens 235s reports an offense for def with no args and parens 235s accepts a class def with parameters with parens 235s auto-removes the parens for defs 235s reports an offense for opposite + correct 235s accepts a def with parameters but no parens 235s requires parens for forwarding 235s reports an offense for class def with parameters with parens 235s accepts def with no args and no parens 235s require_no_parentheses 235s behaves like endless methods 235s endless methods 235s accepts parens without args 235s accepts parens with `forward-arg` 235s accepts parens for method calls inside an endless method 235s accepts parens with args 235s behaves like no parentheses 235s accepts def with no args and no parens 235s auto-removes the parens for defs 235s requires parens for forwarding 235s reports an offense for class def with parameters with parens 235s accepts a class def with parameters with parens 235s reports an offense for opposite + correct 235s requires parens for anonymous block forwarding 235s accepts a def with parameters but no parens 235s reports an offense for def with parameters with parens 235s reports an offense for def with no args and parens 235s 235s RuboCop::Cop::Naming::InclusiveLanguage 235s symbols 235s when CheckSymbols is false 235s does not register an offense 235s when CheckSymbols is true 235s registers an offense 235s comments 235s registers an offense in a single line comment 235s registers an offense in a block comment 235s when CheckComments is false 235s does not register an offense 235s filepath 235s offense in directory name 235s registers an offense for a director 235s one offense in filename 235s registers an offense 235s CheckFilepaths is false 235s does not register an offense 235s multiple offenses in filename 235s registers an offense with all problematic words 235s allowed use 235s does not register an offense for an allowed use 235s offense after an allowed use 235s registers an offense at the correct location 235s flagged term matching 235s registers an offense for a partial word match 235s registers an offense when using a flagged term 235s registers an offense when using a flagged term with mixed case 235s multiple offenses on a line 235s registers an offense for each word 235s WholeWord: true 235s only flags when the term is a whole word 235s regex 235s registers an offense for a flagged term matched with a regexp 235s disable default flagged term 235s ignores flagged terms that are set to nil 235s constants 235s when CheckConstants config is true 235s registers offenses for constants 235s when CheckConstants config is false 235s does not register offenses for constants 235s strings 235s registers an offense in a heredoc 235s does not register offenses and not raise `ArgumentError` for invalid byte sequence in UTF-8 235s registers an offense for a multiline string 235s registers an offense for an interpolated string 235s when CheckStrings config is false 235s does not register offenses for strings 235s identifiers 235s when CheckIdentifiers config is false 235s does not register offenses for identifiers 235s when CheckIdentifiers config is true 235s registers an offense 235s variables 235s when CheckVariables config is true 235s registers offenses for class variables 235s registers offenses for instance variables 235s registers offenses for global variables 235s when CheckVariables config is false 235s does not register offenses for variables 235s suggestions 235s flagged term with two suggestions 235s includes both suggestions in the offense message 235s flagged term with one suggestion 235s includes the suggestion in the offense message 235s flagged term with three or more suggestions 235s includes all suggestions in the message 235s 235s RuboCop::Cop::Metrics::CyclomaticComplexity 235s when Max is 2 235s counts stupid nested if and else blocks 235s when Max is 1 235s registers an offense for an until block 235s registers an offense for an unless modifier 235s counts enumerating methods with blocks as +1 235s accepts complex code outside of methods 235s registers an offense for an if modifier 235s accepts a method with no decision points 235s registers an offense for and 235s registers an offense for a `define_method` 235s registers an offense for &&= 235s registers an offense for a while block 235s registers an offense for &. 235s does not count blocks in general 235s registers an offense for or 235s registers an offense for && 235s registers an offense for an elsif block 235s deals with nested if blocks containing && and || 235s counts enumerating methods with block-pass as +1 235s registers an offense for ||= 235s registers an offense for || 235s registers an offense for a for block 235s counts only a single method 235s accepts an empty method 235s counts repeated &. on same untouched local variable as 1 235s registers an offense for a ternary operator 235s accepts an empty `define_method` 235s registers an offense for a case/when block 235s registers an offense for a rescue block 235s Ruby 2.7 235s counts enumerating methods with numblocks as +1 235s when AllowedPatterns is enabled 235s does not register an offense when using `define_method` 235s does not register an offense when defining a class method 235s does not register an offense when defining an instance method 235s when AllowedMethods 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 235s RuboCop::Cop::Naming::HeredocDelimiterNaming 235s with an interpolated heredoc 235s registers an offense with a non-meaningful delimiter 235s does not register an offense with a meaningful delimiter 235s with a squiggly heredoc 235s registers an offense with a non-meaningful delimiter 235s does not register an offense with a meaningful delimiter 235s with multiple heredocs starting on the same line 235s registers an offense with a trailing non-meaningful delimiter 235s registers an offense with a leading non-meaningful delimiter 235s does not register an offense with meaningful delimiters 235s when the delimiter contains non-letter characters 235s does not register an offense when delimiter contains a number 235s does not register an offense when delimiter contains an underscore 235s with a non-interpolated heredoc 235s when using non-word delimiters 235s registers an offense 235s when using single quoted delimiters 235s registers an offense with a non-meaningful delimiter 235s does not register an offense with a meaningful delimiter 235s when using double quoted delimiters 235s registers an offense with a non-meaningful delimiter 235s does not register an offense with a meaningful delimiter 235s when using back tick delimiters 235s does not register an offense with a meaningful delimiter 235s registers an offense with a non-meaningful delimiter 235s with a naked heredoc 235s does not register an offense with a meaningful delimiter 235s registers an offense with a non-meaningful delimiter 235s 235s RuboCop::Cop::Style::RedundantArgument 235s registers an offense and corrects when method called on variable 235s does not register an offense when method called with no receiver 235s does not register an offense when method called with no arguments 235s does not register an offense when method called with different argument 235s registers an offense and corrects when method called without parenthesis on literals 235s works with double-quoted strings when configuration is single-quotes 235s registers an offense and corrects when method called on literals 235s registers an offense and corrects when method called without parenthesis on variable 235s does not register an offense when method called with more than one arguments 235s non-builtin method 235s does not register an offense with other argument 235s registers an offense and corrects with configured argument 235s 235s RuboCop::Cop::Naming::BlockParameterName 235s registers offense when param contains uppercase characters 235s registers offense when param is less than minimum length 235s registers offense when param ends in number 235s does not register for brace block without parameters 235s can register multiple offenses in one block 235s does not register for block without parameters 235s does not register offense for valid parameter names 235s registers offense when param with prefix is less than minimum length 235s with ForbiddenNames 235s registers offense for param listed as forbidden 235s accepts param that uses a forbidden name's letters 235s with AllowNamesEndingInNumbers 235s accept params that end in numbers 235s with AllowedNames 235s registers unlisted offensive names 235s accepts specified block param names 235s 235s RuboCop::Cop::Style::FileRead 235s registers an offense for and corrects the `File.open` with inline read block (implicit text mode) 235s registers an offense for and corrects `File.open(filename, 'r+t').read` 235s registers an offense for and corrects the `File.open` with multiline read block (mode 'r+t') 235s registers an offense for and corrects the `File.open` with multiline read block (mode 'r') 235s registers an offense for and corrects `File.open(filename, 'r').read` 235s registers an offense for and corrects the `File.open` with multiline read block (mode 'r+b') 235s registers an offense for and corrects the `File.open` with multiline read block (mode 'rb') 235s registers an offense for and corrects the `File.open` with inline read block (mode 'rb') 235s registers an offense for and corrects the `File.open` with symbolic read proc (implicit text mode) 235s registers an offense for and corrects the `File.open` with inline read block (mode 'r+t') 235s registers an offense for and corrects the `File.open` with inline read block (mode 'rt') 235s registers an offense for and corrects the `File.open` with multiline read block (mode 'r+') 235s registers an offense for and corrects `File.open(filename, 'r+').read` 235s registers an offense for and corrects the `File.open` with symbolic read proc (mode 'r+t') 235s registers an offense for and corrects `::File.open(filename).read` 235s registers an offense for and corrects the `File.open` with symbolic read proc (mode 'r') 235s registers an offense for and corrects the `File.open` with inline read block (mode 'r') 235s registers an offense for and corrects the `File.open` with symbolic read proc (mode 'rt') 235s registers an offense for and corrects the `File.open` with inline read block (mode 'r+') 235s registers an offense for and corrects `File.open(filename, 'rb').read` 235s registers an offense for and corrects the `File.open` with symbolic read proc (mode 'r+b') 235s registers an offense for and corrects the `File.open` with symbolic read proc (mode 'rb') 235s registers an offense for and corrects `File.open(filename, 'rt').read` 235s registers an offense for and corrects the `File.open` with multiline read block (implicit text mode) 235s registers an offense for and corrects the `File.open` with inline read block (mode 'r+b') 235s registers an offense for and corrects `File.open(filename, 'r+b').read` 235s registers an offense for and corrects `File.open(filename).read` 235s registers an offense for and corrects the `File.open` with multiline read block (mode 'rt') 235s registers an offense for and corrects the `File.open` with symbolic read proc (mode 'r+') 235s does not register an offense when not reading from the block variable 235s 235s RuboCop::Cop::Lint::NestedPercentLiteral 235s registers no offense for array 235s registers offense for multiply nested percent literals 235s registers offense for nested percent literals 235s registers no offense for nestings under percent 235s registers no offense for percents in the middle of literals 235s registers no offense for empty array 235s registers no offense for percent modifier character in isolation 235s registers offense for repeated nested percent literals 235s when handling invalid UTF8 byte sequence 235s registers no offense for array 235s registers offense for nested percent literal 235s 235s RuboCop::Cop::Lint::InterpolationCheck 235s registers an offense and corrects for interpolation in single quoted string 235s does not register offense for strings in %w() 235s registers an offense for interpolation in single quoted split string 235s does not crash for \xff 235s does not register an offense for escaped crab claws in dstr 235s registers an offense for interpolation in double + single quoted split string 235s does not register an offense for properly interpolation strings 235s does not register an offense for interpolation in a regexp 235s registers an offense and corrects when including interpolation and double quoted string in single quoted string 235s does not register an offense for interpolation in nested strings 235s does not register an offense for an escaped interpolation 235s 235s RuboCop::Cop::Style::BeginBlock 235s reports an offense for a BEGIN block 235s 235s RuboCop::Cop::Style::BlockComments 236s registers an offense for block comments 236s accepts regular comments 236s autocorrects an empty block comment by removing it 236s autocorrects a block comment into a regular comment 236s autocorrects a block comment into a regular comment (without trailingnewline) 236s 236s RuboCop::Cop::Layout::FirstParameterIndentation 236s align_parentheses style 236s invalid indentation on multi-line defs 236s hash arguments static def 236s registers an offense and corrects incorrectly indented first element 236s hash arguments 236s registers an offense and corrects incorrectly indented first element 236s normal arguments 236s registers an offense and corrects incorrectly indented first element 236s single line method defs 236s ignores 236s ignores with hash args 236s valid indentation on multi-line defs 236s accepts correctly indented first element 236s accepts correctly indented first element hash 236s no paren method defs 236s ignores with hash args 236s ignores 236s consistent style 236s single line method defs 236s ignores with hash args 236s ignores 236s no paren method defs 236s ignores 236s ignores with hash args 236s valid indentation on multi-line defs 236s accepts correctly indented first element hash 236s accepts correctly indented first element 236s invalid indentation on multi-line defs 236s hash arguments 236s registers an offense and corrects incorrectly indented first element 236s hash arguments static method def 236s registers an offense and corrects incorrectly indented first element 236s normal arguments 236s registers an offense and corrects incorrectly indented first element 236s valid indentation on static multi-line defs 236s accepts correctly indented first element 236s accepts correctly indented first element hash 236s 236s RuboCop::Formatter::WorstOffendersFormatter 236s #finished 236s when there are many offenses 236s sorts by offense count first and then by cop name 236s 236s RuboCop::Cop::Metrics::ModuleLength 236s does not count blank lines 236s reports the correct beginning and end lines 236s rejects a module with more than 5 lines 236s accepts a module with 5 lines 236s accepts a module with less than 5 lines 236s accepts empty modules 236s when `CountAsOne` is not empty 236s folds array into one line 236s when a module has inner modules 236s does not count lines of inner modules 236s rejects a module with 6 lines that belong to the module directly 236s when using numbered parameter 236s when inspecting a class defined with ::Module.new 236s registers an offense 236s when inspecting a class defined with Module.new 236s registers an offense 236s when inspecting a class defined with ::Module.new 236s registers an offense 236s when CountComments is enabled 236s also counts commented lines 236s when inspecting a class defined with Module.new 236s registers an offense 236s when a module has inner classes 236s rejects a module with 6 lines that belong to the module directly 236s does not count lines of inner classes 236s 236s RuboCop::Cop::Lint::ShadowedArgument 236s block argument shadowing 236s when multiple arguments are shadowed 236s and one of them shadowed within a lambda while another is shadowed outside 236s registers an offense 236s when a block local variable is assigned but no argument is shadowed 236s accepts 236s when a single argument is shadowed 236s registers an offense 236s and the argument is not used 236s accepts 236s and shadowed within a block 236s registers an offense without specifying where the reassignment took place 236s and the argument was not shadowed outside the block 236s accepts 236s and the block occurs after the reassignment 236s registers an offense 236s and was used before shadowing 236s accepts 236s and the block is nested within a block 236s registers an offense without specifying where the reassignment took place 236s and the argument was used before shadowing 236s accepts 236s and the block is nested within a conditional 236s registers an offense without specifying where the reassignment took place 236s and the argument was used before shadowing 236s accepts 236s and shadowed within a conditional 236s registers an offense without specifying where the reassignment took place 236s and the conditional is nested within a conditional 236s registers an offense without specifying where the reassignment took place 236s and the argument was used before shadowing 236s accepts 236s and the conditional occurs after the reassignment 236s registers an offense 236s and the argument was not shadowed outside the conditional 236s accepts 236s and was used before shadowing 236s accepts 236s and the conditional is nested within a lambda 236s registers an offense without specifying where the reassignment took place 236s and the argument was used before shadowing 236s accepts 236s when zsuper is used 236s accepts 236s when binding is used 236s registers an offense 236s when IgnoreImplicitReferences config option is set to true 236s accepts 236s method argument shadowing 236s when a single argument is shadowed 236s registers an offense 236s when a splat argument is shadowed 236s registers an offense 236s and shadowed within a conditional 236s registers an offense without specifying where the reassignment took place 236s and the conditional is nested within a lambda 236s registers an offense without specifying where the reassignment took place 236s and the argument was used before shadowing 236s accepts 236s and the argument was not shadowed outside the conditional 236s accepts 236s and was used before shadowing 236s accepts 236s and the conditional occurs after the reassignment 236s registers an offense 236s and the conditional is nested within a conditional 236s registers an offense without specifying where the reassignment took place 236s and the argument was used before shadowing 236s accepts 236s when argument was used in shorthand assignment 236s does not register an offense 236s when zsuper is used 236s registers an offense 236s when argument was shadowed by zsuper 236s registers an offense 236s when IgnoreImplicitReferences config option is set to true 236s accepts 236s when argument was shadowed by zsuper 236s does not register an offense 236s when binding is used 236s registers an offense 236s when IgnoreImplicitReferences config option is set to true 236s accepts 236s and shadowed within a block 236s registers an offense without specifying where the reassignment took place 236s and the argument was not shadowed outside the block 236s accepts 236s and the block is nested within a block 236s registers an offense without specifying where the reassignment took place 236s and the argument was used before shadowing 236s accepts 236s and was used before shadowing 236s accepts 236s and the block occurs after the reassignment 236s registers an offense 236s and the block is nested within a conditional 236s registers an offense without specifying where the reassignment took place 236s and the argument was used before shadowing 236s accepts 236s and the argument is not used 236s accepts 236s when reassigning to splat variable 236s does not register an offense 236s when multiple arguments are shadowed 236s and one of them shadowed within a lambda while another is shadowed outside 236s registers an offense 236s 236s RuboCop::Cop::Bundler::GemVersion 236s when EnforcedStyle is set to forbidden 236s does not flag gems without a specified version 236s flags gems that specify a gem version 236s does not flag gems included in AllowedGems metadata 236s when EnforcedStyle is set to required (default) 236s does not flag gems with a specified version 236s does not flag gems included in AllowedGems metadata 236s flags gems that do not specify a version 236s 236s RuboCop::Options 236s option 236s --regenerate-todo 236s when todo options are overridden before --regenerate-todo 236s is expected to eq {:auto_gen_config=>true, :exclude_limit=>"50", :offense_counts=>false, :regenerate_todo=>true} 236s when no other options are given 236s is expected to eq {:auto_gen_config=>true, :exclude_limit=>"100", :offense_counts=>false, :regenerate_todo=>true} 236s when todo options are overridden after --regenerate-todo 236s is expected to eq {:auto_gen_config=>true, :exclude_limit=>"50", :offense_counts=>false, :regenerate_todo=>true} 236s when disabled options are overridden to be enabled 236s is expected to eq {:auto_gen_config=>true, :exclude_limit=>"100", :offense_counts=>true, :regenerate_todo=>true} 236s --require 236s requires the passed path 236s --no-parallel 236s disables parallel from file 236s --cache 236s fails if no argument is given 236s fails if unrecognized argument is given 236s accepts false as argument 236s accepts true as argument 236s --parallel 236s combined with --auto-gen-config 236s ignores --parallel 236s combined with two incompatible arguments 236s ignores --parallel and lists both incompatible arguments 236s combined with --cache false 236s ignores --parallel 236s combined with --fail-fast 236s ignores --parallel 236s combined with an autocorrect argument 236s combined with --autocorrect-all 236s allows --parallel 236s combined with --autocorrect 236s allows --parallel 236s combined with --fix-layout 236s allows --parallel 236s --fail-level 236s accepts severity initial letters 236s accepts full severity names 236s accepts the "fake" severities A/autocorrect 236s --raise-cop-error 236s raises cop errors 236s --display-only-correctable 236s fails if given with --display-only-failed 236s fails if given with an autocorrect argument 236s --disable-uncorrectable 236s fails if given without an autocorrect argument 236s accepts together with an unsafe autocorrect argument 236s accepts together with a safe autocorrect argument 236s --display-only-fail-level-offenses 236s fails if given with an autocorrect argument 236s --auto-gen-only-exclude 236s fails if given without --auto-gen-config 236s --autocorrect-all 236s sets some autocorrect options 236s -s/--stdin 236s succeeds with exactly one path 236s fails if no paths are given 236s fails if more than one path is given 236s --fix-layout 236s sets some autocorrect options 236s --exclude-limit 236s fails if given first without argument 236s fails if given last without argument 236s fails if given without --auto-gen-config 236s fails if given alone without argument 236s --display-only-failed 236s works if given with --format junit 236s fails if given without --format junit 236s --cache-root 236s accepts a path as argument 236s fails if no argument is given 236s fails if also `--cache false` is given 236s -h/--help 236s shows help text 236s lists all builtin formatters 236s exits cleanly 236s incompatible cli options 236s rejects using -V with --show-cops 236s rejects using -v with --show-cops 236s rejects using -v with -V 236s mentions all incompatible options when more than two are used 236s --auto-gen-config 236s accepts other options 236s --autocorrect 236s Specify --autocorrect and --autocorrect-all 236s emits a warning and sets some autocorrect options 236s Specify only --autocorrect 236s sets some autocorrect options 236s deprecated options 236s --auto-correct-all 236s emits a warning and sets the correct options instead 236s --safe-auto-correct 236s emits a warning and sets the correct options instead 236s --auto-correct 236s emits a warning and sets the correct options instead 236s options precedence 236s .rubocop directory 236s is ignored and command line options are used 236s RUBOCOP_OPTS environment variable 236s has lower precedence then command line options 236s has higher precedence then options from .rubocop file 236s .rubocop file 236s has lower precedence then command line options 236s has lower precedence then options from RUBOCOP_OPTS env variable 236s 236s RuboCop::Cop::Lint::PercentStringArray 236s with binary encoded source 236s adds an offense and corrects when tokens contain quotes 236s accepts if tokens contain no quotes 236s with invalid byte sequence in UTF-8 236s accepts if tokens contain invalid byte sequence only 236s add an offense and corrects when tokens contain quotes 236s detecting quotes or commas in a %w/%W string 236s accepts likely false positive :"#{a}" 236s accepts likely false positive %W(#{a} b) 236s accepts tokens without quotes or commas 236s adds an offense and corrects when tokens contain quotes and are comma separated 236s adds an offense and corrects when there are no quotes but one comma 236s accepts likely false positive %w(' ") 236s adds an offense and corrects when one token is quoted but there are no commas 236s accepts tokens without quotes or commas 236s accepts likely false positive %w(#{a} b) 236s accepts likely false positive %W(' " ! = # ,) 236s adds an offense and corrects when tokens contain quotes and are comma separated 236s adds an offense and corrects when one token is quoted but there are no commas 236s accepts likely false positive :"#{a}" 236s adds an offense and corrects when there are no quotes but one comma 236s adds an offense and corrects when tokens contain both types of quotes 236s adds an offense and corrects when tokens contain both types of quotes 236s accepts likely false positive %w(' " ! = # ,) 236s accepts likely false positive %W(' ") 236s 236s RuboCop::Cop::Style::IfWithBooleanLiteralBranches 236s when condition is a predicate method 236s registers and corrects an offense when using `unless foo.do_something?` with boolean literal branches 236s registers and corrects an offense when using `if foo.do_something?` with boolean literal branches 236s registers and corrects an offense when using `unless foo.do_something?` with opposite boolean literal branches 236s registers and corrects an offense when using `if foo.do_something?` with opposite boolean literal branches 236s registers and corrects an offense when using `elsif foo.do_something?` with opposite boolean literal branches 236s registers and corrects an offense when using `elsif foo.do_something?` with boolean literal branches 236s when condition is a method that does not known whether to return boolean value 236s does not register an offense when using `if condition` with opposite boolean literal branches 236s does not register an offense when using `unless condition` with opposite boolean literal branches 236s does not register an offense when using `if condition` with boolean literal branches 236s does not register an offense when using `unless condition` with boolean literal branches 236s when condition is a logical operator and all operands are predicate methods 236s registers and corrects an offense when using `if foo? && bar? || baz?` with boolean literal branches 236s registers and corrects an offense when using `if foo? && bar?` with boolean literal branches 236s registers and corrects an offense when using `if foo? && bar?` with opposite boolean literal branches 236s registers and corrects an offense when using `unless foo? || bar?` with boolean literal branches 236s registers and corrects an offense when using `unless foo? || bar?` with opposite boolean literal branches 236s registers and corrects an offense when using `if foo? && bar? && baz?` with boolean literal branches 236s when condition is a comparison method 236s does not register an offense when using a branch that is not boolean literal 236s registers and corrects an offense when using ternary operator with boolean literal branches 236s registers and corrects an offense when using `if` with boolean literal branches directly under `def` 236s registers and corrects an offense when using opposite ternary operator with boolean literal branches 236s does not register an offense when using a branch that is not boolean literal 236s registers and corrects an offense when using opposite ternary operator with boolean literal branches 236s registers and corrects an offense when using `if` with boolean literal branches directly under `def` 236s registers and corrects an offense when using ternary operator with boolean literal branches 236s registers and corrects an offense when using `unless foo == bar` with opposite boolean literal branches 236s registers and corrects an offense when using ternary operator with boolean literal branches 236s registers and corrects an offense when using `if foo == bar` with opposite boolean literal branches 236s registers and corrects an offense when using `if foo == bar` with opposite boolean literal branches 236s registers and corrects an offense when using `unless foo == bar` with opposite boolean literal branches 236s registers and corrects an offense when using `if` with boolean literal branches directly under `def` 236s registers and corrects an offense when using `if foo == bar` with opposite boolean literal branches 236s registers and corrects an offense when using `unless foo == bar` with opposite boolean literal branches 236s registers and corrects an offense when using `if` with boolean literal branches directly under `def` 236s registers and corrects an offense when using `if foo == bar` with opposite boolean literal branches 236s registers and corrects an offense when using `if foo == bar` with boolean literal branches 236s registers and corrects an offense when using `if foo == bar` with opposite boolean literal branches 236s registers and corrects an offense when using `if foo == bar` with boolean literal branches 236s does not register an offense when using a branch that is not boolean literal 236s registers and corrects an offense when using `if` with boolean literal branches directly under `def` 236s registers and corrects an offense when using `if foo == bar` with boolean literal branches 236s registers and corrects an offense when using `if foo == bar` with boolean literal branches 236s registers and corrects an offense when using `unless foo == bar` with opposite boolean literal branches 236s registers and corrects an offense when using `unless foo == bar` with opposite boolean literal branches 236s registers and corrects an offense when using `if foo == bar` with boolean literal branches 236s registers and corrects an offense when using `if foo == bar` with boolean literal branches 236s registers and corrects an offense when using `unless foo == bar` with boolean literal branches 236s does not register an offense when using a branch that is not boolean literal 236s registers and corrects an offense when using ternary operator with boolean literal branches 236s registers and corrects an offense when using opposite ternary operator with boolean literal branches 236s registers and corrects an offense when using `unless foo == bar` with boolean literal branches 236s registers and corrects an offense when using `if foo == bar` with boolean literal branches 236s registers and corrects an offense when using `unless foo == bar` with boolean literal branches 236s does not register an offense when using a branch that is not boolean literal 236s registers and corrects an offense when using `if foo == bar` with opposite boolean literal branches 237s registers and corrects an offense when using opposite ternary operator with boolean literal branches 237s registers and corrects an offense when using `unless foo == bar` with boolean literal branches 237s registers and corrects an offense when using `unless foo == bar` with boolean literal branches 237s registers and corrects an offense when using `unless foo == bar` with boolean literal branches 237s registers and corrects an offense when using ternary operator with boolean literal branches 237s registers and corrects an offense when using opposite ternary operator with boolean literal branches 237s registers and corrects an offense when using opposite ternary operator with boolean literal branches 237s registers and corrects an offense when using `if foo == bar` with opposite boolean literal branches 237s does not register an offense when using a branch that is not boolean literal 237s registers and corrects an offense when using `if` with boolean literal branches directly under `def` 237s registers and corrects an offense when using `if` with boolean literal branches directly under `def` 237s does not register an offense when using a branch that is not boolean literal 237s registers and corrects an offense when using ternary operator with boolean literal branches 237s registers and corrects an offense when using `unless foo == bar` with opposite boolean literal branches 237s registers and corrects an offense when using opposite ternary operator with boolean literal branches 237s registers and corrects an offense when using ternary operator with boolean literal branches 237s registers and corrects an offense when using `unless foo == bar` with opposite boolean literal branches 237s registers and corrects an offense when using `unless foo == bar` with boolean literal branches 237s when condition is a logical operator and operands do not known whether to return boolean value 237s does not register an offense when using `unless foo || bar` with opposite boolean literal branches 237s does not register an offense when using `if foo || bar` with boolean literal branches 237s does not register an offense when using `unless foo && bar` with opposite boolean literal branches 237s does not register an offense when using `if foo && bar` with boolean literal branches 237s does not register an offense when using `unless foo || bar` with boolean literal branches 237s does not register an offense when using `if foo && bar` with opposite boolean literal branches 237s does not register an offense when using `if foo || bar` with opposite boolean literal branches 237s does not register an offense when using `unless foo && bar` with boolean literal branches 237s when using `elsif` with boolean literal branches 237s does not register an offense when using multiple `elsif` with boolean literal branches 237s registers and corrects an offense when using single `elsif` with boolean literal branches 237s when complex condition 237s registers and corrects an offense when using `if foo? || bar && baz?` with boolean literal branches 237s does not register an offense when using `if foo? && bar || baz?` with boolean literal branches 237s registers and corrects an offense when using `if foo? && bar && baz?` with boolean literal branches 237s does not register an offense when using `if foo? || bar || baz?` with boolean literal branches 237s does not register an offense when using `if (foo? && bar) || baz?` with boolean literal branches 237s register and corrects an offense when using `if (foo? || bar) && baz?` with boolean literal branches 237s registers and corrects an offense when using `if foo? || (bar && baz)?` with boolean literal branches 237s does not register an offense when using `if foo? && (bar || baz)?` with boolean literal branches 237s when `AllowedMethods: nonzero?` 237s does not register an offense when using `nonzero?` 237s when double negative is used in condition 237s registers and corrects an offense when using `if !!condition` with boolean literal branches 237s registers and corrects an offense when using `if !!condition` with opposite boolean literal branches 237s 237s RuboCop::Cop::Style::RedundantEach 237s does not register an offense when using `each_foo {}.each_with_object([]) {}` 237s does not register an offense when using `each` with a symbol proc for last argument 237s registers an offense when using `each.reverse_each` 237s does not register an offense when using `each {}.each_with_object([]) {}` 237s does not register an offense when using `each_with_index` 237s does not register an offense when using `each.with_index` 237s does not register an offense when using `each_ancestor.each` 237s registers an offense when using `each.each_with_object` 237s registers an offense when using `each.each` 237s does not register an offense when using `each.with_object` 237s registers an offense when using a method starting with `each_` with `each_with_index` 237s registers an offense when using `each.each(&:foo)` 237s registers an offense when using a method starting with `each_` with `each_with_object` 237s does not register an offense when any method is used between methods with `each` in the method name 237s does not register an offense when using only single `each` 237s registers an offense when using `reverse_each.each` 237s does not register an offense when using `each` as enumerator 237s does not register an offense when not chaining `each_` calls 237s does not register an offense when using `each_with_object` 237s does not register an offense when using `each {}.reverse_each {}` 237s registers an offense when using `each.each_with_index` 237s does not register an offense when using `each {}.each_with_index {}` 237s registers an offense when using `reverse_each.each_with_object` 237s does not register an offense when using `each_with_index.reverse_each` 237s does not register an offense when using `reverse_each {}.each {}` 237s does not register an offense when using `each` with a symbol proc argument 237s does not register an offense when using `reverse_each(&:foo).each {...}` 237s registers an offense when using `reverse_each.each_with_index` 237s 237s RuboCop::Cop::Style::TrailingCommaInArrayLiteral 237s with multi-line list of values 237s when EnforcedStyleForMultiline is comma 237s registers an offense for a literal with two of the values on the same line and a trailing comma 237s accepts an empty array being passed as a method argument 237s accepts a multiline array with a single item and trailing comma 237s accepts a multiline word array 237s accepts literal with two of the values on the same line 237s accepts trailing comma 237s when closing bracket is on same line as last value 237s accepts literal with no trailing comma 237s when EnforcedStyleForMultiline is no_comma 237s registers an offense for trailing comma 237s autocorrects unwanted comma where HEREDOC has commas 237s accepts a literal with no trailing comma 237s accepts HEREDOC with commas 237s when EnforcedStyleForMultiline is consistent_comma 237s registers an offense for literal with two of the values on the same line and no trailing comma 237s accepts two values on the same line 237s accepts trailing comma 237s accepts a multiline array with items on a single line andtrailing comma 237s accepts a multiline word array 237s accepts a multiline array with a single item and trailing comma 237s when closing bracket is on same line as last value 237s registers an offense for no trailing comma 237s with single line list of values 237s when EnforcedStyleForMultiline is no_comma 237s accepts literal without trailing comma 237s registers an offense for trailing comma 237s accepts empty literal 237s accepts rescue clause 237s accepts single element literal without trailing comma 237s when EnforcedStyleForMultiline is comma 237s accepts rescue clause 237s registers an offense for trailing comma 237s accepts single element literal without trailing comma 237s accepts literal without trailing comma 237s accepts empty literal 237s when EnforcedStyleForMultiline is consistent_comma 237s accepts literal without trailing comma 237s accepts rescue clause 237s accepts empty literal 237s registers an offense for trailing comma 237s accepts single element literal without trailing comma 237s 237s RuboCop::Cop::MessageAnnotator 237s with style guide url 237s when StyleGuide is set in the config 237s adds style guide url 237s when a base URL is specified 237s can accept relative paths if base has a full path 237s can use a path-based setting 237s allows absolute URLs in the cop config 237s does not specify a URL if a cop does not have one 237s combines correctly with a target-based setting 237s when a department other than AllCops is specified 237s returns style guide url when it is specified 237s when a nested department is specified 237s returns style guide url when it is specified 237s when StyleGuide is not set in the config 237s does not add style guide url 237s #urls 237s returns style guide url when it is specified 237s returns style guide and reference url when they are specified 237s returns reference url when it is specified 237s returns an empty array if the reference url is blank 237s returns an empty array without StyleGuide URL 237s returns multiple reference urls 237s #annotate 237s with options on 237s returns an annotated message 237s with default options 237s returns the message 237s when the output format is JSON 237s returns the message unannotated 237s 237s RuboCop::Cop::Style::MultilineMemoization 237s EnforcedStyle: braces 237s with a single line memoization 237s allows expression on the following line 237s allows expression on first line 237s with a multiline memoization 237s without a `begin` and `end` block 237s allows with another block on the following line 237s allows with another block on the first line 237s allows with a conditional on the first line 237s allows with a conditional on the following line 237s with a multiline memoization 237s without braces 237s when the expression is wrapped in `begin` and `end` keywords 237s registers an offense for begin...end block on following line 237s registers an offense for begin...end block on first line 237s EnforcedStyle: keyword 237s with a multiline memoization 237s without a `begin` and `end` block 237s when the expression is wrapped in parentheses 237s registers an offense when expression starts on first line 237s registers an offense when expression starts on following line 237s registers an offense with multiline expression 237s with a single line memoization 237s allows expression on first line 237s allows expression on the following line 237s with a multiline memoization 237s without a `begin` and `end` block 237s allows with a conditional on the following line 237s allows with a conditional on the first line 237s allows with another block on the first line 237s allows with another block on the following line 237s 237s RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier 237s EnforcedStyle is `only_before` 237s accepts missing blank line after private 237s registers an offense for blank line after protected 237s accepts missing blank line after protected 237s registers an offense for missing blank line before public 237s registers an offense for missing blank line before private 237s accepts blank line after public 237s registers an offense for missing blank line before protected 237s accepts blank line after module_function 237s does not register an offense when `end` immediately after private 237s registers an offense for blank line after private 237s registers an offense for missing blank line before module_function 237s does not register an offense when `end` immediately after protected 237s EnforcedStyle is `around` 237s accepts only using access modifier 237s ignores protected with a right-hand-side condition 237s ignores public inside a method call 237s accepts missing blank line when at the beginning of sclass 237s requires blank line after public 237s ignores comment line before public 237s ignores an accessor with the same name as module_function above a method definition 237s recognizes blank lines with DOS style line endings 237s ignores module_function inside a method call 237s accepts missing blank line when at the end of block 237s requires blank line before module_function 237s ignores module_function deep inside a method call 237s requires blank line after, but not before, protected when at the beginning of class/module 237s accepts only using access modifier 237s autocorrects blank line after #{access_modifier} with comment 237s accepts missing blank line when at the end of specifying `self` 237s requires blank line after, but not before, public when at the beginning of class/module 237s accepts missing blank line when at the beginning of filewhen specifying a superclass that breaks the line 237s requires blank line when next line started with end 237s ignores comment line before private 237s accepts missing blank line when specifying `self` that breaks the line 237s ignores protected inside a method call 237s accepts missing blank line when at the beginning of sclass 237s accepts missing blank line when specifying a superclass that breaks the line 237s ignores comment line before module_function 237s accepts missing blank line when at the beginning of filewhen specifying a superclass that breaks the line 237s accepts missing blank line when at the beginning of class 237s ignores module_function with block argument 237s accepts only using access modifier 237s accepts missing blank line when at the end of specifying a superclass 237s requires blank line before private 237s ignores private with block argument 237s accepts missing blank line when at the beginning of module 237s requires blank line after private 237s accepts missing blank line when at the beginning of module 237s accepts missing blank line when at the beginning of class 237s accepts missing blank line when at the end of block 237s autocorrects blank line after #{access_modifier} with comment 237s autocorrects blank line after #{access_modifier} with comment 237s accepts missing blank line when specifying a superclass that breaks the line 237s accepts missing blank line when at the end of specifying a superclass 237s recognizes blank lines with DOS style line endings 237s ignores private deep inside a method call 237s ignores module_function with a right-hand-side condition 237s accepts missing blank line when at the beginning of class 237s accepts missing blank line when at the beginning of module 237s accepts missing blank line when at the beginning of file and preceded by a comment 237s autocorrects blank line after #{access_modifier} with comment 237s requires blank line after, but not before, module_function when at the beginning of class/module 237s accepts missing blank line when at the end of specifying `self` 237s ignores public with a right-hand-side condition 237s ignores comment line before protected 237s requires blank line after protected 237s accepts missing blank line when at the beginning of file and preceded by a comment 237s accepts missing blank line when at the beginning of file and preceded by a comment 237s accepts missing blank line when at the end of specifying `self` 237s recognizes blank lines with DOS style line endings 237s ignores an accessor with the same name as private above a method definition 237s requires blank line when next line started with end 237s accepts missing blank line when at the beginning of module 237s accepts missing blank line when at the end of block 237s requires blank line before protected 237s accepts missing blank line when specifying a superclass that breaks the line 237s ignores an accessor with the same name as public above a method definition 237s recognizes blank lines with DOS style line endings 237s requires blank line before public 237s accepts missing blank line when at the end of specifying a superclass 237s accepts missing blank line when specifying `self` that breaks the line 237s accepts missing blank line when at the end of specifying a superclass 237s accepts missing blank line when specifying `self` that breaks the line 237s ignores an accessor with the same name as protected above a method definition 237s accepts missing blank line when at the end of block 237s ignores public with block argument 237s accepts missing blank line when at the beginning of class 237s accepts missing blank line when specifying `self` that breaks the line 237s ignores private with a right-hand-side condition 237s requires blank line when next line started with end 237s accepts missing blank line when at the end of specifying `self` 237s accepts missing blank line when at the beginning of filewhen specifying a superclass that breaks the line 237s accepts missing blank line when at the beginning of sclass 237s ignores protected deep inside a method call 237s requires blank line after module_function 237s accepts missing blank line when at the beginning of sclass 237s accepts missing blank line when at the beginning of filewhen specifying a superclass that breaks the line 237s accepts missing blank line when at the beginning of file and preceded by a comment 237s accepts missing blank line when specifying a superclass that breaks the line 237s ignores protected with block argument 237s requires blank line after, but not before, private when at the beginning of class/module 237s ignores public deep inside a method call 237s accepts only using access modifier 237s requires blank line when next line started with end 237s ignores private inside a method call 237s at the beginning of block 237s for blocks defined with {} 237s accepts missing blank line with arguments 237s accepts missing blank line 237s for blocks defined with do 237s accepts missing blank line with arguments 237s requires blank line after, but not before, private 237s accepts missing blank line 237s at the beginning of block 237s for blocks defined with do 237s accepts missing blank line 237s accepts missing blank line with arguments 237s requires blank line after, but not before, module_function 237s for blocks defined with {} 237s accepts missing blank line with arguments 237s accepts missing blank line 237s at the beginning of block 237s for blocks defined with do 237s accepts missing blank line with arguments 237s accepts missing blank line 237s requires blank line after, but not before, protected 237s for blocks defined with {} 237s accepts missing blank line 237s accepts missing blank line with arguments 237s at the beginning of block 237s for blocks defined with do 237s requires blank line after, but not before, public 237s accepts missing blank line with arguments 237s accepts missing blank line 237s for blocks defined with {} 237s accepts missing blank line with arguments 237s accepts missing blank line 237s Ruby 2.7 237s registers an offense for missing around line before protected 237s registers an offense for missing around line before private 237s ignores public with numblock argument 237s registers an offense for missing around line before module_function 237s ignores module_function with numblock argument 237s registers an offense for missing around line before public 237s ignores protected with numblock argument 237s ignores private with numblock argument 237s 237s RuboCop::Cop::Layout::SpaceInsideRangeLiteral 237s registers an offense for space inside .. literal 237s accepts no space inside ... literal 237s accepts complex range literal with space in it 237s registers an offense for space inside ... literal 237s accepts multiline range literal with no space in it 237s registers an offense in multiline range literal with space in it 237s accepts no space inside .. literal 237s 237s RuboCop::Cop::Style::MultilineIfThen 237s does not get confused by a nested postfix unless 237s accepts table style if/then/elsif/ends 237s does not get confused by a commented-out then 237s does not get confused by a then in a when 237s registers an offense for then in multiline elsif 237s registers an offense for then in multiline unless 237s does not get confused by empty elsif branch 237s does not get confused by a postfix unless 237s does not raise an error for an implicit match unless 237s does not raise an error for an implicit match if 237s registers an offense for then in multiline if 237s 237s RuboCop::Cop::Lint::ShadowedException 237s single rescue 237s accepts an empty rescue 237s accepts rescuing a single custom exception 237s accepts rescuing a custom exception and a standard exception 237s accepts rescuing a single exception that has an ensure 237s accepts rescuing multiple custom exceptions 237s accepts rescuing a multiple exceptions that are not ancestors that have an else 237s registers an offense rescuing exceptions that are ancestors of each other 237s accepts rescue containing multiple same error code exceptions 237s registers an offense for the same exception multiple times 237s accepts rescuing a single exception that is assigned to a variable 237s accepts rescuing a single exception that has an else 237s registers an offense rescuing Exception with any other error or exception 237s rescue a exception without causing constant name deprecation warning 237s accepts splat arguments passed to rescue 237s accepts rescuing a single exception 237s when there are multiple levels of exceptions in the same rescue 237s registers an offense for two exceptions 237s registers an offense for more than two exceptions 237s multiple rescues 237s registers an offense for two exceptions when there are multiple levels of exceptions in the same rescue 237s accepts rescuing exceptions in order of level 237s accepts many (>= 7) rescue groups 237s registers an offense when a higher level exception is rescued before a lower level exception when there are multiple exceptions rescued in a group 237s accepts rescuing a known exception after an unknown exceptions 237s accepts rescuing exceptions in order of level with multiple exceptions in a group with custom exceptions 237s accepts rescuing custom exceptions in multiple rescue groups 237s registers an offense rescuing Exception before an unknown exceptions 237s registers an offense rescuing out of order exceptions when there is an ensure 237s accepts rescuing a known exception between unknown exceptions 237s registers an offense when a higher level exception is rescued before a lower level exception 237s ignores expressions of non-const 237s accepts rescuing exceptions in order of level with multiple exceptions in a group 237s accepts rescuing a known exception before an unknown exceptions 237s splat arguments 237s registers an offense for splat arguments rescued after rescuing Exception 237s accepts splat arguments passed to multiple rescues 237s does not register an offense for splat arguments rescued after rescuing a known exception 237s last rescue does not specify exception class 237s highlights range ending at rescue keyword 237s exceptions from different ancestry chains 237s accepts rescuing exceptions in one order 237s accepts rescuing exceptions in another order 237s modifier rescue 237s accepts rescue in its modifier form 237s 237s RuboCop::Cop::Lint::UriRegexp 237s does not register an offense when using `regexp` with variable receiver 237s registers an offense and corrects using `::URI.regexp` with argument 237s registers an offense and corrects using `::URI.regexp` without argument 237s registers an offense and corrects using `URI.regexp` without argument 237s registers an offense and corrects using `URI.regexp` with argument 237s does not register an offense when using `regexp` without receiver 237s array argument 237s registers an offense and corrects using `URI.regexp` with %i arrays 237s registers an offense and corrects using `URI.regexp` with %w arrays 237s registers an offense and corrects using `URI.regexp` with literal arrays 237s 237s RuboCop::Cop::Lint::DeprecatedConstants 237s registers and corrects an offense when using `FALSE` 237s does not register an offense when not using deprecated constant 237s registers and corrects an offense when using deprecated methods that have no deprecated version 237s registers and corrects an offense when using deprecated methods that have no alternative 237s registers and corrects an offense when using `::TRUE` 237s registers and corrects an offense when using `::Triple::Nested::Constant` 237s registers and corrects an offense when using `::FALSE` 237s registers and corrects an offense when using `::NIL` 237s registers and corrects an offense when using `NIL` 237s registers and corrects an offense when using `TRUE` 237s does not register an offense when using `__ENCODING__ 237s Ruby >= 3.0 237s registers and corrects an offense when using `Random::DEFAULT` 237s registers and corrects an offense when using `::Random::DEFAULT` 237s Ruby >= 2.6 237s registers and corrects an offense when using `Net::HTTPServerException` 237s Ruby <= 2.5 237s does not register an offense when using `Net::HTTPServerException` 237s Ruby <= 2.7 237s does not register an offense when using `Random::DEFAULT` 237s 237s RuboCop::Cop::Style::AccessorGrouping 237s when EnforcedStyle is separated 238s registers an offense and corrects when using grouped accessors with different access modifiers 238s does not register an offense for grouped accessors with comments 238s registers an offense and corrects when using grouped accessors 238s registers an offense and corrects when using grouped accessors within eigenclass 238s does not register an offense when using separated accessors 238s does not register an offense if the same accessor is listed twice 238s registers an offense and corrects when the same accessor is given more than once in the same statement 238s when there are comments for attributes 238s registers and corrects an offense 238s when EnforcedStyle is grouped 238s registers an offense and corrects when using separated accessors with different access modifiers 238s registers an offense and corrects when using separated accessors within eigenclass 238s registers an offense and corrects when using separated accessors 238s does not register an offense when using grouped accessors 238s does not register an offense when the same accessor is given more than once in the same statement 238s registers offense and corrects if at least two separate accessors without comments 238s registers an offense and correct if the same accessor is listed twice 238s does not register offense for accessors with comments 238s 238s RuboCop::Cop::Style::Documentation 238s registers an offense for compact-style nested class 238s registers an offense for a deeply nested class 238s accepts non-empty class with documentation 238s accepts namespace module which defines constants 238s registers an offense for non-empty class 238s accepts non-empty module with documentation 238s registers an offense for non-namespace 238s registers an offense for non-empty cbase class 238s registers an offense if the comment line contains code 238s registers an offense for compact-style nested module 238s does not raise an error for an implicit match conditional 238s accepts non-empty class with comment that ends with an annotation 238s does not consider comment followed by empty line to be class documentation 238s accepts non-empty class with annotation comment followed by other comment 238s registers an offense for empty module without documentation 238s registers an offense for non-empty class with directive comment 238s registers an offense for non-empty class with annotation comment 238s accepts namespace class without documentation 238s registers offense for non-empty class with frozen string comment 238s accepts namespace class which defines constants 238s accepts namespace module without documentation 238s registers an offense for non-empty class with encoding comment 238s accepts empty class without documentation 238s without documentation 238s with non-empty module 238s with constants visibility declaration content 238s does not register an offense 238s macro-only class 238s registers offense for macro with other methods 238s does not register offense with multiple macros 238s does not register offense with single macro 238s with non-empty class 238s with constants visibility declaration content 238s does not register an offense 238s with # :nodoc: 238s accepts non-namespace module without documentation 238s accepts non-namespace class without documentation 238s registers an offense for nested class without documentation 238s accepts compact-style nested module without documentation 238s registers an offense for nested module without documentation 238s accepts compact-style nested class without documentation 238s with `all` modifier 238s accepts nested class without documentation 238s on a subclass 238s accepts non-namespace subclass without documentation 238s registers an offense for nested subclass without documentation 238s when AllowedConstants is configured 238s ignores the constants in the config 238s with `all` modifier 238s accepts nested subclass without documentation 238s with `all` modifier 238s accepts nested module without documentation 238s sparse and trailing comments 238s ignores sparse comments inside module node 238s ignores sparse comments inside class node 238s ignores comments after module node end 238s ignores comments after class node end 238s 238s RuboCop::Cop::Style::TrivialAccessors 238s registers an offense on class reader 238s accepts writer nested within a module 238s registers an offense on one-liner reader 238s registers an offense on class writer 238s accepts reader nested within a module 238s accepts expressions within writer 238s does not register an offense on DSL-style writer 238s registers an offense on reader with braces 238s accepts expressions within reader 238s registers an offense on writer without braces 238s registers an offense on instance reader 238s registers an offense on reader with `private` 238s accepts writer nested within an instance_eval call 238s accepts non-trivial reader 238s accepts writer in a module 238s accepts non-trivial writer 238s accepts writer using top level 238s accepts reader nested within an instance_eval call 238s accepts splats 238s accepts an initialize method looking like a writer 238s accepts reader with different ivar name 238s accepts blocks 238s registers an offense on one-liner writer 238s registers an offense on instance writer 238s flags a reader inside a class, inside an instance_eval call 238s accepts reader using top level 238s accepts writer with different ivar name 238s disallow predicates 238s does not accept predicate-like reader 238s with DSL denied 238s registers an offense on DSL-style writer 238s exact name match disabled 238s registers an offense when names mismatch in writer 238s registers an offense when names mismatch in reader 238s with allowed methods 238s accepts allowed writer 238s accepts allowed reader 238s with AllowPredicates: false 238s accepts allowed predicate 238s ignore class methods 238s accepts class reader 238s accepts class writer 238s allow predicates 238s accepts predicate-like reader 238s 238s RuboCop::Cop::Lint::OutOfRangeRegexpRef 238s does not register an offense regexp containing non literal 238s does not register offense to a regexp with encoding option and valid references for numbered captures 238s ignores calls to `match?` 238s registers an offense when the regexp is matched with `match` 238s registers an offense when out of range references are used for numbered captures 238s only registers an offense when the regexp is matched as a literal 238s registers an offense when out of range references are used for named captures 238s ignores `match` with no receiver 238s does not register offense to a regexp with valid references for named captures 238s registers an offense when the regexp appears on the right hand side of `=~` 238s registers an offense when out of range references are used for mix of numbered and named captures 238s registers an offense when references are used before any regexp 238s registers an offense when the regexp is matched with `===` 238s ignores regexp when clause conditions that contain interpolations 238s only registers an offense for when clauses when the regexp is matched as a literal 238s does not register offense to a regexp with valid references for numbered captures 238s does not register an offense when in range references are used inside a when clause 238s ignores `match` with no arguments 238s uses the maximum number of captures for when clauses with multiple conditions 238s registers an offense when out of range references are used inside a when clause 238s does not register offense to a regexp with valid references for a mix named and numbered captures 238s registers an offense when out of range references are used for non captures 238s matching with match 238s only registers an offense when the regexp is matched as a literal 238s registers an offense when out of range references are used 238s does not register an offense when in range references are used 238s matching with rpartition 238s registers an offense when out of range references are used 238s only registers an offense when the regexp is matched as a literal 238s does not register an offense when in range references are used 238s matching with slice 238s does not register an offense when in range references are used 238s only registers an offense when the regexp is matched as a literal 238s registers an offense when out of range references are used 238s when both the LHS and RHS use regexp 238s only considers the RHS regexp 238s matching with `[]` 238s only registers an offense when the regexp is matched as a literal 238s does not register an offense when in range references are used 238s registers an offense when out of range references are used 238s matching with start_with? 238s only registers an offense when the regexp is matched as a literal 238s registers an offense when out of range references are used 238s does not register an offense when in range references are used 238s matching with gsub! 238s only registers an offense when the regexp is matched as a literal 238s registers an offense when out of range references are used 238s does not register an offense when in range references are used 238s matching with scan 238s registers an offense when out of range references are used 238s only registers an offense when the regexp is matched as a literal 238s does not register an offense when in range references are used 238s matching with end_with? 238s does not register an offense when in range references are used 238s only registers an offense when the regexp is matched as a literal 238s registers an offense when out of range references are used 238s matching with rindex 238s registers an offense when out of range references are used 238s does not register an offense when in range references are used 238s only registers an offense when the regexp is matched as a literal 238s matching with `grep` 238s does not register an offense when in range references are used 238s only registers an offense when the regexp is matched as a literal 238s registers an offense when out of range references are used 238s matching with gsub 238s registers an offense when out of range references are used 238s does not register an offense when in range references are used 238s only registers an offense when the regexp is matched as a literal 238s matching with index 238s registers an offense when out of range references are used 238s only registers an offense when the regexp is matched as a literal 238s does not register an offense when in range references are used 238s matching with partition 238s registers an offense when out of range references are used 238s does not register an offense when in range references are used 238s only registers an offense when the regexp is matched as a literal 238s matching with slice! 238s only registers an offense when the regexp is matched as a literal 238s registers an offense when out of range references are used 238s does not register an offense when in range references are used 238s matching with sub 238s registers an offense when out of range references are used 238s only registers an offense when the regexp is matched as a literal 238s does not register an offense when in range references are used 238s matching with sub! 238s does not register an offense when in range references are used 238s only registers an offense when the regexp is matched as a literal 238s registers an offense when out of range references are used 238s when calling a regexp method on a nth-ref node 238s does not register an offense when calling gsub on a valid nth-ref 238s registers an offense if the capturing groups have changed 238s registers an offense when calling gsub on an invalid nth-ref 238s 238s RuboCop::Cop::Layout::ParameterAlignment 238s aligned with first parameter 238s registers an offense and corrects alignment in simple case 238s accepts a method definition without parameters 238s doesn't get confused by splat 238s registers an offense and corrects parameters with double indent 238s accepts proper indentation 238s registers an offense and corrects parameters with single indent 238s accepts the first parameter being on a new row 238s accepts parameter lists on a single line 238s defining self.method 238s accepts proper indentation 238s registers an offense and corrects parameters with single indent 238s aligned with fixed indentation 238s doesn't get confused by splat 238s registers an offense and corrects parameters aligned to first param 238s accepts proper indentation 238s accepts parameter lists on a single line 238s accepts the first parameter being on a new row 238s registers an offense and corrects parameters with double indent 238s accepts a method definition without parameters 238s defining self.method 238s registers an offense and corrects parameters aligned to first param 238s accepts proper indentation 238s 238s RuboCop::Cop::InternalAffairs::UselessRestrictOnSend 238s does not register an offense when using `RESTRICT_ON_SEND` and defines `after_send` with alias_method 238s does not register an offense when using `RESTRICT_ON_SEND` and defines `on_send` with alias 238s registers an offense when using `RESTRICT_ON_SEND` and not defines send callback method 238s does not register an offense when using `RESTRICT_ON_SEND` and defines `after_send` with alias 238s does not register an offense when using `RESTRICT_ON_SEND` and defines `on_send` 238s does not register an offense when using `RESTRICT_ON_SEND` and defines `after_send` 238s does not register an offense when using `RESTRICT_ON_SEND` and defines `on_send` with alias_method 238s 238s RuboCop::Cop::Layout::EmptyLineBetweenDefs 238s registers an offense for adjacent one-liners by default 238s autocorrects when there are too many new lines 238s accepts a def that follows an empty line and then a comment 238s accepts the first def without leading empty line in a class 238s accepts a nested def 238s accepts a def that follows a line with code 238s finds offenses in inner classes 238s registers an offense for multiple one-liners on the same line 238s accepts a def that follows code and a comment 238s treats lines with whitespaces as blank 238s doesn't allow more than the required number of newlines 238s accepts a def that is the first of a module 238s endless methods 238s with AllowAdjacentOneLineDefs: false 238s registers an offense and corrects 238s between endless class method and regular methods 238s registers an offense and corrects 238s with AllowAdjacentOneLineDefs: true 238s does not register an offense 238s between endless and regular methods 238s registers an offense and corrects 238s between regular and endless methods 238s registers an offense and corrects 238s between endless class method and regular class methods 238s registers an offense and corrects 238s EmptyLineBetweenModuleDefs 238s registers offense when no empty lines between module and method definitions 238s when disabled 238s does not register offense 238s when there are only comments between defs 238s registers an offense 238s class methods 238s adjacent class methods 238s registers an offense for missing blank line between methods 238s mixed instance and class methods 238s registers an offense for missing blank line between methods 238s when a maximum of empty lines is specified 238s finds no offense for no empty line 238s finds no offense for one empty line 238s finds an offense for two empty lines 238s EmptyLineBetweenClassDefs 238s registers offense when no empty lines between class and method definitions 238s when disabled 238s does not register offense 238s with AllowAdjacentOneLineDefs enabled 238s does not register offense 238s when AllowAdjacentOneLineDefs is enabled 238s accepts adjacent one-liners 238s registers an offense for adjacent defs if some are multi-line 238s when empty lines between classes and modules together 238s registers offense when no empty lines between module and method definitions 238s conditional method definitions 238s registers an offense for consecutive defs inside a conditional 238s accepts defs inside a conditional without blank lines in between 238s when multiple lines between defs are allowed 238s registers an offense and corrects when there are too many new lines 238s treats lines with whitespaces as blank 238s 238s RuboCop::Cop::Utils::FormatString 238s finds the correct number of fields 238s #valid? 238s returns true when there are only numbered formats 238s returns false when there are numbered and named formats 238s returns true when there are only named with escaped `%` formats 238s returns true when there are only named formats 238s returns false when there are unnumbered and named formats 238s returns true when there are only unnumbered formats 238s returns false when there are unnumbered and numbered formats 238s #named_interpolation? 238s behaves like named format sequence 238s does not detect escaped named format sequence 238s detects named format sequence 238s behaves like named format sequence 238s does not detect escaped named format sequence 238s detects named format sequence 238s behaves like named format sequence 238s detects named format sequence 238s does not detect escaped named format sequence 238s behaves like named format sequence 238s detects named format sequence 238s does not detect escaped named format sequence 238s 238s RuboCop::Cop::Style::LambdaCall 238s when style is set to braces 238s autocorrects x.call to x.() 238s registers an offense for x.call() 238s autocorrects x.call asdf, x123 to x.(asdf, x123) 238s registers an offense for opposite + correct 238s registers an offense for correct + multiple opposite styles 238s accepts a call without receiver 238s when style is set to call 238s registers an offense for correct + multiple opposite styles 238s registers an offense for x.() 238s registers an offense for correct + opposite 238s 238s RuboCop::Cop::Style::RedundantRegexpCharacterClass 238s with a character class containing a space meta-character 238s registers an offense and corrects 238s with a regexp containing invalid g escape 238s registers an offense and corrects 238s with a character class containing an escaped [ 238s registers an offense and corrects 238s with a character class containing an escaped-0 238s does not register an offense 238s with a character class containing two characters 238s does not register an offense 238s with a character class containing set intersection 238s does not register an offense 238s with a character class containing multiple unicode code-points 238s does not register an offense and corrects 238s with a character class containing a character requiring escape outside 238s does not register an offense 238s with a character class containing a single character 238s registers an offense and corrects 238s with a character class containing an escaped ] 238s registers an offense and corrects 238s with a character class containing a single character before `+` quantifier 238s registers an offense and corrects 238s with a character class with first element an escaped ] 238s does not register an offense 238s with a redundant character class after an interpolation 238s registers an offense and corrects 238s with a character class containing a single unicode code-point 238s registers an offense and corrects 238s with a character class containing a single character before `{n,m}` quantifier 238s registers an offense and corrects 238s with a negated character class with a single element 238s does not register an offense 238s with a character class containing an interpolation 238s does not register an offense 238s with a character class containing an escaped-# 238s registers an offense and corrects 238s with escaped square brackets surrounding a single character 238s does not register an offense 238s with a character class containing escaped character requiring escape outside 238s registers an offense and corrects 238s with %r{} regexp 238s with a character class containing a single character before `{n,m}` quantifier 238s registers an offense and corrects 238s with a character class containing a single character 238s registers an offense and corrects 238s with a character class containing a single character inside a group 238s registers an offense and corrects 238s with multiple character classes containing single characters 238s registers an offense and corrects 238s with a character class containing a single character before `+` quantifier 238s registers an offense and corrects 238s with a character class containing a single range 238s does not register an offense 238s with a character class containing an escaped-b 238s does not register an offense 238s with a character class containing a single negated unicode character property 238s registers an offense and corrects 238s with a character class containing a single unicode character property 238s registers an offense and corrects 238s with a character class containing a negated posix bracket expression 238s does not register an offense 238s with a multi-line interpolation 238s ignores offenses in the interpolated expression 238s with an interpolated unnecessary-character-class regexp 238s registers an offense and corrects 238s with a character class containing a space 238s when not using free-spaced mode 238s registers an offense and corrects 238s when using free-spaced mode 238s with a single space character class 238s does not register an offense with /ix 238s does not register an offense with /iux 238s does not register an offense with only /x 238s with a commented single-element character class 238s does not register an offense 238s with an unnecessary-character-class after a comment 238s registers an offense and corrects 238s with consecutive escaped square brackets inside a character class 238s does not register an offense 238s with a character class containing a posix bracket expression 238s does not register an offense 238s with consecutive escaped square brackets 238s does not register an offense 238s with a character class containing a negated-space meta-character 238s registers an offense and corrects 238s with a character class containing an unescaped-# 238s registers an offense and corrects 238s with a character class containing a single character inside a group 238s registers an offense and corrects 238s with an array index inside an interpolation 238s does not register an offense 238s with multiple character classes containing single characters 238s registers an offense and corrects 238s 238s RuboCop::Cop::Naming::ClassAndModuleCamelCase 238s accepts CamelCase names 238s registers an offense for underscore in class and module name 238s allows module_parent method 238s is not fooled by qualified names 238s custom allowed names 238s does not register offense for multiple allowed names 238s 238s RuboCop::Cop::Style::ModuleFunction 238s when enforced style is `extend_self` 238s registers an offense for `module_function` without an argument 238s accepts module_function with an argument 238s when enforced style is `forbidden` 238s registers an offense for `module_function` without an argument 238s accepts `extend self` in a class 238s registers an offense for `extend self` 238s in a module with private methods 238s in a module with declarative private 238s in a module 238s when enforced style is `module_function` 238s registers an offense for `extend self` in a module 238s accepts `extend self` in a class 238s accepts for `extend self` in a module with declarative private 238s accepts for `extend self` in a module with private methods 238s 238s RuboCop::Cop::InternalAffairs::StyleDetectedApiUse 238s does not register an offense when correct_style_detected and a unexpected_style_detected are both used 238s does not register an offense when correct_style_detected and a no_acceptable_style! are both used 238s does not register an offense when correct_style_detected and a ambiguous_style_detected are both used 238s registers an offense when opposite_style_detected is used without a correct_style_detected follow up 238s registers an offense when conflicting_styles_detected is used in a conditional expression 238s registers an offense when ambiguous_style_detected is used in a conditional expression 238s registers an offense when correct_style_detected is used without a negative *_style_detected follow up 238s registers an offense when correct_style_detected is used in a conditional expression 238s registers an offense when opposite_style_detected is used in a conditional expression 238s does not register an offense when correct_style_detected and a opposite_style_detected are both used 238s does not register an offense when correct_style_detected and a conflicting_styles_detected are both used 238s registers an offense when unrecognized_style_detected is used in a conditional expression 238s registers an offense when ambiguous_style_detected is used without a correct_style_detected follow up 238s registers an offense when unexpected_style_detected is used without a correct_style_detected follow up 238s registers an offense when unexpected_style_detected is used in a conditional expression 238s registers an offense when unrecognized_style_detected is used without a correct_style_detected follow up 238s registers an offense when no_acceptable_style! is used without a correct_style_detected follow up 238s does not register an offense when correct_style_detected and a unrecognized_style_detected are both used 238s registers an offense when no_acceptable_style! is used in a conditional expression 238s registers an offense when conflicting_styles_detected is used without a correct_style_detected follow up 238s 238s RuboCop::Cop::Layout::FirstArrayElementLineBreak 238s ignores properly formatted implicit arrays 238s ignores elements listed on a single line 238s masgn implicit arrays 238s registers and corrects the offense 238s elements listed on the first line 238s registers and corrects the offense 238s array nested in a method call 238s registers an corrects the offense 238s send implicit arrays 238s registers and corrects the offense 238s word arrays 238s registers and corrects the offense 238s 238s RuboCop::Cop::Lint::UselessAssignment 238s when a variable is assigned and unreferenced in top level 238s registers an offense 238s similar name suggestion 238s when there are only less similar names 239s does not suggest any name 239s when there's a similar variable 239s suggests the variable name 239s when there's a similar method invocation with explicit receiver 239s does not suggest any name 239s when there's a similar method invocation with arguments 239s does not suggest any name 239s when there's a similar name but it's in inner scope 239s does not suggest any name 239s when there's a similar variable-like method invocation 239s suggests the method name 239s when a variable is assigned while being passed to a method taking block 239s and the variable is not used 239s registers an offense 239s and the variable is used 239s accepts 239s when a variable is assigned with ||= at the last expression of the scope 239s registers an offense 239s when a method argument is reassigned but not passed to super 239s registers an offense 239s when a keyword splat method argument is not used 239s accepts 239s when a splat method argument is not used 239s accepts 239s when a variable is reassigned in a loop 239s while loop 239s accepts 239s post until loop 239s accepts 239s post while loop 239s accepts 239s until loop 239s accepts 239s for loop 239s accepts 239s when a variable is assigned first with ||= and referenced 239s accepts 239s when a local variable is unreferenced and zero arity super is called 239s registers an offense 239s when a variable is referenced in rhs of named capture expression 239s accepts 239s when a referenced variable is reassigned in a block 239s accepts 239s when a variable is assigned in 2 identical if branches 239s doesn't think 1 of the 2 assignments is useless 239s when a variable is assigned and assigned again in a modifier condition 239s accepts with parentheses 239s accepts without parentheses 239s when a variable is not used and the name starts with _ 239s accepts 239s when a variable is reassigned and unreferenced in a if branch while the variable is referenced in the paired else branch 239s registers an offense for the reassignment in the if branch 239s when a variable is assigned with ||= before the last expression of the scope 239s registers an offense 239s when an unreferenced variable is reassigned in a block 239s accepts 239s when a setter is invoked with operator assignment in loop body 239s accepts 239s when a unreferenced variable is reassigned in same branch and referenced after the branching 239s registers an offense for the unreferenced assignment 239s when a method argument is not used 239s accepts 239s when a variable is assigned in begin and referenced outside 239s accepts 239s when a variable is assigned and unreferenced in a module 239s registers an offense 239s when there's an unreferenced reassignment in a if branch while the variable is referenced in the paired elsif branch 239s registers an offense for the reassignment in the if branch 239s when a variable is assigned in main body of begin with rescue but unreferenced 239s registers an offense 239s when there is only one AST node and it is unused variable 239s registers an offense 239s when a variable is assigned at the end of rescue and would be referenced with retry 239s accepts 239s when there's an unreferenced reassignment in a if branch while the variable is referenced in a case branch in the paired else branch 239s registers an offense for the reassignment in the if branch 239s when a optional keyword method argument is not used 239s accepts 239s when a variable is assigned and unreferenced in a singleton method defined with self keyword 239s registers an offense 239s when a named capture is referenced 239s accepts 239s when a variable is assigned in loop body and referenced in post until condition 239s accepts 239s when a unreferenced variable is reassigned on the left side of && and referenced after the && 239s registers an offense for the unreferenced assignment 239s when a variable is assigned in loop body and unreferenced 239s registers an offense 239s when a block local variable is declared but not assigned 239s accepts 239s when an unreferenced variable is reassigned and re-referenced 239s registers an offense for the unreferenced assignment 239s when an optional method argument is not used 239s accepts 239s when an assignment in a if branch is referenced in another if branch 239s accepts 239s when a variable is assigned in each branch of if and referenced after the branching 239s accepts 239s when a referenced variable is reassigned but not re-referenced 239s registers an offense for the non-re-referenced assignment 239s when a variable is assigned in branch of modifier if that references the variable in its conditional clauseand referenced after the branching 239s accepts 239s when a block argument is not used 239s accepts 239s when a variable is reassigned at the end of loop body and would be referenced in loop condition 239s accepts 239s when a variable is assigned with operator assignment in rescue and would be referenced with retry 239s accepts 239s when a rescued error variable is wrongly tried to be referenced in another rescue body 239s registers an offense 239s when a named capture is unreferenced in other than top level 239s registers an offense 239s when a variable is shadowed by a block argument and unreferenced 239s registers an offense 239s when a variable is assigned and unreferenced in a method 239s registers an offense 239s when a variable is assigned in single branch if and unreferenced 239s registers an offense 239s when a variable is assigned multiple times but unreferenced 239s registers offenses for each assignment 239s when a variable is reassigned in single branch if and referenced in the branch 239s registers an offense for the unreferenced assignment 239s when a variable is reassigned in single branch if and referenced after the branching 239s accepts 239s when a referenced variable is reassigned but not re-referenced in a method defined in loop 239s registers an offense 239s when a variable is assigned in main body of begin, rescue and else then referenced after the begin 239s accepts 239s when a variable is reassigned multiple times in rescue with ensure then referenced after the begin 239s registers an offense 239s when a block local variable is assigned and unreferenced 239s registers offenses for the assignment 239s when a variable is reassigned in loop body but won't be referenced either next iteration or loop condition 239s registers an offense (PENDING: Requires an advanced logic that checks whether the return value of an operator assignment is used or not.) 239s when a variable is assigned in each branch of if and referenced in the else branch 239s registers an offense for the assignment in the if branch 239s when a variable is assigned on each side of && and referenced after the && 239s accepts 239s when a variable is reassigned with binary operator assignment and referenced 239s accepts 239s when a variable is assigned and unreferenced in a singleton method defined with variable name 239s registers an offense 239s when a variable is reassigned multiple times in main body of begin then referenced in rescue 239s accepts 239s when a variable is reassigned while referencing itself in rhs and referenced 239s accepts 239s when a method argument is reassigned and zero arity super is called 239s accepts 239s when a variable is assigned in main body of begin, rescue and else and reassigned in ensure then referenced after the begin 239s registers offenses for each assignment before ensure 239s when a variable is assigned and unreferenced in a singleton class 239s registers an offense 239s when a variable is assigned with operator assignment in top level 239s registers an offense 239s when a variable is reassigned with binary operator assignment while assigning to itself in rhs then referenced 239s registers an offense for the assignment in rhs 239s when a variable is reassigned with logical operator assignment and referenced 239s accepts 239s inside a `case-match` node 239s does not register an offense when the variable is used 239s when a variable is reassigned multiple times in main body of begin then referenced after the begin 239s accepts 239s when a variable is assigned in branch of modifier if that references the variable in its conditional clauseand unreferenced 239s registers an offense 239s when a variable is assigned and unreferenced in a class 239s registers an offense 239s when a variable is reassigned at the end of loop body and would be referenced in next iteration 239s accepts 239s when a variable is reassigned multiple times in ensure with rescue then referenced after the begin 239s registers an offense 239s when a unreferenced variable is reassigned on the right side of && and referenced after the && 239s accepts 239s when a named capture is unreferenced in top level 239s registers an offense 239s when a variable is assigned with multiple assignment and unreferenced 239s registers an offense 239s when a variable that has same name as outer scope variable is not referenced in a method defined in loop 239s registers an offense 239s when a keyword splat method argument is used 239s accepts 239s when a variable is reassigned multiple times in rescue and referenced after the begin 239s registers an offense 239s when a variable is assigned and unreferenced in a class subclassing another class stored in local variable 239s registers an offense 239s when an anonymous keyword splat method argument is defined 239s accepts 239s when a variable is assigned in loop body and referenced in post while condition 239s accepts 239s when a variable is assigned and referenced when defining a module 239s does not register an offense 239s when a variable is assigned and passed to a method followed by method taking block 239s accepts 239s when a variable is reassigned multiple times in main body of begin then referenced in ensure 239s accepts 239s when a block method argument is not used 239s accepts 239s when a variable is reassigned with multiple assignment while referencing itself in rhs and referenced 239s accepts 239s when there's an unreferenced assignment in top level if branch while the variable is referenced in the paired else branch 239s registers an offense for the assignment in the if branch 239s 239s RuboCop::Cop::Lint::LiteralAsCondition 239s registers an offense for `not {}` 239s registers an offense for literal {} in complex cond 239s registers an offense for literal :sym in post-loop while 239s registers an offense for literal [1] in if 239s registers an offense for `!{}` 239s registers an offense for literal {} in post-loop until 239s registers an offense for literal :"#{a}" in post-loop while 239s registers an offense for literal 1 in && 239s registers an offense for literal :sym in post-loop until 239s accepts literal 1 in a when of a case with something after case keyword 239s registers an offense for literal 2.0 in while 239s registers an offense for literal :sym in if 239s registers an offense for literal {} in && 239s accepts `false` literal in post-loop `until` 239s accepts `true` literal in `while` 239s registers an offense for literal :sym in complex cond 239s registers an offense for literal {} in until 239s registers an offense for literal :"#{a}" in complex cond 239s registers an offense for literal 2.0 in case 239s registers an offense for `not 2.0` 239s registers an offense for `not :sym` 239s registers an offense for literal :sym in case 239s registers an offense for literal 2.0 in ! 239s accepts literal 2.0 in non-toplevel and/or 239s registers an offense for literal 2.0 in if 239s registers an offense for `!:sym` 239s accepts literal [1] in non-toplevel and/or 239s registers an offense for literal :"#{a}" in ! 239s registers an offense for literal 1 in ! 239s registers an offense for literal 1 in while 239s registers an offense for literal [1] in a when of a case without anything after case keyword 239s registers an offense for `not 1` 239s accepts array literal in case, if it has nested non-literal element 239s registers an offense for `!2.0` 239s registers an offense for literal 2.0 in complex cond 239s registers an offense for literal 2.0 in post-loop while 239s registers an offense for literal 1 in until 239s registers an offense for literal 2.0 in post-loop until 239s registers an offense for literal {} in if 239s registers an offense for literal 1 in post-loop while 239s registers an offense for literal :"#{a}" in while 239s registers an offense for literal [1] in complex cond 239s registers an offense for literal 2.0 in a when of a case without anything after case keyword 239s registers an offense for literal 2.0 in && 239s registers an offense for literal :sym in ! 239s registers an offense for `!1` 239s registers an offense for `![1]` 239s registers an offense for literal {} in post-loop while 239s registers an offense for literal [1] in post-loop while 239s accepts literal [1] in a when of a case with something after case keyword 239s registers an offense for literal :"#{a}" in case 239s accepts literal :sym if it's not an and/or operand 239s registers an offense for literal {} in complex ! 239s registers an offense for literal :sym in while 239s registers an offense for literal {} in case 239s accepts literal :sym in a when of a case with something after case keyword 239s registers an offense for literal :"#{a}" in a when of a case without anything after case keyword 239s registers an offense for literal :sym in a when of a case without anything after case keyword 239s accepts literal :sym in non-toplevel and/or 239s accepts literal 1 if it's not an and/or operand 239s registers an offense for literal 1 in a when of a case without anything after case keyword 239s registers an offense for literal :"#{a}" in complex ! 239s registers an offense for literal :sym in complex ! 239s accepts literal :"#{a}" in non-toplevel and/or 239s registers an offense for literal {} in a when of a case without anything after case keyword 239s registers an offense for literal [1] in ! 239s accepts literal 1 in non-toplevel and/or 239s accepts dstr literal in case 239s registers an offense for literal 1 in complex cond 239s accepts `false` literal in `until` 239s registers an offense for `!:"#{a}"` 239s registers an offense for literal :"#{a}" in if 239s registers an offense for literal [1] in while 239s accepts literal {} in a when of a case with something after case keyword 239s accepts array literal in case, if it has non-literal elements 239s registers an offense for literal {} in while 239s accepts literal {} in non-toplevel and/or 239s registers an offense for `not :"#{a}"` 239s registers an offense for literal 1 in complex ! 239s registers an offense for literal [1] in post-loop until 239s accepts literal [1] if it's not an and/or operand 239s registers an offense for literal :sym in && 239s accepts literal 2.0 in a when of a case with something after case keyword 239s registers an offense for literal {} in ! 239s registers an offense for literal :"#{a}" in post-loop until 239s accepts `true` literal in post-loop `while` 239s registers an offense for literal 1 in post-loop until 239s registers an offense for literal :"#{a}" in until 239s registers an offense for literal 1 in case 239s registers an offense for literal 2.0 in complex ! 239s registers an offense for literal [1] in until 239s registers an offense for case with a primitive array condition 239s registers an offense for literal :"#{a}" in && 239s registers an offense for literal 1 in if 239s accepts literal 2.0 if it's not an and/or operand 239s registers an offense for literal 2.0 in until 239s accepts literal :"#{a}" in a when of a case with something after case keyword 239s registers an offense for literal [1] in && 239s registers an offense for literal :sym in until 239s registers an offense for literal [1] in complex ! 239s accepts literal {} if it's not an and/or operand 239s registers an offense for `not [1]` 239s accepts literal :"#{a}" if it's not an and/or operand 239s registers an offense for literal [1] in case 239s >= Ruby 2.7 239s registers an offense for literal [1] in case match without a match var 239s accepts literal [1] in a when of a case match 239s accepts an offense for literal [1] in case match with a match var 239s >= Ruby 2.7 239s accepts an offense for literal :sym in case match with a match var 239s registers an offense for literal :sym in case match without a match var 239s accepts literal :sym in a when of a case match 239s >= Ruby 2.7 239s accepts an offense for literal {} in case match with a match var 239s registers an offense for literal {} in case match without a match var 239s accepts literal {} in a when of a case match 239s >= Ruby 2.7 239s registers an offense for literal 2.0 in case match without a match var 239s accepts an offense for literal 2.0 in case match with a match var 239s accepts literal 2.0 in a when of a case match 239s >= Ruby 2.7 239s accepts an offense for literal 1 in case match with a match var 239s registers an offense for literal 1 in case match without a match var 239s accepts literal 1 in a when of a case match 239s >= Ruby 2.7 239s registers an offense for literal :"#{a}" in case match without a match var 239s accepts literal :"#{a}" in a when of a case match 239s accepts an offense for literal :"#{a}" in case match with a match var 239s >= Ruby 2.7 239s accepts an offense for case match with a match var 239s accepts dstr literal in case match 239s registers an offense for case match with a primitive array condition 239s accepts array literal in case match, if it has non-literal elements 239s accepts array literal in case match, if it has nested non-literal element 239s 239s RuboCop::Cop::Layout::EmptyLinesAroundBeginBody 239s accepts begin block without empty line 239s registers an offense for begin body ending in method 239s accepts begin block without empty line in a method 239s registers an offense for begin body starting with a blank 239s registers an offense for begin body starting in method 239s registers an offense for begin body ending with a blank 239s registers an offense for ensure body ending 239s registers an offense for rescue body ending 239s registers an offense for begin body starting with rescue 239s registers an offense for else body ending 239s registers many offenses with complex begin-end 239s 239s RuboCop::Cop::Naming::AsciiIdentifiers 239s when AsciiConstants is true 239s accepts identifiers with only ascii chars 239s does not get confused by a byte order mark 239s registers an offense for a variable name with non-ascii chars 239s does not get confused by an empty file 239s registers an offense for a constant name with non-ascii chars 239s registers an offense for a variable name with mixed chars 239s when AsciiConstants is false 239s does not get confused by a byte order mark 239s accepts identifiers with only ascii chars 239s does not get confused by an empty file 239s registers an offense for a variable name with mixed chars 239s registers an offense for a variable name with non-ascii chars 239s accepts constants with only ascii chars 239s 239s RuboCop::Cop::Lint::RedundantRequireStatement 239s registers an offense when using requiring `enumerator` in condition 239s registers an offense when using requiring `enumerator` with modifier form 239s registers an offense when using requiring `enumerator` 239s target ruby version >= 3.1 239s registers an offense and corrects when using requiring `fiber` or already redundant features 239s target ruby version >= 3.2 239s registers an offense and corrects when using requiring `set` 239s target ruby version <= 2.6 239s does not register an offense when using requiring `ruby2_keywords` 239s target ruby version <= 2.1 239s does not register an offense when using requiring `rational`, `complex` 239s target ruby version <= 2.4 239s does not register an offense when using requiring `pp` 239s target ruby version >= 2.2 240s registers an offense when using requiring `rational`, `complex` 240s target ruby version <= 2.0 240s does not register an offense when using requiring `thread` 240s target ruby version < 3.1 240s does not register an offense and corrects when using requiring `fiber` 240s target ruby version >= 2.1 240s register an offense and corrects when using requiring `thread` or already redundant features 240s target ruby version >= 2.5 240s register an offense and corrects when using requiring `pp` or already redundant features 240s target ruby version >= 2.7 240s registers an offense when using requiring `ruby2_keywords` or already redundant features 240s 240s RuboCop::Cop::Layout::SpaceBeforeComma 240s handles more than one space before a comma 240s does not register an offense for no spaces before comma 240s registers an offense and corrects method call arg with space before comma 240s registers an offense and corrects block argument with space before comma 240s registers an offense and corrects array index with space before comma 240s heredocs 240s registers an offense and corrects 240s 240s RuboCop::Cop::Style::StringConcatenation 240s registers an offense and corrects for string concatenation 240s registers an offense and corrects for string concatenation as part of other expression 240s correctly handles strings with special characters 240s does not register an offense when using `+` with all non string arguments 240s correctly handles nested concatenable parts 240s double quotes inside string 240s registers an offense and corrects with percentage quotes 240s registers an offense and corrects with double quotes 240s double quotes inside string surrounded single quotes 240s registers an offense and corrects with double quotes 240s multiline 240s string continuation 240s does not register an offense 240s if condition 240s registers an offense but does not correct 240s multiline block 240s registers an offense but does not correct 240s simple expressions 240s registers an offense and corrects 240s nested interpolation 240s registers an offense and corrects 240s empty quotes 240s registers offense and corrects 240s Mode = conservative 240s when first operand is string literal 240s registers offense 240s when first operand is not string literal 240s does not register offense 240s heredoc 240s registers an offense but does not correct 240s registers an offense but does not correct when string concatenation with multiline heredoc text 240s inline block 240s registers an offense but does not correct 240s 240s RuboCop::Cop::Style::NumberedParameters 240s >= Ruby 2.7 240s EnforcedStyle: disallow 240s does an offense when using numbered parameters even with single-line blocks 240s EnforcedStyle: allow_single_line 240s does not register an offense when using numbered parameters with single-line blocks 240s registers an offense when using numbered parameters with multi-line blocks 240s 240s RuboCop::Cop::Style::AccessModifierDeclarations 240s when `group` is configured 240s accepts when #{access_modifier} is a hash literal value 240s does not offend when private is not inlined and has a comment 240s does not registers an offense when using #{access_modifier} in a block 240s does not offend when protected is not inlined 240s does not registers an offense when using #{access_modifier} in a block 240s does not offend when module_function is not inlined and has a comment 240s accepts when #{access_modifier} is a hash literal value 240s offends when public is inlined with a method 240s does not registers an offense when using #{access_modifier} in a block 240s accepts when using only #{access_modifier} 240s accepts when #{access_modifier} is a hash literal value 240s does not offend when public is not inlined and has a comment 240s offends when private is inlined with a method 240s accepts when using only #{access_modifier} 240s offends when protected is inlined with a method 240s does not offend when module_function is not inlined 240s does not offend when protected is not inlined and has a comment 240s registers an offense for correct + multiple opposite styles of #{access_modifier} usage 240s registers an offense for correct + multiple opposite styles of #{access_modifier} usage 240s does not registers an offense when using #{access_modifier} in a block 240s accepts when #{access_modifier} is a hash literal value 240s accepts when using only #{access_modifier} 240s accepts when using only #{access_modifier} 240s registers an offense for correct + multiple opposite styles of #{access_modifier} usage 240s does not offend when public is not inlined 240s registers an offense for correct + multiple opposite styles of #{access_modifier} usage 240s does not offend when private is not inlined 240s offends when module_function is inlined with a method 240s when non-existent method is modified by inline modifier with disallowed symbol 240s registers an offense but does not autocorrect it 240s allow access modifiers on symbols 240s accepts when argument to #{access_modifier} is a symbol 240s when method is modified by inline modifier with disallowed symbol 240s registers and autocorrects an offense 240s when method has comments 240s registers and autocorrects an offense 240s do not allow access modifiers on symbols 240s accepts when argument to #{access_modifier} is a symbol 240s when method is modified by inline modifier where group modifier already exists 240s registers and autocorrects an offense 240s when non-existent method is modified by inline modifier with disallowed symbol 240s registers an offense but does not autocorrect it 240s allow access modifiers on symbols 240s accepts when argument to #{access_modifier} is a symbol 240s when non-existent method is modified by inline modifier with disallowed symbol 240s registers an offense but does not autocorrect it 240s when method is modified by inline modifier 240s registers and autocorrects an offense 240s when method is modified by inline modifier with disallowed symbol 240s registers and autocorrects an offense 240s when method is modified by inline modifier 240s registers and autocorrects an offense 240s when method has comments 240s registers and autocorrects an offense 240s do not allow access modifiers on symbols 240s accepts when argument to #{access_modifier} is a symbol 240s when method is modified by inline modifier 240s registers and autocorrects an offense 240s when method is modified by inline modifier 240s registers and autocorrects an offense 240s when method is modified by inline modifier where group modifier already exists 240s registers and autocorrects an offense 240s when method has comments 240s registers and autocorrects an offense 240s when method is modified by inline modifier where group modifier already exists 240s registers and autocorrects an offense 240s when method has comments 240s registers and autocorrects an offense 240s when non-existent method is modified by inline modifier with disallowed symbol 240s registers an offense but does not autocorrect it 240s when method is modified by inline modifier with disallowed symbol 240s registers and autocorrects an offense 240s when method is modified by inline modifier where group modifier already exists 240s registers and autocorrects an offense 240s do not allow access modifiers on symbols 240s accepts when argument to #{access_modifier} is a symbol 240s allow access modifiers on symbols 240s accepts when argument to #{access_modifier} is a symbol 240s when method is modified by inline modifier with disallowed symbol 240s registers and autocorrects an offense 240s do not allow access modifiers on symbols 240s accepts when argument to #{access_modifier} is a symbol 240s allow access modifiers on symbols 240s accepts when argument to #{access_modifier} is a symbol 240s when `inline` is configured 240s offends when module_function is not inlined and has a comment 240s offends when protected is not inlined and has a comment 240s does not offend when module_function is inlined with a symbol 240s does not offend when protected is inlined with a method 240s registers an offense for correct + multiple opposite styles of #{access_modifier} usage 240s does not offend when private is inlined with a symbol 240s offends when private is not inlined and has a comment 240s offends when private is not inlined 240s offends when protected is not inlined 240s does not offend when protected is inlined with a symbol 240s registers an offense for correct + multiple opposite styles of #{access_modifier} usage 240s registers an offense for correct + multiple opposite styles of #{access_modifier} usage 240s does not offend when module_function is inlined with a method 240s offends when public is not inlined and has a comment 240s accepts when #{access_modifier} is a hash literal value 240s registers an offense for correct + multiple opposite styles of #{access_modifier} usage 240s offends when module_function is not inlined 240s does not offend when public is inlined with a symbol 240s accepts when #{access_modifier} is a hash literal value 240s accepts when #{access_modifier} is a hash literal value 240s does not offend when private is inlined with a method 240s offends when public is not inlined 240s does not offend when public is inlined with a method 240s accepts when #{access_modifier} is a hash literal value 240s do not allow access modifiers on symbols 240s accepts when argument to #{access_modifier} is a symbol 240s when methods are modified by group modifier 240s registers and autocorrects an offense 240s when methods are modified by group modifier 240s registers and autocorrects an offense 240s allow access modifiers on symbols 240s accepts when argument to #{access_modifier} is a symbol 240s do not allow access modifiers on symbols 240s accepts when argument to #{access_modifier} is a symbol 240s when methods are modified by group modifier 240s registers and autocorrects an offense 240s allow access modifiers on symbols 240s accepts when argument to #{access_modifier} is a symbol 240s when methods are modified by group modifier 240s registers and autocorrects an offense 240s do not allow access modifiers on symbols 240s accepts when argument to #{access_modifier} is a symbol 240s do not allow access modifiers on symbols 240s accepts when argument to #{access_modifier} is a symbol 240s allow access modifiers on symbols 240s accepts when argument to #{access_modifier} is a symbol 240s allow access modifiers on symbols 240s accepts when argument to #{access_modifier} is a symbol 240s 240s RuboCop::Cop::Lint::UselessSetterCall 240s is not confused by operators ending with = 240s accepts exception assignments without exploding 240s when a lvar contains an object passed as argument at the end of the method 240s accepts the setter call on the lvar 240s with method ending with setter call on argument 240s accepts 240s when a lvar contains an object passed as argument by multiple-assignment at the end of the method 240s accepts the setter call on the lvar 240s with method ending with ivar assignment 240s accepts 240s with method ending with square bracket setter on local object 240s registers an offense and corrects 240s when a lvar contains a local object instantiated with literal 240s registers an offense and corrects for the setter call on the lvar 240s with method ending with setter call on ivar 240s accepts 240s when a lvar does not contain any object passed as argument with multiple-assignment at the end of the method 240s registers an offense and corrects 240s with singleton method ending with setter call on local object 240s registers an offense and corrects 240s when a lvar declared as an argument is no longer the passed object at the end of the method 240s registers an offense and corrects for the setter call on the lvar 240s when a lvar does not contain any object passed as argument by binary-operator-assignment at the end of the method 240s registers an offense and corrects 240s when a lvar possibly contains an object passed as argument by logical-operator-assignment at the end of the method 240s accepts the setter call on the lvar 240s with method ending with setter call on local object 240s registers an offense and corrects 240s when a lvar contains a non-local object returned by a method 240s accepts 240s 240s RuboCop::Cop::Security::JSONLoad 240s does not register an offense for JSON under another namespace 240s registers an offense and corrects JSON.restore 240s allows JSON.dump 240s allows JSON.parse 240s registers an offense and corrects JSON.load 240s 240s RuboCop::Cop::Style::HashEachMethods 240s when node matches a keys#each or values#each 240s when receiver is a send 240s does not register an offense for Hash#each_value 240s does not register an offense for foo#each_key 240s registers offense, autocorrects foo#keys.each to foo#each_key 240s registers offense, autocorrects foo#values.each to foo#each_value 240s registers offense, autocorrects foo#values.each to foo#each_value with a symbol proc argument 240s registers offense, autocorrects foo#keys.each to foo#each_key with a symbol proc argument 240s Ruby 2.7 240s registers offense, autocorrects foo#keys.each to foo#each_key with numblock 240s when receiver is implicit 240s does not register an offense for `keys.each` 240s does not register an offense for `values.each` 240s does not register an offense for each_value 240s does not register an offense for `keys.each` with a symbol proc argument 240s does not register an offense for `values.each` with a symbol proc argument 240s does not register an offense for each_key 240s when `AllowedReceivers: ['execute']` 240s does not register an offense when receiver is `execute` method 240s registers an offense when receiver is not allowed name 240s does not register an offense when receiver is `execute` method with a symbol proc argument 240s does not register an offense when receiver is `execute` variable 240s when receiver is a hash literal 240s does not register an offense for {}#each_key 240s registers offense, autocorrects {}#values.each to {}#each_value with a symbol proc argument 240s registers offense, autocorrects {}#keys.each with {}#each_key 240s does not register an offense for {}#each_value 240s registers offense, autocorrects {}#values.each with {}#each_value 240s registers offense, autocorrects {}#keys.each to {}#each_key with a symbol proc argument 240s 240s RuboCop::ConfigObsoletion::RenamedCop 240s #message 240s when the cop has changed names but in the same department 240s is expected to start with "The `Style/MyCop` cop has been renamed to `Style/NewCop`" 240s when the cop has been moved to a new department 240s is expected to start with "The `Style/MyCop` cop has been moved to `Layout/MyCop`" 240s when the cop has changed names but in a new department 240s is expected to start with "The `Style/MyCop` cop has been renamed to `Layout/NewCop`" 240s 240s RuboCop::FileFinder 240s #find_file_upwards 240s returns a file to be found upwards 240s returns nil when file is not found 240s #find_last_file_upwards 240s returns nil when file is not found 240s returns the last file found upwards 240s 240s RuboCop::Cop::Style::OperatorMethodCall 240s does not register an offense when using `foo | bar` 240s does not register an offense when using `foo < bar` 240s registers an offense when using `foo.%(bar)` 240s registers an offense when chaining `foo.bar.>>(baz).round(2)` 240s does not register an offense when using `foo ** bar` 240s registers an offense when chaining `foo.bar.<=>(baz).round(2)` 240s does not register an offense when using `obj.!` 240s registers an offense when chaining `foo.bar.!~(baz).round(2)` 240s registers an offense when chaining `foo.bar.<(baz).round(2)` 240s registers an offense when using `foo.>> bar` 240s does not register an offense when using `foo ~ bar` 240s registers an offense when using `foo.<=> bar` 240s does not register an offense when using `foo + bar` 240s registers an offense when chaining `foo.bar.=~(baz).round(2)` 240s registers an offense when using `foo.| bar` 240s does not register an offense when using `foo / bar` 240s does not register an offense when using `foo.+@bar.to_s` 240s does not register an offense when using `foo =~ bar` 240s does not register an offense when using `foo ! bar` 240s does not register an offense when using `foo * bar` 240s registers an offense when chaining `foo.bar.**(baz).round(2)` 240s registers an offense when using `foo.=== bar` 240s does not register an offense when using `foo <= bar` 240s registers an offense when using `foo.===(bar)` 240s registers an offense when chaining `foo.bar.&(baz).round(2)` 240s registers an offense when chaining `foo.bar.!=(baz).round(2)` 240s registers an offense when using `foo.<(bar)` 240s does not register an offense when using `foo != bar` 240s registers an offense when using `foo.~ bar` 240s does not register an offense when using `foo ^ bar` 240s does not register an offense when using `foo.+@bar` 240s does not register an offense when using `foo.~@bar` 240s registers an offense when using `foo.* bar` 240s registers an offense when using `foo./(bar)` 240s registers an offense when chaining `foo.bar.+(baz).round(2)` 240s does not register an offense when using `foo.`bar` 240s registers an offense when using `foo.>= bar` 240s registers an offense when chaining `foo.bar.%(baz).round(2)` 240s does not register an offense when using `foo % bar` 240s registers an offense when using `foo.& bar` 240s does not register an offense when using `foo == bar` 240s registers an offense when using `foo.+ bar` 240s registers an offense when chaining `foo.bar.|(baz).round(2)` 240s registers an offense when using `foo.>>(bar)` 240s registers an offense when using `foo.!= bar` 240s registers an offense when using `foo.** bar` 240s does not register an offense when using `foo - bar` 240s registers an offense when using `foo.- bar` 240s registers an offense when using `foo.< bar` 240s registers an offense when using `foo.<= bar` 240s registers an offense when chaining `foo.bar.*(baz).round(2)` 240s registers an offense when chaining `foo.bar.!(baz).round(2)` 240s registers an offense when using `foo.% bar` 240s registers an offense when chaining `foo.bar.>=(baz).round(2)` 240s does not register an offense when using `foo >= bar` 240s registers an offense when using `foo.&(bar)` 240s registers an offense when chaining `foo.bar./(baz).round(2)` 240s registers an offense when using `foo.== bar` 240s registers an offense when using `foo.<=>(bar)` 240s registers an offense when using `foo.==(bar)` 240s registers an offense when using `foo.=~ bar` 240s registers an offense when using `foo.!~(bar)` 240s registers an offense when using `foo.<=(bar)` 240s registers an offense when using `foo.*(bar)` 240s registers an offense when chaining `foo.bar.<=(baz).round(2)` 240s registers an offense when using `foo.+(bar)` 240s registers an offense when chaining `foo.bar.^(baz).round(2)` 240s registers an offense when chaining `foo.bar.~(baz).round(2)` 240s registers an offense when using `foo.~(bar)` 240s registers an offense when using `foo.>(bar)` 240s registers an offense when chaining `foo.bar.==(baz).round(2)` 240s does not register an offense when using `foo.-@bar` 240s registers an offense when using `foo.> bar` 240s registers an offense when using `foo.<< bar` 240s does not register an offense when using `foo <=> bar` 240s registers an offense when using `foo.|(bar)` 240s registers an offense when using `foo.!(bar)` 240s registers an offense when using `foo.!=(bar)` 240s does not register an offense when using `foo << bar` 240s registers an offense when using `foo.^ bar` 240s registers an offense when using `foo.!~ bar` 240s registers an offense when using `foo.<<(bar)` 240s registers an offense when using `foo.! bar` 240s does not register an offense when using `foo !~ bar` 240s registers an offense when chaining `foo.bar.>(baz).round(2)` 240s registers an offense when using `foo.^(bar)` 240s registers an offense when chaining `foo.bar.<<(baz).round(2)` 240s does not register an offense when using `Foo.+(bar)` 240s does not register an offense when using `foo > bar` 240s does not register an offense when using `foo >> bar` 240s registers an offense when using `foo.=~(bar)` 240s does not register an offense when using `foo === bar` 240s registers an offense when chaining `foo.bar.-(baz).round(2)` 240s registers an offense when using `foo.-(bar)` 240s does not register an offense when using `foo & bar` 240s registers an offense when using `foo.**(bar)` 240s does not register an offense when using `foo.!@bar` 240s registers an offense when using `foo./ bar` 240s registers an offense when chaining `foo.bar.===(baz).round(2)` 240s registers an offense when using `foo.>=(bar)` 240s 240s RuboCop::Cop::Lint::HeredocMethodCallPosition 240s correct cases 240s ignores if no call 240s accepts simple correct case 240s accepts chained correct case 240s incorrect cases 240s simple incorrect case 240s detects 240s chained case without args 240s detects 240s chained case no parens 240s detects 240s chained case with multiple line args 240s detects 240s with trailing comma in method call 240s detects 240s chained case with parens 240s detects 240s simple incorrect case with paren 240s detects 240s 240s RuboCop::Cop::Lint::ShadowingOuterLocalVariable 240s when a block local variable has same name as an outer scope variable 240s registers an offense 240s when a block block argument has same name as an outer scope variable 240s registers an offense 240s when the same variable name as a block variable is used in return value assignment of `if` 240s does not register an offense 240s when multiple block arguments have a same name starts with "_" 240s does not register an offense 240s when a splat block argument has same name as an outer scope variable 240s registers an offense 240s when a block local variable has same name as an outer scope variablewith same branches of same nested `if` condition node 240s registers an offense 240s when a block local variable has same name as an outer scope variablewith different branches of same `case` condition node 240s does not register an offense 240s when a block local variable has same name as an outer scope variablewith different branches of same `if` condition node 240s does not register an offense 240s when a block argument has different name with outer scope variables 240s does not register an offense 240s when a block local variable has same name as an outer scope variablewith same branches of same `case` condition node 240s registers an offense 240s when a block local variable has same name as an outer scope variablewith same branches of same `if` condition node 240s registers an offense 240s with Ractor.new 240s does not register an offense 240s when a block argument has a same name starts with "_" as an outer scope variable 240s does not register an offense 240s 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 240s registers an offense 240s when a block local variable has same name as an outer scope variablewith same branches of same `unless` condition node 240s registers an offense 240s when a block local variable has same name as an outer scope variablewith different branches of same `unless` condition node 240s does not register an offense 240s when a block argument has same name "_" as outer scope variable "_" 240s does not register an offense 240s when a method argument has same name as an outer scope variable 240s does not register an offense 240s when multiple block arguments have same name "_" 240s does not register an offense 240s when an outer scope variable is reassigned in a block 240s does not register an offense 240s when a block argument has same name as an outer scope variable 240s registers an offense 240s when an outer scope variable is referenced in a block 240s does not register an offense 240s 240s RuboCop::Cop::Lint::OrAssignmentToConstant 240s does not register an offense with plain assignment to a constant 240s does not register an offense with or-assignment to a local variable 240s registers an offense with or-assignment to a constant 240s does not register an offense with or-assignment to an instance variable 240s does not register an offense with or-assignment to a global variable 240s does not register an offense with or-assignment to a class variable 240s does not register an offense with or-assignment to an attribute 240s 240s RuboCop::Cop::Style::MethodCallWithoutArgsParentheses 240s accepts parens after not 241s accepts special lambda call syntax 241s accepts parentheses for methods starting with an upcase letter 241s registers an offense for `obj.method ||= func()` 241s accepts parens in method call with args 241s autocorrects calls that could be empty literals 241s registers an offense for `obj.method &&= func()` 241s registers an offense for `obj.method += func()` 241s registers an offense for parens in method call without args 241s when AllowedPatterns is enabled 241s ignores method listed in AllowedMethods 241s when AllowedMethods is enabled 241s ignores method listed in AllowedMethods 241s method call as argument 241s registers an offense with empty parens 241s registers an empty parens offense for multiple assignment 241s accepts without parens 241s assignment to a variable with the same name 241s accepts parens in complex assignment 241s accepts parens in default argument assignment 241s accepts parens in local variable assignment 241s accepts parens in shorthand assignment 241s accepts parens in parallel assignment 241s 241s RuboCop::Cop::Naming::MethodName 241s accepts for non-ascii characters 241s when configured for camelCase 241s registers an offense for correct + opposite 241s accepts operator definitions 241s accepts camel case in singleton method name 241s accepts class emitter method in a module 241s registers an offense for snake case in names 241s registers an offense for singleton snake_case method within class 241s registers an offense for capitalized camel case 241s registers an offense for mixed snake case and camel case 241s registers an offense for snake case name in attr. 241s accepts camel case names in attr. 241s accepts class emitter method in a class 241s accepts camel case in instance method name 241s accepts unary operator definitions 241s registers an offense for mixed snake case and camel case in attr. 241s registers an offense for capitalized camel case name in attr. 241s registers an offense for mixed snake case and camel case in attr. 241s accepts one line methods 241s registers an offense for camel case methods names in attr. 241s registers an offense for singleton upper case method without corresponding class 241s accepts class emitter method in a module, even when it is defined inside another method 241s accepts class emitter method in a class, even when it is defined inside another method 241s when specifying `AllowedPatterns` 241s does not register an offense for snake case method name matching `AllowedPatterns` 241s does not register an offense for snake case method name in attr. 241s does not register an offense for camel case method name matching `AllowedPatterns` 241s does not register an offense for camel case method name in attr. 241s when configured for snake_case 241s registers an offense for capitalized camel case 241s registers an offense for capitalized camel case name in attr. 241s accepts unary operator definitions 241s accepts one line methods 241s registers an offense for singleton upper case method without corresponding class 241s registers an offense for camel case in singleton method name 241s registers an offense for mixed snake case and camel case in attr. 241s registers an offense for camel case methods names in attr. 241s accepts snake case in attr. 241s accepts class emitter method in a class, even when it is defined inside another method 241s accepts class emitter method in a module, even when it is defined inside another method 241s registers an offense for singleton camelCase method within class 241s registers an offense for mixed snake case and camel case 241s accepts operator definitions 241s registers an offense for camel case method names in attr. 241s accepts snake case in names 241s registers an offense for mixed snake case and camel case in attr. 241s accepts class emitter method in a class 241s accepts class emitter method in a module 241s registers an offense for camel case in instance method name 241s registers an offense for opposite + correct 241s when specifying `AllowedPatterns` 241s does not register an offense for snake case method name matching `AllowedPatterns` 241s does not register an offense for camel case method name matching `AllowedPatterns` 241s does not register an offense for snake case method name in attr. 241s does not register an offense for camel case method name in attr. 241s 241s RuboCop::Cop::Style::EndlessMethod 241s Ruby >= 3.0 241s EnforcedStyle: disallow 241s registers an offense for an endless method with arguments 241s registers an offense for an endless method 241s EnforcedStyle: allow_single_line 241s does not register an offense for an endless method 241s registers an offense and corrects for a multiline endless method with begin 241s registers an offense and corrects for a multiline endless method 241s registers an offense and corrects for a multiline endless method with arguments 241s does not register an offense for an endless method with arguments 241s EnforcedStyle: allow_always 241s does not register an offense for a multiline endless method with begin 241s does not register an offense for an endless method 241s does not register an offense for a multiline endless method with arguments 241s does not register an offense for an endless method with arguments 241s does not register an offense for a multiline endless method 241s 241s RuboCop::Cop::Style::Copyright 241s does not register an offense when the notice is present 241s does not register an offense when the notice is in a block comment 241s does not register an offense when the notice is not the first comment 241s when the source code file is empty 241s adds an offense 241s when the copyright notice comes after any code 241s adds an offense 241s when the copyright notice is missing and the source code file starts with an encoding comment 241s adds an offense 241s when the copyright notice is missing and the source code file starts with shebang and an encoding comment 241s adds an offense 241s when the copyright notice is missing and the source code file starts with a shebang 241s adds an offense 241s when the copyright notice is missing 241s fails to autocorrect when the AutocorrectNotice does not match the Notice pattern 241s adds an offense 241s fails to autocorrect if no AutocorrectNotice is given 241s 241s RuboCop::Cop::Layout::EmptyLinesAroundExceptionHandlingKeywords 241s accepts no empty line 241s accepts empty lines around begin body 241s accepts empty method definition 241s accepts empty begin 241s with complex method definition - registers many offenses 241s accepts `begin` and `rescue` are on the same line 241s registers an offense for above rescue keyword with a blank 241s registers an offense for rescue section starting with a blank 241s accepts `rescue` and `end` are on the same line 241s with complex begin-end - registers many offenses 241s accepts last `rescue` and `end` are on the same line 241s registers an offense for rescue section ending for method definition a blank 241s accepts `def` and `rescue` are on the same line 241s registers an offense for rescue section ending with a blank 241s 241s RuboCop::Cop::Style::ParenthesesAroundCondition 241s does not register an offense when parentheses in multiple expressions separated by semicolon 241s allows parens if the condition node is a modifier unless op 241s allows parens if the condition node is a modifier while op 241s accepts parentheses around condition in a ternary 241s does not blow up when the condition is a ternary op 241s is not confused by parentheses in subexpression 241s registers an offense for parentheses around condition 241s allows parens if the condition node is a modifier rescue op 241s is not confused by leading parentheses in subexpression 241s allows parens if the condition node is a modifier if op 241s accepts parentheses if there is no space between the keyword and (. 241s does not blow up for empty if condition 241s allows parens if the condition node is a modifier until op 241s does not blow up for empty unless condition 241s parentheses in multiline conditions are allowed 241s registers an offense for parentheses in single line condition 241s accepts parentheses around multiline condition 241s safe assignment is not allowed 241s does not accept element assignment in condition surrounded with parentheses 241s does not accept variable assignment in condition surrounded with parentheses 241s safe assignment is allowed 241s accepts element assignment in condition surrounded with parentheses 241s accepts setter in condition surrounded with parentheses 241s accepts variable assignment in condition surrounded with parentheses 241s parentheses in multiline conditions are not allowed 241s registers an offense for parentheses around multiline condition 241s 241s RuboCop::Cop::Layout::EmptyLinesAroundArguments 241s when extra lines 241s registers and autocorrects offenses when multiple empty lines are detected 241s registers and autocorrects offense when empty line between normal arg & block arg 241s registers and autocorrects offense on correct line for single offense example 241s registers autocorrects empty line whetn args start on definition line 241s registers and autocorrects offense on correct lines for multi-offense example 241s registers and autocorrects offense for empty line after arg 241s registers and autocorrects offense for empty line before arg 241s registers and autocorrects offense when args start on definition line 241s registers and autocorrects offense for empty line between args 241s when using safe navigation operator 241s registers and autocorrects offense for empty line before arg 241s when no extra lines 241s accepts one line methods 241s accepts method with no arguments that trails off block 241s accepts multiline style argument for method call without selector 241s accepts multiple listed mixed args 241s accepts method with argument that trails off block 241s accepts block argument with empty line 241s accepts method with argument that trails off heredoc 241s accepts when blank line is inserted between method with arguments and receiver 241s accepts listed args starting on definition line 241s with one argument 241s ignores empty lines inside of method arguments 241s with multiple arguments 241s ignores empty lines inside of method arguments 241s 241s RuboCop::Cop::Style::ObjectThen 241s EnforcedStyle: then 241s registers an offense for yield_self with proc param 241s accepts yield_self with more than 1 param 241s accepts yield_self without a block 241s Ruby 2.7 241s registers an offense for yield_self with block 241s Ruby 2.6 241s registers an offense for yield_self with block 241s Ruby 2.5 241s accepts yield_self with block 241s EnforcedStyle: yield_self 241s accepts then with more than 1 param 241s accepts then without a block 241s registers an offense for then with block 241s registers an offense for then with proc param 241s 241s RuboCop::Cop::Util 241s #to_supported_styles 241s when EnforcedStyleInsidePipes 241s is expected to eq "SupportedStylesInsidePipes" 241s when EnforcedStyle 241s is expected to eq "SupportedStyles" 241s #same_line? 241s can use ranges 241s returns false if an argument is not a node or range 241s returns false when two nodes are not on the same line 241s returns true when two nodes are on the same line 241s #line_range 241s returns line range of the expression 241s 241s RuboCop::Cop::Style::DefWithParentheses 241s accepts def without arguments 241s accepts def with arg and parens 241s accepts empty parentheses in one liners 241s reports an offense for def with empty parens 241s reports an offense for class def with empty parens 241s Ruby >= 3.0 241s reports an offense for endless method definition with empty parens 241s 241s RuboCop::Cop::Style::TrailingUnderscoreVariable 241s configured to not allow named underscore variables 241s does not register an offense for a named variable preceded by a names splat underscore variable 241s does not register an offense for a named underscore preceded by a splat variable 241s does not register an offense for an underscore preceded by a splat variable anywhere in the argument chain 241s does not register an offense for an underscore preceded by a splat variable and another underscore 241s registers an offense for named variables that start with an underscore 241s registers an offense for splat underscore as the last variable 241s does not register an offense when there are no underscores 241s registers an offense for an underscore as the last param when there is also an underscore as the first param 241s registers an offense for an underscore variable preceded by a named splat underscore variable 241s registers an offense for multiple underscore variables preceded by a named splat underscore variable 241s does not register an offense for multiple named underscores preceded by a splat variable 241s registers an offense for nested assignments with trailing underscores 241s does not register an offense for complex nested assignments without trailing underscores 241s registers an offense for an underscore preceded by a named splat underscore 241s registers an offense for multiple underscore variables preceded by a splat underscore variable 241s registers an offense when underscore is the only variable in parallel assignment 241s registers an offense when the last variable of parallel assignment is an underscore 241s registers an offense when multiple underscores are used as the last variables of parallel assignment 241s registers an offense for a named splat underscore as the last variable 241s registers an offense for complex nested assignments with trailing underscores 241s does not register an offense for a named underscore variable preceded by a splat variable 241s does not register an offense for nested assignments without trailing underscores 241s does not register an offense for an underscore preceded by a splat variable 241s registers an offense when underscore is the second to last variable and blank is the last variable 241s does not register an offense for multiple underscores preceded by a splat variable 241s does not register an offense for underscores at the beginning 241s autocorrect 241s with parentheses 241s removes assignment part when it is the only variable 241s leaves parentheses but removes trailing underscores and commas 241s removes assignment part when every assignment is to `_` 241s leaves parentheses but removes trailing underscores 241s configured to allow named underscore variables 241s does not register an offense for an underscore variable preceded by a named splat underscore variable 241s registers an offense when underscore is the only variable in parallel assignment 241s does not register an offense for multiple underscore variables preceded by a named splat underscore variable 241s registers an offense when underscore is the second to last variable and blank is the last variable 241s does not register an offense for complex nested assignments without trailing underscores 241s registers an offense when the last variable of parallel assignment is an underscore 241s registers an offense for complex nested assignments with trailing underscores 241s does not register an offense for a named underscore variable preceded by a splat variable 241s does not register an offense for named variables that start with an underscore 241s does not register an offense for multiple named underscores preceded by a splat variable 241s does not register an offense for nested assignments without trailing underscores 241s does not register an offense for a named variable preceded by a names splat underscore variable 241s registers an offense for an underscore as the last param when there is also an underscore as the first param 241s does not register an offense for underscores at the beginning 241s does not register an offense for an underscore preceded by a splat variable anywhere in the argument chain 241s does not register an offense for multiple underscores preceded by a splat variable 241s does not register an offense for an underscore preceded by a splat variable 241s does not register an offense for a named splat underscore as the last variable 241s registers an offense for multiple underscore variables preceded by a splat underscore variable 241s registers an offense for nested assignments with trailing underscores 241s registers an offense for splat underscore as the last variable 241s registers an offense when multiple underscores are used as the last variables of parallel assignment 241s does not register an offense when there are no underscores 241s does not register an offense for an underscore preceded by a splat variable and another underscore 241s autocorrect 241s with parentheses 241s leaves parentheses but removes trailing underscores and commas 241s removes assignment part when every assignment is to `_` 241s leaves parentheses but removes trailing underscores 241s removes assignment part when it is the only variable 241s 241s RuboCop::Cop::Layout::ConditionPosition 241s registers an offense and corrects for condition on the next line 241s accepts condition on the same line 241s registers an offense and corrects for condition on the next line 241s registers an offense and corrects for condition on the next line 241s accepts condition on the same line 241s accepts condition on a different line for modifiers 241s accepts ternary ops 241s accepts condition on a different line for modifiers 241s registers an offense and corrects for condition on the next line 241s accepts condition on a different line for modifiers 241s accepts condition on the same line 241s accepts condition on the same line 241s accepts condition on a different line for modifiers 241s registers an offense and corrects for elsif condition on the next line 241s 241s RuboCop::Cop::Style::SingleArgumentDig 241s dig over a variable as caller 241s when using multiple `dig` in a method chain 241s registers and corrects an offense 241s with multiple arguments 241s does not register an offense 241s when using dig with splat operator 241s does not register an offense 241s with single argument 241s registers an offense and corrects unsuitable use of dig 241s when without a receiver 241s does not register an offense 241s >= Ruby 2.7 241s when using dig with arguments forwarding 241s does not register an offense 241s dig over literal 241s with single argument 241s registers an offense and corrects unsuitable use of dig 241s with multiple arguments 241s does not register an offense 241s when using dig with splat operator 241s does not register an offense 241s 241s RuboCop::Formatter::SimpleTextFormatter 241s #report_summary 241s when a offense detected and a offense autocorrectable 241s handles pluralization correctly 241s when an offense is corrected 241s prints about correction 241s when 2 offenses are corrected 241s handles pluralization correctly 241s when 2 offenses are corrected and 2 offenses autocorrectable 241s handles pluralization correctly 241s when a file inspected and no offenses detected 241s handles pluralization correctly 241s when 2 offenses detected 241s handles pluralization correctly 241s when a offense detected 241s handles pluralization correctly 241s when 2 offenses detected and 2 offenses autocorrectable 241s handles pluralization correctly 241s when no files inspected 241s handles pluralization correctly 241s #report_file 241s behaves like report for severity 241s the file is under the current working directory 241s prints as relative path 241s when the offense is correctable 241s prints message as-is 241s when the offense is automatically corrected 241s prints [Corrected] along with message 241s when the offense is not corrected 241s prints message as-is 241s when the offense is marked as todo 241s prints [Todo] along with message 241s the file is outside of the current working directory 241s prints as absolute path 241s behaves like report for severity 241s the file is under the current working directory 241s prints as relative path 241s when the offense is not corrected 241s prints message as-is 241s the file is outside of the current working directory 241s prints as absolute path 241s when the offense is automatically corrected 241s prints [Corrected] along with message 241s when the offense is marked as todo 241s prints [Todo] along with message 241s when the offense is correctable 241s prints message as-is 241s behaves like report for severity 241s when the offense is marked as todo 241s prints [Todo] along with message 241s when the offense is correctable 241s prints message as-is 241s the file is under the current working directory 241s prints as relative path 241s the file is outside of the current working directory 241s prints as absolute path 241s when the offense is automatically corrected 241s prints [Corrected] along with message 241s when the offense is not corrected 241s prints message as-is 241s behaves like report for severity 241s when the offense is not corrected 241s prints message as-is 241s the file is under the current working directory 241s prints as relative path 241s when the offense is correctable 241s prints message as-is 241s the file is outside of the current working directory 241s prints as absolute path 241s when the offense is automatically corrected 241s prints [Corrected] along with message 241s when the offense is marked as todo 241s prints [Todo] along with message 241s behaves like report for severity 241s when the offense is not corrected 241s prints message as-is 241s the file is under the current working directory 241s prints as relative path 241s when the offense is marked as todo 241s prints [Todo] along with message 241s when the offense is automatically corrected 241s prints [Corrected] along with message 241s the file is outside of the current working directory 241s prints as absolute path 241s when the offense is correctable 241s prints message as-is 241s behaves like report for severity 241s when the offense is marked as todo 241s prints [Todo] along with message 241s when the offense is correctable 241s prints message as-is 241s when the offense is not corrected 241s prints message as-is 241s the file is under the current working directory 241s prints as relative path 241s the file is outside of the current working directory 241s prints as absolute path 241s when the offense is automatically corrected 241s prints [Corrected] along with message 241s 241s RuboCop::Cop::InternalAffairs::InheritDeprecatedCopClass 241s does not register an offense when using `Base` 241s does not register an offense when not inherited super class 241s registers an offense when using `RuboCop::Cop::Cop` 241s registers an offense when using `Cop` 241s 241s RuboCop::Cop::InternalAffairs::NodeMatcherDirective 241s does not insert a blank line if one already exists 241s does not register an offense if the directive is in a comment block 241s does not register an offense if the node matcher already has a directive 241s does not register an offense if called with a dynamic method name 241s does not register an offense if the directive is in a comment block 241s registers an offense if the matcher does not have a directive and a method call is used for a pattern argument 241s does not register an offense if the node matcher already has a directive 241s inserts a blank line between multiple multi-line pattern matchers 241s registers an offense if the matcher does not have a directive but has preceding comments 241s autocorrects with the right arguments if the pattern references a non-contiguous argument 241s does not insert a blank line if one already exists 241s does not register an offense if called with a dynamic method name 241s inserts a blank line between multiple pattern matchers 241s retains indentation properly when inserting 241s registers an offense if the directive name does not match the actual name 241s registers an offense if the matcher does not have a directive and a method call is used for a pattern argument 241s registers an offense if the matcher does not have a directive 241s registers an offense if the directive name does not match the actual name 241s retains indentation properly when correcting 241s registers an offense if the matcher does not have a directive but has preceding comments 241s retains indentation properly when correcting 241s registers an offense if the matcher has multiple directives 241s registers an offense if the matcher has multiple directives 241s inserts a blank line between multiple pattern matchers 241s autocorrects with the right arguments if the pattern includes arguments 241s inserts a blank line between multiple multi-line pattern matchers 241s autocorrects with the right arguments if the pattern references a non-contiguous argument 241s autocorrects with the right arguments if the pattern includes arguments 241s retains indentation properly when inserting 241s registers an offense if the matcher does not have a directive 241s 241s RuboCop::Cop::Style::EndBlock 241s reports an offense and corrects END block 241s does not report offenses for other blocks 241s 241s RuboCop::Cop::Style::QuotedSymbols 241s configured with `same_as_string_literals` 241s when Style/StringLiterals is configured with single_quotes 241s behaves like enforce single quotes 241s registers an offense and corrects for double quotes without interpolation 241s accepts double quotes when interpolating a global variable 241s accepts double quotes with escape sequences 241s accepts single quotes with line breaks 241s registers an offense and corrects for an escaped quote within double quotes 241s registers an offense and corrects for double quotes in hash keys 241s accepts double quotes when interpolating an instance variable 241s accepts double quotes when control characters are used 241s accepts single quoted symbol with an escaped quote 241s accepts double quotes with interpolation 241s registers an offense and corrects escape characters properly 241s accepts double quotes with line breaks 241s accepts double quotes when unicode control sequence is used 241s accepts double quotes when interpolating a class variable 241s accepts single quotes with double quotes 241s accepts single quotes 241s accepts unquoted symbols 241s accepts double quotes with some other special symbols 241s accepts double quotes with single quotes 241s hash with hashrocket style 241s accepts properly quoted symbols 241s corrects wrong quotes 241s when Style/StringLiterals is configured with double_quotes 241s behaves like enforce double quotes 241s accepts double quotes with interpolation 241s registers an offense for single quotes 241s accepts unquoted symbols 241s accepts double quoted symbol with an escaped quote 241s accepts double quotes with line breaks 241s accepts single quotes with double quotes 241s accepts double quotes with single quotes 241s accepts double quotes 241s accepts double quotes when interpolating an instance variable 241s accepts double quotes when interpolating a class variable 241s accepts single quotes with line breaks 241s accepts double quotes with escape sequences 241s registers an offense and corrects for an escaped quote within single quotes 241s registers an offense and corrects escape characters properly 241s accepts double quotes when interpolating a global variable 241s hash with hashrocket style 241s accepts properly quoted symbols 241s corrects wrong quotes 241s when Style/StringLiterals is disabled 241s behaves like enforce single quotes 241s registers an offense and corrects for an escaped quote within double quotes 241s registers an offense and corrects for double quotes in hash keys 241s accepts double quotes when interpolating an instance variable 241s accepts double quotes with escape sequences 241s registers an offense and corrects for double quotes without interpolation 241s registers an offense and corrects escape characters properly 241s accepts double quotes when control characters are used 242s accepts double quotes when interpolating a global variable 242s accepts double quotes with single quotes 242s accepts double quotes with some other special symbols 242s accepts single quotes with line breaks 242s accepts single quotes with double quotes 242s accepts unquoted symbols 242s accepts double quotes when interpolating a class variable 242s accepts double quotes with line breaks 242s accepts single quoted symbol with an escaped quote 242s accepts single quotes 242s accepts double quotes with interpolation 242s accepts double quotes when unicode control sequence is used 242s hash with hashrocket style 242s corrects wrong quotes 242s accepts properly quoted symbols 242s configured with `single_quotes` 242s behaves like enforce single quotes 242s accepts unquoted symbols 242s accepts single quotes with line breaks 242s accepts double quotes with interpolation 242s accepts single quoted symbol with an escaped quote 242s accepts double quotes when interpolating a class variable 242s accepts single quotes with double quotes 242s accepts double quotes when control characters are used 242s accepts double quotes when interpolating an instance variable 242s accepts double quotes with some other special symbols 242s registers an offense and corrects for an escaped quote within double quotes 242s accepts double quotes when interpolating a global variable 242s registers an offense and corrects escape characters properly 242s registers an offense and corrects for double quotes in hash keys 242s accepts double quotes when unicode control sequence is used 242s accepts single quotes 242s accepts double quotes with line breaks 242s registers an offense and corrects for double quotes without interpolation 242s accepts double quotes with escape sequences 242s accepts double quotes with single quotes 242s hash with hashrocket style 242s corrects wrong quotes 242s accepts properly quoted symbols 242s configured with `double_quotes` 242s behaves like enforce double quotes 242s accepts double quotes with line breaks 242s registers an offense for single quotes 242s accepts double quotes when interpolating a class variable 242s accepts double quotes with interpolation 242s accepts unquoted symbols 242s accepts double quotes with single quotes 242s accepts double quotes with escape sequences 242s accepts double quotes when interpolating a global variable 242s accepts double quotes when interpolating an instance variable 242s registers an offense and corrects escape characters properly 242s accepts single quotes with double quotes 242s accepts double quoted symbol with an escaped quote 242s accepts double quotes 242s registers an offense and corrects for an escaped quote within single quotes 242s accepts single quotes with line breaks 242s hash with hashrocket style 242s corrects wrong quotes 242s accepts properly quoted symbols 242s 242s RuboCop::Cop::Style::RedundantException 242s accepts rescue w/ non redundant error 242s accepts a fail with ::RuntimeError if it does not have 2 args 242s reports an offense for a fail with RuntimeError.new 242s reports an offense for a raise with ::RuntimeError.new 242s reports an offense for a raise with ::RuntimeError and () 242s reports an offense for a fail with RuntimeError 242s reports an offense for a raise with ::RuntimeError.new 242s reports an offense for a fail with RuntimeError and () 242s accepts rescue w/ non redundant error 242s reports an offense for a raise with RuntimeError and () 242s accepts rescue w/ non redundant error 242s accepts a raise with RuntimeError if it does not have 2 args 242s reports an offense for a fail with ::RuntimeError.new 242s reports an offense for a raise with RuntimeError.new 242s reports an offense for a raise with RuntimeError 242s reports an offense for a fail with ::RuntimeError and () 242s reports an offense for a fail with RuntimeError.new 242s reports an offense for a fail with ::RuntimeError.new 242s reports an offense for a raise with ::RuntimeError 242s reports an offense for a raise with RuntimeError.new 242s accepts rescue w/ non redundant error 242s accepts a fail with RuntimeError if it does not have 2 args 242s accepts a raise with ::RuntimeError if it does not have 2 args 242s reports an offense for a fail with ::RuntimeError 242s 242s RuboCop::Cop::Layout::SpaceInsidePercentLiteralDelimiters 242s accepts execute-string literals 242s accepts other percent literals 242s for w type and ["[", "]"] delimiters 242s accepts literals without additional spaces 242s registers an offense for spaces before final delimiter 242s registers an offense for spaces after first delimiter 242s registers an offense for unnecessary spaces 242s accepts multi-line literals 242s registers an offense for literals with escaped and other spaces 242s accepts literals with escaped spaces 242s accepts newlines and additional following alignment spaces 242s accepts multi-line literals within a method 242s accepts spaces between entries 242s with space in blank percent literals 242s registers and corrects an offense 242s with newline in blank percent literals 242s registers and corrects an offense 242s with spaces in blank percent literals 242s registers and corrects an offense 242s for I type and ["!", "!"] delimiters 242s accepts literals with escaped spaces 242s accepts literals without additional spaces 242s registers an offense for unnecessary spaces 242s accepts newlines and additional following alignment spaces 242s accepts multi-line literals within a method 242s accepts multi-line literals 242s registers an offense for spaces after first delimiter 242s accepts spaces between entries 242s registers an offense for literals with escaped and other spaces 242s registers an offense for spaces before final delimiter 242s with spaces in blank percent literals 242s registers and corrects an offense 242s with space in blank percent literals 242s registers and corrects an offense 242s with newline in blank percent literals 242s registers and corrects an offense 242s for w type and ["{", "}"] delimiters 242s registers an offense for spaces after first delimiter 242s registers an offense for spaces before final delimiter 242s accepts spaces between entries 242s accepts multi-line literals 242s accepts literals with escaped spaces 242s accepts multi-line literals within a method 242s registers an offense for literals with escaped and other spaces 242s accepts newlines and additional following alignment spaces 242s accepts literals without additional spaces 242s registers an offense for unnecessary spaces 242s with spaces in blank percent literals 242s registers and corrects an offense 242s with space in blank percent literals 242s registers and corrects an offense 242s with newline in blank percent literals 242s registers and corrects an offense 242s for i type and ["[", "]"] delimiters 242s registers an offense for spaces after first delimiter 242s accepts multi-line literals within a method 242s accepts spaces between entries 242s accepts multi-line literals 242s accepts literals without additional spaces 242s accepts literals with escaped spaces 242s registers an offense for literals with escaped and other spaces 242s accepts newlines and additional following alignment spaces 242s registers an offense for spaces before final delimiter 242s registers an offense for unnecessary spaces 242s with space in blank percent literals 242s registers and corrects an offense 242s with spaces in blank percent literals 242s registers and corrects an offense 242s with newline in blank percent literals 242s registers and corrects an offense 242s for x type and ["[", "]"] delimiters 242s registers an offense for unnecessary spaces 242s registers an offense for literals with escaped and other spaces 242s accepts multi-line literals 242s registers an offense for spaces before final delimiter 242s registers an offense for spaces after first delimiter 242s accepts spaces between entries 242s accepts newlines and additional following alignment spaces 242s accepts literals without additional spaces 242s accepts multi-line literals within a method 242s accepts literals with escaped spaces 242s with newline in blank percent literals 242s registers and corrects an offense 242s with space in blank percent literals 242s registers and corrects an offense 242s with spaces in blank percent literals 242s registers and corrects an offense 242s for i type and ["!", "!"] delimiters 242s registers an offense for spaces before final delimiter 242s registers an offense for literals with escaped and other spaces 242s registers an offense for spaces after first delimiter 242s registers an offense for unnecessary spaces 242s accepts multi-line literals within a method 242s accepts literals without additional spaces 242s accepts multi-line literals 242s accepts spaces between entries 242s accepts newlines and additional following alignment spaces 242s accepts literals with escaped spaces 242s with newline in blank percent literals 242s registers and corrects an offense 242s with spaces in blank percent literals 242s registers and corrects an offense 242s with space in blank percent literals 242s registers and corrects an offense 242s for I type and ["[", "]"] delimiters 242s registers an offense for spaces before final delimiter 242s accepts newlines and additional following alignment spaces 242s accepts multi-line literals within a method 242s accepts multi-line literals 242s registers an offense for unnecessary spaces 242s registers an offense for spaces after first delimiter 242s accepts literals with escaped spaces 242s accepts spaces between entries 242s registers an offense for literals with escaped and other spaces 242s accepts literals without additional spaces 242s with newline in blank percent literals 242s registers and corrects an offense 242s with space in blank percent literals 242s registers and corrects an offense 242s with spaces in blank percent literals 242s registers and corrects an offense 242s for w type and ["(", ")"] delimiters 242s accepts newlines and additional following alignment spaces 242s registers an offense for spaces before final delimiter 242s registers an offense for spaces after first delimiter 242s accepts multi-line literals 242s accepts literals with escaped spaces 242s accepts literals without additional spaces 242s registers an offense for literals with escaped and other spaces 242s accepts multi-line literals within a method 242s registers an offense for unnecessary spaces 242s accepts spaces between entries 242s with newline in blank percent literals 242s registers and corrects an offense 242s with spaces in blank percent literals 242s registers and corrects an offense 242s with space in blank percent literals 242s registers and corrects an offense 242s for x type and ["!", "!"] delimiters 242s accepts literals with escaped spaces 242s registers an offense for spaces before final delimiter 242s accepts literals without additional spaces 242s accepts multi-line literals within a method 242s accepts multi-line literals 242s accepts newlines and additional following alignment spaces 242s registers an offense for literals with escaped and other spaces 242s registers an offense for unnecessary spaces 242s registers an offense for spaces after first delimiter 242s accepts spaces between entries 242s with newline in blank percent literals 242s registers and corrects an offense 242s with space in blank percent literals 242s registers and corrects an offense 242s with spaces in blank percent literals 242s registers and corrects an offense 242s for I type and ["{", "}"] delimiters 242s accepts literals with escaped spaces 242s registers an offense for literals with escaped and other spaces 242s accepts spaces between entries 242s accepts multi-line literals within a method 242s registers an offense for spaces before final delimiter 242s accepts newlines and additional following alignment spaces 242s accepts multi-line literals 242s registers an offense for unnecessary spaces 242s accepts literals without additional spaces 242s registers an offense for spaces after first delimiter 242s with spaces in blank percent literals 242s registers and corrects an offense 242s with newline in blank percent literals 242s registers and corrects an offense 242s with space in blank percent literals 242s registers and corrects an offense 242s for x type and ["(", ")"] delimiters 242s accepts spaces between entries 242s registers an offense for spaces before final delimiter 242s accepts multi-line literals 242s accepts literals without additional spaces 242s accepts newlines and additional following alignment spaces 242s registers an offense for literals with escaped and other spaces 242s registers an offense for unnecessary spaces 242s accepts literals with escaped spaces 242s accepts multi-line literals within a method 242s registers an offense for spaces after first delimiter 242s with space in blank percent literals 242s registers and corrects an offense 242s with newline in blank percent literals 242s registers and corrects an offense 242s with spaces in blank percent literals 242s registers and corrects an offense 242s for W type and ["[", "]"] delimiters 242s registers an offense for spaces before final delimiter 242s accepts newlines and additional following alignment spaces 242s registers an offense for unnecessary spaces 242s accepts multi-line literals 242s accepts spaces between entries 242s accepts multi-line literals within a method 242s registers an offense for literals with escaped and other spaces 242s accepts literals without additional spaces 242s registers an offense for spaces after first delimiter 242s accepts literals with escaped spaces 242s with spaces in blank percent literals 242s registers and corrects an offense 242s with newline in blank percent literals 242s registers and corrects an offense 242s with space in blank percent literals 242s registers and corrects an offense 242s for x type and ["{", "}"] delimiters 242s accepts literals with escaped spaces 242s registers an offense for spaces after first delimiter 242s registers an offense for literals with escaped and other spaces 242s accepts multi-line literals within a method 242s registers an offense for spaces before final delimiter 242s accepts spaces between entries 242s accepts literals without additional spaces 242s accepts newlines and additional following alignment spaces 242s accepts multi-line literals 242s registers an offense for unnecessary spaces 242s with spaces in blank percent literals 242s registers and corrects an offense 242s with space in blank percent literals 242s registers and corrects an offense 242s with newline in blank percent literals 242s registers and corrects an offense 242s for W type and ["{", "}"] delimiters 242s accepts literals with escaped spaces 242s registers an offense for spaces before final delimiter 242s registers an offense for unnecessary spaces 242s accepts multi-line literals within a method 242s registers an offense for spaces after first delimiter 242s registers an offense for literals with escaped and other spaces 242s accepts literals without additional spaces 242s accepts spaces between entries 242s accepts newlines and additional following alignment spaces 242s accepts multi-line literals 242s with spaces in blank percent literals 242s registers and corrects an offense 242s with newline in blank percent literals 242s registers and corrects an offense 242s with space in blank percent literals 242s registers and corrects an offense 242s for W type and ["!", "!"] delimiters 242s accepts literals with escaped spaces 242s registers an offense for literals with escaped and other spaces 242s registers an offense for spaces before final delimiter 242s accepts newlines and additional following alignment spaces 242s accepts literals without additional spaces 242s accepts multi-line literals within a method 242s accepts spaces between entries 242s registers an offense for unnecessary spaces 242s accepts multi-line literals 242s registers an offense for spaces after first delimiter 242s with newline in blank percent literals 242s registers and corrects an offense 242s with spaces in blank percent literals 242s registers and corrects an offense 242s with space in blank percent literals 242s registers and corrects an offense 242s for W type and ["(", ")"] delimiters 242s registers an offense for spaces before final delimiter 242s accepts multi-line literals 242s registers an offense for literals with escaped and other spaces 242s accepts newlines and additional following alignment spaces 242s accepts literals with escaped spaces 242s accepts multi-line literals within a method 242s registers an offense for spaces after first delimiter 242s accepts spaces between entries 242s registers an offense for unnecessary spaces 242s accepts literals without additional spaces 242s with newline in blank percent literals 242s registers and corrects an offense 242s with spaces in blank percent literals 242s registers and corrects an offense 242s with space in blank percent literals 242s registers and corrects an offense 242s for i type and ["{", "}"] delimiters 242s accepts multi-line literals 242s registers an offense for unnecessary spaces 242s registers an offense for spaces before final delimiter 242s registers an offense for spaces after first delimiter 242s accepts literals with escaped spaces 242s accepts multi-line literals within a method 242s registers an offense for literals with escaped and other spaces 242s accepts literals without additional spaces 242s accepts newlines and additional following alignment spaces 242s accepts spaces between entries 242s with newline in blank percent literals 242s registers and corrects an offense 242s with spaces in blank percent literals 242s registers and corrects an offense 242s with space in blank percent literals 242s registers and corrects an offense 242s for i type and ["(", ")"] delimiters 242s accepts multi-line literals 242s accepts literals with escaped spaces 242s accepts literals without additional spaces 242s registers an offense for literals with escaped and other spaces 242s registers an offense for spaces after first delimiter 242s accepts spaces between entries 242s accepts newlines and additional following alignment spaces 242s registers an offense for unnecessary spaces 242s registers an offense for spaces before final delimiter 242s accepts multi-line literals within a method 242s with spaces in blank percent literals 242s registers and corrects an offense 242s with space in blank percent literals 242s registers and corrects an offense 242s with newline in blank percent literals 242s registers and corrects an offense 242s for w type and ["!", "!"] delimiters 242s registers an offense for spaces before final delimiter 242s registers an offense for spaces after first delimiter 242s accepts multi-line literals 242s accepts multi-line literals within a method 242s accepts spaces between entries 242s accepts newlines and additional following alignment spaces 242s registers an offense for unnecessary spaces 242s accepts literals without additional spaces 242s accepts literals with escaped spaces 242s registers an offense for literals with escaped and other spaces 242s with newline in blank percent literals 242s registers and corrects an offense 242s with spaces in blank percent literals 242s registers and corrects an offense 242s with space in blank percent literals 242s registers and corrects an offense 242s for I type and ["(", ")"] delimiters 242s accepts multi-line literals within a method 242s accepts multi-line literals 242s registers an offense for unnecessary spaces 242s registers an offense for literals with escaped and other spaces 242s accepts spaces between entries 242s registers an offense for spaces after first delimiter 242s accepts newlines and additional following alignment spaces 242s registers an offense for spaces before final delimiter 242s accepts literals without additional spaces 242s accepts literals with escaped spaces 242s with space in blank percent literals 242s registers and corrects an offense 242s with newline in blank percent literals 242s registers and corrects an offense 242s with spaces in blank percent literals 242s registers and corrects an offense 242s 242s RuboCop::Cop::Layout::CommentIndentation 242s when allow_for_alignment is false 242s registers an offense for comments with extra indentation 242s registers offenses and corrects before __END__ but not after 242s registers an offense and corrects 242s around program structure keywords 242s accepts correctly indented comments 242s with a blank line following the comment 242s accepts a correctly indented comment 242s on outer level 242s accepts a correctly indented comment 242s registers an offense and corrects an incorrectly indented (2) comment 242s registers an offense for each incorrectly indented comment 242s registers an offense and corrects an incorrectly indented (1) comment 242s registers an offense and corrects a documentation comment 242s accepts a comment that follows code 242s near various kinds of brackets 242s is unaffected by closing bracket that does not begin a line 242s accepts correctly indented comments 242s when allow_for_alignment is true 242s registers offenses and corrects before __END__ but not after 242s registers an offense and corrects 242s accepts comments with extra indentation if aligned with comment on previous line 242s on outer level 242s registers an offense and corrects an incorrectly indented (1) comment 242s registers an offense and corrects an incorrectly indented (2) comment 242s accepts a correctly indented comment 242s registers an offense for each incorrectly indented comment 242s accepts a comment that follows code 242s registers an offense and corrects a documentation comment 243s near various kinds of brackets 243s accepts correctly indented comments 243s is unaffected by closing bracket that does not begin a line 243s around program structure keywords 243s accepts correctly indented comments 243s with a blank line following the comment 243s accepts a correctly indented comment 243s 243s RuboCop::Config 243s #for_department 243s accepts a Symbol 243s always returns the department's config 243s #for_badge 243s takes into account the department 243s works if department has no config 243s whether the cop is enabled 243s when an nested cop department is disabled 243s and an individual cop is not specified 243s the cop setting overrides the department 243s but an individual cop is enabled 243s the cop setting overrides the department 243s when an entire cop department is disabled 243s but an individual cop is enabled 243s the cop setting overrides the department 243s when configuration has no mention of a cop 243s enables the cop that is not mentioned 243s when all cops are explicitly enabled by default 243s enables the cop that is not mentioned 243s when all cops are disabled by default 243s disables the cop that is not mentioned 243s when a cop has configuration but no explicit Enabled setting 243s enables the cop by default 243s when an entire cop department is enabled 243s but an individual cop is disabled 243s still disables the cop 243s #make_excludes_absolute 243s when config is in root directory 243s generates valid absolute directory 243s when config is in subdirectory 243s generates valid absolute directory 243s #possibly_include_hidden? 243s returns true when Include config includes a regex 243s returns true when Include config includes a dotfile in a path 243s returns true when Include config includes a toplevel dotfile 243s returns true when Include config only includes regular paths 243s #deprecation_check 243s when there is no AllCops configuration 243s does not yield 243s when there is AllCops configuration 243s if there are no Excludes or Includes keys 243s does not yield 243s if there are is an Includes key 243s yields 243s if there are is an Excludes key 243s yields 243s #validate 243s when the configuration includes an obsolete parameter 243s raises validation error 243s when the configuration includes multiple valid enforced styles 243s does not raise validation error 243s when the configuration includes a valid enforced style 243s does not raise validation error 243s when the configuration includes the obsolete Style/WhileUntilModifier: MaxLineLength parameter 243s raises validation error 243s when the configuration includes the obsolete Style/IfUnlessModifier: MaxLineLength parameter 243s raises validation error 243s when the configuration includes multiple but config does not allow 243s raises validation error 243s when the configuration includes a valid EnforcedStyle 243s does not raise validation error 243s when all cops are both Enabled and Disabled by default 243s raises validation error 243s when the configuration includes an invalid EnforcedStyle 243s raises validation error 243s when the configuration includes Lint/Syntax cop 243s when the configuration does not match the default 243s raises validation error 243s when the configuration matches the default 243s does not raise validation error 243s when the empty section is AllCops 243s raises validation error 243s when the configuration includes any unrecognized cop name 243s raises an validation error 243s conflicting Safe settings 243s when the configuration includes an unsafe cop that is explicitly declared to have a safe autocorrection 243s raises validation error 243s when the configuration includes an unsafe cop without a declaration of its autocorrection 243s does not raise validation error 243s when the configuration includes any unrecognized parameter 243s prints a warning message 243s when the configuration includes multiple valid enforced styles and one invalid style 243s raises validation error 243s when the configuration includes an empty section 243s raises validation error 243s when the configuration includes any unrecognized cop name and given `--ignore-unrecognized-cops` option 243s there are no unrecognized cops 243s does not print any warnings 243s there is unrecognized cop 243s prints a warning about the cop 243s when the configuration includes any common parameter 243s does not raise validation error 243s when the configuration includes obsolete parameters and cops 243s raises validation error 243s when the configuration includes an obsolete EnforcedStyle parameter 243s raises validation error 243s when the configuration includes multiple invalid enforced styles 243s raises validation error 243s when the configuration includes an obsolete cop 243s raises validation error 243s when the configuration includes an invalid enforced style 243s raises validation error 243s when the configuration is in the base RuboCop config folder 243s is not validated 243s #allowed_camel_case_file? 243s when the passed path matches allowed camel case patterns to include 243s is expected to equal true 243s when the passed path is a gemspec 243s is expected to equal true 243s when the passed path does not match allowed camel case patterns to include 243s is expected to equal false 243s #file_to_include? 243s when the passed path does not match any of patterns to include 243s returns false 243s when the passed path matches any of patterns to include 243s returns true 243s #patterns_to_include 243s when config file has AllCops => Include key 243s returns the Include value 243s #check 243s when a deprecated configuration is detected 243s prints a warning message for the loaded path 243s #file_to_exclude? 243s when the passed path does not match any of patterns to exclude 243s returns false 243s when the passed path matches any of patterns to exclude 243s returns true 243s #patterns_to_exclude 243s when config file has AllCops => Exclude key 243s returns the Exclude value 243s 243s RuboCop::Cop::Style::SelectByRegexp 243s with select 243s does not register an offense when the block has multiple expressions 243s registers an offense and corrects when there is no explicit regexp 243s does not register an offense when the receiver is `Hash.new` 243s registers an offense and corrects when the receiver is a range 243s does not register an offense when the receiver is a hash literal 243s registers an offense and corrects for `blockvar =~ lvar` 243s does not register an offense when the block arity is not 1 243s registers an offense and corrects when the receiver is an array 243s does not register an offense when the receiver is `ENV` 243s does not register an offense when there is no block 243s does not register an offense when given a proc 243s registers an offense and corrects for `Regexp#match?` 243s registers an offense and corrects for `lvar =~ blockvar` 243s does not register an offense when the receiver is `to_hash` 243s does not register an offense when the receiver is `Hash[]` 243s does not register an offense when the block does not match a regexp 243s registers an offense if `to_h` is in the receiver chain but not the actual receiver 243s registers an offense and corrects without a receiver 243s registers an offense and corrects for `match?` 243s does not register an offense when the block uses an external variable in a regexp match 243s registers an offense and corrects for `regexp =~ blockvar` 243s does not register an offense when the block param is a method argument 243s registers an offense and corrects with a multiline block 243s registers an offense and corrects for `blockvar =~ regexp` 243s registers an offense and corrects when the receiver is a set 243s does not register an offense when the receiver is `to_h` 243s with `numblock`s 243s registers an offense and corrects for `blockvar =~ regexp` 243s does not register an offense when using `match?` without a receiver 243s registers an offense and corrects for `match?` 243s registers an offense and corrects for `Regexp#match?` 243s does not register an offense if there is more than one numbered param 243s does not register an offense when the param is a method argument 243s registers an offense and corrects for `regexp =~ blockvar` 243s with reject 243s registers an offense and corrects for `Regexp#match?` 243s registers an offense and corrects for `regexp =~ blockvar` 243s does not register an offense when the receiver is `to_h` 243s registers an offense and corrects when the receiver is a range 243s registers an offense and corrects for `lvar =~ blockvar` 243s registers an offense and corrects when the receiver is a set 243s does not register an offense when the receiver is `to_hash` 243s does not register an offense when the receiver is `Hash.new` 243s does not register an offense when there is no block 243s registers an offense and corrects without a receiver 243s does not register an offense when the block arity is not 1 243s does not register an offense when the block has multiple expressions 243s does not register an offense when the receiver is a hash literal 243s does not register an offense when the receiver is `Hash[]` 243s registers an offense and corrects when there is no explicit regexp 243s does not register an offense when given a proc 243s registers an offense and corrects for `match?` 243s registers an offense and corrects with a multiline block 243s does not register an offense when the block does not match a regexp 243s registers an offense if `to_h` is in the receiver chain but not the actual receiver 243s registers an offense and corrects when the receiver is an array 243s does not register an offense when the block uses an external variable in a regexp match 243s does not register an offense when the receiver is `ENV` 243s does not register an offense when the block param is a method argument 243s registers an offense and corrects for `blockvar =~ lvar` 243s registers an offense and corrects for `blockvar =~ regexp` 243s with `numblock`s 243s registers an offense and corrects for `Regexp#match?` 243s does not register an offense if there is more than one numbered param 243s registers an offense and corrects for `match?` 243s does not register an offense when the param is a method argument 243s registers an offense and corrects for `regexp =~ blockvar` 243s registers an offense and corrects for `blockvar =~ regexp` 243s does not register an offense when using `match?` without a receiver 243s with find_all 243s registers an offense and corrects when the receiver is a set 243s does not register an offense when the receiver is `ENV` 243s does not register an offense when given a proc 243s registers an offense and corrects for `lvar =~ blockvar` 243s does not register an offense when the receiver is `Hash[]` 243s registers an offense and corrects when the receiver is an array 243s does not register an offense when the receiver is `to_hash` 243s registers an offense and corrects for `blockvar =~ lvar` 243s registers an offense if `to_h` is in the receiver chain but not the actual receiver 243s does not register an offense when the block param is a method argument 243s registers an offense and corrects when there is no explicit regexp 243s does not register an offense when the block arity is not 1 243s registers an offense and corrects for `Regexp#match?` 243s registers an offense and corrects for `regexp =~ blockvar` 243s registers an offense and corrects without a receiver 243s does not register an offense when there is no block 243s registers an offense and corrects for `blockvar =~ regexp` 243s registers an offense and corrects with a multiline block 243s registers an offense and corrects when the receiver is a range 243s does not register an offense when the receiver is `to_h` 243s does not register an offense when the receiver is a hash literal 243s does not register an offense when the block has multiple expressions 243s does not register an offense when the block uses an external variable in a regexp match 243s registers an offense and corrects for `match?` 243s does not register an offense when the block does not match a regexp 243s does not register an offense when the receiver is `Hash.new` 243s with `numblock`s 243s registers an offense and corrects for `regexp =~ blockvar` 243s registers an offense and corrects for `Regexp#match?` 243s does not register an offense if there is more than one numbered param 243s does not register an offense when the param is a method argument 243s registers an offense and corrects for `blockvar =~ regexp` 243s registers an offense and corrects for `match?` 243s does not register an offense when using `match?` without a receiver 243s 243s RuboCop::Cop::Lint::DuplicateMagicComment 243s registers an offense when frozen magic comments are duplicated 243s registers an offense when same encoding magic comments are duplicated 243s registers an offense when encoding and frozen magic comments are duplicated 243s does not register an offense when encoding and frozen magic comments are not duplicated 243s does not register an offense when frozen magic comments are not duplicated 243s does not register an offense when encoding magic comments are not duplicated 243s registers an offense when different encoding magic comments are duplicated 243s 243s RuboCop::Cop::Lint::NextWithoutAccumulator 243s behaves like reduce/inject 243s given a inject block 243s registers an offense for a bare next 243s accepts next with a value 243s accepts next within a nested block 243s Ruby 2.7 243s registers an offense for a bare next 243s behaves like reduce/inject 243s given a reduce block 243s registers an offense for a bare next 243s accepts next within a nested block 243s accepts next with a value 243s Ruby 2.7 243s registers an offense for a bare next 243s given an unrelated block 243s accepts next with a value 243s accepts a bare next 243s 243s RuboCop::Cop::Style::OptionHash 243s registers an offense 243s when passing options hash to super 243s does not register an offense when call to super is in a nested block 243s does not register an offense 243s does not register an offense when code exists before call to super 243s permitted list 243s ignores if the method is permitted 243s when the last argument is a non-options-hash optional hash 243s does not register an offense 243s when the last argument is an options hash named something else 243s does not register an offense 243s when the argument name is in the list of suspicious names 243s registers an offense 243s when there are no arguments 243s does not register an offense 243s 243s RuboCop::Cop::Layout::TrailingEmptyLines 243s when EnforcedStyle is final_newline 243s accepts final newline 243s accepts an empty file 243s registers an offense for multiple blank lines in an empty file 243s registers an offense for no final newline after block comment 243s accepts final blank lines if they come after __END__ 243s autocorrects even if some lines have space 243s registers an offense for no final newline after assignment 243s accepts final blank lines if they come after __END__ in empty file 243s registers an offense for multiple trailing blank lines 243s when EnforcedStyle is final_blank_line 243s registers an offense for multiple blank lines in an empty file 243s registers an offense for multiple trailing blank lines 243s accepts final blank line 243s autocorrects missing newline 243s registers an offense for final newline 243s registers an offense for no final newline 243s autocorrects missing blank line 243s 243s RuboCop::Cop::Lint::RedundantWithObject 243s registers an offense and corrects when using ary.each_with_object([]) do-end block 243s registers an offense and corrects when using ary.each_with_object do-end block without parentheses 243s registers an offense and corrects when using `ary.each_with_object { |v| v }` 243s registers an offense and corrects when using `ary.each.with_object([]) { |v| v }` 243s an object is used as a block argument 243s Ruby 2.7 243s registers an offense and corrects when using `ary.each.with_object([]) { _1 }` 243s registers an offense and corrects when using `ary.each_with_object { _1 }` 243s when missing argument to `each_with_object` 243s does not register an offense when block has 2 arguments 243s does not register an offense when block has 1 argument 243s 243s RuboCop::Cop::Lint::EmptyConditionalBody 243s does not register an offense for missing `if` body with a comment 243s does not register an offense for missing `unless` body with a comment 243s registers an offense for missing `if` body with `elsif` 243s registers an offense for missing `unless` body 243s registers an offense for missing `if` body with present `else` body 243s registers an offense for missing `if` and `else` body 243s does not register an offense for missing `elsif` body with a comment 243s registers an offense for missing `if` body with `else` 243s registers an offense for missing second `elsif` body without an inline comment 243s registers an offense for missing `elsif` body that is not the one with a comment 244s registers an offense for missing `if` body 244s does not register an offense for missing `elsif` body with an inline comment 244s registers an offense for missing `unless` body with `else` 244s registers an offense for missing all branches of `if` and `elsif` body 244s registers an offense for missing `if` and `else` body with some indentation 244s registers an offense for missing `elsif` body 244s registers an offense for missing `unless` and `else` body 244s registers an offense for missing all branches of `if` and multiple `elsif` body 244s autocorrects properly when the if is assigned to a variable 244s registers an offense for missing `if` and `elsif` body 244s when AllowComments is false 244s registers an offense for missing `if` body with a comment 244s registers an offense for missing `elsif` body with a comment 244s registers an offense for missing `unless` body with a comment 244s 244s RuboCop::Cop::Naming::ConstantName 244s registers 1 offense if rhs is offending const assignment 244s registers an offense for camel case in const namewhen using frozen range assignment 244s does not check names if rhs is a `Struct.new` 244s checks qualified const names 244s does not check names if rhs is a `Class.new` with conditional assign 244s does not check names if rhs is a method call with block 244s does not check names if rhs is a `Struct.new` with conditional assign 244s allows screaming snake case with POSIX upper case characters 244s registers an offense for camel case in const name 244s registers offenses for camel case in multiple const assignment 244s registers an offense for non-POSIX upper case in const name 244s does not check if rhs is a non-offensive const assignment 244s does not check names if rhs is a method call 244s registers an offense for snake case in const name 244s allows screaming snake case in const name 244s does not check names if rhs is a method call with conditional assign 244s does not check if rhs is another constant 244s registers an offense for camel case in const namewhen using frozen object assignment 244s allows screaming snake case in multiple const assignment 244s does not check names if rhs is a `Class.new` 244s when a rhs is a conditional expression 244s when conditional branches contain only constants 244s does not check names 244s when conditional branches contain a value other than a constant 244s does not check names 244s when conditional branches contain only string values 244s registers an offense 244s 244s RuboCop::Cop::Style::EvalWithLocation 244s does not register an offense if `eval` is called on another object 244s registers an offense when using `#eval` with a heredoc and an incorrect line number 244s accepts `eval` with a code that is a variable 244s registers an offense when using `::Kernel.eval` without any arguments 244s registers an offense when using `module_eval` with improper arguments 244s registers an offense when using `#instance_eval` without any arguments 244s registers an offense when using `#eval` without lineno 244s registers an offense when using `#eval` with `binding` only 244s accepts `eval` with a heredoc, a filename and `__LINE__ + 1` 244s registers an offense when using `#class_eval` with an incorrect lineno 244s registers an offense when using `instance_eval` with improper arguments 244s registers an offense when using correct file argument but incorrect line 244s registers an offense when using `#module_eval` without any arguments 244s registers an offense when using `#instance_eval` with a string argument in parentheses 244s accepts `eval` with a string, a filename and `__LINE__` on a new line 244s registers an offense when using `#class_eval` without any arguments 244s accepts `eval` with a string, a filename and `__LINE__` 244s registers an offense when using `class_eval` with improper arguments 244s registers an offense when using `#eval` with a string on a new line 244s registers an offense when using `eval` with improper arguments 244s registers an offense when using `#eval` with an incorrect line number 244s does not register an offense when using eval with block argument 244s registers an offense when using `#eval` without any arguments 244s registers an offense when using `Kernel.eval` without any arguments 244s 244s RuboCop::Cop::Style::EvenOdd 244s converts (x._(y)) % 2 != 1 to even? 244s converts (x(y) % 2) != 1 to #even? 244s converts (x.y % 2) != 1 to #even? 244s converts x % 2 == 0 to #even? 244s converts (x._(y) % 2) != 1 to even? 244s converts (y % 2) != 1 to #even? 244s converts (x % 2) == 1 to #odd? 244s accepts x % 3 != 0 244s converts (x % 2) == 0 to #even? 244s converts x % 2 != 1 to #even? 244s accepts x % 2 == 2 244s converts (x % 2) != 0 to #odd? 244s accepts x % 3 == 0 244s converts 1 % 2 != 1 to even? 244s converts x._(y) % 2 != 1 to even? 244s converts x % 2 == 1 to #odd? 244s converts x % 2 != 0 to #odd? 244s converts complex examples 244s 244s RuboCop::Cop::Lint::AmbiguousRange 244s for an erange 244s does not register an offense if the range is composed of literals 244s does not register an offense if the range is parenthesized 244s can handle an endless range 244s registers an offense and corrects when one side is parenthesized but the other is not 244s can handle a beginningless range 244s does not register an offense for a variable 244s registers an offense and corrects when the entire range is parenthesized but contains complex boundaries 244s registers an offense and corrects when there are clauses on both sides 244s does not register an offense for `self` 244s does not register an offense for a constant 244s registers an offense and corrects when not parenthesized 244s method calls 244s with RequireParenthesesForMethodChains: false 244s does not register an offense for a chained method call without parens 244s does not register an offense for a chained method call with parens 244s behaves like common behavior 244s does not register an offense for a non-chained method call 244s does not register an offense for a unary + 244s requires parens when calling a method on a basic literal 244s does not register an offense for a unary - 244s with RequireParenthesesForMethodChains: true 244s does not register an offense for a chained method call with parens 244s registers an offense for a chained method call without parens 244s behaves like common behavior 244s does not register an offense for a unary - 244s does not register an offense for a non-chained method call 244s does not register an offense for a unary + 244s requires parens when calling a method on a basic literal 244s for an irange 244s does not register an offense for a variable 244s registers an offense and corrects when the entire range is parenthesized but contains complex boundaries 244s can handle a beginningless range 244s does not register an offense if the range is composed of literals 244s registers an offense and corrects when there are clauses on both sides 244s registers an offense and corrects when not parenthesized 244s does not register an offense for `self` 244s does not register an offense if the range is parenthesized 244s registers an offense and corrects when one side is parenthesized but the other is not 244s can handle an endless range 244s does not register an offense for a constant 244s method calls 244s with RequireParenthesesForMethodChains: false 244s does not register an offense for a chained method call with parens 244s does not register an offense for a chained method call without parens 244s behaves like common behavior 244s does not register an offense for a unary - 244s does not register an offense for a unary + 244s does not register an offense for a non-chained method call 244s requires parens when calling a method on a basic literal 244s with RequireParenthesesForMethodChains: true 244s registers an offense for a chained method call without parens 244s does not register an offense for a chained method call with parens 244s behaves like common behavior 244s requires parens when calling a method on a basic literal 244s does not register an offense for a unary - 244s does not register an offense for a unary + 244s does not register an offense for a non-chained method call 244s 244s RuboCop::Cop::Lint::RescueType 244s accepts rescuing nothing 244s accepts rescue modifier 244s accepts rescuing a single exception 244s accepts rescuing nothing within a method definition 244s behaves like offenses 244s begin rescue 244s rescuing from 0 244s registers an offense and autocorrects 244s rescuing from 0 before another exception 244s registers an offense and autocorrects 244s rescuing from 0 after another exception 244s registers an offense and autocorrects 244s begin rescue ensure 244s rescuing from 0 244s registers an offense and autocorrects 244s def rescue 244s rescuing from 0 244s registers an offense and autocorrects 244s def rescue ensure 244s rescuing from 0 244s registers an offense and autocorrects 244s behaves like offenses 244s begin rescue ensure 244s rescuing from "#{string}" 244s registers an offense and autocorrects 244s def rescue ensure 244s rescuing from "#{string}" 244s registers an offense and autocorrects 244s def rescue 244s rescuing from "#{string}" 244s registers an offense and autocorrects 244s begin rescue 244s rescuing from "#{string}" before another exception 244s registers an offense and autocorrects 244s rescuing from "#{string}" after another exception 244s registers an offense and autocorrects 244s rescuing from "#{string}" 244s registers an offense and autocorrects 244s behaves like offenses 244s begin rescue ensure 244s rescuing from 0.0 244s registers an offense and autocorrects 244s begin rescue 244s rescuing from 0.0 after another exception 244s registers an offense and autocorrects 244s rescuing from 0.0 before another exception 244s registers an offense and autocorrects 244s rescuing from 0.0 244s registers an offense and autocorrects 244s def rescue 244s rescuing from 0.0 244s registers an offense and autocorrects 244s def rescue ensure 244s rescuing from 0.0 244s registers an offense and autocorrects 244s behaves like offenses 244s begin rescue 244s rescuing from 'string' 244s registers an offense and autocorrects 244s rescuing from 'string' before another exception 244s registers an offense and autocorrects 244s rescuing from 'string' after another exception 244s registers an offense and autocorrects 244s def rescue ensure 244s rescuing from 'string' 244s registers an offense and autocorrects 244s def rescue 244s rescuing from 'string' 244s registers an offense and autocorrects 244s begin rescue ensure 244s rescuing from 'string' 244s registers an offense and autocorrects 244s behaves like offenses 244s begin rescue ensure 244s rescuing from nil 244s registers an offense and autocorrects 244s begin rescue 244s rescuing from nil after another exception 244s registers an offense and autocorrects 244s rescuing from nil 244s registers an offense and autocorrects 244s rescuing from nil before another exception 244s registers an offense and autocorrects 244s def rescue 244s rescuing from nil 244s registers an offense and autocorrects 244s def rescue ensure 244s rescuing from nil 244s registers an offense and autocorrects 244s behaves like offenses 244s begin rescue ensure 244s rescuing from [] 244s registers an offense and autocorrects 244s begin rescue 244s rescuing from [] 244s registers an offense and autocorrects 244s rescuing from [] before another exception 244s registers an offense and autocorrects 244s rescuing from [] after another exception 244s registers an offense and autocorrects 244s def rescue ensure 244s rescuing from [] 244s registers an offense and autocorrects 244s def rescue 244s rescuing from [] 244s registers an offense and autocorrects 244s behaves like offenses 244s begin rescue 244s rescuing from {} 244s registers an offense and autocorrects 244s rescuing from {} after another exception 244s registers an offense and autocorrects 244s rescuing from {} before another exception 244s registers an offense and autocorrects 244s def rescue ensure 244s rescuing from {} 244s registers an offense and autocorrects 244s def rescue 244s rescuing from {} 244s registers an offense and autocorrects 244s begin rescue ensure 244s rescuing from {} 244s registers an offense and autocorrects 244s behaves like offenses 244s def rescue ensure 244s rescuing from :symbol 244s registers an offense and autocorrects 244s def rescue 244s rescuing from :symbol 244s registers an offense and autocorrects 244s begin rescue ensure 244s rescuing from :symbol 244s registers an offense and autocorrects 244s begin rescue 244s rescuing from :symbol 244s registers an offense and autocorrects 244s rescuing from :symbol after another exception 244s registers an offense and autocorrects 244s rescuing from :symbol before another exception 244s registers an offense and autocorrects 244s 244s RuboCop::Cop::Style::CharacterLiteral 244s registers an offense for literals like \n 244s accepts literals like ?\C-\M-d 244s registers an offense for character literals 244s autocorrects ?' to "'" 244s accepts ? in a %w literal 244s 244s RuboCop::Cop::Style::IpAddresses 244s does not register an offense on an empty string 244s IPv6 244s registers an offense for the loopback address 244s registers an offense for an address with 0s collapsed 244s registers an offense for a very short address 244s registers an offense for a valid address 244s does not register an offense for an invalid address 244s registers an offense for a shortened address 244s the unspecified address :: (shortform of 0:0:0:0:0:0:0:0) 244s does not register an offense 244s when it is removed from the allowed addresses 244s registers an offense 244s IPv4 244s does not register an offense for an invalid address 244s does not register an offense for an address inside larger text 244s registers an offense for a valid address 244s with allowed addresses 244s does not register an offense for a allowed addresses 244s does not register an offense if the case differs 244s 244s RuboCop::Cop::Style::ClassVars 244s does not register an offense for class variable usage 244s registers an offense for class variable declaration 244s registers an offense for class variable set on class receiver 244s registers an offense for class variable set in class 244s 244s RuboCop::Cop::Style::KeywordParametersOrder 244s registers an offense and corrects when multiple `kwoptarg`s are interleaved with `kwarg`s 244s registers an offense and corrects when multiple `kwoptarg`s are interleaved with `kwarg`sand last argument is `blockarg` and argument parentheses omitted 244s registers an offense and corrects when multiple `kwoptarg` are before `kwarg` and argument parentheses omitted 244s registers an offense and corrects when `kwoptarg` is before `kwarg` 244s does not register an offense when there are no `kwoptarg`s before `kwarg`s 244s registers an offense and corrects when `kwoptarg` is before `kwarg` and argument parentheses omitted 244s registers an offense and corrects when multiple `kwoptarg`s are interleaved with `kwarg`sand last argument is `kwrestarg` and argument parentheses omitted 244s when using block keyword parameters 244s does not register an offense when there are no `kwoptarg`s before `kwarg`s 244s registers an offense and corrects when `kwoptarg` is before `kwarg` 244s 244s RuboCop::Cop::Lint::InheritException 244s when class inherits from `Exception` 244s with enforced style set to `runtime_error` 244s registers an offense and corrects 244s when creating a subclass using Class.new 244s registers an offense and corrects 244s when inheriting a standard lib exception class that is not a subclass of `StandardError` 244s does not register an offense 244s with enforced style set to `standard_error` 244s registers an offense and corrects 244s when inheriting a standard lib exception class that is not a subclass of `StandardError` 244s does not register an offense 244s when creating a subclass using Class.new 244s registers an offense and corrects 244s 244s RuboCop::Cop::Layout::DotPosition 244s Trailing dots style 244s does not err on method call without a method name 244s does not err on method call with multi-line arguments 244s registers an offense for leading dot in multi-line call 244s does not err on method call with no dots 244s does not get confused by several lines of chained methods 244s accepts trailing dot in multi-line method call 244s does not err on method call on same line 244s when using safe navigation operator 244s registers an offense for correct + opposite 244s accepts trailing dot in multi-line method call 244s when there is a heredoc with a following method 244s does not register an offense for a heredoc 244s when the receiver has a heredoc argument 244s with another method on the same line 244s does not register an offense 244s as the first argument 244s registers an offense 244s with multiple heredocs 244s registers an offense 244s with a dynamic heredoc 244s registers an offense 244s as the last argument 244s registers an offense 244s when the receiver is a heredoc 244s registers an offense 244s Leading dots style 244s accepts leading do in multi-line method call 244s does not err on method call with no dots 244s does not err on method call on same line 244s registers an offense for correct + opposite 244s registers an offense for only dot line 244s registers an offense for trailing dot in multi-line call 244s does not err on method call without a method name 244s when the receiver has a heredoc argument 244s with another method on the same line 244s does not register an offense 244s as the last argument 244s registers an offense 244s with a dynamic heredoc 244s registers an offense 244s with multiple heredocs 244s registers an offense 244s as the first argument 244s registers an offense 244s when there is an intervening line comment 244s does not register offense 244s when there is an intervening blank line 244s does not register offense 244s when a method spans multiple lines 244s registers an offense 244s with multiple offenses 244s registers all of them 244s when using safe navigation operator 244s accepts leading do in multi-line method call 244s registers an offense for correct + opposite 244s when the receiver is a heredoc 244s registers an offense 244s 244s RuboCop::Cop::InternalAffairs::EmptyLineBetweenExpectOffenseAndCorrection 244s registers and corrects an offense when using no empty line between `expect_offense` and `expect_correction`with variable argument 244s does not register an offense when using only `expect_offense` 244s does not register an offense when using empty line between `expect_offense` and `expect_correction` with heredoc argument 244s registers and corrects an offense when using no empty line between `expect_offense` and `expect_no_corrections` 244s registers and corrects an offense when using no empty line between `expect_offense` and `expect_correction` with heredoc argument 244s does not register an offense when using empty line between `expect_offense` and `expect_no_corrections` 244s does not register an offense when using empty line between `expect_offense` and `expect_correction`with variable argument 244s 244s RuboCop::Cop::Style::NegatedIfElseCondition 244s registers an offense and corrects nested `if-else` with negated condition 244s does not register an offense when both branches are empty 244s moves comments to correct branches during autocorrect 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 the `else` branch is empty 244s does not register an offense when negating condition for `if-elsif` 244s registers an offense and corrects when negating condition with `!` for `if-else` 244s correctly moves comments at the end of branches 244s works with comments when neither branch is a begin node 244s works with duplicate nodes 244s registers an offense and corrects when negating condition with `not` for ternary 244s works with comments and multiple statements 244s does not register an offense when only part of the condition is negated 244s registers an offense and corrects a multiline ternary 244s does not register an offense when `if` with `!!` condition 244s does not register an offense when `if` with negated condition has no `else` branch 244s works with comments when one branch is a begin and the other is not 244s behaves like negation method 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 `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 `!=` 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 parentheses for ternary 244s behaves like negation method 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 `!~` for ternary 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 `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 244s RuboCop::Cop::Style::SwapValues 244s does not register an offense when idiomatically swapping variables 244s does not register an offense when assigning receiver object at `def` 244s does not register an offense when almost swapping variables 244s handles comments when correcting 244s behaves like verbosely swapping 244s registers an offense and corrects when verbosely swapping global variables 244s behaves like verbosely swapping 244s registers an offense and corrects when verbosely swapping mixed variables 244s behaves like verbosely swapping 244s registers an offense and corrects when verbosely swapping instance variables 244s behaves like verbosely swapping 244s registers an offense and corrects when verbosely swapping class variables 244s behaves like verbosely swapping 244s registers an offense and corrects when verbosely swapping constant with namespaces variables 244s behaves like verbosely swapping 244s registers an offense and corrects when verbosely swapping constant variables 244s behaves like verbosely swapping 244s registers an offense and corrects when verbosely swapping local variables 244s 244s RuboCop::Cop::Lint::ConstantOverwrittenInRescue 244s registers an offense when overriding an exception with an exception result 244s does not register an offense when using `=>` but correctly assigning to variables 244s does not register an offense when not overriding an exception with an exception result 244s 244s RuboCop::CLI --auto-gen-config 244s --auto-gen-config 245s generates EnforcedStyle parameter if it solves all offenses 245s includes --auto-gen-only-exclude in the command comment when given 245s can generate Exclude properties with a given limit 245s overwrites an existing todo file 245s can be called when there are no files to inspection 245s generates Exclude if no EnforcedStyle solves all offenses 246s does not include a timestamp when --no-auto-gen-timestamp is used 246s can generate a todo list 246s generates a todo list that removes the reports 246s does not include offense counts when --no-offense-counts is used 246s generates Exclude instead of Max when --auto-gen-only-exclude is used 247s honors rubocop:disable comments 247s does not generate configuration for the Syntax cop 247s when .rubocop.yml does not exist 247s bases other cops' configuration on the code base's current maximum line length 247s when .rubocop.yml inherits only from .rubocop_todo.yml 247s bases other cops' configuration on the code base's current maximum line length 247s when duplicated default configuration parameter 247s parameters are displayed without duplication 247s when .rubocop.yml inherits from two other files 248s bases other cops' configuration on the code base's current maximum line length 248s when .rubocop.yml is empty 248s bases other cops' configuration on the code base's current maximum line length 248s with Layout/LineLength:Max overridden 248s when .rubocop.yml has Layout/LineLength disabled 248s skips the cop from both phases of the run 248s when .rubocop.yml has Layout/LineLength:Max less than code base max 248s bases other cops' configuration on the overridden LineLength:Max 248s when .rubocop.yml has Layout/LineLength:Max more than code base max 248s bases other cops' configuration on the overridden LineLength:Max 248s when .rubocop.yml doesn't inherit 249s bases other cops' configuration on the code base's current maximum line length 249s when working with a cop who do not support autocorrection 249s can generate a todo list 249s when working in a subdirectory 249s can generate a todo list 249s when .rubocop.yml inherits from another file 249s bases other cops' configuration on the code base's current maximum line length 249s for existing configuration with Exclude 251s leaves out Excludes that appear in .rubocop.yml but are merged for the cop 251s generates Excludes that appear in .rubocop.yml 253s leaves out Excludes that appear in .rubocop.yml but are merged globally 253s when --no-exclude-limit is given 253s always prefers Exclude to Enabled 253s when hash value omission enabled 254s generates Exclude if it solves all offenses 254s when --config is used 254s can generate a todo list if default .rubocop.yml exists 254s can generate a todo list 254s when existing config file has a YAML document start header 254s inserts `inherit_from` key after hearder 254s when cop is not safe to autocorrect 254s can generate a todo list, with the appropriate flag 254s console output 254s displays report summary but no offenses 254s when .rubocop.yml inherits from another file and .rubocop_todo.yml 255s bases other cops' configuration on the code base's current maximum line length 255s when .rubocop.yml inherits only from .rubocop_todo.yml in an array 255s bases other cops' configuration on the code base's current maximum line length 255s when inheriting from a URL 255s when there are multiple entries 255s can generate a todo list 255s when there is a single entry 255s can generate a todo list 255s when different styles appear in different files 255s disables cop if --exclude-limit is exceeded 256s generates Exclude list if --exclude-limit is not exceeded 256s 256s RuboCop::Cop::Style::TopLevelMethodDefinition 256s registers an offense when defining a top-level method after a class definition 256s does not register an offense when using module 256s does not register an offense when just called method on top-level 256s does not register an offense when using Struct 256s does not register an offense when define_method is not top-level 256s does not register an offense when using class 256s registers an offense top-level methods 256s registers an offense top-level class methods 256s does not register an offense when defined within arbitrary block 256s top-level define_method 256s registers offense for multi-line block 256s registers offense for proc argument 256s registers offense with inline block 256s Ruby >= 2.7 256s registers offense with inline numblock 256s 256s RuboCop::Cop::Style::Attr 256s accepts attr when it does not take arguments 256s accepts attr when it has a receiver 256s does not register offense for custom `attr` method 256s registers an offense attr 256s registers offense for attr within module_eval 256s registers offense for attr within class_eval 256s autocorrects 256s attr with multiple names to attr_reader 256s attr :name, true to attr_accessor :name 256s attr to attr_reader 256s attr, false to attr_reader 256s 256s RuboCop::Cop::EnforceSuperclass 256s registers an offense for top-level constant ::Class.new definition 256s registers an offense for models that subclass ActiveRecord::Base 256s registers an offense for model defined using top-level 256s registers an offense for single-line definitions 256s registers an offense for models that subclass ::ActiveRecord::Base 256s registers an offense for Class.new definition 256s when ApplicationRecord subclasses ActiveRecord::Base 256s behaves like no offense 256s registers no offenses for `::ApplicationRecord = Class.new(ActiveRecord::Base) do; end 256s ` 256s behaves like no offense 256s registers no offenses for `::ApplicationRecord = ::Class.new(::ActiveRecord::Base) 256s ` 256s behaves like no offense 256s registers no offenses for `::ApplicationRecord = ::Class.new(::ActiveRecord::Base) do; end 256s ` 256s behaves like no offense 256s registers no offenses for `ApplicationRecord = Class.new(ActiveRecord::Base) 256s ` 256s behaves like no offense 256s registers no offenses for `ApplicationRecord = Class.new(::ActiveRecord::Base) do; end 256s ` 256s behaves like no offense 256s registers no offenses for `ApplicationRecord = Class.new(ActiveRecord::Base) do; end 256s ` 256s behaves like no offense 256s registers no offenses for `class ::ApplicationRecord < ActiveRecord::Base; end` 256s behaves like no offense 256s registers no offenses for `class ApplicationRecord < ActiveRecord::Base; end` 256s when MyModel subclasses ApplicationRecord 256s behaves like no offense 256s registers no offenses for `class MyModel < ::ApplicationRecord; end` 256s behaves like no offense 256s registers no offenses for `class MyModel < ApplicationRecord; end` 256s behaves like no offense 256s registers no offenses for `MyModel = Class.new(ApplicationRecord) do 256s end 256s MyModel = Class.new(ApplicationRecord) 256s ` 256s behaves like no offense 256s registers no offenses for `MyModel = ::Class.new(::ApplicationRecord) do 256s end 256s MyModel = ::Class.new(::ApplicationRecord) 256s ` 256s 256s RuboCop::Cop::Lint::EmptyEnsure 256s registers an offense and corrects empty ensure 256s does not register an offense for non-empty ensure 256s 256s RuboCop::Cop::Style::InverseMethods 256s registers an offense for !(foo =~ bar) 256s allows a method call without a not 256s registers an offense for not (foo > bar) 256s registers an offense for !foo.present? 256s registers an offense for !foo.none? 256s registers an offense for !foo.even? 256s registers an offense for !foo.odd? 256s allows an inverse method with a block when double negation is used 256s registers an offense for calling !.none? with a symbol proc 256s registers an offense for not (foo !~ bar) 256s registers an offense for comparing snake case constants on the left 256s registers an offense for comparing snake case constants on the right 256s registers an offense for not (foo =~ bar) 256s registers an offense for !foo.blank? 256s registers an offense for !foo.exclude? 256s registers an offense for !(foo != bar) 256s allows comparing camel case constants on the right 256s registers an offense for not (foo != bar) 256s registers an offense for !(foo !~ bar) 256s registers an offense for not (foo == bar) 256s allows comparing camel case constants on the left 256s registers an offense for !(foo > bar) 256s registers an offense for !(foo < bar) 256s registers an offense for !foo.include? 256s registers an offense for !foo.any? 256s registers an offense for !(foo == bar) 256s registers an offense for calling !.none? with a block 256s registers an offense for not (foo < bar) 256s allows an inverse method when double negation is used 256s registers an offense for calling !.any? inside parens 256s allows an inverse method in a block with next 256s inverse blocks 256s registers an offense for an inverted equality block 256s corrects an inverted do end method call 256s registers a single offense for nested inverse method calls 256s corrects an inverted method call when using `BasicObject#!` 256s registers an offense for a multiline method call where the last method is inverted 256s corrects an inverted method call when using `BasicObject#!` with spaces before the method call 256s registers an offense for an inverted equality block 256s registers an offense for a multiline inverted equality block 256s corrects an inverted method call 256s corrects an inverted method call 256s registers a single offense for nested inverse method calls 256s corrects an inverted method call when using `BasicObject#!` 256s registers an offense for foo.select { |e| !e } 256s registers an offense for a multiline inverted equality block 256s corrects an inverted method call when using `BasicObject#!` with spaces before the method call 256s corrects a complex inverted method call 256s registers an offense for a multiline method call where the last method is inverted 256s corrects an inverted method call 256s corrects an inverted do end method call 256s registers an offense for foo.reject! { |e| !e } 256s registers an offense for a multiline inverted equality block 256s corrects a complex inverted method call 256s corrects an inverted method call when using `BasicObject#!` with spaces before the method call 256s corrects a complex inverted method call 256s registers an offense for a multiline method call where the last method is inverted 256s registers an offense for an inverted equality block 256s registers an offense for foo.select! { |e| !e } 256s corrects a complex inverted method call 256s registers a single offense for nested inverse method calls 256s registers an offense for an inverted equality block 256s registers an offense for foo.reject { |e| !e } 256s corrects an inverted do end method call 256s registers an offense for a multiline inverted equality block 256s registers a single offense for nested inverse method calls 256s corrects an inverted method call 256s corrects an inverted method call when using `BasicObject#!` with spaces before the method call 256s corrects an inverted do end method call 256s corrects an inverted method call when using `BasicObject#!` 256s registers an offense for a multiline method call where the last method is inverted 256s corrects an inverted method call when using `BasicObject#!` 256s Ruby 2.7 256s registers an offense for calling !.none? with a numblock 256s behaves like all variable types 256s registers an offense for calling not FOO.none? 256s registers an offense for calling !FOO.none? 256s behaves like all variable types 256s registers an offense for calling not foo.none? 256s registers an offense for calling !foo.none? 256s behaves like all variable types 256s registers an offense for calling not $foo.none? 256s registers an offense for calling !$foo.none? 256s behaves like all variable types 256s registers an offense for calling not @foo.none? 256s registers an offense for calling !@foo.none? 256s behaves like all variable types 256s registers an offense for calling !foo["bar"].none? 256s registers an offense for calling not foo["bar"].none? 256s behaves like all variable types 256s registers an offense for calling not @@foo.none? 256s registers an offense for calling !@@foo.none? 256s behaves like all variable types 256s registers an offense for calling !foo.bar.none? 256s registers an offense for calling not foo.bar.none? 256s behaves like all variable types 256s registers an offense for calling not FOO::BAR.none? 256s registers an offense for calling !FOO::BAR.none? 256s 256s RuboCop::Cop::Style::GlobalStdStream 256s does not register an offense when assigning std stream const to std stream gvar 256s registers an offense and corrects when using std stream as const 256s does not register an offense when assigning other const to std stream gvar 256s does not register an offense when using non std stream const 256s 256s RuboCop::Cop::Severity 256s redefines == to compare severities 256s overrides #to_s 256s has a few required attributes 256s is frozen 256s Comparable 256s warning 256s is expected to be < error 256s refactor 256s is expected to be < convention 256s info 256s is expected to be < refactor 256s error 256s is expected to be < fatal 256s convention 256s is expected to be < warning 256s #code 256s convention 256s is expected to eq "C" 256s info 256s is expected to eq "I" 256s refactor 256s is expected to eq "R" 256s warning 256s is expected to eq "W" 256s fatal 256s is expected to eq "F" 256s error 256s is expected to eq "E" 256s constructs from code 256s R 256s is expected to eq # 256s F 256s is expected to eq # 256s C 256s is expected to eq # 256s I 256s is expected to eq # 256s E 256s is expected to eq # 256s W 256s is expected to eq # 256s #level 256s info 256s is expected to eq 1 256s refactor 256s is expected to eq 2 256s convention 256s is expected to eq 3 256s warning 256s is expected to eq 4 256s error 256s is expected to eq 5 256s fatal 256s is expected to eq 6 256s 256s RuboCop::Cop::Bundler::InsecureProtocolSource 256s does not register an offense when using `source 'https://rubygems.org'` 256s registers an offense when using `source :rubyforge` 256s registers an offense when using `source :rubygems` 256s registers an offense when using `source :gemcutter` 256s when `AllowHttpProtocol: true` 256s does not register an offense when using `source 'http://rubygems.org'` 256s when `AllowHttpProtocol: false` 256s registers an offense when using `source 'http://rubygems.org'` 256s 256s RuboCop::Cop::Layout::SpaceAroundKeyword 256s behaves like accept before 256s accepts `==` before keyword in `a==begin end` 256s behaves like missing after 256s registers an offense for missing space after keyword in `yield""` and autocorrects 256s behaves like missing after 256s registers an offense for missing space after keyword in `break""` and autocorrects 256s >= Ruby 2.7 256s behaves like missing after 256s registers an offense for missing space after keyword in `case""; in 1; end` and autocorrects 256s behaves like missing before 256s registers an offense for missing space before keyword in `""rescue a` 256s behaves like missing before 256s registers an offense for missing space before keyword in `1or 2` 256s behaves like accept after 256s accepts `[` after keyword in `yield[1]` 256s behaves like accept after 256s accepts `.` after keyword in `yield.method` 256s behaves like accept around 256s accepts `{}` around keyword in `{a: begin end}` 256s behaves like missing after 256s registers an offense for missing space after keyword in `not""` and autocorrects 256s behaves like accept before 256s accepts `||` before keyword in `a||begin end` 256s behaves like accept before 256s accepts `!` before keyword in `!yield` 256s behaves like accept after 256s accepts `(` after keyword in `return(1)` 256s behaves like missing before 256s registers an offense for missing space before keyword in `for x in []do end` 256s behaves like accept before 256s accepts `+` before keyword in `a+begin end` 256s behaves like missing before 256s registers an offense for missing space before keyword in `1and 2` 256s behaves like accept after 256s accepts `.` after keyword in `begin end.inspect` 256s behaves like accept after 256s accepts `(` after keyword in `yield(1)` 256s behaves like missing before 256s registers an offense for missing space before keyword in `until 1 do "x"end` 256s behaves like missing after 256s registers an offense for missing space after keyword in `super""` and autocorrects 256s behaves like accept around 256s accepts `()` around keyword in `(next)` 256s behaves like accept around 256s accepts `[]` around keyword in `[begin end]` 256s behaves like accept after 256s accepts `(` after keyword in `defined?(1)` 256s behaves like accept around 256s accepts `;` around keyword in `test do;end` 256s >= Ruby 3.0 256s behaves like accept before 256s accepts `=>` before keyword in `""=> a` 256s behaves like accept after 256s accepts `=>` after keyword in `a =>""` 256s behaves like missing before 256s registers an offense for missing space before keyword in `while 1 do "x"end` 256s behaves like missing after 256s registers an offense for missing space after keyword in `unless""; end` and autocorrects 256s behaves like accept after 256s accepts `{` after keyword in `loop{}` 256s behaves like accept around 256s accepts `{}` around keyword in `"#{begin end}"` 256s &. 256s behaves like accept after 256s accepts `&.` after keyword in `super&.foo` 256s behaves like accept after 256s accepts `&.` after keyword in `yield&.foo` 256s behaves like accept after 256s accepts `(` after keyword in `next(1)` 256s behaves like missing after 256s registers an offense for missing space after keyword in `a rescue""` and autocorrects 256s behaves like accept before 256s accepts `**` before keyword in `a**begin end` 256s behaves like missing before 256s registers an offense for missing space before keyword in `begin "a"end` 256s behaves like missing after 256s registers an offense for missing space after keyword in `1 while""` and autocorrects 256s behaves like missing before 256s registers an offense for missing space before keyword in `a "b"do end` 256s behaves like missing before 256s registers an offense for missing space before keyword in `if a; ""elsif b; end` 256s behaves like missing after 256s registers an offense for missing space after keyword in `1 or(2)` and autocorrects 256s behaves like missing after 256s registers an offense for missing space after keyword in `BEGIN{}` and autocorrects 256s behaves like missing before 256s registers an offense for missing space before keyword in `if a; ""else end` 256s behaves like missing before 256s registers an offense for missing space before keyword in `for x in [] do "x"end` 256s behaves like accept around 256s accepts `,` around keyword in `a 1,next,1` 256s behaves like missing after 256s registers an offense for missing space after keyword in `if a; else"" end` and autocorrects 256s behaves like missing after 256s registers an offense for missing space after keyword in `if a then"" end` and autocorrects 256s >= Ruby 2.7 256s behaves like missing after 256s registers an offense for missing space after keyword in `case a; in""; end` and autocorrects 256s behaves like missing before 256s registers an offense for missing space before keyword in `""in a` 256s behaves like missing after 256s registers an offense for missing space after keyword in `a in""` and autocorrects 256s behaves like accept before 256s accepts `/` before keyword in `a/begin end` 256s behaves like missing before 256s registers an offense for missing space before keyword in `until 1do end` 256s behaves like accept before 256s accepts `|` before keyword in `loop { |x|break }` 256s behaves like missing after 256s registers an offense for missing space after keyword in `END{}` and autocorrects 256s behaves like accept before 256s accepts `>` before keyword in `a>begin end` 256s behaves like missing after 256s registers an offense for missing space after keyword in `a do|x| end` and autocorrects 256s behaves like accept after 256s accepts `+` after keyword in `+begin end` 256s behaves like accept after 256s accepts `::` after keyword in `super::ModuleName` 256s behaves like missing before 256s registers an offense for missing space before keyword in `begin ""ensure end` 256s behaves like missing after 256s registers an offense for missing space after keyword in `defined?1` and autocorrects 256s behaves like accept around 256s accepts `[]` around keyword in `a[begin end]` 256s behaves like accept after 256s accepts `rescue` after keyword in `begin; rescue(Error); end` 256s behaves like accept after 256s accepts `(` after keyword in `super(1)` 256s behaves like missing after 256s registers an offense for missing space after keyword in `return""` and autocorrects 256s behaves like accept before 256s accepts `!` before keyword in `!yield.method` 256s behaves like accept after 256s accepts `\n` after keyword in `test do 256s end` 256s behaves like missing after 256s registers an offense for missing space after keyword in `case a; when b; else"" end` and autocorrects 256s behaves like missing before 256s registers an offense for missing space before keyword in `1until ""` 256s behaves like accept before 256s accepts `=` before keyword in `a=begin end` 256s behaves like missing after 256s registers an offense for missing space after keyword in `while 1 do"x" end` and autocorrects 256s behaves like missing before 256s registers an offense for missing space before keyword in `if a; "b"end` 256s behaves like missing after 256s registers an offense for missing space after keyword in `for x in [] do"x" end` and autocorrects 256s behaves like missing after 256s registers an offense for missing space after keyword in `begin ensure"" end` and autocorrects 256s behaves like missing after 256s registers an offense for missing space after keyword in `if""; end` and autocorrects 256s behaves like missing after 256s registers an offense for missing space after keyword in `1 until""` and autocorrects 256s behaves like accept after 256s accepts `\` after keyword in `test do\ 256s end` 256s behaves like missing before 256s registers an offense for missing space before keyword in `while 1do end` 256s behaves like missing before 256s registers an offense for missing space before keyword in `begin rescue; ""else end` 256s behaves like accept before 256s accepts `-` before keyword in `a-begin end` 256s behaves like accept before 256s accepts `&&` before keyword in `a&&begin end` 256s behaves like accept before 256s accepts `<` before keyword in `a= Ruby 2.7 257s behaves like missing before 257s registers an offense for missing space before keyword in `case a; in "pattern"unless "condition"; else "" end` 257s behaves like missing after 257s registers an offense for missing space after keyword in `case a; in "pattern" if"condition"; else "" end` and autocorrects 257s behaves like missing after 257s registers an offense for missing space after keyword in `case a; in b; else"" end` and autocorrects 257s behaves like missing before 257s registers an offense for missing space before keyword in `case a; in b; ""else end` 257s behaves like missing before 257s registers an offense for missing space before keyword in `case a; in "pattern"if "condition"; else "" end` 257s behaves like missing after 257s registers an offense for missing space after keyword in `case a; in "pattern" unless"condition"; else "" end` and autocorrects 257s behaves like accept after 257s accepts `[` after keyword in `super[1]` 257s behaves like missing before 257s registers an offense for missing space before keyword in `1while ""` 257s behaves like accept before 257s accepts `+` before keyword in `a+begin; end.method` 257s behaves like accept before 257s accepts `!` before keyword in `!super.method` 257s behaves like missing after 257s registers an offense for missing space after keyword in `begin+1 end` and autocorrects 257s behaves like accept before 257s accepts `*` before keyword in `a*begin end` 257s behaves like missing after 257s registers an offense for missing space after keyword in `begin rescue; else"" end` and autocorrects 257s behaves like accept before 257s accepts `=*` before keyword in `a=*begin end` 257s behaves like missing after 257s registers an offense for missing space after keyword in `case"" when 1; end` and autocorrects 257s behaves like missing after 257s registers an offense for missing space after keyword in `next""` and autocorrects 257s behaves like accept after 257s accepts `(` after keyword in `break(1)` 257s behaves like missing before 257s registers an offense for missing space before keyword in `a do "a"end` 257s behaves like missing after 257s registers an offense for missing space after keyword in `begin"" end` and autocorrects 257s behaves like missing after 257s registers an offense for missing space after keyword in `until 1 do"x" end` and autocorrects 257s behaves like missing after 257s registers an offense for missing space after keyword in `super{}` and autocorrects 257s 257s RuboCop::Cop::Style::RedundantSortBy 257s autocorrects array.sort_by { |x| x } 257s autocorrects array.sort_by do |x| x end 257s autocorrects array.sort_by { |y| y } 257s Ruby 2.7 257s autocorrects array.sort_by { |x| x } 257s 257s RuboCop::CLI --autocorrect 257s corrects `EnforcedStyle: require_parentheses` of `Style/MethodCallWithArgsParentheses` with `EnforcedStyle: conditionals` of `Style/AndOr` 257s 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` 257s breaks line at the beginning of trailing class/module body without removing a semicolon in the bodywhen using `Style/TrailingBodyOnClass` and `Style/TrailingBodyOnModule` 257s corrects IndentationWidth, RedundantBegin, and RescueEnsureAlignment offenses 257s corrects `Style/RedundantBegin` with `Style/MultilineMemoization` 257s corrects `Style/IfUnlessModifier` with `Style/SoleNestedConditional` 257s corrects `EnforcedStyle: require_parentheses` of `Style/MethodCallWithArgsParentheses` with `Lint/AmbiguousOperator` 258s corrects `EnforcedStyle: hash_rockets` of `Style/HashSyntax` with `Layout/HashAlignment` 258s corrects `EnforcedStyle: require_parentheses` of `Style/MethodCallWithArgsParentheses` with `Style/NestedParenthesizedCalls` 258s can correct WordArray and SpaceAfterComma offenses 258s corrects `Layout/DotPosition` and `Layout/SingleLineBlockChain` offenses 258s can correct IndentHash offenses with separator style 258s 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` 258s corrects Style/BlockDelimiters offenses when specifyingLayout/SpaceBeforeBlockBraces with `EnforcedStyle: no_space` together 258s properly autocorrects when `Style/TernaryParentheses` requires parentheses that `Style/RedundantParentheses` would otherwise remove 258s can correct MethodDefParentheses and other offense 259s corrects when specifying `EnforcedStyle: with_fixed_indentation` of `Layout/ArgumentAlignment` and `EnforcedStyle: consistent` of `Layout/FirstArgumentIndentation` 259s corrects IndentationWidth and IndentationConsistency offenseswithout correcting `Style/TrailingBodyOnClass` 259s can correct empty line inside special form of nested modules 260s can change block comments and indent them 260s can correct indentation and another thing 260s does not crash when using Lint/SafeNavigationWithEmpty and Layout/EmptyLinesAroundBlockBody 260s corrects `Style/SoleNestedConditional` with `Style/InverseMethods` and `Style/IfUnlessModifier` 260s corrects SymbolProc and SpaceBeforeBlockBraces offenses 260s corrects LineEndConcatenation offenses leaving the RedundantInterpolation offense unchanged 261s 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 261s corrects Style/BlockDelimiters offenses when specifyingLayout/SpaceInsideBlockBraces together 261s does not correct SpaceAroundOperators in a hash that would be changed back 261s says [Correctable] if correction is unsafe 261s can correct HashSyntax and SpaceAroundOperators offenses 261s corrects InitialIndentation offenses 261s corrects `Style/InverseMethods` offenses when specifying `IncludeSemanticChanges: false` of `Style/NonNilCheck` and `EnforcedStyle: comparison` of `Style/NilComparison` 262s corrects IndentationWidth and IndentationConsistency offenses 262s corrects `Naming/RescuedExceptionsVariableName` and `, `Style/RescueStandardError`and `Lint/OverwriteByRescue` offenses 262s does not correct ExtraSpacing in a hash that would be changed back 262s corrects TrailingCommaIn(Array|Hash)Literal and Multiline(Array|Hash)BraceLayout offenses 262s corrects HeredocArgumentClosingParenthesis offenses and ignores TrailingCommaInArguments offense 262s can correct two problems with blocks 263s corrects `Style/TernaryParentheses` offenses and accepts `Lint/ParenthesesAsGroupedExpression` 263s corrects `EnforcedStyle: require_parentheses` of `Style/MethodCallWithArgsParentheses` with `Style/RescueModifier` 263s can correct two problems in the same place 263s does not say [Corrected] if correction is not possible 263s can correct TrailingEmptyLines and TrailingWhitespace offenses 263s corrects `Lint/UnusedMethodArgument` with `Style/ExplicitBlockArgument` 263s corrects IndentationWidth and IndentationConsistency offenseswhen using `EnforcedStyle: outdent` and `EnforcedStyle: indented_internal_methods` 263s corrects indentation for a begin/rescue/else/ensure/end block properly 264s corrects `Layout/SpaceAroundOperators` and `Layout/ExtraSpacing` offenses when using `ForceEqualSignAlignment: true` 264s corrects when specifying `EnforcedStyle: with_fixed_indentation` of `Layout/ArgumentAlignment` and `Layout/HashAlignment` 264s can correct HashSyntax when --only is used 264s can be disabled for any cop in configuration 264s corrects Style/Next and Style/SafeNavigation offenses 264s can correct a problems and the problem it creates 264s corrects when specifying `EnforcedStyle: with_fixed_indentation` of `Layout/ArgumentAlignment` and `Layout/HashAlignment` and `Layout/FirstHashElementIndentation` 264s can correct two empty lines at end of class body 265s honors Exclude settings in individual cops 265s corrects only IndentationWidth without crashing 265s 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` 265s corrects code with indentation problems 265s handles different SpaceInsideBlockBraces and SpaceInsideHashLiteralBraces 265s corrects RedundantCopDisableDirective offenses 266s can correct MethodCallWithoutArgsParentheses and EmptyLiteral offenses 266s 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 266s does not crash Lint/SafeNavigationWithEmpty and offenses and accepts Style/SafeNavigation when checking `foo&.empty?` in a conditional 266s corrects when specifying `EnforcedStyle: with_first_argument` of `Layout/ArgumentAlignment` and `EnforcedColonStyle: separator` of `Layout/HashAlignment` 266s properly corrects when `Style/SoleNestedConditional` and one of `Style/NegatedIf` or `Style/NegatedUnless` detect offenses 266s can correct SpaceAfterComma and HashSyntax offenses 266s corrects when specifying `EnforcedStyle: with_first_argument` of `Layout/ArgumentAlignment` and `EnforcedColonStyle: separator` of `Layout/HashAlignment` (`EnforcedColonStyle` is array) 266s corrects when specifying `EnforcedStyle: with_first_argument` of `Layout/ArgumentAlignment` and `EnforcedHashRocketStyle: separator` of `Layout/HashAlignment` 266s corrects Layout/RedundantLineBreak and Layout/SingleLineBlockChain offenses 267s avoids adding extra spaces when both `Style/Semicolon` and `Style/SingleLineMethods`both apply 267s does not crash when using `Layout/CaseIndentation` and `Layout/ElseAlignment` 267s does not hang SpaceAfterPunctuation and SpaceInsideParens 267s corrects `Lint/Lambda` and `Lint/UnusedBlockArgument` offenses 267s corrects RedundantBegin offenses and fixes indentation etc 267s corrects Style/InverseMethods and Style/Not offenses 267s corrects `EnforcedStyle: line_count_based` of `Style/BlockDelimiters` with `Style/CommentedKeyword` and `Layout/BlockEndNewline` 267s corrects properly when both `Style/MapToHash` and `Style/HashTransformKeys`or `Style/HashTransformValues` registers 268s plays nicely with default cops in complex ExtraSpacing scenarios 268s corrects Tab and IndentationConsistency offenses 268s corrects `EnforcedStyle: require_parentheses` of `Style/MethodCallWithArgsParentheses` with `Layout/SpaceBeforeFirstArg` 268s consistently quotes symbol keys in a hash using `Lint/SymbolConversion` with `EnforcedStyle: consistent` and `Style/QuotedSymbols` 268s does not hang SpaceAfterPunctuation and SpaceInsideArrayLiteralBrackets 268s corrects `Layout/DotPosition` and `Style/RedundantSelf` offenses 268s can correct single line methods 269s 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` 269s corrects Lint/ParenthesesAsGroupedExpression and offenses and accepts Style/RedundantParentheses 269s caching 269s with an offense in the cache 269s corrects offenses 269s with no offenses in the cache 269s doesn't correct offenses 269s when BlockDelimiters has semantic style 269s corrects SpaceBeforeBlockBraces, SpaceInsideBlockBraces offenses 269s when BlockDelimiters has line_count_based style 269s corrects SpaceBeforeBlockBraces, SpaceInsideBlockBraces offenses 269s when BlockDelimiters has braces_for_chaining style 269s corrects SpaceBeforeBlockBraces, SpaceInsideBlockBraces offenses 269s space_inside_bracket cops 269s when array style is compact & reference style is space 270s corrects SpaceInsideArrayLiteralBrackets and SpaceInsideReferenceBrackets 270s when array style is no_space & reference style is space 270s corrects SpaceInsideArrayLiteralBrackets and SpaceInsideReferenceBrackets 270s when array style is compact & reference style is no_space 270s corrects SpaceInsideArrayLiteralBrackets and SpaceInsideReferenceBrackets 270s when array style is space & reference style is no space 270s corrects SpaceInsideArrayLiteralBrackets and SpaceInsideReferenceBrackets 270s trailing comma cops 270s when the style is `comma` 270s corrects TrailingCommaInLiteral and TrailingCommaInArguments without producing a double comma 270s when the style is `consistent_comma` 271s corrects TrailingCommaInLiteral and TrailingCommaInArguments without producing a double comma 271s 271s RuboCop::Server::Cache 271s .cache_path 271s when ERB pre-processing of the configuration file 271s when cache root path is not specified path 271s does not raise an error 271s when `XDG_CACHE_HOME` environment variable is set 271s when cache root path is specified path 271s contains the root from cache root path 271s when cache root path is not specified path 271s contains the root from `XDG_CACHE_HOME` 271s when cache root path is specified path 271s is the specified path 271s when .rubocop.yml is empty 271s when cache root path is not specified path 271s does not raise an error 271s when `RUBOCOP_CACHE_ROOT` environment variable is set 271s when cache root path is not specified path 271s contains the root from `RUBOCOP_CACHE_ROOT` 271s when cache root path is specified path 271s contains the root from cache root path 271s when cache root path is not specified path and `XDG_CACHE_HOME` environment variable is specified 271s contains the root from `RUBOCOP_CACHE_ROOT` 271s when cache root path is not specified as default 271s is the default path 271s when `CacheRootDirectory` configure value is set 271s when cache root path is not specified path 271s contains the root from `CacheRootDirectory` configure value 271s when cache root path is not specified path and `XDG_CACHE_HOME` environment variable is spacified 271s contains the root from `CacheRootDirectory` configure value 271s when cache root path is specified path 271s contains the root from cache root path 271s .pid_running? 271s works properly when concurrency with server stopping and cleaning cache dir 271s 271s RuboCop::Cop::InternalAffairs::MethodNameEndWith 271s registers offense if there is potentially usage of `bang_method?` with safe navigation operator 271s does not register offense if argument for end_with? is some other string 271s registers offense if there is potentially usage of `bang_method?` 271s registers offense if there is potentially usage of `predicate_method?` 271s registers an offense if `method_name` is a variable and there is potentially usage of `assignment_method?` 271s registers an offense if there is potentially usage of `assignment_method?` 271s Ruby >= 2.7 271s registers offense if argument for Symbol#end_with? is '!' with safe navigation operator 271s does not register offense if argument for Symbol#end_with? is some other string 271s registers offense if argument for Symbol#end_with? is '!' 271s registers offense if argument for Symbol#end_with? is '?' 271s registers an offense if method_name is symbol 271s registers offense if argument for Symbol#end_with? is '?' with safe navigation operator 271s registers an offense if method_name is symbol with safe navigation operator 271s 271s RuboCop::Cop::Lint::RedundantCopEnableDirective 271s registers offense and corrects redundant enabling of same cop 271s registers offense and corrects unnecessary enable 271s registers correct offense when combined with necessary enable, no white-space after comma 271s registers an offense and corrects when the first cop is unnecessarily enabled 271s registers multiple offenses and corrects the same comment 271s registers correct offense when combined with necessary enable 271s when all cops are unnecessarily enabled 271s on separate lines 271s registers an offense and corrects when there is extra white space 271s on the same line 271s registers an offense and corrects 271s when middle cop is unnecessarily enabled 271s registers an offense and corrects when there is extra white space 271s registers an offense and corrects 271s when cop is disabled in the configuration 271s registers an offense if enabling it twice 271s registers no offense when enabling the cop 271s when last cop is unnecessarily enabled 271s registers an offense and corrects 271s registers an offense and corrects when there is no space between the cops and the comma 271s when all department enabled 271s registers correct offense when combined with necessary enable 271s registers offense and corrects redundant enabling of same department 271s registers an offense and corrects when the first department is unnecessarily enabled 271s registers offense and corrects unnecessary enable 271s registers multiple offenses and corrects the same comment 271s registers offense and corrects redundant enabling of department of same cop 271s registers offense and corrects redundant enabling of cop of same department 271s all switch 271s registers offense and corrects unnecessary enable all 271s when at least one cop was disabled 271s does not register offense 271s 271s RuboCop::Cop::Style::CommentAnnotation 271s with RequireColon configuration set to false 271s accepts a keyword that is somewhere in a sentence 271s accepts upper case keyword alone 271s accepts a comment that is obviously a code example 271s accepts upper case keyword with colon, space and note 271s accepts a keyword that is just the beginning of a sentence 271s upper case keyword with space but no note 271s registers an offense without autocorrection 271s multiline comment 271s only registers an offense on the first line 271s offenses in consecutive inline comments 271s registers each of them 271s with colon 271s registers an offense and removes colon 271s upper case keyword with colon but no note 271s registers an offense without autocorrection 271s when a keyword is not in the configuration 271s accepts the word with colon 271s with configured keyword 271s registers an offense for containing a colon after the word 271s lower case keyword 271s registers an offense and upcases 271s with default RequireColon configuration (colon + space) 271s accepts a keyword that is somewhere in a sentence 271s accepts a keyword that is just the beginning of a sentence 271s accepts a comment that is obviously a code example 271s accepts upper case keyword with colon, space and note 271s accepts upper case keyword alone 271s lower case keyword 271s registers an offense and upcases 271s missing colon 271s registers an offense and adds colon 271s missing space after colon 271s registers an offense and adds space 271s with multiword keywords 271s registers an offense for each matching keyword 271s upper case keyword with colon but no note 271s registers an offense without autocorrection 271s capitalized keyword 271s registers an offense and upcases 271s offenses in consecutive inline comments 271s registers each of them 271s upper case keyword with space but no note 271s registers an offense without autocorrection 271s with configured keyword 271s registers an offense for a missing colon after the word 271s multiline comment 271s only registers an offense on the first line 271s when a keyword is not in the configuration 271s accepts the word without colon 271s 271s RuboCop::ConfigStore 271s .for 271s always uses config specified in command line 271s when no config specified in command line 271s gets config path and config from cache if available 271s searches for config path if not available in cache 271s when --force-default-config option is specified 271s uses default config without searching for config path 271s 271s RuboCop::Cop::InternalAffairs::RedundantMessageArgument 271s does not register an offense when `#message` with another node is passed 271s does not register an offense when formatted `MSG` is passed 271s when `MSG` is passed 271s registers an offense 271s when `#message` with offending node is passed 271s when message is the only keyword argument 271s registers an offense 271s when there are others keyword arguments 271s registers an offense 271s when `#message` is passed 271s registers an offense 271s 271s RuboCop::Cop::Lint::TopLevelReturnWithArgument 271s Code segment containing semi-colon separated statements 271s expects an offense from the return with arguments and multi-line code 271s expects no offense from the return with arguments and multi-line code 271s Code segment with block level returns other than the top-level return 271s expects offense from the return with arguments 271s expects no offense from the return without arguments 271s Code segment with only top-level return statement 271s expects no offense from the return without arguments 271s expects multiple offenses from the return with arguments statements 271s expects offense from the return with arguments 271s Code segment with method-level return statements 271s expects offense when method-level & top-level return co-exist 271s Code segment with inline if along with top-level return 271s expects multiple offense from the return with arguments 271s expects no offense from the return without arguments 271s 271s RuboCop::Cop::Layout::RescueEnsureAlignment 271s accepts aligned rescue with do-end block that line break with trailing dot for method calls 271s accepts aligned rescue in do-end block on operation assignment 271s accepts aligned rescue in do-end block assigned to global variable 271s accepts correctly aligned ensure 271s accepts correctly aligned rescue/ensure with def 271s accepts aligned rescue in do-end block assigned to class variable 271s accepts aligned rescue in do-end block on or-assignment 271s accepts aligned rescue in do-end block with `.()` call 271s accepts aligned rescue in do-end block 271s accepts the modifier form 271s accepts end being misaligned 271s accepts rescue and ensure on the same line 271s accepts correctly aligned rescue 271s accepts aligned rescue in do-end block assigned to instance variable 271s accepts correctly aligned rescue in assigned begin-end block 271s accepts correctly aligned rescue/ensure with def with no body 271s accepts aligned rescue in assigned do-end block starting on newline 271s accepts aligned rescue do-end block assigned to local variable 271s accepts aligned rescue in do-end block in a method 271s accepts aligned rescue with do-end block that line break with leading dot for method calls 271s accepts aligned rescue in do-end block on and-assignment 271s accepts aligned rescue in do-end block assigned to class 271s accepts aligned rescue in do-end block on multi-assignment 271s excluded file 271s processes excluded files with issue 271s rescue in do-end block on multi-assignment 271s registers an offense 271s rescue with begin 271s registers an offense 271s as RHS of assignment 271s when `EnforcedStyleAlignWith: start_of_line` of `Layout/BeginEndAlignment` cop 271s accepts multi-line, indented 271s accepts multi-line, aligned 271s registers an offense and corrects for incorrect alignment 271s `Layout/BeginEndAlignment` cop is not enabled 271s registers an offense and corrects for incorrect alignment 271s accepts multi-line, indented 271s accepts multi-line, aligned 271s when `EnforcedStyleAlignWith: begin` of `Layout/BeginEndAlignment` cop 271s accepts multi-line, indented 271s accepts multi-line, aligned 271s registers an offense and corrects for incorrect alignment 271s ensure with def 271s registers an offense 271s rescue in do-end block assigned to instance variable 271s registers an offense 271s rescue in do-end block assigned to class 271s registers an offense 271s allows inline expression before 271s ensure 271s registers an offense 271s rescue 271s registers an offense 271s rescue with def 271s registers an offense 271s ensure with defs 271s registers an offense 271s rescue with defs 271s registers an offense 271s ensure with module 271s registers an offense when ensure used with module 271s rescue in do-end block on and-assignment 271s registers an offense 271s rescue in do-end block on operation assignment 271s registers an offense 271s allows inline access modifier 271s with public_class_method modifier 271s rescue with def 271s registers an offense 271s correct alignment 271s ensure with defs 271s correct alignment 271s registers an offense 271s rescue with defs 271s registers an offense 271s correct alignment 271s ensure with def 271s correct alignment 271s registers an offense 271s with private modifier 271s ensure with defs 271s registers an offense 271s correct alignment 271s rescue with defs 271s correct alignment 271s registers an offense 271s ensure with def 271s registers an offense 271s correct alignment 271s rescue with def 271s registers an offense 271s correct alignment 271s with private_class_method modifier 271s ensure with def 271s registers an offense 271s correct alignment 271s rescue with def 271s correct alignment 271s registers an offense 271s ensure with defs 271s registers an offense 271s correct alignment 271s rescue with defs 271s correct alignment 271s registers an offense 271s rescue with class 271s registers an offense when rescue used with class 271s rescue in do-end block assigned to global variable 271s registers an offense 271s rescue with do-end block 271s registers an offense 271s when using zsuper with block 271s registers and corrects an offense and corrects when incorrect alignment 271s does not register an offense when correct alignment 271s rescue in do-end block on or-assignment 271s registers an offense 271s rescue in do-end block assigned to class variable 271s registers an offense 271s rescue in assigned do-end block starting on newline 271s registers an offense 271s ensure with begin 271s registers an offense when ensure used with begin 271s rescue with module 271s registers an offense when rescue used with module 271s ensure with class 271s registers an offense 271s rescue in do-end block assigned to local variable 271s registers an offense 271s 271s RuboCop::Cop::Style::GlobalVars 271s does not register an offense for built-in variable $CHILD_STATUS 271s does not register an offense for built-in variable $> 271s does not register an offense for built-in variable $\ 271s does not register an offense for built-in variable $_ 271s does not register an offense for built-in variable $FIELD_SEPARATOR 271s does not register an offense for built-in variable $PROCESS_ID 271s does not register an offense for built-in variable $ARGV 271s does not register an offense for built-in variable $OFS 271s does not register an offense for built-in variable $-v 271s does not register an offense for built-in variable $stdin 271s does not register an offense for built-in variable $IGNORECASE 271s does not register an offense for built-in variable $FILENAME 271s does not register an offense for built-in variable $-i 271s does not register an offense for built-in variable $? 271s does not register an offense for built-in variable $/ 271s does not register an offense for built-in variable $ORS 271s does not register an offense for built-in variable $-p 271s does not register an offense for built-in variable $-w 271s does not register an offense for built-in variable $PREMATCH 271s does not register an offense for built-in variable $~ 271s does not register an offense for built-in variable $! 271s does not register an offense for built-in variable $CLASSPATH 271s does not register an offense for backrefs like $1 271s does not register an offense for built-in variable $stderr 271s does not register an offense for built-in variable $INPUT_RECORD_SEPARATOR 271s does not register an offense for built-in variable $= 271s does not register an offense for built-in variable $-I 271s does not register an offense for built-in variable $` 271s does not register an offense for built-in variable $OUTPUT_RECORD_SEPARATOR 271s does not register an offense for built-in variable $. 271s does not register an offense for built-in variable $* 271s does not register an offense for built-in variable $$ 271s does not register an offense for built-in variable $DEFAULT_INPUT 271s does not register an offense for built-in variable $: 271s does not register an offense for built-in variable $DEFAULT_OUTPUT 271s does not register an offense for built-in variable $POSTMATCH 271s does not register an offense for built-in variable $-0 271s does not register an offense for built-in variable $LOAD_PATH 271s does not register an offense for built-in variable $DEBUG 271s does not register an offense for built-in variable $MATCH 271s does not register an offense for built-in variable $INPUT_LINE_NUMBER 271s does not register an offense for built-in variable $-a 271s does not register an offense for built-in variable $PID 271s does not register an offense for built-in variable $, 271s does not register an offense for built-in variable $ERROR_INFO 271s does not register an offense for built-in variable $LOADED_FEATURES 271s does not register an offense for built-in variable $-F 271s does not register an offense for built-in variable $< 271s does not register an offense for built-in variable $ENV_JAVA 271s does not register an offense for built-in variable $NR 271s registers an offense for $custom 271s does not register an offense for built-in variable $' 271s does not register an offense for built-in variable $-l 271s does not register an offense for built-in variable $OUTPUT_FIELD_SEPARATOR 271s does not register an offense for built-in variable $-d 271s does not register an offense for built-in variable $JRUBY_VERSION 271s does not register an offense for built-in variable $LAST_PAREN_MATCH 271s does not register an offense for built-in variable $stdout 271s does not register an offense for built-in variable $LAST_READ_LINE 271s does not register an offense for built-in variable $ERROR_POSITION 271s does not register an offense for built-in variable $; 271s does not register an offense for built-in variable $PROGRAM_NAME 271s allows user permitted variables 271s does not register an offense for built-in variable $0 271s does not register an offense for built-in variable $SAFE 272s does not register an offense for built-in variable $JRUBY_REVISION 272s does not register an offense for built-in variable $@ 272s does not register an offense for built-in variable $" 272s does not register an offense for built-in variable $RS 272s does not register an offense for built-in variable $+ 272s does not register an offense for built-in variable $VERBOSE 272s does not register an offense for built-in variable $FS 272s does not register an offense for built-in variable $& 272s does not register an offense for built-in variable $LAST_MATCH_INFO 272s 272s RuboCop::Cop::Lint::MixedRegexpCaptureTypes 272s registers an offense when both of named and numbered captures are used 272s does not register offense to a regexp with named capture and non-capturing group 272s does not register offense to a regexp with numbered capture only 272s does not register offense when using a Regexp cannot be processed by regexp_parser gem 272s does not register offense to a regexp with named capture only 272s when containing a non-regexp literal 272s does not register an offense when containing a cvar 272s does not register an offense when containing a constant 272s does not register an offense when containing a ivar 272s does not register an offense when containing a gvar 272s does not register an offense when containing a method 272s does not register an offense when containing a lvar 272s 272s RuboCop::Cop::Lint::Syntax 272s .offenses_from_processed_source 272s with a parser error 272s returns an offense 272s with --display-cop-names option 272s returns an offense with cop name 272s with a diagnostic error 272s returns an offense 272s with --display-cop-names option 272s returns an offense with cop name 272s with --autocorrect --disable-uncorrectable options 272s returns an offense 272s 272s RuboCop::Cop::Style::NonNilCheck 272s when not allowing semantic changes 272s does not register an offense if only expression in predicate 272s does not register an offense for not x.nil? 272s does not register an offense for != 0 272s registers an offense for != nil 272s does not register an offense if last expression in class predicate 272s does not register an offense if last expression in predicate 272s does not register an offense for !x.nil? 272s registers an offense but does not correct when the code was not modified 272s does not register an offense if only expression in class predicate 272s does not register an offense with implicit receiver 272s when `EnforcedStyle: comparison` of `Style/NilComparison` cop 272s `IncludeSemanticChanges: true` 272s registers an offense for `foo != nil` 272s `IncludeSemanticChanges: false` 272s does not register an offense for `foo != nil` 272s when allowing semantic changes 272s corrects code that would not be modified if IncludeSemanticChanges were false 272s registers an offense for `!x.nil?` 272s does not blow up with ternary operators 272s does not register an offense for `x.nil?` 272s autocorrects by changing `x != nil` to `x` 272s registers an offense for unless x.nil? 272s does not blow up when autocorrecting implicit receiver 272s registers an offense for `not x.nil?` 272s does not register an offense for `!x` 272s 272s RuboCop::Cop::Lint::FormatParameterMismatch 272s identifies correctly digits for spacing in format 272s does not register an offense when single argument is not an array 272s does not register offense for `String#%` when arguments, fields match 272s does not register an offense when arguments and fields match 272s does not register an offense for sprintf with splat argument 272s correctly ignores double percent 272s registers an offense if extra argument for dynamic width not given 272s does not register an offense when using named parameters with escaped `%` 272s finds faults even when the string looks like a HEREDOC 272s registers an offense when calling Kernel.sprintf and the fields do not match 272s does not register an offense when single argument is a hash 272s accepts an extra argument for dynamic width 272s does not register an offense argument is the result of a message send 272s accepts an extra arg for dynamic width with other preceding flags 272s registers an offense when there are more arguments than expected 272s registers offense with sprintf 272s constants do not register offenses 272s registers an offense when there are less arguments than expected 272s ignores percent right next to format string 272s does not register an offense when using named parameters 272s correctly parses different sprintf formats 272s registers an offense when calling Kernel.format and the fields do not match 272s registers an offense for String#% 272s does not register an offense for format with splat argument 272s on format with %<> interpolations 272s and 1 argument 272s does not register an offense 272s and multiple arguments 272s registers an offense 272s with wildcard 272s does not register an offense for width and precision 272s does not register an offense for precision 272s does not register an offense for width 272s does not register an offense for multiple wildcards 272s behaves like variables 272s does not register an offense for % called on a variable 272s does not register an offense for format called on a variable 272s does not register an offense for format called on a variable 272s when argument itself contains format characters and formats in format string and argument are not equal 272s ignores argument formatting 272s behaves like variables 272s does not register an offense for format called on a variable 272s does not register an offense for % called on a variable 272s does not register an offense for format called on a variable 272s when format is not a string literal 272s does not register an offense 272s behaves like variables 272s does not register an offense for % called on a variable 272s does not register an offense for format called on a variable 272s does not register an offense for format called on a variable 272s on format with %{} interpolations 272s and multiple arguments 272s registers an offense 272s and 1 argument 272s does not register an offense 272s when using (digit)$ flag 272s does not register an offense when match between the maximum value specified by (digit)$ flag and the number of arguments 272s registers an offense when mismatch between the maximum value specified by (digit)$ flag and the number of arguments 272s does not register an offense 272s behaves like variables 272s does not register an offense for format called on a variable 272s does not register an offense for % called on a variable 272s does not register an offense for format called on a variable 272s behaves like variables 272s does not register an offense for format called on a variable 272s does not register an offense for % called on a variable 272s does not register an offense for format called on a variable 272s when format is invalid 272s registers an offense 272s when multiple arguments are called for 272s and a single variable argument is passed 272s does not register an offense 272s and a single send node is passed 272s does not register an offense 272s when splat argument is present 272s does not register an offense when args count is less than expected 272s when args count is more than expected 272s does not register an offense for `#format` 272s does not register an offense for `#sprintf` 272s registers an offense for `#%` 272s when passed an empty array 272s does not register an offense 272s 272s RuboCop::Cop::Layout::SpaceInLambdaLiteral 272s when configured to enforce spaces 272s registers an offense and corrects no space between -> and ( 272s does not register an offense for a space between -> and ( 272s registers an offense and corrects no space in the outer nested lambda 272s registers an offense and corrects no space in the inner nested lambda 272s does not register an offense for multi-line lambdas 272s registers an offense and corrects no space in both lambdas when nested 272s does not register an offense for no space between -> and { 272s when configured to enforce no space 272s register offenses and correct spaces in both lambdas when nested 272s registers an offense and corrects spaces between -> and ( 272s registers an offense and corrects a space between -> and ( 272s registers an offense and corrects a space in the outer nested lambda 272s registers an offense and corrects a space in the inner nested lambda 272s does not register an offense for multi-line lambdas 272s does not register an offense for a space between -> and { 272s does not register an offense for no space between -> and ( 272s 272s RuboCop::Cop::Style::StringLiteralsInInterpolation 272s configured with single quotes preferred 272s accepts double quotes on a static string 272s accepts double quotes on a broken static string 272s accepts double quotes on static strings within a method 272s can handle a built-in constant parsed as string 272s can handle character literals 272s registers an offense for double quotes within embedded expression 272s registers an offense for double quotes within embedded expression in a heredoc string 272s when configured with a bad value 272s fails 272s configured with double quotes preferred 272s registers an offense for single quotes within embedded expression in a heredoc string 272s registers an offense for single quotes within embedded expression 272s 272s RuboCop::Cop::Style::RedundantStringEscape 272s does not register an offense for a __FILE__ literal 272s does not register an offense for a x-str literal 272s does not register an offense for a regexp literal 272s does not register an offense for a __dir__ literal 272s with a %q(...) literal 272s behaves like a literal without interpolation 272s does not register an offense for an escaped interpolation 272s does not register an offense for an escaped gvar interpolation 272s does not register a bracket-escaped lvar interpolation 272s does not register an offense for a meta character 272s does not register an offense with escaped single quote 272s does not register an offense for control characters 272s does not register an offense for an escaped newline 272s does not register an offense for an ascii DEL 272s does not register an offense for a @-escaped ivar interpolation 272s does not register an offense for a $-escaped gvar interpolation 272s does not register an offense for a unicode escape 272s does not register an offense without escapes 272s does not register an offense with escaped # at end-of-string 272s does not register an offense for multiple unicode escapes 272s does not register an offense for a hex escape 272s does not register an offense for an escaped # followed { 272s does not register an offense for meta control characters 272s does not register an offense for an escaped backslash 272s does not register an offense for a bracket-escaped interpolation 272s does not register an offense for a newline 272s does not register an offense for an escaped ivar interpolation 272s does not register an offense for an escaped delimiter before interpolation 272s does not register an offense for an octal escape 272s does not register an offense for a @-escaped cvar interpolation 272s does not register an offense for an escaped delimiter 272s does not register an offense for an allowed escape inside multi-line literal 272s does not register an offense with escaped double quote 272s does not register an offense for an escaped cvar interpolation 272s does not register an offense with escaped # without following { 272s does not register an offense for an escaped # with following { 272s does not register an offense for a technically-unnecessary escape 272s when using character literals 272s does not register an offense for `?\n` 272s does not register an offense for `?a` 272s with an interpolation-disabled HEREDOC 272s behaves like a literal without interpolation 272s does not register an offense without escapes 272s does not register an offense with escaped double quote 272s does not register an offense for an escaped newline 272s does not register an offense for an escaped backslash 272s does not register an offense for an escaped ivar interpolation 272s does not register an offense for a newline 272s does not register an offense for a @-escaped ivar interpolation 272s does not register an offense for an escaped interpolation 272s does not register an offense for a hex escape 272s does not register an offense for an octal escape 272s does not register an offense for a meta character 272s does not register an offense for multiple unicode escapes 272s does not register an offense for a technically-unnecessary escape 272s does not register an offense with escaped # without following { 272s does not register an offense for an escaped # followed { 272s does not register an offense for an ascii DEL 272s does not register an offense for a unicode escape 272s does not register an offense with escaped # at end-of-string 272s does not register a bracket-escaped lvar interpolation 272s does not register an offense with escaped single quote 272s does not register an offense for a @-escaped cvar interpolation 272s does not register an offense for control characters 272s does not register an offense for an escaped cvar interpolation 272s does not register an offense for an allowed escape inside multi-line literal 272s does not register an offense for meta control characters 272s does not register an offense for an escaped # with following { 272s does not register an offense for a $-escaped gvar interpolation 272s does not register an offense for an escaped gvar interpolation 272s does not register an offense for a bracket-escaped interpolation 272s with a %w(...) literal 272s does not register an offense for escaped spaces 272s behaves like a literal without interpolation 272s does not register an offense with escaped # at end-of-string 272s does not register an offense for meta control characters 272s does not register an offense for a unicode escape 272s does not register an offense for an octal escape 272s does not register an offense for a technically-unnecessary escape 272s does not register an offense for control characters 272s does not register an offense for a hex escape 272s does not register an offense with escaped single quote 272s does not register an offense with escaped double quote 272s does not register an offense for an escaped interpolation 272s does not register an offense for an escaped # followed { 272s does not register an offense for an escaped # with following { 272s does not register an offense without escapes 272s does not register an offense with escaped # without following { 272s does not register an offense for a meta character 272s does not register an offense for a @-escaped ivar interpolation 272s does not register an offense for an escaped cvar interpolation 272s does not register an offense for an escaped ivar interpolation 272s does not register an offense for a @-escaped cvar interpolation 272s does not register an offense for a newline 272s does not register an offense for a bracket-escaped interpolation 272s does not register an offense for an allowed escape inside multi-line literal 272s does not register an offense for an escaped backslash 272s does not register an offense for an ascii DEL 272s does not register an offense for an escaped newline 272s does not register an offense for an escaped delimiter before interpolation 272s does not register a bracket-escaped lvar interpolation 272s does not register an offense for multiple unicode escapes 272s does not register an offense for an escaped gvar interpolation 272s does not register an offense for an escaped delimiter 272s does not register an offense for a $-escaped gvar interpolation 272s with a double quoted string 272s does not register an offense with multiple escaped backslashes 272s does not register an offense with escaped double quote 272s does not register an offense when escaping a quote in multi-line broken string 272s registers an offense and corrects an unnecessary escape in multi-line broken string 272s behaves like a literal with interpolation 272s does not register an offense for an escaped newline 272s registers an offense and corrects an escaped single quote 272s registers an offense and corrects an escaped # at end-of-string 272s does not register an offense for a unicode escape 272s registers an offense and corrects an escaped # before interpolation 272s does not register an offense for an escaped # followed { 272s does not register an offense for a newline 272s does not register an offense for an escaped backslash 272s does not register an offense for an ascii DEL 272s does not register an offense for multiple unicode escapes 272s does not register an offense for a @-escaped cvar interpolation 272s does not register a bracket-escaped lvar interpolation 272s does not register an offense for a meta character 272s does not register an offense for control characters 272s does not register an offense for meta control characters 272s does not register an offense for a bracket-escaped interpolation 272s does not register an offense for an escaped interpolation 272s does not register an offense for an escaped delimiter before interpolation 272s does not register an offense for an escaped delimiter 272s does not register an offense for a hex escape 272s does not register an offense for an escaped ivar interpolation 272s does not register an offense without escapes 272s does not register an offense for a @-escaped ivar interpolation 272s does not register an offense for an escaped gvar interpolation 272s does not register an offense for a technically-unnecessary escape 272s registers an offense and corrects an escaped # without following { 272s does not register an offense for an octal escape 272s registers an offense and corrects an escaped } when escaping both brackets to avoid interpolation 272s does not register an offense for an escaped cvar interpolation 272s does not register an offense for a $-escaped gvar interpolation 272s with a %(...) literal 272s behaves like a literal with interpolation 272s does not register an offense for a meta character 272s does not register an offense for a hex escape 272s does not register an offense for a $-escaped gvar interpolation 272s does not register an offense for a @-escaped ivar interpolation 272s does not register an offense for an escaped cvar interpolation 272s does not register an offense for an escaped delimiter 272s registers an offense and corrects a escaped nested delimiter in a double quoted string 272s does not register an offense for an escaped # followed { 272s does not register an offense for multiple unicode escapes 272s does not register an offense for meta control characters 272s registers an offense and corrects an escaped # before interpolation 272s does not register an offense for an escaped delimiter before interpolation 272s does not register an offense for an octal escape 272s registers an offense and corrects an escaped } when escaping both brackets to avoid interpolation 272s does not register an offense for an escaped interpolation 272s does not register an offense for a bracket-escaped interpolation 272s does not register an offense for an ascii DEL 272s registers an offense and corrects an escaped # at end-of-string 272s registers an offense and corrects an escaped # without following { 272s does not register an offense for a unicode escape 272s does not register an offense for a newline 272s does not register an offense for control characters 272s does not register an offense for a technically-unnecessary escape 272s does not register an offense for an escaped gvar interpolation 272s does not register a bracket-escaped lvar interpolation 272s does not register an offense for a @-escaped cvar interpolation 272s does not register an offense for an escaped backslash 272s does not register an offense without escapes 272s does not register an offense for an escaped ivar interpolation 272s registers an offense and corrects an escaped single quote 272s does not register an offense for an escaped newline 272s registers an offense and corrects an escaped double quote 272s with a %W(...) literal 272s does not register an offense for escaped spaces 272s behaves like a literal with interpolation 272s does not register an offense for an ascii DEL 272s does not register an offense for an escaped interpolation 272s does not register an offense for an escaped delimiter before interpolation 272s does not register an offense for control characters 272s does not register an offense for an escaped # followed { 272s registers an offense and corrects an escaped # at end-of-string 272s does not register an offense for a bracket-escaped interpolation 272s does not register an offense for an escaped ivar interpolation 272s does not register an offense for an escaped gvar interpolation 272s does not register an offense for a hex escape 272s does not register a bracket-escaped lvar interpolation 272s does not register an offense for a @-escaped cvar interpolation 272s does not register an offense for meta control characters 272s does not register an offense for a $-escaped gvar interpolation 272s does not register an offense for a @-escaped ivar interpolation 272s does not register an offense for an escaped newline 272s does not register an offense without escapes 272s registers an offense and corrects an escaped } when escaping both brackets to avoid interpolation 272s does not register an offense for an escaped backslash 272s registers an offense and corrects an escaped # before interpolation 272s does not register an offense for an escaped cvar interpolation 272s registers an offense and corrects an escaped single quote 272s does not register an offense for multiple unicode escapes 272s registers an offense and corrects an escaped # without following { 272s does not register an offense for an octal escape 272s does not register an offense for a newline 272s does not register an offense for an escaped delimiter 272s does not register an offense for a unicode escape 272s registers an offense and corrects an escaped double quote 272s does not register an offense for a technically-unnecessary escape 272s does not register an offense for a meta character 272s registers an offense and corrects a escaped nested delimiter in a double quoted string 272s with a single quoted string 272s behaves like a literal without interpolation 272s does not register an offense for multiple unicode escapes 272s does not register an offense for an escaped delimiter before interpolation 272s does not register an offense for a @-escaped ivar interpolation 272s does not register an offense for an escaped ivar interpolation 272s does not register an offense for a bracket-escaped interpolation 272s does not register an offense for a hex escape 272s does not register an offense for an escaped # followed { 272s does not register an offense for an escaped interpolation 272s does not register an offense with escaped double quote 272s does not register an offense for a technically-unnecessary escape 272s does not register an offense for meta control characters 272s does not register an offense for a meta character 272s does not register an offense with escaped # at end-of-string 272s does not register an offense for a $-escaped gvar interpolation 272s does not register an offense for an escaped cvar interpolation 272s does not register an offense for control characters 272s does not register an offense for an escaped newline 272s does not register an offense for a newline 272s does not register an offense with escaped single quote 272s does not register an offense for an escaped gvar interpolation 272s does not register an offense for an allowed escape inside multi-line literal 272s does not register an offense for an escaped backslash 272s does not register an offense without escapes 272s does not register an offense for a unicode escape 272s does not register an offense with escaped # without following { 272s does not register an offense for an ascii DEL 272s does not register an offense for an octal escape 272s does not register a bracket-escaped lvar interpolation 272s does not register an offense for a @-escaped cvar interpolation 272s does not register an offense for an escaped # with following { 272s does not register an offense for an escaped delimiter 272s with a %Q!...! literal 272s behaves like a literal with interpolation 272s does not register an offense for an escaped backslash 272s does not register an offense for an ascii DEL 272s does not register an offense for a $-escaped gvar interpolation 272s does not register a bracket-escaped lvar interpolation 272s does not register an offense for a bracket-escaped interpolation 272s registers an offense and corrects an escaped double quote 272s does not register an offense without escapes 272s registers an offense and corrects a escaped nested delimiter in a double quoted string 272s registers an offense and corrects an escaped single quote 272s does not register an offense for meta control characters 272s registers an offense and corrects an escaped # without following { 272s registers an offense and corrects an escaped # at end-of-string 272s does not register an offense for an escaped interpolation 272s does not register an offense for an escaped gvar interpolation 272s registers an offense and corrects an escaped } when escaping both brackets to avoid interpolation 272s does not register an offense for an escaped newline 272s does not register an offense for multiple unicode escapes 272s does not register an offense for a @-escaped cvar interpolation 273s does not register an offense for a meta character 273s does not register an offense for an octal escape 273s does not register an offense for a technically-unnecessary escape 273s does not register an offense for a @-escaped ivar interpolation 273s does not register an offense for a unicode escape 273s does not register an offense for an escaped ivar interpolation 273s does not register an offense for a newline 273s does not register an offense for an escaped # followed { 273s does not register an offense for an escaped cvar interpolation 273s does not register an offense for control characters 273s does not register an offense for a hex escape 273s registers an offense and corrects an escaped # before interpolation 273s does not register an offense for an escaped delimiter 273s does not register an offense for an escaped delimiter before interpolation 273s with a %Q(...) literal 273s behaves like a literal with interpolation 273s registers an offense and corrects an escaped } when escaping both brackets to avoid interpolation 273s does not register an offense for a technically-unnecessary escape 273s does not register an offense for a unicode escape 273s does not register an offense for an ascii DEL 273s does not register an offense for an escaped delimiter before interpolation 273s does not register an offense for an escaped delimiter 273s does not register an offense for a bracket-escaped interpolation 273s does not register an offense for an octal escape 273s does not register an offense for an escaped newline 273s does not register an offense without escapes 273s registers an offense and corrects an escaped double quote 273s does not register an offense for a newline 273s does not register an offense for a meta character 273s registers an offense and corrects an escaped single quote 273s does not register an offense for an escaped interpolation 273s does not register an offense for meta control characters 273s does not register an offense for an escaped ivar interpolation 273s does not register an offense for a hex escape 273s does not register an offense for multiple unicode escapes 273s does not register an offense for a $-escaped gvar interpolation 273s does not register an offense for a @-escaped cvar interpolation 273s does not register an offense for a @-escaped ivar interpolation 273s registers an offense and corrects an escaped # at end-of-string 273s does not register an offense for an escaped # followed { 273s does not register an offense for an escaped cvar interpolation 273s registers an offense and corrects an escaped # before interpolation 273s registers an offense and corrects a escaped nested delimiter in a double quoted string 273s does not register an offense for an escaped gvar interpolation 273s does not register a bracket-escaped lvar interpolation 273s registers an offense and corrects an escaped # without following { 273s does not register an offense for an escaped backslash 273s does not register an offense for control characters 273s with an interpolation-enabled HEREDOC 273s does not register an offense for a meta character 273s does not register an offense for a newline 273s does not register an offense for a unicode escape 273s registers an offense and corrects an escaped single quote 273s does not register an offense for multiple unicode escapes 273s does not register an offense for an escaped backslash 273s does not register an offense for an escaped newline 273s does not register an offense for a nested heredoc without interpolation 273s registers an offense and corrects an escaped # before interpolation 273s does not register an offense for an escaped # followed { 273s does not register a bracket-escaped lvar interpolation 273s does not register an offense for an escaped ivar interpolation 273s does not register an offense without escapes 273s registers an offense and corrects an escaped # without following { 273s does not register an offense for an escaped cvar interpolation 273s does not register an offense for a heredoc interpolating a string with an allowed escape 273s does not register an offense for meta control characters 273s does not register an offense for an escaped gvar interpolation 273s does not register an offense for a @-escaped ivar interpolation 273s does not register an offense for a hex escape 273s does not register an offense for a @-escaped cvar interpolation 273s does not register an offense for an escaped interpolation 273s does not register an offense for an ascii DEL 273s does not register an offense for a technically-unnecessary escape 273s does not register an offense for a bracket-escaped interpolation 273s registers an offense and corrects an escaped # at end-of-string 273s does not register an offense for an octal escape 273s does not register an offense for a $-escaped gvar interpolation 273s does not register an offense for control characters 273s 273s RuboCop::Cop::Lint::EnsureReturn 273s does not register an offense for return outside ensure 273s registers an offense and corrects for return with argument in ensure 273s does not check when ensure block has no body 273s registers an offense and corrects for return in ensure 273s registers an offense when returning multiple values in `ensure` 273s 273s RuboCop::Cop::VariableForce::Assignment 273s #name 273s returns the variable name 273s #operator 273s when it is += operator assignment 273s returns += 273s when it is multiple assignment 273s returns = 273s when it is normal assignment 273s returns = 273s when it is &&= operator assignment 273s returns &&= 273s when it is ||= operator assignment 273s returns ||= 273s #meta_assignment_node 273s when it is &&= operator assignment 273s returns and_asgn node 273s when it is += operator assignment 273s returns op_asgn node 273s when it is ||= operator assignment 273s returns or_asgn node 273s when it is multiple assignment 273s returns masgn node 273s .new 273s when any other type node is passed 273s raises error 273s when an argument declaration node is passed 273s raises error 273s when an assignment node is passed 273s does not raise error 273s 273s RuboCop::FeatureLoader 273s .load 273s with dot-prefixed loadable feature 273s loads it as relative path 273s with normally loadable feature 273s loads it normally 273s with unloadable namespaced feature 273s raises LoadError with preferred message 273s with namespaced feature 273s loads it as namespaced feature 273s with unexpected LoadError from require 273s raises LoadError 273s with dot-prefixed namespaced feature 273s loads it as namespaced feature 273s 273s RuboCop::Cop::Style::HashLikeCase 273s MinBranchesCount: 3 273s does not register an offense when branches count is less than required 273s MinBranchesCount: 2 273s registers an offense when using `case-when` with string conditions and literal bodies of the same type 273s registers an offense when using `case-when` with symbol conditions and literal bodies of the same type 273s does not register an offense when using `case-when` with non-literal bodies 273s does not register an offense when using `case-when` with literal bodies of different types 273s does not register an offense when using `case-when` with literals of different types as conditions 273s does not register an offense when using `case-when` with non-literals in conditions 273s does not register an offense when `case` has an `else` branch 273s 273s RuboCop::Cop::Layout::LineContinuationLeadingSpace 273s EnforcedStyle: trailing 273s registers an offense when 2nd line has multiple leading spaces 273s puts the offense message in correct position also on indented line 273s marks the correct range when string is a positional method argument 273s registers offenses when 2nd and 3rd line has leading spaces 273s registers offense in the right location when 1st line is not the string 273s registers an offense when 2nd line has one leading space 273s marks the correct range when string is a block method argument 273s interpolated strings 273s registers offenses when 2nd line has leading spaces and 2nd line is interpolated 273s registers no offense for correctly formatted multiline interpolated string 273s registers offenses when 2nd line has leading spaces and 1st line is interpolated 273s registers no offense on interpolated string alone 273s registers no offense on doubly interpolated string alone 273s registers no offense for correctly formatted multiline interpolation 273s registers an offense for incorrectly formatted multiline interpolated string 273s EnforcedStyle: leading 273s marks the correct range when string is a block method argument 273s marks the correct range when string is a positional method argument 273s registers offenses when 1st and 2nd line has trailing spaces 273s registers offense in the right location when 1st line is not the string 273s puts the offense message in correct position also on indented line 273s registers an offense when 1st line has multiple trailing spaces 273s registers an offense when 1st line has one trailing space 273s interpolated strings 273s registers offenses when 1st line has trailing spaces and 2nd line is interpolated 273s registers no offense for correctly formatted multiline interpolation 273s registers no offense for correctly formatted multiline interpolated string 273s registers an offense for incorrectly formatted multiline interpolated string 273s registers no offense on interpolated string alone 273s registers offenses when 1st line has leading spaces and 1st line is interpolated 273s registers no offense on doubly interpolated string alone 273s 273s RuboCop::Cop::Lint::LambdaWithoutLiteralBlock 273s does not register an offense when using lambda with a literal block 273s registers and corrects an offense when using lambda with `&proc {}` block argument 273s registers and corrects an offense when using lambda with `&Proc.new {}` block argument 273s registers and corrects an offense when using lambda with a proc variable block argument 273s does not register an offense when using lambda with a symbol proc 273s does not register an offense when using `lambda.call` 273s 273s RuboCop::Cop::Layout::LineContinuationSpacing 273s EnforcedStyle: space 273s registers an offense when too much space in front of backslash 273s registers no offense with one space in front of backslash 273s marks the offense correctly when offense is not in first line 273s registers an offense when no space in front of backslash 273s ignores heredocs and comments 273s ignores when too much space in front of backslash after `__END__` 273s ignores empty code 273s EnforcedStyle: no_space 273s registers no offense with zero spaces in front of backslash 273s ignores heredocs and comments 273s registers an offense when one space in front of backslash 273s ignores empty code 273s ignores when too much space in front of backslash after `__END__` 273s marks the offense correctly when offense is not in first line 273s registers an offense when many spaces in front of backslash 273s 273s RuboCop::Cop::Style::PercentLiteralDelimiters 273s `%r` interpolated regular expression 273s registers an offense for other delimiters 273s registers an offense for a regular expression with option 273s does not register an offense for preferred delimiters 273s registers an offense for other delimiters when containing preferred delimiter characters in interpolation 273s does not register an offense for other delimiters when containing preferred delimiter characters 273s autocorrect 273s preserves indentation when correcting a multiline array 273s fixes a string array in a scope 273s preserves line breaks when fixing a multiline array 273s preserves irregular indentation when correcting a multiline array 273s behaves like escape characters 273s corrects % with \n in it 273s corrects % with \t in it 273s behaves like escape characters 273s corrects %Q with \t in it 273s corrects %Q with \n in it 273s behaves like escape characters 273s corrects %w with \n in it 273s corrects %w with \t in it 273s behaves like escape characters 273s corrects %W with \n in it 273s corrects %W with \t in it 273s behaves like escape characters 273s corrects %q with \n in it 273s corrects %q with \t in it 273s behaves like escape characters 273s corrects %s with \n in it 273s corrects %s with \t in it 273s behaves like escape characters 273s corrects %r with \t in it 273s corrects %r with \n in it 273s behaves like escape characters 273s corrects %x with \t in it 273s corrects %x with \n in it 273s behaves like escape characters 273s corrects %i with \t in it 273s corrects %i with \n in it 273s `%q` string 273s does not register an offense for other delimiters when containing preferred delimiter characters 273s registers an offense for other delimiters 273s does not register an offense for preferred delimiters 273s `%Q` interpolated string 273s registers an offense for other delimiters when containing preferred delimiter characters in interpolation 273s does not register an offense for preferred delimiters 273s does not register an offense for other delimiters when containing preferred delimiter characters 273s registers an offense for other delimiters 273s `%x` interpolated system call 273s does not register an offense for preferred delimiters 273s registers an offense for other delimiters when containing preferred delimiter characters in interpolation 273s registers an offense for other delimiters 273s does not register an offense for other delimiters when containing preferred delimiter characters 273s invalid cop config 273s raises an error when invalid configuration is specified 273s `%I` interpolated symbol array 273s registers an offense for other delimiters when containing preferred delimiter characters in interpolation 273s does not register an offense for preferred delimiters 273s registers an offense for other delimiters 273s `%s` symbol 273s does not register an offense for preferred delimiters 273s registers an offense for other delimiters 273s `default` override 273s allows all preferred delimiters to be set with one key 273s allows individual preferred delimiters to override `default` 273s `%` interpolated string 273s registers an offense for other delimiters 273s does not register an offense for preferred delimiters 273s does not register an offense for other delimiters when containing preferred delimiter characters 273s registers an offense for other delimiters when containing preferred delimiter characters in interpolation 273s registers an offense for a string with no content 273s registers an offense when the source contains invalid characters 273s `%i` symbol array 273s does not register an offense for preferred delimiters 273s registers an offense for other delimiters 273s does not register an offense for non-preferred delimiters enclosing escaped delimiters 273s `%w` string array 273s does not register an offense for preferred delimiters with not a pairing delimiter 273s does not register an offense for preferred delimiters with only a closing delimiter 273s does not register an offense for preferred delimiters with a pairing delimiters 273s does not register an offense for other delimiters when containing preferred delimiter characters 273s registers an offense for other delimiters 273s does not register an offense for preferred delimiters 273s `%W` interpolated string array 273s registers an offense for other delimiters 273s does not register an offense for other delimiters when containing preferred delimiter characters 273s does not register an offense for preferred delimiters 273s registers an offense for other delimiters when containing preferred delimiter characters in interpolation 273s 273s RuboCop::Cop::Style::TrailingCommaInHashLiteral 273s with multi-line list of values 273s when EnforcedStyleForMultiline is no_comma 273s registers an offense for trailing comma in literal 273s accepts comma inside a heredoc parameters at the end 273s accepts comma in comment after last value item 273s accepts literal with no trailing comma 273s when EnforcedStyleForMultiline is comma 273s registers an offense for no trailing comma 273s accepts trailing comma after a heredoc 273s registers an offense for trailing comma in a comment 273s accepts a multiline hash with a single pair and trailing comma 273s accepts trailing comma 273s when closing bracket is on same line as last value 273s accepts literal with no trailing comma 273s when EnforcedStyleForMultiline is consistent_comma 273s accepts a multiline hash with pairs on a single line andtrailing comma 273s accepts trailing comma after a heredoc 273s accepts trailing comma 273s accepts a multiline hash with a single pair and trailing comma 273s registers an offense for no trailing comma 273s when closing bracket is on same line as last value 273s registers an offense for literal with no trailing comma 273s with single line list of values 273s when EnforcedStyleForMultiline is consistent_comma 273s accepts literal without trailing comma 273s accepts empty literal 273s accepts single element literal without trailing comma 273s registers an offense for trailing comma in a literal 273s when EnforcedStyleForMultiline is comma 273s accepts literal without trailing comma 273s accepts single element literal without trailing comma 273s registers an offense for trailing comma in a literal 273s accepts empty literal 273s when EnforcedStyleForMultiline is no_comma 273s accepts literal without trailing comma 273s registers an offense for trailing comma in a literal 273s accepts single element literal without trailing comma 273s accepts empty literal 273s 273s RuboCop::Formatter::GitHubActionsFormatter 273s #finished 273s when offenses are detected 273s reports offenses as errors 273s when message contains % 273s escapes message 273s when no offenses are detected 273s does not print anything 273s when fail level is defined 273s reports offenses above or at fail level as errors 273s reports offenses below fail level as warnings 273s when file is relative to the current directory 273s reports offenses as error with the relative path 273s 273s RuboCop::Cop::Lint::EmptyClass 273s registers an offense when empty metaclass contains only comments 273s does not register an offense when empty has a parent 273s does not register an offense when class is not empty 273s registers an offense for empty class metaclass 273s does not register an offense when metaclass is not empty 273s registers an offense for empty object metaclass 273s registers an offense for empty class 273s when AllowComments is true 273s does not register an offense when empty class contains only comments 273s does not register an offense when empty metaclass contains only comments 273s 273s RuboCop::TargetFinder 273s #find(..., :all_file_types) 273s does not find hidden files 273s returns absolute paths 273s when a non-ruby file is passed 273s picks the file 273s when input is passed on stdin 273s includes the file 273s when no argument is passed 273s finds files under the current directory 273s when same paths are passed 273s does not return duplicated file paths 273s when a directory path is passed 273s finds files under the specified directory 273s when a pattern is passed 273s finds files which match the pattern 273s when files with ruby interpreters are passed 273s picks all the ruby files 273s when some paths are specified in the configuration Exclude and they are explicitly passed as arguments 273s normally 273s does not exclude them 273s when it's forced to adhere file exclusion configuration 273s excludes them 273s when a file with a ruby filename is passed 273s picks all the ruby files 273s when some non-known Ruby files are specified in the configuration Include and they are explicitly passed as arguments 273s includes them 273s when files with a ruby extension are passed 273s picks all the ruby files 273s when local AllCops/Include lists two patterns 273s picks all the ruby files 273s when a subdirectory AllCops/Include only lists one pattern 273s picks all the ruby files 273s when some non-known Ruby files are specified in the configuration Include and they are not explicitly passed as arguments 273s includes them 273s when a hidden directory path is passed 273s finds files under the specified directory 273s #find(..., :only_recognized_file_types) 273s does not find hidden files 273s returns absolute paths 273s when a directory path is passed 273s finds files under the specified directory 273s when some non-known Ruby files are specified in the configuration Include and they are explicitly passed as arguments 273s includes them 273s when input is passed on stdin 273s includes the file 273s when files with a ruby extension are passed 273s picks all the ruby files 273s when local AllCops/Include lists two patterns 273s picks two files 273s when a subdirectory AllCops/Include only lists one pattern 273s picks two files 273s when a non-ruby file is passed 273s doesn't pick the file 273s when some non-known Ruby files are specified in the configuration Include and they are not explicitly passed as arguments 273s includes them 273s when same paths are passed 273s does not return duplicated file paths 273s when a file with a ruby filename is passed 273s picks all the ruby files 273s when a hidden directory path is passed 273s finds files under the specified directory 273s when a pattern is passed 273s finds files which match the pattern 273s when no argument is passed 273s finds files under the current directory 273s when a hidden directory path is passed 273s finds files under the specified directory 273s when some paths are specified in the configuration Exclude and they are explicitly passed as arguments 273s normally 273s does not exclude them 273s when it's forced to adhere file exclusion configuration 273s excludes them 273s when files with ruby interpreters are passed 273s picks all the ruby files 273s #target_files_in_dir 273s does not pick files with no extension and no ruby shebang 273s picks files specified to be included in config 273s does not pick files specified to be excluded in config 273s picks ruby executable files with no extension 273s picks files with extension .rb 273s does not pick directories 273s w/ --fail-fast option 273s works with the expected number of .rb files 273s when an exception is raised while reading file 273s and debug mode is enabled 273s outputs error message 273s and debug mode is disabled 273s outputs nothing 273s #find_files 273s works also if a folder is named "," 273s does not search excluded top level directories 273s works also if a folder is named "{}" 273s prevents infinite loops when traversing symlinks 273s resolves symlinks when looking for excluded directories 273s works also if a folder is named "**" 273s can exclude symlinks as well as directories 273s 273s RuboCop::Cop::Layout::SpaceAroundMethodCallOperator 273s does not register an offense when using `__ENCODING__` 273s does not register an offense when no method call operator 273s safe navigation operator 273s registers an offense and corrects when space around multiple method call operator 273s registers an offense and corrects when spaces around method call 274s registers an offense and corrects when space before method call 274s registers an offense and corrects when space before last method call operator 274s registers an offense and corrects when space after method call 274s does not register an offense when no space around any `.` operators 274s registers an offense and corrects when spaces after method call 274s registers an offense and corrects when space after first method call operator 274s registers an offense and corrects when space after last method call operator 274s registers an offense and corrects when space around intermediate method call operator 274s registers an offense and corrects when space before first method call operator 274s registers an offense and corrects when spaces before method call 274s does not register an offense when no space around method call 274s when multi line method call 274s registers an offense and corrects when space before method call 274s does not register an offense when no space after the `&.` 274s registers an offense and corrects when space before method call in suffix chaining 274s dot operator 274s does not register an offense when no space around method call 274s registers an offense and corrects when space before method call 274s registers an offense and corrects when space after method call 274s registers an offense and corrects when spaces after `Proc#call` shorthand call 274s registers an offense and corrects when space before last method call operator 274s registers an offense and corrects when spaces around method call 274s registers an offense and corrects when space after first method call operator 274s registers an offense and corrects when space around intermediate method call operator 274s does not register an offense when no space around any `.` operators 274s registers an offense and corrects when spaces before method call 274s registers an offense and corrects when spaces after method call 274s registers an offense and corrects when space after last method call operator 274s registers an offense and corrects when space around multiple method call operator 274s registers an offense and corrects when space before first method call operator 274s when multi line method call 274s registers an offense and corrects when space before method call in suffix chaining 274s registers an offense and corrects when space before method call 274s does not register an offense when no space after the `.` 274s when there is a space between `.` operator and a comment 274s does not register an offense when there is not a space before `.` 274s registers an offense when there is a space before `.` 274s :: operator 274s registers an offense and corrects when space around intermediate method call operator 274s does not register an offense when no space around any `.` operators 274s registers an offense and corrects when space after method call 274s registers an offense and corrects when multiple spaces with assignment 274s does not register an offense if no space before `::` operator with assignment 274s registers an offense and corrects when space around multiple method call operator 274s registers an offense and corrects when space after last method call operator 274s registers an offense and corrects when spaces after method call 274s registers an offense and corrects when space after first operator with assignment 274s does not register an offense when no space around method call 274s does not register an offense if no space with conditionals 274s does not register an offense if no space before `::` operator with inheritance 274s when multi line method call 274s does not register an offense when no space after the `::` 274s registers an offense and corrects when space before method call 274s 274s RuboCop::Cop::Style::RedundantSelf 274s accepts a self receiver with the square bracket operator 274s does not report an offense when self receiver in a method argument and lvalue have the same name 274s does not report an offense when lvasgn name is used in `unless` 274s reports an offense a self receiver on an rvalue 274s reports an offense when a different masgn name is used in `if` 274s does not report an offense when masgn name is used in `if` 274s reports an offense a self receiver of .call 274s does not report an offense when masgn name is used in `while` 274s accepts a self receiver on an lvalue of an and-assignment 274s accepts a self receiver used to distinguish from argument of block 274s accepts a self receiver on an lvalue of an assignment 274s does not report an offense when masgn name is used in `unless` 274s does not report an offense when lvasgn name is nested below `if` 274s accepts a self receiver with the double less-than operator 274s accepts a self receiver of methods also defined on `Kernel` 274s accepts a self receiver of .() 274s accepts a self receiver for methods named like ruby keywords 274s accepts a self receiver on an lvalue of a parallel assignment 274s does not report an offense when lvasgn name is used in `until` 274s accepts a self receiver on an lvalue of an or-assignment 274s reports an offense when a different lvasgn name is used in `if` 274s does not report an offense when lvasgn name is used in `while` 274s accepts a self receiver used to distinguish from constant 274s accepts a self receiver on an lvalue of a plus-assignment 274s accepts a self receiver on an lvalue of mlhs arguments 274s does not report an offense when receiver and lvalue have the same name 274s does not report an offense when lvasgn name is used in `if` 274s does not report an offense when receiver and multiple assigned lvalue have the same name 274s accepts when nested receiver and lvalue have the name name 274s does not report an offense when self receiver in a method argument and multiple assigned lvalue have the same name 274s does not report an offense when masgn name is used in `until` 274s Ruby 2.7 274s registers offense for self usage in numblocks 274s instance methods 274s accepts a self receiver used to distinguish from argument 274s accepts a self receiver used to distinguish from blockarg 274s accepts a self receiver used to distinguish from an argument when an inner method is defined 274s accepts a self receiver used to distinguish from local variable 274s accepts a self receiver used to distinguish from an argument 274s accepts a self receiver used to distinguish from optional argument 274s with ruby >= 2.7 274s with pattern matching 274s accepts a self receiver on a `array-pattern` 274s accepts a self receiver on a `hash-pattern` 274s registers an offense when using a self receiver with a pin 274s accepts a self receiver in a `if-guard` 274s accepts a self receiver with a `match-alt` 274s accepts a self receiver in a conditional pattern 274s accepts a self receiver in a nested pattern` 274s registers an offense when using self with a different match var 274s accepts a self receiver on an `match-var` 274s class methods 274s accepts a self receiver used to distinguish from optional argument 274s accepts a self receiver used to distinguish from argument 274s accepts a self receiver used to distinguish from local variable 274s accepts a self receiver used to distinguish from blockarg 274s 274s RuboCop::Cop::Style::EmptyMethod 274s when configured with compact style 274s with a non-empty instance method definition 274s allows multi line method with comment 274s allows multi line method 274s allows single line method 274s with an empty class method definition 274s allows single line method 274s registers an offense for empty method 274s registers an offense for method with blank line 274s registers an offense for empty method with arguments 274s with a non-empty class method definition 274s allows multi line method 274s allows single line method 274s allows multi line method with comment 274s relation with Layout/LineLength 274s when the correction would exceed the configured maximum 274s reports an offense but does not correct 274s when that cop is disabled 274s corrects to long lines 274s with an empty instance method definition 274s registers an offense for empty method 274s registers an offense for method with blank line 274s registers an offense for method with closing paren on following line 274s registers an offense for method with arguments without parens 274s registers an offense for method with arguments 274s allows single line method 274s when configured with expanded style 274s with a non-empty class method definition 274s allows multi line method 274s allows single line method 274s allows multi line method with comment 274s with an empty instance method definition 274s allows multi line method with blank line 274s registers an offense for single line method 274s allows multi line method 274s with a non-empty instance method definition 274s allows single line method 274s allows multi line method with a comment 274s allows multi line method 274s relation with Layout/LineLength 274s still corrects even if the method is longer than the configured Max 274s when method is nested in class scope 274s registers an offense for single line method 274s with an empty class method definition 274s registers an offense for single line method 274s allows empty multi line method 274s allows multi line method with a blank line 274s 274s RuboCop::Cop::Style::RedundantInterpolation 274s registers an offense for "#{$var}" 274s registers an offense for "#@var" 274s registers an offense for "#{1 + 1}" 274s accepts strings implicitly concatenated with a later string 274s accepts strings with characters after the interpolation 274s registers an offense for "#{var}" 274s registers an offense for "#{$1}" 274s registers an offense for "#{foo.do_something 42}" 274s registers an offense for "%Q(#{1 + 1})" 274s registers an offense for "#{@var}" 274s registers an offense for "#$1" 274s registers an offense for "#{@@var}" 274s registers an offense for "#{do_something 42}" 274s registers an offense for "#@@var" 274s registers an offense for "#$var" 274s accepts strings with characters before the interpolation 274s registers an offense for "#{1 + 1; 2 + 2}" 274s registers an offense for "#$+" 274s registers an offense for "#{do_something(42)}" 274s registers an offense for "#{$+}" 274s registers an offense for "%|#{1 + 1}|" 274s accepts strings that are part of a %W() 274s registers an offense for "#{number}" 274s registers an offense for ["#{@var}"] 274s accepts strings implicitly concatenated with an earlier string 274s 274s RuboCop::Cop::Style::WhileUntilDo 274s registers an offense for do in multiline until 274s registers an offense for do in multiline while 274s accepts do in single-line until 274s accepts multi-line until without do 274s accepts do in single-line while 274s accepts multi-line while without do 274s 274s RuboCop::Cop::Style::StaticClass 274s does not register an offense when class is empty 274s registers an offense when class has `class << self` with class methods 274s does not register an offense when class has `class << self` with macro calls 274s does not register an offense for modules 274s does not register an offense when class has a parent 274s registers an offense when class extends a module 274s registers an offense when class has assignments along with class methods 274s does not register an offense when class includes/prepends a module 274s does not register an offense when class has instance method 274s does not register an offense when class has macro-like method 274s registers an offense when class has only class method 274s 274s RuboCop::Cop::Style::RedundantFreeze 274s allows .freeze on method call 274s when the receiver is a string literal 274s Regexp and Range literals 274s Ruby 3.0 or higher 274s behaves like immutable objects 274s registers an offense for frozen (1...5) 274s behaves like immutable objects 274s registers an offense for frozen (1..5) 274s behaves like immutable objects 274s registers an offense for frozen /./ 274s Ruby 2.7 or lower 274s behaves like mutable objects 274s allows (1...5) with freeze 274s behaves like mutable objects 274s allows (1..5) with freeze 274s behaves like mutable objects 274s allows /./ with freeze 274s Ruby 3.0 or higher 274s when the frozen string literal comment is false 274s behaves like mutable objects 274s allows "#{a}" with freeze 274s when the frozen string literal comment is missing 274s behaves like mutable objects 274s allows "#{a}" with freeze 274s when the frozen string literal comment is true 274s behaves like mutable objects 274s allows "#{a}" with freeze 274s Ruby 2.7 or lower 274s when the frozen string literal comment is missing 274s behaves like mutable objects 274s allows "#{a}" with freeze 274s when the frozen string literal comment is false 274s behaves like mutable objects 274s allows "#{a}" with freeze 274s when the frozen string literal comment is true 274s behaves like immutable objects 274s registers an offense for frozen "#{a}" 274s behaves like immutable objects 274s registers an offense for frozen [1, 2, 3].size 274s behaves like mutable objects 274s allows ('a' * 20) with freeze 274s behaves like immutable objects 274s registers an offense for frozen (2 > 1) 274s behaves like mutable objects 274s allows [1, 2, 3] with freeze 274s behaves like mutable objects 274s allows ([42] * 42) with freeze 274s behaves like immutable objects 274s registers an offense for frozen 1.5 274s behaves like immutable objects 274s registers an offense for frozen 1 274s behaves like immutable objects 274s registers an offense for frozen 'foo'.count 274s behaves like immutable objects 274s registers an offense for frozen ('a' > 'b') 274s behaves like mutable objects 274s allows ('a' + 'b') with freeze 274s behaves like mutable objects 274s allows "top#{1 + 2}" with freeze 274s behaves like immutable objects 274s registers an offense for frozen (1 + 2) 274s behaves like immutable objects 274s registers an offense for frozen :sym 274s behaves like mutable objects 274s allows (a + b) with freeze 274s behaves like mutable objects 274s allows { a: 1, b: 2 } with freeze 274s behaves like mutable objects 274s allows 'str' with freeze 274s behaves like mutable objects 274s allows ::ENV['foo'] with freeze 274s behaves like immutable objects 274s registers an offense for frozen (a > b) 274s behaves like immutable objects 274s registers an offense for frozen :"" 274s behaves like mutable objects 274s allows ENV['foo'] with freeze 274s 274s RuboCop::Cop::Style::MultipleComparison 274s does not register an offense for Array#include? 274s registers an offense and corrects when multiple comparison is not part of a conditional 274s registers an offense and corrects when `a` is compared three times, once on the righthand side 274s does not register an offense for comparing lvars when a string is on the lefthand side 274s does not register an offense for comparing multiple literal strings 274s does not register an offense when comparing two sides of the disjunction is unrelated 274s registers an offense and corrects when `a` is compared three times 274s does not register an offense for a duplicated condition 274s does not register an offense for comparing multiple int literals 274s does not register an offense for comparing an lvar 274s registers an offense and corrects when `a` is compared three times on the right hand side 274s registers an offense and corrects when `a` is compared twice in `if` and `elsif` conditions 274s does not register an offense for comparing lvars 274s does not register an offense for a == b || b == a 274s registers an offense and corrects when `a` is compared twice 274s when `AllowMethodComparison: true` 274s does not register an offense when using multiple method calls 274s when `AllowMethodComparison: false` 274s registers an offense and corrects when using multiple method calls 274s 274s RuboCop::Cop::Lint::SafeNavigationWithEmpty 274s in a conditional 274s registers an offense and corrects on `&.empty?` 274s does not register an offense on `.empty?` 274s outside a conditional 274s registers no offense 274s 274s RuboCop::Cop::Lint::EmptyFile 274s does not register an offense when the file contains code 274s registers an offense when the file is empty 274s does not register an offense when the file contains comments 274s when AllowComments is false 274s registers an offense when the file contains comments 274s 274s RuboCop::Cop::Style::ClassCheck 274s when enforced style is is_a? 274s registers an offense for kind_of? and corrects to is_a? 274s when enforced style is kind_of? 274s registers an offense for is_a? and corrects to kind_of? 274s 274s RuboCop::Cop::Layout::SpaceInsideArrayLiteralBrackets 274s does not register offense for any kind of reference brackets 274s with space inside empty brackets not allowed 274s registers an offense and corrects multiline spaces 274s accepts empty brackets with no space inside 274s registers an offense and corrects empty brackets with 1 space inside 274s registers an offense and corrects empty brackets with multiple spaces inside 274s with space inside empty braces allowed 274s registers an offense and corrects empty brackets with more than one space inside 274s accepts empty brackets with space inside 274s registers an offense and corrects empty brackets with no space inside 274s when EnforcedStyle is no_space 274s accepts a multiline array with whitespace before end bracket 274s does not register offense when contains an array literal as an argument after a heredoc is started 274s does not register offense for valid multiline array 274s accepts square brackets as method name 274s does not register offense for arrays with no spaces 274s accepts square brackets called with method call syntax 274s does not register offense for arrays using ref brackets 274s registers an offense and corrects an array literal as an argument with trailing whitespace after a heredoc is started 274s registers an offense and corrects an array when two on one line 274s does not register offense for indented array when bottom bracket gets its own line & is misaligned 274s does not register offense when 2 arrays on one line 274s does not register offense for valid 2-dimensional array 274s does not register offense for array when brackets get own line 274s registers an offense and corrects multiline array on end bracket with trailing method 274s registers an offense and corrects array brackets with leading whitespace 274s registers an offense and corrects 2 arrays on one line 274s accepts space inside array brackets if with comment 274s does not register offense when bottom bracket gets its own line & has trailing method 274s registers an offense and corrects multiline array on end bracket 274s does not register offense when bottom bracket gets its own line indented with tabs 274s registers an offense and corrects array brackets with trailing whitespace 274s when EnforcedStyle is compact 274s registers an offense and corrects 3-dimensional array with extra spaces 274s does not register offense for valid 2-dimensional array 274s registers an offense and corrects space between 2 closing brackets 274s registers an offense and corrects 2-dimensional array with extra spaces 274s registers an offense and corrects space between 2 opening brackets 274s accepts multiline array 274s does not register offense for valid 3-dimensional array 274s does not register offense for valid 4-dimensional array 274s multiline, 2-dimensional array with spaces 274s registers an offense and corrects at the beginning of array 274s registers an offense and corrects at the end of array 274s multiline, 2-dimensional array with newlines 274s registers an offense and corrects at the end of array 274s registers an offense and corrects at the beginning of array 274s behaves like space inside arrays 274s does not register offense for arrays using ref brackets 274s accepts square brackets called with method call syntax 274s register an offense and corrects when 2 arrays are on one line 274s registers an offense and corrects array brackets with no leading whitespace 274s does not register offense for indented array when bottom bracket gets its own line & is misaligned 274s does not register offense for valid multiline array 274s does not register offense for array when brackets get their own line 274s registers an offense and corrects array brackets with no trailing whitespace 274s registers an offense and corrects multiline array on end bracket 274s does not register offense when 2 arrays on one line 274s does not register offense for arrays with spaces 274s does not register offense when bottom bracket gets its own line & has trailing method 274s accepts square brackets as method name 274s registers an offense and corrects an array missing whitespace when there is more than one array on a line 274s accepts space inside array brackets with comment 274s registers an offense and corrects multiline array on end bracket with trailing method 274s when EnforcedStyle is space 274s does not register offense for valid 2-dimensional array 274s behaves like space inside arrays 274s does not register offense for indented array when bottom bracket gets its own line & is misaligned 274s accepts square brackets as method name 274s does not register offense for arrays using ref brackets 274s registers an offense and corrects multiline array on end bracket with trailing method 274s registers an offense and corrects an array missing whitespace when there is more than one array on a line 274s does not register offense when 2 arrays on one line 274s does not register offense for arrays with spaces 274s accepts space inside array brackets with comment 274s registers an offense and corrects array brackets with no trailing whitespace 274s registers an offense and corrects multiline array on end bracket 274s register an offense and corrects when 2 arrays are on one line 274s accepts square brackets called with method call syntax 274s does not register offense when bottom bracket gets its own line & has trailing method 275s registers an offense and corrects array brackets with no leading whitespace 275s does not register offense for valid multiline array 275s does not register offense for array when brackets get their own line 275s 275s RuboCop::Cop::Layout::ElseAlignment 275s accepts a ternary if 275s with def/rescue/else/end 275s accepts a correctly aligned else 275s registers an offense for misaligned else 275s with if statement 275s registers an offense for misaligned else 275s accepts indentation after else when if is on new line after assignment 275s accepts a one line if statement 275s registers an offense for misaligned elsif 275s accepts an if/else branches with rescue clauses 275s accepts a correctly aligned if/elsif/else/end 275s with assignment 275s when alignment style is variable 275s and end is aligned with variable 275s accepts an if/else 275s accepts an if-else with end aligned with setter 275s accepts an if/else with chaining after the end 275s accepts an if-elsif-else with end aligned with setter 275s accepts an if/else with chaining with a block after the end 275s accepts an if with end aligned with element assignment 275s and end is aligned with keyword 275s registers an offense for an if 275s registers an offense for an if with element assignment 275s registers offenses for an if with setter 275s when alignment style is keyword by choice 275s and end is aligned with keyword 275s accepts an if/else in assignment 275s accepts a while in assignment 275s accepts an if in assignment 275s accepts an if/else in assignment on next line 275s accepts an until in assignment 275s and end is aligned with variable 275s registers an offense for an if 275s for a file with byte order mark 275s accepts a correctly aligned if/elsif/else/end 275s with case 275s accepts correctly aligned case/when/else 275s registers an offense for misaligned else 275s accepts else aligned with when but not with case 275s accepts case without else 275s >= Ruby 2.7 275s with case match 275s registers an offense for misaligned else 275s accepts case match without else 275s accepts correctly aligned empty else 275s accepts correctly aligned case/when/else 275s with def/defs 275s accepts an empty defs body 275s accepts an empty def body 275s when modifier and def are on the same line 275s registers an offense for else not aligned with private 275s accepts a correctly aligned body 275s ensure/rescue/else in Block Argument 275s accepts a correctly aligned else with assignment 275s registers an offense for misaligned else 275s accepts a correctly aligned else 275s with def/rescue/else/ensure/end 275s accepts a correctly aligned else 275s registers an offense for misaligned else 275s with begin/rescue/else/ensure/end 275s registers an offense for misaligned else 275s accepts a correctly aligned else 275s with unless 275s accepts a correctly aligned else in an otherwise empty unless 275s accepts an empty unless 275s registers an offense for misaligned else 275s 275s RuboCop::Cop::Style::ExplicitBlockArgument 275s correctly corrects when using safe navigation method call 275s does not register an offense when `yield` is not inside block 275s adds to the existing arguments when correcting 275s does not register an offense when `yield` is the sole block body 275s registers an offense and corrects when multiple arguments are yielded 275s does not register an offense when `yield` arguments is not a prefix of block arguments 275s does not add extra parens to `super` when correcting 275s does not add extra parens when correcting 275s registers an offense and corrects when method contains multiple `yield`s 275s does not register an offense when there is more than one block argument and not all are yielded 275s does not register an offense when arguments are yielded in a different order 275s registers an offense and corrects when `yield` inside block has no arguments 275s registers an offense and corrects when block just yields its arguments 275s registers an offense and corrects when `yield` is inside block of `super` 275s correctly corrects when the method call has a trailing comma in its argument list 275s does not register an offense when code is called outside of a method 275s correctly corrects when method already has an explicit block argument 275s 275s RuboCop::Cop::Lint::NonLocalExitFromIterator 275s allows return with value 275s allows return in define_singleton_method 275s allows return in define_method 275s when lambda is inside of block followed by method chain 275s allows 275s when block is lambda 275s allows 275s when block is not followed by method chain 275s allows 275s when block is followed by method chain 275s and has single argument 275s registers an offense 275s and has no argument 275s allows 275s and has multiple arguments 275s registers an offense 275s when block in middle of nest is followed by method chain 275s registers offenses 275s when the return is within a nested method definition 275s allows return in a class method definition 275s allows return in an instance method definition 275s 275s RuboCop::Cop::Lint::DuplicateBranch 275s registers an offense when `unless` has duplicate `else` branch 275s does not register an offense when `unless` has no duplicate branches 275s does not register an offense for modifier `unless` 275s registers an offense when `rescue` has duplicate `else` branch 275s registers an offense when `rescue` has multiple duplicate `resbody` branches 275s registers an offense when `rescue` has duplicate `resbody` branch 275s does not register an offense when `rescue` has no duplicate branches 275s does not register an offense when ternary has no duplicate branches 275s does not register an offense for simple `if` without other branches 275s registers an offense when `if` has duplicate `elsif` branch 275s does not register an offense when `if` has no duplicate branches 275s registers an offense when `case` has multiple duplicate branches 275s registers an offense when `case` has duplicate `else` branch 275s registers an offense when `if` has multiple duplicate branches 275s does not register an offense when `case` has no duplicate branches 275s does not register an offense for empty `if` 275s registers an offense when `if` has duplicate `else` branch 275s does not register an offense for empty `unless` 275s registers an offense when `case` has duplicate `when` branch 275s registers an offense when ternary has duplicate branches 275s does not register an offense for modifier `if` 275s does not register an offense for simple `unless` without other branches 275s with IgnoreLiteralBranches: true 275s with `case` 275s behaves like literal case allowed 275s when returning a regexp with modifier in multiple branches 275s allows branches to be duplicated 275s behaves like literal case allowed 275s when returning a false in multiple branches 275s allows branches to be duplicated 275s behaves like literal case allowed 275s when returning a symbol in multiple branches 275s allows branches to be duplicated 275s and IgnoreConstBranches: false 275s behaves like literal case disallowed 275s when returning a hash of constants in multiple branches 275s registers an offense 275s behaves like literal case disallowed 275s when returning a array of constants in multiple branches 275s registers an offense 275s behaves like literal case disallowed 275s when returning a xstr in multiple branches 275s registers an offense 275s behaves like literal case allowed 275s when returning a empty array in multiple branches 275s allows branches to be duplicated 275s behaves like literal case disallowed 275s when returning a dstr in multiple branches 275s registers an offense 275s behaves like literal case allowed 275s when returning a array of literals in multiple branches 275s allows branches to be duplicated 275s behaves like literal case allowed 275s when returning a float in multiple branches 275s allows branches to be duplicated 275s behaves like literal case allowed 275s when returning a regexp in multiple branches 275s allows branches to be duplicated 275s behaves like literal case allowed 275s when returning a integer in multiple branches 275s allows branches to be duplicated 275s behaves like literal case allowed 275s when returning a simple erange in multiple branches 275s allows branches to be duplicated 275s behaves like literal case disallowed 275s when returning a complex array in multiple branches 275s registers an offense 275s behaves like literal case disallowed 275s when returning a complex erange in multiple branches 275s registers an offense 275s behaves like literal case allowed 275s when returning a string in multiple branches 275s allows branches to be duplicated 275s behaves like literal case allowed 275s when returning a empty hash in multiple branches 275s allows branches to be duplicated 275s behaves like literal case disallowed 275s when returning a method call in multiple branches 275s registers an offense 275s behaves like literal case disallowed 275s when returning a dsym in multiple branches 275s registers an offense 275s behaves like literal case disallowed 275s when returning a complex regexp in multiple branches 275s registers an offense 275s behaves like literal case allowed 275s when returning a complex in multiple branches 275s allows branches to be duplicated 275s behaves like literal case disallowed 275s when returning a variable in multiple branches 275s registers an offense 275s behaves like literal case allowed 275s when returning a rational in multiple branches 275s allows branches to be duplicated 275s and IgnoreConstBranches: true 275s behaves like literal case allowed 275s when returning a hash of constants in multiple branches 275s allows branches to be duplicated 275s behaves like literal case allowed 275s when returning a array of constants in multiple branches 275s allows branches to be duplicated 275s behaves like literal case allowed 275s when returning a true in multiple branches 275s allows branches to be duplicated 275s behaves like literal case disallowed 275s when returning a complex hash in multiple branches 275s registers an offense 275s behaves like literal case allowed 275s when returning a nil in multiple branches 275s allows branches to be duplicated 275s behaves like literal case allowed 275s when returning a simple irange in multiple branches 275s allows branches to be duplicated 275s behaves like literal case disallowed 275s when returning a complex irange in multiple branches 275s registers an offense 275s behaves like literal case allowed 275s when returning a hash of literals in multiple branches 275s allows branches to be duplicated 275s with `rescue` 275s behaves like literal rescue allowed 275s when returning a integer in multiple branches 275s allows branches to be duplicated 275s behaves like literal rescue allowed 275s when returning a string in multiple branches 275s allows branches to be duplicated 275s behaves like literal rescue disallowed 275s when returning a complex irange in multiple branches 275s registers an offense 275s behaves like literal rescue allowed 275s when returning a empty array in multiple branches 275s allows branches to be duplicated 275s behaves like literal rescue allowed 275s when returning a false in multiple branches 275s allows branches to be duplicated 275s behaves like literal rescue allowed 275s when returning a rational in multiple branches 275s allows branches to be duplicated 275s behaves like literal rescue allowed 275s when returning a empty hash in multiple branches 275s allows branches to be duplicated 275s behaves like literal rescue allowed 275s when returning a regexp with modifier in multiple branches 275s allows branches to be duplicated 275s behaves like literal rescue disallowed 275s when returning a xstr in multiple branches 275s registers an offense 275s behaves like literal rescue allowed 275s when returning a hash of literals in multiple branches 275s allows branches to be duplicated 275s behaves like literal rescue disallowed 275s when returning a method call in multiple branches 275s registers an offense 275s behaves like literal rescue disallowed 275s when returning a dstr in multiple branches 275s registers an offense 275s behaves like literal rescue disallowed 275s when returning a complex erange in multiple branches 275s registers an offense 275s behaves like literal rescue allowed 275s when returning a nil in multiple branches 275s allows branches to be duplicated 275s behaves like literal rescue allowed 275s when returning a simple erange in multiple branches 275s allows branches to be duplicated 275s behaves like literal rescue disallowed 275s when returning a dsym in multiple branches 275s registers an offense 275s behaves like literal rescue disallowed 275s when returning a complex regexp in multiple branches 275s registers an offense 275s behaves like literal rescue allowed 275s when returning a symbol in multiple branches 275s allows branches to be duplicated 275s behaves like literal rescue allowed 275s when returning a true in multiple branches 275s allows branches to be duplicated 275s behaves like literal rescue disallowed 275s when returning a complex hash in multiple branches 275s registers an offense 275s behaves like literal rescue allowed 275s when returning a simple irange in multiple branches 275s allows branches to be duplicated 275s and IgnoreConstBranches: false 275s behaves like literal rescue disallowed 275s when returning a array of constants in multiple branches 275s registers an offense 275s behaves like literal rescue disallowed 275s when returning a hash of constants in multiple branches 275s registers an offense 275s behaves like literal rescue allowed 275s when returning a array of literals in multiple branches 275s allows branches to be duplicated 275s behaves like literal rescue allowed 275s when returning a complex in multiple branches 275s allows branches to be duplicated 275s behaves like literal rescue allowed 275s when returning a float in multiple branches 275s allows branches to be duplicated 275s behaves like literal rescue disallowed 275s when returning a variable in multiple branches 275s registers an offense 275s behaves like literal rescue allowed 275s when returning a regexp in multiple branches 275s allows branches to be duplicated 275s and IgnoreConstBranches: true 275s behaves like literal rescue allowed 275s when returning a hash of constants in multiple branches 275s allows branches to be duplicated 275s behaves like literal rescue allowed 275s when returning a array of constants in multiple branches 275s allows branches to be duplicated 275s behaves like literal rescue disallowed 275s when returning a complex array in multiple branches 275s registers an offense 275s with `if` 275s behaves like literal if allowed 275s when returning a hash of literals in multiple branches 275s allows branches to be duplicated 275s behaves like literal if disallowed 275s when returning a complex regexp in multiple branches 275s registers an offense 275s behaves like literal if allowed 275s when returning a nil in multiple branches 275s allows branches to be duplicated 275s behaves like literal if allowed 275s when returning a false in multiple branches 275s allows branches to be duplicated 275s behaves like literal if disallowed 275s when returning a complex irange in multiple branches 275s registers an offense 275s and IgnoreConstBranches: true 275s behaves like literal if allowed 275s when returning a array of constants in multiple branches 275s allows branches to be duplicated 275s behaves like literal if allowed 275s when returning a hash of constants in multiple branches 275s allows branches to be duplicated 275s behaves like literal if allowed 275s when returning a regexp in multiple branches 275s allows branches to be duplicated 275s and IgnoreConstBranches: false 275s behaves like literal if disallowed 275s when returning a array of constants in multiple branches 275s registers an offense 275s behaves like literal if disallowed 275s when returning a hash of constants in multiple branches 275s registers an offense 275s behaves like literal if allowed 275s when returning a true in multiple branches 275s allows branches to be duplicated 275s behaves like literal if disallowed 275s when returning a dsym in multiple branches 275s registers an offense 275s behaves like literal if allowed 275s when returning a complex in multiple branches 275s allows branches to be duplicated 275s behaves like literal if allowed 275s when returning a empty array in multiple branches 275s allows branches to be duplicated 275s behaves like literal if allowed 275s when returning a simple irange in multiple branches 275s allows branches to be duplicated 275s behaves like literal if allowed 275s when returning a integer in multiple branches 275s allows branches to be duplicated 275s behaves like literal if disallowed 275s when returning a variable in multiple branches 275s registers an offense 275s behaves like literal if allowed 275s when returning a float in multiple branches 275s allows branches to be duplicated 275s behaves like literal if allowed 275s when returning a rational in multiple branches 275s allows branches to be duplicated 275s behaves like literal if allowed 275s when returning a symbol in multiple branches 275s allows branches to be duplicated 275s behaves like literal if disallowed 275s when returning a complex hash in multiple branches 275s registers an offense 275s behaves like literal if allowed 275s when returning a string in multiple branches 275s allows branches to be duplicated 275s behaves like literal if disallowed 275s when returning a complex array in multiple branches 275s registers an offense 275s behaves like literal if disallowed 275s when returning a xstr in multiple branches 275s registers an offense 275s behaves like literal if disallowed 275s when returning a method call in multiple branches 275s registers an offense 275s behaves like literal if disallowed 275s when returning a complex erange in multiple branches 275s registers an offense 275s behaves like literal if allowed 275s when returning a regexp with modifier in multiple branches 275s allows branches to be duplicated 275s behaves like literal if allowed 275s when returning a empty hash in multiple branches 275s allows branches to be duplicated 275s behaves like literal if allowed 275s when returning a simple erange in multiple branches 275s allows branches to be duplicated 275s behaves like literal if disallowed 275s when returning a dstr in multiple branches 275s registers an offense 275s behaves like literal if allowed 275s when returning a array of literals in multiple branches 275s allows branches to be duplicated 275s with IgnoreConstantBranches: true 275s with `if` 275s behaves like literal if disallowed 275s when returning a object in multiple branches 275s registers an offense 275s behaves like literal if allowed 275s when returning a constant in multiple branches 275s allows branches to be duplicated 275s with `rescue` 275s behaves like literal rescue disallowed 275s when returning a object in multiple branches 275s registers an offense 275s behaves like literal rescue allowed 275s when returning a constant in multiple branches 275s allows branches to be duplicated 275s with `case` 275s behaves like literal case disallowed 275s when returning a object in multiple branches 275s registers an offense 275s behaves like literal case allowed 275s when returning a constant in multiple branches 275s allows branches to be duplicated 275s with `case-match` 275s behaves like literal case-match disallowed 275s when returning a object in multiple branches 275s registers an offense 275s behaves like literal case-match allowed 275s when returning a constant in multiple branches 275s allows branches to be duplicated 275s 275s RuboCop::Cop::Style::AndOr 275s when style is always 275s autocorrects "or" with || and adds parentheses to expr 275s also warns on while (and) 275s autocorrects "or" with || in method calls 275s also warns on until (or) 275s autocorrects "and" with && in method calls (4) 275s registers an offense for "and" 275s also warns on while (or) 275s also warns on non short-circuit (and) (unless) 275s warns on short-circuit (and) 275s warns on short-circuit (or) 275s autocorrects "and" with && and adds parentheses to expr 275s autocorrects "and" with && in method calls 275s autocorrects "or" with || in method calls (3) 275s also warns on non short-circuit (or) 275s autocorrects "or" with || and doesn't add extra parentheses 275s also warns on non short-circuit (and) 275s autocorrects "and" with && and doesn't add extra parentheses 275s autocorrects "and" with an Enumerable accessor on either side 275s autocorrects "or" with || in method calls (4) 275s autocorrects "and" with && in method calls (2) 275s autocorrects "or" with || in method calls (2) 275s autocorrects "or" with an assignment on the left 275s autocorrects "or" inside def 275s also warns on until (and) 275s registers an offense for "or" 275s also warns on non short-circuit (or) (unless) 275s autocorrects "or" with an assignment on the right 275s autocorrects "and" with && in method calls (3) 275s autocorrects "and" inside def 275s when left hand side is a comparison method 275s autocorrects "and" with && and adds parens 275s with !obj.method arg on left 275s autocorrects "and" with && and adds parens 275s within a nested begin node with one child only 275s autocorrects "and" with && and adds parens 275s with predicate method with arg without space on right 275s autocorrects "and" with && and adds parens 275s autocorrects "or" with || and adds parens 275s with !variable on left 275s doesn't crash and burn 275s with two predicate methods with args without spaces on right 275s autocorrects "and" with && and adds parens 275s autocorrects "or" with || and adds parens 275s with a file which contains __FILE__ 275s autocorrects "or" with || 275s with one predicate method without space on right and another method 276s autocorrects "and" with && and adds parens 276s autocorrects "or" with || and adds parens 276s when `and` precedes `||` 276s registers an offense and corrects 276s with `not` expression on right 276s autocorrects "and" with && and adds parens 276s with obj.method = arg on left 276s autocorrects "and" with && and adds parens 276s when `or` precedes `and` 276s registers an offense and corrects 276s with obj.method= arg on left 276s autocorrects "and" with && and adds parens 276s within a nested begin node 276s autocorrects "and" with && and adds parens 276s when `or` precedes `&&` 276s registers an offense and corrects 276s when `and` precedes `or` 276s registers an offense and corrects 276s with `not` expression on left 276s autocorrects "and" with && and adds parens 276s with !obj.method arg on right 276s autocorrects "and" with && and adds parens 276s when style is conditionals 276s accepts "and" outside of conditional 276s accepts "or" in post-until body 276s accepts && outside of conditional 276s registers an offense for "and" in until condition 276s accepts || outside of conditional 276s accepts "and" in until body 276s accepts "or" in post-while body 276s accepts "and" in post-while body 276s registers an offense for "or" in until condition 276s accepts "or" in while body 276s registers an offense for "or" in post-while condition 276s accepts "or" in until body 276s accepts "and" in post-until body 276s registers an offense for "or" in if condition 276s registers an offense for "and" in if condition 276s accepts || inside of conditional 276s accepts "or" outside of conditional 276s accepts && inside of conditional 276s registers an offense for "or" in while condition 276s accepts "and" in while body 276s accepts "and" in if body 276s registers an offense for "and" in while condition 276s registers an offense for "and" in post-while condition 276s registers an offense for "or" in post-until condition 276s registers an offense for "and" in post-until condition 276s accepts "or" in if body 276s 276s RuboCop::Cop::Style::FetchEnvVar 276s registers an offense when using `ENV || x` that is different from `if` condition in the body 276s registers an offense when using `ENV && x` that is different from `if` condition in the body 276s registers an offense when using an `ENV` at `if` condition in the body 276s registers an offense with using an `ENV` at multiple `if` condition in the body 276s when it is assigned to a variable 276s registers an offense when using single assignment 276s registers an offense when using multiple assignment 276s when `ENV[]` is the LHS of `||` 276s registers no offenses 276s when it receives a message with safe navigation 276s registers no offenses 276s when the node is a receiver of `&&=` 276s does not register an offense 276s when it is used in a conditional expression 276s registers no offenses with ternary operator 276s registers no offenses when using the same `ENV` var as `if` condition in the body 276s registers no offenses with `if` 276s registers no offenses when using the same `ENV` var as `if` condition in the body with predicate method 276s registers an offense with using an `ENV` var as `if` condition in the body with assignment method 276s registers no offenses with `unless` 276s registers an offense with `case` 276s registers no offenses when using the same `ENV` var as `if` condition in the body with assignment method 276s registers no offenses when using the same `ENV` var as `if` condition in the body with other conditions 276s registers an offense when using an `ENV` var that is different from `if` condition in the body 276s registers no offenses when using the same `ENV` var as `if` condition in the body with operator 276s when it is a hash key 276s registers an offense 276s when the env val is excluded from the inspection by the config 276s registers no offenses 276s when it is evaluated with no default values 276s registers an offense 276s when the node is a receiver of `||=` 276s does not register an offense 276s with negation 276s registers no offenses 276s when it receives a message 276s registers no offenses 276s when the node is a assigned by `&&=` 276s registers an offense 276s when using `fetch` instead of `[]` 276s registers no offenses 276s when it is a hash value 276s registers an offense 276s when it is compared `==` with other object 276s does not register an offense 276s when it is used in an interpolation 276s registers an offense 276s when it is an argument of a method 276s registers an offense 276s when it is an array element 276s registers an offense 276s when it is compared `!=` with other object 276s does not register an offense 276s when `ENV[]` is the right end of `||` chains 276s registers an offense 276s when the node is a assigned by `||=` 276s registers an offense 276s 276s RuboCop::Cop::Style::SpecialGlobalVars 276s when style is use_perl_names 276s autocorrects $INPUT_RECORD_SEPARATOR to $/ 276s registers an offense for $PROCESS_ID 276s does not register an offense for backrefs like $1 276s registers an offense for $PID 276s registers an offense for $LOAD_PATH 276s registers an offense for $LOADED_FEATURES 276s autocorrects #{$LOAD_PATH} to #$: 276s registers an offense for $PROGRAM_NAME 276s when style is use_builtin_english_names 276s generates correct auto-config when mixed styles are used 276s does not register an offense for Perl names 276s does not register an offenses for builtin names 276s does not register an offense for backrefs like $1 276s autocorrects non-preffered builtin names 276s generates correct auto-config when Perl variable names are used 276s when style is use_english_names 276s when add require English is disabled 276s autocorrects #{$!} to #{$ERROR_INFO} 276s generates correct auto-config when Perl variable names are used 276s registers an offense for $" 276s generates correct auto-config when mixed styles are used 276s registers an offense for $0 276s registers an offense for $$ 276s is clear about variables from the English library vs those not 276s autocorrects #$: to #{$LOAD_PATH} 276s does not register an offense for backrefs like $1 276s autocorrects $/ to $INPUT_RECORD_SEPARATOR 276s registers an offense for $: 276s when add require English is enabled 276s when English is already required at top-level 276s moves require English above replacement 276s leaves require English alone for $$ 276s when English has not been required at top-level 276s adds require English for $$ in nested code 276s adds require English for twice `$*` in nested code 276s does not add for replacement outside of English lib 276s adds require English for $$ 276s 276s RuboCop::Cop::Lint::UnmodifiedReduceAccumulator 276s behaves like reduce/inject 276s does not affect inject called with no block args 276s does not affect inject called without a block 276s given a inject block 276s does not register an offense when returning a method called with the accumulator 276s registers an offense when returning accumulator[element]= 276s does not register an offense if the return value cannot be determined 276s does not register an offense when and-assigning the accumulator 276s does not register an offense when returning the accumulator in an expression 276s does not register an offense when op-assigning the accumulator 276s does not register an offense when or-assigning the accumulator 276s does not register an offense when returning accumulator[element] 276s does not register an offense when returning a literal 276s registers an offense with the element in heredoc 276s registers an offense when returning an index setter on the accumulator 276s does not register an offense when mutating the element with the accumulator 276s does not register an offense with the accumulator in heredoc 276s allows the element to be the return value if the accumulator is returned in any branch 276s registers an offense for values returned with `next` 276s does not register an offense when returning a method called on the accumulator 276s does not register an offense when calling a method on the accumulator with the element 276s registers an offense with the element in interpolation 276s registers an offense for every violating return value 276s does not register an offense when assigning the accumulator 276s does not register an offense with the accumulator in interpolation 276s does not register an offense when shovelling the accumulator 276s registers an offense when returning the element 276s registers an offense when returning an index of the accumulator 276s does not register an offense when returning the accumulator 276s allows break with no value 276s does not register an offense when comparing 276s registers an offense when returning an expression with the element 276s does not look inside inner blocks 276s registers an offense when mutating the accumulator with the element but not returning it 276s does not register an offense when mutating the element with the another value 276s does not register an offense when returning the accumulator in a boolean statement 276s registers an offense for values returned with `break` 276s registers an offense when called with no argument 276s numblocks 276s does not register an offense when when returning the accumulator 276s registers an offense when returning the element 276s argument count 276s ignores when there are not enough block arguments 276s ignores when there is a splat argument 276s registers an offense when there are more than two arguments but the element is returned 276s behaves like reduce/inject 276s does not affect reduce called with no block args 276s does not affect reduce called without a block 276s given a reduce block 276s registers an offense with the element in heredoc 276s does not register an offense when returning a method called on the accumulator 276s does not register an offense when returning the accumulator 276s registers an offense when returning an index of the accumulator 276s does not register an offense when op-assigning the accumulator 276s does not register an offense if the return value cannot be determined 276s registers an offense when mutating the accumulator with the element but not returning it 276s registers an offense when returning an expression with the element 276s registers an offense with the element in interpolation 276s registers an offense for values returned with `next` 276s does not register an offense when mutating the element with the accumulator 276s does not register an offense when assigning the accumulator 276s registers an offense for values returned with `break` 276s does not look inside inner blocks 276s does not register an offense when comparing 276s registers an offense when returning an index setter on the accumulator 276s registers an offense when returning accumulator[element]= 276s does not register an offense when returning a method called with the accumulator 276s does not register an offense when and-assigning the accumulator 276s allows the element to be the return value if the accumulator is returned in any branch 276s registers an offense when called with no argument 276s does not register an offense when shovelling the accumulator 276s allows break with no value 276s does not register an offense when calling a method on the accumulator with the element 276s registers an offense for every violating return value 276s does not register an offense with the accumulator in interpolation 276s does not register an offense when returning accumulator[element] 276s does not register an offense when returning a literal 276s does not register an offense with the accumulator in heredoc 276s registers an offense when returning the element 276s does not register an offense when or-assigning the accumulator 276s does not register an offense when returning the accumulator in an expression 276s does not register an offense when mutating the element with the another value 276s does not register an offense when returning the accumulator in a boolean statement 276s argument count 276s ignores when there are not enough block arguments 276s registers an offense when there are more than two arguments but the element is returned 276s ignores when there is a splat argument 276s numblocks 276s does not register an offense when when returning the accumulator 276s registers an offense when returning the element 276s 276s RuboCop::Cop::Layout::SpaceBeforeComment 276s accepts a doc comment 276s accepts a comment that begins a line 276s registers an offense and corrects missing space before an EOL comment 276s accepts an EOL comment with a preceding space 276s registers an offense and corrects after a heredoc 276s 276s RuboCop::RakeTask 276s defining tasks 276s creates a rubocop task and a rubocop auto_correct task 276s creates a named task and a named auto_correct task 276s creates a rubocop task and a rubocop autocorrect task 276s creates a named task and a named autocorrect task 276s running tasks 276s allows nested arrays inside formatters, options, and requires 276s runs with default options 276s uses the default formatter from .rubocop.yml if no formatter option is given 276s runs with specified options if a block is given 276s exits when result is not 0 and fail_on_error is true 276s will not error when result is not 0 and fail_on_error is false 276s autocorrect 276s runs with --autocorrect 276s runs with with the options that were passed to its parent task 276s runs with --autocorrect-all 276s 276s RuboCop::Cop::Lint::FloatOutOfRange 276s does not register an offense for respectably sized floats 276s does not register an offense for 0.0 276s does not register an offense for tiny little itty bitty floats 276s on floats so close to zero that nobody can tell the difference 276s registers an offense 276s on whopping big floats which tip the scales 276s registers an offense 276s 276s RuboCop::Cop::Style::StabbyLambdaParentheses 276s require_no_parentheses 276s registers an offense for a stabby lambda with parentheses 276s behaves like common 276s does not check a stabby lambda without arguments 276s does not check the old lambda syntax 276s does not check a method call named lambda 276s require_parentheses 276s does not register an offense for a stabby lambda with parentheses 276s registers an offense for a stabby lambda without parentheses 276s behaves like common 276s does not check the old lambda syntax 276s does not check a method call named lambda 276s does not check a stabby lambda without arguments 276s 276s RuboCop::Cop::Style::NestedParenthesizedCalls 276s on a method call with no arguments 276s doesn't register an offense 276s on a permitted method 276s doesn't register an offense 276s on a non-parenthesized call nested in a parenthesized one 276s with multiple arguments to the nested call 276s registers an offense 276s with a single argument to the nested call 276s registers an offense 276s when using safe navigation operator 276s registers an offense 276s on a deeply nested argument 276s doesn't register an offense 276s on a nested, parenthesized method call 276s doesn't register an offense 276s on a call to a setter method 276s doesn't register an offense 276s backslash newline in method call 276s registers an offense 276s on a call with no arguments, nested in a parenthesized one 276s doesn't register an offense 276s on an aref, nested in a parenthesized method call 276s doesn't register an offense 276s on a non-parenthesized method call 276s doesn't register an offense 276s 276s RuboCop::Cop::Layout::SpaceAroundOperators 276s accepts splat operator 276s accepts a unary 276s accepts [] without space 276s accepts operator symbols 276s registers an offense and corrects singleton class operator` 276s accepts scope operator 276s accepts an assignment with spaces 276s accepts an assignment with a blank line 276s accepts ::Kernel::raise 276s accepts an operator at the end of a line 276s accepts operators with spaces 276s accepts def of operator 276s accepts []= without space 276s accepts operator surrounded by tabs 276s accepts [arg] without space 276s accepts some operators that are exceptions & don't need spaces 276s accepts an assignment followed by newline 276s registers an offense and corrects exclamation point negation 276s accepts an assignment with the same alignment margins 276s accepts argument default values without space 276s accepts an assignment by `for` statement 277s accepts exponent operator without spaces 277s accepts exclamation point definition 277s accepts ranges 277s accepts an operator at the beginning of a line 277s accepts rational 277s accepts unary operators without space 277s accepts an operator called with method syntax 277s accepts the result of the ExtraSpacing Cop 277s registers an offenses for exponent operator with spaces 277s missing space around operators 277s registers an offense and corrects a setter call without spaces 277s registers an offense for assignment without space on both sides 277s registers an offense and corrects inheritance < without space 277s registers an offense for binary operators that could be unary 277s registers an offense and corrects string concatenation without messing up new lines 277s doesn't register an offense for operators with newline on right 277s registers an offense for operators without spaces 277s registers an offense and corrects `-` without space with a negative lhs operand 277s registers an offense and corrects equality operators without space 277s registers an offense and corrects various assignments without space 277s registers an offense and corrects match operators without space 277s registers an offense and corrects arguments to a method 277s registers an offense and corrects hash rocket without space at rescue 277s behaves like modifier with missing space 277s registers an offense in presence of modifier if statement 277s when a hash literal is on multiple lines 277s and Layout/HashAlignment:EnforcedHashRocketStyle is key 277s registers an offense and corrects a hash rocket without spaces 277s and Layout/HashAlignment:EnforcedHashRocketStyle is table 277s doesn't register an offense for a hash rocket without spaces 277s when a hash literal is on a single line 277s and Layout/HashAlignment:EnforcedHashRocketStyle is key 277s registers an offense and corrects a hash rocket without spaces 277s and Layout/HashAlignment:EnforcedHashRocketStyle is table 277s registers an offense and corrects a hash rocket without spaces 277s behaves like modifier with missing space 277s registers an offense in presence of modifier until statement 277s behaves like modifier with missing space 277s registers an offense in presence of modifier unless statement 277s behaves like modifier with missing space 277s registers an offense in presence of modifier while statement 277s ternary operators 277s registers an offense and corrects operators with no spaces 277s registers an offense and corrects operators with just a leading space 277s registers an offense and corrects operators with just a trailing space 277s >= Ruby 2.7 277s does not register an offenses for one-line pattern matching syntax (`in`) 277s when EnforcedStyleForExponentOperator is space 277s registers an offenses for exponent operator without spaces 277s when Layout/ExtraSpacing has `ForceEqualSignAlignment` configured to true 277s allows variables to be aligned 277s allows constants to be aligned 277s >= Ruby 3.0 277s registers an offenses for one-line pattern matching syntax (`=>`) 277s extra space around operators 277s registers an offense and corrects hash rocket with too many spaces at rescue 277s registers an offense and corrects a setter call with too many spaces 277s registers an offense and corrects assignment with too many spaces on either side 277s registers an offense and corrects a hash rocket with an extra spaceon multiple line 277s registers an offense and corrects various assignments with too many spaces 277s registers an offense and corrects match operators with too many spaces 277s registers an offense and corrects ternary operator with too many spaces 277s registers an offense and corrects `-` with too many spaces with negative lhs operand 277s registers an offense and corrects equality operators with too many spaces 277s registers an offense and corrects inheritance < with too many spaces 277s registers an offense and corrects operators with too many spaces on the same line 277s registers an offense and corrects binary operators that could be unary 277s does not register an offenses match operators between `+=` and `<<` 277s accepts for a hash rocket with an extra space for alignment on multiple line 277s does not register an offenses match operators between `<<` and `+=` 277s registers an offense and corrects arguments to a method 277s registers an offense and corrects operators with too many spaces 277s registers an offense and corrects a hash rocket with too many spaces 277s behaves like modifier with extra space 277s registers an offense in presence of modifier until statement 277s when does not allowed for alignment 277s registers an offense and corrects an extra space 277s behaves like modifier with extra space 277s registers an offense in presence of modifier while statement 277s behaves like modifier with extra space 277s registers an offense in presence of modifier unless statement 277s behaves like modifier with extra space 277s registers an offense in presence of modifier if statement 277s 277s RuboCop::PathUtil 277s #relative_path 277s builds paths relative to PWD by default as a stop-gap 277s supports custom base paths 277s #absolute? 277s returns a truthy value for a path beginning with slash 277s returns a falsey value for a path beginning with a directory name 277s #match_path? 277s matches glob expressions 277s matches regexps 277s does not match file in a subdirectory 277s matches strings to the full path 277s does not match invalid UTF-8 paths 277s does not match dir/** for file in hidden dir 277s matches dir/** for hidden file 277s 277s RuboCop::Cop::Style::Lambda 277s with default `line_count_dependent` style 277s with a single line lambda method call 277s without arguments 277s registers an offense 277s with arguments 277s registers an offense 277s unusual lack of spacing 277s without spacing before arguments 277s registers an offense 277s without spacing after arguments 277s registers an offense 277s with a multiline lambda literal 277s with no arguments and no spacing 277s registers an offense 277s with no parentheses and many args 277s registers an offense 277s with empty arguments 277s registers an offense 277s with no parentheses and bad spacing 277s registers an offense 277s without parentheses 277s registers an offense 277s with no arguments and bad spacing 277s registers an offense 277s without any spacing 277s registers an offense 277s when calling a lambda method without a block 277s does not register an offense 277s with a multiline do-end lambda as a parenthesized kwarg 277s registers an offense 277s >= Ruby 2.7 277s when using numbered parameter 277s with a single line lambda method call 277s registers an offense 277s with a multiline lambda method call 277s does not register an offense 277s with a single line lambda literal 277s does not register an offense 277s with a multiline lambda literal 277s without arguments 277s registers an offense 277s with arguments 277s registers an offense 277s with a multiline braces lambda literal as a keyword argument 277s registers an offense 277s with a multiline lambda method call 277s does not register an offense 277s with a multiline lambda literal as an argument 277s registers an offense 277s with a multiline do-end lambda literal as a keyword argument 277s registers an offense 277s with a single line lambda literal 277s does not register an offense 277s with enforced `literal` style 277s with a multiline lambda method call 277s without arguments 277s registers an offense 277s with arguments 277s registers an offense 277s with a single line lambda method call 277s with arguments 277s registers an offense 277s without arguments 277s registers an offense 277s when using safe navigation operator 277s does not break 277s with enforced `lambda` style 277s with a single line lambda literal 277s without arguments 277s registers an offense 277s with arguments 277s registers an offense 277s without argument parens and spaces 277s registers an offense 277s with a multiline lambda literal 277s without arguments 277s registers an offense 277s with arguments 277s registers an offense 277s 277s RuboCop::DirectiveComment 277s #single_line? 277s when relates to single line 277s is expected to equal true 277s when does NOT relate to single line 277s is expected to equal false 277s #enabled? 277s when todo 277s is expected to equal false 277s when enable 277s is expected to equal true 277s when disable 277s is expected to equal false 277s #in_directive_department? 277s when another department disabled 277s is expected to equal false 277s when cop disabled 277s is expected to equal false 277s when cop department disabled 277s is expected to equal true 277s #cop_names 277s when only cop specified 277s is expected to eq ["Foo/Bar"] 277s when all cops mentioned 277s is expected to eq ["all_names"] 277s when department and cops specified 277s is expected to eq ["Foo/Bar", "Foo/Baz", "Baz/Cop"] 277s when couple departments specified 277s is expected to eq ["Foo/Bar", "Foo/Baz", "Baz/Bar"] 277s when redundant directive cop department specified 277s is expected to eq ["Lint/One", "Lint/Two"] 277s when only department specified 277s is expected to eq ["Foo/Bar", "Foo/Baz"] 277s #match_captures 277s when enable 277s is expected to eq ["enable", "Foo/Bar", nil, "Foo/"] 277s when todo 277s is expected to eq ["todo", "all", nil, nil] 277s when disable 277s is expected to eq ["disable", "all", nil, nil] 277s when typo 277s is expected to be nil 277s #directive_count 277s when few department used 277s is expected to eq 3 277s when cops and departments used 277s is expected to eq 4 277s when few cops used 277s is expected to eq 2 277s #match? 277s when disabled all cops 277s is expected to equal true 277s when cop names are superset of names 277s is expected to equal false 277s when cop names are same but have duplicated names 277s is expected to equal true 277s when cop names are same as in the comment 277s is expected to equal true 277s when there are no cop names 277s is expected to equal false 277s when cop names are same but in a different order 277s is expected to equal true 277s when cop names are subset of names 277s is expected to equal false 277s #line_number 277s returns line number for directive 277s #overridden_by_department? 277s when there are no cops 277s is expected to equal false 277s when cop is not overridden by it's department 277s is expected to equal false 277s when there are no departments 277s is expected to equal false 277s when cop is overridden by it's department 277s is expected to equal true 277s #disabled? 277s when todo 277s is expected to equal true 277s when enable 277s is expected to equal false 277s when disable 277s is expected to equal true 277s .before_comment 277s when line has code 277s is expected to eq "def foo " 277s when line has NO code 277s is expected to eq "" 277s #enabled_all? 277s when enabled specific cops 277s is expected to equal false 277s when enabled all cops 277s is expected to equal true 277s when disabled specific cops 277s is expected to equal false 277s when disabled all cops 277s is expected to equal false 277s #disabled_all? 277s when disabled all cops 277s is expected to equal true 277s when disabled specific cops 277s is expected to equal false 277s when enabled all cops 277s is expected to equal false 277s when enabled specific cops 277s is expected to equal false 277s #department_names 277s when department and cops specified 277s is expected to eq ["Foo"] 277s when all cops mentioned 277s is expected to eq [] 277s when only department specified 277s is expected to eq ["Foo"] 277s when only cop specified 277s is expected to eq [] 277s when couple departments specified 277s is expected to eq ["Foo", "Baz"] 277s #all_cops? 277s when mentioned all 277s is expected to equal true 277s when mentioned specific cops 277s is expected to equal false 277s 277s RuboCop::Cop::Security::YAMLLoad 277s does not register an offense for YAML.load under a different namespace 277s registers an offense and corrects a fully qualified ::YAML.load 277s does not register an offense for YAML.dump 277s registers an offense and corrects load with a literal string 277s Ruby >= 3.1 277s does not register an offense and corrects a fully qualified `::YAML.load` 277s does not register an offense and corrects load with a literal string 277s 277s RuboCop::Cop::Lint::RedundantSplatExpansion 277s allows assigning to a splat variable 277s accepts expanding a variable as a method parameter 277s allows expanding a method call on an array literal 277s registers an offense and corrects an array literal being expanded in a rescue 277s allows assigning a variable to a splat expansion of a variable 277s allows splat expansion inside of an array 277s allows expansions of an array that is assigned to a variable in rescue 277s allows an array using a constructor 277s allows assigning to an expanded range 277s allows assigning to a splat 277s when `AllowPercentLiteralArrayArgument: false` 277s registers an offense when using percent literal array 277s registers an offense when using percent symbol literal array 277s behaves like array splat expansion 277s behaves like splat literal assignment 277s registers an offense and removes the splat from array 277s method parameters 277s registers an offense and converts to a list of arguments 277s behaves like array splat expansion 277s behaves like splat literal assignment 277s registers an offense and removes the splat from array 277s method parameters 277s registers an offense and converts to a list of arguments 277s splat expansion of method parameters 277s registers an offense and corrects an array literal %I 277s registers an offense and corrects an array literal %i 277s behaves like array splat expansion 277s method parameters 277s registers an offense and converts to a list of arguments 277s behaves like splat literal assignment 277s registers an offense and removes the splat from array 277s behaves like array splat expansion 277s method parameters 277s registers an offense and converts to a list of arguments 277s behaves like splat literal assignment 277s registers an offense and removes the splat from array 277s expanding an array literal in a when condition 277s registers an offense and corrects an array using [] 277s allows an array that is assigned to a variable 277s registers an offense and corrects %i to a list of symbols 277s registers an offense and corrects an array using %W 277s registers an offense and corrects an array using %w 277s allows an array using a constructor 277s registers an offense and corrects %I to a list of symbols 277s splat expansion inside of an array 277s registers an offense and corrects expansion of %W to a list of words 277s registers an offense and corrects expansion of %w to a list of words 277s registers an offense and corrects the expansion of an array literalinside of an array literal 277s behaves like splat expansion 277s behaves like splat literal assignment 277s registers an offense and converts to an array 277s method parameters 277s registers an offense and converts to an array 277s assignment to splat expansion 277s registers an offense and corrects an array using a constructor 277s registers and corrects an array using top-level const 277s expanding Array.new call on array literal 277s when the array literal contains more than one element 277s accepts 277s with ::Array.new 277s when the array literal contains exactly one element 277s registers an offense and corrects 277s when the array literal contains exactly one element 277s registers an offense and corrects 277s when `AllowPercentLiteralArrayArgument: true` 277s does not register an offense when using percent symbol literal array 277s does not register an offense when using percent string literal array 277s behaves like array splat expansion 277s method parameters 277s registers an offense and converts to a list of arguments 277s behaves like splat literal assignment 277s registers an offense and removes the splat from array 277s arrays being expanded with %i variants using splat expansion 277s splat expansion inside of an array 277s registers an offense and corrects %i to a list of symbols 277s registers an offense and changes %I to a list of symbols 277s behaves like splat expansion 277s method parameters 277s registers an offense and converts to an array 277s behaves like splat literal assignment 277s registers an offense and converts to an array 277s behaves like splat expansion 277s behaves like splat literal assignment 277s registers an offense and converts to an array 277s method parameters 277s registers an offense and converts to an array 277s expanding Array.new call on method argument 277s registers an offense and corrects 277s behaves like splat expansion 277s behaves like splat literal assignment 277s registers an offense and converts to an array 277s method parameters 277s registers an offense and converts to an array 277s 277s RuboCop::Cop::Lint::UriEscapeUnescape 277s registers an offense when using `URI.encode('http://example.com')` 277s registers an offense when using `::URI.encode('http://example.com)` 277s registers an offense when using `::URI.escape('http://example.com')` 277s registers an offense when using `URI.escape('@?@!', '!?')` 277s registers an offense when using `URI.escape('http://example.com')` 277s registers an offense when using `URI.unescape(enc_uri)` 277s registers an offense when using `::URI.unescape(enc_uri)` 277s registers an offense when using `::URI.decode(enc_uri)` 277s registers an offense when using `URI.decode(enc_uri)` 277s 277s RuboCop::Cop::Lint::NonAtomicFileOperation 277s does not register an offense when use `FileTest.exist?` before creating file with an option `force: false` 277s registers an offense when use file existence checks `unless` by postfix before creating file 277s does not register an offense when processing other than file operations 277s registers an offense when use `FileTest.exist?` before force remove file 277s registers an offense when use `FileTest.exist?` before remove file 277s does not register an offense when use `FileTest.exist?` before remove recursive file 277s registers an offense when using `FileTest.exist?` as a condition for `elsif` 277s registers an offense when use file existence checks `if` by postfix before removing file 277s registers an offense when use `FileTest.exist?` before force creating file 277s does not register an offense when using complex conditional with `&&` 277s registers an offense when use `FileTest.exists?` before creating file 277s does not register an offense when using `FileTest.exist?` with `if` condition that has `else` branch 277s registers an offense when use `FileTest.exist?` before force remove file 277s registers an offense when use `FileTest.exist?` before force creating file 277s registers an offense when use `FileTest.exist?` before remove file 277s registers an offense when use `FileTest.exist?` before remove file 277s does not register an offense when not a method of file operation 277s registers an offense when use `FileTest.exist?` before remove file 277s registers an offense when use `FileTest.exist?` before remove file 277s does not register an offense when using complex conditional with `||` 277s does not register an offense when not checking for the existence 277s registers an offense when use `FileTest.exist?` before remove file 277s registers an offense when use `FileTest.exist?` before remove file 277s registers an offense when use `FileTest.exist?` before creating file 277s does not register an offense when not an exist check 277s registers an offense when use `FileTest.exist?` before creating file with an option not `force` 277s registers an offense when use `FileTest.exist?` before remove file 277s registers an offense when use `FileTest.exist?` before remove file 277s registers an offense when use `FileTest.exist?` before creating file with an option `force: true` 277s does not register an offense when use `FileTest.exist?` before remove recursive file 277s does not register an offense when checking for the existence of different files 277s registers an offense when use `FileTest.exist?` before remove file 277s registers an offense when use `FileTest.exist?` before force creating file 277s registers an offense when use `FileTest.exist?` with negated `if` before creating file 277s 277s RuboCop::Cop::Migration::DepartmentName 277s when a disable comment contains an unexpected character for department name 277s accepts 277s when a disable comment has cop names with departments 277s accepts 277s when a disable comment contains a plain comment 277s accepts 277s when an unexpected disable comment format 277s does not register an offense 277s when only department name has given 277s does not register an offense 277s when todo/enable comments have cop names without departments 277s registers offenses and corrects when using a legacy cop name 277s registers offenses and corrects 277s registers offenses and corrects when there is space around `:` 277s 277s RuboCop::Cop::Layout::IndentationWidth 277s with Width set to 4 277s registers and corrects offense for bad indentation 277s with if statement 277s registers an offense for bad indentation of an if body 277s with ignored patterns set 277s accepts unindented lines for those keywords 277s for a file with byte order mark 277s accepts correctly indented method definition 277s with Width set to 2 277s with if statement 277s accepts a one line if statement 277s registers offense for bad indentation of modifier if in else 277s accepts if/then/else/end laid out as another table 277s accepts `ensure` after an empty body 277s accepts an if/else branches with rescue clauses 277s registers an offense for bad indentation of an if body 277s accepts indentation after if on new line after assignment 277s accepts `rescue`/`ensure` after an empty body 277s registers an offense for bad indentation of an elsif body 277s accepts a correctly aligned if/elsif/else/end 277s leaves block unchanged if block end is not on its own line 277s accepts `ensure` after an empty def 277s registers an offense for bad indentation of an else body when if body contains no code 277s accepts a correctly aligned if/elsif/else/end as a method argument 277s accepts `rescue`/`ensure` after an empty def 277s registers and corrects on offense for bad indentation 277s registers offense for bad indentation of ternary inside else 277s registers an offense for bad indentation of an else body 277s does not correct in scopes that contain block comments 277s leaves rescue ; end unchanged 277s accepts if/elsif/else/end laid out as a table 277s accepts `rescue` after an empty body 277s indents parenthesized expressions 277s does not indent heredoc strings 277s does not raise any error with empty braces 278s accepts `rescue` after an empty def 278s registers an offense for bad indentation of an else body when if and elsif body contains no code 278s accepts an empty if 278s handles lines with only whitespace 278s with assignment 278s when alignment style is start_of_line 278s and end is aligned randomly 278s registers an offense for a while 278s registers an offense for an if 278s registers an offense for an until 278s and end is aligned with variable 278s accepts an if with end aligned with variable 278s accepts an if/else 278s accepts an if with end aligned with element assignment 278s accepts an if with end aligned with setter 278s accepts an if/else with chaining with a block after the end 278s accepts an if/else with chaining after the end 278s and end is aligned with keyword 278s registers an offense for a while 278s registers an offense for an if with element assignment 278s registers an offense for an if with setter 278s accepts an if/else in assignment on next line 278s registers an offense for an if 278s registers an offense for an until 278s when alignment style is keyword 278s and end is aligned with variable 278s registers an offense for an if 278s registers an offense for a while 278s registers and corrects bad indentation 278s and end is aligned with keyword 278s accepts a while in assignment 278s accepts an if/else in assignment 278s accepts an if/else in assignment on next line 278s accepts an if in assignment 278s accepts an until in assignment 278s when alignment style is variable 278s and end is aligned randomly 278s registers an offense for a while 278s registers an offense for an until 278s registers an offense for an if 278s and end is aligned with variable 278s accepts an if with end aligned with variable 278s accepts an if with end aligned with element assignment 278s accepts an if/else with chaining with a block after the end 278s accepts an if with end aligned with setter 278s accepts an if/else 278s accepts an if/else with chaining after the end 278s and end is aligned with keyword 278s registers an offense for an if 278s registers an offense for an if with setter 278s registers an offense for a while 278s registers an offense for an until 278s registers an offense for an if with element assignment 278s accepts an if/else in assignment on next line 278s with def/rescue/end 278s registers an offense for bad indentation of bodies 278s registers an offense for bad indent of defs bodies with a modifier 278s with unless 278s accepts an empty unless 278s registers an offense for bad indentation of an unless body 278s with case 278s accepts case/when/else laid out as a table 278s accepts case/when/else with then beginning a line 278s registers an offense for bad indentation in a case/when body 278s accepts aligned values in when clause 278s registers an offense for bad indentation in a case/else body 278s accepts correctly indented case/when/else 278s accepts indented when/else plus indented body 278s with def/defs 278s when end is aligned with def 278s accepts an empty def body 278s with an assignment 278s accepts an empty defs body 278s registers an offense for bad indentation of a defs body 278s registers an offense for bad indentation of a def body 278s when modifier and def are on the same line 278s accepts a correctly aligned body 278s registers an offense for bad indentation of a defs body 278s registers an offense for bad indentation of a def body 278s when end is aligned with start of line 278s accepts an empty defs body 278s registers an offense for bad indentation of a def body 278s registers an offense for bad indentation of a defs body 278s accepts an empty def body 278s with an assignment 278s when multiple modifiers and def are on the same line 278s accepts a correctly aligned body 278s registers an offense for bad indentation of a defs body 278s registers an offense for bad indentation of a def body 278s when multiple modifiers are used in a block anda method call is made at end of the block 278s accepts a correctly aligned body 278s registers an offense for bad indentation of a def body 278s registers an offense for bad indentation of a def 278s when modifier and def are on the same line 278s registers an offense for bad indentation of a defs body 278s registers an offense for bad indentation of a def body 278s accepts a correctly aligned body 278s with module 278s leaves body unchanged if the first body line is on the same line with module keyword 278s when consistency style is normal 278s registers an offense for bad indentation of a module body 278s accepts an empty module body 278s when consistency style is indented_internal_methods 278s accepts normal non-indented internal methods of module functions 278s registers an offense for bad indentation of a module body 278s with begin/rescue/else/ensure/end 278s registers an offense for bad indentation of bodies 278s with while/until 278s registers an offense for bad indentation of begin/end/while 278s accepts an empty while 278s registers an offense for bad indentation of an until body 278s registers an offense for bad indentation of a while body 278s with block 278s does not register an offense for good indentation of `do` ... `ensure` ... `end` block 278s accepts a correctly indented block body 278s accepts badly indented code if block end is not on separate line 278s registers an offense for bad indentation of `do` ... `ensure` ... `end` block 278s accepts an empty block body 278s registers an offense for bad indentation of a do/end body 278s registers an offense for bad indentation of a {} body 278s when using safe navigation operator 278s registers an offense for an if with setter 278s registers an offense for bad indentation of a {} body 278s Ruby 2.7 278s registers an offense for bad indentation of a do-end body 278s registers an offense for bad indentation of a {} body 278s when consistency style is indented_internal_methods 278s registers an offense for bad indentation in a do/end body 278s with case match 278s accepts case/in/else laid out as a table 278s registers an offense for bad indentation in a case/in body 278s registers an offense for bad indentation in a case/else body 278s accepts correctly indented case/in/else 278s accepts aligned value in `in` clause and `else` is empty 278s accepts case/in/else with then beginning a line 278s accepts indented in/else plus indented body 278s accepts aligned values in `in` clause 278s with for 278s registers an offense for bad indentation of a for body 278s accepts an empty for 278s with class 278s leaves body unchanged if the first body line is on the same line with an opening of singleton class 278s registers an offense for bad indentation of a class body 278s accepts an empty class body 278s leaves body unchanged if the first body line is on the same line with class keyword 278s when consistency style is outdent 278s accepts access modifier is outdent 278s with access modifier 278s registers an offense and corrects for bad modifier indentation before good method definition 278s registers an offense for bad indentation of sections 278s when consistency style is indented_internal_methods 278s registers an offense for normal non-indented internal methods indentation when defined in a singleton class 278s registers an offense for normal non-indented internal methods indentation 278s when consistency style is normal 278s accepts indented public, protected, and private 278s registers offenses for indented_internal_methods indentation 278s 278s RuboCop::Cop::Layout::FirstArgumentIndentation 278s when EnforcedStyle is consistent_relative_to_receiver 278s for method calls within method calls 278s with outer parentheses 278s registers an offense and corrects an over-indented 1st argument 278s indents all relative to the receiver 278s without outer parentheses 278s indents all relative to the receiver 278s accepts a first argument with special indentation 278s when indentation width is overridden for this cop only 278s accepts a correctly indented first argument 278s registers an offense and corrects an over-indented first argument 278s when IndentationWidth:Width is 4 278s registers an offense and corrects an over-indented first argument 278s when IndentationWidth:Width is 2 278s does not register an offense when argument has expected indent width and the method is preceded by double splat 278s accepts a first argument that is not preceded by a line break 278s accepts method calls with no arguments 278s registers an offense and corrects an over-indented first argument 278s registers an offense and corrects an under-indented first argument 278s does not view []= as an outer method call 278s accepts operator calls 278s registers an offense and corrects lines affected by other offenses 278s does not register an offense when argument has expected indent width and the method is preceded by splat 278s does not view chained call as an outer method call 278s for assignment 278s register an offense and corrects a correctly indented first argument and does not care about the second argument 278s with line break 278s registers an offense and corrects an under-indented first argument 278s accepts a correctly indented first argument 278s when the receiver contains a line break 278s accepts a correctly indented first argument preceded by an empty line 278s registers an offense and corrects an over-indented 1st argument 278s accepts a correctly indented first argument 278s when preceded by a comment line 278s accepts a correctly indented first argument 278s registers an offense and corrects an under-indented first argument 278s when EnforcedStyle is special_for_inner_method_call_in_parentheses 278s when IndentationWidth:Width is 2 278s registers an offense and corrects an over-indented first argument on an alphanumeric method name 278s accepts a first argument that is not preceded by a line break 278s registers an offense and corrects an over-indented first argument of `super` 278s registers an offense and corrects an over-indented first argument on a plus sign method name 278s does not view []= as an outer method call 278s registers an offense and corrects an over-indented first argument 278s registers an offense and corrects an over-indented first argument on a pipe method name 278s accepts method calls with no arguments 278s registers an offense and corrects lines affected by another offense 278s registers an offense and corrects an under-indented first argument 278s does not view chained call as an outer method call 278s accepts operator calls 278s when the receiver contains a line break 278s accepts a correctly indented first argument 278s registers an offense and corrects an over-indented first argument 278s accepts a correctly indented first argument preceded by an empty line 278s when preceded by a comment line 278s registers an offense and corrects an under-indented first argument 278s accepts a correctly indented first argument 278s when using safe navigation operator 278s registers an offense and corrects an under-indented 1st argument 278s for a setter call 278s accepts an unindented value 278s for assignment 278s accepts a correctly indented first argument and does not care about the second argument 278s with line break 278s accepts a correctly indented first argument 278s registers an offense and corrects an under-indented first argument 278s when indentation width is overridden for this cop only 278s registers an offense and corrects an over-indented first argument 278s accepts a correctly indented first argument 278s when IndentationWidth:Width is 4 278s registers an offense and corrects an over-indented first argument 278s for method calls within method calls 278s without outer parentheses 278s accepts a first argument with consistent style indentation 278s with outer parentheses 278s accepts a correctly indented first argument in interpolation 278s registers an offense and corrects an over-indented first argument 278s registers an offense and corrects an under-indented first argument 278s accepts a correctly indented first argument with fullwidth characters 278s when EnforcedStyle is special_for_inner_method_call 278s for method calls within method calls 278s without outer parentheses 278s accepts a first argument with special indentation 278s with outer parentheses 278s registers an offense and corrects an over-indented first argument 278s when IndentationWidth:Width is 2 278s registers an offense and corrects an over-indented first argument of `super` 278s registers an offense and corrects an over-indented first argument on an alphanumeric method name 278s does not view chained call as an outer method call 278s does not view []= as an outer method call 278s accepts method calls with no arguments 278s registers an offense and corrects an over-indented first argument on a plus sign method name 278s registers an offense and corrects an over-indented first argument 278s registers an offense and corrects lines affected by another offense 278s registers an offense and corrects an over-indented first argument on a pipe method name 278s accepts operator calls 278s accepts a first argument that is not preceded by a line break 278s registers an offense and corrects an under-indented first argument 278s for a setter call 278s accepts an unindented value 278s when the receiver contains a line break 278s accepts a correctly indented first argument preceded by an empty line 278s registers an offense and corrects an over-indented first argument 278s accepts a correctly indented first argument 278s when preceded by a comment line 278s accepts a correctly indented first argument 278s registers an offense and corrects an under-indented first argument 278s when using safe navigation operator 278s registers an offense and corrects an under-indented 1st argument 278s for assignment 278s accepts a correctly indented first argument and does not care about the second argument 278s with line break 278s registers an offense and corrects an under-indented first argument 278s accepts a correctly indented first argument 278s when indentation width is overridden for this cop only 278s accepts a correctly indented first argument 278s registers an offense and corrects an over-indented first argument 278s when IndentationWidth:Width is 4 278s registers an offense and corrects an over-indented first argument 278s when EnforcedStyle is consistent 278s when IndentationWidth:Width is 2 278s registers an offense and corrects an over-indented first argument on an alphanumeric method name 278s registers an offense and corrects an under-indented first argument 278s registers an offense and corrects lines affected by another offense 278s registers an offense and corrects an over-indented first argument on a plus sign method name 278s registers an offense and corrects an over-indented first argument of `super` 278s registers an offense and corrects an over-indented first argument on a pipe method name 278s does not view []= as an outer method call 278s registers an offense and corrects an over-indented first argument 278s accepts method calls with no arguments 278s accepts a first argument that is not preceded by a line break 278s accepts operator calls 278s does not view chained call as an outer method call 278s for a setter call 278s accepts an unindented value 278s when the receiver contains a line break 278s registers an offense and corrects an over-indented first argument 278s accepts a correctly indented first argument 278s accepts a correctly indented first argument preceded by an empty line 278s when preceded by a comment line 278s registers an offense and corrects an under-indented first argument 278s accepts a correctly indented first argument 278s for assignment 278s accepts a correctly indented first argument and does not care about the second argument 278s with line break 278s accepts a correctly indented first argument 278s registers an offense and corrects an under-indented first argument 278s when using safe navigation operator 278s registers an offense and corrects an under-indented 1st argument 278s for method calls within method calls 278s accepts first argument indented relative to previous line 278s registers an offense and corrects an over-indented first argument 278s when indentation width is overridden for this cop only 278s accepts a correctly indented first argument 278s registers an offense and corrects an over-indented first argument 278s when IndentationWidth:Width is 4 278s registers an offense and corrects an over-indented first argument 278s 278s RuboCop::Cop::Lint::TripleQuotes 278s does not register an offense for implicit concatenation 278s heredocs 278s does not register an offense 278s quintuple quotes 278s registers an offense and corrects 278s string interpolation 278s does not register an offense 278s with nested extra quotes 278s registers an offense and corrects 278s triple quotes 278s on multiple lines 278s registers an offense and corrects 278s with only whitespace 278s does not register 278s on one line 278s registers an offense and corrects 278s when only quotes 278s registers an offense and corrects to a single empty quote 278s 278s RuboCop::Cop::Style::RedundantSort 278s registers an offense when [](0) is called on sort 278s registers an offense when [](-1) is called on sort_by 278s registers an offense when at(0) is called on sort_by 278s registers an offense when [0] is called on sort_by 278s does not register an offense when sort has an argument 278s registers an offense when first is called on sort_by with line breaks 278s registers an offense when last is called with sort 278s registers an offense when slice(-1) is called on sort_by 278s does not register an offense when sort_by is used without first 278s registers an offense when at(-1) is called with sort 278s registers an offense when last is called on sort with comparator 278s does not register an offense when first has an argument 278s registers an offense when first is called on sort_by with line breaks and `or` operator 278s registers an offense when first is called on sort_by with line breaks and `&&` operator 278s registers an offense when [-1] is called on sort_by 278s registers an offense when slice(0) is called on sort 278s registers an offense when first is called on sort_by 278s registers an offense when last is called on sort_by no block 278s does not register an offense when first is used before sort 278s does not register an offense when first is used without sort_by 278s registers an offense when first is called with sort 278s registers an offense when first is called on sort_by with line breaks and `||` operator 279s registers an offense when last is called on sort_by 279s registers an offense when first is called on sort_by with line breaks and `and` operator 279s registers an offense when [-1] is called on sort 279s registers an offense with `sort_by { a || b }` 279s registers an offense when [0] is called on sort 279s registers an offense when slice(0) is called on sort_by 279s does not register an offense for sort!.first 279s registers an offense when first is called on sort_by no block 279s does not register an offense when sort_by is not given a block 279s does not register an offense for sort_by!(&:something).last 279s >= Ruby 2.7 279s when using numbered parameter 279s registers an offense and corrects when at(0) is called on sort_by 279s registers an offense and corrects when last is called on sort with comparator 279s registers an offense and corrects when first is called on sort_by 279s when not taking first or last element 279s does not register an offense when [-1] is called on sort with an argument 279s does not register an offense when at(-2) is called on sort_by 279s does not register an offense when [1] is called on sort 279s 279s RuboCop::Cop::Lint::ToEnumArguments 279s does not register an offense when enumerator is created with `:m` and the correct arguments 279s registers an offense when arguments are swapped 279s registers an offense when enumerator is created for another method 279s registers an offense when optional keyword arg is missing 279s does not register an offense when enumerator is created with `__method__` and the correct arguments 279s ignores the block argument 279s registers an offense when splat keyword arg is missing 279s registers an offense when optional arg is missing 279s registers an offense when required keyword arg is missing 279s does not register an offense when enumerator is created with `__callee__` and the correct arguments 279s does not register an offense when not inside method definition 279s registers an offense when other values are passed for keyword arguments 279s registers an offense when required arg is missing 279s registers an offense when splat arg is missing 279s registers an offense when enumerator is created for `__method__` with missing arguments 279s registers an offense when method is called on `self` 279s does not register an offense when method call has a receiver other than `self` 279s arguments forwarding 279s does not register an offense when enumerator is created with the correct arguments 279s registers an offense when enumerator is created with non matching arguments 279s 279s RuboCop::Cop::Lint::LiteralInInterpolation 279s handles double quotes in single quotes when autocorrecting 279s accepts interpolation of irange where endpoints are not literals 279s accepts interpolation of xstr 279s handles backslash in double quotes when autocorrecting 279s handles nested interpolations when autocorrecting 279s accepts empty interpolation 279s accepts interpolation of erange where endpoints are not literals 279s handles backslash in single quotes when autocorrecting 279s does not register an offense when space literal at the end of heredoc line 279s in string-like contexts 279s removes interpolation in regular expressions 279s removes interpolation in backticks 279s removes interpolation in symbols 279s behaves like literal interpolation 279s registers an offense only for final false in interpolation 279s removes interpolation around multiple false 279s removes interpolation around false when there is more text 279s registers an offense for false in interpolation and removes interpolation around it 279s when there is non-literal and literal interpolation 279s when literal interpolation is after non-literal 279s only removes interpolation around literal 279s when literal interpolation is before non-literal 279s only removes interpolation around literal 279s behaves like literal interpolation 279s removes interpolation around {"a" => "b"} when there is more text 279s registers an offense for {"a" => "b"} in interpolation and removes interpolation around it 279s removes interpolation around multiple {"a" => "b"} 279s registers an offense only for final {"a" => "b"} in interpolation 279s when there is non-literal and literal interpolation 279s when literal interpolation is after non-literal 279s only removes interpolation around literal 279s when literal interpolation is before non-literal 279s only removes interpolation around literal 279s behaves like literal interpolation 279s removes interpolation around multiple :"symbol" 279s registers an offense for :"symbol" in interpolation and removes interpolation around it 279s removes interpolation around :"symbol" when there is more text 279s registers an offense only for final :"symbol" in interpolation 279s when there is non-literal and literal interpolation 279s when literal interpolation is after non-literal 279s only removes interpolation around literal 279s when literal interpolation is before non-literal 279s only removes interpolation around literal 279s behaves like literal interpolation 279s registers an offense for %i[ s1 s2 ] in interpolation and removes interpolation around it 279s registers an offense only for final %i[ s1 s2 ] in interpolation 279s removes interpolation around %i[ s1 s2 ] when there is more text 279s removes interpolation around multiple %i[ s1 s2 ] 279s when there is non-literal and literal interpolation 279s when literal interpolation is before non-literal 279s only removes interpolation around literal 279s when literal interpolation is after non-literal 279s only removes interpolation around literal 279s behaves like literal interpolation 279s removes interpolation around multiple %w[v1] 279s removes interpolation around %w[v1] when there is more text 279s registers an offense for %w[v1] in interpolation and removes interpolation around it 279s registers an offense only for final %w[v1] in interpolation 279s when there is non-literal and literal interpolation 279s when literal interpolation is before non-literal 279s only removes interpolation around literal 279s when literal interpolation is after non-literal 279s only removes interpolation around literal 279s behaves like special keywords 279s accepts strings like __FILE__ 279s registers an offense and autocorrects interpolation after __FILE__ 279s behaves like literal interpolation 279s removes interpolation around nil when there is more text 279s removes interpolation around multiple nil 279s registers an offense for nil in interpolation and removes interpolation around it 279s registers an offense only for final nil in interpolation 279s when there is non-literal and literal interpolation 279s when literal interpolation is before non-literal 279s only removes interpolation around literal 279s when literal interpolation is after non-literal 279s only removes interpolation around literal 279s behaves like literal interpolation 279s removes interpolation around multiple %i[s1 s2] 279s removes interpolation around %i[s1 s2] when there is more text 279s registers an offense only for final %i[s1 s2] in interpolation 279s registers an offense for %i[s1 s2] in interpolation and removes interpolation around it 279s when there is non-literal and literal interpolation 279s when literal interpolation is after non-literal 279s only removes interpolation around literal 279s when literal interpolation is before non-literal 279s only removes interpolation around literal 279s behaves like non-special string literal interpolation 279s registers an offense for 'foo' and removes the interpolation and quotes around 'foo' 279s behaves like literal interpolation 279s removes interpolation around multiple [] 279s removes interpolation around [] when there is more text 279s registers an offense only for final [] in interpolation 279s registers an offense for [] in interpolation and removes interpolation around it 279s when there is non-literal and literal interpolation 279s when literal interpolation is after non-literal 279s only removes interpolation around literal 279s when literal interpolation is before non-literal 279s only removes interpolation around literal 279s behaves like literal interpolation 279s registers an offense only for final 1 in interpolation 279s registers an offense for 1 in interpolation and removes interpolation around it 279s removes interpolation around multiple 1 279s removes interpolation around 1 when there is more text 279s when there is non-literal and literal interpolation 279s when literal interpolation is before non-literal 279s only removes interpolation around literal 279s when literal interpolation is after non-literal 279s only removes interpolation around literal 279s behaves like literal interpolation 279s removes interpolation around multiple %w[v1 v2] 279s registers an offense for %w[v1 v2] in interpolation and removes interpolation around it 279s removes interpolation around %w[v1 v2] when there is more text 279s registers an offense only for final %w[v1 v2] in interpolation 279s when there is non-literal and literal interpolation 279s when literal interpolation is after non-literal 279s only removes interpolation around literal 279s when literal interpolation is before non-literal 279s only removes interpolation around literal 279s behaves like literal interpolation in words literal 279s removes interpolation of an array containing a symbol literal without space in %I[] 279s accepts interpolation of a string literal with space in %I[] 279s removes interpolation of a string literal without space in %I[] 279s accepts interpolation of an array literal containing a symbol with space in %I[] 279s removes interpolation of a symbol literal without space in %I[] 279s removes interpolation of an array containing a string literal without space in %I[] 279s accepts interpolation of a symbol literal with space in %I[] 279s accepts interpolation of an array literal containing a string with space in %I[] 279s behaves like special keywords 279s registers an offense and autocorrects interpolation after __LINE__ 279s accepts strings like __LINE__ 279s behaves like literal interpolation 279s removes interpolation around multiple %i[s1 s2] 279s registers an offense for %i[s1 s2] in interpolation and removes interpolation around it 279s removes interpolation around %i[s1 s2] when there is more text 279s registers an offense only for final %i[s1 s2] in interpolation 279s when there is non-literal and literal interpolation 279s when literal interpolation is after non-literal 279s only removes interpolation around literal 279s when literal interpolation is before non-literal 279s only removes interpolation around literal 279s behaves like literal interpolation 279s removes interpolation around multiple 1..2 279s removes interpolation around 1..2 when there is more text 279s registers an offense only for final 1..2 in interpolation 279s registers an offense for 1..2 in interpolation and removes interpolation around it 279s when there is non-literal and literal interpolation 279s when literal interpolation is after non-literal 279s only removes interpolation around literal 279s when literal interpolation is before non-literal 279s only removes interpolation around literal 279s behaves like literal interpolation 279s removes interpolation around 1.2e-3 when there is more text 279s removes interpolation around multiple 1.2e-3 279s registers an offense for 1.2e-3 in interpolation and removes interpolation around it 279s registers an offense only for final 1.2e-3 in interpolation 279s when there is non-literal and literal interpolation 279s when literal interpolation is before non-literal 279s only removes interpolation around literal 279s when literal interpolation is after non-literal 279s only removes interpolation around literal 279s behaves like literal interpolation 279s registers an offense only for final -1 in interpolation 279s removes interpolation around multiple -1 279s removes interpolation around -1 when there is more text 279s registers an offense for -1 in interpolation and removes interpolation around it 279s when there is non-literal and literal interpolation 279s when literal interpolation is after non-literal 279s only removes interpolation around literal 279s when literal interpolation is before non-literal 279s only removes interpolation around literal 279s behaves like literal interpolation 279s registers an offense for :symbol in interpolation and removes interpolation around it 279s removes interpolation around :symbol when there is more text 279s registers an offense only for final :symbol in interpolation 279s removes interpolation around multiple :symbol 279s when there is non-literal and literal interpolation 279s when literal interpolation is after non-literal 279s only removes interpolation around literal 279s when literal interpolation is before non-literal 279s only removes interpolation around literal 279s behaves like non-special string literal interpolation 279s registers an offense for "foo" and removes the interpolation and quotes around "foo" 279s behaves like literal interpolation 279s registers an offense for %I[s1 s2] in interpolation and removes interpolation around it 279s removes interpolation around %I[s1 s2] when there is more text 279s removes interpolation around multiple %I[s1 s2] 279s registers an offense only for final %I[s1 s2] in interpolation 279s when there is non-literal and literal interpolation 279s when literal interpolation is before non-literal 279s only removes interpolation around literal 279s when literal interpolation is after non-literal 279s only removes interpolation around literal 279s behaves like literal interpolation 279s registers an offense for 0xaabb in interpolation and removes interpolation around it 279s registers an offense only for final 0xaabb in interpolation 279s removes interpolation around 0xaabb when there is more text 279s removes interpolation around multiple 0xaabb 279s when there is non-literal and literal interpolation 279s when literal interpolation is before non-literal 279s only removes interpolation around literal 279s when literal interpolation is after non-literal 279s only removes interpolation around literal 279s behaves like literal interpolation in words literal 279s removes interpolation of an array containing a string literal without space in %W[] 279s removes interpolation of a symbol literal without space in %W[] 279s accepts interpolation of an array literal containing a symbol with space in %W[] 279s accepts interpolation of an array literal containing a string with space in %W[] 279s removes interpolation of an array containing a symbol literal without space in %W[] 279s accepts interpolation of a symbol literal with space in %W[] 279s removes interpolation of a string literal without space in %W[] 279s accepts interpolation of a string literal with space in %W[] 279s behaves like literal interpolation 279s removes interpolation around 2.0 when there is more text 279s registers an offense only for final 2.0 in interpolation 279s removes interpolation around multiple 2.0 279s registers an offense for 2.0 in interpolation and removes interpolation around it 279s when there is non-literal and literal interpolation 279s when literal interpolation is after non-literal 279s only removes interpolation around literal 279s when literal interpolation is before non-literal 279s only removes interpolation around literal 279s behaves like literal interpolation 279s registers an offense only for final 1_123 in interpolation 279s removes interpolation around multiple 1_123 279s removes interpolation around 1_123 when there is more text 279s registers an offense for 1_123 in interpolation and removes interpolation around it 279s when there is non-literal and literal interpolation 279s when literal interpolation is before non-literal 279s only removes interpolation around literal 279s when literal interpolation is after non-literal 279s only removes interpolation around literal 279s behaves like literal interpolation 279s registers an offense for %w[] in interpolation and removes interpolation around it 279s removes interpolation around multiple %w[] 279s registers an offense only for final %w[] in interpolation 279s removes interpolation around %w[] when there is more text 279s when there is non-literal and literal interpolation 279s when literal interpolation is after non-literal 279s only removes interpolation around literal 279s when literal interpolation is before non-literal 279s only removes interpolation around literal 279s behaves like literal interpolation 279s removes interpolation around 0o377 when there is more text 279s registers an offense only for final 0o377 in interpolation 279s removes interpolation around multiple 0o377 279s registers an offense for 0o377 in interpolation and removes interpolation around it 279s when there is non-literal and literal interpolation 279s when literal interpolation is after non-literal 279s only removes interpolation around literal 279s when literal interpolation is before non-literal 279s only removes interpolation around literal 279s behaves like literal interpolation 279s registers an offense only for final true in interpolation 279s removes interpolation around multiple true 279s registers an offense for true in interpolation and removes interpolation around it 279s removes interpolation around true when there is more text 279s when there is non-literal and literal interpolation 279s when literal interpolation is before non-literal 279s only removes interpolation around literal 279s when literal interpolation is after non-literal 279s only removes interpolation around literal 279s behaves like literal interpolation 279s removes interpolation around multiple ["a", "b"] 279s registers an offense only for final ["a", "b"] in interpolation 279s registers an offense for ["a", "b"] in interpolation and removes interpolation around it 279s removes interpolation around ["a", "b"] when there is more text 279s when there is non-literal and literal interpolation 279s when literal interpolation is before non-literal 279s only removes interpolation around literal 279s when literal interpolation is after non-literal 279s only removes interpolation around literal 279s behaves like literal interpolation 279s registers an offense only for final 123_456_789_123_456_789 in interpolation 279s removes interpolation around 123_456_789_123_456_789 when there is more text 279s removes interpolation around multiple 123_456_789_123_456_789 279s registers an offense for 123_456_789_123_456_789 in interpolation and removes interpolation around it 279s when there is non-literal and literal interpolation 279s when literal interpolation is after non-literal 279s only removes interpolation around literal 279s when literal interpolation is before non-literal 279s only removes interpolation around literal 279s behaves like literal interpolation 279s removes interpolation around multiple 1...2 279s registers an offense only for final 1...2 in interpolation 279s registers an offense for 1...2 in interpolation and removes interpolation around it 279s removes interpolation around 1...2 when there is more text 279s when there is non-literal and literal interpolation 279s when literal interpolation is before non-literal 279s only removes interpolation around literal 279s when literal interpolation is after non-literal 279s only removes interpolation around literal 279s behaves like special keywords 279s accepts strings like __END__ 279s registers an offense and autocorrects interpolation after __END__ 279s behaves like special keywords 279s registers an offense and autocorrects interpolation after __ENCODING__ 279s accepts strings like __ENCODING__ 279s 279s RuboCop::Cop::Layout::MultilineArrayBraceLayout 279s ignores implicit arrays 279s ignores single-line arrays 279s ignores empty arrays 279s behaves like multiline literal brace layout 279s heredoc 279s ignores heredocs that could share a last line 279s detects heredoc structures that are safe to add to 279s symmetrical style 279s opening brace on separate line from first element 279s detects closing brace on same line as last element 279s allows closing brace on separate line from last element 279s allows closing brace on separate line from last multiline element 279s opening brace on same line as first element 279s autocorrects closing brace on different line from last element 279s allows closing brace on same line as last multiline element 279s detects closing brace on different line from last element 279s allows closing brace on same line as last element 279s with a chained call on the closing brace 279s and a comment after the last element 279s detects closing brace on separate line from last elementbut does not autocorrect the closing brace 279s but no comment after the last element 279s autocorrects the closing brace 279s new_line style 279s opening brace on same line as first element 279s allows closing brace on different line from multi-line element 279s detects closing brace on same line as last multiline element 279s autocorrects closing brace on same line as last element 279s allows closing brace on different line from last element 279s opening brace on separate line from first element 279s allows closing brace on separate line from last multiline element 279s allows closing brace on separate line from last element 279s detects closing brace on same line as last element 279s same_line style 279s opening brace on same line as first element 279s allows closing brace on same line as multi-line element 279s allows closing brace on same line from last element 279s autocorrects closing brace on different line as last element 279s detects closing brace on different line from multiline element 279s with a chained call on the closing brace 279s and a comment after the last element 279s detects closing brace on separate line from last elementbut does not autocorrect the closing brace 279s but no comment after the last element 279s autocorrects the closing brace 279s opening brace on separate line from first element 279s allows closing brace on same line as last element 279s allows closing brace on same line as last multiline element 279s detects closing brace on different line from last element 279s behaves like multiline literal brace layout method argument 279s when arguments to a method 279s but no comment after the last element 279s autocorrects the closing brace 279s and a comment after the last element 279s detects closing brace on separate line from last element 279s when comment present before closing brace 279s corrects closing brace without crashing 279s behaves like multiline literal brace layout trailing comma 279s symmetrical style 279s opening brace on same line as first element 279s last element has a trailing comma 279s autocorrects closing brace on different line from last element 279s same_line style 279s opening brace on same line as first element 279s last element has a trailing comma 279s autocorrects closing brace on different line as last element 279s 279s RuboCop::Cop::Style::Encoding 279s registers an offense and corrects if there are multiple encoding magic comments 279s registers an offense when encoding present and UTF-8 279s does not register an offense when encoding is not at the top of the file 279s does not register an offense when no encoding present 279s registers an offense and corrects the magic comment follows another magic comment 279s does not register an offense on a different magic comment type 279s does not register an offense when encoding present but not UTF-8 280s registers an offense when encoding present on 2nd line after shebang 280s does not register an offense when encoding is in the wrong place 280s vim comments 280s registers an offense and corrects 280s emacs comment 280s registers an offense for encoding 280s only removes encoding if there are other editor comments 280s 280s RuboCop::Cop::Layout::EmptyLineAfterMultilineCondition 280s does not register an offense when new line after `when` with multiline condition 280s registers an offense when no new line after `when` with multiline condition 280s registers an offense when no new line after `while` with multiline condition 280s registers an offense when no new line after `until` with multiline condition 280s registers an offense when no new line after modifier `while` with multiline condition 280s does not register an offense when new line after `if` with multiline condition 280s does not register an offense when `if` at the top level 280s registers an offense when no new line after `elsif` with multiline condition 280s registers an offense when no new line after `if` with multiline condition 280s does not register an offense for `when` with singleline condition 280s does not register an offense when new line after `rescue` with multiline exceptions 280s does not register an offense when modifier `while` with multiline conditionis the last child of its parent 280s does not register an offense for `if` with single line condition 280s does not register an offense when new line after `while` with multiline condition 280s does not register an offense for `while` with single line condition 280s registers an offense when no new line after modifier `if` with multiline condition 280s does not register an offense when new line after modifier `while` with multiline condition 280s does not register an offense when new line after modifier `if` with multiline condition 280s does not register an offense when modifier `if` with multiline conditionis the last child of its parent 280s does not register an offense for `rescue` with singleline exceptions 280s does not register an offense when new line after `elsif` with multiline condition 280s registers an offense when no new line after `rescue` with multiline exceptions 280s 280s RuboCop::Cop::Style::EachWithObject 280s ignores inject/reduce with assignment to accumulator param in block 280s ignores inject and reduce with passed in, but not returned hash 280s does not blow up for reduce with no arguments 280s ignores inject and reduce with empty body 280s ignores inject and reduce passed in symbol 280s correctly autocorrects 280s correctly autocorrects with return value only 280s finds inject and reduce with passed in and returned hash 280s ignores inject and reduce with condition as body 280s when a simple literal is passed as initial value 280s ignores inject/reduce 280s Ruby 2.7 280s finds inject and reduce with passed in and returned hash and numblock 280s 280s RuboCop::Cop::Style::SafeNavigation 280s allows an object check before a negated predicate method chain 280s does not move comments that are inside an inner block 280s allows an object check before a method call that is used in a negated regex comparison 280s allows a method call safeguarded with a negative check for the object when using `if` 280s allows an object check before a nil check on a short chain 280s allows method call that is used in a comparison safe guarded by an object check 280s allows an object check before a method call that is used in a spaceship comparison 280s allows chained method calls during assignment safe guardedby an object check 280s allows an object check before a blank check 280s allows method call that is used in a regex comparison safe guarded by an object check 280s allows method calls that do not get called using . safe guarded by an object check 280s allows a method call safeguarded with a negative check for the object when using `unless` 280s allows an object check before a method chain that is used in a comparison 280s allows calls using safe navigation 280s allows for empty if blocks with comments 280s allows a method call as a parameter when the parameter is safe guarded with an object check 280s allows an object check before a method chain longer than 2 methods 280s allows method call that is used in a spaceship comparison safe guarded by an object check 280s allows a method chain that is used in a comparison safe guarded by an object check 280s allows method call that is used in a negated regex comparison safe guarded by an object check 280s allows an object check before a method call that is used in a comparison 280s allows an object check before a method call that is used in a regex comparison 280s allows calls to methods not safeguarded by respond_to 280s allows a method call safeguarded when using `unless nil?` 280s allows an object check before hash access 280s allows calls on nil 280s allows an object check before a negated predicate 280s allows an object check before a long chain with a block 280s allows an object check before a method call that is used with `empty?` 280s allows chained method calls during arithmetic operations safe guarded by an object check 280s allows an object check before a negated method call with a safe navigation 280s allows an object check before a nil check on a long chain 280s allows object checks in the condition of an elsif statement and a method call on that object in the body 280s respond_to? 280s allows method calls safeguarded by a respond_to check on adifferent variable but the same method 280s allows method calls safeguarded by a respond_to check to a different method 280s allows enumerable accessor method calls safeguarded by a respond_to check 280s allows method calls safeguarded by a respond_to check 280s allows method calls safeguarded by a respond_to check on adifferent variable and method 280s behaves like all variable types 280s if expression 280s registers an offense for a single method call inside of a check for the object 280s registers an offense for a single method call with params and a block inside of a check for the object 280s registers an offense for a single method call inside of a non-nil check for the object 280s only moves comments that fall within the expression 280s does not lose comments within if expression 280s registers an offense for a single method call inside of an unless negative check for the object 280s registers an offense for a single method call inside of an unless nil check for the object 280s registers an offense for a single method call with params inside of an unless negative check for the object 280s registers an offense for a single method call with a block inside of a check for the object 280s allows a single method call inside of a check for the object with an else 280s registers an offense for a single method call with params inside of a non-nil check for the object 280s registers an offense for a single method call with a block inside of an unless negative check for the object 280s registers an offense for a single method call with params inside of an unless nil check for the object 280s registers an offense for a single method call with params and a block inside of an unless nil check for the object 280s registers an offense for a single method call with a block inside of a non-nil check for the object 280s registers an offense for a single method call with params and a block inside of an unless negative check for the object 280s registers an offense for a single method call with params and a block inside of a non-nil check for the object 280s registers an offense for a single method call with params inside of a check for the object 280s registers an offense for a single method call with a block inside of an unless nil check for the object 280s ternary expression 280s allows ternary expression 280s modifier if 280s registers an offense for a method call with a block safeguarded with a negative check for the object 280s registers an offense for an object check followed by a method call with a comment at EOL 280s registers an offense for a method call with a block safeguarded with a nil check for the object 280s registers an offense for a method call with a block safeguarded with a check for the object 280s registers an offense for a method call with params and a block safeguarded with a negative nil check for the object 280s registers an offense when safe guard check and safe navigation method call are connected with `&&` condition 280s registers an offense for a method call with params safeguarded with a negative nil check for the object 280s registers an offense for a method call safeguarded with a negative nil check for the object 280s registers an offense for a method call safeguarded with a check for the object 280s registers an offense for a method call with params safeguarded with a negative check for the object 280s registers an offense for a chained method call safeguarded with an unless nil check for the object 280s registers an offense for a method call on an accessor safeguarded by a check for the accessed variable 280s registers an offense for a method call with params and a block safeguarded with a negative check for the object 280s registers an offense for a method call with a block safeguarded with a negative nil check for the object 280s registers an offense for a method call with params and a block safeguarded with a nil check for the object 280s registers an offense for a method call safeguarded with a negative check for the object 280s registers an offense for a method call with params and a block safeguarded with a check for the object 280s registers an offense for a method call with params safeguarded with a check for the object 280s registers an offense for a chained method call safeguarded with a check for the object 280s registers an offense for a method call that nil responds to safe guarded by an object check 280s registers an offense for a chained method call safeguarded with a negative nil check for the object 280s registers an offense for a method call safeguarded with a nil check for the object 280s registers an offense for a method call with params safeguarded with a nil check for the object 280s behaves like safe guarding logical break keywords 280s allows a method call being passed to return safe guarded by an object check 280s behaves like safe guarding logical break keywords 280s allows a method call being passed to next safe guarded by an object check 280s behaves like safe guarding logical break keywords 280s allows a method call being passed to raise safe guarded by an object check 280s behaves like safe guarding logical break keywords 280s allows a method call being passed to break safe guarded by an object check 280s behaves like safe guarding logical break keywords 280s allows a method call being passed to fail safe guarded by an object check 280s behaves like safe guarding logical break keywords 280s allows a method call being passed to throw safe guarded by an object check 280s behaves like safe guarding logical break keywords 280s allows a method call being passed to yield safe guarded by an object check 280s object check before method call 280s allows a nil object check followed by a method call with params 280s allows a non object check followed by a method call with a block 280s allows a non object check followed by a method call with params 280s allows a nil object check followed by a method call 280s allows a nil object check followed by a method call with a block 280s allows a nil object check followed by a method call with params and a block 280s allows a non object check followed by a method call 280s allows a non object check followed by a method call with params and a block 280s ConvertCodeThatCanStartToReturnNil false 280s registers an offense for an object check followed by a method call 280s registers an offense for an object check followed by a method call with a block 280s allows a non-nil object check followed by a method call 280s allows a non-nil object check followed by a method call with params and a block 280s allows a non-nil object check followed by a method call with params 280s registers an offense for an object check followed by a method call with params 280s allows a non-nil object check followed by a method call with a block 280s registers an offense for a check for the object followed by a method call in the condition for an if expression 280s registers an offense for an object check followed by a method calls that nil responds to 280s registers an offense for an object check followed by a method call with params and a block 280s method chaining 280s corrects an object check followed by a chained method call with a symbol proc 280s corrects an object check followed by a chained method call with params 280s corrects an object check followed by a chained method call with a block 280s corrects an object check followed by a chained method call 280s ConvertCodeThatCanStartToReturnNil true 280s registers an offense for a non-nil object check followed by a method call with a block 280s corrects an object check followed by a method call and another check 280s registers an offense for a non-nil object check followed by a method call with params and a block 280s registers an offense for a check for the object followed by a method call in the condition for an if expression 280s registers an offense for a non-nil object check followed by a method call 280s registers an offense for a non-nil object check followed by a method call with params 280s registers an offense for an object check followed by a method call with params 280s registers an offense for an object check followed by a method call with a block 280s registers an offense for an object check followed by a method call 280s registers an offense for an object check followed by a method call with params and a block 280s method chaining 280s registers an offense for an object check followed by chained method calls with blocks 280s with Lint/SafeNavigationChain disabled 280s allows an object check followed by chained method calls with blocks 280s allows an object check followed by chained method calls 280s MaxChainLength: 3 280s allows an object check followed by 4 chained method calls 280s registers an offense for an object check followed by 3 chained method calls 280s MaxChainLength: 1 280s registers an offense for an object check followed by 1 chained method calls 280s allows an object check followed by 2 chained method calls 280s behaves like all variable types 280s if expression 280s registers an offense for a single method call with params inside of a non-nil check for the object 280s registers an offense for a single method call with params and a block inside of a non-nil check for the object 280s registers an offense for a single method call with params inside of a check for the object 280s registers an offense for a single method call with a block inside of an unless negative check for the object 280s registers an offense for a single method call inside of an unless nil check for the object 280s only moves comments that fall within the expression 280s registers an offense for a single method call inside of a non-nil check for the object 280s allows a single method call inside of a check for the object with an else 280s registers an offense for a single method call with a block inside of a check for the object 280s registers an offense for a single method call with params and a block inside of an unless negative check for the object 280s registers an offense for a single method call with params inside of an unless nil check for the object 280s registers an offense for a single method call with a block inside of an unless nil check for the object 280s registers an offense for a single method call inside of a check for the object 280s does not lose comments within if expression 280s registers an offense for a single method call with params inside of an unless negative check for the object 280s registers an offense for a single method call with params and a block inside of a check for the object 280s registers an offense for a single method call inside of an unless negative check for the object 280s registers an offense for a single method call with params and a block inside of an unless nil check for the object 280s registers an offense for a single method call with a block inside of a non-nil check for the object 280s ternary expression 280s allows ternary expression 280s object check before method call 280s allows a non object check followed by a method call with a block 280s allows a nil object check followed by a method call with params and a block 280s allows a non object check followed by a method call 280s allows a nil object check followed by a method call with a block 280s allows a nil object check followed by a method call with params 280s allows a nil object check followed by a method call 280s allows a non object check followed by a method call with params and a block 280s allows a non object check followed by a method call with params 280s ConvertCodeThatCanStartToReturnNil true 280s registers an offense for a non-nil object check followed by a method call 280s registers an offense for a check for the object followed by a method call in the condition for an if expression 280s registers an offense for a non-nil object check followed by a method call with params 280s corrects an object check followed by a method call and another check 280s registers an offense for an object check followed by a method call with params 280s registers an offense for an object check followed by a method call with a block 280s registers an offense for an object check followed by a method call 280s registers an offense for a non-nil object check followed by a method call with a block 280s registers an offense for a non-nil object check followed by a method call with params and a block 280s registers an offense for an object check followed by a method call with params and a block 280s method chaining 280s registers an offense for an object check followed by chained method calls with blocks 280s MaxChainLength: 3 280s registers an offense for an object check followed by 3 chained method calls 280s allows an object check followed by 4 chained method calls 280s MaxChainLength: 1 280s allows an object check followed by 2 chained method calls 280s registers an offense for an object check followed by 1 chained method calls 280s with Lint/SafeNavigationChain disabled 280s allows an object check followed by chained method calls with blocks 280s allows an object check followed by chained method calls 280s ConvertCodeThatCanStartToReturnNil false 280s registers an offense for an object check followed by a method call with params 280s registers an offense for an object check followed by a method call 280s registers an offense for an object check followed by a method call with params and a block 280s registers an offense for an object check followed by a method calls that nil responds to 280s allows a non-nil object check followed by a method call with params 280s registers an offense for a check for the object followed by a method call in the condition for an if expression 280s registers an offense for an object check followed by a method call with a block 280s allows a non-nil object check followed by a method call with a block 280s allows a non-nil object check followed by a method call with params and a block 280s allows a non-nil object check followed by a method call 280s method chaining 280s corrects an object check followed by a chained method call 280s corrects an object check followed by a chained method call with params 280s corrects an object check followed by a chained method call with a symbol proc 280s corrects an object check followed by a chained method call with a block 280s modifier if 280s registers an offense for a method call with a block safeguarded with a nil check for the object 280s registers an offense for a method call with params safeguarded with a negative check for the object 280s registers an offense for a method call safeguarded with a negative check for the object 280s registers an offense for an object check followed by a method call with a comment at EOL 280s registers an offense for a method call with params safeguarded with a check for the object 280s registers an offense for a chained method call safeguarded with a check for the object 280s registers an offense for a method call with params and a block safeguarded with a negative nil check for the object 280s registers an offense for a method call with params and a block safeguarded with a negative check for the object 280s registers an offense for a method call with params safeguarded with a nil check for the object 280s registers an offense for a method call safeguarded with a negative nil check for the object 280s registers an offense for a chained method call safeguarded with an unless nil check for the object 280s registers an offense for a method call with a block safeguarded with a negative nil check for the object 280s registers an offense for a chained method call safeguarded with a negative nil check for the object 280s registers an offense for a method call with params and a block safeguarded with a nil check for the object 280s registers an offense when safe guard check and safe navigation method call are connected with `&&` condition 280s registers an offense for a method call safeguarded with a nil check for the object 280s registers an offense for a method call safeguarded with a check for the object 280s registers an offense for a method call with params and a block safeguarded with a check for the object 280s registers an offense for a method call with params safeguarded with a negative nil check for the object 280s registers an offense for a method call with a block safeguarded with a check for the object 280s registers an offense for a method call with a block safeguarded with a negative check for the object 280s registers an offense for a method call on an accessor safeguarded by a check for the accessed variable 280s registers an offense for a method call that nil responds to safe guarded by an object check 280s behaves like safe guarding logical break keywords 280s allows a method call being passed to return safe guarded by an object check 280s behaves like safe guarding logical break keywords 280s allows a method call being passed to break safe guarded by an object check 280s behaves like safe guarding logical break keywords 280s allows a method call being passed to next safe guarded by an object check 280s behaves like safe guarding logical break keywords 280s allows a method call being passed to fail safe guarded by an object check 280s behaves like safe guarding logical break keywords 280s allows a method call being passed to yield safe guarded by an object check 280s behaves like safe guarding logical break keywords 280s allows a method call being passed to raise safe guarded by an object check 280s behaves like safe guarding logical break keywords 280s allows a method call being passed to throw safe guarded by an object check 280s behaves like all variable types 280s if expression 280s does not lose comments within if expression 280s registers an offense for a single method call with a block inside of an unless nil check for the object 280s registers an offense for a single method call inside of a non-nil check for the object 280s registers an offense for a single method call with params and a block inside of an unless nil check for the object 280s registers an offense for a single method call with params and a block inside of an unless negative check for the object 280s registers an offense for a single method call with params inside of a non-nil check for the object 280s only moves comments that fall within the expression 280s registers an offense for a single method call with params inside of a check for the object 280s registers an offense for a single method call with params inside of an unless nil check for the object 280s registers an offense for a single method call inside of a check for the object 280s registers an offense for a single method call inside of an unless nil check for the object 280s registers an offense for a single method call with a block inside of a non-nil check for the object 280s allows a single method call inside of a check for the object with an else 280s registers an offense for a single method call with params and a block inside of a check for the object 280s registers an offense for a single method call with params inside of an unless negative check for the object 280s registers an offense for a single method call with a block inside of an unless negative check for the object 280s registers an offense for a single method call inside of an unless negative check for the object 280s registers an offense for a single method call with params and a block inside of a non-nil check for the object 280s registers an offense for a single method call with a block inside of a check for the object 280s ternary expression 280s allows ternary expression 280s modifier if 280s registers an offense for a method call with params and a block safeguarded with a negative nil check for the object 280s registers an offense for a method call safeguarded with a nil check for the object 280s registers an offense for a method call safeguarded with a check for the object 280s registers an offense for a method call on an accessor safeguarded by a check for the accessed variable 281s registers an offense when safe guard check and safe navigation method call are connected with `&&` condition 281s registers an offense for a method call with params safeguarded with a negative nil check for the object 281s registers an offense for a chained method call safeguarded with a negative nil check for the object 281s registers an offense for a method call with params safeguarded with a negative check for the object 281s registers an offense for a method call with params and a block safeguarded with a negative check for the object 281s registers an offense for a method call with a block safeguarded with a check for the object 281s registers an offense for a method call with params safeguarded with a nil check for the object 281s registers an offense for a method call with params and a block safeguarded with a check for the object 281s registers an offense for an object check followed by a method call with a comment at EOL 281s registers an offense for a method call with params and a block safeguarded with a nil check for the object 281s registers an offense for a method call with a block safeguarded with a negative check for the object 281s registers an offense for a method call with a block safeguarded with a negative nil check for the object 281s registers an offense for a method call safeguarded with a negative nil check for the object 281s registers an offense for a method call with a block safeguarded with a nil check for the object 281s registers an offense for a chained method call safeguarded with an unless nil check for the object 281s registers an offense for a method call safeguarded with a negative check for the object 281s registers an offense for a method call with params safeguarded with a check for the object 281s registers an offense for a method call that nil responds to safe guarded by an object check 281s registers an offense for a chained method call safeguarded with a check for the object 281s behaves like safe guarding logical break keywords 281s allows a method call being passed to throw safe guarded by an object check 281s behaves like safe guarding logical break keywords 281s allows a method call being passed to yield safe guarded by an object check 281s behaves like safe guarding logical break keywords 281s allows a method call being passed to raise safe guarded by an object check 281s behaves like safe guarding logical break keywords 281s allows a method call being passed to next safe guarded by an object check 281s behaves like safe guarding logical break keywords 281s allows a method call being passed to fail safe guarded by an object check 281s behaves like safe guarding logical break keywords 281s allows a method call being passed to return safe guarded by an object check 281s behaves like safe guarding logical break keywords 281s allows a method call being passed to break safe guarded by an object check 281s object check before method call 281s allows a nil object check followed by a method call with params and a block 281s allows a nil object check followed by a method call with a block 281s allows a non object check followed by a method call with a block 281s allows a nil object check followed by a method call 281s allows a nil object check followed by a method call with params 281s allows a non object check followed by a method call with params and a block 281s allows a non object check followed by a method call with params 281s allows a non object check followed by a method call 281s ConvertCodeThatCanStartToReturnNil true 281s registers an offense for a non-nil object check followed by a method call with params 281s registers an offense for an object check followed by a method call 281s registers an offense for a non-nil object check followed by a method call 281s registers an offense for a non-nil object check followed by a method call with params and a block 281s registers an offense for an object check followed by a method call with params and a block 281s registers an offense for a non-nil object check followed by a method call with a block 281s corrects an object check followed by a method call and another check 281s registers an offense for a check for the object followed by a method call in the condition for an if expression 281s registers an offense for an object check followed by a method call with a block 281s registers an offense for an object check followed by a method call with params 281s method chaining 281s registers an offense for an object check followed by chained method calls with blocks 281s MaxChainLength: 1 281s allows an object check followed by 2 chained method calls 281s registers an offense for an object check followed by 1 chained method calls 281s MaxChainLength: 3 281s allows an object check followed by 4 chained method calls 281s registers an offense for an object check followed by 3 chained method calls 281s with Lint/SafeNavigationChain disabled 281s allows an object check followed by chained method calls with blocks 281s allows an object check followed by chained method calls 281s ConvertCodeThatCanStartToReturnNil false 281s registers an offense for an object check followed by a method call with a block 281s registers an offense for an object check followed by a method call with params 281s allows a non-nil object check followed by a method call 281s allows a non-nil object check followed by a method call with params and a block 281s registers an offense for a check for the object followed by a method call in the condition for an if expression 281s registers an offense for an object check followed by a method calls that nil responds to 281s registers an offense for an object check followed by a method call 281s registers an offense for an object check followed by a method call with params and a block 281s allows a non-nil object check followed by a method call with a block 281s allows a non-nil object check followed by a method call with params 281s method chaining 281s corrects an object check followed by a chained method call with a symbol proc 281s corrects an object check followed by a chained method call with params 281s corrects an object check followed by a chained method call with a block 281s corrects an object check followed by a chained method call 281s behaves like all variable types 281s if expression 281s registers an offense for a single method call with a block inside of an unless nil check for the object 281s registers an offense for a single method call with params and a block inside of a non-nil check for the object 281s registers an offense for a single method call with params inside of an unless nil check for the object 281s registers an offense for a single method call with a block inside of a check for the object 281s registers an offense for a single method call with a block inside of an unless negative check for the object 281s allows a single method call inside of a check for the object with an else 281s registers an offense for a single method call inside of a non-nil check for the object 281s registers an offense for a single method call with a block inside of a non-nil check for the object 281s registers an offense for a single method call with params inside of a check for the object 281s only moves comments that fall within the expression 281s registers an offense for a single method call inside of a check for the object 281s registers an offense for a single method call inside of an unless negative check for the object 281s registers an offense for a single method call with params inside of an unless negative check for the object 281s does not lose comments within if expression 281s registers an offense for a single method call with params and a block inside of a check for the object 281s registers an offense for a single method call with params inside of a non-nil check for the object 281s registers an offense for a single method call inside of an unless nil check for the object 281s registers an offense for a single method call with params and a block inside of an unless negative check for the object 281s registers an offense for a single method call with params and a block inside of an unless nil check for the object 281s ternary expression 281s allows ternary expression 281s object check before method call 281s allows a nil object check followed by a method call with params and a block 281s allows a non object check followed by a method call 281s allows a non object check followed by a method call with params 281s allows a non object check followed by a method call with a block 281s allows a nil object check followed by a method call 281s allows a nil object check followed by a method call with a block 281s allows a non object check followed by a method call with params and a block 281s allows a nil object check followed by a method call with params 281s ConvertCodeThatCanStartToReturnNil true 281s registers an offense for a non-nil object check followed by a method call with params 281s registers an offense for an object check followed by a method call with a block 281s registers an offense for a non-nil object check followed by a method call with params and a block 281s registers an offense for a non-nil object check followed by a method call 281s registers an offense for a non-nil object check followed by a method call with a block 281s corrects an object check followed by a method call and another check 281s registers an offense for a check for the object followed by a method call in the condition for an if expression 281s registers an offense for an object check followed by a method call 281s registers an offense for an object check followed by a method call with params 281s registers an offense for an object check followed by a method call with params and a block 281s method chaining 281s registers an offense for an object check followed by chained method calls with blocks 281s MaxChainLength: 1 281s registers an offense for an object check followed by 1 chained method calls 281s allows an object check followed by 2 chained method calls 281s MaxChainLength: 3 281s allows an object check followed by 4 chained method calls 281s registers an offense for an object check followed by 3 chained method calls 281s with Lint/SafeNavigationChain disabled 281s allows an object check followed by chained method calls with blocks 281s allows an object check followed by chained method calls 281s ConvertCodeThatCanStartToReturnNil false 281s allows a non-nil object check followed by a method call with params 281s allows a non-nil object check followed by a method call 281s registers an offense for an object check followed by a method call with params 281s registers an offense for an object check followed by a method call 281s registers an offense for an object check followed by a method call with a block 281s allows a non-nil object check followed by a method call with a block 281s registers an offense for an object check followed by a method calls that nil responds to 281s registers an offense for a check for the object followed by a method call in the condition for an if expression 281s registers an offense for an object check followed by a method call with params and a block 281s allows a non-nil object check followed by a method call with params and a block 281s method chaining 281s corrects an object check followed by a chained method call with a block 281s corrects an object check followed by a chained method call 281s corrects an object check followed by a chained method call with params 281s corrects an object check followed by a chained method call with a symbol proc 281s modifier if 281s registers an offense for a method call with a block safeguarded with a nil check for the object 281s registers an offense for a method call with params and a block safeguarded with a check for the object 281s registers an offense for a method call with params and a block safeguarded with a negative nil check for the object 281s registers an offense for a method call with params safeguarded with a negative check for the object 281s registers an offense for a chained method call safeguarded with a check for the object 281s registers an offense for a method call with params and a block safeguarded with a nil check for the object 281s registers an offense for a method call safeguarded with a negative nil check for the object 281s registers an offense for a method call with params safeguarded with a negative nil check for the object 281s registers an offense for a method call with a block safeguarded with a check for the object 281s registers an offense for a method call safeguarded with a negative check for the object 281s registers an offense for a method call that nil responds to safe guarded by an object check 281s registers an offense for a method call on an accessor safeguarded by a check for the accessed variable 281s registers an offense for an object check followed by a method call with a comment at EOL 281s registers an offense for a method call safeguarded with a check for the object 281s registers an offense for a method call with a block safeguarded with a negative check for the object 281s registers an offense for a method call with a block safeguarded with a negative nil check for the object 281s registers an offense for a method call with params and a block safeguarded with a negative check for the object 281s registers an offense for a method call with params safeguarded with a nil check for the object 281s registers an offense for a method call safeguarded with a nil check for the object 281s registers an offense when safe guard check and safe navigation method call are connected with `&&` condition 281s registers an offense for a method call with params safeguarded with a check for the object 281s registers an offense for a chained method call safeguarded with an unless nil check for the object 281s registers an offense for a chained method call safeguarded with a negative nil check for the object 281s behaves like safe guarding logical break keywords 281s allows a method call being passed to fail safe guarded by an object check 281s behaves like safe guarding logical break keywords 281s allows a method call being passed to yield safe guarded by an object check 281s behaves like safe guarding logical break keywords 281s allows a method call being passed to return safe guarded by an object check 281s behaves like safe guarding logical break keywords 281s allows a method call being passed to break safe guarded by an object check 281s behaves like safe guarding logical break keywords 281s allows a method call being passed to next safe guarded by an object check 281s behaves like safe guarding logical break keywords 281s allows a method call being passed to raise safe guarded by an object check 281s behaves like safe guarding logical break keywords 282s allows a method call being passed to throw safe guarded by an object check 282s when Ruby <= 2.2 282s does not register an offense when a method call that nil responds to safe guarded by an object check 282s behaves like all variable types 282s object check before method call 282s allows a non object check followed by a method call with a block 282s allows a nil object check followed by a method call with a block 282s allows a nil object check followed by a method call with params 282s allows a non object check followed by a method call with params and a block 282s allows a nil object check followed by a method call 282s allows a non object check followed by a method call with params 282s allows a nil object check followed by a method call with params and a block 282s allows a non object check followed by a method call 282s ConvertCodeThatCanStartToReturnNil true 282s registers an offense for an object check followed by a method call 282s registers an offense for a non-nil object check followed by a method call with params 282s corrects an object check followed by a method call and another check 282s registers an offense for an object check followed by a method call with params and a block 282s registers an offense for an object check followed by a method call with params 282s registers an offense for a non-nil object check followed by a method call with params and a block 282s registers an offense for a check for the object followed by a method call in the condition for an if expression 282s registers an offense for an object check followed by a method call with a block 282s registers an offense for a non-nil object check followed by a method call 282s registers an offense for a non-nil object check followed by a method call with a block 282s method chaining 282s registers an offense for an object check followed by chained method calls with blocks 282s MaxChainLength: 1 282s registers an offense for an object check followed by 1 chained method calls 282s allows an object check followed by 2 chained method calls 282s MaxChainLength: 3 282s registers an offense for an object check followed by 3 chained method calls 282s allows an object check followed by 4 chained method calls 282s with Lint/SafeNavigationChain disabled 282s allows an object check followed by chained method calls 282s allows an object check followed by chained method calls with blocks 282s ConvertCodeThatCanStartToReturnNil false 282s registers an offense for an object check followed by a method call with a block 282s allows a non-nil object check followed by a method call with a block 282s registers an offense for an object check followed by a method call with params and a block 282s allows a non-nil object check followed by a method call with params and a block 282s registers an offense for an object check followed by a method call with params 282s allows a non-nil object check followed by a method call 282s registers an offense for an object check followed by a method calls that nil responds to 282s registers an offense for a check for the object followed by a method call in the condition for an if expression 282s registers an offense for an object check followed by a method call 282s allows a non-nil object check followed by a method call with params 282s method chaining 282s corrects an object check followed by a chained method call with a block 282s corrects an object check followed by a chained method call with a symbol proc 282s corrects an object check followed by a chained method call 282s corrects an object check followed by a chained method call with params 282s modifier if 282s registers an offense for a method call with a block safeguarded with a nil check for the object 282s registers an offense for a method call with params and a block safeguarded with a check for the object 282s registers an offense when safe guard check and safe navigation method call are connected with `&&` condition 282s registers an offense for a method call safeguarded with a negative nil check for the object 282s registers an offense for an object check followed by a method call with a comment at EOL 282s registers an offense for a method call with a block safeguarded with a negative check for the object 282s registers an offense for a chained method call safeguarded with a negative nil check for the object 282s registers an offense for a method call with a block safeguarded with a negative nil check for the object 282s registers an offense for a method call with params and a block safeguarded with a nil check for the object 282s registers an offense for a method call safeguarded with a nil check for the object 282s registers an offense for a chained method call safeguarded with an unless nil check for the object 282s registers an offense for a method call with params and a block safeguarded with a negative nil check for the object 282s registers an offense for a method call with params safeguarded with a negative nil check for the object 282s registers an offense for a method call on an accessor safeguarded by a check for the accessed variable 282s registers an offense for a chained method call safeguarded with a check for the object 282s registers an offense for a method call with params safeguarded with a check for the object 282s registers an offense for a method call with params and a block safeguarded with a negative check for the object 282s registers an offense for a method call safeguarded with a negative check for the object 282s registers an offense for a method call with a block safeguarded with a check for the object 282s registers an offense for a method call that nil responds to safe guarded by an object check 282s registers an offense for a method call safeguarded with a check for the object 282s registers an offense for a method call with params safeguarded with a negative check for the object 282s registers an offense for a method call with params safeguarded with a nil check for the object 282s behaves like safe guarding logical break keywords 282s allows a method call being passed to throw safe guarded by an object check 282s behaves like safe guarding logical break keywords 282s allows a method call being passed to raise safe guarded by an object check 282s behaves like safe guarding logical break keywords 282s allows a method call being passed to break safe guarded by an object check 282s behaves like safe guarding logical break keywords 282s allows a method call being passed to return safe guarded by an object check 282s behaves like safe guarding logical break keywords 282s allows a method call being passed to next safe guarded by an object check 282s behaves like safe guarding logical break keywords 282s allows a method call being passed to fail safe guarded by an object check 282s behaves like safe guarding logical break keywords 282s allows a method call being passed to yield safe guarded by an object check 282s if expression 282s registers an offense for a single method call inside of an unless negative check for the object 282s registers an offense for a single method call with params and a block inside of an unless negative check for the object 282s registers an offense for a single method call with a block inside of an unless negative check for the object 282s registers an offense for a single method call with params and a block inside of a check for the object 282s registers an offense for a single method call with params and a block inside of an unless nil check for the object 282s registers an offense for a single method call with params inside of an unless nil check for the object 282s registers an offense for a single method call inside of a non-nil check for the object 282s registers an offense for a single method call with a block inside of a check for the object 282s registers an offense for a single method call with params inside of a non-nil check for the object 282s registers an offense for a single method call with a block inside of a non-nil check for the object 282s registers an offense for a single method call with params inside of an unless negative check for the object 282s only moves comments that fall within the expression 282s allows a single method call inside of a check for the object with an else 282s registers an offense for a single method call inside of a check for the object 282s registers an offense for a single method call with params inside of a check for the object 282s does not lose comments within if expression 282s registers an offense for a single method call inside of an unless nil check for the object 282s registers an offense for a single method call with a block inside of an unless nil check for the object 282s registers an offense for a single method call with params and a block inside of a non-nil check for the object 282s ternary expression 282s allows ternary expression 282s behaves like all variable types 282s if expression 282s registers an offense for a single method call with a block inside of an unless nil check for the object 282s registers an offense for a single method call inside of an unless nil check for the object 282s does not lose comments within if expression 282s registers an offense for a single method call with params and a block inside of a check for the object 282s registers an offense for a single method call with params inside of a check for the object 282s registers an offense for a single method call with a block inside of a non-nil check for the object 282s registers an offense for a single method call with a block inside of an unless negative check for the object 282s registers an offense for a single method call with params and a block inside of an unless nil check for the object 282s only moves comments that fall within the expression 282s registers an offense for a single method call inside of a check for the object 282s registers an offense for a single method call with params inside of an unless negative check for the object 282s registers an offense for a single method call with a block inside of a check for the object 282s registers an offense for a single method call inside of an unless negative check for the object 282s registers an offense for a single method call with params inside of a non-nil check for the object 282s allows a single method call inside of a check for the object with an else 282s registers an offense for a single method call inside of a non-nil check for the object 282s registers an offense for a single method call with params and a block inside of an unless negative check for the object 282s registers an offense for a single method call with params inside of an unless nil check for the object 283s registers an offense for a single method call with params and a block inside of a non-nil check for the object 283s ternary expression 283s allows ternary expression 283s modifier if 283s registers an offense for a method call with a block safeguarded with a negative nil check for the object 283s registers an offense for a chained method call safeguarded with a check for the object 283s registers an offense for a method call with a block safeguarded with a negative check for the object 283s registers an offense for a method call with params and a block safeguarded with a negative check for the object 283s registers an offense for a method call safeguarded with a negative nil check for the object 283s registers an offense for a method call with a block safeguarded with a nil check for the object 283s registers an offense for a method call with a block safeguarded with a check for the object 283s registers an offense for a method call with params and a block safeguarded with a negative nil check for the object 283s registers an offense for a method call safeguarded with a nil check for the object 283s registers an offense for a method call with params and a block safeguarded with a check for the object 283s registers an offense when safe guard check and safe navigation method call are connected with `&&` condition 283s registers an offense for a chained method call safeguarded with an unless nil check for the object 283s registers an offense for a method call safeguarded with a negative check for the object 283s registers an offense for a method call with params safeguarded with a nil check for the object 283s registers an offense for a method call with params safeguarded with a negative check for the object 283s registers an offense for a method call with params safeguarded with a negative nil check for the object 283s registers an offense for a chained method call safeguarded with a negative nil check for the object 283s registers an offense for a method call with params safeguarded with a check for the object 283s registers an offense for a method call on an accessor safeguarded by a check for the accessed variable 283s registers an offense for an object check followed by a method call with a comment at EOL 283s registers an offense for a method call that nil responds to safe guarded by an object check 283s registers an offense for a method call with params and a block safeguarded with a nil check for the object 283s registers an offense for a method call safeguarded with a check for the object 283s behaves like safe guarding logical break keywords 283s allows a method call being passed to raise safe guarded by an object check 283s behaves like safe guarding logical break keywords 283s allows a method call being passed to break safe guarded by an object check 283s behaves like safe guarding logical break keywords 283s allows a method call being passed to throw safe guarded by an object check 283s behaves like safe guarding logical break keywords 283s allows a method call being passed to yield safe guarded by an object check 283s behaves like safe guarding logical break keywords 283s allows a method call being passed to next safe guarded by an object check 283s behaves like safe guarding logical break keywords 283s allows a method call being passed to return safe guarded by an object check 283s behaves like safe guarding logical break keywords 283s allows a method call being passed to fail safe guarded by an object check 283s object check before method call 283s allows a non object check followed by a method call with a block 283s allows a non object check followed by a method call with params 283s allows a nil object check followed by a method call 283s allows a nil object check followed by a method call with params 283s allows a non object check followed by a method call with params and a block 283s allows a nil object check followed by a method call with a block 283s allows a nil object check followed by a method call with params and a block 283s allows a non object check followed by a method call 283s ConvertCodeThatCanStartToReturnNil false 283s registers an offense for an object check followed by a method call with params 283s allows a non-nil object check followed by a method call 283s allows a non-nil object check followed by a method call with params 283s registers an offense for an object check followed by a method calls that nil responds to 283s allows a non-nil object check followed by a method call with a block 283s allows a non-nil object check followed by a method call with params and a block 283s registers an offense for an object check followed by a method call 283s registers an offense for an object check followed by a method call with a block 283s registers an offense for a check for the object followed by a method call in the condition for an if expression 283s registers an offense for an object check followed by a method call with params and a block 283s method chaining 283s corrects an object check followed by a chained method call with params 283s corrects an object check followed by a chained method call with a symbol proc 283s corrects an object check followed by a chained method call with a block 283s corrects an object check followed by a chained method call 283s ConvertCodeThatCanStartToReturnNil true 283s registers an offense for a non-nil object check followed by a method call with params 283s registers an offense for a check for the object followed by a method call in the condition for an if expression 283s registers an offense for a non-nil object check followed by a method call with a block 283s registers an offense for an object check followed by a method call with a block 283s corrects an object check followed by a method call and another check 283s registers an offense for an object check followed by a method call 283s registers an offense for a non-nil object check followed by a method call 283s registers an offense for an object check followed by a method call with params 283s registers an offense for a non-nil object check followed by a method call with params and a block 283s registers an offense for an object check followed by a method call with params and a block 283s method chaining 283s registers an offense for an object check followed by chained method calls with blocks 283s MaxChainLength: 3 283s allows an object check followed by 4 chained method calls 283s registers an offense for an object check followed by 3 chained method calls 283s with Lint/SafeNavigationChain disabled 283s allows an object check followed by chained method calls with blocks 283s allows an object check followed by chained method calls 283s MaxChainLength: 1 283s allows an object check followed by 2 chained method calls 283s registers an offense for an object check followed by 1 chained method calls 283s 283s RuboCop::Cop::Lint::DuplicateElsifCondition 283s does not register an offense for non-repeated elsif conditions 283s registers multiple offenses for multiple repeated elsif conditions 283s does not register an offense for partially repeated elsif conditions 283s registers an offense for subsequent repeated elsif conditions 283s registers an offense for repeated elsif conditions 283s 283s RuboCop::Cop::Style::FloatDivision 283s EnforcedStyle is single_coerce 283s does not register offense for left coerce only 283s does not register offense for right coerce only 283s registers offense and corrects for both coerce 283s registers offense and corrects for left coerce with calculations 283s EnforcedStyle is right_coerce 283s does not register offense for right coerce 283s registers offense and corrects for both coerce 283s registers offense and corrects for left coerce with calculations 283s registers offense and corrects for left coerce 283s EnforcedStyle is left_coerce 283s registers offense and corrects for right coerce 283s registers offense and corrects for right coerce with calculations 283s does not register offense for left coerce 283s registers offense and corrects for both coerce 283s EnforcedStyle is fdiv 283s registers offense and corrects for right coerce 283s registers offense and corrects for left coerce 283s does not register offense on usage of fdiv 283s registers offense and corrects for both coerce 283s registers offense and corrects for left coerce with calculations 283s 283s RuboCop::Cop::Layout::LeadingEmptyLines 283s registers an offense and corrects multiple new lines before a class 283s allows an empty input 283s allows blank lines without any comments or code 283s accepts not having a blank line before code 283s accepts not having a blank line before a class 283s registers an offense and corrects a new line before code 283s accepts not having a blank line before a comment 283s registers an offense and corrects a new line before a class 283s registers an offense and corrects a new line before a comment 283s autocorrect 283s in collaboration 283s does not invoke conflicts with other cops 283s 283s RuboCop::Cop::Layout::MultilineMethodCallBraceLayout 283s ignores single-line calls 283s ignores calls without arguments 283s ignores implicit calls 283s ignores calls with a multiline empty brace 283s ignores calls with an empty brace 283s when comment present before closing brace 283s corrects closing brace without crashing 283s when EnforcedStyle is new_line 283s ignores single-line calls with multi-line receiver with leading dot 283s still ignores single-line calls 283s ignores single-line calls with multi-line receiver 283s behaves like multiline literal brace layout trailing comma 283s symmetrical style 283s opening brace on same line as first element 283s last element has a trailing comma 283s autocorrects closing brace on different line from last element 283s same_line style 283s opening brace on same line as first element 283s last element has a trailing comma 283s autocorrects closing brace on different line as last element 283s behaves like multiline literal brace layout 283s same_line style 283s opening brace on separate line from first element 283s allows closing brace on same line as last multiline element 283s allows closing brace on same line as last element 283s detects closing brace on different line from last element 283s opening brace on same line as first element 283s autocorrects closing brace on different line as last element 283s allows closing brace on same line from last element 283s detects closing brace on different line from multiline element 283s allows closing brace on same line as multi-line element 283s with a chained call on the closing brace 283s and a comment after the last element 283s detects closing brace on separate line from last elementbut does not autocorrect the closing brace 283s but no comment after the last element 283s autocorrects the closing brace 283s new_line style 283s opening brace on separate line from first element 283s allows closing brace on separate line from last multiline element 283s allows closing brace on separate line from last element 283s detects closing brace on same line as last element 283s opening brace on same line as first element 283s detects closing brace on same line as last multiline element 283s autocorrects closing brace on same line as last element 283s allows closing brace on different line from multi-line element 283s allows closing brace on different line from last element 283s symmetrical style 283s opening brace on same line as first element 283s allows closing brace on same line as last element 283s detects closing brace on different line from last element 283s allows closing brace on same line as last multiline element 283s autocorrects closing brace on different line from last element 283s with a chained call on the closing brace 283s but no comment after the last element 283s autocorrects the closing brace 283s and a comment after the last element 283s detects closing brace on separate line from last elementbut does not autocorrect the closing brace 283s opening brace on separate line from first element 283s detects closing brace on same line as last element 283s allows closing brace on separate line from last element 283s allows closing brace on separate line from last multiline element 283s heredoc 283s detects heredoc structures that are safe to add to 283s ignores heredocs that could share a last line 283s 283s RuboCop::Cop::Layout::InitialIndentation 283s registers an offense for indented method definition 283s accepts empty file 283s registers an offense and corrects indented assignment disregarding comment 283s accepts unindented comment + assignment 283s accepts unindented method definition 283s for a file with byte order mark 283s registers an offense and corrects indented method call after comment 283s accepts unindented method call 283s registers an offense and corrects indented method call 283s 283s RuboCop::ResultCache 283s the cache path 283s when CacheRootDirectory is set 283s contains the given root 283s and RUBOCOP_CACHE_ROOT is set 283s contains the root from RUBOCOP_CACHE_ROOT 283s when CacheRootDirectory not set 283s and XDG_CACHE_HOME is not set 283s contains $HOME/.cache 283s and XDG_CACHE_HOME is set 283s contains the given path and UID 283s cached result that was saved with no command line option 283s when a cache source is read 283s has utf8 encoding 283s when offenses are saved 283s an offense with status corrected 283s serializes them with uncorrected status 283s an offense with status corrected_with_todo 283s serializes them with uncorrected status 283s an offense with status unsupported 283s serializes them with unsupported status 283s an offense with status new_status 283s serializes them with new_status status 283s an offense with status uncorrected 283s serializes them with uncorrected status 283s when --cache-root is given 283s takes the cache_root from the options 283s when --only is given 283s is invalid 283s when no option is given 283s is valid and can be loaded 283s when file contents have changed 283s is invalid 283s when file permission have changed 283s is invalid 283s when end of line characters have changed 283s is invalid 283s when a symlink is present in the cache location 283s and symlink attack protection is disabled 283s permits caching and prints no warning 283s and symlink attack protection is enabled 283s prevents caching and prints a warning 283s when team external_dependency_checksum changes 283s is invalid 283s when team external_dependency_checksum is the same 284s is valid 284s when --format is given 284s is valid and can be loaded 284s when --display-cop-names is given 284s is invalid 284s .cleanup 284s removes the oldest files in the cache if needed 284s #save 284s when the @path is not writable 284s behaves like invalid cache location 284s doesn't raise an exception 284s behaves like invalid cache location 284s doesn't raise an exception 284s when the default internal encoding is UTF-8 284s writes non UTF-8 encodable data to file with no exception 284s 284s RuboCop::Cop::Style::OrAssignment 284s when `then` branch body is empty 284s registers an offense 284s when using var = if var; var; else; something; end 284s does not register an offense if any of the variables are different 284s registers an offense with normal variables 284s registers an offense with instance variables 284s registers an offense with class variables 284s registers an offense with global variables 284s when using unless var; var = something; end 284s does not register an offense if any of the variables are different 284s registers an offense for instance variables 284s registers an offense for normal variables 284s registers an offense for class variables 284s registers an offense for global variables 284s when using `elsif` statement 284s does not register an offense 284s when using var = something unless var 284s registers an offense for normal variables 284s does not register an offense if any of the variables are different 284s registers an offense for instance variables 284s registers an offense for class variables 284s registers an offense for global variables 284s when using var = var ? var : something 284s registers an offense with normal variables 284s does not register an offense if any of the variables are different 284s registers an offense with instance variables 284s registers an offense with global variables 284s registers an offense with class variables 284s 284s RuboCop::Cop::Style::NumericLiterals 284s does not count a leading minus sign as a digit 284s autocorrects negative numbers 284s autocorrects numbers with spaces between leading minus and numbers 284s autocorrects numeric literal with exponent (large E) and dot 284s registers an offense for a long undelimited integer 284s ignores non-decimal literals 284s accepts short numbers without underscore 284s accepts integers with less than three places at the end 284s registers an offense for an integer with misplaced underscore 284s registers an offense for a float with a long undelimited integer part 284s accepts long numbers with underscore 284s handles numeric literal with exponent 284s autocorrects negative floating-point numbers 284s accepts a short integer without underscore 284s autocorrects numeric literal with exponent and dot 284s strict 284s registers an offense for an integer with misplaced underscore 284s when `'3000'` is specified for `AllowedNumbers` 284s does not register an offense 284s registers an offense 284s AllowedPatterns 284s registers an offense for numbers that do not exactly match the pattern 284s does not register an offense for numbers that exactly match the pattern 284s corrects by inserting underscores every 3 digits 284s AllowedPatterns with repetition 284s does not register an offense for numbers that match the pattern 284s when `3000` is specified for `AllowedNumbers` 284s does not register an offense 284s registers an offense 284s for --auto-gen-config 284s when the number is only digits 284s detects right value of MinDigits based on the longest number 284s sets the right value if one is disabled inline 284s with separators 284s disables the cop 284s does not disable the cop if the line is disabled 284s 284s RuboCop::Cop::Style::FileWrite 284s registers an offense for and corrects the `File.open` with multiline write block (mode 'wb') 284s registers an offense for and corrects the `File.open` with multiline write block (mode 'wb') with heredoc 284s registers an offense for and corrects `File.open(filename, 'wt').write(content)` 284s registers an offense for and corrects `::File.open(filename, 'w').write(content)` 284s registers an offense for and corrects `::File.open(filename, 'w+t').write(content)` 284s registers an offense for and corrects `File.open(filename, 'w+b').write(content)` 284s registers an offense for and corrects the `File.open` with multiline write block (mode 'w') 284s registers an offense for and corrects `::File.open(filename, 'wt').write(content)` 284s registers an offense for and corrects the `File.open` with multiline write block (mode 'w+') with heredoc 284s registers an offense for and corrects the `File.open` with multiline write block (mode 'w+b') with heredoc 284s does not register an offense for the `File.open` with multiline write block when not writing to the block variable 284s registers an offense for and corrects `::File.open(filename, 'w+b').write(content)` 284s registers an offense for and corrects `File.open(filename, 'wb').write(content)` 284s registers an offense for and corrects the `File.open` with inline write block (mode 'w+t') 284s registers an offense for and corrects `::File.open(filename, 'w+').write(content)` 284s registers an offense for and corrects the `File.open` with inline write block (mode 'wb') 284s registers an offense for and corrects the `File.open` with inline write block (mode 'w+') 284s registers an offense for and corrects `::File.open(filename, 'wb').write(content)` 284s registers an offense for and corrects `File.open(filename, 'w+').write(content)` 284s registers an offense for and corrects the `File.open` with inline write block (mode 'w') 284s registers an offense for and corrects the `File.open` with inline write block (mode 'w+b') 284s does not register an offense when a splat argument is passed to `f.write` 284s registers an offense for and corrects the `File.open` with multiline write block (mode 'w+') 284s registers an offense for and corrects `File.open(filename, 'w+t').write(content)` 284s registers an offense for and corrects the `File.open` with multiline write block (mode 'w') with heredoc 284s registers an offense for and corrects `File.open(filename, 'w').write(content)` 284s registers an offense for and corrects the `File.open` with multiline write block (mode 'w+b') 284s registers an offense for and corrects the `File.open` with multiline write block (mode 'wt') with heredoc 284s registers an offense for and corrects the `File.open` with multiline write block (mode 'wt') 284s registers an offense for and corrects the `File.open` with multiline write block (mode 'w+t') with heredoc 284s registers an offense for and corrects the `File.open` with inline write block (mode 'wt') 284s registers an offense for and corrects the `File.open` with multiline write block (mode 'w+t') 284s 284s RuboCop::Cop::Style::SymbolProc 284s accepts lambda with 1 argument 284s accepts ::Proc.new with 1 argument 284s registers an offense when receiver is some value and using `select` with a block 284s registers an offense when receiver is a hash literal and using `min` with a block 284s accepts a block with an unused argument with an lvar 284s autocorrects correctly when there are no arguments in parentheses 284s accepts empty block body 284s accepts block with more than 1 arguments 284s accepts block with more than 1 expression in body 284s registers an offense for a block when method in body is unary -/+ 284s registers an offense for a block with parameterless method call on param 284s registers an offense when receiver is an array literal and using `select` with a block 284s accepts block with no arguments 284s autocorrects correctly when args have a trailing comma 284s accepts block when method in body is not called on block arg 284s does not register an offense when receiver is a array literal and using `min` with a block 284s does not register an offense when receiver is a hash literal and using `reject` with a block 284s registers an offense when receiver is an array literal and using `reject` with a block 284s accepts a block with an unused argument with an method call 284s accepts block with a block argument 284s accepts block with adding a comma after the sole argument 284s does not register an offense when receiver is a hash literal and using `select` with a block 284s accepts proc with 1 argument 284s does not crash with a bare method call 284s registers an offense for safe navigation operator 284s does not register an offense when receiver is a array literal and using `max` with a block 284s accepts block with splat params 284s accepts Proc.new with 1 argument 284s autocorrects multiple aliases with symbols as proc 284s registers an offense when receiver is some value and using `reject` with a block 284s registers an offense when receiver is a hash literal and using `max` with a block 284s numblocks 284s registers an offense when receiver is an array literal and using `reject` with a numblock 284s accepts block with multiple numbered parameters 284s registers an offense when receiver is an hash literal and using `max` with a numblock 284s registers an offense when receiver is an array literal and using `select` with a numblock 284s accepts lambda with 1 numbered parameter 284s does not register an offense when receiver is a array literal and using `min` with a numblock 284s accepts ::Proc.new with 1 numbered parameter 284s accepts block with only second numbered parameter 284s does not register an offense when receiver is a array literal and using `max` with a numblock 284s accepts proc with 1 numbered parameter 284s registers an offense when receiver is some value and using `select` with a numblock 284s accepts Proc.new with 1 numbered parameter 284s does not register an offense when receiver is a hash literal and using `select` with a numblock 284s does not register an offense when receiver is a hash literal and using `reject` with a numblock 284s registers an offense for a block with a numbered parameter 284s registers an offense when receiver is an hash literal and using `min` with a numblock 284s registers an offense when receiver is some value and using `reject` with a numblock 284s AllowComments: true 284s accepts block with parameterless method call on param and contains a comment 284s registers an offense for a block with parameterless method call on paramand not contains a comment 284s when the method has arguments 284s registers an offense 284s when `AllowMethodsWithArguments: true` 284s when method has arguments 284s does not register an offense 284s when `super` has arguments 284s does not register an offense 284s when method has no arguments 284s registers an offense 284s when AllowedMethods is enabled 284s accepts ignored method 284s when `super` has no arguments 284s registers an offense 284s when AllowedPatterns is enabled 284s accepts ignored method 284s when `AllowMethodsWithArguments: false` 284s when method has arguments 284s registers an offense 284s when `super` has arguments 284s registers an offense 284s 284s RuboCop::Cop::Layout::SingleLineBlockChain 284s does not register an offense for method call chained on the same line as a multiline block 284s registers an offense for method call chained on the same line as a block 284s does not register an offense for method call chained on a new line after a single line block 284s does not register an offense for method call chained on a new line after a single line block with trailing dot 284s does not register an offense for method call chained without a dot 284s registers an offense for no selector method call chained on the same line as a block 284s 284s RuboCop::Cop::Style::WhenThen 284s registers an offense for when b, c; 284s accepts ; separating statements in the body of when 284s registers an offense for when b; 284s when inspecting a case statement with an empty branch 284s does not register an offense 284s 284s RuboCop::Cop::Bundler::DuplicatedGem 284s when investigating Ruby files 284s does not register any offenses 284s when investigating Gemfiles 284s does not register an offense when gem is duplicated within `case` statement 284s does not register an offense when gem is duplicated within `if-elsif` statement 284s does not register an offense when gem is duplicated within `if-else` statement 284s registers an offense when gem from default group is conditionally duplicated 284s and no duplicate gems are present 284s does not register any offenses 284s and a gem is duplicated in default group 284s registers an offense 284s and a duplicated gem is in a git/path/group/platforms block 284s registers an offense 284s and the file is empty 284s does not register any offenses 284s 284s RuboCop::Cop::Layout::EndOfLine 284s when EnforcedStyle is lf 284s registers an offense for CR at end of file 284s accepts an empty file 284s does not register offenses after __END__ 284s registers an offense for CR+LF 284s and there are many lines ending with CR+LF 284s registers only one offense 284s can inspect non-UTF-8 encoded source with proper encoding comment 284s and the default external encoding is US_ASCII 284s can inspect non-UTF-8 encoded source with proper encoding comment 284s does not crash on UTF-8 encoded non-ascii characters 284s when EnforcedStyle is native 284s registers an offense for an incorrect EOL 284s when EnforcedStyle is crlf 284s does not register offenses after __END__ 284s registers an offense for CR+LF 284s does not register offense for no CR at end of file 284s accepts an empty file 284s and the default external encoding is US_ASCII 284s can inspect non-UTF-8 encoded source with proper encoding comment 284s does not crash on UTF-8 encoded non-ascii characters 284s and there are many lines ending with LF 284s registers only one offense 284s can inspect non-UTF-8 encoded source with proper encoding comment 284s 284s RuboCop::Cop::Style::TrailingBodyOnMethodDefinition 284s autocorrects body with method definition with args not in parens 284s registers an offense when body trails after method definition 284s accepts a method with multiple lines of body 284s accepts a method with one line of body 284s does not register offense with trailing body on method end 284s registers when body starts on def line & continues many more lines 284s registers when body starts on def line & continues one more line 284s removes semicolon from method definition but not body when autocorrecting 284s autocorrects with comment after body 284s when method is not on first line of processed_source 284s autocorrects offense 284s Ruby 3.0 or higher 284s does not register offense when endless method definition body is after newline in opening parenthesis 284s 284s RuboCop::Cop::Naming::RescuedExceptionsVariableName 284s with default config 284s with variable being referenced 284s renames the variable references when autocorrecting 284s when the variable is reassigned using multiple assignment 284s only corrects uses of the exception 284s when the variable is reassigned 284s only corrects the exception variable 284s only corrects uses of the exception 284s with multiple branches 284s registers and corrects each offense 284s with implicit rescue 284s with `Exception` variable 284s does not register an offense when using `_e` 284s registers an offense when using `_exc` 284s registers an offense when using `exc` 284s does not register an offense when using `e` 284s without `Exception` variable 284s does not register an offense 284s with explicit rescue 284s with method as `Exception` 284s does not register an offense without variable name 284s does not register an offense with expected variable name 284s registers an offense with unexpected variable name 284s without `Exception` variable 284s does not register an offense 284s with lower letters class name 284s does not register an offense 284s shadowing an external variable 284s does not register an offense 284s with splat operator as `Exception` list 284s does not register an offense with expected variable name 284s does not register an offense without variable name 284s registers an offense with unexpected variable name 284s with `Exception` variable 284s does not register an offense when using _e followed by e 284s does not register an offense when using `_e` 284s registers an offense when using `exc` 284s registers an offense when using `_exc` 284s registers an offense when using `exc` and renames its usage 284s registers offenses when using `foo` and `bar` in multiple rescues 284s does not register an offense when using `e` 284s with nested rescues 284s handles it 284s with the `PreferredName` setup 284s does not register an offense when using `exception` 284s does not register an offense when using `_exception` 284s registers an offense when using `e` 284s registers an offense when using `_e` 284s registers offenses when using `foo` and `bar` in multiple rescues 284s 284s RuboCop::Cop::Style::RedundantSelfAssignmentBranch 284s registers and corrects an offense when self-assigning redundant else branch and empty else branch 284s does not register an offense when using `elsif` and self-assigning the value of `else` branch 284s does not register an offense when lhs is not variable 284s does not register an offense when self-assigning redundant else ternary branch for cvar 284s does not register an offense when self-assigning redundant else branch and multiline else branch 284s registers and corrects an offense when self-assigning redundant else branch and empty if branch 284s does not register an offense when not self-assigning redundant branches 284s does not register an offense when self-assigning redundant else branch and multiline if branch 284s does not register an offense when using only if branch 284s does not register an offense when using `elsif` and self-assigning the value of `then` branch 284s does not register an offense when self-assigning redundant else ternary branch for gvar 284s registers and corrects an offense when self-assigning redundant if branch 284s does not register an offense when multi assignment 284s registers and corrects an offense when self-assigning redundant else ternary branch 284s does not register an offense when using `elsif` and self-assigning the value of `elsif` branch 284s registers and corrects an offense when self-assigning redundant else branch 284s registers and corrects an offense when self-assigning redundant if ternary branch 284s does not register an offense when self-assigning redundant else ternary branch for ivar 284s 284s RuboCop::Cop::Style::For 284s when each is the enforced style 284s accepts multiline each 284s registers an offense for for 284s registers an offense for opposite + correct style 284s accepts def for 284s accepts :for 284s registers multiple offenses 284s autocorrect 284s corrects an array with `-` operator 284s corrects an array with `|` operator 284s corrects an array with `&` operator 284s corrects to `each` without parenthesize collection if non-operator method called 284s corrects a tuple of items 284s changes for that does not have do or semicolon to each 284s corrects an array with `+` operator 284s corrects an array with `||` operator 284s corrects an array with `&&` operator 284s corrects an array with `*` operator 284s with range 284s changes for that does not have do or semicolon to each 284s changes for to each 284s without parentheses 284s changes for to each 284s changes for that does not have do or semicolon to each 284s when for is the enforced style 284s accepts single line each 284s accepts for 284s registers an offense for correct + opposite style 284s registers an offense for multiline each 284s registers multiple offenses 284s registers an offense for each without an item and uses _ as the item 284s registers an offense for a tuple of items 284s when using safe navigation operator 284s does not break 284s Ruby 2.7 284s registers an offense for each without an item and uses _ as the item 284s 284s RuboCop::Cop::Layout::SpaceInsideHashLiteralBraces 284s registers an offense for correct + opposite 284s accepts hash literals with no braces 285s can handle interpolation in a braceless hash literal 285s registers an offense for hashes with no spaces if so configured 285s accepts hashes with spaces by default 285s with space inside empty braces not allowed 285s registers an offense for empty braces with space inside 285s accepts empty braces with no space inside 285s when EnforcedStyle is no_space 285s registers an offense for opposite + correct 285s accepts multiline hash 285s accepts multiline hash with comment 285s accepts hashes with no spaces 285s registers an offense for hashes with spaces 285s when using method argument that both key and value are hash literals 285s accepts hashes with no spaces 285s with newline inside empty braces not allowed 285s registers an offense 285s with space inside empty braces allowed 285s registers an offense for empty braces with no space inside 285s accepts empty braces with space inside 285s when using method argument that both key and value are hash literals 285s registers hashes with no spaces 285s offending hash following empty hash 285s registers an offense on both sides 285s on { key: "{" } 285s does not register an offense 285s on Hash[{ x: 1 } => [1]] 285s does not register an offense 285s when EnforcedStyle is compact 285s registers an offense for nested hashes with spaces 285s registers an offense for opposite + correct 285s registers offenses for hashes with no spaces 285s doesn't register an offense for non-nested hashes with spaces 285s accepts multiline hash 285s accepts multiline hash with comment 285s 285s RuboCop::Cop::Lint::NestedMethodDefinition 285s registers an offense for a nested method definition inside lambda 285s does not register offense for nested definition inside ::Module.new 285s does not register offense for nested definition inside module_exec 285s registers an offense for a nested class method definition 285s does not register offense for nested definition inside module_eval 285s does not register offense for nested definition inside Class.new 285s does not register offense for nested definition inside class_exec 285s does not register offense for nested definition inside instance_eval 285s does not register offense for nested definition inside instance_exec 285s does not register offense for nested definition inside ::Class.new 285s registers an offense for a nested singleton method definition 285s does not register offense for nested definition inside class shovel 285s does not register offense for nested definition inside Module.new 285s does not register offense for definition of method on local var 285s does not register offense for nested definition inside class_eval 285s does not register offense for nested definition inside Struct.new 285s does not register an offense for a lambda definition inside method 285s registers an offense for a nested method definition 285s does not register offense for nested definition inside ::Struct.new 285s when `AllowedMethods: [has_many]` 285s does not register offense for nested definition inside `has_many` 285s registers offense for nested definition inside `denied_method` 285s when `AllowedPatterns: [baz]` 285s registers offense for nested definition inside `do_qux` 285s does not register offense for nested definition inside `do_baz` 285s 285s RuboCop::Cop::Lint::MultipleComparison 285s registers an offense for x > y > z 285s registers an offense for x < y > z 285s registers an offense for x <= y < z 285s registers an offense for x < y < z 285s registers an offense for x <= y <= z 285s accepts to use `|` operator 285s accepts to use `^` operator 285s registers an offense for x >= y >= z 285s registers an offense for x > y <= z 285s registers an offense for x >= y > z 285s accepts to use one compare operator 285s registers an offense for x >= y <= z 285s accepts to use `&` operator 285s registers an offense for x > y >= z 285s registers an offense for x < y <= z 285s registers an offense for x <= y >= z 285s registers an offense for x <= y > z 285s registers an offense for x >= y < z 285s registers an offense for x > y < z 285s registers an offense for x < y >= z 285s 285s RuboCop::Cop::Style::Semicolon 285s accepts semicolon after params if so configured 285s registers an offense for a single expression 285s registers an offense for one line method with two statements 285s accepts one line empty class definitions 285s registers an offense for range (`1..42`) with semicolon 285s accepts one line empty module definitions 285s registers an offense for a semicolon at the beginning of a line 285s accepts one line method definitions 285s accept semicolons inside strings 285s registers an offense for semicolon at the end no matter what 285s registers an offense for range (`1...42`) with semicolon 285s registers an offense for several expressions 285s accepts one line empty method definitions 285s accepts semicolon before end if so configured 285s when AllowAsExpressionSeparator is true 285s accepts one line method with two statements 285s accepts several expressions 285s Ruby >= 2.6 285s registers an offense for endless range with semicolon in the method definition 285s registers an offense for endless range with semicolon (irange and erange) 285s does not register an offense for endless range without semicolon 285s registers an offense for endless range with semicolon (irange only) 285s with a multi-expression line without a semicolon 285s does not register an offense 285s 285s RuboCop::Cop::Layout::SpaceAfterSemicolon 285s registers an offense and corrects semicolon without space after it 285s does not crash if semicolon is the last character of the file 285s inside block braces 285s when EnforcedStyle for SpaceInsideBlockBraces is no_space 285s accepts no space between a semicolon and a closing brace 285s behaves like common behavior 285s accepts a space between a semicolon and a closing brace 285s when EnforcedStyle for SpaceInsideBlockBraces is space 285s registers an offense and corrects no space between a semicolon and a closing brace 285s behaves like common behavior 285s accepts a space between a semicolon and a closing brace 285s 285s RuboCop::Cop::Style::MapCompactWithConditionalBlock 285s With single line block 285s registers an offense and corrects to `reject` with modifier form of `unless` condition 285s registers an offense and corrects to `select` with ternary expression 285s registers an offense and corrects to `reject` with ternary expression 285s does not register offenses if `compact` is not chained to `map` 285s registers an offense and corrects to `select` with modifier form of `if` condition 285s With multiline block 285s registers an offense and corrects to `select` with guard clause of `if` and `next` has a value and return nil 285s registers an offense and corrects to `reject` with `if` condition 285s registers an offense and corrects to `select` if condition has not else branch 285s registers an offense and corrects to `reject` with guard clause of `unless` and `next` has a value 285s does not register offenses if there are multiple guard clauses 285s does not register offenses if condition has elsif branch 285s registers an offense and corrects to `reject` if `next value` in else_branch and `nil` in if_branch 285s registers an offense and corrects to `select` with guard clause of `if` and `next` has a value 285s registers an offense and corrects to `select` with ternary expression 285s registers an offense and corrects to `select` with guard clause of `if` and next explicitly nil 285s registers an offense and corrects to `reject` with guard clause of `unless` 285s registers an offense and corrects to `select` with `if` condition 285s registers an offense and corrects to `reject` with `unless` condition 285s registers an offense and corrects to `reject` with modifier form of `unless` condition 285s registers an offense and corrects to `select` with modifier form of `if` condition 285s does not register offenses if `compact` is not chained to `map` 285s registers an offense and corrects to `reject` with ternary expression 285s registers an offense and corrects to `select` if `next value` in if_branch and `nil` in else_branch 285s does not register offenses if return value is not same as block argument 285s registers an offense and corrects to `select` with multi-line `if` condition 285s registers an offense and corrects to `reject` with guard clause of `unless` and `next` explicitly nil 285s registers an offense and corrects to `select` with guard clause of `if` 285s registers an offense and corrects to `reject` with guard clause of `unless` and `next` has a value and return nil 285s 285s RuboCop::Cop::Style::SelfAssignment 285s registers an offense for non-shorthand assignment & and x 285s registers an offense for non-shorthand assignment + and @x 285s registers an offense for non-shorthand assignment + and @@x 285s registers an offense for non-shorthand assignment - and x 285s registers an offense for non-shorthand assignment || and @@x 285s registers an offense for non-shorthand assignment & and @@x 285s registers an offense for non-shorthand assignment / and x 285s registers an offense for non-shorthand assignment ** and @x 285s registers an offense for non-shorthand assignment * and @@x 285s registers an offense for non-shorthand assignment * and x 285s registers an offense for non-shorthand assignment & and @x 285s registers an offense for non-shorthand assignment * and @x 285s registers an offense for non-shorthand assignment | and @x 285s registers an offense for non-shorthand assignment - and @@x 285s registers an offense for non-shorthand assignment / and @x 285s registers an offense for non-shorthand assignment ** and @@x 285s registers an offense for non-shorthand assignment && and @x 285s registers an offense for non-shorthand assignment / and @@x 285s registers an offense for non-shorthand assignment - and @x 285s registers an offense for non-shorthand assignment || and @x 285s registers an offense for non-shorthand assignment | and x 285s registers an offense for non-shorthand assignment || and x 285s registers an offense for non-shorthand assignment + and x 285s registers an offense for non-shorthand assignment && and x 285s registers an offense for non-shorthand assignment ** and x 285s registers an offense for non-shorthand assignment && and @@x 285s registers an offense for non-shorthand assignment | and @@x 285s 285s RuboCop::Cop::Lint::EmptyInPattern 285s when a `in` body is present 285s accepts `case` with `in` bodies and `else` clause 285s accepts `case` with `in` ... `then` statements 285s accepts `case` with `in` ... `then` statements and else clause 285s accepts `case` with `in` bodies 285s when `AllowComments: false` 285s registers an offense for empty `in` body with a comment 285s when `AllowComments: true` 285s registers an offense for empty `in` when comment is in another branch 285s accepts an empty `in` body with a comment 285s when a `in` body is missing 285s registers an offense for missing `in` ... `then` body 285s registers an offense for missing `in` body with a comment 285s registers an offense for missing `in` body followed by `else` 285s registers an offense for a missing `in` body 285s registers an offense for missing `in` body with a comment followed by `else` 285s registers an offense for missing `in` ... then `body` followed by `else` 285s 285s RuboCop::Cop::Lint::UselessElseWithoutRescue 285s with `else` without `rescue` 285s registers an offense 285s with `else` with `rescue` 285s accepts 285s 285s RuboCop::Cop::Style::EmptyHeredoc 285s does not register an offense when using not empty heredoc 285s registers an offense when using empty heredoc argument with other argument 285s registers an offense when using empty `<<~EOS` heredoc 285s registers an offense when using empty `< if on last line 286s registers an offense for void lit 2.0 if not on last line 286s registers an offense for void var VAR if not on last line 286s registers an offense for void op < if not on last line 286s registers two offenses for void literals in a setter method 286s accepts void unary op + if on last line 286s registers an offense for void var var if not on last line 286s accepts void op + by itself without a begin block 286s registers two offenses for void literals in an initialize method 286s registers an offense for void op + if not on last line 286s accepts void op < if on last line 286s accepts void unary op ! if on last line 286s registers an offense for void sign op + if not on last line 286s accepts void op <=> by itself without a begin block 286s accepts void unary op ~ if on last line 286s registers an offense for void op == if not on last line 286s accepts void op > by itself without a begin block 286s registers an offense for void var @var if not on last line 286s accepts void op >= if on last line 286s accepts void op === by itself without a begin block 286s accepts void op * if on last line 286s registers an offense for void lit [1] if not on last line 286s accepts void op % if on last line 286s registers an offense for void op * if not on last line 286s registers an offense for void lit /test/ if not on last line 286s registers an offense for void op / if not on last line 286s registers an offense for void op - if not on last line 286s accepts void op - by itself without a begin block 286s registers an offense for void op != if not on last line 286s accepts void op % by itself without a begin block 286s registers an offense for void lit 1 if not on last line 286s registers an offense for void op >= if not on last line 286s registers an offense for void literal in a method definition 286s accepts empty block 286s accepts void op <= by itself without a begin block 286s handles explicit begin blocks 286s accepts void op / if on last line 286s registers an offense for void lit {} if not on last line 286s accepts short call syntax 286s accepts void op - if on last line 286s accepts void op < by itself without a begin block 286s accepts void unary op - if on last line 286s registers an offense for void op > if not on last line 286s registers an offense for void op <= if not on last line 286s accepts void op * by itself without a begin block 286s registers an offense for void unary op ~ if not on last line 286s accepts void op / by itself without a begin block 286s accepts void op == by itself without a begin block 286s registers an offense for void unary op ! if not on last line 286s registers an offense for void op <=> if not on last line 286s accepts method with irange block 286s registers two offenses for void literals in `#tap` method 286s registers two offenses for void literals in a `#each` method 286s registers an offense for void lit :test if not on last line 286s registers an offense for void op % if not on last line 286s accepts void unary op ! by itself without a begin block 286s accepts backtick commands 286s accepts void op <= if on last line 286s accepts void unary op - by itself without a begin block 286s handles `#each` block with single expression 286s registers an offense for void var @@var if not on last line 286s accepts void op === if on last line 286s accepts method with erange block 286s registers two offenses for void literals in a `for` 286s accepts void op > if on last line 286s accepts void unary op + by itself without a begin block 286s accepts void op != by itself without a begin block 286s accepts void unary op ~ by itself without a begin block 286s accepts void op == if on last line 286s accepts void op >= by itself without a begin block 286s accepts void op != if on last line 286s registers an offense for void sign op - if not on last line 286s when not checking for methods with no side effects 286s does not register an offense for void nonmutating methods 286s Ruby 2.7 286s registers two offenses for void literals in `#tap` method 286s when checking for methods with no side effects 286s registers an offense for chained methods 286s registers an offense if not on last line 286s 286s RuboCop::Cop::Lint::UselessMethodDefinition 286s does not register an offense when method definition contains optional argument 286s registers an offense and corrects for method containing only `super` call 286s does not register an offense when method definition contains optional keyword argument 286s does not register an offense for empty class level `initialize` method 286s does not register an offense for constructor containing additional code to `super` 286s does not register an offense when non-constructor contains only comments 286s does not register an offense when `super` arguments differ from method arguments 286s does not register an offense for empty constructor 286s does not register an offense for method containing additional code to `super` 286s does not register an offense for constructor with only comments 286s 286s RuboCop::Cop::Metrics::Utils::CodeLengthCalculator 286s #calculate 286s raises when unknown foldable type is passed 286s when method 286s folds hashes as method args if asked 286s counts single line hash with line breaks correctly if asked folding 286s does not count blank lines 286s folds arrays if asked 286s folds hashes with comment if asked 286s calculates method length 286s counts single line correctly if asked folding 286s folds multiline hashes with line break after it as method args if asked 286s counts comments if asked 286s counts single line hash with other args correctly if asked folding 286s folds hashes without braces as the one of method args if asked 286s counts single line hash as the one of method args with safe navigation operator if asked folding 286s folds multiline hashes with line break before it as method args if asked 286s folds hashes if asked 286s counts single line without parentheses correctly if asked folding 286s folds hashes as method kwargs if asked 286s counts single line hash as the one of method args if asked folding 286s folds multiline hashes without braces as method args if asked 286s folds heredocs if asked 286s when class 286s folds hashes if asked 286s counts comments if asked 286s folds arrays if asked 286s does not count lines of inner classes 286s does not count blank lines 286s folds heredocs if asked 286s calculates class length 286s 286s RuboCop::Cop::Layout::AssignmentIndentation 286s ignores comparison operators 286s allows a properly indented rhs with fullwidth characters 286s registers an offense for incorrectly indented rhs 286s allows assignments that do not start on a newline 286s registers an offense for incorrectly indented rhs whenmultiple assignment with line breaks on each line 286s allows a properly indented rhs 286s registers an offense for incorrectly indented rhs when multiple assignment 286s registers an offense for multi-lhs 286s when indentation width is overridden for this cop only 286s autocorrects indentation 286s allows a properly indented rhs 286s 286s RuboCop::Cop::Security::MarshalLoad 286s does not register an offense Marshal methods under another namespace 286s does not register an offense for Marshal.dump 286s allows using dangerous Marshal methods for deep cloning 286s registers an offense for using Marshal.load 286s registers an offense for using Marshal.restore 286s 286s RuboCop::Formatter::ClangStyleFormatter 286s #report_file 286s displays text containing the offending source line 286s when the offending source spans multiple lines 286s displays the first line with ellipses 286s when the offense is automatically corrected 286s prints [Corrected] along with message 286s when the offense is not corrected 286s prints message as-is 286s when the source line is blank 286s does not display offending source line 286s when the offense is correctable 286s prints message as-is 286s when the source contains multibyte characters 286s displays text containing the offending source line 286s 286s RuboCop::Cop::Style::StringChars 286s does not register an offense when using `split` 286s registers and corrects an offense when using `split("")` 286s registers and corrects an offense when using `split` without parentheses 286s registers and corrects an offense when using `split(//)` 286s does not register an offense when using `chars` 286s does not register an offense when using `split(/ /)` 286s registers and corrects an offense when using `split('')` 286s 286s RuboCop::Cop::VariableForce::VariableTable 286s #find_variable with an empty scope stack 286s returns nil 286s #accessible_variables 286s when the current scope has some variables 286s returns all the variables 286s when there are no variables 286s returns empty array 286s when the direct outer scope has some variables 286s and the current scope is block 286s returns the current and direct outer scope variables 286s and the current scope is not block 286s returns only the current scope variables 286s #declare_variable 286s adds variable to current scope with its name as key 286s returns the added variable 286s #current_scope_level 286s increases by pushing scope 286s decreases by popping scope 286s #pop_scope 286s returns popped scope object 286s #push_scope 286s returns pushed scope object 286s #find_variable 286s when current scope is not block 286s when a variable with the target name does not exist in current scope 286s and does not exist in all outer scopes 286s returns nil 286s but exists in the direct outer scope 286s returns nil 286s when a variable with the target name exists in current scope 286s and also exists in outer scope 286s returns the current scope variable 286s and does not exist in outer scope 286s returns the current scope variable 286s when current scope is block 286s when a variable with the target name does not exist in current scope 286s and does not exist in all outer scopes 286s returns nil 286s but exists in the direct outer scope 286s returns the direct outer scope variable 286s but exists in a indirect outer scope 286s when the direct outer scope is not block 286s returns nil 286s when the direct outer scope is block 286s returns the indirect outer scope variable 286s when a variable with the target name exists in current scope 286s and also exists in outer scope 286s returns the current scope variable 286s and does not exist in outer scope 286s returns the current scope variable 286s 286s RuboCop::Cop::Style::FrozenStringLiteralComment 286s always 286s accepts a disabled frozen string literal comment below shebang above an encoding comments 286s accepts a frozen string literal comment below newline-separated magic comments 286s accepts a frozen string literal on the top line 286s accepts an emacs style combined magic comment 286s registers an offense for not having a frozen string literal comment when there is only a shebang 286s accepts a disabled frozen string literal below an encoding comment 286s registers an offense for not having a frozen string literal comment under an encoding comment 286s accepts a frozen string literal comment below shebang above an encoding comments 286s accepts a disabled frozen string literal below a shebang comment 286s accepts a frozen string literal below an encoding comment 286s registers an offense for not having a frozen string literal comment on the top line 286s registers an offense for not having a frozen string literal comment under a shebang and an encoding comment 286s registers an offense for not having a frozen string literal comment under an encoding comment separated by a newline 286s accepts an empty source 286s registers an offense for an extra first empty line 286s accepts a source with no tokens 286s accepts a disabled frozen string literal on the top line 286s accepts a frozen string literal comment after other comments 286s registers an offense for having a frozen string literal comment under ruby code 286s registers an offense for arbitrary tokens 286s registers an offense with an empty line between magic comments and the code 286s accepts a disabled frozen string literal comment below shebang and encoding comments 286s accepts a frozen string literal comment below shebang and encoding comments 286s registers an offense for not having a frozen string literal comment under a shebang 286s accepts a frozen string literal below a shebang comment 286s target_ruby_version < 2.3 286s accepts calling << on a string with interpolation 286s accepts freezing a string with interpolation 286s accepts calling << on a string 286s accepts freezing a string 286s never 286s registers an offense for a frozen string literal comment below an encoding comment 286s registers an offense for a disabled frozen string literal comment on the top line 286s accepts a frozen string literal comment under ruby code 286s allows not having a frozen string literal comment under an encoding comment 286s accepts not having not having a frozen string literal comment under a shebang 286s registers an offense for a disabled frozen string literal below an encoding comment 286s registers an offense for a disabled frozen string literal comment below shebang above an encoding comments 286s allows not having a frozen string literal comment under a shebang and an encoding comment 286s registers an offense for a frozen string literal comment below shebang and encoding comments 286s registers an offense for having a frozen string literal comment after other comments 286s registers an offense for a disabled frozen string literal below a shebang comment 286s registers an offense for a disabled frozen string literal comment below shebang and encoding comments 286s registers an offense for a frozen string literal comment on the top line 286s accepts not having a frozen string literal comment on the top line 286s registers an offense for a frozen string literal comment below a shebang comment 286s registers an offense for a frozen string literal comment below shebang above an encoding comments 286s accepts a source with no tokens 286s accepts an empty source 286s always_true 286s registers an offense for not having a frozen string literal comment under an encoding comment 286s registers an offense for not having a frozen string literal comment under a shebang, an encoding comment, and extra space 286s accepts a frozen string literal comment under shebang with no other code 286s registers an offense for arbitrary tokens below a shebang comment 286s registers an offense for a disabled frozen string literal comment below shebang above an encoding comments 286s registers an offense for arbitrary tokens below shebang above an encoding comments 286s accepts a frozen string literal below an encoding comment 286s registers an offense for a disabled frozen string literal below an encoding comment 286s registers an offense for arbitrary tokens above an empty line 286s accepts an empty source 286s accepts an emacs style combined magic comment 286s registers an offense for an extra first empty line 286s accepts a frozen string literal on the top line 286s registers an offense for having a frozen string literal comment under ruby code 286s registers an offense for a disabled frozen string literal comment under shebang with no other code 286s registers an offense for a disabled frozen string literal comment below shebang and encoding comments 286s registers an offense for not having a frozen string literal comment under an encoding comment and extra space 286s accepts a source with no tokens 286s registers an offense for a disabled frozen string literal 286s registers an offense for arbitrary tokens 286s registers an offense for arbitrary tokens below shebang, an encoding comment, and extra space 286s registers an offense for arbitrary tokens under shebang with no other code 286s registers an offense for a disabled frozen string literal below a shebang comment 286s accepts a frozen string literal comment below an encoding comment and extra space 286s accepts a frozen string literal comment below shebang and encoding comments 286s accepts a frozen string literal comment after other comments 286s registers an offense for not having a frozen string literal comment under a shebang and an encoding comment 286s registers an offense for a disabled frozen string literal comment below shebang, an encoding comment, and extra space 286s registers an offense for arbitrary tokens below an encoding comment 286s registers an offense for a disabled frozen string literal above an empty line 286s registers an offense for not having a frozen string literal comment on the top line 286s registers an offense for arbitrary tokens below shebang and encoding comments 286s accepts a frozen string literal below a shebang comment 286s registers an offense for a disabled frozen string literal on the top line 286s accepts a frozen string literal comment below shebang, an encoding comment, and extra space 286s registers an offense for not having a frozen string literal comment under shebang with no other code 286s registers an offense for a disabled frozen string literal comment below an encoding comment and extra space 286s accepts a frozen string literal comment below shebang above an encoding comments 286s registers an offense for arbitrary tokens below an encoding comment and extra space 286s registers an offense for a disabled frozen string literal comment after other comments 286s 286s RuboCop::Cop::Lint::ConstantResolution 286s registers no offense qualifying a namespace const 286s registers no offense when qualifying a const 286s registers an offense not qualifying a namespace const 286s registers an offense not qualifying a const 286s with Ignore set 286s registers an offense not qualifying another const 287s registers an with a namespace const 287s registers no offense when qualifying a const 287s registers no offense with an unqualified const 287s registers no offense when an unqualified namespace const 287s registers no offense qualifying a namespace const 287s module & class definitions 287s does not register offense 287s with Only set 287s registers an offense with an unqualified const 287s registers no offense qualifying a namespace const 287s registers no offense when qualifying a const 287s registers an offense when an unqualified namespace const 287s registers no offense not qualifying another const 287s registers no with a namespace const 287s 287s RuboCop::Cop::Layout::SpaceBeforeBrackets 287s does not register an offense when using percent array literal argument without parentheses 287s does not register an offense when using array literal argument without parentheses 287s does not register an offense when assigning an array 287s when referencing 287s does not register an offense when array literal argument is enclosed in parentheses 287s registers an offense and corrects when using space between cvar receiver and left brackets 287s does not register an offense when using multiple arguments 287s does not register an offense when not using space between variable receiver and left brackets 287s registers an offense and corrects when using space between lvar receiver and left brackets 287s does not register an offense when without receiver 287s does not register an offense when using space between method call and left brackets 287s does not register an offense when not using space between method call and left brackets 287s registers an offense and corrects when using space between gvar receiver and left brackets 287s does not register an offense when call desugared `Hash#[]` to cvar receiver 287s does not register an offense when call desugared `Hash#[]` to ivar receiver 287s does not register an offense when it is used as a method argument 287s does not register an offense when call desugared `Hash#[]` to lvar receiver 287s registers an offense and corrects when using space between ivar receiver and left brackets 287s when assigning 287s registers an offense and corrects when using space between receiver and left brackets 287s does not register an offense when not using space between receiver and left brackets 287s does not register an offense when space is used in left bracket 287s does not register an offense when multiple spaces are inserted inside the left bracket 287s 287s RuboCop::Cop::Layout::ClosingHeredocIndentation 287s accepts correctly indented closing heredoc 287s accepts correctly indented closing heredoc when heredoc contents is after closing heredoc 287s registers an offense for bad indentation of a closing heredoc 287s accepts correctly indented closing heredoc when heredoc contents with blank line 287s does not register an offense for a << heredoc 287s accepts correctly indented closing heredoc when heredoc contents is before closing heredoc 287s accepts correctly indented closing heredoc when aligned at the beginning of method definition and content is empty 287s accepts correctly indented closing heredoc when aligned at the beginning of method definition and using `strip_indent` 287s registers an offense for incorrectly indented empty heredocs 287s accepts correctly indented closing heredoc when aligned at the beginning of method definition 287s does not register an offense for correctly indented empty heredocs 287s 287s RuboCop::Cop::Style::RedundantRegexpEscape 287s with multibyte characters 287s removes the escape character at the right position 287s with a single-line %r!! regexp 287s with escaped delimiters inside a character-class 287s does not register an offense 287s without escapes 287s does not register an offense 287s with escaped delimiters and regexp options 287s does not register an offense 287s with escaped delimiters outside a character-class 287s does not register an offense 287s with a multi-line %r{} regexp 287s with redundantly-escaped slashes 287s registers an offense and corrects 287s without escapes 287s does not register an offense 287s with a redundant escape after a line with comment 287s registers an offense and corrects 287s with a # inside a character class 287s does not register an offense 287s with a single-line %r{} regexp 287s with redundantly-escaped slashes 287s registers an offense and corrects 287s with an escaped { or } outside a character class 287s does not register an offense 287s with an escaped { or } inside a character class 287s does not register an offense 287s without escapes 287s does not register an offense 287s with a single-line `//` regexp 287s with an escaped '*' outside a character class 287s does not register an offense 287s with an escaped '-' character being the first character inside a character class 287s registers an offense and corrects 287s with an escaped ')' outside a character class 287s does not register an offense 287s with an escaped 'G' outside a character class 287s does not register an offense 287s with an escaped 'Z' outside a character class 287s does not register an offense 287s with an escaped 'A' inside a character class 287s does not register an offense 287s with an uppercase metacharacter outside a character class 287s does not register an offense 287s with an escaped 'w' inside a character class 287s does not register an offense 287s with multiple escaped metachars inside a character class 287s registers offenses and corrects 287s with an escaped 'f' inside a character class 287s does not register an offense 287s with a nested character class then allowed escape 287s does not register an offense 287s with an escaped 'd' outside a character class 287s does not register an offense 287s with an escaped 'u0041' outside a character class 287s does not register an offense 287s with an escaped 'X' outside a character class 287s does not register an offense 287s with an escaped 'J' outside a character class 287s does not register an offense 287s with an escaped 'y' inside a character class 287s does not register an offense 287s with an escaped 'r' outside a character class 287s does not register an offense 287s with an escape inside an interpolated string 287s does not register an offense 287s with an escaped 'T' outside a character class 287s does not register an offense 287s with an escaped 'cc' inside a character class 287s does not register an offense 287s with an escaped 'E' inside a character class 287s does not register an offense 287s with an escaped 'R' inside a character class 287s does not register an offense 287s with an escaped 'i' inside a character class 287s does not register an offense 287s with an escaped 'D' inside a character class 287s does not register an offense 287s with an escaped '-' outside a character class 287s registers an offense and corrects 287s with an escaped 'h' outside a character class 287s does not register an offense 287s with an escaped 'z' outside a character class 287s does not register an offense 287s with an escaped 's' outside a character class 287s does not register an offense 287s with a free-spaced mode regex 287s with redundant escape preceded by an escaped comment 287s registers offenses and corrects 287s with a commented [ and ] 287s does not register an offense 287s with a commented redundant escape on a single line 287s does not register an offense 287s with a commented redundant escape 287s does not register an offense 287s with an escaped 'n101' outside a character class 287s does not register an offense 287s with an escaped '(' inside a character class 287s registers an offense and corrects 287s with a line continuation within a character class 287s does not register an offense 287s with an escaped 'v' outside a character class 287s does not register an offense 287s with an escaped 'U' outside a character class 287s does not register an offense 287s with an escaped 'f' outside a character class 287s does not register an offense 287s with an escaped 'H' outside a character class 287s does not register an offense 287s with an escaped 'l' outside a character class 287s does not register an offense 287s with an escaped 'N' outside a character class 287s does not register an offense 287s with an escaped 'P{alpha}' inside a character class 287s does not register an offense 287s with an escaped '#' inside a character class 287s does not register an offense 287s with an escaped 'D' outside a character class 287s does not register an offense 287s with an interpolation followed by redundant escapes 287s registers offenses and corrects 287s with an escaped 'Y' outside a character class 287s does not register an offense 287s with an escaped 'r' inside a character class 287s does not register an offense 287s with an escaped 'j' outside a character class 287s does not register an offense 287s with an escaped 'n101' inside a character class 287s does not register an offense 287s with an escaped '?' outside a character class 287s does not register an offense 287s with an escaped 'W' inside a character class 287s does not register an offense 287s with an escaped '|' inside a character class 287s registers an offense and corrects 287s with an escaped 'V' outside a character class 287s does not register an offense 287s with escaped slashes 287s does not register an offense 287s with an escaped 'V' inside a character class 287s does not register an offense 287s with an escaped 'S' inside a character class 287s does not register an offense 287s with an escaped character class and following escaped char 287s does not register an offense 287s with an escaped 'B' inside a character class 287s does not register an offense 287s with an escaped 'P{alpha}' outside a character class 287s does not register an offense 287s with an escaped interpolation outside a character class 287s does not register an offense 287s with an escaped '-' inside a character class 287s registers an offense and corrects 287s with an escaped 'L' outside a character class 287s does not register an offense 287s with an invalid g escape 287s does not register an offense 287s with an escaped 'C-c' inside a character class 287s does not register an offense 287s with an escaped 'u{0041}' outside a character class 287s does not register an offense 287s with an escaped 'a' outside a character class 287s does not register an offense 287s with an escaped '|' outside a character class 287s does not register an offense 287s with an escaped '$' outside a character class 287s does not register an offense 287s with an escaped 'S' outside a character class 287s does not register an offense 287s with an escaped '[' inside a character class 287s does not register an offense 287s with an escaped '+' inside a character class 287s registers an offense and corrects 287s with an escaped 'M-a' inside a character class 287s does not register an offense 287s with an escaped 'b' outside a character class 287s does not register an offense 287s without escapes 287s does not register an offense 287s with an escaped 'Q' inside a character class 287s does not register an offense 287s with an escaped '.' outside a character class 287s does not register an offense 287s with an escaped 'Y' inside a character class 287s does not register an offense 287s with an escaped 'm' outside a character class 287s does not register an offense 287s with an escaped 'R' outside a character class 287s does not register an offense 287s with an escaped 'y' outside a character class 287s does not register an offense 287s with an escaped 'b' inside a character class 287s does not register an offense 287s with an escaped 's' inside a character class 287s does not register an offense 287s with an escaped 'M-a' outside a character class 287s does not register an offense 287s with an escaped '}' outside a character class 287s does not register an offense 287s with an escaped '+' inside a character class inside a group 287s registers an offense and corrects 287s with an escaped '#' outside a character class 287s does not register an offense 287s with an escaped 'd' inside a character class 287s does not register an offense 287s with an escaped 'A' outside a character class 287s does not register an offense 287s with an escaped 'q' outside a character class 287s does not register an offense 287s with an escaped '*' inside a character class 287s registers an offense and corrects 287s with a nested character class containing redundant escape 287s registers an offense and corrects 287s with an escaped 'z' inside a character class 287s does not register an offense 287s with an escaped 'O' inside a character class 287s does not register an offense 287s with an escaped 'K' inside a character class 287s does not register an offense 287s with an escaped '}' inside a character class 287s registers an offense and corrects 287s with an escaped 'I' outside a character class 287s does not register an offense 287s with an escaped 'J' inside a character class 287s does not register an offense 287s with a POSIX character class then disallowed escape inside a character class 287s registers an offense and corrects 287s with an escaped '\' outside a character class 287s does not register an offense 287s with an escaped '\' inside a character class 287s does not register an offense 287s with an escaped 't' outside a character class 287s does not register an offense 287s with an escaped 'w' outside a character class 287s does not register an offense 287s with an escaped 'e' outside a character class 287s does not register an offense 287s with an escaped 'o' outside a character class 287s does not register an offense 287s with a character class and following escaped char 287s does not register an offense 287s with an escaped '^' outside a character class 287s does not register an offense 287s with an escaped ')' inside a character class 287s registers an offense and corrects 287s with an escaped 'p{alpha}' inside a character class 287s does not register an offense 287s with a POSIX character class then allowed escape inside a character class 287s does not register an offense 287s with an escaped 'u0041' inside a character class 287s does not register an offense 287s with an escaped 'u{0041}' inside a character class 287s does not register an offense 287s with an escaped . inside a character class beginning with : 287s registers an offense and corrects 287s with an escaped ' ' outside a character class 287s does not register an offense 287s with an escaped '+' outside a character class 287s does not register an offense 287s with an escaped ']' outside a character class 287s does not register an offense 287s with an escaped 'I' inside a character class 287s does not register an offense 287s with an escaped 'v' inside a character class 287s does not register an offense 287s with an escaped 'j' inside a character class 287s does not register an offense 287s with an escaped 'o' inside a character class 287s does not register an offense 287s with a line continuation 287s does not register an offense 287s with an escaped 'm' inside a character class 287s does not register an offense 287s with an escaped 'Q' outside a character class 287s does not register an offense 287s with an escaped interpolation inside a character class 287s does not register an offense 287s with an escaped 'G' inside a character class 287s does not register an offense 287s with an escaped 'x41' inside a character class 287s does not register an offense 287s with an escaped 'a' inside a character class 287s does not register an offense 287s with regexp options and a redundant escape 287s registers offenses and corrects 287s with an escaped '-' character being the last character inside a character class 287s registers an offense and corrects 287s with an escaped 'l' inside a character class 287s does not register an offense 287s with an escaped 'cc' outside a character class 287s does not register an offense 287s with an escaped 'F' inside a character class 287s does not register an offense 287s with an escaped '{' inside a character class 287s registers an offense and corrects 287s with an escaped '{' outside a character class 287s does not register an offense 287s with an escaped 'i' outside a character class 287s does not register an offense 287s with an escaped '^' inside a character class 287s does not register an offense 287s with an escaped 'W' outside a character class 287s does not register an offense 287s with an escaped 'e' inside a character class 287s does not register an offense 287s with an escaped '.' inside a character class 287s registers an offense and corrects 287s with an escaped 'H' inside a character class 287s does not register an offense 287s with an escaped '[' outside a character class 287s does not register an offense 287s with an escaped '$' inside a character class 287s registers an offense and corrects 287s with an escaped 'B' outside a character class 287s does not register an offense 287s with an escaped 'O' outside a character class 287s does not register an offense 287s with an escaped 'U' inside a character class 287s does not register an offense 287s with an escaped 'X' inside a character class 287s does not register an offense 287s with an escaped 'p{alpha}' outside a character class 287s does not register an offense 287s with an escaped 'N' inside a character class 287s does not register an offense 287s with an escaped 'Z' inside a character class 287s does not register an offense 287s with an escaped 'T' inside a character class 287s does not register an offense 287s with an interpolated unnecessary-escape regexp 287s registers an offense and corrects 287s with an escaped 'C-c' outside a character class 287s does not register an offense 287s with an escaped '?' inside a character class 287s registers an offense and corrects 287s with an escaped 'x41' outside a character class 287s does not register an offense 287s with an escaped 'h' inside a character class 287s does not register an offense 287s with an escaped ' ' inside a character class 287s does not register an offense 287s with an escaped ']' inside a character class 287s does not register an offense 287s with an uppercase metacharacter inside a character class 287s does not register an offense 287s with a backreference 287s does not register an offense 287s with an escaped ' 287s ' outside a character class 287s does not register an offense 287s with an escaped 't' inside a character class 287s does not register an offense 287s with an escaped 'L' inside a character class 287s does not register an offense 287s with an escaped '(' outside a character class 287s does not register an offense 287s with an escaped 'K' outside a character class 287s does not register an offense 287s with an escaped 'q' inside a character class 287s does not register an offense 287s with an escaped 'E' outside a character class 287s does not register an offense 287s with an escaped 'F' outside a character class 287s does not register an offense 287s with a single-line %r// regexp 287s without escapes 287s does not register an offense 287s with escaped slashes 287s does not register an offense 287s with a single-line %r@@ regexp 287s with escaped delimiters outside a character-class 287s does not register an offense 287s with escaped delimiters inside a character-class 287s does not register an offense 287s with escaped delimiters and regexp options 287s does not register an offense 287s without escapes 287s does not register an offense 287s with a single-line %r() regexp 287s with escaped delimiters and regexp options 287s does not register an offense 287s without escapes 287s does not register an offense 287s with escaped delimiters outside a character-class 287s does not register an offense 287s with escaped delimiters inside a character-class 287s does not register an offense 287s with a single-line %r__ regexp 287s without escapes 287s does not register an offense 287s with escaped delimiters and regexp options 287s does not register an offense 287s with escaped delimiters outside a character-class 287s does not register an offense 287s with escaped delimiters inside a character-class 287s does not register an offense 287s with a single-line %r~~ regexp 287s with escaped delimiters inside a character-class 287s does not register an offense 287s without escapes 287s does not register an offense 287s with escaped delimiters outside a character-class 287s does not register an offense 287s with escaped delimiters and regexp options 287s does not register an offense 287s with a single-line %r^^ regexp 287s without escapes 287s does not register an offense 287s with escaped delimiters and regexp options 287s does not register an offense 287s with escaped delimiters inside a character-class 287s does not register an offense 287s with escaped delimiters outside a character-class 287s does not register an offense 287s with a single-line %r<> regexp 287s with escaped delimiters outside a character-class 287s does not register an offense 287s without escapes 287s does not register an offense 287s with escaped delimiters inside a character-class 287s does not register an offense 287s with escaped delimiters and regexp options 287s does not register an offense 287s with a multi-line %r// regexp 287s without escapes 287s does not register an offense 287s with escaped slashes 287s does not register an offense 287s 287s RuboCop::Cop::Style::IdenticalConditionalBranches 287s on case with identical bodies 287s registers an offense and corrects 287s on case with empty when 287s doesn't register an offense 287s on if..elsif with no else 287s doesn't register an offense 287s on if..else with identical bodies and assigning to a variable used in `if` condition 287s doesn't register an offense 287s with a ternary 287s registers an offense 287s on if..else with identical trailing lines 287s registers and corrects an offense 287s on case without else 287s doesn't register an offense 287s when one of the case branches is empty 287s does not register an offense 287s with empty brace 287s does not raise any error 287s on if..else with identical bodies 287s registers and corrects an offense 287s when using pattern matching 287s on case-match with identical leading lines 287s registers and corrects an offense 287s on case-match with identical bodies 287s registers an offense and corrects 287s on case..in with identical bodies and assigning to a variable used in `case` condition 287s doesn't register an offense 287s when one of the case-match branches is empty 287s does not register an offense 287s on case-match without else 287s doesn't register an offense 287s on case-match with empty when 287s doesn't register an offense 287s on case-match with identical trailing lines 287s registers and corrects an offense 287s on if..else with identical leading lines 287s registers and corrects an offense 287s on case with identical leading lines 287s registers and corrects an offense 287s on if..else with slightly different trailing lines 287s doesn't register an offense 287s on case..when with identical bodies and assigning to a variable used in `case` condition 287s doesn't register an offense 287s on case with identical trailing lines 287s registers and corrects an offense 287s 287s RuboCop::Cop::Style::FormatString 287s when enforced style is percent 287s registers an offense for format with a hash argument 287s registers an offense for sprintf with a hash argument 287s accepts format with 1 argument 287s accepts sprintf with 1 argument 287s registers an offense and corrects when using springf with second argument that uses an operator 287s registers an offense for format 287s registers an offense for format with 3 arguments 287s accepts String#% 287s registers an offense for sprintf with 3 arguments 287s accepts sprintf without arguments 287s registers an offense for sprintf 287s accepts format without arguments 287s when enforced style is format 287s works if the first operand contains embedded expressions 287s does not autocorrect String#% with variable argument and assignment 287s registers an offense for something followed by a hash 287s registers an offense for a string followed by something 287s does not register an offense for ambiguous cases 287s registers an offense for something followed by an array 287s registers an offense for variable argument but does not autocorrect 287s registers an offense for sprintf with 2 arguments 287s does not register an offense for numbers 287s registers an offense for sprintf 287s when enforced style is sprintf 287s registers an offense for a string followed by something 287s registers an offense for variable argument but does not autocorrect 287s registers an offense for format 287s registers an offense for variable argument and assignment but does not autocorrect 287s registers an offense for format with 2 arguments 287s does not register an offense for numbers 287s registers an offense for String#% with a hash argument 287s works if the first operand contains embedded expressions 287s does not register an offense for ambiguous cases 287s registers an offense for something followed by an array 287s 287s RuboCop::Cop::Style::MapToHash 287s >= Ruby 2.6 287s when the receiver is an array 287s registers an offense and corrects 287s for `collect.to_h` with block arity 2 287s registers an offense and corrects 287s `map` without `to_h` 287s does not register an offense 287s `map` and `map.to_h` with newlines 287s registers an offense and corrects with newline removal 287s for `map.to_h` with block arity 1 287s registers an offense and corrects 287s for `map.to_h` with block arity 2 288s registers an offense and corrects 288s for `collect.to_h` with block arity 1 288s registers an offense and corrects 288s when the receiver is an array 288s registers an offense and corrects 288s `map` and `collect.to_h` with newlines 288s registers an offense and corrects with newline removal 288s when the receiver is an hash 288s registers an offense and corrects 288s `collect.to_h` with a block on `to_h` 288s registers an offense but does not correct 288s when chained further 288s registers an offense and corrects 288s `map.to_h` with a block on `to_h` 288s registers an offense but does not correct 288s `collect` without `to_h` 288s does not register an offense 288s when the receiver is an hash 288s registers an offense and corrects 288s when chained further 288s registers an offense and corrects 288s 288s RuboCop::Cop::Lint::UnusedMethodArgument 288s when IgnoreEmptyMethods config parameter is set 288s registers an offense for a non-empty method with a single unused parameter 288s accepts an empty method with a single unused parameter 288s registers an offense for a non-empty method with multiple unused parameters 288s accepts an empty method with multiple unused parameters 288s accepts an empty singleton method with a single unused parameter 288s inspection 288s when a method argument is used 288s accepts 288s when a singleton method argument is unused 288s registers an offense 288s when a block argument is unused 288s does not care 288s in a method calling `super` without arguments 288s when a method argument is not used explicitly 288s accepts since the arguments are guaranteed to be the same as superclass' ones and the user has no control on them 288s when an underscore-prefixed method argument is unused 288s accepts 288s when a method takes multiple arguments 288s and an argument is unused 288s registers an offense and adds underscore-prefix 288s and one argument is assigned to another, whilst other's value is not used 288s registers an offense 288s and arguments are swap-assigned 288s accepts 288s and there is some whitespace around the unused argument 288s registers an offense and preserves whitespace 288s and all the arguments are unused 288s registers offenses and suggests the use of `*` and autocorrects to add underscore-prefix to all arguments 288s in a method calling `binding` without arguments 288s accepts all arguments 288s inside another method definition 288s registers offenses 288s when a required keyword argument is unused 288s when a required keyword argument is unused 288s registers an offense but does not suggest underscore-prefix 288s when an optional keyword argument is unused 288s registers an offense but does not suggest underscore-prefix 288s and AllowUnusedKeywordArguments set 288s does not care 288s when an argument with a default value is unused 288s registers an offense and preserves the default value 288s in a method calling `binding` with arguments 288s when a method argument is unused 288s registers an offense 288s when a splat argument is unused 288s registers an offense and preserves the splat 288s when a variable is unused 288s does not care 288s in a method calling `super` with arguments 288s when a method argument is unused 288s registers an offense 288s when a trailing block argument is unused 288s registers an offense and removes the unused block arg 288s when IgnoreNotImplementedMethods config parameter is set 288s accepts a method with a single unused parameter & fails with message 288s accepts a method with a single unused parameter & raises ::NotImplementedError 288s registers an offense for a non-empty method with multiple unused parameters 288s accepts a method with a single unused parameter & raises NotImplementedError 288s accepts a method with a single unused parameter & fails without message 288s accepts an empty singleton method with a single unused parameter &raise NotImplementedError 288s registers an offense for a non-empty method with a single unused parameter 288s accepts an empty method with multiple unused parameters 288s accepts a method with a single unused parameter & raises NotImplementedError, message 288s 288s RuboCop::Cop::Style::StringMethods 288s registers an offense 288s when using safe navigation operator 288s registers an offense 288s 288s RuboCop::Cop::Layout::EmptyLineAfterGuardClause 288s accepts a guard clause that is after a multiline heredoc with chained calls 288s accepts a guard clause that is after multiline heredoc 288s does not register an offense when the clause is not followed by other code 288s accepts using guard clause is after `rubocop:enable` comment 288s registers an offense and corrects `next` guard clause not followed by empty line 288s registers an offense and corrects when using `or return` before guard condition 288s accepts multiple guard clauses 288s registers an offense and corrects a `raise` guard clause not followed by empty line when `unless` condition is after heredoc 288s registers and corrects when using guard clause is after `rubocop:enable` comment 288s registers an offense and corrects a guard clause not followed by empty line when guard clause including heredoc 288s registers an offense and corrects a next guard clause not followed by empty line when guard clause is after heredoc including string interpolation 288s accepts a guard clause when the next line is `ensure` 288s registers an offense and corrects a `raise` guard clause not followed by empty line when `if` condition is after heredoc 288s does not register an offense when the clause ends with a semicolon but is followed by a newline 288s registers an offense and corrects a guard clause that is a ternary operator 288s accepts a guard clause followed by empty line when guard clause including heredoc 288s registers an offense and corrects using heredoc with `and return` before guard condition 288s registers an offense when the clause ends with a semicolon but the next clause is on the next line 288s accepts using guard clause is after `raise` 288s accepts a guard clause that is after a multiline heredoc nested argument call 288s registers an offense and corrects a `raise` guard clause not followed by empty line when guard clause is after method call with argument 288s registers an offense and corrects when using `and return` before guard condition 288s accepts a guard clause when the next line is `rescue`-`else` 288s accepts a guard clause followed by end 288s does not register an offense when there are multiple clauses on the same line 288s accepts a `raise` guard clause not followed by empty line when guard clause is after condition without method invocation 288s registers and corrects when using guard clause is after `rubocop:disable` comment 288s accepts a guard clause when the next line is `else` 288s accepts a guard clause when the next line is `elsif` 288s accepts modifier if 288s registers an offense and corrects a method starting with end_ 288s registers an offense and corrects only the last guard clause 288s accepts a modifier if when the next line is `end` 288s registers no offenses using heredoc with `and return` before guard condition with empty line 288s accepts a guard clause inside oneliner block 288s accepts a guard clause after a single line heredoc 288s registers an offense and corrects a guard clause not followed by empty line 288s registers an offense and corrects a guard clause is before `begin` 288s accepts a guard clause when the next line is `rescue` 288s 288s RuboCop::Cop::Bundler::GemFilename 288s with default configuration (EnforcedStyle => `Gemfile`) 288s with non-root Gemfile.lock file path 288s does not register an offense 288s with gems.locked file path 288s registers an offense 288s with non-root Gemfile file path 288s does not register an offense 288s with gems.rb file path 288s registers an offense 288s with Gemfile file path 288s does not register an offense 288s with non-root gems.locked file path 288s registers an offense 288s with Gemfile.lock file path 288s does not register an offense 288s with non-root gems.rb file path 288s registers an offense 288s with EnforcedStyle set to `gems.rb` 288s with Gemfile.lock file path 288s registers an offense 288s with gems.rb file path 288s does not register an offense 288s with Gemfile file path 288s registers an offense 288s with non-root Gemfile file path 288s registers an offense 288s with non-root Gemfile.lock file path 288s registers an offense 288s with non-root gems.rb file path 288s does not register an offense 288s with non-root gems.locked file path 288s does not register an offense 288s 288s RuboCop::Cop::Layout::ArgumentAlignment 288s aligned with fixed indentation 288s autocorrects by indenting when not indented 288s does not register an offense when using aligned braced hash as a argument 288s corrects indentation for kwargs starting on same line as other args 288s registers an offense and corrects when missed indentation kwargs 288s autocorrects when first line is indented 288s autocorrects by outdenting when indented too far 288s assigned methods 288s with IndentationWidth:Width set to 4 288s accepts the first parameter being on a new row 288s autocorrects even when first argument is in wrong position 288s accepts the first parameter being on method row 288s with ArgumentAlignment:IndentationWidth set to 4 288s accepts the first parameter being on method row 288s accepts the first parameter being on a new row 288s multi-line method calls 288s autocorrects relative to position of relevant method call 288s registers offenses and corrects double indentation from relevant method 288s does not err on method call without a method name 288s can handle existing indentation from multi-line method calls 288s aligned with first argument 288s accepts correctly aligned arguments with fullwidth characters 288s accepts calls that only span one line 288s can handle a call embedded in a string 288s registers an offense and corrects multiline missed indentation 288s doesn't get confused by regexen with embedded expressions 288s can handle a method call within a method call 288s registers an offense and corrects splat operator 288s accepts the first parameter being on a new row 288s registers an offense and corrects when missed indentation kwargs 288s does not crash in autocorrect on dynamic string in parameter value 288s registers an offense and corrects multi-line outdented parameters 288s can handle a call with a block inside another call 288s can handle parentheses used with no arguments 288s accepts correctly aligned arguments 288s can handle other method calls without parentheses 288s can handle method calls without parentheses 288s registers an offense and correct multi-line parametersindented too far 288s doesn't get confused by a symbol argument 288s can handle a correctly aligned string literal as first argument 288s can handle do-end 288s accepts braceless hashes 288s doesn't get confused by extra comma at the end 288s can handle heredoc strings 288s registers an offense and corrects arguments with double indent 288s can handle a string literal as other argument 288s can handle a ternary condition with a block reference 288s can handle a multiline hash as second parameter 288s doesn't get confused by a line break inside a parameter 288s doesn't get confused by symbols with embedded expressions 288s doesn't crash and burn when there are nested issues 288s accepts multiline []= method call 288s registers an offense and corrects arguments with single indent 288s assigned methods 288s accepts the first parameter being on method row 288s accepts the first parameter being on a new row 288s when using safe navigation operator 288s registers an offense and corrects arguments with single indent 288s 288s RuboCop::Cop::Lint::RaiseException 288s does not register an offense for `fail` without arguments 288s registers an offense and corrects for `raise` with `::Exception.new` 288s registers an offense and corrects for `raise` with `Exception.new(args*)` 288s registers an offense and corrects for `raise` with `::Exception` and message 288s does not register an offense for `raise` without arguments 288s registers an offense and corrects for `fail` with `Exception` 288s does not register an offense when raising Exception with explicit namespace 288s registers an offense and corrects for `raise` with `Exception.new` and message 288s registers an offense and corrects for `raise` with `::Exception` 288s registers an offense and corrects for `raise` with `Exception` 288s registers an offense and corrects for `fail` with `Exception.new` and message 288s registers an offense and corrects for `raise` with `Exception` and message 288s registers an offense and corrects for `fail` with `Exception` and message 288s when under namespace 288s does not register an offense when Exception without cbase specified 288s registers an offense and corrects when Exception with cbase specified 288s 288s RuboCop::Cop::Generator::RequireFileInjector 288s when a cop of style department already exists 288s injects a `require_relative` statement on the end of style department 288s when using an unknown department 288s inserts a `require_relative` statement to the bottom of the file 288s when a `require_relative` entry does not exist from before 288s injects a `require_relative` statement on the right line in the root file 288s when a `require` entry already exists 288s does not write to any file 288s 288s RuboCop::Cop::Style::CollectionCompact 288s registers an offense and corrects when using `reject` on array to reject nils 288s registers an offense and corrects when using `reject` and receiver is a variable 288s registers an offense and corrects when using `reject` with block pass arg and no parentheses 288s does not register an offense when using `reject` to not to rejecting nils 288s does not register an offense when using `compact/compact!` 288s registers an offense and corrects when using `reject` on hash to reject nils 288s registers an offense and corrects when using `reject` with block pass arg on array to reject nils 288s registers an offense and corrects when using `select/select!` to reject nils 288s Ruby <= 3.0 288s does not register an offense and corrects when using `to_enum.reject` on array to reject nils 288s does not register an offense and corrects when using `lazy.reject` on array to reject nils 288s when without receiver 288s does not register an offense and corrects when using `reject` on array to reject nils 288s does not register an offense and corrects when using `select/select!` to reject nils 288s Ruby >= 3.1 288s registers an offense and corrects when using `lazy.reject` on array to reject nils 288s registers an offense and corrects when using `to_enum.reject` on array to reject nils 288s 288s RuboCop::Cop::InternalAffairs::RedundantLocationArgument 288s when location argument is not passed 288s does not register an offense 288s when location argument is passed 288s when location argument is :expression 288s removes default `location` surrounded by other keywords 288s removes default `location` when preceded by another keyword 288s registers an offense 288s when there is a message argument 288s registers an offense 288s when location argument does not equal to :expression 288s does not register an offense 288s 288s RuboCop::Cop::Layout::EndAlignment 288s registers an offense for mismatched if test end and autocorrects 288s accepts matching puts 1; unless ... end 288s accepts matching puts 1; class ... end 288s can handle modifier if 288s accepts matching class ... end 288s accepts matching unless ... end 288s accepts matching puts 1; while ... end 288s registers an offense for mismatched puts 1; while test end and autocorrects 288s accepts matching if ... end 288s registers an offense for mismatched unless test end and autocorrects 288s registers an offense for mismatched until test end and autocorrects 288s registers an offense for mismatched case a when b end and autocorrects 288s registers an offense for mismatched module Test end and autocorrects 288s registers an offense for mismatched while test end and autocorrects 288s registers an offense for mismatched puts 1; unless test end and autocorrects 288s registers an offense for mismatched puts 1; until test end and autocorrects 288s registers an offense for mismatched puts 1; if test end and autocorrects 288s accepts matching puts 1; case ... end 288s accepts matching puts 1; module ... end 288s accepts matching case ... end 288s accepts matching while ... end 288s accepts matching puts 1; if ... end 288s registers an offense for mismatched puts 1; case a when b end and autocorrects 288s registers an offense for mismatched puts 1; class Test end and autocorrects 288s registers an offense for mismatched puts 1; class Test end and autocorrects 288s can handle ternary if 288s accepts matching puts 1; until ... end 288s accepts matching class ... end 288s accepts matching module ... end 288s accepts matching until ... end 288s registers an offense for mismatched module Test end and autocorrects 288s when end is preceded by something else than whitespace 288s does not register an offense 288s correct + opposite 288s registers an offense and corrects 288s case as argument 288s when EnforcedStyleAlignWith is variable 288s registers an offense for mismatched test case a when b end and autocorrects 288s accepts matching test case ... end 288s when EnforcedStyleAlignWith is start_of_line 288s accepts matching test case a when b ... end 288s registers an offense for mismatched test case a when b end and autocorrects 288s when EnforcedStyleAlignWith is keyword 288s registers an offense for mismatched test case a when b end and autocorrects 288s accepts matching test case ... end 288s when EnforcedStyleAlignWith is variable 288s accepts matching if ... end 288s registers an offense for mismatched unless test end and autocorrects 288s accepts matching puts 1; class ... end 288s accepts matching puts 1; unless ... end 288s registers an offense for mismatched puts 1; case a when b end and autocorrects 288s registers an offense for mismatched until test end and autocorrects 288s accepts matching until ... end 288s accepts matching class ... end 288s registers an offense for mismatched puts 1; if test end and autocorrects 288s register an offense when using `+` operator method and `end` is not aligned 288s accepts matching puts 1; until ... end 288s registers an offense for mismatched puts 1; class Test end and autocorrects 288s registers an offense for mismatched class Test end and autocorrects 288s registers an offense for mismatched puts 1; until test end and autocorrects 288s accepts matching puts 1; case ... end 288s accepts matching unless ... end 288s registers an offense for mismatched case a when b end and autocorrects 288s accepts matching puts 1; if ... end 288s register an offense when using `-` operator method and `end` is not aligned 288s registers an offense for mismatched module Test end and autocorrects 288s accepts matching case ... end 288s accepts matching module ... end 288s register an offense when using a conditional statement in a method argument and `end` is not aligned 288s accepts matching while ... end 288s accepts matching puts 1; while ... end 288s registers an offense for mismatched puts 1; while test end and autocorrects 288s registers an offense for mismatched puts 1; module Test end and autocorrects 288s registers an offense for mismatched if test end and autocorrects 288s registers an offense for mismatched puts 1; unless test end and autocorrects 288s registers an offense for mismatched while test end and autocorrects 288s accepts matching puts 1; module ... end 288s regarding assignment 288s when EnforcedStyleAlignWith is variable 288s registers an offense for mismatched CNST = if test end and autocorrects 288s registers an offense for mismatched var = # comment while test end and autocorrects 288s accepts matching h[k] = if ... end 288s registers an offense for mismatched h[k] = if test end and autocorrects 288s registers an offense for mismatched var = unless test end and autocorrects 288s registers an offense for mismatched var << until test end and autocorrects 288s registers an offense for mismatched var = while test end and autocorrects 288s accepts matching a, b = if ... end 288s registers an offense for mismatched $var = if test end and autocorrects 288s accepts matching var = until ... end 288s accepts matching h.k = if ... end 288s registers an offense for mismatched h[k] << if test end and autocorrects 288s registers an offense for mismatched @@var = if test end and autocorrects 288s registers an offense for mismatched var[x] = while test end and autocorrects 288s accepts matching var = unless ... end 288s registers an offense for mismatched var &&= if test end and autocorrects 288s registers an offense for mismatched var = until test end and autocorrects 288s accepts matching var = case ... end 288s registers an offense for mismatched var ||= if test end and autocorrects 288s registers an offense for mismatched var += if test end and autocorrects 288s accepts matching var ||= if ... end 288s accepts matching CNST = if ... end 288s accepts matching $var = if ... end 288s registers an offense for mismatched @var = if test end and autocorrects 288s accepts matching var << if ... end 288s registers an offense for mismatched a, b = if test end and autocorrects 288s registers an offense for mismatched var = case a when b end and autocorrects 288s accepts matching @@var = if ... end 288s registers an offense for mismatched var << case a when b end and autocorrects 288s accepts matching var = until ... end 288s registers an offense for mismatched var = until test do_something end and autocorrects 288s accepts matching var += if ... end 288s registers an offense for mismatched var = unless test end and autocorrects 288s registers an offense for mismatched @var << if test end and autocorrects 288s accepts matching var = while ... end 288s registers an offense for mismatched @@var << if test end and autocorrects 288s registers an offense for mismatched CNST << if test end and autocorrects 288s accepts matching var = if ... end 288s accepts matching var &&= if ... end 288s registers an offense for mismatched var = until test end.j and autocorrects 288s registers an offense for mismatched $var << if test end and autocorrects 288s accepts matching var = until ... end 288s registers an offense for mismatched var << if test end and autocorrects 288s accepts matching var = if ... end 288s registers an offense for mismatched var << unless test end and autocorrects 288s registers an offense for mismatched var = if test end and autocorrects 288s registers an offense for mismatched var = if test end and autocorrects 288s registers an offense for mismatched h.k = if test end and autocorrects 288s accepts matching @var = if ... end 288s when EnforcedStyleAlignWith is keyword 289s registers an offense for mismatched var = until test end and autocorrects 289s accepts matching var = while ... end 289s accepts matching var = case ... end 289s registers an offense for mismatched var = while test end and autocorrects 289s accepts matching var[0] = case ... end 289s accepts matching var = unless ... end 289s registers an offense for mismatched var << until test end and autocorrects 289s accepts matching var = if ... end 289s registers an offense for mismatched var = if test end and autocorrects 289s accepts matching var = until ... end 289s registers an offense for mismatched var = unless test end and autocorrects 289s when EnforcedStyleAlignWith is start_of_line 289s registers an offense for mismatched until test end and autocorrects 289s registers an offense for mismatched var = while test end and autocorrects 289s accepts matching puts 1; unless ... end 289s registers an offense for mismatched while test end and autocorrects 289s registers an offense for mismatched var = case a when b end and autocorrects 289s registers an offense for mismatched var << unless test end and autocorrects 289s registers an offense for mismatched var << until test end and autocorrects 289s accepts matching var = case ... end 289s registers an offense for mismatched var << while test end and autocorrects 289s registers an offense for mismatched puts 1; case a when b end and autocorrects 289s registers an offense for mismatched unless test end and autocorrects 289s registers an offense for mismatched puts 1; unless test end and autocorrects 289s registers an offense for mismatched class Test end and autocorrects 289s registers an offense for mismatched var = if test end and autocorrects 289s registers an offense for mismatched var << case a when b end and autocorrects 289s registers an offense for mismatched case a when b end and autocorrects 289s registers an offense for mismatched puts 1; if test end and autocorrects 289s registers an offense for mismatched module Test end and autocorrects 289s accepts matching var = unless ... end 289s registers an offense for mismatched puts 1; module Test end and autocorrects 289s accepts matching puts 1; while ... end 289s registers an offense for mismatched var << if test end and autocorrects 289s registers an offense for mismatched puts 1; while test end and autocorrects 289s registers an offense for mismatched var = if test end and autocorrects 289s accepts matching puts 1; class ... end 289s registers an offense for mismatched var = unless test end and autocorrects 289s accepts matching var = if ... end 289s registers an offense for mismatched puts(if test end) and autocorrects 289s accepts matching puts 1; if ... end 289s accepts matching var << while ... end 289s registers an offense for mismatched puts 1; class Test end and autocorrects 289s accepts matching var = until ... end 289s registers an offense for mismatched if test end and autocorrects 289s accepts matching puts 1; until ... end 289s registers an offense for mismatched var = until test end and autocorrects 289s accepts matching var = while ... end 289s accepts matching puts 1; module ... end 289s registers an offense for mismatched puts 1; until test end and autocorrects 289s accepts matching puts 1; case ... end 289s accepts matching var = if ... end 289s 289s RuboCop::Cop::Lint::CircularArgumentReference 289s circular argument references in keyword arguments 289s when the keyword argument is not circular 289s does not register an offense 289s when the keyword argument is not circular, and calls a method 289s does not register an offense 289s when the keyword argument is not circular, but calls a method of some other object with the same name 289s does not register an offense 289s when there are multiple offensive keyword arguments 289s registers an offense 289s when the keyword argument is not circular, but calls a method of its own class with a self specification 289s does not register an offense 289s when there is one circular argument reference 289s registers an offense 289s circular argument references in ordinal arguments 289s when the method contains a circular argument reference 289s registers an offense 289s when the seemingly-circular default value is a method call 289s does not register an offense 289s when the method does not contain a circular argument reference 289s does not register an offense 289s 289s RuboCop::Cop::Layout::EmptyLineAfterMagicComment 289s accepts code that separates the comment from the code with a newline 289s accepts magic comment with typed 289s registers offense when frozen_string_literal used with shareable_constant_value without empty line 289s registers an offense for documentation immediately following comment 289s registers an offense when multiple magic comments without empty line 289s accepts magic comment with shareable_constant_value 289s accepts an empty source file 289s registers an offense for code that immediately follows comment 289s accepts magic comment followed by encoding 289s registers an offense when code that immediately follows typed comment 289s accepts a source file with only a magic comment 289s 289s RuboCop::Cop::Naming::MemoizedInstanceVariableName 289s does not register an offense when or-assignment-based memoization is used outside a method definition 289s EnforcedStyleForLeadingUnderscores: required 289s when or-assignment-based memoization is used 289s registers an offense when names match but missing a leading _ 289s does not register an offense with a leading `_` for both names 289s registers an offense when it has leading `_` but names do not match 289s with dynamically defined methods 289s when the variable name matches the method name 289s does not register an offense 289s when a method is defined inside a module callback 289s when the method does not match 289s registers an offense 289s when the method matches 289s does not register an offense 289s when a singleton method is defined inside a module callback 289s when the method does not match 289s registers an offense 289s when the method matches 289s does not register an offense 289s when the variable name does not match the method name 289s registers an offense 289s when defined?-based memoization is used 289s registers an offense when names match but missing a leading _ 289s does not register an offense with a leading `_` for both names 289s registers an offense when it has leading `_` but names do not match 289s with dynamically defined methods 289s when the variable name does not match the method name 289s registers an offense 289s when a method is defined inside a module callback 289s when the method matches 289s does not register an offense 289s when the method does not match 289s registers an offense 289s when the variable name matches the method name 289s does not register an offense 289s when a singleton method is defined inside a module callback 289s when the method does not match 289s registers an offense 289s when the method matches 289s does not register an offense 289s EnforcedStyleForLeadingUnderscores: optional 289s when or-assignment-based memoization is used 289s when defined?-based memoization is used 289s memoized variable matches method name 289s does not register an offense with a leading underscore 289s does not register an offense with a leading `_` for method name 289s does not register an offense without a leading underscore 289s does not register an offense with a leading `_` for both names 289s memoized variable matches method name 289s does not register an offense without a leading underscore 289s does not register an offense with a leading `_` for both names 289s does not register an offense with a leading `_` for method name 289s does not register an offense with a leading underscore 289s with default EnforcedStyleForLeadingUnderscores => disallowed 289s when defined?-based memoization is used 289s registers an offense when memoized variable does not match method name 289s does not register an offense when some code after assignment 289s registers an offense when memoized variable does not match class method name 289s does not register an offense when some code before defined 289s does not register an offense when there is no assignment 289s memoized variable matches method name 289s does not register an offense when memoized variable matches predicate method name 289s does not register an offense when memoized variable matches bang method name 289s does not register an offense 289s does not register an offense when method has leading `_` 289s does not register an offense with a leading `_` for both names 289s non-memoized variable does not match method name 289s does not register an offense 289s with dynamically defined methods 289s when a method is defined inside a module callback 289s when the method matches 289s does not register an offense 289s when the method does not match 289s registers an offense 289s when a singleton method is defined inside a module callback 289s when the method matches 289s does not register an offense 289s when the method does not match 289s registers an offense 289s when the variable name does not match the method name 289s registers an offense 289s when the variable name matches the method name 289s does not register an offense 289s when or-assignment-based memoization is used 289s memoized variable does not match class method name 289s registers an offense 289s memoized variable after other code does not match method name 289s registers an offense 289s registers an offense for a predicate method 289s registers an offense for a bang method 289s memoized variable does not match method name 289s registers an offense 289s memoized variable does not match method name during assignment 289s registers an offense 289s with dynamically defined methods 289s when the variable name matches the method name 289s does not register an offense 289s when the variable name does not match the method name 289s registers an offense 289s when a method is defined inside a module callback 289s when the method does not match 289s registers an offense 289s when the method matches 289s does not register an offense 289s when a singleton method is defined inside a module callback 289s when the method matches 289s does not register an offense 289s when the method does not match 289s registers an offense 289s memoized variable does not match method name for block 289s registers an offense 289s memoized variable matches method name 289s does not register an offense 289s does not register an offense when method has leading `_` 289s does not register an offense with a leading `_` for both names 289s non-memoized variable does not match method name 289s does not register an offense 289s memoized variable matches predicate method name 289s does not register an offense 289s memoized variable matches bang method name 289s does not register an offense 289s memoized variable matches method name during assignment 289s does not register an offense 289s memoized variable matches method name for block 289s does not register an offense 289s code follows memoized variable assignment 289s does not register an offense 289s instance variables in initialize methods 289s does not register an offense 289s memoized variable after other code 289s does not register an offense 289s 289s RuboCop::Cop::Lint::RequireRangeParentheses 289s does not register an offense when using `42..nil` 289s does not register an offense when using `nil..42` 289s registers an offense when the end of the range (`..`) is line break 289s does not register an offense when the end of the range (`..`) is line break and is enclosed in parentheses 289s does not register an offense when begin and end of the range are on the same line 289s registers an offense when the end of the range (`...`) is line break 289s Ruby >= 2.7 289s does not register an offense when using beginless range only 289s Ruby >= 2.6 289s does not register an offense when using endless range only 289s 289s RuboCop::Formatter::JUnitFormatter 289s #file_finished 289s displays a non-offense element in parsable text 289s displays end of parsable text 289s displays an offense for `classname='test_2` in parsable text 289s displays an offense for `classname='test_1` in parsable text 289s displays start of parsable text 289s 289s RuboCop::Cop::Layout::SpaceBeforeSemicolon 289s does not register an offense for no space before semicolons 289s registers an offense and corrects space before semicolon 289s registers an offense and corrects more than one space before a semicolon 289s inside block braces 289s when EnforcedStyle for SpaceInsideBlockBraces is no_space 289s registers an offense and corrects a space between an opening brace and a semicolon 289s behaves like common behavior 289s accepts no space between an opening brace and a semicolon 289s when EnforcedStyle for SpaceInsideBlockBraces is space 289s accepts a space between an opening brace and a semicolon 289s behaves like common behavior 289s accepts no space between an opening brace and a semicolon 289s heredocs 289s registers an offense and corrects 289s 289s RuboCop::Formatter::QuietFormatter 289s #report_summary 289s when 2 offenses detected and 2 offenses correctable 289s handles pluralization correctly 289s when an offense is corrected 289s prints about correction 289s when no files inspected 289s handles pluralization correctly 289s when a offense detected and a offense correctable 289s handles pluralization correctly 289s when 2 offenses detected 289s handles pluralization correctly 289s when a file inspected and no offenses detected 289s handles pluralization correctly 289s when a offense detected 289s handles pluralization correctly 289s when 2 offenses are corrected 289s handles pluralization correctly 289s when 2 offenses are corrected and 2 offenses correctable 289s handles pluralization correctly 289s #report_file 289s when the offense is not corrected 289s prints message as-is 289s when the offense is correctable 289s prints message as-is 289s the file is under the current working directory 289s prints as relative path 289s the file is outside of the current working directory 289s prints as absolute path 289s when the offense is automatically corrected 289s prints [Corrected] along with message 289s 289s RuboCop::Formatter::ProgressFormatter 289s #file_finished 289s when no offenses are detected 289s calls #report_as_with_mark 289s when any offenses are detected 289s calls #report_as_with_mark 289s #report_file_as_mark 289s when different severity offenses are detected 289s prints highest level mark 289s when no offenses are detected 289s prints "." 289s when a refactor severity offense is detected 289s prints "R" 289s when a refactor convention offense is detected 289s prints "C" 289s #finished 289s calls #report_summary 289s when no offenses are detected 289s does not report offenses 289s when any offenses are detected 289s reports all detected offenses for all failed files 289s 289s RuboCop::Cop::Style::NilComparison 289s configured with comparison preferred 289s registers an offense for nil? 289s registers and corrects an offense for `!x.nil?` 289s configured with predicate preferred 289s registers an offense for === nil 289s registers an offense for == nil 289s registers and corrects an offense when using `x == nil` as a guard condition 289s 289s RuboCop::Cop::Style::EmptyLambdaParameter 289s registers an offense for an empty block parameter with a lambda 289s does not crash on a super 289s accepts a keyword lambda 289s 289s RuboCop::Cop::Naming::VariableName 289s when configured for camelCase 289s registers an offense for rest arguments 289s accepts screaming snake case constants 289s registers an offense for keyword rest arguments 289s registers an offense for block arguments 289s accepts assigning to camel case constant 289s registers an offense for opposite + correct 289s accepts camel case in instance variable name 289s registers an offense for keyword arguments 289s accepts camel case local variables marked as unused 289s accepts one symbol size local variables 289s registers an offense for default method arguments 289s accepts camel case in class variable name 289s accepts assignment with indexing of self 289s accepts local variables marked as unused 289s accepts camel case in local variable name 289s accepts screaming snake case globals 289s registers an offense for camel case when invoking method args 289s registers an offense for snake case in method parameter 289s accepts with non-ascii characters 289s registers an offense for snake case in local variable name 289s when AllowedIdentifiers is set 289s does not register an offense for a symbol that is allowed 289s does not register an offense for a class variable name that is allowed 289s does not register an offense for a method name that is allowed 289s does not register an offense for a instance variable name that is allowed 289s does not register an offense for a global variable name that is allowed 289s does not register an offense for a local variable name that is allowed 289s when AllowedPatterns is set 289s does not register an offense for a symbol that matches the allowed pattern 289s does not register an offense for a instance variable name that matches the allowed pattern 289s does not register an offense for a class variable name that matches the allowed pattern 289s does not register an offense for a global variable name that matches the allowed pattern 289s does not register an offense for a method name that matches the allowed pattern 289s does not register an offense for a local variable name that matches the allowed pattern 289s when configured for snake_case 289s registers an offense for keyword rest arguments 289s registers an offense for camel case when invoking method args 289s registers an offense for block arguments 289s registers an offense for rest arguments 289s accepts screaming snake case constants 289s accepts one symbol size local variables 289s registers an offense for camel case local variables marked as unused 289s registers an offense for camel case in class variable name 289s accepts assigning to camel case constant 289s registers an offense for camel case in instance variable name 289s accepts local variables marked as unused 289s registers an offense for method arguments 289s accepts assignment with indexing of self 289s registers an offense for camel case in local variable name 289s registers an offense for default method arguments 289s registers an offense for keyword arguments 289s registers an offense for correct + opposite 290s accepts screaming snake case globals 290s when AllowedPatterns is set 290s does not register an offense for a local variable name that matches the allowed pattern 290s does not register an offense for a instance variable name that matches the allowed pattern 290s does not register an offense for a global variable name that matches the allowed pattern 290s does not register an offense for a method name that matches the allowed pattern 290s does not register an offense for a class variable name that matches the allowed pattern 290s does not register an offense for a symbol that matches the allowed pattern 290s when AllowedIdentifiers is set 290s does not register an offense for a method name that is allowed 290s does not register an offense for a global variable name that is allowed 290s does not register an offense for a symbol that is allowed 290s does not register an offense for a instance variable name that is allowed 290s does not register an offense for a local variable name that is allowed 290s does not register an offense for a class variable name that is allowed 290s 290s RuboCop::Cop::Style::HashSyntax 290s configured to enforce no mixed keys 290s registers an offense for mixed syntax when new is possible 290s accepts hash rockets when keys start with a digit 290s autocorrects mixed key hashes 290s accepts new syntax in method calls 290s accepts hash rockets when keys have different types 290s accepts hash rockets when keys have special symbols in them 290s registers an offense when keys start with a digit and mix styles 290s accepts hash rockets when keys have whitespaces in them 290s registers an offense when keys have whitespaces and mix styles 290s registers an offense when keys have special symbols and mix styles 290s accepts hash rockets in method calls 290s accepts new syntax in a hash literal 290s accepts an empty hash 290s registers an offense when keys have different types and styles 290s accepts new hash style 290s accepts the hash rocket syntax when new is possible 290s accepts old hash rockets style 290s configured to enforce explicit hash value syntax style 290s Ruby <= 3.0 290s does not register an offense when hash key and hash value are the same 290s Ruby >= 3.1 290s does not register an offense when hash key and hash value are the same 290s registers and corrects an offense when hash values are omitted 290s registers and corrects an offense when hash key and hash value are partially the same 290s does not register an offense when hash key and hash value are not the same 290s configured to accept both shorthand and explicit use of hash literal value 290s Ruby <= 3.0 290s does not register an offense when hash key and hash value are the same 290s Ruby >= 3.1 290s does not register an offense when hash key and hash value are partially the same 290s does not register an offense when hash key and hash value are not the same 290s does not register an offense when hash values are omitted 290s does not register an offense when hash key and hash value are the same 290s configured to enforce hash rockets style 290s registers an offense for mixed syntax 290s registers an offense for 1.9 style in method calls 290s accepts hash rockets in a hash literal 290s accepts an empty hash 290s accepts hash rockets in method calls 290s registers offense for Ruby 1.9 style 290s UseHashRocketsWithSymbolValues has no impact 290s does not register an offense when there is a symbol value 290s configured to enforce shorthand syntax style 290s Ruby >= 3.1 290s does not register an offense when with parentheses call expr follows 290s does not register an offense when without parentheses call expr follows 290s does not register an offense when hash key and hash value are not the same 290s does not register an offense when with parentheses call expr follows assignment expr 290s does not register an offense when call expr with argument and a block follows 290s does not register an offense when one line `if` condition follows (without parentheses) 290s does not register an offense when symbol hash key and string hash value are the same 290s registers and corrects an offense when `Hash[foo: foo]` 290s does not register an offense when hash pattern matching 290s registers and corrects an offense when `Hash[foo: foo]` and an expression follows 290s does not register an offense when hash key and hash value are the same but the value ends `!` 290s registers an offense when one line `until` condition follows (with parentheses) 290s does not register an offense when symbol hash key and hash value (lvar) are not the same 290s does not register an offense when method call hash key and hash value are the same 290s registers and corrects an offense when hash key and hash value are the same 290s registers an offense when hash key and hash value are not the same and method with `[]` is called 290s does not register an offense when hash values are omitted 290s registers and corrects an offense when hash key and hash value are the same and it in the method bodyand an expression follows 290s does not register an offense when hash key and hash value are partially the same 290s does not register an offense when without parentheses call expr follows after nested method call 290s registers and corrects an offense when hash key and hash value are partially the same 290s does not register an offense when `return` with one line `if` condition follows (without parentheses) 290s does not register an offense when call expr without arguments and with a block follows 290s registers and corrects an offense when hash key and hash value are the same and it in the method body 290s does not register an offense when lvar hash key and hash value are the same 290s does not register an offense when hash key and hash value are the same but the value ends `?` 290s does not register an offense when one line `until` condition follows (without parentheses) 290s registers and corrects an offense when hash key and hash value (lvar) are the same 290s registers an offense when one line `if` condition follows (with parentheses) 290s when hash roket syntax 290s does not register an offense 290s Ruby <= 3.0 290s does not register an offense when hash key and hash value are the same 290s configured to enforce ruby 1.9 style with no mixed keys 290s UseHashRocketsWithSymbolValues enabled 290s registers an offense when keys have different types and styles 290s accepts new syntax in a hash literal 290s autocorrects to hash rockets when all elements have symbol value 290s registers an offense for mixed syntax when new is possible 290s registers an offense when any element uses a symbol for the value 290s registers an offense when keys have special symbols in them 290s registers an offense when keys have whitespaces in them 290s accepts new syntax in method calls 290s accepts new syntax when keys are interpolated string 290s registers an offense when keys start with a digit 290s registers an offense for hash rockets in method calls 290s registers offense for hash rocket syntax when new is possible 290s accepts an empty hash 290s registers an offense when any element has a symbol value in method calls 290s accepts hash rockets when keys have different types 290s ruby < 2.2 290s registers an offense when keys start with a digit and mix styles 290s accepts hash rockets when keys start with a digit 290s accepts hash rockets when keys have special symbols in them 290s accepts hash rockets when keys have whitespaces in them 290s registers an offense when keys have whitespaces and mix styles 290s registers an offense when keys have special symbols and mix styles 290s UseHashRocketsWithSymbolValues disabled 290s registers an offense when keys start with a digit 290s accepts an empty hash 290s registers an offense for hash rockets in method calls 290s registers offense for hash rocket syntax when new is possible 290s registers an offense when keys have special symbols in them 290s accepts new syntax in method calls 290s accepts new syntax when keys are interpolated string 290s accepts new syntax in a hash literal 290s registers an offense when keys have different types and styles 290s registers an offense for mixed syntax when new is possible 290s accepts hash rockets when keys have different types 290s registers an offense when keys have whitespaces in them 290s ruby < 2.2 290s registers an offense when keys start with a digit and mix styles 290s registers an offense when keys have whitespaces and mix styles 290s accepts hash rockets when keys start with a digit 290s accepts hash rockets when keys have whitespaces in them 290s accepts hash rockets when keys have special symbols in them 290s registers an offense when keys have special symbols and mix styles 290s configured to enforce ruby19 style 290s with SpaceAroundOperators disabled 290s autocorrects even if there is no space around => 290s configured to use hash rockets when symbol values are found 290s accepts ruby19 syntax when no elements have symbol values in method calls 290s registers an offense when using hash rockets and no elements have a symbol value 290s registers an offense when any element uses a symbol for the value 290s accepts both hash rockets and ruby19 syntax in the same code 290s autocorrects to hash rockets when all elements have symbol value 290s accepts an empty hash 290s accepts hash in ruby19 style with no symbol values 290s registers an offense for hashes with elements on multiple lines 290s accepts ruby19 syntax when no elements have symbol values 290s registers an offense when any element has a symbol value in method calls 290s with SpaceAroundOperators enabled 290s accepts hash rockets when symbol characters are not supported 290s registers offense when keys start with an uppercase letter 290s accepts new syntax in a hash literal 290s registers offense for hash rocket syntax when new is possible 290s registers an offense when symbol keys have strings in them 290s preserves quotes during autocorrection 290s registers an offense for hash rockets in method calls 290s autocorrects a missing space when hash is used as argument 290s accepts hash rockets when keys have different types 290s accepts an empty hash 290s autocorrects even if it interferes with SpaceAroundOperators 290s accepts new syntax in method calls 290s registers an offense for mixed syntax when new is possible 290s accepts hash rockets when symbol keys end with = 290s if PreferHashRocketsForNonAlnumEndingSymbols is true 290s accepts hash rockets when symbols end with ? 290s accepts hash rockets when symbols end with ! 290s ruby < 2.2 290s accepts hash rockets when symbol keys have string in them 290s if PreferHashRocketsForNonAlnumEndingSymbols is false 290s registers an offense for hash rockets when symbols end with ! 290s registers an offense for hash rockets when symbols end with ? 290s when using a return value uses `return` 290s registers an offense and corrects when not enclosed in parentheses 290s registers an offense and corrects when enclosed in parentheses 290s configured to disallow mixing of implicit and explicit hash literal value 290s Ruby >= 3.1 290s does not register an offense when all hash values are omitted 290s registers an offense when some hash values are omitted but they can all be omitted 290s does not register an offense when all hash values are present, but no values can be omitted 290s registers an offense when all hash values are present, but can all be omitted 290s registers an offense when some hash values are omitted but they cannot all be omitted 290s does not register an offense when all hash values are present, but only some values can be omitted 290s Ruby <= 3.0 290s does not register an offense when all hash key and hash values are the same 290s 290s RuboCop::Cop::Style::ZeroLengthPredicate 290s when inspecting a Tempfile object 290s does not register an offense 290s does not register an offense with top-level ::Tempfile 290s when name of the variable is `size` or `length` 290s accepts inequality check 290s accepts comparison 290s accepts equality check 290s with arrays 290s registers an offense for `0 == array.length` 290s registers an offense for `array.size < 1` 290s registers an offense for `array.size > 0` 290s registers an offense for `array.length == 0` 290s registers an offense for `array.size == 0` 290s registers an offense for `array.length < 1` 290s registers an offense for `array.length > 0` 290s registers an offense for `0 < array.length 290s registers an offense for `array.size != 0` 290s registers an offense for `0 != array.length` 290s registers an offense for `array.length != 0` 290s registers an offense for `0 == array.size` 290s registers an offense for `0 < array.size` 290s registers an offense for `0 != array.size` 290s registers an offense for `1 > array.length` 290s registers an offense for `1 > array.size` 290s when inspecting a File::Stat object 290s does not register an offense with ::File 290s does not register an offense 290s with collection variables 290s registers an offense for `0 != collection.size` 290s registers an offense for `collection.size != 0` 290s registers an offense for `collection.size == 0` 290s registers an offense for `0 == collection.size` 290s with hashes 290s registers an offense for `hash.size != 0` 290s registers an offense for `hash.size == 0` 290s registers an offense for `0 != hash.size` 290s registers an offense for `0 == hash.size 290s with strings 290s registers an offense for `string.size == 0` 290s registers an offense for `0 != string.size` 290s registers an offense for `string.size != 0` 290s registers an offense for `0 == string.size` 290s when inspecting a StringIO object 290s when initialized without arguments 290s does not register an offense with top-level ::StringIO 290s does not register an offense 290s when initialized with a string 290s does not register an offense 290s does not register an offense with top-level ::StringIO 290s 290s RuboCop::Cop::Layout::ArrayAlignment 290s when aligned with fixed indentation 290s autocorrects array within array with too little indentation 290s registers an offense and corrects misaligned array elements 290s accepts several elements per line 290s does not register an offense or try to correct parallel assignment 290s does not indent heredoc strings when autocorrecting 290s autocorrects misaligned array with the first element on a new row 290s accepts single line array 290s accepts aligned array with fullwidth characters 290s accepts the first element being on a new row 290s accepts aligned array keys 290s autocorrects array within array with too much indentation 290s when aligned with first parameter 290s registers an offense and corrects misaligned array elements 290s does not register an offense or try to correct parallel assignment 290s accepts several elements per line 290s accepts single line array 290s accepts the first element being on a new row 290s autocorrects array within array with too little indentation 290s does not indent heredoc strings when autocorrecting 290s accepts aligned array keys 290s autocorrects array within array with too much indentation 290s autocorrects misaligned array with the first element on a new row 290s accepts aligned array with fullwidth characters 290s 290s RuboCop::Cop::Style::NestedTernaryOperator 290s can handle multiple nested ternaries 290s registers an offense and corrects for a nested ternary operator expression 290s accepts a non-nested ternary operator within an if 290s registers an offense and corrects for a nested ternary operator expression with block 290s registers an offense and corrects for a nested ternary operator expression with no parentheses on the outside 290s 290s RuboCop::Cop::Lint::MissingSuper 290s callbacks 290s registers no offense when module callback without `super` call 290s does not register an offense when callback has a `super` call 290s registers an offense when class callback within `self << class` and without `super` call 290s registers an offense when class callback without `super` call 290s registers an offense when method callback is without `super` call 290s constructor 290s does not register an offense for the class with stateless parent class 290s does not register an offense for the class without parent class 290s does not register an offense for the constructor-like method defined outside of a class 290s does not register an offense when there is a `super` call 290s registers an offense when no `super` call 290s 290s RuboCop::Cop::Style::OpenStructUse 290s when using custom namespaced OpenStruct 290s when inheriting from it 290s is expected to eq "class A < SomeNamespace::OpenStruct; end" 290s when used in assignments 290s registers no offense 290s when defined in custom namespace 290s when module 290s is expected to eq "module SomeNamespace\n module OpenStruct\n end\nend\n" 290s when class 290s is expected to eq "module SomeNamespace\n class OpenStruct\n end\nend\n" 290s when using OpenStruct 290s for ::OpenStruct 290s when used in assignments 290s registers an offense 290s when inheriting from it via < 290s registers an offense 290s when inheriting from it via Class.new 290s registers an offense 290s for OpenStruct 290s when inheriting from it via < 290s registers an offense 290s when used in assignments 290s registers an offense 290s when inheriting from it via Class.new 290s registers an offense 290s when not using OpenStruct 290s registers no offense 290s 290s RuboCop::Cop::Style::HashTransformKeys 290s below Ruby 2.5 290s does not flag even if transform_keys could be used 290s when using Ruby 2.6 or newer 290s does not flag _.to_h {...} when key block argument is unused 290s does not flag `_.to_h{...}` when its receiver is an array literal 290s does not flag `_.to_h{...}` when its receiver is `zip` 290s does not flag `_.to_h{...}` when its receiver is `each_with_index` 290s does not flag `_.to_h{...}` when both key & value are transformed 290s does not flag `_.to_h{...}` when its receiver is `with_index` 290s flags _.to_h{...} when transform_keys could be used 290s when using Ruby 2.5 or newer 290s does not flag `each_with_object` when its receiver is `each_with_index` 290s does not flag each_with_object when both key & value are transformed 290s flags _.map{...}.to_h when transform_keys could be used when line break before `to_h` 290s flags Hash[_.map{...}] when transform_keys could be used 290s does not flag `each_with_object` when its argument is used in the key 290s does not flag _.map {...}.to_h when key block argument is unused 290s does not flag each_with_object when no transformation occurs 290s does not flag `Hash[_.map{...}]` when its receiver is `zip` 290s flags _.map{...}.to_h when transform_keys could be used 290s does not flag `_.map{...}.to_h` when its receiver is `zip` 290s does not flag `_.map{...}.to_h` when its receiver is `with_index` 290s does not flag `_.map{...}.to_h` when its receiver is `each_with_index` 290s does not flag `Hash[_.map{...}]` when its receiver is an array literal 290s flags _.map {...}.to_h when transform_keys could be used when wrapped in another block 290s does not flag Hash[_.map{...}] when both key & value are transformed 290s does not flag each_with_object when its receiver is array literal 290s correctly autocorrects Hash[_.map{...}] 290s does not flag `Hash[_.map{...}]` when its receiver is `each_with_index` 290s does not flag each_with_object when key transformation uses value 290s does not flag key transformation when receiver is array literal 290s does not flag _.map{...}.to_h when both key & value are transformed 290s does not flag each_with_object when its argument is not modified 290s correctly autocorrects _.map{...}.to_h with block 290s does not flag key transformation in the absence of to_h 290s does not flag `each_with_object` when its receiver is `zip` 290s does not flag `each_with_object` when its receiver is `with_index` 290s correctly autocorrects _.map{...}.to_h without block 290s does not flag `Hash[_.map{...}]` when its receiver is `with_index` 290s with multiline block 290s flags each_with_object when transform_keys could be used 290s with inline block 290s flags each_with_object when transform_keys could be used 290s with safe navigation operator 290s flags each_with_object when transform_keys could be used 290s below Ruby 2.6 291s does not flag _.to_h{...} 291s 291s RuboCop::Cop::Style::Sample 291s Ruby >= 2.6 291s behaves like accepts 291s accepts shuffle[3..] 291s behaves like accepts 291s accepts shuffle[3...] 291s behaves like accepts 291s accepts shuffle[foo, 3] 291s behaves like accepts 291s accepts shuffle.join([5, 6, 7]) 291s behaves like accepts 291s accepts shuffle[foo..3] 291s behaves like offense 291s registers an offense for shuffle.slice(0) 291s behaves like offense 291s registers an offense for shuffle(random: Random.new).first(2) 291s behaves like offense 291s registers an offense for shuffle.first(foo) 291s behaves like offense 291s registers an offense for shuffle.at(0) 291s behaves like accepts 291s accepts shuffle(random: Random.new)[2] 291s behaves like offense 291s registers an offense for shuffle(random: Random.new)[0..3] 291s behaves like offense 291s registers an offense for shuffle.slice(0, 3) 291s behaves like offense 291s registers an offense for shuffle(random: foo).last(bar) 291s behaves like accepts 291s accepts shuffle.map { |e| e } 291s behaves like accepts 291s accepts shuffle.slice(foo, 3) 291s behaves like accepts 291s accepts shuffle[foo] 291s behaves like accepts 291s accepts shuffle.slice(-4..-3) 291s behaves like offense 291s registers an offense for shuffle[0..3] 291s behaves like accepts 291s accepts shuffle[2] 291s behaves like accepts 291s accepts shuffle[2..3] 291s behaves like accepts 291s accepts shuffle[foo, bar] 291s behaves like accepts 291s accepts shuffle.slice(3, 3) 291s behaves like accepts 291s accepts shuffle(random: Random.new) 291s behaves like offense 291s registers an offense for shuffle.last(bar) 291s behaves like accepts 291s accepts shuffle.slice(foo..3) 291s behaves like offense 291s registers an offense for shuffle.last(3) 291s behaves like offense 291s registers an offense for shuffle.last 291s behaves like accepts 291s accepts shuffle.slice(2) 291s behaves like accepts 291s accepts shuffle.slice(2..3) 291s behaves like offense 291s registers an offense for shuffle.first 291s behaves like accepts 291s accepts shuffle[3, 3] 291s behaves like accepts 291s accepts shuffle.at(foo) 291s behaves like offense 291s registers an offense for shuffle.first(2) 291s behaves like accepts 291s accepts shuffle.slice(foo..bar) 291s behaves like offense 291s registers an offense for shuffle.slice(-1) 291s behaves like offense 291s registers an offense for shuffle.at(-1) 291s Ruby >= 2.7 291s behaves like offense 291s registers an offense for shuffle[...3] 291s behaves like accepts 291s accepts shuffle[-4..-3] 291s behaves like offense 291s registers an offense for shuffle.slice(0...3) 291s behaves like accepts 291s accepts shuffle[foo..bar] 291s behaves like accepts 291s accepts shuffle.slice(foo, bar) 291s behaves like accepts 291s accepts sample 291s behaves like accepts 291s accepts shuffle[2..-3] 291s behaves like accepts 291s accepts shuffle(random: Random.new)[2, 3] 291s behaves like accepts 291s accepts shuffle.slice(foo) 291s behaves like offense 291s registers an offense for shuffle[0, 3] 291s behaves like offense 291s registers an offense for shuffle[-1] 291s behaves like accepts 291s accepts shuffle.at(2) 291s behaves like accepts 291s accepts shuffle 291s behaves like offense 291s registers an offense for shuffle(random: Random.new).first 291s behaves like offense 291s registers an offense for shuffle[0...3] 291s behaves like accepts 291s accepts shuffle(random: Random.new).find(&:odd?) 291s behaves like offense 291s registers an offense for shuffle.slice(0..3) 291s behaves like accepts 291s accepts shuffle.slice(2..-3) 291s behaves like offense 291s registers an offense for shuffle[0] 291s 291s RuboCop::Cop::Style::MixinUsage 291s does not register an offense when using inside nested module 291s include 291s doesn't register an offense when `include` call is a method argument 291s does not register an offense when using `include` in method definition inside module 291s registers an offense when using outside class (used below) 291s does not register an offense when using inside class 291s does not register an offense when using `include` in method definition inside class 291s registers an offense when using only `include` statement 291s registers an offense when using `include` in method definition outside class or module 291s does not register an offense when using inside block 291s registers an offense when using outside class (used above) 291s does not register an offense when using inside block and `if` condition is after `include` 291s does not register an offense when using outside class 291s Multiple definition classes in one 291s does not register an offense when using inside class 291s Nested module 291s registers an offense when using outside class 291s extend 291s registers an offense when using outside class 291s does not register an offense when using inside class 291s prepend 291s registers an offense when using outside class 291s does not register an offense when using inside class 291s 291s RuboCop::Cop::Layout::FirstArrayElementIndentation 291s when array is right hand side in assignment 291s accepts a first element on the same line as the left bracket 291s accepts an empty array 291s accepts multi-assignments with brackets 291s registers an offense and corrects incorrectly indented first element 291s accepts single line array 291s accepts several elements per line 291s accepts multi-assignments with no brackets 291s accepts correctly indented first element 291s when array is method argument 291s and arguments are surrounded by parentheses 291s and EnforcedStyle is special_inside_parentheses 291s registers an offense and corrects 'consistent' indentation 291s accepts indent based on the preceding left parenthesis when the right bracket and its following pair is on the same line 291s accepts normal indentation for array within array 291s accepts special indentation for second argument 291s accepts special indentation for first argument 291s 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 291s registers an offense for incorrectly indented multi-line array that is the value of a single pair hash 291s accepts indent based on the left brace when the outer hash key and the left bracket is not on the same line 291s registers an offense and corrects 'align_brackets' indentation 291s when using safe navigation operator 291s registers an offense and corrects 'consistent' indentation 291s and EnforcedStyle is consistent 291s 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 291s registers an offense for incorrectly indented multi-line array that is the value of a single pair hash 291s registers an offense and corrects incorrect indentation 291s 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 291s accepts normal indentation for second argument 291s accepts indent based on the left brace when the outer hash key and the left bracket is not on the same line 291s accepts normal indentation for first argument 291s and argument are not surrounded by parentheses 291s accepts indent based on the left bracket when the outer hash key and the left bracket is not on the same line 291s 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 291s 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 291s accepts single line array with brackets 291s accepts a correctly indented multi-line array with brackets 291s accepts bracketless array 291s registers an offense and corrects incorrectly indented multi-line array with brackets 291s registers an offense for incorrectly indented multi-line array that is the value of a single pair hash 291s when array is operand 291s accepts correctly indented first element 291s registers an offense and corrects incorrectly indented ] 291s registers an offense and corrects incorrectly indented first element 291s when indentation width is overridden for this cop 291s accepts correctly indented first element 291s registers an offense and corrects incorrectly indented 1st element 291s when EnforcedStyle is align_brackets 291s accepts single line array 291s accepts an empty array 291s accepts several elements per line 291s accepts a first element on the same line as the left bracket 291s registers an offense and corrects incorrectly indented ] 291s accepts multi-assignments with brackets 291s accepts multi-assignments with no brackets 291s accepts correctly indented first element 291s when 'special_inside_parentheses' style is used 291s registers an offense and corrects incorrect indentation 291s when indentation width is overridden for this cop 291s registers an offense and corrects indentation that does not match IndentationWidth 291s accepts correctly indented first element 291s when 'consistent' style is used 291s registers an offense and corrects incorrectly indented 1st element 291s registers an offense and corrects incorrect indentation 291s when array is argument to setter 291s accepts correctly indented first element 291s registers an offense and corrects incorrectly indented first element 291s 291s RuboCop::Cop::Lint::UnderscorePrefixedVariableName 291s in a method calling `binding` with arguments 291s when an underscore-prefixed argument is not used 291s does not register an offense 291s when an underscore-prefixed argument is used explicitly 291s registers an offense 291s when an underscore-prefixed method argument is used 291s registers an offense 291s when an underscore-prefixed variable is used 291s registers an offense 291s in a method calling `super` without arguments 291s when an underscore-prefixed argument is not used explicitly 291s does not register an offense 291s when an underscore-prefixed argument is used explicitly 291s registers an offense 291s when an underscore-prefixed variable is captured by a block 291s accepts 291s when an underscore-prefixed keyword block argument is used 291s registers an offense 291s when AllowKeywordBlockArguments is set 291s does not register an offense 291s in a method calling `binding` without arguments 291s when an underscore-prefixed argument is not used explicitly 291s does not register an offense 291s when an underscore-prefixed argument is used explicitly 291s registers an offense 291s in a method calling `super` with arguments 291s when an underscore-prefixed argument is not used 291s does not register an offense 291s when an underscore-prefixed argument is used explicitly 291s registers an offense 291s when an underscore-prefixed variable is reassigned 291s does not register an offense 291s when non-underscore-prefixed variable is used 291s does not register an offense 291s when an underscore-prefixed named capture variable is used 291s registers an offense 291s when an underscore-prefixed variable in top-level scope is used 291s registers an offense 291s when an underscore-prefixed block argument is used 291s registers an offense 291s registers an offense 291s 291s RuboCop::Cop::Style::IfWithSemicolon 291s accepts without `else` branch 291s can handle modifier conditionals 291s registers an offense and corrects for one line if/;/end 291s when elsif is present 291s accepts with `else` branch 291s accepts without `else` branch 291s accepts second elsif block 291s 291s RuboCop::Cop::Lint::RequireParentheses 291s registers an offense for missing parentheses around expression with || operator 291s accepts calls to methods that are setters 291s registers an offense for missing parentheses around expression with && operator 291s registers an offense for missing parentheses around expression in ternary 291s accepts method calls that are all operations 291s accepts missing parentheses when using ternary operator in square bracksts 291s accepts calls to methods that are operators 291s accepts method calls without parentheses followed by keyword and/or 291s accepts method call with parentheses in ternary 291s accepts condition that is not a call 291s accepts missing parentheses when method is not a predicate 291s accepts missing parentheses when using ternary operator 291s accepts missing parentheses around expression with + operator 291s accepts parentheses around expression with boolean operator 291s when using safe navigation operator 291s registers an offense for missing parentheses around expression with && operator 291s 291s RuboCop::Cop::Lint::AmbiguousRegexpLiteral 291s Ruby >= 3.0 291s with `match_with_lvasgn` node 291s without parentheses 291s registers an offense and corrects 291s with different parentheses 291s does not register an offense 291s with parentheses 291s does not register an offense 291s without parentheses 291s registers an offense and corrects when using regexp without method call in a nested structure 291s registers an offense and corrects when multiple arguments 291s registers an offense and corrects when sending method without receiver takes a regexp argument 291s registers an offense and corrects when using nested method arguments without parentheses 291s registers an offense and corrects when sending method chain to regexp 291s registers an offense and corrects when sending method to regexp with argument 291s registers an offense and corrects when sending method to regexp without argument 291s registers an offense and corrects when sending method inside parens without receiver takes a regexp argument 291s registers an offense and corrects when using block argument 291s registers an offense and corrects when nesting 291s registers an offense and corrects when single argument 291s with parentheses 291s accepts 291s Ruby <= 2.7 291s with parentheses 291s accepts 291s without parentheses 291s registers an offense and corrects when using block argument 291s registers an offense and corrects when nesting 291s registers an offense and corrects when single argument 291s registers an offense and corrects when sending method without receiver takes a regexp argument 291s registers an offense and corrects when sending method inside parens without receiver takes a regexp argument 291s registers an offense and corrects when using nested method arguments without parentheses 291s registers an offense and corrects when sending method to regexp with argument 291s registers an offense and corrects when sending method to regexp without argument 291s registers an offense and corrects when multiple arguments 291s registers an offense and corrects when using regexp without method call in a nested structure 291s registers an offense and corrects when sending method chain to regexp 291s with `match_with_lvasgn` node 291s with parentheses 291s does not register an offense 291s with different parentheses 291s does not register an offense 291s without parentheses 291s registers an offense and corrects 291s 291s RuboCop::Cop::Lint::NumberedParameterAssignment 291s registers an offense when using `_0` lvar 291s does not register an offense when using non numbered parameter 291s registers an offense when using `_10` lvar 291s does not register an offense when index assignment 291s when Ruby 2.7 or lower 291s registers an offense when using `_3` numbered parameter 291s registers an offense when using `_4` numbered parameter 291s registers an offense when using `_2` numbered parameter 291s registers an offense when using `_5` numbered parameter 291s registers an offense when using `_9` numbered parameter 291s registers an offense when using `_6` numbered parameter 291s registers an offense when using `_1` numbered parameter 291s registers an offense when using `_8` numbered parameter 291s registers an offense when using `_7` numbered parameter 291s 291s RuboCop::Cop::Layout::MultilineBlockLayout 291s registers an offense and corrects for missing newline before opening parenthesis `(` for block body 291s does not register an offense for one-line {} blocks 291s registers an offense and corrects a line-break within arguments 291s does not register offenses when there is a newline for do/end block 291s registers offenses and corrects for lambdas 291s does not error out when the block is empty 291s autocorrects in more complex case with lambda and assignment, and aligns the next line two spaces out from the start of the block 291s registers an offense and corrects line-break within arguments 291s registers an offense and corrects line-break before arguments with empty block 291s registers an offense and corrects a do/end block with a mult-line body 291s registers offenses when there are not too many parameters to fit on one line 291s registers offenses and corrects for new lambda literal syntax 291s autocorrects nested parens correctly 291s registers an offense and corrects for missing newline in {} block with params 291s registers an offense and corrects line-break before arguments 291s doesn't move end keyword in a way which causes infinite loop in combination with Style/BlockEndNewLine 291s registers an offense and corrects a line break within destructured arguments 291s does not register an offense for one-line do/end blocks 291s does not register offenses when there are too many parameters to fit on one line 291s registers an offense and corrects for missing newline in do/end block with params 291s registers an offense and corrects for missing newline in {} block w/o params 291s considers the extra space required to join the lines together 291s does not register offenses when there is a newline for {} block 291s registers an offense for missing newline in do/end block w/o params 291s does not remove a trailing comma when only one argument is present 291s Ruby 2.7 291s registers an offense and corrects for missing newline in do/end block with params 291s registers an offense and corrects for missing newline in {} block w/o params 291s 291s RuboCop::Cop::Lint::AmbiguousBlockAssociation 291s behaves like accepts 291s does not register an offense 291s when AllowedMethods is enabled 291s registers an offense for other methods 291s does not register an offense for an allowed method 291s behaves like accepts 291s does not register an offense 291s behaves like accepts 291s does not register an offense 291s behaves like accepts 291s does not register an offense 291s behaves like accepts 291s does not register an offense 291s behaves like accepts 291s does not register an offense 291s behaves like accepts 291s does not register an offense 291s behaves like accepts 291s does not register an offense 291s behaves like accepts 291s does not register an offense 291s behaves like accepts 291s does not register an offense 291s behaves like accepts 291s does not register an offense 291s behaves like accepts 291s does not register an offense 291s without parentheses 291s as a hash key 291s registers an offense 291s rspec expect {}.to change {} 291s registers an offense 291s with receiver 291s registers an offense 291s when using safe navigation operator 291s registers an offense 291s without receiver 291s registers an offense 291s with assignment 291s registers an offense 291s behaves like accepts 291s does not register an offense 291s behaves like accepts 291s does not register an offense 291s when AllowedPatterns is enabled 291s does not register an offense for an allowed method 291s registers an offense for other methods 291s behaves like accepts 291s does not register an offense 291s behaves like accepts 291s does not register an offense 291s behaves like accepts 291s does not register an offense 291s behaves like accepts 291s does not register an offense 291s behaves like accepts 291s does not register an offense 291s behaves like accepts 291s does not register an offense 291s behaves like accepts 291s does not register an offense 291s behaves like accepts 291s does not register an offense 291s 291s RuboCop::Cop::Gemspec::RequireMFA 291s with rubygems_mfa_required: false by key access 291s registers an offense and corrects 291s with rubygems_mfa_required: false 291s registers an offense and corrects 291s when the specification has an non-hash metadata 291s registers an offense but does not correct 291s with rubygems_mfa_required: true 291s does not register an offense 291s when the specification has a metadata hash but no rubygems_mfa_required key 291s registers an offense and corrects 291s when there are other metadata keys 291s and `rubygems_mfa_required` is not included 291s registers an offense and corrects 291s and `rubygems_mfa_required` is included 291s does not register an offense 291s when the gemspec is blank 291s does not register an offense 291s when the specification is blank 291s registers an offense and corrects 291s when metadata is set by key assignment 291s and `rubygems_mfa_required` is included 291s does not register an offense 291s and `rubygems_mfa_required` is not included 291s registers an offense 291s 291s RuboCop::Runner 291s #run 291s if there are no offenses in inspected files 291s returns true 291s if -s/--stdin is used with an offense 292s sends the offense to a formatter 292s returns false 292s if there is an offense in an inspected file 292s sends the offense to a formatter 292s returns false 292s if a cop crashes 292s does not call ResultCache#save 292s #run when interrupted 292s with SIGINT 292s returns false 292s #run with cops autocorrecting each-other 292s with two pairs of conflicting cops 292s with three cop cycle 292s if there is an offense in an inspected file 293s aborts because of an infinite loop 293s if there is an offense in an inspected file 293s aborts because of an infinite loop 293s with display options 293s --display-only-safe-correctable 294s ommits unsafe correctable `Style/FrozenStringLiteral` 294s returns false 294s --display-only-correctable 294s ommits uncorrectable `Layout/LineLength` 294s returns false 294s with two conflicting cops 294s if there is an offense in an inspected file 294s aborts because of an infinite loop 294s if there are multiple offenses in an inspected file 294s aborts because of an infinite loop 294s 294s RuboCop::Cop::Layout::BeginEndAlignment 294s accepts matching begin ... end 294s accepts matching puts 1; begin ... end 294s registers an offense for mismatched begin end and autocorrects 294s when EnforcedStyleAlignWith is start_of_line 294s accepts matching puts 1; begin ... end 294s registers an offense for mismatched var << begin end and autocorrects 294s accepts matching var = begin ... end 294s registers an offense for mismatched begin end and autocorrects 294s 294s RuboCop::YAMLDuplicationChecker 294s when yaml does not have any duplication 294s does not call block 294s when yaml has duplicated keys in the second level 294s calls block 294s calls block with keys 294s when yaml has duplicated keys in the top level 294s calls block 294s calls block with keys 294s 294s RuboCop::Cop::Style::Alias 294s when EnforcedStyle is prefer_alias_method 294s does not register an offense for alias in an instance_eval block 294s does not register an offense for alias_method 294s does not register an offense for alias with gvars 294s registers an offense for alias with symbol args 294s registers an offense for alias with bareword args 294s when EnforcedStyle is prefer_alias 295s registers an offense for alias with symbol args 295s does not register an offense for alias_method in self.method def 295s registers an offense for alias_method in a class block 295s does not register an offense for alias in an instance_eval block 295s registers an offense for alias_method in a module block 295s does not register an offense for alias_method with non-literal method call argument 295s does not register an offense for alias_method in a method def 295s does not register an offense for alias_method in a block 295s does not register an offense for alias_method with explicit receiver 295s does not register an offense for alias_method with non-literal constant argument 295s registers an offense for alias_method at the top level 295s does not register an offense for alias with bareword args 295s 295s RuboCop::Cop::VariableForce::Scope 295s #name 295s when the scope is instance method definition 295s returns the method name 295s when the scope is singleton method definition 295s returns the method name 295s #include? 295s with child node the scope does not include 295s is expected to equal false 295s with ancestor node the scope does not include 295s is expected to equal false 295s with child node the scope includes 295s is expected to equal true 295s with descendant node the scope does not include 295s is expected to equal false 295s with node of the scope itself 295s is expected to equal false 295s .new 295s when begin node is passed 295s accepts that as top level scope 295s when lvasgn node is passed 295s accepts that as top level scope 295s #body_node 295s when the scope is block 295s returns the body node 295s when the scope is singleton class 295s returns the body node 295s when the scope is class 295s returns the body node 295s when the scope is singleton method 295s returns the body node 295s when the scope is module 295s returns the body node 295s when the scope is top level 295s returns the body node 295s when the scope is instance method 295s returns the body node 295s #each_node 295s inner scope boundary handling 295s when there's a method invocation with block 295s yields only the block node and the child send node 295s when there's a singleton method definition 295s yields only the defs node and the method host node 295s outer scope boundary handling 295s when the scope is singleton method 295s yields the argument and the body nodes 295s when the scope is instance method 295s yields the argument and the body nodes 295s when the scope is block 295s yields the argument and the body nodes 295s when the scope is top level 295s yields the body nodes 295s when the scope is class 295s yields the body nodes 295s when the scope is module 295s yields the body nodes 295s when the scope is singleton class 295s yields the body nodes 295s 295s RuboCop::Cop::Cop 295s will set custom severity if present 295s initially has 0 offenses 295s keeps track of offenses 295s will report registered offenses 295s will warn if custom severity is invalid 295s will set default severity 295s with no submodule 295s has right department 295s has right name 295s for a cop with a name 295s registers offense with its name 295s #autocorrect? 295s when the option is given 295s is expected to equal true 295s when the cop is set to not autocorrect 295s is expected to equal false 295s when cop does not support autocorrection 295s is expected to equal false 295s when disable_uncorrectable is enabled 295s is expected to equal true 295s when the option is not given 295s is expected to equal false 295s with lint cops 295s has right name 295s has right department 295s with style cops 295s has right name 295s has right department 295s #relevant_file? 295s when the file doesn't match the Include configuration 295s is expected to equal false 295s when the file matches the Include configuration 295s is expected to equal true 295s when the file is an anonymous source 295s is expected to equal true 295s #safe_autocorrect? 295s when cop is declared unsafe 295s is expected to equal false 295s when safety is undeclared 295s is expected to equal true 295s when autocorrection of the cop is declared unsafe 295s is expected to equal false 295s Registry 295s #with_department 295s has each cop in exactly one type 295s returns 0 for an invalid type 295s has at least one cop per department 295s #departments 295s has departments 295s is expected to include :Style 295s is expected to include :Lint 295s contains every value only once 295s when disabled by a comment 295s ignore_disable_comments is false 295s will set offense as disabled 295s ignore_disable_comments is true 295s will not set offense as disabled 295s .documentation_url 295s for a custom cop class 295s is expected to be nil 295s for a builtin cop class 295s is expected to eq "https://docs.rubocop.org/rubocop/cops_layout.html#layoutblockendnewline" 295s setting of Offense#corrected attribute 295s when cop does not support autocorrection 295s is not specified (set to nil) 295s when autocorrect is requested 295s is not specified (set to nil) 295s when disable_uncorrectable is enabled 295s is set to true 295s when cop supports autocorrection 295s when offense was corrected 295s is set to true 295s when autocorrection is not needed 295s is set to false 295s when offense was not corrected because of an error 295s is set to false 295s .qualified_cop_name 295s returns the given cop name if it already has a namespace even when the cop exists in multiple namespaces 295s raises an error if the cop name is in more than one namespace 295s returns the given cop name if it is not found in any namespace 295s adds namespace if the cop name is found in exactly one namespace 295s returns the given cop name if it already has a namespace 295s returns the cop name in a different namespace if the provided namespace is incorrect 295s 295s RuboCop::Cop::InternalAffairs::LocationLineEqualityComparison 295s registers an offense and corrects when using `first_line` 295s does not register an offense when using `same_line?` 295s registers an offense and corrects when using `loc.first_line` 295s registers an offense and corrects when using `source_range.first_line` 295s registers and corrects an offense when comparing `#loc.source_range` with LHS and RHS 295s registers and corrects an offense when comparing `#loc.line` with LHS and RHS 295s 295s RuboCop::Cop::Style::RescueModifier 296s registers an offense for modifier rescue 296s handles modifier rescue in normal rescue 296s handles more complex expression with modifier rescue 296s handles modifier rescue in a method 296s does not register an offense for normal rescue with ensure 296s handles parentheses around a rescue modifier 296s registers an offense for modifier rescue around parallel assignment 296s does not register an offense for normal rescue 296s does not register an offense for nested normal rescue 296s excluded file 296s processes excluded files with issue 296s when a singleton method has implicit begin 296s handles modifier rescue in body of implicit begin 296s accepts normal rescue 296s autocorrect 296s corrects complex rescue modifier 296s corrects doubled rescue modifiers 296s when an instance method has implicit begin 296s accepts normal rescue 296s handles modifier rescue in body of implicit begin 296s 296s RuboCop::Cop::Style::TrailingBodyOnModule 296s registers offense with multi-line module 296s autocorrects when there are multiple semicolons 296s accepts regular module 296s registers an offense when body trails after module definition 296s registers offense when module definition uses semicolon 296s autocorrects with comment after body 296s when module is not on first line of processed_source 296s autocorrects offense 296s 296s RuboCop::Cop::Lint::RandOne 296s behaves like no offense 296s ::Kernel.rand 296s does not register an offense 296s behaves like no offense 296s rand(2) 296s does not register an offense 296s behaves like offenses 296s rand(-1) 296s registers an offense 296s behaves like no offense 296s rand(-1..1) 296s does not register an offense 296s behaves like offenses 296s Kernel.rand 1.0 296s registers an offense 296s behaves like offenses 296s Kernel.rand(1) 296s registers an offense 296s behaves like offenses 296s rand(1.0) 296s registers an offense 296s behaves like offenses 296s rand(-1.0) 296s registers an offense 296s behaves like no offense 296s Kernel.rand 2 296s does not register an offense 296s behaves like no offense 296s Kernel.rand(-1..1) 296s does not register an offense 296s behaves like no offense 296s Kernel.rand 296s does not register an offense 296s behaves like offenses 296s rand 1 296s registers an offense 296s behaves like offenses 296s Kernel.rand(-1.0) 296s registers an offense 296s behaves like offenses 296s ::Kernel.rand(1) 296s registers an offense 296s behaves like offenses 296s Kernel.rand(-1) 296s registers an offense 296s behaves like no offense 296s rand 296s does not register an offense 296s 296s RuboCop::Cop::Layout::SpaceInsideStringInterpolation 296s when EnforcedStyle is space 296s accepts empty interpolation 296s for ill-formatted string interpolations 296s registers offenses and autocorrects 296s for well-formatted string interpolations 296s does not register an offense for excess literal spacing 296s for "no_space" style formatted string interpolations 296s registers offenses and autocorrects 296s when EnforcedStyle is no_space 296s accepts empty interpolation 296s does not touch spaces inside the interpolated expression 296s for ill-formatted string interpolations 296s finds interpolations in string-like contexts 296s registers offenses and autocorrects 296s when interpolation starts or ends with a line break 296s does not register an offense 296s ignores comments and whitespace when looking for line breaks 296s for well-formatted string interpolations 296s accepts excess literal spacing 296s for "space" style formatted string interpolations 296s registers offenses and autocorrects 296s 296s RuboCop::Cop::Style::Send 296s with public_send 296s and with a receiver 296s does not register an offense for an invocation with args 296s does not register an offense for an invocation without args 296s and without a receiver 296s does not register an offense for an invocation without args 296s does not register an offense for an invocation with args 296s with __send__ 296s and with a receiver 296s does not register an offense for an invocation without args 296s does not register an offense for an invocation with args 296s and without a receiver 296s does not register an offense for an invocation with args 296s does not register an offense for an invocation without args 296s with send 296s and without a receiver 296s does not register an offense for an invocation without args 296s registers an offense for an invocation with args 296s and with a receiver 296s does not register an offense for an invocation without args 296s registers an offense for an invocation with args 296s when using safe navigation operator 296s registers an offense for an invocation with args 296s 296s RuboCop::Cop::Layout::MultilineMethodDefinitionBraceLayout 296s ignores implicit defs 296s ignores defs without params 296s ignores single-line defs 296s heredoc 296s detects heredoc structures that are safe to add to 296s ignores heredocs that could share a last line 296s symmetrical style 296s opening brace on same line as first element 296s detects closing brace on different line from last element 296s allows closing brace on same line as last multiline element 296s allows closing brace on same line as last element 296s autocorrects closing brace on different line from last element 296s opening brace on separate line from first element 296s allows closing brace on separate line from last multiline element 296s allows closing brace on separate line from last element 296s detects closing brace on same line as last element 296s same_line style 296s opening brace on separate line from first element 296s detects closing brace on different line from last element 296s allows closing brace on same line as last element 296s allows closing brace on same line as last multiline element 296s opening brace on same line as first element 296s allows closing brace on same line from last element 296s detects closing brace on different line from multiline element 296s autocorrects closing brace on different line as last element 296s allows closing brace on same line as multi-line element 296s new_line style 296s opening brace on same line as first element 296s detects closing brace on same line as last multiline element 296s allows closing brace on different line from last element 296s autocorrects closing brace on same line as last element 296s allows closing brace on different line from multi-line element 296s opening brace on separate line from first element 296s allows closing brace on separate line from last element 296s allows closing brace on separate line from last multiline element 296s detects closing brace on same line as last element 296s 296s RuboCop::Cop::Lint::EachWithObjectArgument 296s registers an offense for bignum argument 296s accepts a variable argument 296s accepts two arguments 296s registers an offense for float argument 296s accepts a string argument 296s registers an offense for fixnum argument 296s when using safe navigation operator 296s registers an offense for fixnum argument 296s 296s RuboCop::Cop::Style::SignalException 296s when enforced style is `fail` 296s registers an offense for raise in def body 296s registers an offense for `raise` with `Kernel` as explicit receiver 296s accepts `raise` with explicit receiver 296s registers an offense for raise in rescue section 296s registers an offense for raise in begin section 296s when enforced style is `raise` 296s accepts `fail` if a custom `fail` singleton method is defined 296s accepts `fail` if a custom `fail` instance method is defined 296s registers an offense for fail in def body 296s registers an offense for fail in begin section 296s registers an offense for `fail` with `Kernel` as explicit receiver 296s accepts `fail` with explicit receiver 296s registers an offense for fail in rescue section 296s when enforced style is `semantic` 296s registers an offense for fail in second rescue 296s registers an offense for raise in def body 296s accepts `raise` and `fail` with explicit receiver 296s registers an offense for `raise` and `fail` with `Kernel` as explicit receiver 296s registers an offense for raise not in a begin/rescue/end 296s registers an offense for raise in begin section 296s registers one offense for each raise 296s registers an offense for fail in rescue section 296s accepts raise in def with multiple rescues 296s accepts raise in rescue section 296s registers an offense for fail in def rescue section 296s accepts raise in def rescue section 296s registers only offense for one raise that should be fail 296s is not confused by nested begin/rescue 296s registers an offense for `raise` and `fail` with `::Kernel` as explicit receiver 296s 296s RuboCop::Cop::Lint::BinaryOperatorWithIdenticalOperands 296s does not register an offense for `<<` with duplicate operands 296s registers an offense for `<=` with duplicate operands 296s registers an offense for `<` with duplicate operands 296s does not crash on operator without any argument 296s does not register an offense for `**` with duplicate operands 296s does not register an offense when using arithmetic operator with numerics 296s registers an offense for `>` with duplicate operands 296s registers an offense for `^` with duplicate operands 296s registers an offense for `&&` with duplicate operands 296s registers an offense for `-` with duplicate operands 296s registers an offense for `||` with duplicate operands 296s registers an offense for `|` with duplicate operands 296s registers an offense for `==` with duplicate operands 296s does not register an offense for `+` with duplicate operands 296s registers an offense for `<=>` with duplicate operands 296s registers an offense for `/` with duplicate operands 296s registers an offense for `%` with duplicate operands 296s registers an offense for `>=` with duplicate operands 296s does not register an offense when using binary operator with different operands 296s registers an offense for `=~` with duplicate operands 296s does not register an offense for `>>` with duplicate operands 296s registers an offense for `===` with duplicate operands 296s registers an offense for `!=` with duplicate operands 296s does not register an offense for `*` with duplicate operands 296s 296s RuboCop::Cop::Lint::Debugger 296s does not register an offense for a save_and_open_screenshot method 296s does not register an offense for a console method 296s does not register an offense for a remote_byebug in comments 296s does not register an offense for a remote_byebug method 296s does not register an offense for a console in comments 296s does not register an offense for a remote_pry method 296s does not register an offense for a byebug method 296s does not register an offense for a pry_remote method 296s does not register an offense for a debugger in comments 296s does not register an offense for a save_and_open_page method 296s does not register an offense for a debugger method 296s does not register an offense for a binding method that is not disallowed 296s does not register an offense for a pry_remote in comments 296s does not register an offense for a pry in comments 296s does not register an offense for a remote_pry in comments 296s does not register an offense for a irb method 296s does not register an offense for a byebug in comments 296s does not register an offense for a pry method 296s does not register an offense for a irb in comments 296s does not register an offense for a save_and_open_page in comments 296s does not register an offense for a save_and_open_screenshot in comments 296s with the DebuggerMethods configuration 296s does not register an offense for a byebug call 296s registers an offense for a `custom_debugger` call 296s with a const chain and a method chain 296s registers an offense for a `Foo::Bar::Baz.debug.this.code` call 296s with a method chain 296s registers an offense for a `debugger.foo.bar` call 296s with a const chain 296s registers an offense for a `Foo::Bar::Baz.debug` call 296s nested custom configurations 296s registers an offense for a `custom_debugger call 296s pry 296s registers an offense for a binding.pry with Kernel call 296s registers an offense for a Pry.rescue call 296s registers an offense for a remote_pry binding with an argument call 296s does not register an offense for a `pry` call without binding 296s registers an offense for a pry binding with an argument call 296s registers an offense for a pry_remote binding call 296s does not register an offense for a `rescue` call without Pry 296s registers an offense for a remote_pry binding call 296s registers an offense for a pry binding call 296s registers an offense for a pry_remote binding with an argument call 296s when a method group is disabled with false 296s does not register an offense for a Pry debugger call 296s does register an offense for another group 296s when a method group is disabled with nil 296s does register an offense for another group 296s does not register an offense for a Pry debugger call 296s RubyJard 296s registers an offense for a jard call 296s byebug 296s registers an offense for a byebug call 296s registers an offense for a Kernel.remote_byebug call 296s registers an offense for a byebug with an argument call 296s registers an offense for a remote_byebug call 296s registers an offense for a Kernel.byebug call 296s debug.rb 296s registers an offense for a `binding.break` with `Kernel` call 296s registers an offense for a `binding.b` with `Kernel` call 296s registers an offense for a `b` binding call 296s registers an offense for a `break` binding call 296s web console 296s registers an offense for a `binding.console` call 296s does not register an offense for `console` without a receiver 296s rails 296s registers an offense for a debugger with an argument call 296s registers an offense for a debugger call 296s registers an offense for a debugger with ::Kernel call 296s registers an offense for a debugger with Kernel call 296s capybara 296s registers an offense for save_and_open_page 296s registers an offense for save_and_open_screenshot 296s with an argument 296s registers an offense for save_and_open_page 296s registers an offense for save_and_open_screenshot 296s built-in methods 296s registers an offense for a binding.irb with Kernel call 296s registers an offense for a irb binding call 296s 296s RuboCop::Cop::Style::RedundantPercentQ 296s accepts a heredoc string that contains %q 296s accepts %q at the beginning of a double quoted string with interpolation 296s accepts %Q at the beginning of a double quoted string with interpolation 296s accepts %q at the beginning of a section of a double quoted string with interpolation 296s accepts %q containing string interpolation 296s accepts %Q at the beginning of a section of a double quoted string with interpolation 296s with %q strings 296s accepts a string with escaped non-backslash characters 296s registers an offense for only double quotes 296s registers an offense for a string containing escaped backslashes 296s autocorrects for strings that are concatenated with backslash 296s accepts a string with escaped backslash and non-backslash characters 296s accepts regular expressions starting with %q 296s accepts a string with single quotes and double quotes 296s registers an offense for only single quotes 296s registers an offense for no quotes 296s with %Q strings 296s accepts regular expressions starting with %Q 296s accepts a dynamic %Q string with double quotes 297s accepts a string with single quotes and double quotes 297s accepts a string with double quotes and an escaped special character 297s autocorrects for strings that are concatenated with backslash 297s accepts a string with double quotes and an escaped normal character 297s registers an offense for static string without quotes 297s registers an offense for dynamic string without quotes 297s registers an offense for static string with only double quotes 297s 297s RuboCop::Cop::Layout::IndentationConsistency 297s with for 297s accepts an empty for 297s registers an offense and corrects bad indentation in a for body 297s with while/until 297s registers an offense and corrects bad indentation in begin/end/while 297s registers an offense and corrects bad indentation in a while body 297s accepts an empty while 297s registers an offense and corrects bad indentation in an until body 297s with block 297s does not autocorrect an offense within another offense 297s accepts an empty block body 297s registers an offense and correct bad indentation in a do/end body 297s registers an offense and corrects bad indentation in a {} body 297s accepts a correctly indented block body 297s with top-level code 297s accepts when using access modifier at the top level 297s registers and corrects an offense when using access modifier and indented method definition at the top level 297s accepts an empty expression string interpolation 297s with class 297s with normal style configured 297s accepts indented public, protected, and private 297s registers an offense and corrects bad indentation in a class body 297s registers an offense and corrects bad indentation in def but not for outdented public, protected, and private 297s accepts an empty class body 297s with indented_internal_methods style configured 297s accepts different indentation in different visibility sections when using `Struct.new` 297s accepts different indentation in different visibility sections 297s with module 297s accepts an empty module body 297s registers an offense and corrects bad indentation of private methods 297s registers an offense and corrects bad indentation in a module body 297s even when there are no public methods 297s registers an offense and corrects bad indentation of private methods 297s with case 297s accepts indented when/else plus indented body 297s accepts case/when/else laid out as a table 297s accepts correctly indented case/when/else 297s registers an offense and corrects bad indentation in a case/else body 297s accepts case/when/else with then beginning a line 297s registers an offense and corrects bad indentation in a case/when body 297s with def/defs 297s accepts an empty defs body 297s registers an offense and corrects bad indentation in a def body 297s registers an offense and corrects bad indentation in a defs body 297s accepts an empty def body 297s with if statement 297s accepts an if in assignment with end aligned with variable 297s registers an offense and corrects bad indentation in an else body 297s accepts an if/else branches with rescue clauses 297s registers an offense and corrects bad indentation in an if body 297s accepts if/elsif/else/end with fullwidth characters 297s accepts an if/else in assignment on next line with end aligned with if 297s accepts an empty if 297s accepts an if/else in assignment with end aligned with variable and chaining with a block after the end 297s accepts an if/else in assignment with end aligned with variable 297s accepts an if/else in assignment with end aligned with if 297s accepts an if in assignment with end aligned with if 297s accepts if/elsif/else/end laid out as a table 297s accepts a correctly aligned if/elsif/else/end 297s registers an offense and corrects bad indentation in an elsif body 297s accepts an if/else in assignment with end aligned with variable and chaining after the end 297s accepts a one line if statement 297s accepts if/then/else/end laid out as another table 297s with unless 297s accepts an empty unless 297s registers an offense and corrects bad indentation in an unless body 297s 297s RuboCop::Cop::Lint::RefinementImportMethods 297s Ruby <= 3.0 297s does not register an offense when using `prepend` in `refine` block 297s does not register an offense when using `include` in `refine` block 297s Ruby >= 3.1 297s does not register an offense when using `import_methods` in `refine` block 297s does not register an offense when using `include` with a receiver in `refine` block 297s registers an offense when using `include` in `refine` block 297s registers an offense when using `prepend` in `refine` block 297s 297s RuboCop::Cop::Layout::DefEndAlignment 297s when EnforcedStyleAlignWith is start_of_line 297s accepts matching foo bar def ... end 297s registers an offense for mismatched foo def test end and autocorrects 297s accepts matching def ... end 297s accepts matching def ... end 297s registers an offense for mismatched def test end and autocorrects 297s registers an offense for mismatched def Test.test end and autocorrects 297s accepts matching foo def ... end 297s accepts matching defs ... end 297s correct + opposite 297s registers an offense 297s when including an anonymous module containing `private def` 297s does not register an offense 297s when using refinements and `private def` 297s does not register an offense 297s when EnforcedStyleAlignWith is def 297s accepts matching def ... end 297s accepts matching foo def ... end 297s accepts matching defs ... end 297s registers an offense for mismatched foo def test end and autocorrects 297s registers an offense for mismatched def Test.test end and autocorrects 297s registers an offense for mismatched def test end and autocorrects 297s correct + opposite 297s registers an offense 297s 297s RuboCop::Cop::Style::SingleLineBlockParams 297s allows calls with proper argument names 297s does not report if the right names are used but not all arguments are given 297s reports an offense if the names are partially correct 297s reports an offense if the names are in reverse order 297s ignores do..end blocks 297s reports an offense if the arguments names are wrong and not all arguments are given 297s does not report when destructuring is used 297s does not report if no block arguments are present 297s ignores :reduce symbols 297s finds incorrectly named parameters with leading underscores 297s finds wrong argument names in calls with different syntax 297s allows an unused parameter to have a leading underscore 297s 297s RuboCop::Cop::Layout::LineLength 297s accepts the first line if it is a shebang line 297s registers an offense for a line that's 81 characters wide 297s highlights excessive characters 297s accepts a line that's 80 characters wide 297s registers an offense for long line before __END__ but not after 297s autocorrection 297s method call 297s when under limit 297s does not add any offenses 297s with a heredoc argument 297s does not break up the line 297s does not break up the line when a heredoc is used as the first element of an array 297s does not break up the line when parentheses are omitted 297s and the heredoc is after the line should split 297s can break up the line before the heredoc argument 297s and other arguments before the heredoc 297s can break up the line before the heredoc argument 297s when unparenthesized 297s when there are multiple arguments 297s splits the line after the first element 297s when there is one argument 297s does not autocorrect 297s when over limit 297s adds an offense and autocorrects it 297s when two together 297s does not add any offenses 297s when call with hash on same line 297s adds an offense only to outer and autocorrects it 297s with long argument list 297s registers an offense and autocorrects it 297s with a hash with a too long first item 297s when not parenthesized 297s when there are multiple elements 297s moves the 2nd element to a new line 297s when on multiple lines 297s does not correct 297s when there is only one element 297s does not autocorrect 297s when parenthesized 297s corrects 297s when the hash is parenthesized 297s corrects 297s when nested method calls allows outer to get broken up first 297s adds offense and does not autocorrect 297s when two method calls 297s adds an offense only to outer and autocorrects it 297s HEREDOC 297s when over limit with semicolon 297s adds offense and does not autocorrect 297s semicolon 297s semicolon inside string literal 297s adds offense and autocorrects elsewhere 297s when over limit 297s adds offense and autocorrects it by breaking the semicolonbefore the hash 297s when over limit and one semicolon at the end 297s adds offense and does not autocorrectbefore the hash 297s when over limit and many spaces around semicolon 297s adds offense and autocorrects it by breaking the semicolonbefore the hash 297s when over limit and semicolon at end of line 297s adds offense and autocorrects it by breaking the first semicolonbefore the hash 297s when over limit and many semicolons 297s adds offense and autocorrects it by breaking the semicolonbefore the hash 297s when under limit 297s does not add any offenses 297s semicolons inside string literal 297s adds offense and autocorrects elsewhere 297s when over limit and many semicolons at the end 297s adds offense and does not autocorrectbefore the hash 297s hash 297s when over limit rocket 297s adds an offense and autocorrects it 297s when over limit 297s adds an offense and autocorrects it 297s when over limit and already on multiple lines long key 297s adds an offense and does not autocorrect 297s when hash in method call 297s adds an offense only to outer and autocorrects it 297s when nested hashes on same line 297s adds an offense only to outer and autocorrects it 297s when under limit 297s does not add any offenses 297s when over limit rocket symbol 297s adds an offense and autocorrects it 297s when over limit because of a comment 297s adds an offense and does not autocorrect 297s when over limit and keys already on multiple lines 297s adds an offense and does not autocorrect 297s array 297s when under limit 297s does not add any offenses 297s when two arrays on two lines allows outer to get broken first 297s adds an offense only to inner and does not autocorrect it 297s when already on two lines 297s does not add any offenses 297s when over limit 297s adds an offense and autocorrects it 297s when has inside array 297s adds an offense only to outer and autocorrects it 297s long blocks 297s do/end 297s adds an offense for block with arguments and does correct it 297s adds an offense for block without arguments and does correct it 297s lambda syntax 297s when argument is enclosed in parentheses 297s registers an offense and corrects 297s when argument is not enclosed in parentheses 297s registers an offense and corrects 297s let block 297s adds an offense and does correct it 297s Ruby 2.7 297s adds an offense for {} block does correct it 297s adds an offense for do-end block and does correct it 297s no spaces 297s adds an offense and does correct it 297s braces 297s adds an offense and does correct it 297s method definition 297s when under limit 297s does not add any offenses 297s when over limit 297s adds an offense and autocorrects it 297s no breakable collections 297s adds an offense and does not autocorrect it 297s comments 297s when over limit with semicolon 297s adds offense and does not autocorrect 297s multiple assignment 297s when over limit at right hand side 297s registers and corrects an offense 297s when AllowHeredoc option is enabled 297s accepts long lines in heredocs 297s when the source has no AST 297s does not crash 297s and only certain heredoc delimiters are permitted 297s rejects long lines in heredocs with not permitted delimiters 297s when IgnoreCopDirectives is disabled 297s and the source is acceptable length 297s with a trailing RuboCop directive 297s registers an offense for the line 297s with an inline comment 297s highlights the excess comment 297s and the source is too long and has a trailing cop directive 297s highlights the excess source and cop directive 297s affecting by IndentationWidth from Layout\Tab 297s without AllowURI option 297s behaves like with tabs indentation 297s registers an offense for a line that's including 2 tab with size 2 and 28 other characters 297s accepts a line that's including 1 tab with size 2 and 28 other characters 297s with AllowURI option 297s accepts a line that's including URI and exceeds by 1 char 297s accepts a line that's including URI in quotes with text 297s accepts a line that's including URI with text 297s accepts a line that's including URI 297s behaves like with tabs indentation 297s registers an offense for a line that's including 2 tab with size 2 and 28 other characters 297s accepts a line that's including 1 tab with size 2 and 28 other characters 297s when line is indented with tabs 297s registers an offense for a long line 297s accepts a short line 297s when AllowURI option is disabled 297s and all the excessive characters are part of a URL 299s registers an offense for the line 299s when AllowedPatterns option is set 299s only registers an offense for lines not matching the pattern 299s when IgnoreCopDirectives is enabled 299s and the Rubocop directive is excessively long 299s accepts the line 299s and the source is too long 299s highlights only the non-directive part 299s and the source contains non-directive #s as non-comment 299s registers an offense for the line 299s and the source contains non-directive # as comment 299s highlights only the non-directive part 299s and the Rubocop directive causes an excessive line length 299s accepts the line 299s and has explanatory text 299s does not register an offense 299s when AllowURI option is enabled 299s and an error other than URI::InvalidURIError is raised while validating a URI-ish string 299s does not crash 299s and the URI is assigned 299s does not register an offense 299s and the URI is an argument 299s does not register an offense 299s and all the excessive characters are part of a URL 299s accepts the line 299s and the URL is wrapped in double quotes 299s accepts the line 299s and the URL is wrapped in single quotes 299s accepts the line 299s and the URL is wrapped in braces 299s accepts the line 299s and the URL is wrapped in braces with title 299s accepts the line 299s and the excessive characters include part of a URL and trailing whitespace 299s registers an offense for the line 299s and the URL fits within the max allowed characters 299s registers an offense for the line 299s and the excessive characters include a complete URL 299s registers an offense for the line 299s and the URL does not have a http(s) scheme 299s rejects the line 299s and the scheme has been configured 299s does not register an offense 299s and the excessive characters include part of a URL and another word 299s registers an offense for the line 299s and the excessive characters include part of a URL in double quotes 299s does not include the quote as part of the offense 299s and the excessive characters include part of a URL in braces and another word 299s registers an offense for the line 299s 299s RuboCop::Cop::InternalAffairs::RedundantMethodDispatchNode 299s does not register an offense when using `node.receiver` 299s does not register an offense when using `node.method_name` 299s registers an offense when using `node.send_node.method_name` 299s registers an offense when using `node.send_node.receiver` 299s does not register an offense when using `node.send_node.arguments?` 299s does not register an offense when using `send_node.method_name` 299s 299s RuboCop::Cop::Layout::AccessModifierIndentation 299s when EnforcedStyle is set to outdent 299s registers an offense and corrects private indented to method depth in module defined with Module.new 299s accepts private with argument indented to method depth in module defined with Module.new 299s registers offense and corrects private indented to method depth in a class 299s accepts private def indented to method depth in module defined with Module.new 299s accepts private def indented to method depth in a class 299s accepts module fn with argument indented to method depth in a module 299s accepts private with argument indented to method depth in singleton class 299s accepts private with argument indented to method depth in a class 299s accepts private def indented to method depth in class defined with Class.new 299s accepts private indented to the containing class indent level 299s accepts private def indented to method depth in a module 299s accepts private with argument indented to method depth in a module 299s registers an offense and corrects private indented to method depth in singleton class 299s accepts module fn def indented to method depth in a module 299s registers an offense and corrects module_function indented to method depth in a module 299s registers an offense and corrects misaligned access modifiers in nested classes 299s accepts private def indented to method depth in singleton class 299s accepts protected indented to the containing class indent level 299s registers an offense and corrects private indented to method depth in a module 299s accepts private with argument indented to method depth in class defined with Class.new 299s registers an offense and corrects private indented to method depth in class defined with Class.new 299s when EnforcedStyle is set to indent 299s registers an offense and corrects misaligned private 299s registers an offense and corrects access modifiers in arbitrary blocks 299s registers an offense and corrects misaligned private in module defined with Module.new 299s registers an offense and corrects misaligned module_function in module 299s accepts properly indented private 299s accepts methods with a body 299s registers an offense and corrects misaligned access modifiers in nested classes 299s registers an offense and corrects misaligned private in a singleton class 299s accepts an empty class 299s accepts indented access modifiers with arguments in nested classes 299s registers an offense and corrects misaligned protected 299s registers an offense and corrects opposite + correct alignment 299s registers an offense and corrects correct + opposite alignment 299s accepts properly indented protected 299s registers an offense and corrects misaligned private in class defined with Class.new 299s registers an offense and corrects misaligned private in module 299s accepts properly indented private in module defined with Module.new 299s when indentation width is overridden for this cop only 299s accepts properly indented private 299s when 4 spaces per indent level are used 299s accepts properly indented private 299s 299s RuboCop::Cop::Style::MissingElse 299s configured to warn only on empty if 299s given an unless-statement 299s with no else-clause 299s registers an offense 299s with an else-clause with side-effects 299s doesn't register an offense 299s with a completely empty else-clause 299s doesn't register an offense 299s with an else-clause containing only the literal nil 299s doesn't register an offense 299s given a case statement 299s with a completely empty else-clause 299s doesn't register an offense 299s with an else-clause with side-effects 299s doesn't register an offense 299s with an else-clause containing only the literal nil 299s doesn't register an offense 299s with no else-clause 299s doesn't register an offense 299s >= Ruby 2.7 299s does not register an offense 299s given an if-statement 299s with an else-clause with side-effects 299s doesn't register an offense 299s with an else-clause containing only the literal nil 299s doesn't register an offense 299s with a completely empty else-clause 299s doesn't register an offense 299s with no else-clause 299s registers an offense 299s UnlessElse enabled 299s >= Ruby 2.7 299s does not register an offense 299s given a case statement 299s with no else-clause 299s registers an offense 299s with a completely empty else-clause 299s doesn't register an offense 299s with an else-clause with side-effects 299s doesn't register an offense 299s with an else-clause containing only the literal nil 299s doesn't register an offense 299s given an unless-statement 299s with no else-clause 299s doesn't register an offense 299s with an else-clause with side-effects 299s doesn't register an offense 299s with a completely empty else-clause 299s doesn't register an offense 299s with an else-clause containing only the literal nil 299s doesn't register an offense 299s given an if-statement 299s with an else-clause with side-effects 299s doesn't register an offense 299s with a completely empty else-clause 299s doesn't register an offense 299s with no else-clause 299s registers an offense 299s with an else-clause containing only the literal nil 299s doesn't register an offense 299s UnlessElse disabled 299s given an unless-statement 299s with an else-clause containing only the literal nil 299s doesn't register an offense 299s with an else-clause with side-effects 299s doesn't register an offense 299s with a completely empty else-clause 299s doesn't register an offense 299s with no else-clause 299s registers an offense 299s >= Ruby 2.7 299s does not register an offense 299s given a case statement 299s with a completely empty else-clause 299s doesn't register an offense 299s with an else-clause containing only the literal nil 299s doesn't register an offense 299s with an else-clause with side-effects 299s doesn't register an offense 299s with no else-clause 299s registers an offense 299s given an if-statement 299s with an else-clause containing only the literal nil 299s doesn't register an offense 299s with no else-clause 299s registers an offense 299s with an else-clause with side-effects 299s doesn't register an offense 299s with a completely empty else-clause 299s doesn't register an offense 299s EmptyElse enabled and set to warn on empty 299s given an unless-statement 299s with a completely empty else-clause 299s doesn't register an offense 299s with no else-clause 299s registers an offense 299s with an else-clause with side-effects 299s doesn't register an offense 299s with an else-clause containing only the literal nil 299s doesn't register an offense 299s given an if-statement 299s with no else-clause 299s registers an offense 299s with an else-clause containing only the literal nil 299s doesn't register an offense 299s with a completely empty else-clause 299s doesn't register an offense 299s with an else-clause with side-effects 299s doesn't register an offense 299s given a case statement 299s with an else-clause with side-effects 299s doesn't register an offense 299s with a completely empty else-clause 299s doesn't register an offense 299s with an else-clause containing only the literal nil 299s doesn't register an offense 299s with no else-clause 299s registers an offense 299s >= Ruby 2.7 299s does not register an offense 299s configured to warn only on empty case 299s given an unless-statement 299s with a completely empty else-clause 299s doesn't register an offense 299s with no else-clause 299s doesn't register an offense 299s with an else-clause containing only the literal nil 299s doesn't register an offense 299s with an else-clause with side-effects 299s doesn't register an offense 299s >= Ruby 2.7 299s does not register an offense 299s given a case statement 299s with no else-clause 299s registers an offense 299s with an else-clause with side-effects 299s doesn't register an offense 299s with a completely empty else-clause 299s doesn't register an offense 299s with an else-clause containing only the literal nil 299s doesn't register an offense 299s given an if-statement 299s with a completely empty else-clause 299s doesn't register an offense 299s with an else-clause containing only the literal nil 299s doesn't register an offense 299s with no else-clause 299s doesn't register an offense 299s with an else-clause with side-effects 299s doesn't register an offense 299s EmptyElse enabled and set to warn on nil 299s given an if-statement 299s with a completely empty else-clause 299s doesn't register an offense 299s with an else-clause containing only the literal nil 299s doesn't register an offense 299s with an else-clause with side-effects 299s doesn't register an offense 299s with no else-clause 299s registers an offense 299s >= Ruby 2.7 299s does not register an offense 299s given a case statement 299s with an else-clause with side-effects 299s doesn't register an offense 299s with an else-clause containing only the literal nil 299s doesn't register an offense 299s with a completely empty else-clause 299s doesn't register an offense 299s with no else-clause 299s registers an offense 299s given an unless-statement 299s with a completely empty else-clause 299s doesn't register an offense 299s with an else-clause containing only the literal nil 299s doesn't register an offense 299s with an else-clause with side-effects 299s doesn't register an offense 299s with no else-clause 299s registers an offense 299s 299s RuboCop::Cop::Lint::ImplicitStringConcatenation 299s on adjacent string literals on the same line 299s registers an offense 299s when the string literals contain newlines 299s does not register an offense for a single string 299s registers an offense 299s when inside an array 299s notes that the strings could be separated by a comma instead 299s on a single string literal 299s does not register an offense 299s when in a method call's argument list 299s notes that the strings could be separated by a comma instead 299s on a string with interpolations 299s does register an offense 299s on adjacent string literals on different lines 299s does not register an offense 299s 299s RuboCop::Cop::InternalAffairs::CopDescription 299s The description starts with a word such as verb 299s does not register if the description starts with non-verb word 299s does not register if the description like `Checks` 299s The description starts with `This cop ...` 299s registers an offense if the description like `This cop is ...` 299s registers an offense if using an auxiliary verb 299s registers an offense and corrects if using just a verb 299s There is no description comment 299s does not register offense 299s 299s RuboCop::Cop::Gemspec::DeprecatedAttributeAssignment 299s behaves like deprecated attributes 299s does not register an offense when using `rubygems_version =` and receiver is not `Gem::Specification.new` block variable 299s registers and corrects an offense when using `spec.rubygems_version =` 299s does not register an offense when using `s.rubygems_version =` outside `Gem::Specification.new` 299s registers and corrects an offense when using `s.rubygems_version =` 299s behaves like deprecated attributes 299s registers and corrects an offense when using `s.rubygems_version =` 299s does not register an offense when using `rubygems_version =` and receiver is not `Gem::Specification.new` block variable 299s does not register an offense when using `s.rubygems_version =` outside `Gem::Specification.new` 299s registers and corrects an offense when using `spec.rubygems_version =` 299s behaves like deprecated attributes with addition 299s registers and corrects an offense when using `s.rubygems_version +=` 299s registers and corrects an offense when using `spec.rubygems_version +=` 299s behaves like deprecated attributes 299s does not register an offense when using `s.rubygems_version =` outside `Gem::Specification.new` 299s registers and corrects an offense when using `spec.rubygems_version =` 299s does not register an offense when using `rubygems_version =` and receiver is not `Gem::Specification.new` block variable 299s registers and corrects an offense when using `s.rubygems_version =` 299s behaves like deprecated attributes 299s does not register an offense when using `s.rubygems_version =` outside `Gem::Specification.new` 299s registers and corrects an offense when using `s.rubygems_version =` 299s registers and corrects an offense when using `spec.rubygems_version =` 299s does not register an offense when using `rubygems_version =` and receiver is not `Gem::Specification.new` block variable 299s 299s RuboCop::Cop::Layout::HashAlignment 299s accepts pairs that don't start a line 299s register no offense for yield without args 299s accepts several pairs per line 299s accepts single line hash 299s register no offense for superclass call without args 299s always ignore last argument hash 299s accepts misaligned keys in implicit hash for yield 299s accepts misaligned keys in implicit hash for super 299s accepts misaligned keys in explicit hash for yield 299s accepts misaligned keys in implicit hash 299s accepts misaligned keys in explicit hash 299s accepts misaligned keys in explicit hash for super 299s with `EnforcedColonStyle`: `table` 299s when using hash value omission 299s and aligned keys 299s does not register an offense and corrects 299s when the only item is a kwsplat 299s does not register an offense 299s and misaligned keys 299s registers an offense and corrects 299s and a misaligned double splat argument 299s registers an offense and corrects 299s and a double splat argument after a hash key 299s registers an offense on the misaligned key and corrects 299s and aligned keys but a double splat argument after 299s does not register an offense on the `kwsplat` 299s always inspect last argument hash 299s registers an offense and corrects misaligned keys in implicit hash for yield 299s registers offense and corrects misaligned keys in implicit hash 299s registers offense and corrects misaligned keys in explicit hash 299s registers an offense and corrects misaligned keys in implicit hash for super 299s registers an offense and corrects misaligned keys in explicit hash for super 299s registers an offense and corrects misaligned keys in explicit hash for yield 299s when using hash value omission 299s registers offense and corrects misaligned keys in implicit hash 299s registers offense and corrects misaligned keys in explicit hash 299s with `EnforcedHashRocketStyle`: `table` 299s and aligned keys but a double splat argument after 299s does not register an offense on the `kwsplat` 299s when the only item is a kwsplat 299s does not register an offense 299s and a double splat argument after a hash key 299s registers an offense on the misaligned key and corrects 299s and misaligned keys 299s registers an offense and corrects 299s and a misaligned double splat argument 299s registers an offense and corrects 299s with multiple preferred(key and table) alignment configuration 299s accepts aligned hash keys, by both 299s accepts an empty hash 299s accepts aligned hash keys, by keys 299s accepts aligned hash keys, by table 299s accepts aligned hash keys with mixed hash style 299s registers an offense and corrects misaligned hash values, prefer key when least offenses 299s registers an offense and corrects misaligned hash values, works separate for each hash 299s registers an offense and corrects misaligned hash keys with mixed hash style 299s registers an offense and corrects misaligned hash values, prefer table when least offenses 299s registers an offense and corrects misaligned hash values 299s table and key config 299s registers an offense and corrects misaligned hash values, prefer table because it is specified first 299s ignore explicit last argument hash 299s accepts misaligned keys in explicit hash 299s registers an offense and corrects misaligned keys in implicit hash 299s accepts misaligned keys in explicit hash for super 299s accepts misaligned keys in explicit hash for yield 299s registers an offense and corrects misaligned keys in implicit hash for yield 299s registers an offense and corrects misaligned keys in implicit hash for super 299s when using hash value omission 299s accepts misaligned keys in explicit hash 299s registers an offense and corrects misaligned keys in implicit hash 299s when using hash value omission 299s accepts pairs that don't start a line 299s accepts single line hash 299s accepts several pairs per line 299s with invalid configuration 299s fails 299s with table alignment configuration 299s accepts hashes that use different separators and double splats 299s accepts single line hash 299s registers an offense and corrects for misaligned hash keys 299s accepts aligned hash keys and values 299s accepts a keyword splat only hash 299s accepts several pairs per line 299s accepts a symbol only hash followed by a keyword splat 299s accepts a multiline array of single line hashes 299s accepts an empty hash 299s accepts pairs that don't start a line 299s accepts hashes that use different separators 299s registers an offense and corrects misaligned hash rockets 299s registers an offense for misaligned hash values 299s when using hash value omission 299s accepts several pairs per line 299s accepts pairs that don't start a line 299s accepts single line hash 299s when using hash value omission 299s accepts aligned hash keys and values 299s ignore implicit last argument hash 299s accepts misaligned keys in implicit hash for yield 299s registers an offense and corrects misaligned keys in explicit hash for yield 299s registers an offense and corrects misaligned keys in explicit hash 299s accepts misaligned keys in implicit hash for super 299s accepts misaligned keys in implicit hash 299s registers an offense and corrects misaligned keys in explicit hash for super 299s with default configuration 299s registers an offense and corrects zero or multiple spaces 299s accepts left-aligned hash keys with single spaces 299s registers an offense and corrects table alignment 299s registers an offense and corrects mixed hash styles 299s registers an offense and corrects misaligned hash keys 299s registers an offense and corrects alignment when using double splat in an explicit hash 299s registers an offense and corrects alignment when using double splat in braces 299s registers an offense and corrects multiline value starts in wrong place 299s registers an offense and corrects misaligned mixed multiline hash keys 299s registers an offense and corrects separator alignment 299s does not register an offense when value starts on next line 299s with implicit hash as last argument 299s registers an offense and corrects misaligned hash keys 299s registers an offense and corrects right alignment of keys 299s accepts aligned hash keys 299s accepts an empty hash 299s with table+separator alignment configuration 299s accepts a single method argument entry with colon 299s with different settings for => and : 299s accepts aligned entries 299s registers offenses and correct misaligned entries 299s with separator alignment configuration 299s doesn't break code by moving long keys too far left 299s registers an offense and corrects misaligned hash rockets 299s accepts hashes with different separators 299s accepts an empty hash 299s registers an offense and corrects mixed indentation and spacing 299s accepts pairs that don't start a line 299s accepts several pairs per line 299s accepts aligned hash keys 299s accepts single line hash 299s registers an offense and corrects misaligned hash values 299s when using hash value omission 299s accepts several pairs per line 299s accepts pairs that don't start a line 299s accepts single line hash 299s when using hash value omission 299s accepts aligned hash keys 299s registers an offense and corrects mixed indentation and spacing 299s when `EnforcedStyle: with_fixed_indentation` of `ArgumentAlignment` 299s does not register an offense using aligned hash literal 299s registers and corrects an offense when using misaligned keyword arguments 299s does not register an offense using aligned hash argument for `proc.()` 299s register and corrects an offense 299s does not register an offense for an empty hash literal 299s when using hash value omission 299s does not register and corrects an offense when using aligned keyword arguments 299s register and corrects an offense 299s 299s RuboCop::Cop::Style::UnlessElse 299s unless with nested if-else 299s registers an offense 299s unless without else 299s does not register an offense 299s unless with else 299s registers an offense 299s and nested unless with else 299s registers offenses for both but corrects only the outer unless/else 299s 299s RuboCop::Cop::Style::ClassMethodsDefinitions 299s when EnforcedStyle is def_self 299s removes empty class << self when correcting 299s correctly handles def self.x within class << self 299s does not register an offense when defining singleton methods using `self << object` 299s does not register an offense when defining class methods with `def self.method` 299s does not register an offense when class << self contains only class methods 299s registers and corrects an offense when defining class methods with `class << self` with comment only body 299s does not register an offense when class << self does not contain methods 299s registers an offense and corrects when defining class methods with `class << self` 299s correctly handles class << self containing multiple methods 299s registers an offense and corrects when defining class methods with `class << self` and there is no blank line between method definition and attribute accessor 299s correctly handles methods with annotation comments 299s does not register an offense when `class << self` contains non public methods 299s registers and corrects an offense when defining class methods with `class << self` with inline comment 299s when EnforcedStyle is self_class 299s does not register an offense when defining singleton methods not on self 299s registers an offense when defining class methods with `def self.method` 299s does not register an offense when defining class methods with `class << self` 299s 299s RuboCop::Cop::Style::SymbolLiteral 299s registers an offense for word-line symbols using string syntax 299s accepts string syntax when symbol start with a digit 299s accepts string syntax when symbols have special chars in them 299s accepts string syntax when symbols have whitespaces in them 299s 299s RuboCop::Cop::Layout::SpaceInsideParens 299s when EnforcedStyle is no_space 299s registers an offense for space around heredoc start 299s accepts parentheses with comment and line break 299s registers an offense for spaces inside parens 299s accepts parentheses with no spaces 299s accepts parentheses in block parameter list 299s accepts parentheses with line break 299s when EnforcedStyle is space 299s registers an offense for no spaces inside parens 299s accepts parentheses with line break 299s accepts empty parentheses without spaces 299s accepts parentheses with comment and line break 299s registers an offense in block parameter list with no spaces 299s registers an offense for space inside empty parens 299s registers an offense for no space around heredoc start 299s accepts parentheses with spaces 299s when EnforcedStyle is compact 299s accepts three consecutive right parentheses 299s accepts two consecutive left parentheses 299s registers multiple offense for a missing and extra space between consecutive brackets 299s accepts two consecutive right parentheses 299s accepts parentheses with line break 299s registers an offense for space inside empty parens 299s accepts parentheses with comment and line break 299s accepts parentheses with spaces 299s accepts empty parentheses without spaces 299s registers an offense in block parameter list with no spaces 299s registers an offense for space between consecutive brackets 299s registers an offense for no space around heredoc start 299s accepts three consecutive left parentheses 299s registers an offense for no spaces inside parens 299s 299s RuboCop::Cop::Bundler::GemComment 299s when investigating Gemfiles 299s and the gem is permitted 299s does not register any offenses 299s and the gem is commented on the same line 299s does not register any offenses 299s and the file contains source and group 299s does not register any offenses 299s when the "OnlyFor" option is set 299s including "restrictive_version_specifiers" 299s when a gem is uncommented and has a pessimistic version specifier 299s registers an offense 299s when a gem is uncommented and has options but no version specifiers 299s does not register an offense 299s when a gem is uncommented and has a version specifier along with other options 299s registers an offense 299s when a gem is uncommented and has both minimum and non-minimum version specifier 299s registers an offense 299s when a gem is uncommented and has a frozen version specifier 299s registers an offense 299s when a gem is uncommented and has only a minimum version specifier 299s does not register an offense 299s when a gem is uncommented and has a non-minimum version specifier with a leading space 299s registers an offense 299s when a gem is uncommented and has a version specifier without operator 299s registers an offense 299s when a gem is uncommented and has no version specified 299s does not register an offense 299s when a gem is commented 299s does not register an offense 299s including one or more option names but not "version_specifiers" 299s when a gem is uncommented and has one of the specified options 299s registers an offense 299s when a gem is uncommented and has a version specifier but none of the specified options 299s does not register an offense 299s when a gem is uncommented and contains only options not specified 299s does not register an offense 299s including "version_specifiers" 299s when a gem is uncommented and has a version specifier 299s registers an offense 299s when a gem is commented 299s does not register an offense 299s when a gem is uncommented and has options but no version specifiers 299s does not register an offense 299s when a gem is uncommented and has a version specifier along with other options 299s registers an offense 299s when a gem is uncommented and has multiple version specifiers 299s registers an offense 299s when a gem is uncommented and has no version specified 299s does not register an offense 299s and a gem has no comment 299s registers an offense 299s and the gem is commented 299s does not register any offenses 299s and the file is empty 299s does not register any offenses 299s when investigating Ruby files 299s does not register any offenses 299s 299s RuboCop::Cop::Lint::IdentityComparison 299s does not register an offense when a receiver that is not `object_id` uses `==` 299s does not register an offense when using `==` for comparison between `object_id` and other 299s does not register an offense when using `==` 299s does not register an offense when rhs is `object_id` without receiver 299s registers an offense and corrects when using `==` for comparison between `object_id`s 299s does not register an offense when lhs is `object_id` without receiver 299s 299s RuboCop::Cop::Style::ClassEqualityComparison 299s does not register an offense when using `instance_of?` 299s registers an offense and corrects when comparing class using `eql?` for equality 299s registers an offense and corrects when comparing class using `==` for equality 299s registers an offense and corrects when comparing double quoted class name for equality 299s registers an offense and corrects when comparing `Module#name` for equality 299s registers an offense and corrects when comparing class using `equal?` for equality 299s registers an offense and corrects when comparing single quoted class name for equality 299s when AllowedPatterns is enabled 299s does not register an offense when comparing class for equality 299s when AllowedMethods is enabled 299s does not register an offense when comparing class for equality 299s with instance variable comparison in module 299s registers and corrects an offense 299s with String comparison in module 299s registers and corrects an offense 299s 299s RuboCop::Cop::InternalAffairs::UselessMessageAssertion 299s registers an offense for specs that expect offense using the MSG 299s registers an offense for specs that assert using the MSG 299s does not register an offense for an assertion about the message 299s registers an offense for described_class::MSG in let 299s 299s RuboCop::Cop::Style::EmptyCaseCondition 299s given a case statement with an empty case 299s when using `return` in `else` clause and assigning the return value of `case` 299s does not register an offense 299s with multiple when branches and an else 299s behaves like detect/correct empty case, accept non-empty case 299s accepts the source with case 299s registers an offense and autocorrects 299s when used as an argument of a method without comment 299s behaves like detect/correct empty case, accept non-empty case 299s registers an offense and autocorrects 299s accepts the source with case 299s with first when branch including comma-delimited alternatives 299s behaves like detect/correct empty case, accept non-empty case 299s accepts the source with case 299s registers an offense and autocorrects 299s with a single when branch and no else 299s behaves like detect/correct empty case, accept non-empty case 299s accepts the source with case 299s registers an offense and autocorrects 299s with a when branch including comma-delimited alternatives 299s behaves like detect/correct empty case, accept non-empty case 299s accepts the source with case 299s registers an offense and autocorrects 299s when using `return ... if` in `else` clause and assigning the return value of `case` 299s does not register an offense 299s when using `when ... then` in `case` in a method call 299s behaves like detect/correct empty case, accept non-empty case 299s accepts the source with case 299s registers an offense and autocorrects 299s when using `return ... if` in `when` clause and assigning the return value of `case` 299s does not register an offense 299s with a single when branch and an else 299s behaves like detect/correct empty case, accept non-empty case 299s accepts the source with case 299s registers an offense and autocorrects 299s when using `when ... then` in `case` in `return` 299s behaves like detect/correct empty case, accept non-empty case 299s accepts the source with case 299s registers an offense and autocorrects 299s with multiple when branches and no else 299s behaves like detect/correct empty case, accept non-empty case 299s registers an offense and autocorrects 299s accepts the source with case 299s when used as an argument of a method with comment 299s behaves like detect/correct empty case, accept non-empty case 299s registers an offense and autocorrects 299s accepts the source with case 299s when using `return` in `when` clause and assigning the return value of `case` 299s does not register an offense 299s with multiple when branches and an `else` with code comments 299s behaves like detect/correct empty case, accept non-empty case 299s accepts the source with case 299s registers an offense and autocorrects 299s with when branches using then 299s behaves like detect/correct empty case, accept non-empty case 299s registers an offense and autocorrects 299s accepts the source with case 299s 299s RuboCop::Cop::Layout::EmptyLinesAroundMethodBody 299s registers an offense for class method body ending with a blank 299s registers an offense for method body ending with a blank 299s registers an offense for method body starting with a blank 299s accepts method body starting with a line with spaces 299s is not fooled by single line methods 299s registers an offense for class method body starting with a blank 299s 299s RuboCop::Cop::Lint::SelfAssignment 299s does not register an offense when using constant var assignment for constant from another scope 299s does not register an offense when using instance var assignment 299s registers an offense when using shorthand-and var self-assignment 299s registers an offense when using shorthand-or var self-assignment 299s registers an offense when using constant var self-assignment 299s does not register an offense when using shorthand-or var assignment 299s does not register an offense when using global var assignment 299s does not register an offense when using class var assignment 299s does not register an offense when using multiple var assignment 299s does not register an offense when using multiple var assignment through method call 299s registers an offense when using multiple var self-assignment through array 299s registers an offense when using local var self-assignment 299s registers an offense when using global var self-assignment 299s registers an offense when using class var self-assignment 299s registers an offense when using instance var self-assignment 299s does not register an offense when using local var assignment 299s registers an offense when using multiple var self-assignment 299s does not register an offense when using constant var or-assignment for constant from another scope 299s does not register an offense when using multiple var assignment through splat 299s does not register an offense when using shorthand-and var assignment 299s 299s RuboCop::Cop::Style::VariableInterpolation 299s registers an offense for interpolated class variables 299s registers an offense for interpolated global variables in symbol 299s registers an offense for interpolated global variables in string 299s registers an offense for interpolated global variables in regexp 299s does not register an offense for variables in expressions 299s registers an offense for interpolated regexp nth back references 299s registers an offense for interpolated global variables in backticks 299s registers an offense for interpolated instance variables 299s registers an offense for interpolated regexp back references 299s 299s RuboCop::Cop::Lint::DuplicateMethods 299s registers an offense for duplicate class methods in class 299s does not register an offense for same method name defined in different self methods 299s registers an offense when class << exp is used 299s does not register for the same method in different scopes within `class << self` 299s registers an offense for duplicate method in module 299s registers an offense when class << exp is used 299s doesn't register an offense for different private methods in dynamic module 299s registers an offense for duplicate alias_method in dynamic module 299s registers an offense for duplicate attr_reader in dynamic module 299s accepts for attr_writer and getter in dynamic module 299s registers an offense for duplicate class methods with `self` and named receiver in class 299s registers an offense for duplicate protected methods in dynamic module 299s doesn't register an offense for alias for gvar in module 299s recognizes difference between instance and class methods in module 299s accepts for non-duplicate alias_method in module 299s does not register an offense for same method name defined in different self methods 299s registers an offense for a duplicate class method in separate dynamic module blocks 299s registers an offense for duplicate alias_method in class_eval block 299s registers 2 offenses for pair of duplicate methods in module 299s registers an offense for duplicate attr_reader in dynamic class 299s only registers an offense for the second instance of a duplicate instance method in separate files 299s doesn't register an offense for non-duplicate alias in dynamic module 299s registers an offense for duplicate nested method in self method of class 299s doesn't register an offense for different private methods in class_eval block 299s registers an offense for duplicate alias in dynamic class 299s registers offenses for duplicate assignable attr in class_eval block 299s does not register an offense for same method name defined in different methods 299s registers an offense for duplicate nested method in self method of dynamic module 299s accepts for attr_reader and setter in module 299s registers an offense for duplicate alias in module 299s registers an offense for duplicate alias_method in class 299s handles class_eval with implicit receiver 299s registers offenses for duplicate attr_accessor in class 299s accepts for non-duplicate alias_method in dynamic module 299s registers an offense for duplicate class methods in class_eval block 299s registers 2 offenses for pair of duplicate methods in class 299s registers an offense for duplicate nested method in dynamic module 299s registers an offense for duplicate attr in dynamic class 299s accepts for non-duplicate alias_method in dynamic class 299s registers an offense for a duplicate class method in separate module blocks 299s registers an offense for duplicate private methods in dynamic module 299s registers an offense for duplicate nested method in class 299s registers an offense for duplicate class methods with named receiver in class 299s doesn't register an offense for non-duplicate method in class 299s registers an offense for duplicate private self methods in class_eval block 299s registers an offense for duplicate class methods in dynamic class 299s doesn't register an offense for alias for gvar in class 299s registers 2 offenses for pair of duplicate methods in dynamic class 299s registers offenses for duplicate assignable attr in class 299s doesn't register offense for non-duplicate class methods in dynamic module 299s does not register an offense for same method name defined in different methods 299s registers an offense for duplicate attr in dynamic module 299s registers an offense for duplicate alias in dynamic module 299s doesn't register an offense for non-duplicate method in module 299s registers an offense for duplicate protected methods in class 299s registers an offense for duplicate protected methods in class_eval block 299s registers an offense for duplicate attr_writer in dynamic module 299s accepts for attr_reader and setter in class 299s registers an offense for duplicate private methods in class_eval block 299s only registers an offense for the second instance of a duplicate instance method in separate files 299s registers an offense for duplicate method in dynamic module 299s understands class << self 299s does not register an offense for same method name defined in different methods 299s registers an offense for duplicate private methods in dynamic class 299s understands nested modules 299s properly registers and offense when deeply nested 299s registers an offense for duplicate attr in module 299s doesn't register an offense for non-duplicate method in class_eval block 300s registers an offense for duplicate class methods with named receiver in module 300s ignores Class.new blocks which are assigned to local variables 300s registers an offense for duplicate alias_method in dynamic class 300s registers an offense for duplicate class methods in module 300s registers an offense for duplicate attr in class_eval block 300s only registers an offense for the second instance of a duplicate instance method in separate files 300s recognizes difference between instance and class methods in dynamic class 300s registers an offense for a duplicate class method in separate class_eval block blocks 300s registers an offense for duplicate alias in class_eval block 300s recognizes difference between instance and class methods in class_eval block 300s registers offenses for duplicate assignable attr in module 300s registers an offense for a duplicate instance method in separate dynamic class blocks 300s registers an offense for duplicate alias in class 300s registers an offense for duplicate nested method in class_eval block 300s registers an offense for duplicate method in class 300s doesn't register offense for non-duplicate class methods in class 300s registers offenses for duplicate assignable attr in dynamic class 300s registers an offense for duplicate protected methods in module 300s registers an offense for duplicate attr_writer in class_eval block 300s registers an offense for duplicate private self methods in dynamic module 300s registers an offense for duplicate nested method in self method of class_eval block 300s registers an offense for duplicate method in class_eval block 300s only registers an offense for the second instance of a duplicate instance method in separate files 300s recognizes difference between instance and class methods in class 300s registers an offense for duplicate method in dynamic class 300s recognizes difference between instance and class methods in dynamic module 300s does not register an offense for same method name defined in different self methods 300s registers an offense for duplicate alias_method in module 300s registers offenses for duplicate attr_accessor in dynamic class 300s registers 2 offenses for pair of duplicate methods in dynamic module 300s doesn't register an offense for non-duplicate alias in class_eval block 300s registers an offense for a duplicate instance method in separate dynamic module blocks 300s registers an offense for duplicate attr in class 300s only registers an offense for the second instance of a duplicate instance method in separate files 300s registers an offense for duplicate class methods in dynamic module 300s registers an offense for a duplicate instance method in separate module blocks 300s registers an offense for duplicate attr_writer in module 300s registers an offense for duplicate private self methods in module 300s understands nested modules 300s doesn't register offense for non-duplicate class methods in class_eval block 300s doesn't register an offense for non-duplicate alias in module 300s accepts for attr_writer and getter in module 300s registers an offense for duplicate attr_writer in dynamic class 300s doesn't register an offense for non-duplicate method in dynamic module 300s registers an offense for duplicate private methods in module 300s registers an offense for duplicate nested method in self method of module 300s does not register an offense for same method name defined in different methods 300s understands class << self 300s understands nested modules 300s registers an offense for duplicate nested method in dynamic class 300s registers an offense for duplicate attr_writer in class 300s registers an offense for duplicate private self methods in dynamic class 300s understands nested modules 300s registers an offense for duplicate nested method in self method of dynamic class 300s doesn't register an offense for non-duplicate method in dynamic class 300s registers offenses for duplicate attr_accessor in dynamic module 300s registers an offense for duplicate protected methods in dynamic class 300s accepts for attr_writer and getter in class 300s registers an offense for duplicate class methods with `<<` and named receiver in module 300s registers an offense for duplicate attr_reader in class 300s registers an offense for duplicate class methods with `<<` and named receiver in class 300s understands class << self 300s ignores method definitions in RSpec `describe` blocks 300s registers an offense for a duplicate class method in separate class blocks 300s registers 2 offenses for pair of duplicate methods in class_eval block 300s doesn't register an offense for different private methods in class 300s registers an offense for duplicate nested method in module 300s accepts for attr_reader and setter in dynamic class 300s does not register an offense for same method name defined in different methods 300s understands nested modules 300s registers an offense for a duplicate instance method in separate class_eval block blocks 300s doesn't register an offense for different private methods in dynamic class 300s registers an offense for duplicate attr_reader in class_eval block 300s registers an offense for duplicate private methods in class 300s doesn't register an offense for non-duplicate alias in dynamic class 300s registers offenses for duplicate attr_accessor in module 300s registers an offense for duplicate class methods with `self` and named receiver in module 300s understands class << self 300s accepts for attr_writer and getter in dynamic class 300s doesn't register an offense for different private methods in module 300s registers an offense for a duplicate instance method in separate class blocks 300s registers an offense when class << exp is used 300s registers an offense when class << exp is used 300s registers an offense for duplicate methods at top level 300s accepts for attr_writer and getter in class_eval block 300s doesn't register offense for non-duplicate class methods in dynamic class 300s accepts for non-duplicate alias_method in class 300s registers an offense for duplicate attr_reader in module 300s doesn't register an offense for non-duplicate alias in class 300s registers offenses for duplicate attr_accessor in class_eval block 300s doesn't register an offense for alias for gvar in dynamic class 300s registers an offense when class << exp is used 300s registers an offense for duplicate private self methods in class 300s doesn't register an offense for alias for gvar in dynamic module 300s does not register an offense for same method name defined in different self methods 300s accepts for attr_reader and setter in dynamic module 300s doesn't register an offense for alias for gvar in class_eval block 300s accepts for non-duplicate alias_method in class_eval block 300s registers offenses for duplicate assignable attr in dynamic module 300s does not register an offense for same method name defined in different self methods 300s understands class << A 300s registers an offense for a duplicate class method in separate dynamic class blocks 300s accepts for attr_reader and setter in class_eval block 300s doesn't register offense for non-duplicate class methods in module 300s understands class << self 300s when path is in the project root 300s adds a message with relative path 300s when path is not in the project root 300s adds a message with absolute path 300s 300s RuboCop::Cop::Style::RandomWithOffset 300s registers an offense when using Random.rand(int).succ 300s does not register an offense when using rand(irange).succ with a non-integer range value 300s does not register an offense when using rand(irange) + offset with a non-integer range value 300s does not register an offense when using range with double dots 300s registers an offense when using rand(int).pred 300s registers an offense when using ::Random.rand 300s registers an offense when using rand(int).succ 300s does not register an offense when using rand(erange).pred with a non-integer range value 300s registers an offense when using rand(irange) - offset 300s registers an offense when using Kernel.rand 300s registers an offense when using ::Kernel.rand 300s registers an offense when using Random.rand 300s registers an offense when using rand(int) - offset 300s registers an offense when using rand(int) + offset 300s registers an offense when using rand(irange).succ 300s does not register an offense when using range with triple dots 300s registers an offense when using offset - rand(int) 300s registers an offense when using rand(irange) + offset 300s does not register an offense when using offset - rand(erange) with a non-integer range value 300s registers an offense when using rand(erange) - offset 300s registers an offense when using rand(erange) + offset 300s registers an offense when using offset + rand(int) 300s registers an offense when using rand(erange).succ 300s registers an offense when using offset - ::Random.rand(int) 300s registers an offense when using offset - rand(erange) 300s registers an offense when using ::Random.rand(int).pred 300s registers an offense when using rand(int).next 300s registers an offense when using offset - rand(irange) 300s registers an offense when using offset + Random.rand(int) 300s 300s RuboCop::Cop::Lint::UnifiedInteger 300s target ruby version >= 2.4 300s when Bignum 300s without any decorations 300s registers an offense 300s when explicitly specified as toplevel constant 300s registers an offense 300s with MyNamespace 300s does not register an offense 300s target ruby version < 2.4 300s when Bignum 300s without any decorations 300s registers an offense and autocorrects 300s when explicitly specified as toplevel constant 300s registers an offense 300s with MyNamespace 300s does not register an offense 300s target ruby version < 2.4 300s when Fixnum 300s without any decorations 300s registers an offense and autocorrects 300s with MyNamespace 300s does not register an offense 300s when explicitly specified as toplevel constant 300s registers an offense 300s when Integer 300s when explicitly specified as toplevel constant 300s does not register an offense 300s with MyNamespace 300s does not register an offense 300s without any decorations 300s does not register an offense 300s target ruby version >= 2.4 300s when Fixnum 300s with MyNamespace 300s does not register an offense 300s without any decorations 300s registers an offense 300s when explicitly specified as toplevel constant 300s registers an offense 300s 300s RuboCop::Cop::Lint::RequireRelativeSelfPath 300s does not register an offense when using a variable as an argument of `require_relative` 300s registers an offense when using `require_relative` with self file path argument (with ext) 300s does not register an offense when using `require_relative` without argument 300s does not register an offense when using `require_relative` without self file path argument 300s registers an offense when using `require_relative` with self file path argument 300s does not register an offense when the filename is the same but the extension does not match 300s 300s RuboCop::Cop::Lint::UselessAccessModifier 300s behaves like repeated visibility modifiers 300s registers an offense when `public` is repeated 300s behaves like nested in a begin..end block 300s still flags repeated `protected` 300s doesn't flag an access modifier from surrounding scope 300s behaves like method defined using class_eval 300s registers an offense if no method is defined 300s doesn't register an offense if a method is defined 300s inside a class 300s registers two offenses when a modifier is inside and outside the block and no method is defined 300s registers an offense when a modifier is outside the block and a method is defined only inside the block 300s behaves like unused visibility modifiers 300s registers an offense and corrects when visibility is immediately changed without any intervening defs 300s behaves like def in new block 300s doesn't register an offense if a method is defined in ::Struct.new 300s registers an offense if no method is defined in ::Struct.new 300s when there are consecutive access modifiers 300s registers an offense and corrects 300s behaves like method named by access modifier name 300s does not register an offense for `protected` 300s behaves like nested in a begin..end block 300s doesn't flag an access modifier from surrounding scope 300s still flags repeated `private` 300s behaves like method defined on a singleton class 300s outside a class 300s registers an offense if no method is defined 300s doesn't register an offense if a method is defined 300s registers an offense if no method is defined after the modifier 300s inside a class 300s doesn't register an offense if a method is defined 300s registers an offense if no method is defined after the modifier 300s registers an offense even if a non-singleton-class method is defined 300s registers an offense if no method is defined 300s doesn't register an offense if the modifier is the same as outside the meta-class 300s behaves like nested in a begin..end block 300s doesn't flag an access modifier from surrounding scope 300s still flags repeated `protected` 300s behaves like at the end of the body 300s registers an offense for trailing `private` 300s when multiple class definitions in file but only one has offense 300s registers an offense and corrects 300s when private_class_method is used without arguments 300s registers an offense and corrects 300s behaves like def in new block 300s registers an offense if no method is defined in Module.new 300s doesn't register an offense if a method is defined in Module.new 300s when passing method as symbol 300s does not register an offense 300s when using a known method-creating method 300s is aware that this creates a new method 300s still points out redundant uses within the module 300s when a def is an argument to a method call 301s does not register an offense 301s behaves like at the end of the body 301s registers an offense for trailing `protected` 301s when private_class_method is used with arguments 301s does not register an offense 301s behaves like nested modules 301s doesn't register an offense for nested modules 301s unused modifiers 301s registers an offense when inside a nested module 301s registers an offense when outside a nested module 301s registers an offense with a nested module 301s behaves like repeated visibility modifiers 301s registers an offense when `private` is repeated 301s behaves like non-repeated visibility modifiers 301s doesn't register an offense when `private` is not repeated 301s doesn't register an offense when `protected` is not repeated 301s registers an offense and corrects even when `public` is not repeated 301s behaves like repeated visibility modifiers 301s registers an offense when `protected` is repeated 301s behaves like method defined with define_method 301s doesn't register an offense if a block is passed 301s doesn't register an offense if a lambda is passed 301s doesn't register an offense if a -> is passed 301s doesn't register an offense if a proc is passed 301s when an access modifier has no methods 301s registers an offense and corrects 301s behaves like nested modules 301s doesn't register an offense for nested classs 301s unused modifiers 301s registers an offense when inside a nested class 301s registers an offense when outside a nested class 301s registers an offense with a nested class 301s behaves like method defined on a singleton class 301s inside a class 301s registers an offense if no method is defined after the modifier 301s registers an offense even if a non-singleton-class method is defined 301s doesn't register an offense if the modifier is the same as outside the meta-class 301s doesn't register an offense if a method is defined 301s registers an offense if no method is defined 301s outside a class 301s doesn't register an offense if a method is defined 301s registers an offense if no method is defined 301s registers an offense if no method is defined after the modifier 301s when using inline modifiers 301s does not register an offense 301s behaves like methods defined in an iteration 301s doesn't register an offense for map 301s doesn't register an offense for each 301s when only a constant or local variable is defined after the modifier 301s registers an offense and corrects 301s registers an offense and corrects 301s behaves like def in new block 301s registers an offense if no method is defined in Class.new 301s doesn't register an offense if a method is defined in Class.new 301s behaves like at the end of the body 301s registers an offense for trailing `protected` 301s behaves like nested modules 301s doesn't register an offense for nested modules 301s unused modifiers 301s registers an offense with a nested module 301s registers an offense when outside a nested module 301s registers an offense when inside a nested module 301s behaves like nested modules 301s doesn't register an offense for nested classs 301s unused modifiers 301s registers an offense with a nested class 301s registers an offense when inside a nested class 301s registers an offense when outside a nested class 301s when an access modifier has no effect 301s registers an offense and corrects 301s behaves like method defined with define_method 301s doesn't register an offense if a block is passed 301s doesn't register an offense if a proc is passed 301s doesn't register an offense if a -> is passed 301s doesn't register an offense if a lambda is passed 301s behaves like repeated visibility modifiers 301s registers an offense when `protected` is repeated 301s behaves like method defined using instance_eval 301s doesn't register an offense if a method is defined 301s registers an offense if no method is defined 301s inside a class 301s registers an offense when a modifier is outside the block and a method is defined only inside the block 301s registers two offenses when a modifier is inside and outside the and no method is defined 301s behaves like methods defined in an iteration 301s doesn't register an offense for map 301s doesn't register an offense for each 301s behaves like repeated visibility modifiers 301s registers an offense when `public` is repeated 301s behaves like method defined with define_method 301s doesn't register an offense if a lambda is passed 301s doesn't register an offense if a -> is passed 301s doesn't register an offense if a block is passed 301s doesn't register an offense if a proc is passed 301s behaves like def in new block 301s registers an offense if no method is defined in Struct.new 301s doesn't register an offense if a method is defined in Struct.new 301s behaves like def in new block 301s registers an offense if no method is defined in Struct.new 301s doesn't register an offense if a method is defined in Struct.new 301s behaves like non-repeated visibility modifiers 301s registers an offense and corrects even when `public` is not repeated 301s doesn't register an offense when `protected` is not repeated 301s doesn't register an offense when `private` is not repeated 301s when an access modifier is followed by a class method defined on constant 301s registers an offense and corrects 301s behaves like method defined using class_eval 301s registers an offense if no method is defined 301s doesn't register an offense if a method is defined 301s inside a class 301s registers an offense when a modifier is outside the block and a method is defined only inside the block 301s registers two offenses when a modifier is inside and outside the block and no method is defined 301s behaves like at the top of the body 301s doesn't register an offense for `private` 301s registers an offense and corrects for `public` 301s doesn't register an offense for `protected` 301s behaves like methods defined in an iteration 301s doesn't register an offense for each 301s doesn't register an offense for map 301s behaves like conditionally defined method 301s doesn't register an offense for if 301s doesn't register an offense for unless 301s behaves like nested in a begin..end block 301s doesn't flag an access modifier from surrounding scope 301s still flags repeated `private` 301s behaves like conditionally defined method 301s doesn't register an offense for if 301s doesn't register an offense for unless 301s behaves like method named by access modifier name 301s does not register an offense for `public` 301s behaves like method named by access modifier name 301s does not register an offense for `protected` 301s when using ActiveSupport's `concerning` method 301s is aware that this creates a new scope 301s still points out redundant uses within the block 301s Ruby 2.7 301s still points out redundant uses within the block 301s behaves like at the end of the body 301s registers an offense for trailing `public` 301s behaves like method named by access modifier name 301s does not register an offense for `private` 301s behaves like at the end of the body 301s registers an offense for trailing `private` 301s behaves like def in new block 301s registers an offense if no method is defined in ::Struct.new 301s doesn't register an offense if a method is defined in ::Struct.new 301s behaves like def in new block 301s doesn't register an offense if a method is defined in ::Module.new 301s registers an offense if no method is defined in ::Module.new 301s behaves like method defined with define_method 301s doesn't register an offense if a -> is passed 301s doesn't register an offense if a block is passed 301s doesn't register an offense if a lambda is passed 301s doesn't register an offense if a proc is passed 301s when an access modifier is followed by attr_* 301s does not register an offense 301s behaves like method named by access modifier name 301s does not register an offense for `public` 301s behaves like conditionally defined method 301s doesn't register an offense for if 301s doesn't register an offense for unless 301s behaves like def in new block 301s doesn't register an offense if a method is defined in Class.new 301s registers an offense if no method is defined in Class.new 301s behaves like at the top of the body 301s doesn't register an offense for `private` 301s registers an offense and corrects for `public` 301s doesn't register an offense for `protected` 301s behaves like nested in a begin..end block 301s still flags repeated `public` 301s behaves like def in new block 301s doesn't register an offense if a method is defined in ::Class.new 301s registers an offense if no method is defined in ::Class.new 301s behaves like method named by access modifier name 301s does not register an offense for `private` 301s behaves like def in new block 301s registers an offense if no method is defined in Module.new 301s doesn't register an offense if a method is defined in Module.new 301s when using the class_methods method from ActiveSupport::Concern 301s is aware that this creates a new scope 301s behaves like def in new block 301s doesn't register an offense if a method is defined in ::Class.new 301s registers an offense if no method is defined in ::Class.new 301s behaves like at the end of the body 301s registers an offense for trailing `public` 301s behaves like def in new block 301s registers an offense if no method is defined in ::Module.new 301s doesn't register an offense if a method is defined in ::Module.new 301s behaves like method defined using instance_eval 301s doesn't register an offense if a method is defined 301s registers an offense if no method is defined 301s inside a class 301s registers an offense when a modifier is outside the block and a method is defined only inside the block 301s registers two offenses when a modifier is inside and outside the and no method is defined 301s behaves like repeated visibility modifiers 301s registers an offense when `private` is repeated 301s behaves like unused visibility modifiers 301s registers an offense and corrects when visibility is immediately changed without any intervening defs 301s behaves like nested in a begin..end block 301s still flags repeated `public` 301s behaves like methods defined in an iteration 301s doesn't register an offense for map 301s doesn't register an offense for each 301s behaves like method defined on a singleton class 301s outside a class 301s registers an offense if no method is defined after the modifier 301s registers an offense if no method is defined 301s doesn't register an offense if a method is defined 301s inside a class 301s registers an offense if no method is defined after the modifier 301s registers an offense if no method is defined 301s doesn't register an offense if a method is defined 301s registers an offense even if a non-singleton-class method is defined 301s doesn't register an offense if the modifier is the same as outside the meta-class 301s behaves like conditionally defined method 301s doesn't register an offense for if 301s doesn't register an offense for unless 301s when using ActiveSupport behavior when Rails is not eabled 301s reports offenses and corrects 301s when class is empty save modifier 301s registers an offense and corrects 301s behaves like method defined on a singleton class 301s inside a class 301s registers an offense if no method is defined 301s registers an offense if no method is defined after the modifier 301s registers an offense even if a non-singleton-class method is defined 301s doesn't register an offense if a method is defined 301s doesn't register an offense if the modifier is the same as outside the meta-class 301s outside a class 301s registers an offense if no method is defined after the modifier 301s registers an offense if no method is defined 301s doesn't register an offense if a method is defined 301s 301s RuboCop::Cop::Gemspec::OrderedDependencies 301s behaves like ordered dependency 301s when add_development_dependency 301s when gems are not alphabetically sorted 301s registers an offense 301s when each individual group of line is sorted 301s does not register any offenses 301s When gems are alphabetically sorted 301s does not register any offenses 301s when dependency is separated by multiline comment 301s with TreatCommentsAsGroupSeparators: false 301s registers an offense 301s with TreatCommentsAsGroupSeparators: true 301s accepts 301s When using method call to gem names 301s does not register any offenses 301s when different dependencies are consecutive 301s does not register any offenses 301s When using a local variable in an argument of dependent gem 301s does not register any offenses 301s behaves like ordered dependency 301s when add_dependency 301s when dependency is separated by multiline comment 301s with TreatCommentsAsGroupSeparators: true 301s accepts 301s with TreatCommentsAsGroupSeparators: false 301s registers an offense 301s When gems are alphabetically sorted 301s does not register any offenses 301s when each individual group of line is sorted 301s does not register any offenses 301s when gems are not alphabetically sorted 301s registers an offense 301s behaves like ordered dependency 301s when add_runtime_dependency 301s when each individual group of line is sorted 301s does not register any offenses 301s when gems are not alphabetically sorted 301s registers an offense 301s When gems are alphabetically sorted 301s does not register any offenses 301s when dependency is separated by multiline comment 301s with TreatCommentsAsGroupSeparators: false 301s registers an offense 301s with TreatCommentsAsGroupSeparators: true 301s accepts 301s 301s RuboCop::Cop::Layout::IndentationStyle 301s when EnforcedStyle is spaces 301s registers offenses before __END__ but not after 301s accepts a line with tab in a string 301s accepts a line which begins with tab in a heredoc 301s accepts a line with a tab between string literals 301s accepts a line which begins with tab in a multiline heredoc 301s registers and corrects an offense for a line indented with mixed whitespaces 301s registers and corrects an offense for a line with tab in a string indented with tab 301s registers and corrects an offense for a line indented with multiple tabs 301s accepts a line with a tab other than indentation 301s accepts a line which begins with tab in a string 301s registers and corrects an offense for a line indented with tab 301s custom indentation width 301s uses the configured number of spaces to replace a tab 301s when EnforcedStyle is tabs 301s registers an offense for a line indented with mixed whitespace 301s registers and corrects an offense for a line indented with multiple spaces 301s registers offenses before __END__ but not after 301s registers and corrects an offense for a line indented with space 301s accepts a line which begins with tab in a string 301s accepts a line which begins with tab in a heredoc 301s accepts a line a tab other than indentation 301s accepts a line which begins with tab in a multiline heredoc 301s accepts a line with tab in a string 301s accepts a line with tabs between string literals 301s registers and corrects an offense for a line indented with fractional number ofindentation groups by rounding down 301s registers and corrects an offense for a line with tab in a string indented with space 301s custom indentation width 301s uses the configured number of spaces to replace with a tab 301s 301s RuboCop::Cop::Lint::HashCompareByIdentity 301s registers an offense when using hash method with `object_id` as a key 301s registers an offense when using hash methods with `object_id` on receiver as a key 301s does not register an offense for hash methods without `object_id` as key 301s 301s RuboCop::Cop::Lint::RedundantCopDisableDirective 301s .check 301s autocorrecting whitespace 301s nested inside a namespace 301s preserves indentation 301s when the comment is not the first line of the file 301s preserves whitespace before the comment 301s when the comment is the first line of the file 301s followed by code 301s removes the comment 301s followed by another comment 301s removes the comment and newline 301s followed by a newline 301s removes the comment and newline 301s when there is a blank line before inline comment 301s removes the comment and preceding whitespace 301s when there is only whitespace before the comment 301s leaves the whitespace 301s inline comment 301s removes the comment and preceding whitespace 301s when there are disabled lines 301s and there are two offenses 301s and a comment disables 301s one cop and then all cops 301s returns an offense 301s one cop twice 301s returns an offense 301s and there are no offenses 301s and a comment disables 301s itself and all cops 301s disabled on different ranges 301s returns no offense 301s multiple cops, with abbreviated names 301s one of them has offenses 301s returns an offense 301s an unknown cop 301s returns an offense 301s when using a directive comment after a non-directive comment 301s returns an offense 301s multiple cops 301s returns an offense 301s one cop 301s returns an offense 301s misspelled cops 301s returns an offense 301s all cops 301s returns an offense 301s itself and another cop 301s disabled on different ranges 301s returns no offense 301s disabled on the same range 301s returns no offense 301s and the other cop is disabled a second time 301s returns no offense 301s multiple cops, and the leftmost one has no offenses 301s returns an offense 301s multiple cops, and one of them has offenses 301s returns an offense 301s comment is not at the beginning of the file 301s and not all cops have offenses 301s returns an offense 301s a cop that is disabled in the config 301s returns an offense 301s if that cop has offenses 301s returns an offense 301s when that cop was previously enabled 301s returns no offense 301s and there is an offense 301s and a comment disables 301s that cop but on other lines 301s returns an offense 301s all cops 301s returns no offense 301s that cop 302s returns no offense 302s when there are no disabled lines 302s returns no offense 302s with a disabled department 302s removes cop duplicated by department 302s removes redundant department 302s does not remove correct department 302s removes cop duplicated by department on previous line 302s removes cop duplicated by department and leaves free text as a comment 302s removes entire comment 302s 302s RuboCop::Cop::Layout::SpaceAfterComma 302s method call arg commas without space 302s behaves like ends with an item 302s registers an offense and does autocorrection 302s block argument commas without space 302s behaves like trailing comma 302s accepts the last comma 302s behaves like ends with an item 302s registers an offense and does autocorrection 302s inside hash braces 302s when EnforcedStyle for SpaceInsideBlockBraces is no_space 302s accepts no space between a comma and a closing brace 302s behaves like common behavior 302s accepts a space between a comma and a closing brace 302s when EnforcedStyle for SpaceInsideBlockBraces is space 302s registers an offense for no space between a comma and a closing brace 302s behaves like common behavior 302s accepts a space between a comma and a closing brace 302s array index commas without space 302s behaves like trailing comma 302s accepts the last comma 302s behaves like ends with an item 302s registers an offense and does autocorrection 302s 302s RuboCop::Cop::Style::BlockDelimiters 302s EnforcedStyle: line_count_based 302s registers an offense for a single line block with do-end 302s accepts a single line block with braces 302s accepts a multi-line block with do-end 302s accepts a multi-line block that needs braces to be valid ruby 302s autocorrects do-end for single line blocks to { and } 302s does not autocorrect {} if do-end would change the meaning 302s does not autocorrect do-end if {} would change the meaning 302s Ruby >= 2.7 302s accepts a multi-line numblock that needs braces to be valid ruby 302s accepts a multi-line numblock with do-end 302s registers an offense for a single line numblock with do-end 302s accepts a single line numblock with braces 302s with a single line do-end block with an inline `rescue` 302s autocorrects properly 302s when there are braces around a multi-line block 302s registers an offense for braces if do-end would not change the meaning 302s accepts a multi-line functional block with {} if it is an ignored method by regex 302s registers an offense when combined with attribute assignment 302s autocorrects { and } to do and end 302s registers an offense when there is a comment after the closing brace and block body is empty 302s accepts a multi-line functional block with {} if it is an ignored method 302s registers an offense in the simple case 302s registers an offense and keep chained block when there is a comment after the closing brace and block body is not empty 302s does not autocorrect {} if do-end would introduce a syntax error 302s accepts braces if do-end would change the meaning 302s registers an offense when there is a comment after the closing brace and block body is not empty 302s autocorrects adjacent curly braces correctly 302s can handle special method names such as []= and done? 302s registers an offense when there is a comment after the closing brace and using method chain 302s EnforcedStyle: braces_for_chaining 302s autocorrects do-end with `rescue` to {} if it is a functional block 302s accepts a multi-line block that needs braces to be valid ruby 302s accepts a single line block with braces 302s accepts a multi-line functional block with {} if it is an ignored method by regex 302s registers an offense for multi-line chained do-end blocks 302s disallows {} with no chain inside of Hash[] 302s registers an offense for a single line block with do-end 302s allows chaining to } inside of Hash[] 302s allows when :[] is chained 302s autocorrects do-end with `ensure` to {} if it is a functional block 302s accepts a multi-line block with do-end 302s allows do/end inside Hash[] 302s accepts a multi-line functional block with {} if it is an ignored method 302s Ruby >= 2.7 302s accepts a multi-line numblock that needs braces to be valid ruby 302s accepts a single line numblock with braces 302s registers an offense for a single line numblock with do-end 302s accepts a multi-line numblock with do-end 302s when there are braces around a multi-line block 302s allows when the block is being chained 302s registers an offense in the simple case 302s allows when the block is being chained with attribute assignment 302s registers an offense when combined with attribute assignment 302s with safe navigation 302s registers an offense for multi-line chained do-end blocks 302s BracesRequiredMethods 302s other methods 302s allows braces 302s autocorrects { and } to do and end 302s BracesRequiredMethods methods 302s allows braces 302s registers an offense with do 302s EnforcedStyle: always_braces 302s does not autocorrect do-end if {} would change the meaning 302s accepts a multi-line functional block with do-end if it is an ignored method 302s registers an offense for multi-line chained do-end blocks 302s accepts a multi-line functional block with do-end if it is an ignored method by regex 302s registers an offense for a single line block with do-end 302s registers an offense for a multi-line block with do-end 302s accepts a multi-line block that needs braces to be valid ruby 302s autocorrects do-end with `ensure` to {} if it is a functional block 302s autocorrects do-end with `rescue` to {} if it is a functional block 302s registers an offense for multi-lined do-end blocks when combined with attribute assignment 302s accepts a single line block with braces 302s when there are braces around a multi-line block 302s allows when the block is being chained 302s allows in the simple case 302s allows when combined with attribute assignment 302s EnforcedStyle: semantic 302s allows {} if it is a known procedural method 302s autocorrects do-end to {} if it is a functional block and does not change the meaning 302s accepts a multi-line functional block with do-end if it is an ignored method 302s allows {} if it is a known functional method 302s accepts a multi-line block with braces if the return value is assigned 302s autocorrects do-end to {} with appropriate spacing 302s autocorrects do-end to {} if it is a functional block 302s accepts a multi-line functional block with do-end if it is a known procedural method 302s registers an offense for a multi-line block with do-end if the return value is passed to a method 302s registers an offense for a multi-line block with braces if the return value is not used 302s accepts a multi-line block with do-end if it is the return value of its scope 302s accepts a single line block with {} if used in an erange 302s accepts a multi-line block with braces when passed to a known functional method 302s accepts a multi-line block with braces if it is the return value of its scope 302s accepts a multi-line functional block with do-end if it is an ignored method by regex 302s accepts a single line block with {} if used in an irange 302s accepts a single line block with {} if used in an array 302s accepts a single line block with {} if used in a logical or 302s accepts a single line block with {} followed by a safe navigation method call 302s registers an offense for a multi-line block with do-end if the return value is assigned 302s registers an offense for a multi-line block with do-end if the return value is attribute-assigned 302s accepts a single line block with {} if used in an if statement 302s accepts a single line block with {} if used in a logical and 302s autocorrects do-end with `ensure` to {} if it is a functional block 302s autocorrects do-end with `rescue` to {} if it is a functional block 302s accepts a multi-line block with braces when passed to a method 302s accepts a multi-line block with braces when chained 302s with a procedural multi-line block 302s autocorrects { and } to do and end with appropriate spacing 302s autocorrects { and } to do and end 302s with a procedural one-line block 302s with AllowBracesOnProceduralOneLiners true 302s accepts a single line procedural do-end block 302s accepts a single line procedural block with braces 302s with AllowBracesOnProceduralOneLiners false or unset 302s accepts a single line block with do-end if it is procedural 302s registers an offense for a single line procedural block 302s 302s RuboCop::Cop::Metrics::BlockNesting 302s accepts if/elsif 302s accepts `Max` levels of nesting 302s nested `until` 302s registers an offense 302s nested `case` 302s registers an offense 302s nested `rescue` 302s registers an offense 302s `Max + 2` levels of `if` nesting 302s registers an offense 302s nested `for` 302s registers an offense 302s nested `while` 302s registers an offense 302s when CountBlocks is true 302s nested multiline block 302s registers an offense 302s nested inline block 302s registers an offense 302s `Max + 1` levels of `if` nesting 302s registers an offense 302s nested modifier `while` 302s registers an offense 302s nested modifier `until` 302s registers an offense 302s when CountBlocks is false 302s accepts nested inline blocks 302s accepts nested multiline blocks 302s Multiple nested `ifs` at same level 302s registers 2 offenses 302s 302s RuboCop::Cop::Style::ClassMethods 302s does not register an offense for methods using self 302s does not register an offense for other top-level singleton methods 302s registers an offense for methods using a class name 302s does not register an offense outside class/module bodies 302s registers an offense for methods using a module name 302s 302s RuboCop::Cop::Style::ExpandPathArguments 302s registers an offense when using `Pathname(__FILE__).parent.expand_path` 302s registers an offense when using `Pathname.new(__FILE__).parent.expand_path` 302s does not register an offense when using `File.expand_path(path, __FILE__)` 302s registers an offense when using `::Pathname.new(__FILE__).parent.expand_path` 302s registers an offense when using `File.expand_path('../..', __FILE__)` 302s does not register an offense when using `Pathname(__dir__).expand_path` 302s registers an offense when using `File.expand_path('./../..', __FILE__)` 302s does not register an offense when using `File.expand_path("#{path_to_file}.png", __FILE__)` 302s registers an offense when using `File.expand_path('../../..', __FILE__)` 302s registers an offense when using `File.expand_path('../../lib', __FILE__)` 302s does not register an offense when using `File.expand_path(__dir__)` 302s registers an offense when using `File.expand_path('.', __FILE__)` 302s registers an offense when using `::File.expand_path('./../..', __FILE__)` 302s registers an offense when using `File.expand_path('..', __FILE__)` 302s does not register an offense when using `File.expand_path('..', __dir__)` 302s does not register an offense when using `File.expand_path(__FILE__)` 302s 302s RuboCop::Cop::RangeHelp 302s source indicated by #range_with_surrounding_space 302s when passing range as a kwarg 302s behaves like works with various `side`s 302s when side is :right 302s is expected to eq "a(2) " 302s when side is :both 302s is expected to eq " a(2) " 302s when side is :left 302s is expected to eq " a(2)" 302s when passing range as a positional argument 302s behaves like works with various `side`s 302s when side is :left 302s is expected to eq " a(2)" 302s when side is :both 302s is expected to eq " a(2) " 302s when side is :right 302s is expected to eq "a(2) " 302s #range_with_comments_and_lines 302s returns a range that includes related comments and whole lines 302s source indicated by #range_with_surrounding_comma 302s when side is :right 302s is expected to eq "Error," 302s when side is :both 302s is expected to eq ",Error," 302s when side is :left 302s is expected to eq ",Error" 302s source indicated by #range_by_whole_lines 302s with end of one line 302s without include_final_newline 302s is expected to eq "puts 'example'" 302s with include_final_newline 302s is expected to eq "puts 'example'\n" 302s with a whole line except newline selected 302s with include_final_newline 302s is expected to eq "puts 'example'\n" 302s without include_final_newline 302s is expected to eq "puts 'example'" 302s with parts of two lines 302s without include_final_newline 302s is expected to eq "puts 'example'\nputs 'another example'" 302s with include_final_newline 302s is expected to eq "puts 'example'\nputs 'another example'\n" 302s when part of a single line is selected 302s without include_final_newline 302s is expected to eq "puts 'example'" 302s with include_final_newline 302s is expected to eq "puts 'example'\n" 302s with beginning of one line 302s without include_final_newline 302s is expected to eq "puts 'another example'" 302s with include_final_newline 302s is expected to eq "puts 'another example'\n" 302s with a whole line plus beginning of next line 302s with include_final_newline 302s is expected to eq "puts 'example'\nputs 'another example'\n" 302s without include_final_newline 302s is expected to eq "puts 'example'\nputs 'another example'" 302s with parts of four lines 302s without include_final_newline 302s is expected to eq "puts 'example'\nputs 'another example'\n\nsomething_else" 302s with include_final_newline 302s is expected to eq "puts 'example'\nputs 'another example'\n\nsomething_else\n" 302s when source doesn't end with a newline 302s without include_final_newline 302s is expected to eq "newline_at_end" 302s with include_final_newline 302s is expected to eq "newline_at_end" 302s is expected to eq 30 302s 302s RuboCop::Cop::Metrics::AbcSize 302s when Max is 0 302s registers an offense for an assignment of an element 302s accepts an empty `define_method` 302s registers an offense for an assignment of a local variable 302s registers an offense for complex content including A, B, and C scores 302s treats safe navigation method calls like regular method calls + a condition 302s registers an offense for an if modifier 302s registers an offense for a `define_method` 302s accepts an empty method 302s when CountRepeatedAttributes is `false` 302s does not count repeated attributes 302s when CountRepeatedAttributes is `true` 302s counts repeated attributes 302s Ruby 2.7 302s registers an offense for a `define_method` with numblock 302s when method is in list of allowed methods 302s when AllowedPatterns is enabled 302s does not register an offense when defining a class method 302s does not register an offense when using `define_method` 302s does not register an offense when defining an instance method 302s when AllowedMethods is enabled 302s does not register an offense when defining an instance method 302s does not register an offense when defining a class method 302s does not register an offense when using `define_method` 302s when Max is 1000.3 303s reports size and max as <1000, 1000, 4000> 4243/1000 303s when Max is 100.321 303s reports size and max as <100, 100, 400> 424.3/100.3 303s when Max is 2.3 303s accepts a total score of 2.24 303s when Max is 10.3 303s reports size and max as <10, 10, 40> 42.43/10.3 303s when Max is 2 303s accepts two assignments 303s when Max is 1.3 303s reports size and max as <1, 1, 4> 4.24/1.3 303s 303s RuboCop::Cop::Style::EmptyBlockParameter 303s accepts a non-empty block parameter with {} style 303s registers an offense for an empty block parameter with lambda 303s accepts a block that is do-end style without parameter 303s registers an offense for an empty block parameter with do-end style 303s accepts an empty block parameter with a lambda 303s accepts a non-empty block parameter with do-end style 303s registers an offense for an empty block parameter with {} style 303s accepts a block that is {} style without parameter 303s registers an offense for an empty block parameter with super 303s 303s RuboCop::Cop::Metrics::ClassLength 303s rejects a class with more than 5 lines 303s accepts a class with 5 lines 303s does not count blank lines 303s reports the correct beginning and end lines 303s accepts a class with less than 5 lines 303s accepts empty classes 303s when using numbered parameter 303s when inspecting a class defined with Struct.new 303s registers an offense 303s registers an offense when inspecting or equals (`||=`) for constant 303s registers an offense when multiple assignments to constants 303s when inspecting a class defined with ::Class.new 303s registers an offense 303s when inspecting a class defined with Class.new 303s registers an offense 303s when inspecting a class defined with Class.new 303s registers an offense 303s when CountComments is disabled 303s accepts classes that only contain comments 303s when a class has inner classes 303s rejects a class with 6 lines that belong to the class directly 303s does not count lines of inner classes 303s when inspecting a class defined with ::Class.new 303s registers an offense 303s when inspecting a class defined with Struct.new 303s registers an offense when multiple assignments to constants 303s registers an offense 303s registers an offense when inspecting or equals (`||=`) for constant 303s when overlapping constant assignments 303s does not register an offense 303s when CountComments is enabled 303s also counts commented lines 303s registers an offense for a class that only contains comments 303s when `CountAsOne` is not empty 303s folds array into one line 303s 303s RuboCop::Cop::Style::HashExcept 303s does not register an offense when not using key block argument` 303s does not register an offense when using `reject` and `include?` 303s does not register an offense when using `reject` and comparing with `:key != lvar` 303s does not register an offense when using `select` and comparing with `:key == lvar` 303s does not register an offense when using `Hash#except` 303s does not register an offense when not using block` 303s does not register an offense when using `reject` and comparing with `lvar != :key` 303s does not register an offense when using `select` and comparing with `lvar == :key` 303s Ruby 2.7 or lower 303s does not register an offense when using `reject` and comparing with `:key == lvar` 303s does not register an offense when using `select` and comparing with `lvar != :key` 303s does not register an offense when using `select` and comparing with `:key != lvar` 303s does not register an offense when using `reject` and comparing with `lvar == :key` 303s Ruby 3.0 or higher 303s does not register an offense when using `delete_if` and comparing with `lvar == :sym` 303s registers and corrects an offense when using `reject` and comparing with `lvar == :sym` 303s registers and corrects an offense when using `reject` and comparing with `:sym == lvar` 303s registers and corrects an offense when using `select` and comparing with `:sym != lvar` 303s registers and corrects an offense when using `filter` and comparing with `lvar != :sym` 303s registers and corrects an offense when using `reject` and comparing with `lvar == 'str'` 303s does not register an offense when using `reject` and other than comparison by string and symbol using `==` 303s does not register an offense when comparing with hash value 303s does not register an offense when using `keep_if` and comparing with `lvar != :sym` 303s registers and corrects an offense when using `select` and comparing with `lvar != :sym` 303s registers and corrects an offense when using `reject` and other than comparison by string and symbol using `eql?` 303s using `exclude?` 303s does not register offenses when using `reject` and calling `!exclude?` method with symbol array 303s using `in?` 303s does not register offenses when using `reject` and calling `key.in?` method with symbol array 303s using `include?` 303s does not register an offense when using `reject` and calling `include?` method with symbol array and second block value 303s registers and corrects an offense when using `reject` and calling `include?` method with dynamic string array 303s registers and corrects an offense when using `select` and calling `!include?` method with symbol array 303s registers and corrects an offense when using `reject` and calling `include?` method with symbol array 303s registers and corrects an offense when using `reject` and calling `include?` method with dynamic symbol array 303s registers and corrects an offense when using `reject` and calling `include?` method with method call 303s registers and corrects an offense when using `filter` and calling `!include?` method with symbol array 303s registers and corrects an offense when using `reject` and calling `include?` method with variable 303s when `AllCops/ActiveSupportExtensionsEnabled: true` 303s registers and corrects an offense when using `reject` and comparing with `lvar == :sym` 303s does not register an offense when using `reject` and other than comparison by string and symbol using `==` 303s does not register an offense when comparing with hash value 303s registers and corrects an offense when using `reject` and comparing with `lvar == 'str'` 303s registers and corrects an offense when using `select` and comparing with `lvar != :sym` 303s registers and corrects an offense when using `reject` and comparing with `:sym == lvar` 303s does not register an offense when using `delete_if` and comparing with `lvar == :sym` 303s registers and corrects an offense when using `reject` and other than comparison by string and symbol using `eql?` 303s does not register an offense when using `keep_if` and comparing with `lvar != :sym` 303s registers and corrects an offense when using `filter` and comparing with `lvar != :sym` 303s registers and corrects an offense when using `select` and comparing with `:sym != lvar` 303s using `include?` 303s registers and corrects an offense when using `filter` and calling `!include?` method with symbol array 303s registers and corrects an offense when using `reject` and calling `include?` method with symbol array 303s registers and corrects an offense when using `reject` and calling `include?` method with dynamic string array 303s registers and corrects an offense when using `reject` and calling `include?` method with variable 303s registers and corrects an offense when using `reject` and calling `include?` method with method call 303s registers and corrects an offense when using `select` and calling `!include?` method with symbol array 303s registers and corrects an offense when using `reject` and calling `include?` method with dynamic symbol array 303s using `exclude?` 303s registers and corrects an offense when using `reject` and calling `!exclude?` method with symbol array 303s registers and corrects an offense when using `select` and calling `exclude?` method with symbol array 303s registers and corrects an offense when using `reject` and calling `!exclude?` method with variable 303s registers and corrects an offense when using `filter` and calling `exclude?` method with symbol array 303s registers and corrects an offense when using `reject` and calling `!exclude?` method with dynamic string array 303s does not register an offense when using `reject` and calling `exclude?` method with symbol array and second block value 303s registers and corrects an offense when using `reject` and calling `!exclude?` method with dynamic symbol array 303s registers and corrects an offense when using `reject` and calling `!exclude?` method with method call 303s using `in?` 303s registers and corrects an offense when using `reject` and calling `key.in?` method with symbol array 303s registers and corrects an offense when using `reject` and calling `key.in?` method with dynamic symbol array 303s registers and corrects an offense when using `filter` and calling `!key.in?` method with symbol array 303s registers and corrects an offense when using `reject` and calling `key.in?` method with dynamic string array 303s registers and corrects an offense when using `reject` and calling `key.in?` method with variable 303s registers and corrects an offense when using `select` and calling `!key.in?` method with symbol array 303s registers and corrects an offense when using `reject` and calling `key.in?` method with method call 303s does not register an offense when using `reject` and calling `in?` method with symbol array and second block value 303s 303s RuboCop::Cop::InternalAffairs::UndefinedConfig 303s registers an offense when the cop inherits `::RuboCop::Cop::Base` 303s ignores `cop_config` in non-cop classes 303s registers an offense when the cop is not within the `RuboCop::Cop` namespace 303s registers an offense when the cop has no configuration at all 303s ignores `cop_config` in non-cop subclasses 303s registers an offense when the cop inherits `RuboCop::Cop::Base` 303s can handle an empty file 303s does not register an offense for implicit configuration keys 303s works when the base class is `Cop` instead of `Base` 303s registers an offense when the cop inherits `Cop::Base` 303s works with deeper nested cop names 303s does not register an offense if using `cop_config` outside of a cop class 303s element lookup 303s does not register an offense for defined configuration keys 303s registers an offense for missing configuration keys 303s fetch 303s does not register an offense for defined configuration keys 303s registers an offense for missing configuration keys 303s with a default value 303s registers an offense for missing configuration keys 303s does not register an offense for defined configuration keys 303s 303s RuboCop::Cop::Style::TernaryParentheses 303s when configured to enforce parentheses omission 303s accepts condition including a range 303s with one line pattern matching 303s does not register an offense 303s with one line pattern matching 303s does not register an offense 303s with an assignment condition 303s accepts safe assignment as part of multiple assignment 303s accepts safe assignment 303s accepts double safe assignment 303s registers an offense for equality check 303s behaves like safe assignment disabled 303s registers an offense for parens around assignment 303s registers an offense for parens around outer assignment 303s registers an offense for parens around inner assignment 303s with a simple condition 303s registers an offense for accessor in condition 303s registers an offense for multi-line boolean expression 303s registers an offense for query method in condition 303s accepts multi-line boolean expression starting on following line 303s registers an offense for yield in condition 303s with a complex condition 303s registers an offense for boolean expression 303s registers an offense for boolean expression using keyword 303s registers an offense for defined with nested constant in condition 303s registers an offense for negated condition 303s registers an offense for defined with class method in condition 303s registers an offense for equality check 303s registers an offense for defined with method chain in condition 303s accepts parens around inner boolean expression 303s registers an offense for arithmetic expression 303s registers an offense for defined with variable in condition 303s registers an offense for query method on object 303s with no space between the parentheses and question mark 303s registers an offense 303s with an unparenthesized method call condition 303s registers an offense for defined check 303s registers an offense when calling method with a parameter 303s when calling method on a receiver 303s registers an offense 303s when calling method with multiple arguments 303s registers an offense 303s when calling method on a literal receiver 303s registers an offense 303s when calling method on a constant receiver 303s registers an offense 303s configured for parentheses on complex and there are parens 303s accepts condition including a range 303s with an assignment condition 303s accepts safe assignment as part of multiple assignment 303s accepts equality check 303s accepts accepts safe multiple assignment 303s accepts safe assignment 303s behaves like safe assignment disabled 303s registers an offense for parens around outer assignment 303s registers an offense for parens around assignment 303s registers an offense for parens around inner assignment 303s with method call condition 303s registers an offense when calling method on a receiver 303s registers an offense for defined check 303s registers an offense when calling method with a parameter 303s without accessor in method call parameters 303s registers an offense for array include? with parens 303s registers an offense for array include? without parens 303s with accessor in method call parameters 303s registers an offense for array include? without parens 303s registers an offense for array include? with multiple parameters without parens 303s registers an offense for array include? with multiple parameters with parens 303s with a complex condition 303s accepts boolean expression 303s registers an offense when calling method on a receiver 303s accepts boolean expression using keywords 303s registers an offense for defined with method chain in condition 303s registers an offense for defined with class method in condition 303s registers an offense for defined with nested constant in condition 303s registers an offense for defined with variable in condition 303s with a simple condition 303s registers an offense with preceding boolean keyword expression 303s registers an offense for accessor in condition 303s registers an offense for query method in condition 303s registers an offense for save navigation 303s registers an offense for yield in condition 303s when configured to enforce parentheses inclusion 303s with a complex condition 303s registers an offense for defined? with class method in condition 303s registers an offense for defined? with nested constant in condition 303s registers an offense for boolean expression 303s registers an offense for arithmetic condition 303s registers an offense for boolean expression containing parens 303s registers an offense for boolean expression using keyword 303s registers an offense for defined? with method chain in condition 303s registers an offense for negated condition 303s registers an offense when calling method on a receiver 303s registers an offense for defined? with variable in condition 303s registers an offense for equality check 303s with a simple condition 303s registers an offense for query method in condition 303s registers an offense for accessor in condition 303s registers an offense for yield in condition 303s with an assignment condition 303s accepts safe assignment in condition 303s registers an offense for double assignment 303s registers an offense for triple assignment 303s registers an offense for double assignment with equality check in condition 303s configured for parentheses on complex and there are no parens 303s with an assignment condition 303s accepts safe assignment 303s registers an offense for equality check 303s with complex condition 303s registers an offense for boolean expression with inner parens 303s registers an offense for arithmetic and equality check 303s registers an offense comparison with exponentiation 303s registers an offense for comparison 303s registers an offense for comparison with method call on receiver 303s registers an offense for compound boolean expression 303s registers an offense for boolean expression 303s registers an offense for addition expression 303s registers an offense for subtraction expression 303s registers an offense for comparison with multiplication 303s 303s RuboCop::Cop::Metrics::MethodLength 303s accepts a method with multiline arguments and less than 5 lines of body 303s accepts empty methods 303s does not count commented lines by default 303s does not count blank lines 303s properly counts lines when method ends with block 303s is not fooled by one-liner methods, syntax #2 304s is not fooled by one-liner methods, syntax #1 304s accepts a method with less than 5 lines 304s when CountComments is enabled 304s also counts commented lines 304s when method is defined with `define_method` 304s registers an offense 304s when method is defined on a singleton class 304s registers an offense 304s when method is a class method 304s registers an offense 304s when using numbered parameter 304s when method is defined with `define_method` 304s registers an offense 304s when methods to allow are defined 304s AllowedPatterns is enabled 304s raises offense for firstname 304s accepts the user_name method 304s AllowedMethods is enabled 304s accepts the foo method with more than 5 lines 304s still rejects other methods with more than 5 lines 304s when method is an instance method 304s registers an offense 304s when `CountAsOne` is not empty 304s folds array into one line 304s 304s isolated environment 304s is not affected by a config file above the work directory 304s 304s RuboCop::Cop::Style::ArgumentsForwarding 304s TargetRubyVersion <= 2.6 304s does not register an offense when using restarg with block arg 304s TargetRubyVersion >= 3.1 304s registers an offense when using restarg, kwargs, and anonymous block arg 304s registers an offense when using restarg and anonymous block arg 304s TargetRubyVersion >= 2.7 304s does not register an offense when the kwarg is overwritten 304s does not register an offense when referencing the restarg outside forwarding method arguments 304s does not register an offense when using the restarg outside forwarding method arguments 304s does not register an offense when using arguments forwarding 304s does not register an offense when different arguments are used 304s does not register an offense when the restarg is overwritten 304s registers an offense when passing restarg and block arg in defs 304s registers an offense when delegating 304s does not register an offense when assigning the restarg outside forwarding method arguments 304s registers an offense when using restarg, kwargs and block arg 304s does not register an offense when different argument names are used 304s does not register an offense when body of method definition is empty 304s registers an offense when the parentheses of arguments are omitted 304s registers an offense when using restarg and block arg 304s does not register an offense when the block arg is overwritten 304s registers an offense when forwarding to a method in block 304s AllowOnlyRestArgument: true 304s does not register an offense when using only kwrest arg 304s does not register an offense when using only rest arg 304s AllowOnlyRestArgument: false 304s registers an offense when using only kwrest arg 304s registers an offense when using only rest arg 304s 304s RuboCop::Cop::Style::RedundantCondition 304s when inverted condition (unless) 304s registers no offense 304s when condition and else branch are same 304s registers an offense 304s accepts complex unless branches 304s when regular condition (if) 304s accepts elsif 304s accepts different when the condition does not match the branch 304s when condition and if_branch are same 304s registers an offense and corrects when defined inside method and the branches contains assignment 304s accepts complex else branches 304s registers an offense and corrects when the else branch contains an irange 304s registers an offense and corrects 304s registers an offense and corrects when using operator method in `else` 304s registers an offense and corrects when the branches contains parenthesized method call 304s registers an offense and corrects when the branches contains method call 304s accepts an elsif branch 304s registers an offense and corrects when a method without argument parentheses in `else` 304s does not register an offense when the branches are the same with different receivers 304s does not register offenses when using `nil?` and the branches contains method which has multiple arguments 304s does not register an offense when using assignment by hash key access 304s does not register offenses when using `nil?` and the branches contains assignment 304s autocorrects when using `<<` method higher precedence than `||` operator 304s registers an offense and corrects multiline nodes 304s does not register offenses when the branches contains assignment but target not matched 304s registers an offense and corrects when `if` condition and `then` branch are the same and it has no `else` branch 304s registers an offense and corrects when the branches contains method call with non-braced hash 304s registers an offense and corrects when using modifier if 304s accepts when using ternary if in `else` branch 304s registers an offense and corrects when the branches contains method call with braced hash 304s registers an offense and correct when the branches are the same with the same receivers 304s registers an offense and corrects when the branches contains arithmetic operation 304s registers an offense and corrects when the branches contains assignment method 304s registers an offense and corrects complex one liners 304s registers an offense and corrects modifier nodes offense 304s does not register offenses when the branches contains hash key access 304s registers an offense and corrects when `raise` without argument parentheses in `else` 304s registers an offense and corrects when the branches contains assignment 304s ternary expression (?:) 304s accepts expressions when the condition and if branch do not match 304s when condition and if_branch are same 304s registers an offense and corrects with ternary expression and the branches contains parenthesized method call 304s registers an offense and corrects 304s registers an offense and corrects when the else branch contains an erange 304s registers an offense and corrects class vars 304s registers an offense and corrects when the else branch contains `rescue` 304s registers an offense and corrects when the else branch contains `and` 304s registers an offense and corrects nested vars 304s registers an offense and corrects brackets accesses 304s registers an offense and corrects functions 304s registers an offense and corrects with ternary expression and the branches contains chained parenthesized method call 304s registers an offense and corrects when the else branch contains an irange 304s 304s RuboCop::Cop::Security::Open 304s accepts open with string that has a prefixed interpolation 304s accepts File.open as method 304s accepts open on a literal string 304s registers an offense for `URI.open` with a block 304s accepts open as variable 304s registers an offense for `URI.open` with string that starts with a pipe 304s registers an offense for open 304s registers an offense for `::URI.open` with string that starts with a pipe 304s accepts open with a literal string starting with a pipe 304s registers an offense for open with a block 304s registers an offense for open with string that starts with a pipe 304s accepts open with prefix string literal plus something 304s registers an offense for open with dynamic string that is not prefixed 304s accepts open with a string that interpolates a literal 304s registers an offense for open with mode argument 304s accepts open with no arguments 304s 304s RuboCop::StringInterpreter 304s .interpret 304s handles unicode 304s handles extended unicode 304s handles octal 304s handles hex 304s behaves like simple escape 304s handles \\v 304s behaves like simple escape 304s handles \\s 304s behaves like simple escape 304s handles \\f 304s behaves like simple escape 304s handles \\a 304s behaves like simple escape 304s handles \\n 304s behaves like simple escape 304s handles \\e 304s behaves like simple escape 304s handles \\b 304s behaves like simple escape 304s handles \\t 304s behaves like simple escape 304s handles \\r 304s 304s RuboCop::Cop::Style::ArrayJoin 304s does not register an offense for numbers 304s autocorrects '*' to 'join' when setting to a variable 304s registers an offense for an array followed by string 304s autocorrects '*' to 'join' when there are no spaces 304s does not register an offense for ambiguous cases 304s 304s RuboCop::Cop::Style::RedundantConditional 304s registers an offense for if/elsif/else with boolean results 304s registers an offense for ternary with negated boolean results 304s registers an offense for if/else with boolean results 304s allows ternary with non-boolean results 304s does not register an offense for if/elsif/else with non-boolean results 304s registers an offense for ternary with boolean results 304s registers an offense for if/else with negated boolean results 304s does not register an offense for if/else with non-boolean results 304s registers an offense for if/elsif/else with negated boolean results 304s 304s RuboCop::Cop::Lint::TrailingCommaInAttributeDeclaration 304s does not register an offense when not using trailing comma 304s registers an offense when using trailing comma 304s 304s RuboCop::Cop::Style::PercentQLiterals 304s when EnforcedStyle is upper_case_q 304s with interpolation 304s accepts double quotes 304s accepts single quotes 304s accepts %q 304s accepts %Q 304s without interpolation 304s registers offense for %q 304s accepts double quotes 304s accepts single quotes 304s accepts %Q 304s with special characters 304s accepts %q 304s accepts %Q 304s when EnforcedStyle is lower_case_q 304s with interpolation 304s accepts %q 304s accepts single quotes 304s accepts %Q 304s accepts double quotes 304s without interpolation 304s registers offense for %Q 304s accepts double quotes 304s accepts single quotes 304s accepts %q 304s with special characters 304s accepts %q 304s accepts %Q 304s 304s RuboCop::Cop::Layout::MultilineArrayLineBreaks 304s when nested arrays 304s registers an offense and corrects 304s when on same line 304s does not add any offenses 304s when two elements on same line 304s registers an offense and corrects 304s when on same line, separate line from brackets 304s does not add any offenses 304s 304s RuboCop::Cop::Gemspec::RubyVersionGlobalsUsage 304s registers an offense when using `::RUBY_VERSION` 304s does not register an offense when no `RUBY_VERSION` 304s registers an offense when using `RUBY_VERSION` 304s 304s RuboCop::Cop::Style::CommentedKeyword 304s checks a long comment in less than one second 304s registers an offense and corrects when commenting on the same line as `def` 304s accepts keyword letter sequences that are not keywords 304s does not register an offense if AST contains # symbol 304s registers an offense and corrects when commenting on the same line as `begin` 304s registers an offense and corrects when commenting after keyword with spaces 304s registers an offense and corrects for one-line cases 304s does not register an offense for certain comments 304s registers an offense and corrects when commenting on the same line as `end` 304s registers an offense and corrects when commenting on indented keywords 304s registers an offense and corrects when commenting on the same line as `module` 304s registers an offense and corrects when commenting on the same line as `class` 304s does not register an offense if there are no comments after keywords 304s 304s RuboCop::Cop::Style::MultilineTernaryOperator 304s registers an offense and corrects when condition is multiline and using hash key assignment 304s register an offense and corrects when returning a multiline ternary operator expression with `return` 304s register an offense and corrects when returning a multiline ternary operator expression with `break` 304s accepts a single line ternary operator expression 304s registers an offense and corrects when everything is on a separate line 304s register an offense and corrects when returning a multiline ternary operator expression with `next` 304s registers an offense and corrects when the false branch is on a separate line and assigning a return value 304s registers an offense and corrects when the false branch is on a separate line 304s registers an offense and corrects when condition is multiline 304s registers offense and corrects when the if branch and the else branch are on a separate line from the condition 304s register an offense and corrects when returning a multiline ternary operator expression with method call 304s registers an offense and corrects when condition is multiline and using assignment method 304s 304s RuboCop::Cop::Style::RaiseArgs 304s when enforced style is exploded 304s accepts a raise with `new` method without receiver 304s accepts a raise with 2 args 304s accepts a raise with msg argument 304s accepts exception constructor with keyword arguments 304s accepts a raise when exception object is assigned to a local variable 304s accepts a raise with splatted arguments 304s accepts exception constructor with more than 1 argument 304s ignores a raise with an exception argument 304s accepts a raise with 3 args 304s with a raise with exception object 304s with one argument 304s reports an offense 304s when used in a logical or expression 304s registers an offense and autocorrects 304s with no arguments 304s reports an offense 304s when used in a ternary expression 304s registers an offense and autocorrects 304s when used in a logical and expression 304s registers an offense and autocorrects 304s when exception type is in AllowedCompactTypes 304s accepts exception constructor with no arguments 304s with more than one argument 304s accepts exception constructor 304s with one argument 304s accepts exception constructor 304s when an exception object is assigned to a local variable 304s autocorrects to exploded style 304s with opposite + correct 304s reports an offense for opposite + correct 304s reports multiple offenses 304s when enforced style is compact 304s accepts a raise with msg argument 304s accepts a raise with an exception argument 304s accepts exception constructor with keyword arguments and message argument 304s with a raise with exception instantiation and message arguments 304s reports an offense 304s when used in a ternary expression 304s registers an offense and autocorrects 304s when used in a logical and expression 304s registers an offense and autocorrects 304s with correct + opposite 304s reports multiple offenses 304s reports an offense 304s with a raise with 2 args and exception object is assigned to a local variable 304s reports an offense 304s when used in a logical or expression 304s registers an offense and autocorrects 304s with a raise with 2 args 304s reports an offense 304s with a raise with 3 args 304s reports an offense 304s 304s RuboCop::Cop::Lint::UselessTimes 304s registers an offense and corrects with 1.times with block arg 304s registers an offense and corrects with negative times with block arg 304s registers an offense and corrects when 1.times with empty block argument 304s registers an offense and corrects with 0.times with block arg 304s does not register an offense for an integer > 1 304s registers an offense and corrects with 1.times with method chain 304s registers an offense and corrects with 1.times 304s registers an offense and corrects with negative times 304s registers an offense and corrects when there is a blank line in the method definition 304s registers an offense and corrects with 0.times 304s short-form method 304s registers an offense and corrects with 1.times 304s registers an offense and corrects with negative times 304s does not adjust surrounding space 304s registers an offense and corrects with 0.times 304s does not register an offense for an integer > 1 304s within indentation 304s corrects properly when removing single line 304s corrects properly when replacing 304s corrects properly when removing multiline 304s inline `Integer#times` calls 304s does not try to correct `1.times` 304s does not try to correct `0.times` 304s multiline block 304s does not try to correct a block if the block arg is changed in parallel assignment 304s correctly handles a multiline block with 1.times 304s does not try to correct a block if the block arg is changed 304s corrects a block that changes another lvar 304s 304s RuboCop::Cop::Lint::OrderedMagicComments 304s registers an offense and corrects when using `frozen_string_literal` magic comment is next of shebang 304s registers an offense and corrects when `coding` magic comment does not precede all other magic comments 304s registers an offense and corrects when an `encoding` magic comment does not precede all other magic comments 304s does not register an offense when using `frozen_string_literal` magic comment only 304s registers an offense and corrects when `-*- encoding : ascii-8bit -*-` magic comment does not precede all other magic comments 304s does not register an offense when using `encoding: Encoding::SJIS` Hash notation after`frozen_string_literal` magic comment 304s does not register an offense when using `encoding` magic comment is first line 304s does not register an offense when using `encoding` magic comment is next of shebang 304s does not register an offense when using `encoding` magic comment only 304s 304s RuboCop::Cop::Lint::DuplicateRescueException 304s registers an offense when duplicate exception exists within rescues with `else` branch 304s registers an offense when duplicate exception splat exists 304s registers an offense when multiple duplicate exceptions exist 304s registers an offense when duplicate exception exists within rescues with empty `rescue` branch 304s registers an offense when duplicate exception exists 304s does not register an offense when there are no duplicate exceptions 304s 304s RuboCop::Cop::Lint::EmptyExpression 304s when used as an assignment 304s registers an offense for the assigned value 304s when used as a standalone expression 304s registers an offense 304s with nested empty expressions 304s registers an offense 304s when used in a condition 304s registers an offense inside `when` 304s registers an offense in the condition of a ternary operator 304s registers an offense inside `case` 304s registers an offense inside `elsif` 304s registers an offense in the return value of a ternary operator 304s registers an offense inside `if` 304s when used as a return value 305s registers an offense in the return value of a condition 305s registers an offense in the return value of a case statement 305s registers an offense in the return value of a method 305s 305s RuboCop::Cop::Lint::ConstantDefinitionInBlock 305s does not register an offense for a top-level constant 305s does not register an offense for a constant with an explicit self scope 305s does not register an offense for a top-level class followed by another statement 305s does not register an offense for a top-level class 305s does not register an offense for a constant with an explicit top-level scope 305s does not register an offense for a top-level constant followed by another statement 305s registers an offense for a module defined within a block followed by another statement 305s registers an offense for a class defined within a block followed by another statement 305s does not register an offense for a constant with an explicit top-level scope followed by another statement 305s registers an offense for a class defined within a block 305s registers an offense for a constant defined within a block 305s registers an offense for a module defined within a block 305s does not register an offense for a constant with an explicit self scope followed by another statement 305s does not register an offense for a top-level module followed by another statement 305s registers an offense for a constant defined within a block followed by another statement 305s does not register an offense for a top-level module 305s when `AllowedMethods: []` 305s registers an offense for a module defined within a block of `enums` method 305s registers an offense for a casign used within a block of `enums` method 305s registers an offense for a class defined within a block of `enums` method 305s when `AllowedMethods: [enums]` 305s does not register an offense for a module defined within a block of `enums` method 305s does not register an offense for a casign used within a block of `enums` method 305s does not register an offense for a class defined within a block of `enums` method 305s 305s RuboCop::Cop::Style::RegexpLiteral 305s when PercentLiteralDelimiters is configured with slashes 305s respects the configuration when autocorrecting 305s when EnforcedStyle is set to percent_r 305s a single-line %r regex without slashes 305s is accepted 305s a single-line `//` regex with slashes 305s registers an offense 305s a multi-line %r regex without slashes 305s is accepted 305s a multi-line `//` regex with slashes 305s registers an offense 305s a multi-line %r regex with slashes 305s is accepted 305s a single-line %r regex with slashes 305s is accepted 305s a single-line `//` regex without slashes 305s registers an offense 305s a multi-line `//` regex without slashes 305s registers an offense 305s when PercentLiteralDelimiters is configured with brackets 305s respects the configuration when autocorrecting 305s when `EnforcedStyle: require_parentheses` of `Style/MethodCallWithArgsParentheses` cop 305s when using `%r` regexp with `EnforcedStyle: mixed` 305s registers an offense when using a regexp starts with a blank 305s does not register an offense when using a regexp starts with a blank as a safe navigation method argument 305s registers an offense when used as a safe navigation method argument 305s registers an offense when not used as a method argument 305s registers an offense when used as a method argument 305s does not register an offense when using a regexp starts with a blank as a method argument 305s when using `%r` regexp with `EnforcedStyle: slashes` 305s registers an offense when not used as a method argument 305s does not register an offense when using a regexp starts with a blank as a method argument 305s registers an offense when used as a method argument 305s does not register an offense when using a regexp starts with a blank as a safe navigation method argument 305s registers an offense when using a regexp starts with a blank 305s registers an offense when used as a safe navigation method argument 305s %r regex with other delimiters than curly braces 305s registers an offense 305s when `EnforcedStyle: omit_parentheses` of `Style/MethodCallWithArgsParentheses` cop 305s when using `%r` regexp with `EnforcedStyle: slashes` 305s registers an offense when not used as a method argument 305s does not register an offense when used as a safe navigation method argument 305s does not register an offense when used as a method argument 305s when using `%r` regexp with `EnforcedStyle: mixed` 305s registers an offense when not used as a method argument 305s does not register an offense when used as a method argument 305s does not register an offense when used as a safe navigation method argument 305s when EnforcedStyle is set to mixed 305s a multi-line %r regex with slashes 305s is accepted 305s a single-line %r regex with slashes 305s is accepted 305s when configured to allow inner slashes 305s registers an offense 305s a multi-line `//` regex without slashes 305s registers an offense 305s a multi-line `//` regex with slashes 305s registers an offense 305s a multi-line %r regex without slashes 305s is accepted 305s a single-line `//` regex with slashes 305s registers an offense 305s when configured to allow inner slashes 305s is accepted 305s a single-line %r regex without slashes 305s registers an offense 305s a single-line `//` regex without slashes 305s is accepted 305s when EnforcedStyle is set to slashes 305s a single-line %r regex without slashes 305s registers an offense 305s a single-line `//` regex with slashes 305s registers an offense 305s when configured to allow inner slashes 305s is accepted 305s a multi-line `//` regex without slashes 305s is accepted 305s a single-line `//` regex without slashes 305s is accepted 305s a single-line `%r//` regex with slashes 305s is accepted 305s when configured to allow inner slashes 305s preserves slashes after autocorrection 305s a single-line `//` regex with slashes and interpolation 305s registers an offense 305s when configured to allow inner slashes 305s is accepted 305s a single-line %r regex with slashes 305s is accepted 305s when configured to allow inner slashes 305s registers an offense 305s a multi-line `//` regex with slashes 305s registers an offense 305s when configured to allow inner slashes 305s is accepted 305s a multi-line %r regex without slashes 305s registers an offense 305s a multi-line %r regex with slashes 305s is accepted 305s when configured to allow inner slashes 305s registers an offense 305s when regex contains slashes in interpolation 305s ignores the slashes that do not belong // regex 305s 305s RuboCop::Cop::Layout::MultilineHashBraceLayout 305s ignores empty hashes 305s ignores implicit hashes 305s ignores single-line hashes 305s behaves like multiline literal brace layout 305s same_line style 305s opening brace on same line as first element 305s allows closing brace on same line from last element 305s detects closing brace on different line from multiline element 305s allows closing brace on same line as multi-line element 305s autocorrects closing brace on different line as last element 305s with a chained call on the closing brace 305s and a comment after the last element 305s detects closing brace on separate line from last elementbut does not autocorrect the closing brace 305s but no comment after the last element 305s autocorrects the closing brace 305s opening brace on separate line from first element 305s allows closing brace on same line as last element 305s allows closing brace on same line as last multiline element 305s detects closing brace on different line from last element 305s symmetrical style 305s opening brace on separate line from first element 305s allows closing brace on separate line from last element 305s detects closing brace on same line as last element 305s allows closing brace on separate line from last multiline element 305s opening brace on same line as first element 305s allows closing brace on same line as last multiline element 305s detects closing brace on different line from last element 305s allows closing brace on same line as last element 305s autocorrects closing brace on different line from last element 305s with a chained call on the closing brace 305s but no comment after the last element 305s autocorrects the closing brace 305s and a comment after the last element 305s detects closing brace on separate line from last elementbut does not autocorrect the closing brace 305s new_line style 305s opening brace on same line as first element 305s detects closing brace on same line as last multiline element 305s allows closing brace on different line from multi-line element 305s allows closing brace on different line from last element 305s autocorrects closing brace on same line as last element 305s opening brace on separate line from first element 305s allows closing brace on separate line from last element 305s detects closing brace on same line as last element 305s allows closing brace on separate line from last multiline element 305s heredoc 305s ignores heredocs that could share a last line 305s detects heredoc structures that are safe to add to 305s behaves like multiline literal brace layout trailing comma 305s same_line style 305s opening brace on same line as first element 305s last element has a trailing comma 305s autocorrects closing brace on different line as last element 305s symmetrical style 305s opening brace on same line as first element 305s last element has a trailing comma 305s autocorrects closing brace on different line from last element 305s behaves like multiline literal brace layout method argument 305s when arguments to a method 305s and a comment after the last element 305s detects closing brace on separate line from last element 305s but no comment after the last element 305s autocorrects the closing brace 305s 305s RuboCop::Cop::Style::TrailingBodyOnClass 305s accepts class inheritance 305s autocorrects with comment after body 305s accepts regular class 305s registers offense with multi-line class 305s registers an offense when body trails after class definition 305s when class is not on first line of processed_source 305s autocorrect offense 305s 305s RuboCop::Cop::Style::NegatedUnless 305s does not blow up on a negated ternary operator 305s does not blow up for empty if condition 305s does not blow up for ternary ops 305s does not blow up for empty unless condition 305s with “both” style 305s accepts an unless where only part of the condition is negated 305s registers an offense for unless with "not" condition 305s accepts an unless where the condition is doubly negated 305s accepts an unless/else with negative condition 305s autocorrects by replacing parenthesized unless not with if 305s registers an offense for unless with exclamation point condition 305s with “postfix” style 305s does not register an offense for prefix 305s registers an offense for postfix 305s with “prefix” style 305s registers an offense for prefix 305s does not register an offense for postfix 305s 305s RuboCop::Cop::Lint::ReturnInVoidContext 305s with a setter method containing a return without a value 305s accepts 305s with a setter method containing a return with a value 305s registers an offense 305s with an initialize method containing a return with a value 305s registers an offense 305s with an initialize method containing a return without a value 305s accepts 305s with a class method called initialize containing a return 305s accepts 305s when return is in top scope 305s accepts 305s with a non initialize method containing a return 305s accepts 305s 305s RuboCop::Cop::Lint::DeprecatedOpenSSLConstant 305s does not register an offense when building digest using an algorithm string 305s does not register an offense with cipher constant and argument is a constant 305s registers an offense with cipher constant and no arguments and corrects 305s registers an offense with cipher constant and `cbc` argument and corrects 305s registers an offense with cipher constant and double quoted string argument and corrects 305s registers an offense with cipher constant and no arguments and corrects 305s does not register an offense with cipher constant and argument is a variable 305s registers an offense with cipher constant and no arguments and corrects 305s does not register an offense with cipher constant and send argument is a method 305s registers an offense with AES + blocksize constant and corrects 305s registers an offense with cipher constant and two arguments and corrects 305s does not register an offense when using cipher with a string 305s does not register an offense when building digest using an algorithm string and nested digest constants 305s registers an offense with AES + blocksize constant and mode argument and corrects 305s does not register an offense when using ::Digest class methods with an algorithm string and value 305s registers an offense with cipher constant and no arguments and corrects 305s registers an offense when building an instance using an digest constant and corrects 305s registers an offense when using ::Digest class methods on an algorithm constant and corrects 305s registers an offense with cipher constant and one argument and corrects 305s registers an offense when using an digest constant with chained methods and corrects 305s when used in a block 305s registers an offense when using ::Digest class methods on an algorithm constant and corrects 305s 305s RuboCop::Cop::Layout::SpaceAroundEqualsInParameterDefault 305s when EnforcedStyle is space 305s registers an offense and corrects missing space for arguments with unary operators 305s accepts default value assignment with space 305s registers an offense and corrects assignment of empty list without space 305s registers an offense and corrects assigning empty string without space 305s registers an offense and corrects default value assignment where first is partially right without space 305s accepts default value assignment with spaces and unary + operator 305s registers an offense and corrects default value assignment without space 305s when EnforcedStyle is no_space 305s registers an offense and corrects assignment of empty string with space 305s registers an offense and corrects default value assignment with space 305s registers an offense and corrects assignment of empty list with space 305s accepts default value assignment without space 305s 305s RuboCop::Cop::Style::StringHashKeys 305s does not register an offense when string key is used in Open3.capture3 305s registers an offense when using strings as keys mixed with other keys 305s does not register an offense when string key is used in Open3.pipeline 305s autocorrects strings as keys into symbols with the correct syntax 305s does not register an offense when not using strings as keys 305s does not register an offense when string key is used in gsub! 305s registers an offense when using strings as keys 305s does not register an offense when string key is used in gsub 305s does not register an offense when string key is used in IO.popen 305s 305s RuboCop::Cop::Naming::BinaryOperatorParameterName 305s registers an offense and corrects when assigned to argument in method body 305s does not register an offense for << 305s does not register an offense for [] 305s does not register an offense for arg named other 305s registers an offense and corrects for `#eql?` when argument is not named other 305s works properly even if the argument not surrounded with braces 305s does not register an offense for multibyte character method name 305s does not register an offense for the match operator 305s registers an offense and corrects for `#+` when argument is not named other 305s registers an offense and corrects when argument is referenced in method body 305s does not register an offense for === 305s registers an offense and corrects for `#equal?` when argument is not named other 305s does not register an offense for arg named _other 305s does not register an offense for non binary operators 305s does not register an offense for []= 305s 305s RuboCop::Cop::Lint::AmbiguousOperatorPrecedence 305s registers an offense when an expression with mixed boolean operators has no parens 305s does not register an offense when there is only one operator in the expression 305s corrects a super long expression in reverse precedence order 305s does not register an offense when expressions are wrapped in parentheses by precedence 305s allows an operator with `and` 305s does not register an offense when boolean expressions are wrapped in parens 305s does not register an offense when expressions are wrapped in parentheses by reverse precedence 305s registers an offense when an expression with mixed precedence has no parens 305s registers an offense when the entire expression is wrapped in parentheses 305s registers an offense for expressions containing booleans and operators 305s allows an operator with `or` 305s does not register an offense when all operators in the expression have the same precedence 305s corrects a super long expression in precedence order 305s 305s RuboCop::Cop::Style::IfInsideElse 305s ignores unless inside else 305s ignores if inside unless 305s catches an `if..else` nested inside an `else` and nested inside `if` branch code is empty 305s handles a nested `if...then...elsif...else...end` 305s isn't offended if there is a statement preceding the if node 305s handles a nested `if...then...end` 305s isn't offended by if..elsif..else 305s catches an if..elsif..else nested inside an else 305s ignores nested ternary expressions 305s isn't offended if there is a statement following the if node 305s handles a nested `if...then...else...end` 305s handles a nested multiline `if...then...elsif...else...end` 305s handles a nested `if...then...elsif...end` 305s catches an if node nested inside an else 305s catches a modifier if nested inside an else after elsif 305s catches an if..else nested inside an else 305s ignores ternary inside if..else 305s when AllowIfModifier is false 305s catches a modifier if nested inside an else 305s when AllowIfModifier is true 306s accepts a modifier if nested inside an else 306s 306s RuboCop::Cop::Style::EmptyLiteral 306s Empty Array 306s registers an offense for Array.new 306s autocorrects Array.new in block in block 306s registers an offense for ::Array.new 306s does not register an offense for ::Array.new with block 306s registers an offense for Array.new() 306s does not register Array.new with block in other block 306s does not register an offense for Array.new(3) 306s does not register an offense Array.new with block 306s Empty String 306s registers an offense for String.new 306s registers an offense for String.new() 306s does not register an offense for String.new("top") 306s registers an offense for ::String.new 306s does not register an offense for ::String.new("top") 306s when Style/FrozenStringLiteral is enabled 306s and there is a frozen_string_literal: false comment 306s registers an offense and corrects 306s and there is no magic comment 306s does not register an offense 306s when double-quoted string literals are preferred 306s registers an offense for String.new 306s registers an offense for ::String.new 306s when frozen string literals is enabled 306s does not register an offense for String.new 306s Empty Hash 306s does not register an offense for Hash.new { block } 306s does not register an offense for ::Hash.new(3) 306s autocorrects Hash.new to {} as the only parameter to a method 306s does not register an offense for ::Hash.new { block } 306s autocorrects Hash.new to {} as the first parameter to a method 306s registers an offense for ::Hash.new 306s autocorrects Hash.new in block 306s autocorrects Hash.new to {} and wraps it in parentheses when it is the only argument to super 306s registers an offense for Hash.new() 306s autocorrects Hash.new to {} in various contexts 306s registers an offense for Hash.new 306s does not register an offense for Hash.new(3) 306s autocorrects Hash.new to {} and wraps all arguments in parentheses when it is the first argument to super 306s Ruby 2.7 306s does not register an offense for Hash.new { _1[_2] = [] } 306s does not register an offense for ::Hash.new { _1[_2] = [] } 306s 306s RuboCop::CommentConfig 306s #extra_enabled_comments 306s has keys as instances of Parser::Source::Comment for extra enabled comments 306s has values as arrays of extra enabled cops 306s comment_only_line? 306s when line contains only code 306s returns false 306s returns false 306s returns false 306s returns false 306s when line is empty 306s returns true 306s when line contains code and comment 306s returns false 306s when line contains only comment 306s returns true 306s returns true 306s #cop_enabled_at_line? 306s just ignores unpaired enabling directives 306s can handle double disable of one cop 306s supports disabling cops with multiple levels in department name 306s supports disabling multiple lines with a pair of directive 306s supports disabling cops with multiple uppercase letters 306s supports disabling cops with numbers in their name 306s supports disabling cops on a comment line with an EOL comment 306s supports enabling/disabling cops without a prefix 306s supports disabling single line with a directive at end of line 306s does not confuse a comment directive embedded in a string literal with a real comment 306s supports enabling/disabling multiple cops along with a comment 306s supports disabling all lines after a directive 306s does not confuse a cop name including "all" with all cops 306s handles indented single line 307s supports disabling all cops except Lint/RedundantCopDisableDirective with keyword all 307s supports enabling/disabling multiple cops in a single directive 307s #cop_disabled_line_ranges 307s collects line ranges by disabled cops 307s 307s RuboCop::Cop::Layout::EmptyLinesAroundAttributeAccessor 307s accepts code that where the attr_accessor is the last line 307s does not register an offense and corrects when using `if` ... `else` branches 307s registers an offense and corrects for code that immediately follows accessor 307s registers an offense and corrects for an attribute accessor and comment line 307s accepts code when attribute method is method chained 307s accepts code when used in class definition 307s accepts code that separates attribute accessors from the code and comment line with a newline 307s registers an offense and corrects for code that immediately follows accessor with comment 307s accepts code that separates an attribute accessor from the code with a newline 307s accepts code that separates an attribute accessor from the code and `rubocop:enable` comment line with a newline 307s registers an offense and corrects for an attribute accessor and some comment line 307s registers an offense and corrects for an attribute accessor and `rubocop:disable` comment line 307s registers an offense and corrects for an attribute accessor and `rubocop:enable` comment line 307s registers an offense and corrects for some attribute accessors and comment line 307s registers an offense and corrects for an attribute accessor and `rubocop:enable` comment line and other comment 307s accepts code that separates attribute accessors from the code with a newline 307s when `AllowedMethods: []` 307s registers an offense for code that immediately ignored methods after accessor 307s when `AllowAliasSyntax: true` 307s does not register an offense for code that immediately `alias` syntax after accessor 307s when `AllowAliasSyntax: false` 307s registers an offense for code that immediately `alias` syntax after accessor 307s when `AllowedMethods: private` 307s does not register an offense for code that immediately ignored methods after accessor 307s 307s RuboCop::Cop::Style::DisableCopsWithinSourceCodeDirective 307s registers an offense for enabled cop within source code 307s registers an offense for disabled cop within source code 307s registers an offense for disabling all cops 307s with AllowedCops 307s when an non-allowed cop is disabled 307s registers an offense and corrects 307s when an allowed cop is disabled 307s does not register an offense 307s when using leading source comment 307s does not register an offense 307s when an mix of cops are disabled 307s registers an offense and corrects 307s 307s RuboCop::Cop::Naming::HeredocDelimiterCase 307s when enforced style is lowercase 307s with an interpolated heredoc 307s registers an offense and corrects with an uppercase delimiter 307s does not register an offense with a lowercase delimiter 307s registers an offense and corrects with a camel case delimiter 307s with a non-interpolated heredoc 307s does not register an offense with a lowercase delimiter 307s registers an offense and corrects with an uppercase delimiter 307s registers an offense and corrects with a camel case delimiter 307s with a squiggly heredoc 307s registers an offense and corrects with a camel case delimiter 307s registers an offense and corrects with an uppercase delimiter 307s does not register an offense with a lowercase delimiter 307s when enforced style is uppercase 307s with an interpolated heredoc 307s registers an offense and corrects with a lowercase delimiter 307s does not register an offense with an uppercase delimiter 307s registers an offense with a camel case delimiter 307s with a squiggly heredoc 307s registers an offense and corrects with a lowercase delimiter 307s registers an offense and corrects with a camel case delimiter 307s does not register an offense with an uppercase delimiter 307s with a non-interpolated heredoc 307s when using back tick delimiters 307s registers an offense and corrects with a camel case delimiter 307s registers an offense and corrects with a lowercase delimiter 307s does not register an offense with an uppercase delimiter 307s when using single quoted delimiters 307s registers an offense and corrects with a lowercase delimiter 307s does not register an offense with an uppercase delimiter 307s registers an offense and corrects with a camel case delimiter 307s when using non-word delimiters 307s does not register an offense 307s when using double quoted delimiters 307s registers an offense and corrects with a camel case delimiter 307s registers an offense and corrects with a lowercase delimiter 307s does not register an offense with an uppercase delimiter 307s 307s RuboCop::Cop::Style::MutableConstant 307s Strict: true 307s allows calls to freeze 307s freezes a heredoc 307s behaves like immutable objects 307s allows Struct.new to be ||= to a constant 307s allows Struct.new to be assigned to a constant 307s behaves like immutable objects 307s allows ::Namespace::OTHER_CONST to be ||= to a constant 307s allows ::Namespace::OTHER_CONST to be assigned to a constant 307s behaves like immutable objects 307s allows ENV['foo'] to be assigned to a constant 307s allows ENV['foo'] to be ||= to a constant 307s when assigning with an operator 307s behaves like operator methods 307s registers an offense and corrects with parens and freeze 307s behaves like operator methods 307s registers an offense and corrects with parens and freeze 307s behaves like operator methods 307s registers an offense and corrects with parens and freeze 307s behaves like operator methods 307s registers an offense and corrects with parens and freeze 307s behaves like operator methods 307s registers an offense and corrects with parens and freeze 307s behaves like operator methods 307s registers an offense and corrects with parens and freeze 307s when assigning with multiple operator calls 307s registers an offense and corrects with parens and freeze 307s behaves like immutable objects 307s allows ::ENV['foo'] to be ||= to a constant 307s allows ::ENV['foo'] to be assigned to a constant 307s behaves like mutable objects 307s when assigning with ||= 307s registers an offense for Something.new assigned to a constant and corrects by adding .freeze 307s when assigning with = 307s registers an offense for Something.new assigned to a constant and corrects by adding .freeze 307s behaves like immutable objects 307s allows :sym to be ||= to a constant 307s allows :sym to be assigned to a constant 307s when assigning an array without brackets 307s adds brackets when autocorrecting 307s does not insert brackets for %w() arrays 307s behaves like immutable objects 307s allows Struct.new(:node) do 307s def assignment? 307s true 307s end 307s end 307s to be ||= to a constant 307s allows Struct.new(:node) do 307s def assignment? 307s true 307s end 307s end 307s to be assigned to a constant 307s behaves like immutable objects 307s allows 1.5 to be assigned to a constant 307s allows 1.5 to be ||= to a constant 307s behaves like mutable objects 307s when assigning with = 307s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 307s when assigning with ||= 307s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 307s behaves like immutable objects 307s allows 1 to be ||= to a constant 307s allows 1 to be assigned to a constant 307s behaves like immutable objects 307s allows OTHER_CONST to be assigned to a constant 307s allows OTHER_CONST to be ||= to a constant 307s behaves like immutable objects 307s allows Namespace::OTHER_CONST to be ||= to a constant 307s allows Namespace::OTHER_CONST to be assigned to a constant 307s behaves like immutable objects 307s allows ::OTHER_CONST to be ||= to a constant 307s allows ::OTHER_CONST to be assigned to a constant 307s splat expansion 307s expansion of a range 307s registers an offense and corrects to use to_a.freeze 307s with parentheses 307s registers an offense and corrects to use to_a.freeze 307s behaves like mutable objects 307s when assigning with ||= 307s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 307s when assigning with = 307s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 307s behaves like immutable objects 307s allows ::Struct.new to be assigned to a constant 307s allows ::Struct.new to be ||= to a constant 307s behaves like mutable objects 307s when assigning with ||= 307s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 307s when assigning with = 307s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 307s behaves like mutable objects 307s when assigning with = 307s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 307s when assigning with ||= 307s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 307s operators that produce unfrozen objects 307s registers an offense when operating on multiple strings 307s registers an offense when operating on a constant and a string 307s behaves like immutable objects 307s allows Struct.new(:a, :b) to be assigned to a constant 307s allows Struct.new(:a, :b) to be ||= to a constant 307s behaves like string literal 307s Ruby 3.0 or higher 307s when the frozen string literal comment is true 307s registers an offense when using a multiline string with interpolation 308s registers an offense when using interpolated heredoc constant 308s does not register an offense when using a multiline string 308s behaves like mutable objects 308s when assigning with = 308s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 308s when assigning with ||= 308s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 308s behaves like immutable objects 308s allows <<~HERE 308s foo 308s bar 308s HERE 308s to be ||= to a constant 308s allows <<~HERE 308s foo 308s bar 308s HERE 308s to be assigned to a constant 308s when the frozen string literal comment is missing 308s behaves like mutable objects 308s when assigning with = 308s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 308s when assigning with ||= 308s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 308s when the frozen string literal comment is false 308s behaves like mutable objects 308s when assigning with ||= 308s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 308s when assigning with = 308s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 308s Ruby 2.7 or lower 308s when the frozen string literal comment is false 308s behaves like mutable objects 308s when assigning with = 308s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 308s when assigning with ||= 308s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 308s when the frozen string literal comment is missing 308s behaves like mutable objects 308s when assigning with = 308s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 308s when assigning with ||= 308s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 308s when the frozen string literal comment is true 308s does not register an offense when using a multiline string 308s does not register an offense when using interpolated heredoc constant 308s behaves like immutable objects 308s allows "#{a}" to be ||= to a constant 308s allows "#{a}" to be assigned to a constant 308s behaves like immutable objects 308s allows <<~HERE 308s foo 308s bar 308s HERE 308s to be assigned to a constant 308s allows <<~HERE 308s foo 308s bar 308s HERE 308s to be ||= to a constant 308s behaves like mutable objects 308s when assigning with ||= 308s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 308s when assigning with = 308s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 308s methods and operators that produce frozen objects 308s accepts comparison operators 308s accepts operating on a constant and an interger 308s accepts operating on a constant and a float 308s accepts checking fixed size 308s accepts assigning to an environment variable with a fallback 308s accepts operating on multiple integers 308s accepts operating on multiple floats 308s Strict: false 308s allows method call assignments 308s behaves like mutable objects 308s when assigning with ||= 308s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 308s when assigning with = 308s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 308s behaves like immutable objects 308s allows 1 to be assigned to a constant 308s allows 1 to be ||= to a constant 308s behaves like mutable objects 308s when assigning with ||= 308s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 308s when assigning with = 308s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 308s behaves like immutable objects 308s allows 1.5 to be assigned to a constant 308s allows 1.5 to be ||= to a constant 308s behaves like mutable objects 308s when assigning with = 308s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 308s when assigning with ||= 308s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 308s behaves like immutable objects 308s allows FOO + BAR to be ||= to a constant 308s allows FOO + BAR to be assigned to a constant 308s behaves like immutable objects 308s allows ENV['foo'] to be ||= to a constant 308s allows ENV['foo'] to be assigned to a constant 308s behaves like immutable objects 308s allows FOO - BAR to be assigned to a constant 308s allows FOO - BAR to be ||= to a constant 308s behaves like mutable objects 308s when assigning with = 308s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 308s when assigning with ||= 308s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 308s splat expansion 308s expansion of a range 308s registers an offense and corrects to use to_a.freeze 308s with parentheses 308s registers an offense and corrects to use to_a.freeze 308s behaves like string literal 308s Ruby 3.0 or higher 308s when the frozen string literal comment is missing 308s behaves like mutable objects 308s when assigning with ||= 308s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 308s when assigning with = 308s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 308s when the frozen string literal comment is true 308s registers an offense when using interpolated heredoc constant 308s registers an offense when using a multiline string with interpolation 308s does not register an offense when using a multiline string 308s behaves like immutable objects 308s allows <<~HERE 308s foo 308s bar 308s HERE 308s to be assigned to a constant 308s allows <<~HERE 308s foo 308s bar 308s HERE 308s to be ||= to a constant 308s behaves like mutable objects 308s when assigning with = 308s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 308s when assigning with ||= 308s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 308s when the frozen string literal comment is false 308s behaves like mutable objects 308s when assigning with = 308s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 308s when assigning with ||= 308s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 308s Ruby 2.7 or lower 308s when the frozen string literal comment is false 308s behaves like mutable objects 308s when assigning with ||= 308s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 308s when assigning with = 308s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 308s when the frozen string literal comment is missing 308s behaves like mutable objects 308s when assigning with ||= 308s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 308s when assigning with = 308s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 308s when the frozen string literal comment is true 308s does not register an offense when using interpolated heredoc constant 308s does not register an offense when using a multiline string 308s behaves like immutable objects 308s allows <<~HERE 308s foo 308s bar 308s HERE 308s to be assigned to a constant 308s allows <<~HERE 308s foo 308s bar 308s HERE 308s to be ||= to a constant 308s behaves like immutable objects 308s allows "#{a}" to be assigned to a constant 308s allows "#{a}" to be ||= to a constant 308s Ruby 2.7 or lower 308s when assigning a regexp 308s registers an offense 308s when assigning a range (irange) without parenthesis 308s adds parentheses when autocorrecting 308s does not insert parenthesis to range enclosed in parentheses 308s when assigning a range (erange) without parenthesis 308s adds parentheses when autocorrecting 308s does not insert parenthesis to range enclosed in parentheses 308s when using shareable_constant_values 308s behaves like literals that are not frozen 308s behaves like mutable objects 308s when assigning with ||= 308s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 308s when assigning with = 308s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 308s behaves like immutable objects 308s allows ENV['foo'] to be ||= to a constant 308s allows ENV['foo'] to be assigned to a constant 308s behaves like mutable objects 308s when assigning with = 308s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 308s when assigning with ||= 308s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 308s behaves like immutable objects 308s allows ::ENV['foo'] to be ||= to a constant 308s allows ::ENV['foo'] to be assigned to a constant 308s behaves like immutable objects 308s allows 'foo' + 'bar' to be ||= to a constant 308s allows 'foo' + 'bar' to be assigned to a constant 308s behaves like mutable objects 308s when assigning with ||= 308s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 308s when assigning with = 308s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 308s behaves like immutable objects 308s allows 1 to be assigned to a constant 308s allows 1 to be ||= to a constant 308s behaves like immutable objects 308s allows :sym to be ||= to a constant 308s allows :sym to be assigned to a constant 308s behaves like immutable objects 308s allows FOO - BAR to be ||= to a constant 308s allows FOO - BAR to be assigned to a constant 308s behaves like mutable objects 308s when assigning with = 308s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 308s when assigning with ||= 308s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 308s behaves like immutable objects 308s allows FOO + BAR to be assigned to a constant 308s allows FOO + BAR to be ||= to a constant 308s behaves like mutable objects 308s when assigning with = 308s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 308s when assigning with ||= 308s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 308s behaves like immutable objects 308s allows 1.5 to be assigned to a constant 308s allows 1.5 to be ||= to a constant 308s behaves like literals that are not frozen 308s behaves like immutable objects 308s allows 1.5 to be ||= to a constant 308s allows 1.5 to be assigned to a constant 308s behaves like mutable objects 308s when assigning with ||= 308s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 308s when assigning with = 308s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 308s behaves like mutable objects 308s when assigning with = 308s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 308s when assigning with ||= 308s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 308s behaves like immutable objects 308s allows 1 to be assigned to a constant 308s allows 1 to be ||= to a constant 308s behaves like immutable objects 308s allows :sym to be ||= to a constant 308s allows :sym to be assigned to a constant 308s behaves like mutable objects 308s when assigning with ||= 308s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 308s when assigning with = 308s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 308s behaves like immutable objects 308s allows FOO - BAR to be assigned to a constant 308s allows FOO - BAR to be ||= to a constant 308s behaves like immutable objects 308s allows FOO + BAR to be assigned to a constant 308s allows FOO + BAR to be ||= to a constant 308s behaves like mutable objects 308s when assigning with = 308s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 308s when assigning with ||= 308s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 308s behaves like immutable objects 308s allows ::ENV['foo'] to be assigned to a constant 308s allows ::ENV['foo'] to be ||= to a constant 308s behaves like immutable objects 308s allows ENV['foo'] to be ||= to a constant 308s allows ENV['foo'] to be assigned to a constant 308s behaves like immutable objects 308s allows 'foo' + 'bar' to be ||= to a constant 308s allows 'foo' + 'bar' to be assigned to a constant 308s behaves like mutable objects 308s when assigning with = 308s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 308s when assigning with ||= 308s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 308s behaves like literals that are not frozen 308s behaves like mutable objects 308s when assigning with = 308s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 308s when assigning with ||= 308s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 308s behaves like immutable objects 308s allows ENV['foo'] to be ||= to a constant 308s allows ENV['foo'] to be assigned to a constant 308s behaves like mutable objects 308s when assigning with = 308s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 308s when assigning with ||= 308s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 308s behaves like mutable objects 308s when assigning with = 308s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 308s when assigning with ||= 308s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 308s behaves like immutable objects 308s allows 'foo' + 'bar' to be ||= to a constant 308s allows 'foo' + 'bar' to be assigned to a constant 308s behaves like mutable objects 308s when assigning with ||= 308s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 308s when assigning with = 308s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 308s behaves like immutable objects 308s allows FOO + BAR to be ||= to a constant 308s allows FOO + BAR to be assigned to a constant 308s behaves like mutable objects 308s when assigning with = 308s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 308s when assigning with ||= 308s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 308s behaves like immutable objects 308s allows FOO - BAR to be ||= to a constant 308s allows FOO - BAR to be assigned to a constant 308s behaves like immutable objects 308s allows :sym to be ||= to a constant 308s allows :sym to be assigned to a constant 308s behaves like immutable objects 308s allows 1.5 to be ||= to a constant 308s allows 1.5 to be assigned to a constant 308s behaves like immutable objects 308s allows ::ENV['foo'] to be assigned to a constant 308s allows ::ENV['foo'] to be ||= to a constant 308s behaves like immutable objects 308s allows 1 to be assigned to a constant 308s allows 1 to be ||= to a constant 308s behaves like literals that are not frozen 308s behaves like immutable objects 308s allows FOO + BAR to be ||= to a constant 308s allows FOO + BAR to be assigned to a constant 308s behaves like mutable objects 308s when assigning with = 308s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 308s when assigning with ||= 308s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 308s behaves like mutable objects 308s when assigning with ||= 308s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 308s when assigning with = 308s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 308s behaves like immutable objects 308s allows ::ENV['foo'] to be assigned to a constant 308s allows ::ENV['foo'] to be ||= to a constant 308s behaves like immutable objects 308s allows 1 to be assigned to a constant 308s allows 1 to be ||= to a constant 308s behaves like mutable objects 308s when assigning with ||= 308s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 308s when assigning with = 308s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 308s behaves like immutable objects 308s allows :sym to be assigned to a constant 308s allows :sym to be ||= to a constant 308s behaves like immutable objects 308s allows FOO - BAR to be ||= to a constant 308s allows FOO - BAR to be assigned to a constant 308s behaves like mutable objects 308s when assigning with = 308s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 308s when assigning with ||= 308s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 308s behaves like mutable objects 308s when assigning with ||= 308s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 308s when assigning with = 308s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 308s behaves like immutable objects 308s allows 1.5 to be assigned to a constant 308s allows 1.5 to be ||= to a constant 308s behaves like immutable objects 308s allows 'foo' + 'bar' to be assigned to a constant 308s allows 'foo' + 'bar' to be ||= to a constant 308s behaves like immutable objects 308s allows ENV['foo'] to be assigned to a constant 308s allows ENV['foo'] to be ||= to a constant 308s behaves like mutable objects 308s when assigning with ||= 308s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 308s when assigning with = 308s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 308s behaves like immutable objects 308s allows 'foo' + 'bar' to be assigned to a constant 308s allows 'foo' + 'bar' to be ||= to a constant 308s behaves like immutable objects 308s allows ::ENV['foo'] to be ||= to a constant 308s allows ::ENV['foo'] to be assigned to a constant 308s when assigning an array without brackets 308s does not insert brackets for %w() arrays 308s adds brackets when autocorrecting 308s Ruby 3.0 or higher 308s raises offense only for shareable_constant_value as none when set in the order of: literal, none and experimental_everything 308s raises offense when shareable_constant_value is specified as an inline comment 308s when assigning a range (erange) 308s does not register an offense when with parenthesis 308s does not register an offense when without parenthesis 308s when using shareable_constant_value 308s behaves like literals that are frozen 308s behaves like immutable objects 308s allows FOO + BAR to be ||= to a constant 308s allows FOO + BAR to be assigned to a constant 308s behaves like immutable objects 308s allows [1, 2, 3] to be ||= to a constant 308s allows [1, 2, 3] to be assigned to a constant 308s behaves like immutable objects 308s allows :sym to be assigned to a constant 308s allows :sym to be ||= to a constant 308s behaves like immutable objects 308s allows 'foo' + 'bar' to be assigned to a constant 308s allows 'foo' + 'bar' to be ||= to a constant 308s behaves like immutable objects 308s allows ::ENV['foo'] to be assigned to a constant 308s allows ::ENV['foo'] to be ||= to a constant 308s behaves like immutable objects 308s allows 1.5 to be assigned to a constant 308s allows 1.5 to be ||= to a constant 308s behaves like immutable objects 308s allows "top#{1 + 2}" to be assigned to a constant 308s allows "top#{1 + 2}" to be ||= to a constant 308s behaves like immutable objects 308s allows 'str' to be assigned to a constant 308s allows 'str' to be ||= to a constant 308s behaves like immutable objects 308s allows 1 to be assigned to a constant 308s allows 1 to be ||= to a constant 308s behaves like immutable objects 308s allows ENV['foo'] to be ||= to a constant 308s allows ENV['foo'] to be assigned to a constant 308s behaves like immutable objects 308s allows %w(a b c) to be assigned to a constant 308s allows %w(a b c) to be ||= to a constant 308s behaves like immutable objects 308s allows FOO - BAR to be ||= to a constant 308s allows FOO - BAR to be assigned to a constant 308s behaves like immutable objects 308s allows { a: 1, b: 2 } to be assigned to a constant 308s allows { a: 1, b: 2 } to be ||= to a constant 308s behaves like literals that are frozen 308s behaves like immutable objects 308s allows 'foo' + 'bar' to be ||= to a constant 308s allows 'foo' + 'bar' to be assigned to a constant 308s behaves like immutable objects 308s allows :sym to be assigned to a constant 308s allows :sym to be ||= to a constant 308s behaves like immutable objects 308s allows { a: 1, b: 2 } to be ||= to a constant 308s allows { a: 1, b: 2 } to be assigned to a constant 308s behaves like immutable objects 308s allows ::ENV['foo'] to be ||= to a constant 308s allows ::ENV['foo'] to be assigned to a constant 308s behaves like immutable objects 308s allows FOO + BAR to be assigned to a constant 308s allows FOO + BAR to be ||= to a constant 308s behaves like immutable objects 308s allows 1.5 to be ||= to a constant 308s allows 1.5 to be assigned to a constant 308s behaves like immutable objects 308s allows 'str' to be ||= to a constant 308s allows 'str' to be assigned to a constant 308s behaves like immutable objects 308s allows "top#{1 + 2}" to be ||= to a constant 308s allows "top#{1 + 2}" to be assigned to a constant 308s behaves like immutable objects 308s allows ENV['foo'] to be assigned to a constant 308s allows ENV['foo'] to be ||= to a constant 308s behaves like immutable objects 308s allows %w(a b c) to be assigned to a constant 308s allows %w(a b c) to be ||= to a constant 308s behaves like immutable objects 308s allows 1 to be ||= to a constant 308s allows 1 to be assigned to a constant 308s behaves like immutable objects 308s allows [1, 2, 3] to be ||= to a constant 308s allows [1, 2, 3] to be assigned to a constant 308s behaves like immutable objects 308s allows FOO - BAR to be ||= to a constant 308s allows FOO - BAR to be assigned to a constant 308s behaves like literals that are frozen 308s behaves like immutable objects 308s allows %w(a b c) to be assigned to a constant 308s allows %w(a b c) to be ||= to a constant 308s behaves like immutable objects 308s allows FOO - BAR to be ||= to a constant 308s allows FOO - BAR to be assigned to a constant 308s behaves like immutable objects 308s allows { a: 1, b: 2 } to be assigned to a constant 308s allows { a: 1, b: 2 } to be ||= to a constant 308s behaves like immutable objects 308s allows 'str' to be assigned to a constant 308s allows 'str' to be ||= to a constant 308s behaves like immutable objects 308s allows "top#{1 + 2}" to be assigned to a constant 308s allows "top#{1 + 2}" to be ||= to a constant 308s behaves like immutable objects 308s allows 1 to be ||= to a constant 308s allows 1 to be assigned to a constant 308s behaves like immutable objects 308s allows [1, 2, 3] to be ||= to a constant 308s allows [1, 2, 3] to be assigned to a constant 308s behaves like immutable objects 308s allows ::ENV['foo'] to be ||= to a constant 308s allows ::ENV['foo'] to be assigned to a constant 308s behaves like immutable objects 308s allows FOO + BAR to be ||= to a constant 308s allows FOO + BAR to be assigned to a constant 308s behaves like immutable objects 308s allows ENV['foo'] to be ||= to a constant 308s allows ENV['foo'] to be assigned to a constant 308s behaves like immutable objects 308s allows :sym to be ||= to a constant 308s allows :sym to be assigned to a constant 308s behaves like immutable objects 308s allows 1.5 to be ||= to a constant 308s allows 1.5 to be assigned to a constant 308s behaves like immutable objects 308s allows 'foo' + 'bar' to be assigned to a constant 308s allows 'foo' + 'bar' to be ||= to a constant 308s behaves like literals that are not frozen 308s behaves like immutable objects 308s allows ENV['foo'] to be assigned to a constant 308s allows ENV['foo'] to be ||= to a constant 308s behaves like immutable objects 308s allows FOO + BAR to be ||= to a constant 308s allows FOO + BAR to be assigned to a constant 308s behaves like mutable objects 308s when assigning with = 308s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 308s when assigning with ||= 308s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 308s behaves like immutable objects 308s allows 'foo' + 'bar' to be ||= to a constant 308s allows 'foo' + 'bar' to be assigned to a constant 308s behaves like immutable objects 309s allows :sym to be ||= to a constant 309s allows :sym to be assigned to a constant 309s behaves like immutable objects 309s allows FOO - BAR to be ||= to a constant 309s allows FOO - BAR to be assigned to a constant 309s behaves like immutable objects 309s allows 1 to be assigned to a constant 309s allows 1 to be ||= to a constant 309s behaves like immutable objects 309s allows 1.5 to be assigned to a constant 309s allows 1.5 to be ||= to a constant 309s behaves like mutable objects 309s when assigning with ||= 309s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 309s when assigning with = 309s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 309s behaves like immutable objects 309s allows ::ENV['foo'] to be ||= to a constant 309s allows ::ENV['foo'] to be assigned to a constant 309s behaves like mutable objects 309s when assigning with = 309s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 309s when assigning with ||= 309s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 309s behaves like mutable objects 309s when assigning with = 309s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 309s when assigning with ||= 309s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 309s behaves like mutable objects 309s when assigning with = 309s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 309s when assigning with ||= 309s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 309s when assigning a regexp 309s does not register an offense 309s when assigning a range (irange) 309s does not register an offense when with parenthesis 309s does not register an offense when without parenthesis 309s behaves like immutable objects 309s allows :sym to be ||= to a constant 309s allows :sym to be assigned to a constant 309s 309s RuboCop::Cop::Style::ColonMethodCall 309s does not register an offense for constant access 309s registers an offense for instance method call 309s registers an offense for instance method call with arg 309s does not register an offense for Java package namespaces 309s does not register an offense for nested class 309s does not register an offense for op methods 309s registers an offense for class method call 309s does not register an offense when for constructor methods 309s does not register an offense for Java static types 309s registers an offense for class method call with arg 309s 309s RuboCop::Cop::Style::ConstantVisibility 309s does not register an offense in the top level scope 309s registers an offense for module definitions 309s does not register an offense when passing a string to the visibility declaration 309s IgnoreModules 309s does not register an offense for class definitions 309s registers an offense for constants 309s when defining a constant in a class 309s with a single-statement body 309s registers an offense when not using a visibility declaration 309s with a multi-statement body 309s registers an offense when not using a visibility declaration 309s registers an offense when there is no matching visibility declaration 309s does not register an offense when using a visibility declaration 309s when defining a constant in a module 309s does not register an offense when using a visibility declaration 309s registers an offense when not using a visibility declaration 309s 309s RuboCop::Cop::Style::InlineComment 309s registers an offense for a trailing inline comment 309s does not register an offense for special rubocop inline comments 309s does not register an offense for a standalone comment 309s 309s RuboCop::Formatter::FileListFormatter 309s #file_finished 309s displays parsable text 309s 309s RuboCop::Cop::Lint::DuplicateHashKey 309s behaves like duplicated non literal key 309s does not register an offense for duplicated `(x && false)` hash keys 309s behaves like duplicated literal key 309s registers an offense for duplicated `(1)` hash keys 309s behaves like duplicated non literal key 309s does not register an offense for duplicated `/.#{some_method_call}/` hash keys 309s behaves like duplicated non literal key 309s does not register an offense for duplicated `"#{some_method_call}"` hash keys 309s behaves like duplicated non literal key 309s does not register an offense for duplicated `{ :sym => some_method_call }` hash keys 309s when there is a duplicated key in the hash literal 309s registers an offense 309s behaves like duplicated non literal key 309s does not register an offense for duplicated `(x or false)` hash keys 309s behaves like duplicated non literal key 309s does not register an offense for duplicated `[some_method_call]` hash keys 309s behaves like duplicated literal key 309s registers an offense for duplicated `/./` hash keys 309s behaves like duplicated non literal key 309s does not register an offense for duplicated `{ some_method_call => :sym }` hash keys 309s behaves like duplicated literal key 309s registers an offense for duplicated `1` hash keys 309s behaves like duplicated literal key 309s registers an offense for duplicated `{ a: 1, b: 2 }` hash keys 309s behaves like duplicated non literal key 309s does not register an offense for duplicated `%r{abx#{foo}}ixo` hash keys 309s behaves like duplicated literal key 309s registers an offense for duplicated `%r{abx}ixo` hash keys 309s behaves like duplicated literal key 309s registers an offense for duplicated `[1, 2, 3]` hash keys 309s behaves like duplicated literal key 309s registers an offense for duplicated `(false or true)` hash keys 309s behaves like duplicated literal key 309s registers an offense for duplicated `'str'` hash keys 309s When there is no duplicated key in the hash 309s does not register an offense 309s When a key is duplicated three times in a hash literal 309s registers two offenses 309s behaves like duplicated literal key 309s registers an offense for duplicated `1.0` hash keys 309s behaves like duplicated literal key 309s registers an offense for duplicated `(false <=> true)` hash keys 309s behaves like duplicated literal key 309s registers an offense for duplicated `(false && true)` hash keys 309s behaves like duplicated literal key 309s registers an offense for duplicated `!true` hash keys 309s behaves like duplicated non literal key 309s does not register an offense for duplicated `some_method_call` hash keys 309s behaves like duplicated literal key 309s registers an offense for duplicated `nil` hash keys 309s behaves like duplicated literal key 309s registers an offense for duplicated `false` hash keys 309s when there are two duplicated keys in a hash 309s registers two offenses 309s behaves like duplicated literal key 309s registers an offense for duplicated `{ :a => 1, :b => 2 }` hash keys 309s behaves like duplicated non literal key 309s does not register an offense for duplicated `(x == false)` hash keys 309s behaves like duplicated literal key 309s registers an offense for duplicated `"#{2}"` hash keys 309s target ruby version >= 2.6 309s behaves like duplicated literal key 309s registers an offense for duplicated `(42..)` hash keys 309s behaves like duplicated non literal key 309s does not register an offense for duplicated `some_method_call(x, y)` hash keys 309s 309s RuboCop::Cop::Badge 309s exposes department name 309s compares by value 309s can be converted to a string with the Department/CopName format 309s exposes cop name 309s #qualified? 309s says `CopName` is not qualified 309s says `Department/CopName` is qualified 309s says `Deep/Department/CopName` is qualified 309s .for 309s parses cop class name 309s parses cop class name 309s parses cop class name 309s parses cop class name 309s parses cop class name 309s #camel_case 309s converts "rspec" to CamelCase 309s converts "lint" to CamelCase 309s converts "foo_bar" to CamelCase 309s .new 309s assigns name 309s assigns name 309s assigns name 309s assigns name 309s assigns department 309s assigns department 309s assigns department 309s assigns department 309s .parse 309s parses identifier 309s parses identifier 309s parses identifier 309s parses identifier 309s parses identifier 309s parses identifier 309s 309s RuboCop::Cop::Lint::BigDecimalNew 309s registers an offense and corrects using `::BigDecimal.new()` 309s does not register an offense when using `BigDecimal()` 309s registers an offense and corrects using `BigDecimal.new()` 309s 309s Changelog 309s merges correctly 309s parses correctly 309s Changelog::Entry 309s #body 309s when there is an issue referenced with [Fixes #x] the body 309s is expected to eq "Fix something" 309s when there is no body 309s is expected to eq "" 309s when there is an issue referenced with [Fix #x] the body 309s is expected to eq "Fix something" 309s when there is no issue referenced in the body 309s is expected to eq "Fix something" 309s #content 309s when there is no issue referenced 309s generates correct content 309s when there is an issue referenced 309s generates correct content 309s #ref_id 309s when there is no issue referenced in the body 309s is expected to eq "x" 309s when there is no body 309s is expected to eq "x" 309s when there is an issue referenced with [Fixes #x] the body 309s is expected to eq "123" 309s when there is an issue referenced with [Fix #x] the body 309s is expected to eq "123" 309s 309s RuboCop::Cop::Lint::NumberConversion 309s IgnoredClasses 309s when using Time 309s when using DateTime 309s when using Time/DateTime with multiple method calls 309s AllowedPatterns 309s does not register an offense for an allowed method 309s registers an offense for other methods 309s does not register an offense 309s when using Integer() with integer 309s when `:to_f` is one of multiple method arguments 309s when using Float() 309s when `#to_i` called without a receiver 309s when using Complex() 309s to_method in symbol form 309s registers an offense when using nested number conversion methods 309s registers offense and autocorrects without parentheses 309s registers offense with try 309s does not register an offense when using `Float` constructor 309s does not register an offense when using `Complex` constructor 309s does not register an offense when using `Integer` constructor 309s registers offense with send 309s registers offense and autocorrects 309s registers an offense 309s when using `#to_c` 309s when using `#to_r` 309s when using `#to_c` for number literals 309s when `#to_i` called on a variable 309s when using `#to_f` 309s when using `#to_f` for number literals 309s when using `#to_r` for number literals 309s when using `#to_i` 309s when using `#to_i` for number literals 309s when `#to_i` called on a variable on a hash 309s when `#to_i` called on a variable on a array 309s when `#to_i` called on a hash value 309s AllowedMethods 309s does not register an offense for an allowed method 309s registers an offense for other methods 309s 309s RuboCop::Cop::Style::ExponentialNotation 309s EnforcedStyle is scientific 309s registers no offense for a negative mantissa 309s registers no offense for a negative exponent 309s registers no offense for a regular float 309s registers no offense for a mantissa between 1 and 10 309s registers an offense for mantissa smaller than 1 309s registers no offense for a float smaller than 1 309s registers an offense for mantissa equal to 10 309s registers no offense for a mantissa equal to 1 309s registers an offense for mantissa greater than 10 309s EnforcedStyle is engineering 309s registers an offense for exponent equal to -2 309s registers an offense for mantissa smaller than -1000 309s registers an offense for exponent equal to 4 309s registers no offense for a regular float 309s registers no offense for a large mantissa 309s registers no offense for a negative mantissa 309s registers an offense for mantissa smaller than 0.1 309s registers an offense for a mantissa greater than -0.1 309s registers no offense for a mantissa equal to 1 309s registers no offense for a negative exponent 309s registers no offense for a float smaller than 1 309s EnforcedStyle is integral 309s registers no offense for an integral mantissa 309s registers no offense for a float smaller than 1 309s registers no offense for negative exponent 309s registers no offense for negative mantissa 309s registers no offense for a regular float 309s registers an offense for mantissa divisible by 10 309s registers an offense for decimal mantissa 309s 309s RuboCop::Cop::Lint::SymbolConversion 309s does not register an offense for a normal symbol 309s does not register an offense for a symbol that requires quotes 309s does not register an offense for a dstr 309s behaves like offense 309s registers an offense for "foo-bar".intern 309s behaves like offense 309s registers an offense for :foo.intern 309s behaves like offense 309s registers an offense for "foo".intern 309s implicit `to_sym` call 309s does not register an offense 309s behaves like offense 309s registers an offense for :"foo" 309s in an alias 309s does not register an offense 309s behaves like offense 309s registers an offense for "foo-bar".to_sym 309s behaves like offense 309s registers an offense for :"foo_bar" 309s behaves like offense 309s registers an offense for "foo_bar".to_sym 309s single quoted symbol 309s does not register an offense 309s behaves like offense 309s registers an offense for "foo".to_sym 309s in a hash 309s keys 309s does not register an offense for a require quoted symbol that contains `:` 309s does not register an offense for a require quoted symbol that ends with `=` 309s does not register an offense for a normal symbol 309s registers and corrects an offense for a quoted symbol that ends with `?` 309s does not register an offense for operators 309s does not register an offense for a require quoted symbol 309s registers and corrects an offense for a quoted symbol that ends with `!` 309s registers an offense for a quoted symbol 309s values 309s registers an offense for a quoted symbol value 309s registers an offense for a quoted symbol key 309s does not register an offense for a normal symbol 309s behaves like offense 309s registers an offense for "foo_bar".intern 309s EnforcedStyle: consistent 309s hash where keys are quoted but do not need to be 309s registers an offense 309s hash where there are keys needing quoting 309s registers an offense for unquoted keys 309s with a key with = 309s requires symbols to be quoted 309s hash where no keys need to be quoted 309s does not register an offense 309s with different quote styles 309s does not register an offense 309s with a mix of string and symbol keys 309s does not register an offense 309s inside a percent literal array 309s does not register an offense 309s behaves like offense 309s registers an offense for :foo.to_sym 309s 309s RuboCop::Cop::InternalAffairs::NodeDestructuring 309s registers an offense when destructuring using a splat 309s does not register an offense when receiver is named `array` 309s when destructuring using `node.children` 309s registers an offense when receiver is named `send_node` 309s registers an offense when receiver is named `node` 309s 309s RuboCop::Cop::InternalAffairs::SingleLineComparison 309s does not register an offense when comparing the same line 309s registers and corrects an offense when comparing `loc.last_line` with `loc.first_line` 309s does not register an offense when the receivers are not a match 309s registers and corrects an offense when comparing `loc.line` with `loc.last_line` 309s registers and corrects an offense when comparing `loc.first_line` with `loc.last_line` 309s registers and corrects an offense when comparing `first_line` with `last_line` 309s registers and corrects an offense when negative comparing `first_line` with `last_line` 309s registers and corrects an offense when comparing `source_range.last_line` with `source_range.first_line` 309s registers and corrects an offense when comparing `last_line` with `first_line` 309s registers and corrects an offense when negative comparing `last_line` with `first_line` 309s registers and corrects an offense when comparing `loc.last_line` with `loc.line` 309s registers and corrects an offense when comparing `source_range.first_line` with `source_range.last_line` 309s 309s RuboCop::Cop::Naming::MethodParameterName 309s registers offense for offensive default parameter 309s can register multiple offenses in one method definition 309s registers offense when parameter contains uppercase characters 309s does not register offense for valid keyword parameters 309s registers offense when parameter is less than minimum length 309s registers offense for offensive keyword parameters 309s does not register offense for valid parameter names on self.method 309s registers offense when parameter with prefix is less than minimum length 309s registers offense when parameter ends in number on class method 309s does not register offense for valid parameter names 309s registers offense when parameter ends in number 309s does not register offense for empty kwrestarg 309s does not register for method without parameters 309s does not register offense for valid default parameters 309s does not register offense for empty restarg 309s when using argument forwarding 309s does not register an offense 309s with AllowedNames 309s accepts specified block param names 309s registers unlisted offensive names 309s accepts underscore param names 309s accepts param names prefixed with underscore 309s with ForbiddenNames 309s registers offense for parameter listed as forbidden 309s accepts parameter that uses a forbidden name's letters 309s with AllowNamesEndingInNumbers 309s accept parameters that end in numbers 309s 309s RuboCop::Cop::Style::DocumentDynamicEvalDefinition 309s does not register an offense when using eval-type method with interpolated string that is not heredoc with comment doc 309s registers an offense when using eval-type method with string interpolation without comment docs 309s does not register an offense when using eval-type method without string interpolation 309s registers an offense when using eval-type method with interpolated string that is not heredoc without comment doc 309s does not register an offense when using eval-type method with string interpolation with comment docs 309s block comment outside heredoc 309s does not register an offense when using other text 309s does not register an offense for a matching block comment after the heredoc 309s does not register an offense when using inline comments 309s registers an offense if the comment does not match the method 309s does not register an offense when using multiple methods 309s does not register an offense for a matching block comment before the heredoc 309s block comment in heredoc 309s registers an offense if the comment does not match the method 309s does not register an offense when using multiple methods with split comments 309s does not register an offense when using other text 309s does not register an offense for a matching block comment 309s does not register an offense when using inline comments 309s does not evaluate comments if there is no interpolation 309s does not register an offense when using multiple methods 309s 309s RuboCop::Cop::Layout::MultilineAssignmentLayout 309s new_line style 309s registers an offense when the rhs is on the same line in setters 309s ignores arrays 309s registers an offense when the rhs is on the same line 309s allows multi-line assignments on separate lines 309s registers an offense for masgn with multi-line lhs 309s registers an offense when the rhs is on the same line in []= 309s configured supported types 309s allows supported types to be configured 309s when supported types is block 309s allows multi-line assignments when using shovel operator 309s allows multi-line block defines on separate lines 309s registers an offense when multi-line assignments using block definition is on the same line 309s allows multi-line assignments when using block definition on separate lines 309s same_line style 309s registers an offense when the rhs is a different line in setters 309s registers an offense when the rhs is a different line 309s ignores arrays 309s allows multi-line assignments on the same line 309s registers an offense when the rhs is a different line in []= 309s registers an offense for masgn with multi-line lhs 309s configured supported types 309s allows supported types to be configured 309s when supported types is block 309s allows when multi-line assignments using block definition is on the same line 309s registers an offense when multi-line assignments using block definition on separate lines 309s allows multi-line block defines on separate lines 309s allows multi-line assignments when using shovel operator 309s 309s RuboCop::Cop::Layout::EmptyLinesAroundClassBody 309s when EnforcedStyle is no_empty_lines 309s registers an offense for singleton class body ending with a blank 309s autocorrects singleton class body containing only a blank 309s registers an offense for class body ending with a blank 309s registers an offense for class body starting with a blank 309s when EnforcedStyle is empty_lines_except_namespace 309s when only child is class 309s autocorrects beginning and end 309s registers offense for namespace body ending with a blank 309s registers offense for namespace body starting with a blank 309s registers offenses for namespaced class body not ending with a blank 309s registers offenses for namespaced class body not starting with a blank 309s requires no empty lines for namespace 310s when only child is module 310s registers offense for namespace body ending with a blank 310s requires no empty lines for namespace 310s registers offense for namespace body starting with a blank 310s when has multiple child classes 310s registers offenses for namespace body starting and ending without a blank 310s requires empty lines for namespace 310s when EnforcedStyle is empty_lines 310s does not register offenses when specifying a superclass that breaks the line 310s registers an offense for singleton class body not starting or ending with a blank 310s registers an offense for class body not starting or ending with a blank 310s accepts classes with an empty body 310s does not register offenses 310s accepts singleton classes with an empty body 310s when EnforcedStyle is beginning_only 310s ignores empty lines at the beginning of a class 310s registers an offense for an empty line at the end of a class 310s when EnforcedStyle is ending_only 310s registers an offense for an empty line at the end of a class 310s ignores empty lines at the beginning of a class 310s when EnforcedStyle is empty_lines_special 310s class with only constants 310s registers and autocorrects the offenses 310s when first child is NOT a method 310s 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 310s source without blank lines 310s registers an offense for class not ending with a blank line 310s source with blank lines 310s registers an offense for class beginning with a blank line 310s source with comment before method definition 310s registers an offense for class beginning with a blank line 310s when class has a namespace 310s 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 310s source with constants 310s registers and autocorrects the offenses 310s source without blank lines 310s registers and autocorrects the offenses 310s source with blank lines 310s registers and autocorrects the offenses 310s when first child is a method 310s requires blank line at the beginning and ending of class body 310s when class has a namespace 310s requires no empty lines for namespace but requires blank line at the beginning and ending of class body 310s source with blank lines 310s autocorrects the offenses 310s source without blank lines 310s registers and autocorrects the offenses 310s source without blank lines 310s registers an offense for class not beginning and ending with a blank line 310s class with empty body 310s without empty line 310s does NOT register offenses 310s with empty line 310s does NOT register offenses 310s when first child is an access modifier 310s with blank lines at the beginning and ending of class body 310s registers no offense 310s with no blank lines at the beginning and ending of class body 310s registers and corrects an offense 310s when namespace has multiple children 310s requires empty lines for namespace 310s class with constant and child class 310s registers and autocorrects the offenses 310s 310s RuboCop::Cop::Layout::LeadingCommentSpace 310s does not register an offense for #! on first line 310s does not register an offense for more than one space 310s accepts =begin/=end comments 310s registers an offense and corrects #! after the first line 310s does not register an offense for only #s 310s does not register an offense for # followed by no text 310s registers an offense and corrects comment without leading space 310s accepts sprockets directives 310s does not register an offense for more than one # 310s Doxygen style 310s when config option is enabled 310s does not register offense when using Doxygen style 310s when config option is disabled 310s registers an offense and corrects using Doxygen style 310s file not named config.ru 310s registers an offense and corrects #\ after the first line 310s registers an offense and corrects #\ on first line 310s RDoc syntax 310s registers an offense when starting `:` 310s does not register an offense when using `#++` or `#--` 310s Gemfile Ruby comment 310s when config option is disabled 310s registers an offense when using ruby config as comment 310s when config option is enabled 310s file named Gemfile 310s does not register an offense when using ruby config as comment 310s file not named Gemfile 310s registers an offense when using ruby config as comment 310s file named config.ru 310s does not register an offense for #\ on first line 310s registers an offense and corrects for #\ after the first line 310s 310s RuboCop::Cop::Layout::SpaceAfterMethodName 310s registers offense and corrects assignment def with space before parenthesis 310s registers offense and corrects class def with space before parenthesis 310s accepts a def without arguments 310s accepts an assignment def with arguments but no parentheses 310s accepts class method def with arguments but no parentheses 310s accepts a def with arguments but no parentheses 310s registers an offense and corrects def with space before the parenthesis 310s accepts a defs without arguments 310s 310s RuboCop::Cop::Layout::HeredocArgumentClosingParenthesis 310s correct cases 310s accepts correct case with other param after 310s accepts hash correct case 310s accepts method with heredoc argument of proc correct case 310s accepts simple correct case 310s accepts correct case with other param before 310s accepts when there is an argument between a heredoc argument and the closing paretheses 310s accepts double correct case nested 310s accepts double correct case 310s accepts double correct case new line 310s accepts method chain with heredoc argument correct case 310s invocation after the HEREDOC 310s ignores random call after 310s ignores tr 310s ignores random call 310s incorrect cases 310s complex chained incorrect case with multiple calls 310s detects and fixes the first 310s simple incorrect case squiggles 310s detects 310s double incorrect case 310s detects 310s incorrect case in array with nested calls and double heredoc and spaced out comma 310s detects 310s incorrect case with other param before 310s detects 310s complex incorrect case with multiple calls 310s detects and fixes the second 310s detects and fixes the first 310s incorrect case with other param before constructor 310s detects 310s simple incorrect case comma with spaces and comma in heredoc 310s detects 310s simple incorrect case comma with spaces 310s detects 310s incorrect case in array with spaced out comma 310s detects 310s simple incorrect case with call after 310s detects 310s simple incorrect case hash 310s detects 310s double case new line 310s detects and fixes 310s simple incorrect case comma 310s detects 310s simple incorrect case 310s detects 310s double incorrect case new line chained calls 310s detects 310s incorrect case in array with double heredoc and spaced out comma 310s detects 310s incorrect case with other param after 310s detects 310s simple incorrect case with call after trailing comma 310s detects 310s nested incorrect case 310s detects 310s incorrect case nested method call with comma 310s detects 310s incorrect case with other param before constructor and raise call 310s detects 310s 310s RuboCop::Cop::Lint::IneffectiveAccessModifier 310s when `private_class_method` is used 310s when `private_class_method` does not contain the method 310s registers an offense 310s when `private_class_method` contains all private method names 310s doesn't register an offense 310s when there is `begin` before a method definition 310s does not register an offense 310s when `private` is applied to a class method 310s registers an offense 310s when there is an intervening instance method 310s still registers an offense 310s when a `class << self` block is used 310s doesn't register an offense 310s when `protected` is applied to a class method 310s registers an offense 310s when no access modifier is used 310s doesn't register an offense 310s 310s RuboCop::Cop::Style::ImplicitRuntimeError 310s registers an offense for `fail` without error class 310s does not register an offense for `raise` without arguments 310s does not register an offense for `raise` with an error class 310s registers an offense for `fail` with a multiline string 310s does not register an offense for `fail` without arguments 310s does not register an offense for `fail` with an error class 310s registers an offense for `raise` without error class 310s registers an offense for `raise` with a multiline string 310s 310s RuboCop::Formatter::FuubarStyleFormatter 310s #progressbar_color 310s when a offense is detected in a file and autocorrected 310s is green 310s initially 310s is green 310s when a convention offense is detected in a file 310s is yellow 310s when an error offense is detected in a file 310s is red 310s and then a convention offense is detected in the next file 310s is still red 310s when convention and error offenses are detected in a file 310s is red 310s when no offenses are detected in a file 310s is still green 310s #with_color 310s when color is enabled 310s outputs coloring sequence code at the beginning and the end 310s when color is disabled 310s outputs nothing 310s 310s RuboCop::Cop::Style::NumericLiteralPrefix 310s octal literals 310s when config is zero_only 310s does not register offense for prefix `0` 310s registers an offense for prefix `0O` and `0o` 310s when config is zero_with_o 310s does not register offense for lowercase prefix 310s registers an offense for prefixes `0` and `0O` 310s decimal literals 310s does not register offense for no prefix 310s registers an offense for prefixes 310s binary literals 310s registers an offense for uppercase prefix 310s does not register offense for lowercase prefix 310s hex literals 310s does not register offense for lowercase prefix 310s registers an offense for uppercase prefix 310s 310s RuboCop::Cop::Style::OptionalArguments 310s allows methods with only one required argument 310s allows methods with only one optional argument 310s allows methods with only optional arguments 310s registers an offense when an optional argument is followed by a required argument 310s allows methods with only required arguments 310s registers an offense for each optional argument when multiple optional arguments are followed by a required argument 310s allows methods without arguments 310s allows methods with multiple optional arguments at the end 310s named params 310s required params 310s allows optional arguments before required named arguments 310s allows optional arguments to come before a mix of required and optional named argument 310s registers an offense for optional arguments that come before required arguments where there are name arguments 310s with default values 310s allows optional arguments before an optional named argument 310s 310s RuboCop::Cop::VisibilityHelp 310s #node_visibility 310s with inline private 310s is expected to eq :private 310s with inline private with symbol 310s is expected to eq :private 310s with visibility block private 310s is expected to eq :private 310s with visibility block public 310s is expected to eq :public 310s with inline public 310s is expected to eq :public 310s without visibility block 310s is expected to eq :public 310s with visibility block private after public 310s is expected to eq :private 310s 310s RuboCop::Cop::Lint::DisjunctiveAssignmentInConstructor 310s empty constructor 310s accepts 310s constructor has disjunctive assignment 310s LHS is lvar 310s accepts 310s LHS is ivar 310s registers an offense and corrects 310s constructor calls super before disjunctive assignment 310s accepts 310s constructor calls any method before disjunctive assignment 310s accepts 310s constructor calls super after assignment 310s registers an offense and corrects 310s constructor does not have disjunctive assignment 310s accepts 310s 310s RuboCop::ConfigRegeneration 310s #options 310s when there is a blank todo file 310s is expected to eq {:auto_gen_config=>true} 310s it parses options from the generation comment 310s is expected to eq {:auto_gen_config=>true, :auto_gen_only_exclude=>true, :auto_gen_timestamp=>false, :exclude_limit=>"100", :offense_counts=>false} 310s when the todo file is malformed 310s is expected to eq {:auto_gen_config=>true} 310s when no todo file exists 310s is expected to eq {:auto_gen_config=>true} 310s 310s RuboCop::Cop::Style::CaseLikeIf 310s does not register an offense when using modifier `if` 310s does not register an offense when using `=~` in first branch with non regexp 310s does not register an offense when one of the branches contains `==` with class reference 310s does not register an offense when using `match?` without a receiver 310s registers an offense and corrects when target is a method call 310s registers an offense and corrects when using `is_a?` 310s registers an offense and corrects when using `match?` with regexp 310s does not register an offense when using `include?` without a receiver 310s registers an offense and corrects when using `=~` 310s registers an offense and corrects when using `match?` with non regexp in other branches except first 310s does not register an offense when using `match?` with non regexp 310s does not register an offense when not all conditions contain target 310s does not register an offense when using ternary operator 310s registers an offense and corrects when using `==` with literal 310s does not register an offense when using `unless` 310s does not register an offense when using `match?` in first branch with non regexp 310s registers an offense and corrects when using `===` 310s does not register an offense when an object overrides `equal?` with no arity 310s does not register an offense when only single `if` 310s registers an offense and corrects when using `==` with constant 310s does not register an offense when only `if-else` 310s registers an offense and corrects when using `||` within conditions 310s registers an offense and corrects when using `include?` with range 310s does not register an offense when using `cover?` without a receiver 310s does not register an offense when using `==` with class reference 310s does not register an offense when one of `||` subconditions is not convertible 310s registers an offense and corrects when using nested conditions with `||` 310s does not register an offense when using `==` with method call with arguments 310s does not register an offense when using `equal?` without a receiver 310s does not register an offense when using `==` with constant containing 1 letter in name 310s when using regexp with named captures 310s registers and corrects an offense with match? and regexp on lhs 310s does not register an offense with =~ and regexp on lhs 310s registers and corrects an offense with =~ and regexp on rhs 310s does not register an offense with match and regexp on rhs 310s does not register an offense with match and regexp on lhs 310s registers and corrects an offense with match? and regexp on rhs 310s 310s RuboCop::Cop::Style::MixinGrouping 310s when configured with grouped style 310s when using `prepend` 310s registers an offense for single mixins in separate calls, interspersed 310s registers an offense for single mixins in separate calls 310s registers an offense when other mixins have receivers 310s when using include 310s registers an offense for several mixins in separate calls 310s registers an offense for single mixins in separate calls 310s allows include with an explicit receiver 310s when using a mix of diffent methods 310s allows all different mixin methods 310s registers an offense with some duplicated mixin methods 310s when using `extend` 310s registers an offense for single mixins in separate calls 310s when configured with separated style 310s when using `prepend` 310s registers an offense for several mixins in one call 310s when using `extend` 310s registers an offense for several mixins in one call 310s when using a mix of diffent methods 310s registers an offense for some calls having several mixins 310s when using `include` 310s registers an offense for several mixins in separate calls 310s registers an offense for several mixins in one call 310s allows include call as an argument to another method 310s 310s RuboCop::Cop::Lint::AssignmentInCondition 310s does not blow up for empty unless condition 310s registers an offense for gvar assignment in condition 310s registers an offense for assignment methods 310s registers an offense for lvar assignment in until condition 310s registers an offense for = in condition inside a block 310s registers an offense for clvar assignment in condition 310s accepts assignment in a block after || 310s accepts == in condition 310s accepts = in a block that is called in a condition 310s accepts ||= in condition 310s registers an offense for assignment after ||= in condition 310s registers an offense for constant assignment in condition 310s registers an offense for collection element assignment in condition 310s accepts = in a block followed by method call 310s registers an offense for ivar assignment in condition 310s registers an offense for assignment after == in condition 310s does not blow up for empty if condition 310s registers an offense for lvar assignment in condition 310s registers an offense for lvar assignment in while condition 310s safe assignment is allowed 310s accepts []= in condition surrounded with braces 310s accepts = in condition surrounded with braces 310s safe assignment is not allowed 310s does not accept = in condition surrounded with braces 310s does not accept []= in condition surrounded with braces 310s 310s RuboCop::Cop::Style::MinMax 310s with an array literal containing calls to `#min` and `#max` 310s when the expression is used as a return value 310s does not register an offense if the receiver is implicit 310s does not register an offense if there are additional elements 310s does not register an offense if the receivers do not match 310s registers an offense if the receivers match 310s when the expression is used in a parallel assignment 310s does not register an offense if there are additional elements 310s registers an offense if the receivers match 310s does not register an offense if the receiver is implicit 310s does not register an offense if the receivers do not match 310s when the expression stands alone 310s registers an offense if the receivers match 310s does not register an offense if there are additional elements 310s does not register an offense if the receiver is implicit 310s does not register an offense if the receivers do not match 310s 310s RuboCop::Cop::Style::HashConversion 310s reports an offense for single-argument Hash[] 310s reports different offense for Hash[a || b] 310s reports different offense for multi-argument Hash[] 310s reports different offense for Hash[a && b] 310s reports different offense for Hash[(a || b)] 310s reports different offense for hash argument Hash[] as a method argument with parentheses 310s registers and corrects an offense when using multi-argument `Hash[]` as a method argument 310s reports different offense for empty Hash[] 310s does not try to correct multi-argument Hash with odd number of arguments 310s reports different offense for hash argument Hash[] as a method argument without parentheses 310s registers and corrects an offense when using `zip` with argument in `Hash[]` 310s reports different offense for Hash[(a && b)] 310s wraps complex statements in parens if needed 310s registers and corrects an offense when using argumentless `zip` with parentheses in `Hash[]` 310s registers and corrects an offense when using argumentless `zip` without parentheses in `Hash[]` 310s reports different offense for hash argument Hash[] 310s AllowSplatArgument: true 310s does not register an offense for unpacked array 310s AllowSplatArgument: false 310s reports uncorrectable offense for unpacked array 310s 310s RuboCop::Cop::Layout::FirstHashElementIndentation 310s when hash is operand 310s registers an offense and corrects incorrectly indented } 310s registers an offense and corrects incorrectly indented first pair 310s accepts correctly indented first pair 310s when hash is right hand side in assignment 310s registers an offense and corrects incorrectly indented first pair 310s accepts an empty hash 310s accepts a first pair on the same line as the left brace 311s accepts several pairs per line 311s accepts single line hash 311s accepts correctly indented first pair 311s when indentation width is overridden for this cop 311s registers an offense and corrects incorrectly indented first pair 311s accepts correctly indented first pair 311s when hash is argument to setter 311s accepts correctly indented first pair 311s registers an offense and corrects incorrectly indented first pair 311s when the HashAlignment style is separator for : 311s accepts correctly indented first pair 311s registers an offense and corrects incorrectly indented } 311s registers an offense and corrects incorrectly indented first pair with : 311s when hash is method argument 311s and arguments are surrounded by parentheses 311s and EnforcedStyle is consistent 311s registers an offense for incorrectly indented hash that is the value of a single pair hash 311s 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 311s accepts normal indentation for second argument 311s registers an offense and corrects incorrect indentation 311s accepts normal indentation for first argument 311s accepts indent based on the left brace when the outer hash key and the left brace is not on the same line 311s 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 311s and EnforcedStyle is special_inside_parentheses 311s accepts special indentation for second argument 311s registers an offense and corrects 'consistent' indentation 311s registers an offense for incorrectly indented hash that is the value of a single pair hash 311s 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 311s accepts normal indentation for hash within hash 311s accepts indent based on the preceding left parenthesiswhen the right brace and its following pair is on the same line 311s registers an offense and corrects 'align_braces' indentation 311s accepts indent based on the left brace when the outer hash key and the left brace is not on the same line 311s accepts special indentation for first argument 311s when using safe navigation operator 311s registers an offense and corrects 'consistent' indentation 311s and argument are not surrounded by parentheses 311s 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 311s accepts braceless hash 311s 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 311s 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 311s registers an offense for incorrectly indented multi-line hash with braces 311s accepts single line hash with braces 311s accepts a correctly indented multi-line hash with braces 311s accepts indent based on the left brace when the outer hash key and the left brace is not on the same line 311s when EnforcedStyle is align_braces 311s registers an offense for incorrectly indented hash that is the value of a single pair hash 311s registers an offense and corrects incorrectly indented } 311s accepts single line hash 311s accepts several pairs per line 311s accepts an empty hash 311s accepts a first pair on the same line as the left brace 311s accepts correctly indented first pair 311s 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 311s when 'consistent' style is used 311s registers an offense and corrects incorrect indentation 311s when 'special_inside_parentheses' style is used 311s registers an offense and corrects incorrect indentation 311s when the HashAlignment style is separator for => 311s registers an offense and corrects incorrectly indented } 311s registers an offense and corrects incorrectly indented first pair with => 311s accepts correctly indented first pair 311s 311s RuboCop::CLI 311s can process a file with an invalid UTF-8 byte sequence 311s registers an offense for Parser warnings 311s finds a file with no .rb extension but has a shebang line 311s registers an offense for a syntax error 311s checks a given file with faults and returns 1 311s does not register any offenses for an empty file 311s configuration of `AutoCorrect` 311s when setting `AutoCorrect: false` for `Style/StringLiterals` 312s does not suggest `1 offense autocorrectable` for `Style/StringLiterals` 312s for a disabled cop 312s reports no offense when enabled on part of a file 312s when lines end with CR+LF 312s reports an offense 312s unknown cop 312s in configuration file is given 312s prints the error and exists with code 2 312s obsolete cops 312s when configuration for TrailingComma is given 312s fails with an error message 312s when checking a correct file 312s returns 0 312s when super is used with a block 312s still returns 0 312s when given a file/directory that is not under the current dir 312s and the directory is absolute 312s checks a Rakefile but Style/FileName does not report 312s and the Rakefile path is relative 313s checks a Rakefile but Style/FileName does not report 313s and the Rakefile path is absolute 313s checks a Rakefile but Style/FileName does not report 313s and the directory is relative 313s checks a Rakefile but Style/FileName does not report 313s when interrupted 313s returns 130 313s when parallel static by default 313s when setting `UseCache: false` 313s fails with an error message 313s when specifying `--debug` option only` 313s fails with an error message 313s when setting `UseCache: true` 313s fails with an error message 313s when specifying `--debug` and `-a` options` 314s uses parallel inspection when correcting the file 314s rubocop:disable comment 314s can disable all cops on a single line 314s can disable all cops in a code section 314s can disable selected cops on a single line 315s can disable selected cops in a code section 315s Specify `--init` option to `rubocop` command 315s when .rubocop.yml already exists 315s fails with an error message 315s when .rubocop.yml does not exist 315s generate a .rubocop.yml file 315s when not necessary 315s causes an offense to be reported 315s and RedundantCopDisableDirective is individually excluded 315s does not report RedundantCopDisableDirective offenses 315s when using `rubocop:disable` line comment for `Lint/EmptyBlock` 315s does not register an offense for `Lint/RedundantCopDisableDirective` 315s and there are no other offenses 315s exits with error code 315s and RedundantCopDisableDirective is disabled through department 315s does not report RedundantCopDisableDirective offenses 315s when using `rubocop:disable` line comment for `Style/RedundantInitialize` 315s does not register an offense for `Lint/RedundantCopDisableDirective` 315s and RedundantCopDisableDirective is individually disabled 316s does not report RedundantCopDisableDirective offenses 316s when --autocorrect-all is given 316s does not trigger RedundantCopDisableDirective due to lines moving around 316s without using namespace 316s can disable selected cops on a single line but prints a warning 316s cops can exclude files based on config 316s ignores excluded files 316s info severity 316s when given `--fail-level info` 316s returns a 1 code 316s when given `--display-only-fail-level-offenses` 316s returns a 0 code but does not list offenses 316s when there are not only info offenses 316s returns a 1 code 316s when there are only info offenses 317s returns a 0 code 317s when `Lint/Syntax` is given `Severity: info` 317s is an invalid configuration 317s when a directory is named `*` 317s does not crash 317s configuration from file 318s can exclude a vendor directory indirectly 318s can be configured with option to disable a certain error 318s can be configured with project config to disable a certain error 318s finds included files 318s cannot disable Syntax offenses 318s allows the default configuration file as the -c argument 318s does not read files in excluded list 318s shows an error if the input file cannot be found 318s does not consider Include parameters in subdirectories 318s can disable parser-derived offenses with warning severity 318s displays style guide URLs if DisplayStyleGuide is true 318s can exclude directories relative to .rubocop.yml 318s can exclude a typical vendor directory 318s uses the DefaultFormatter if another formatter is not specified 319s only reads configuration in explicitly included hidden directories 319s excludes the vendor directory by default 319s ignores excluded files 319s works when a configuration file passed by -c specifies Exclude with regexp 319s works when a configuration file passed by -c specifies Exclude with strings 319s can be configured to override a parameter that is a hash in a special case 319s works when a configuration file specifies Severity for Metrics/ParameterLists and Layout/LineLength 319s prints a warning for an unrecognized configuration parameter 319s works when a configuration file specifies Severity for Metrics/ParameterLists and Layout 320s prefers a config file in ancestor directory to another in home 320s fails when a configuration file has invalid YAML syntax 320s prints an error for an unrecognized cop name in .rubocop.yml 320s runs without errors for an unrecognized cop name in .rubocop.yml and `--ignore-unrecognized-cops` option is given 320s displays cop names if DisplayCopNames is false 320s can be configured to merge a parameter that is a hash 320s fails when a configuration file specifies an invalid Severity 321s prints an error message for an unrecognized EnforcedStyle 321s can have different config files in different directories 321s matches included/excluded files correctly when . argument is given 321s can exclude a vendor directory with an erroneous config file 321s works when a cop that others depend on is disabled 321s can use an alternative max line length from a config file 321s when MultilineOperationIndentation is used with aligned style and IndentationWidth parameter 321s fails with an error message 321s when configured for indented_internal_methods style indentation 321s registers offense for normal indentation in class 322s registers offense for normal indentation in module 322s accepts indented_internal_methods style indentation 322s when --force-default-config option is specified 322s when no config file specified 322s ignores config file 322s when config file specified with -c 322s ignores config file 322s when obsolete MultiSpaceAllowedForOperators param is used 322s displays a warning 322s when a value in a hash is overridden with nil 322s acts as if the key/value pair was removed 322s when configuration is taken from $HOME/.rubocop.yml 322s handles relative excludes correctly when run from project root 322s when MultilineMethodCallIndentation is used with aligned style and IndentationWidth parameter 322s fails with an error message 322s without using namespace 323s can be configured with option to disable a certain error 323s when a file inherits from a higher level 323s inherits relative excludes correctly 323s when errors are raised while processing files due to bugs 323s displays an error message to stderr 323s style guide only usage 323s via the cli option 323s --only-guide-cops 323s runs cops for rules that link to a style guide 323s overrides configuration of AllCops/StyleGuideCopsOnly 323s skips cops that have no link to a style guide 323s via the config 323s AllCops/StyleGuideCopsOnly 323s when it is false 323s runs cops for rules regardless of any link to the style guide 323s when it is true 323s skips cops that have no link to a style guide 323s AllCops/DisabledByDefault 323s when it is false 324s runs all cops that are enabled in default configuration 324s when it is true 324s runs only the cop configured in .rubocop.yml 324s configuration of `require` 324s unknown library is specified 324s exits with 2 324s configuration of target Ruby versions 324s when configured with an unknown version 324s fails with an error message 324s when configured with an unsupported ruby 324s fails with an error message 324s 324s RuboCop::Cop::Lint::NonDeterministicRequireOrder 324s when requiring files 324s when Ruby 3.0 or higher 324s with `Dir[]` 324s does not register an offense 324s with extra logic 324s does not register an offense 324s with top-level ::Dir 324s does not register an offense 324s with require block passed as parameter 324s does not register an offense 324s with `Dir.glob` 324s does not register an offense 324s with require block passed as parameter 324s does not register an offense 324s with top-level ::Dir 324s does not register an offense 324s with `sort: false` keyword option 324s does not register an offense 324s with direct block glob 324s does not register an offense 324s with top-level ::Dir 324s does not register an offense 324s with require block passed as parameter 324s does not register an offense 324s with sorted glob 324s does not register an offense 324s with sorted index 324s does not register an offense 324s when Ruby 2.7 or lower 324s with direct block glob 324s registers an offense and autocorrects to add .sort.each 324s with require block passed as parameter 324s registers an offense and autocorrects to add sort 324s with top-level ::Dir 324s registers an offense and corrects to add .sort.each 324s with require_relative block passed as parameter 324s registers an offense and autocorrects to add sort 324s with unsorted index 324s registers an offense with extra logic 324s registers an offense and autocorrects to add .sort when the block has `require_relative` 324s registers an offense and autocorrects to add .sort when the numblock has `require` 324s registers an offense and autocorrects to add .sort when the block has `require` 324s with require block passed as parameter 324s registers an offense an autocorrects to add sort 324s with require_relative block passed as parameter 324s registers an offense an autocorrects to add sort 324s with top-level ::Dir 324s registers an offense and corrects to add .sort 324s with unsorted glob 324s registers an offense and autocorrects to add .sort 324s with top-level ::Dir 324s registers an offense and corrects to add .sort 324s with require block passed as parameter 324s registers an offense an autocorrects to add sort 324s when not requiring files 324s does not register an offense 324s 324s RuboCop::Cop::Layout::FirstMethodParameterLineBreak 324s accepts methods without params 324s registers an offense and corrects params with default values 324s accepts single-line methods 324s registers an offense and corrects params on first line of singleton method 324s accepts params without parens 324s registers an offense and corrects params listed on the first line 324s accepts params listed on a single line 324s 324s RuboCop::Cop::InternalAffairs::ExampleDescription 324s with `expect_offense` 324s registers an offense when given an improper description 324s does not register an offense when given a proper description 324s does not register an offense when given an unexpected description 324s with `expect_no_corrections` 324s registers an offense when given an improper description 324s in conjunction with expect_offense 324s registers an offense when given an improper description 324s when not making an expectation on offenses 324s does not register an offense 324s with `expect_no_offenses` 324s registers an offense when given an improper description 324s does not register an offense when given a proper description 324s does not register an offense when given an unexpected description 324s does not crash when given a proper description that is split with + 324s with `expect_correction` 324s registers an offense when given an improper description 324s in conjunction with expect_offense 324s registers an offense when given an improper description 324s when the description is invalid for both methods 324s registers an offense for the first method encountered 324s 324s RuboCop::Cop::Style::DoubleCopDisableDirective 324s does not register an offense for cops with single cop directive 324s registers an offense for duplicate todo directives 324s registers an offense for duplicate disable directives 324s 324s RuboCop::Cop::Corrector 324s #rewrite 324s allows removal of characters from range ending 324s allows replacement of a range 324s accepts a node instead of a range 324s allows insertion after a source range 324s allows removal of characters preceding range 324s allows insertion before and after a source range 324s allows removal of a range 324s raises a useful error if not given a node or a range 324s allows removal of characters from range beginning 324s allows insertion before a source range 324s when range is from incorrect source 324s raises exception from replace 324s raises exception from insert_after 324s raises exception from remove 324s raises exception from remove_leading 324s raises exception from remove_trailing 324s raises exception from insert_before 324s raises exception from remove_preceding 324s 324s RuboCop::Cop::Security::IoMethods 324s when using `IO` receiver and string argument that starts with a pipe character (`"| command"`) 324s behaves like accepts 324s does not register an offense when using `IO.readlines("| command")` 324s behaves like accepts 324s does not register an offense when using `IO.foreach("| command") { |x| puts x }` 324s behaves like accepts 324s does not register an offense when using `IO.write("| command", "hi")` 324s behaves like accepts 324s does not register an offense when using `IO.binwrite("| command", "hi")` 324s behaves like accepts 324s does not register an offense when using `IO.read("| command")` 324s when using `IO` receiver and string argument 324s registers and corrects an offense when using `foreach` 324s behaves like offense 324s registers and corrects an offense when using `read` 324s behaves like offense 324s registers and corrects an offense when using `readlines` 324s behaves like offense 324s registers and corrects an offense when using `binwrite` 324s behaves like offense 324s registers and corrects an offense when using `binwrite` 324s behaves like offense 324s registers and corrects an offense when using `write` 324s when using `IO` receiver and string argument that starts with a pipe character (`" | command"`) 324s behaves like accepts 324s does not register an offense when using `IO.read(" | command")` 324s behaves like accepts 324s does not register an offense when using `IO.write(" | command", "hi")` 324s behaves like accepts 324s does not register an offense when using `IO.foreach(" | command") { |x| puts x }` 324s behaves like accepts 324s does not register an offense when using `IO.binwrite(" | command", "hi")` 324s behaves like accepts 324s does not register an offense when using `IO.readlines(" | command")` 324s when using `File` receiver 324s behaves like accepts 324s does not register an offense when using `File.readlines(path)` 324s behaves like accepts 324s does not register an offense when using `File.binread(path)` 324s behaves like accepts 324s does not register an offense when using `File.binwrite(path, "hi")` 324s behaves like accepts 324s does not register an offense when using `File.read(path)` 324s behaves like accepts 324s does not register an offense when using `File.foreach(path) { |x| puts x }` 324s when using no receiver 324s behaves like accepts 324s does not register an offense when using `readlines("command")` 324s behaves like accepts 324s does not register an offense when using `foreach("command") { |x| puts x }` 324s behaves like accepts 324s does not register an offense when using `binwrite("command", "hi")` 324s behaves like accepts 324s does not register an offense when using `write("command", "hi")` 324s behaves like accepts 324s does not register an offense when using `read("command")` 324s when using `IO` receiver and variable argument 324s registers and corrects an offense when using `foreach` 324s behaves like offense 324s registers and corrects an offense when using `binwrite` 324s behaves like offense 324s registers and corrects an offense when using `write` 324s behaves like offense 324s registers and corrects an offense when using `read` 324s behaves like offense 324s registers and corrects an offense when using `readlines` 324s behaves like offense 324s registers and corrects an offense when using `binread` 324s 324s RuboCop::Cop::VariableForce 324s #process_node 324s when processing an empty regex 324s does not raise an error 324s when processing lvar node 324s when the variable is not yet declared 324s does not raise error 324s when processing a regex with regopt 324s does not raise an error 324s when processing a regexp with a line break at the start of capture parenthesis 324s does not raise an error 324s 324s RuboCop::Cop::Lint::AmbiguousOperator 324s when using safe navigation operator with a unary operator 324s does not register an offense 324s with `-` unary operator in the first argument 324s with parentheses around the operator 324s does not register an offense 324s without parentheses 324s with a whitespace on the right of the operator 324s does not register an offense 324s without whitespaces on the right of the operator 324s registers an offense and corrects 324s with a block ampersand in the first argument 324s without parentheses 324s with a whitespace on the right of the operator 324s does not register an offense 324s without whitespaces on the right of the operator 324s registers an offense and corrects 324s with parentheses around the block argument 324s does not register an offense 324s with a splat operator in the first argument 324s with parentheses around the splatted argument 324s does not register an offense 324s without parentheses 324s with a whitespace on the right of the operator 324s does not register an offense 324s without whitespaces on the right of the operator 324s registers an offense and corrects 324s with `+` unary operator in the first argument 324s without parentheses 324s without whitespaces on the right of the operator 324s registers an offense and corrects 324s without whitespaces on the right of the operator when a method with no arguments is used in advance 324s registers an offense and corrects 324s with a whitespace on the right of the operator 324s does not register an offense 324s with parentheses around the operator 324s does not register an offense 324s with a keyword splat operator in the first argument 324s with parentheses around the keyword splat operator 324s does not register an offense 324s without parentheses 324s with a whitespace on the right of the operator 324s does not register an offense 324s without whitespaces on the right of the operator 324s registers an offense and corrects 324s 324s RuboCop::Cop::Style::HashTransformValues 324s when using Ruby 2.4 or newer 324s does not flag `Hash[_.map{...}]` when its receiver is `zip` 324s does not flag `each_with_object` when its receiver is `zip` 324s correctly autocorrects _.map{...}.to_h with block 324s flags _.map {...}.to_h when transform_values could be used 324s does not flag _.map{...}.to_h when both key & value are transformed 324s does not flag each_with_object when its argument is not modified 324s flags _.map {...}.to_h when transform_values could be used when wrapped in another block 324s does not flag each_with_object when receiver is array literal 324s does not flag `each_with_object` when its argument is used in the value 324s does not flag `Hash[_.map{...}]` when its receiver is `each_with_index` 324s does not flag `_.map{...}.to_h` when its receiver is `each_with_index` 324s does not flag `Hash[_.map{...}]` when its receiver is `with_index` 324s does not flag value transformation in the absence of to_h 324s does not flag _.map {...}.to_h when value block argument is unused 324s does not flag each_with_object when value transformation uses key 324s does not flag value transformation when receiver is array literal 324s does not flag `each_with_object` when its receiver is `with_index` 324s does not flag `Hash[_.map{...}]` when its receiver is an array literal 324s does not flag `_.map{...}.to_h` when its receiver is `with_index` 324s does not flag each_with_object when no transformation occurs 324s flags _.map {...}.to_h when transform_values could be used when line break before `to_h` 324s does not flag Hash[_.map{...}] when both key & value are transformed 324s does not flag each_with_object when both key & value are transformed 324s does not flag `_.map{...}.to_h` when its receiver is `zip` 324s flags Hash[_.map{...}] when transform_values could be used 324s does not flag `each_with_object` when its receiver is `each_with_index` 324s with safe navigation operator 325s flags each_with_object when transform_values could be used 325s with multiline block 325s flags each_with_object when transform_values could be used 325s with inline block 325s flags each_with_object when transform_values could be used 325s below Ruby 2.4 325s does not flag even if transform_values could be used 325s when using Ruby 2.6 or newer 325s register and corrects an offense _.to_h{...} when value is a hash literal and is enclosed in braces 325s does not flag `_.to_h{...}` when its receiver is `each_with_index` 325s does not flag `_.to_h{...}` when its receiver is `zip` 325s does not flag _.to_h {...} when value block argument is unused 325s flags _.to_h{...} when transform_values could be used 325s does not flag `_.to_h{...}` when both key & value are transformed 325s does not flag `_.to_h{...}` when its receiver is an array literal 325s register and corrects an offense _.to_h{...} when value is a hash literal and is not enclosed in braces 325s does not flag `_.to_h{...}` when its receiver is `with_index` 325s below Ruby 2.6 325s does not flag _.to_h{...} 325s 325s RuboCop::Cop::InternalAffairs::RedundantLetRuboCopConfigNew 325s registers an offense when using `let(:config)` and `:config` is not specified in `describe` 325s registers an offense when using `let(:config)` with no argument `RuboCop::Config.new` and `:config` is specified 325s does not register an offense when using `let(:config)` with arguments to `RuboCop::Config.new` 325s registers an offense when using `let(:config)` and `:config` is already specified in `describe` 325s 325s RuboCop::Cop::Team 325s #forces 325s returns force instances 325s when a cop joined a force 325s returns the force 325s when no cops joined force 325s returns nothing 325s when multiple cops joined a same force 325s returns only one force instance 325s #debug? 325s when the option argument of .new is omitted 325s is expected to be falsey 325s when { debug: true } is passed to .new 325s is expected to be truthy 325s when incompatible cops are correcting together 325s autocorrects without SyntaxError 325s .new 325s accepts cops directly classes 325s calls mobilize when passed classes 325s #external_dependency_checksum 325s does not error with no cops 325s when a cop joins 326s returns string 326s when multiple cops join 326s returns string 326s when cop with different checksum joins 326s has a different checksum for the whole team 326s #cops 326s returns cop instances 326s when some classes are disabled with config 326s does not return instances of the classes 326s when only some cop classes are passed to .new 326s returns only instances of the classes 326s #autocorrect? 326s when the option argument of .new is omitted 326s is expected to be falsey 326s when { autocorrect: true } is passed to .new 326s is expected to be truthy 326s #inspect_file 326s returns offenses 326s when a correction raises an error 326s records Team#errors 326s when Parser reports non-fatal warning for the file 326s returns offenses from cops 327s returns Parser warning offenses 327s when a cop has no interest in the file 327s returns all offenses except the ones of the cop 327s when autocorrection is enabled and file encoding is mismatch 327s no error occurs 327s when autocorrection is enabled 327s does autocorrection 327s still returns offenses 327s when done twice 327s allows cops to get ready 327s when Cop#on_* raises an error 328s records Team#errors 328s 328s RuboCop::Cop::Lint::PercentSymbolArray 328s detecting colons or commas in a %i/%I string 328s registers an offense and corrects when one symbol has a colon but there are no commas 328s accepts tokens without colons or commas 328s registers an offense and corrects when there are no colons but one comma 328s registers an offense and corrects when there are no colons but one comma 328s accepts likely false positive $, 328s accepts likely false positive $, 328s registers an offense and corrects when symbols contain colons and are comma separated 328s registers an offense and corrects when symbols contain colons and are comma separated 328s registers an offense and corrects when one symbol has a colon but there are no commas 328s accepts tokens without colons or commas 328s with binary encoded source 328s registers an offense and corrects when tokens contain quotes 328s accepts if tokens contain no quotes 328s 328s RuboCop::Cop::Lint::ScriptPermission 328s with file permission 0755 328s accepts without shebang line 328s accepts with shebang line 328s accepts with blank 328s with stdin 328s skips investigation 328s with file permission 0644 328s registers an offense for script permission 328s if autocorrection is off 328s leaves the file intact 328s 328s RuboCop::Cop::Lint::UnexpectedBlockArity 328s registers multiple offenses 328s with a block 328s when given no parameters 328s registers an offense 328s with keyword args 328s registers an offense 328s when given a splat parameter 328s does not register an offense 328s with optargs 328s with arity 2 328s does not register an offense 328s with arity 1 328s registers an offense 328s when given three parameters 328s does not register an offense 328s when given two parameters 328s does not register an offense 328s when given one parameter 328s registers an offense 328s when destructuring 328s with arity 2 328s does not register an offense 328s with arity 1 328s registers an offense 328s with no receiver 328s does not register an offense 328s with a keyword splat 328s registers an offense 328s with shadow args 328s registers an offense 328s with a numblock 328s when given two parameters 328s does not register an offense 328s with no receiver 328s does not register an offense 328s when given one parameter 328s registers an offense 328s when given no parameters 328s registers an offense 328s when using enough parameters, but not all explicitly 328s does not register an offense 328s when given three parameters 328s does not register an offense 328s 328s RuboCop::Formatter::AutoGenConfigFormatter 328s #finished 328s calls #report_summary 328s when any offenses are detected 328s does not report offenses 328s outputs report summary 328s when no offenses are detected 328s does not report offenses 328s #report_file_as_mark 328s when different severity offenses are detected 328s prints highest level mark 328s when a refactor convention offense is detected 328s prints "C" 328s when a refactor severity offense is detected 328s prints "R" 328s when no offenses are detected 328s prints "." 328s 328s RuboCop::Cop::InternalAffairs::OffenseLocationKeyword 328s does not register an offense when the `loc` is on a child node 328s does not register an offense when the `loc` is on a different node 328s when `node.loc.selector` is passed 328s registers an offense if message argument is passed 328s registers an offense 328s 328s RuboCop::Cop::Commissioner 328s #investigate 328s traverses the AST and invoke cops specific callbacks 328s stores all errors raised by the cops 328s when given a source with parsing errors 328s only calls on_other_file 328s when a cop reports offenses 328s returns all offenses found by the cops 328s when passed :raise_cop_error option 328s re-raises the exception received while processing 328s when passed :raise_error option 328s re-raises the exception received while processing 328s traverses the AST with on_send / on_csend 328s for unrestricted cops 328s calls on_send all method calls 328s for a restricted cop 328s calls on_send for the right method calls 328s on both csend and send 328s calls on_send for the right method calls 328s when given a force 328s passes the input params to all cops/forces that implement their own #investigate method 328s 328s RuboCop::Cop::Lint::RedundantWithIndex 328s registers an offense when using `ary.each.with_index(1) { |v| v }` and correct to `ary.each { |v| v }` 328s registers an offense when using `ary.each_with_object([]).with_index { |v| v }` and corrects to `ary.each_with_object([]) { |v| v }` 328s accepts an index is used as a block argument 328s registers an offense when using `ary.each.with_index { |v| v }` and corrects to `ary.each` 328s registers an offense for `ary.each_with_index { |v| v }` and corrects to `ary.each` 328s Ruby 2.7 328s registers an offense for `ary.each_with_index { _1 }` and corrects to `ary.each` 328s accepts an index is used as a numblock argument 328s registers an offense when using `ary.each.with_index { _1 }` and corrects to `ary.each` 328s 328s RuboCop::Cop::Lint::SendWithMixinArgument 328s registers an offense when using `__send__` method 328s registers an offense when using `send` with `prepend` 328s does not register an offense when using `extend` 328s registers an offense when using `send` with `extend` 328s registers an offense when using `send` with `include` 328s does not register an offense when using `prepend` 328s does not register an offense when using `include` 328s registers an offense when using `public_send` method 328s does not register an offense when not using a mixin method 328s when specifying a mixin method as a string 328s registers an offense when using `send` with `include` 328s registers an offense when using `send` with `prepend` 328s registers an offense when using `send` with `extend` 328s when using namespace for module 328s registers an offense when using `send` with `include` 328s 328s RuboCop::Cop::Style::InfiniteLoop 328s registers an offense for while true or until false if loop {} would work because of an earlier assignment 328s registers an offense for a while loop with 1 as condition 328s registers an offense for a while loop with 2.0 as condition 328s accepts modifier while true if loop {} would change semantics 328s accepts while true if loop {} would change semantics 328s registers an offense for a while loop with {} as condition 328s accepts Kernel#loop 328s registers an offense for a until loop with nil as condition 328s registers an offense for while true if loop {} would work because it is an instance variable being assigned 328s registers an offense for until false if loop {} would work because the assigned variable is not used afterwards 328s registers an offense for until false if loop {} would work because of previous assignment in a while loop 328s registers an offense for a while loop with [1] as condition 328s registers an offense for modifier until false if loop {} would not change semantics 328s registers an offense for a until loop with false as condition 328s behaves like autocorrector 328s autocorrects single line modifier while 328s autocorrects single line modifier while with and 328s autocorrects the usage of while without do 328s autocorrects the usage of while with do 328s autocorrects begin-end-while with two statements 328s autocorrects begin-end-while with one statement 328s with non-default indentation width 328s autocorrects multi-line modifier while and indents correctly 328s behaves like autocorrector 328s autocorrects the usage of until with do 328s autocorrects begin-end-until with two statements 328s autocorrects begin-end-until with one statement 328s autocorrects single line modifier until 328s autocorrects single line modifier until with and 328s autocorrects the usage of until without do 328s with non-default indentation width 328s autocorrects multi-line modifier until and indents correctly 328s 328s RuboCop::Cop::Layout::EmptyComment 328s registers an offense and corrects using an empty comment next to code 328s registers an offense and corrects an empty comment without space next to code 328s does not register an offense when using comment text 328s registers an offense and corrects using multiline empty comments 328s does not register an offense when using comment text with leading and trailing blank lines 328s register offenses and correct multiple aligned empty comments next to code 328s registers an offense and corrects using single line empty comment 328s register offenses and correct multiple empty comments next to code 328s allow margin comment (default) 328s does not register an offense when using margin comment 328s allow border comment (default) 328s does not register an offense when using border comment 328s disallow border comment 328s registers an offense and corrects using single line empty comment 328s registers an offense and corrects using border comment 328s disallow margin comment 328s registers an offense and corrects using margin comment 328s 328s RuboCop::Cop::Style::MethodCallWithArgsParentheses 328s when EnforcedStyle is omit_parentheses 328s accepts special lambda call syntax 328s accepts parens in ternary condition calls 328s accepts parens in method args 328s register an offense for %r regex literal as arguments 328s accepts parens in calls with args with logical operators 328s accepts parens in literals with unary operators as first argument 328s register an offense for camel-case methods with arguments 328s register an offense for yield call with parens 328s accepts parens in camel case method without args 328s accepts parens in chained method calls 328s autocorrects complex multi-line calls 328s accepts parens in assignment in conditions 328s accepts parens in nested method args 328s register an offense for parens in do-end blocks 328s accepts parens in super without args 328s register an offense in complex conditionals 328s register an offense for parens in method call without args 328s accepts parens in calls with logical operators 328s accepts parens in blocks with braces 328s accepts no parens in method call with args 328s accepts no parens in method call without args 328s accepts parens in slash regexp literal as argument 328s accepts parens in args with ternary conditions 328s accepts parens in chaining with operators 328s accepts parens in args splat 328s accepts parens in default argument value calls 328s accepts parens in implicit #to_proc 328s register an offense for parens in string interpolation 328s register an offense in assignments 328s accepts parens in chaining with safe operators 328s register an offense in multi-line inheritance 328s register an offense for parens in the last chain 328s accepts parens in operator method calls 328s autocorrects single-line calls 328s autocorrects multi-line calls with trailing whitespace 328s accepts parens in super method calls as arguments 328s accepts parens in block passing calls 328s accepts parens in argument calls with braced blocks 328s accepts parens in splat calls 328s accepts parens in calls with hash as arg 328s register an offense for hashes in keyword values 328s accepts parens in default keyword argument value calls 328s accepts parens in range literals 328s register an offense for multi-line method calls 328s accepts parens in single-line inheritance 328s accepts parens in super calls with braced blocks 328s register an offense for superclass call with parens 328s accepts parens in yield argument method calls 328s allowing parens in camel-case methods 328s accepts parens for camel-case method names 328s forwarded arguments in 3.0 328s accepts parens for forwarded arguments 328s forwarded arguments in 2.7 328s accepts parens for forwarded arguments 328s allowing parens in multi-line calls 328s accepts parens for multi-line calls 328s behaves like endless methods 328s endless methods 328s with arguments 328s requires method calls to have parens 328s without arguments 328s registers an offense for `defs` when there are parens 328s does not register an offense for `defs` when there are arguments 328s does not register an offense when there are no parens 328s registers an offense when there are parens 328s does not register an offense when there are arguments 328s allowing parenthesis in chaining 328s register offense for multi-line chaining without previous parens 328s register offense for single-line chaining without previous parens 328s accepts parens in the last call if any previous calls with parentheses 328s accepts no parens in the last call if previous calls with parens 328s hash value omission in 3.1 328s registers an offense using assignment with parentheses call expr follows 328s does not register an offense when hash value omission with parentheses and using modifier form 328s registers an offense when last argument is a hash value omission 328s registers an offense when with parentheses call expr follows 328s does not register an offense when without parentheses call expr follows 328s registers and corrects an offense when explicit hash value with parentheses and using modifier form 328s numbered parameters in 2.7 328s accepts parens for braced numeric block calls 328s when inspecting macro methods with IncludedMacros 328s in a class body 328s finds offense 328s for a macro in both IncludedMacros and AllowedMethods 328s allows 328s in a module body 328s finds offense 328s for a macro not on the included list 328s allows 328s behaves like endless methods 328s endless methods 328s with arguments 328s requires method calls to have parens 328s without arguments 328s does not register an offense when there are parens 328s does not register an offense for `defs` when there are parens 328s does not register an offense when there are no parens 328s does not register an offense when there are arguments 328s does not register an offense for `defs` when there are arguments 328s allowing parens in string interpolation 328s accepts parens for camel-case method names 328s when EnforcedStyle is require_parentheses (default) 328s autocorrects calls where the argument node is a number 328s autocorrects calls where the argument node is a constant 328s accepts no parens for operators 328s accepts no parens in method call without args 328s autocorrects calls with multiple args by adding needed braces 328s accepts parens in method call with args 328s register no offense for superclass call with parens 328s autocorrects fully parenthesized args by removing space 328s accepts no parens for unary operators 328s register an offense for method call without parens 328s register an offense for methods starting with capital without parens 328s register no offense for yield without args 328s register an offense for yield without parens 328s register no offense for superclass call without args 328s autocorrects calls where arg is method call 328s autocorrects calls where multiple args are method calls 328s accepts parens in method call with do-end blocks 328s accepts no parens for setter methods 328s autocorrects partially parenthesized args by adding needed braces 328s register an offense for non-receiver method call without parens 328s autocorrects parenthesized args for local methods by removing space 328s register an offense for superclass call without parens 328s autocorrects call with multiple args by adding braces 328s behaves like endless methods 328s endless methods 328s without arguments 328s does not register an offense for `defs` when there are parens 328s does not register an offense when there are arguments 328s does not register an offense for `defs` when there are arguments 328s does not register an offense when there are parens 328s does not register an offense when there are no parens 328s with arguments 328s requires method calls to have parens 328s when using safe navigation operator 328s register an offense for method call without parens 328s AllowedPatterns 328s ignored methods listed in AllowedPatterns 328s when inspecting macro methods 328s in a class body 328s does not register an offense 328s in a module body 328s does not register an offense 328s with AllowedMethods 328s allow method listed in AllowedMethods 328s 328s RuboCop::Cop::Style::RedundantSelfAssignment 328s does not register an offense when assigning to attribute of `self` the result from other object 328s does not register an offense when there is no a receiver 328s registers an offense and corrects when assigning to attribute of `self` 328s does not register an offense when lhs and receiver are different 328s registers an offense and corrects when assigning to attribute of non `self` 328s when lhs and receiver are the same 328s registers an offense and corrects when assigning to class variable 328s registers an offense and corrects when assigning to local variable 328s registers an offense and corrects when assigning to global variable 328s registers an offense and corrects when assigning to instance variable 328s 328s RuboCop::Cop::Style::MultilineIfModifier 328s unless guard clause 328s registers an offense 328s registers an offense when indented 328s allows a multiline condition 328s allows a one liner 328s if guard clause 328s registers an offense when indented 328s allows a one liner 328s allows a multiline condition 328s registers an offense 328s 328s RuboCop::Cop::Bundler::OrderedGems 328s When gem groups is separated by multiline comment 328s with TreatCommentsAsGroupSeparators: false 328s registers an offense 328s with TreatCommentsAsGroupSeparators: true 328s accepts 328s When gems are alphabetically sorted 328s does not register any offenses 328s When a gem is sorted but not so when disregarding _- 328s by default 328s registers an offense 328s when ConsiderPunctuation is true 328s does not register an offense 328s When a gem that starts with a capital letter is not sorted 328s registers an offense 328s When each individual group of line is sorted 328s does not register any offenses 328s When the gemfile is empty 328s does not register any offenses 328s when a gem is referenced from a variable 328s resets the sorting to a new block 328s ignores the line 328s When there are duplicated gems in group 328s registers an offense 328s When gems have an inline comment, and not sorted 328s registers an offense 328s When a gem declaration takes several lines 328s registers an offense 328s When gems are not alphabetically sorted 328s registers an offense 328s When each individual group of line is not sorted 328s registers some offenses 328s When gems are asciibetically sorted irrespective of _ 328s does not register an offense 328s When a gem that starts with a capital letter is sorted 328s does not register an offense 328s 328s RuboCop::Cop::Lint::FlipFlop 329s registers an offense for exclusive flip-flops 329s registers an offense for inclusive flip-flops 329s 329s RuboCop::Cop::Style::SlicingWithRange 329s >= Ruby 2.6 329s reports an offense for slicing to ..-1 329s reports no offense for array with range inside 329s reports no offense for other methods 329s reports an offense for slicing from expression to ..-1 329s reports no offense for excluding end 329s <= Ruby 2.5 329s reports no offense for array slicing with -1 329s >= Ruby 2.7 329s reports no offense for startless 329s 329s RuboCop::Cop::Lint::StructNewOverride 329s registers an offense using `Struct.new(string, ...symbols)` 329s registers an offense using `Struct.new(...symbols)` 329s does not register an offense with no overrides 329s does not register an offense with an override within a given block 329s registers an offense using `Struct.new(...)` with a block 329s registers an offense using `Struct.new(symbol, string)` 329s registers an offense using `::Struct.new(symbol)` 329s registers an offense using `Struct.new(symbol)` 329s registers an offense using `Struct.new(...)` with an option argument 329s registers an offense using `Struct.new(...)` with multiple overrides 329s 329s RuboCop::Cop::Style::NegatedIf 329s does not blow up for empty unless condition 329s does not blow up for empty if condition 329s does not blow up on a negated ternary operator 329s does not blow up for ternary ops 329s with “both” style 329s autocorrects by replacing parenthesized if not with unless 329s registers an offense for if with exclamation point condition 329s registers an offense for if with "not" condition 329s accepts an if/else with negative condition 329s is not confused by negated elsif 329s accepts an if where the condition is doubly negated 329s accepts an if where only part of the condition is negated 329s with “postfix” style 329s does not register an offense for prefix 329s registers an offense for postfix 329s with “prefix” style 329s registers an offense for prefix 329s does not register an offense for postfix 329s 329s RuboCop::Cop::Style::HashAsLastArrayItem 329s when EnforcedStyle is no_braces 329s does not register an offense when passing an implicit array to a setter 329s does not register an offense when hash is not inside array 329s does not register an offense when hash without braces 329s registers an offense and corrects when hash with braces 329s does not register an offense when hash is not the last element 329s registers an offense and corrects when hash with braces and trailing comma 329s does not register an offense when the hash is empty 329s does not register an offense when the array is all hashes 329s registers an offense and corrects when hash with braces and trailing comma and new line 329s when EnforcedStyle is braces 329s does not register an offense when hash is not inside array 329s does not register an offense when using double splat operator 329s does not register an offense when the array is all hashes 329s does not register an offense when hash with braces 329s does not register an offense when the hash is empty 329s registers an offense and corrects when hash without braces 329s 329s RuboCop::Cop::Lint::DuplicateRequire 329s does not register an offense when same feature argument but different require method 329s registers and corrects an offense when duplicate requires are interleaved with some other code 329s does not register an offense when calling user-defined `require` method 329s registers and corrects an offense when duplicate `require_relative` is detected 329s registers and corrects an offense when duplicate `require` is detected 329s registers and corrects an offense for multiple duplicate requires 329s does not register an offense when using single `require` 329s registers and corrects an offense for duplicate non top-level requires 329s registers and corrects an offense when duplicate `require` through `Kernel` is detected 329s does not register an offense when there are no duplicate `require`s 329s 329s RuboCop::Cop::Naming::PredicateName 329s with method definition macros 329s registers an offense when using an internal affair macro 329s accepts method name when corrected name is invalid identifier 329s registers an offense when using `define_method` 329s with permitted predicate names 329s accepts method name which is in permitted list 329s without method definition macros 329s accepts method name when corrected name is invalid identifier 329s registers an offense when using `define_method` 329s does not register any offenses when using an internal affair macro 329s without restricted prefixes 329s accepts method name when corrected name is invalid identifier 329s registers an offense when method name starts with "has" 329s registers an offense when method name starts with "is" 329s accepts method name that starts with unknown prefix 329s with restricted prefixes 329s accepts method name that is an assignment 329s registers an offense when method name starts with "is" 329s accepts method name when corrected name is invalid identifier 329s accepts method name that starts with unknown prefix 329s registers an offense when method name starts with "has" 329s 329s RuboCop::Cop::Layout::EmptyLinesAroundBlockBody 329s when EnforcedStyle is empty_lines for do end block 329s is not fooled by single line blocks 329s registers an offense for block body not starting or ending with a blank 329s ignores block with an empty body 329s when EnforcedStyle is no_empty_lines for { } block 329s is not fooled by single line blocks 329s registers an offense for block body starting with a blank 329s registers an offense for block body starting with a blank passed to a multi-line method call 329s accepts block body starting with a line with spaces 329s registers an offense for block body ending with a blank 329s Ruby 2.7 329s registers an offense for block body ending with a blank 329s when EnforcedStyle is empty_lines for { } block 329s is not fooled by single line blocks 329s registers an offense for block body not starting or ending with a blank 329s ignores block with an empty body 329s when EnforcedStyle is no_empty_lines for do end block 329s accepts block body starting with a line with spaces 329s is not fooled by single line blocks 329s registers an offense for block body starting with a blank 329s registers an offense for block body starting with a blank passed to a multi-line method call 329s registers an offense for block body ending with a blank 329s Ruby 2.7 329s registers an offense for block body ending with a blank 329s 329s RuboCop::Cop::Layout::TrailingWhitespace 329s registers an offense for a blank line with space 329s registers an offense for a line ending with tab 329s is not fooled by __END__ within a documentation comment 329s autocorrects unwanted space 329s registers offenses before __END__ but not after 329s is not fooled by heredoc containing __END__ within a doc comment 329s registers an offense for a tab in a heredoc 329s registers an offense for a line ending with space 329s is not fooled by heredoc containing __END__ 329s registers an offense for trailing whitespace in a heredoc string 329s accepts a line without trailing whitespace 329s when `AllowInHeredoc` is set to true 329s accepts trailing whitespace in a heredoc string 329s registers an offense for trailing whitespace at the heredoc begin 329s when `AllowInHeredoc` is set to false 329s corrects safely trailing whitespace in a heredoc string 329s corrects a whitespace line in a heredoc string that is longer than the indentation 329s does not correct trailing whitespace in a static heredoc string 329s corrects by removing trailing whitespace used for indentation in a heredoc string 329s 329s RuboCop::Cop::Style::UnlessLogicalOperators 329s EnforcedStyle is `forbid_logical_operators` 329s registers an offense when using only `&&` 329s registers an offense when using `&&` followed by || 329s does not register an offense when using if 329s does not register an offense when not used in unless 329s does not register an offense when not using logical operator 329s registers an offense when using only `or` 329s registers an offense when using only `||` 329s registers an offense when using only `and` 329s EnforcedStyle is `forbid_mixed_logical_operators` 329s does not register an offense when using `&&` operator and invoked method name includes "and" in the conditional branch 329s does not register an offense when not using logical operator 329s registers an offense when using `&&` and `or` 329s does not register an offense when using only `||`s 329s does not register an offense when using only `&&`s 329s registers an offense when using `||` and `or` 329s does not register an offense when not used in unless 329s does not register an offense when using `||` operator and invoked method name includes "or" in the conditional branch 329s does not register an offense when using if 329s registers an offense when using `&&` and `and` 329s registers an offense when using `||` and `and` 329s does not register an offense when using only `and`s 329s does not register an offense when using only `or`s 329s registers an offense when using `&&` and `||` 329s registers an offense when using parentheses 329s 329s RuboCop::Cop::Style::OptionalBooleanParameter 329s registers an offense when defining method with multiple optional boolean args 329s does not register an offense when defining method with keyword boolean arg 329s registers an offense when defining method with optional boolean arg 329s does not register an offense when defining method without args 329s registers an offense when defining method with optional boolean arg that has no space 329s registers an offense when defining class method with optional boolean arg 329s does not register an offense when defining method with optional non-boolean arg 329s when AllowedMethods is not empty 329s does not register an offense 329s 329s RuboCop::Cop::Lint::UnusedBlockArgument 329s when IgnoreEmptyBlocks config parameter is set 329s registers an offense for a non-empty block with an unused parameter 329s registers an offense for a non-empty block with multiple unused args 329s accepts an empty block with multiple unused parameters 329s accepts an empty block with a single unused parameter 329s inspection 329s when a lambda block takes arguments 329s and an argument is unused 329s registers an offense 329s and all the arguments are unused 329s registers offenses and suggests using a proc 329s when a block takes multiple arguments 329s and arguments are swap-assigned 329s accepts 329s and one argument is assigned to another, whilst other's value is not used 329s registers an offense 329s and all arguments are used 329s accepts 329s and a splat argument is unused 329s registers an offense and preserves splat 329s and all the arguments are unused 329s registers offenses and suggests omitting them 329s and unused arguments span multiple lines 329s registers offenses and suggests omitting them 329s and an argument is unused 329s registers an offense 329s and an argument with default value is unused 329s registers an offense and preserves default value 329s when an underscore-prefixed block argument is not used 329s accepts 329s when an optional keyword argument is unused 329s when the method call is not `define_method` 329s registers an offense 329s when AllowUnusedKeywordArguments set 329s does not care 329s when the method call is `define_method` 329s registers an offense 329s when AllowUnusedKeywordArguments set 329s does not care 329s when a block have a block local variable 329s and the variable is used 329s does not register offense 329s and the variable is unused 329s registers an offense 329s when a block takes single argument 329s and the argument is unused 329s registers an offense and suggests omitting that 329s and the method call is `define_method` 329s registers an offense 329s with an empty block 329s when configured to ignore empty blocks 329s does not register an offense 329s when not configured to ignore empty blocks 329s registers an offense 329s in a method calling `binding` without arguments 329s accepts all arguments 329s inside a method definition 329s registers offenses 329s when a method argument is not used 329s does not care 329s in a method calling `binding` with arguments 329s when a method argument is unused 329s registers an offense 329s when a variable is not used 329s does not care 329s 329s RuboCop::Cop::Layout::LineEndStringConcatenationIndentation 329s when EnforcedStyle is indented 329s accepts a heredoc string with interpolation 329s accepts string literal with line break concatenated with other string 329s registers an offense for unaligned third part of string 329s accepts indented strings in ordinary statement 329s accepts indented strings in implicit return statement of a method definition 329s accepts a multiline string literal 329s accepts indented strings 329s accepts an empty heredoc string with interpolation 329s accepts a heredoc string ... 329s accepts indented strings in implicit return statement of a method definition after other statement 329s registers an offense for aligned strings in an if/elsif/else statement 329s accepts single line string literal concatenation 329s registers an offense for aligned strings in hash literal values 329s accepts indented strings in implicit return statement of a singleton method definition 329s accepts indented strings in implicit return statement of a block 329s registers an offense for aligned string 329s for assignment with @x = 329s accepts indented strings 329s registers an offense for aligned strings 329s for assignment with x ||= 329s accepts indented strings 329s registers an offense for aligned strings 329s for assignment with x += 329s accepts indented strings 329s registers an offense for aligned strings 329s for assignment with $x = 329s registers an offense for aligned strings 329s accepts indented strings 329s for assignment with X = 329s accepts indented strings 329s registers an offense for aligned strings 329s when IndentationWidth is 1 329s accepts indented strings 329s for assignment with x = 329s registers an offense for aligned strings 329s accepts indented strings 329s when EnforcedStyle is aligned 329s registers an offense for third part of a string if it is aligned only with the first 329s accepts a heredoc string ... 329s accepts a multiline string literal 329s accepts indented strings in implicit return statement of a method definition after other statement 329s accepts indented strings in ordinary statement 329s accepts indented strings in implicit return statement of a singleton method definition 329s accepts single line string literal concatenation 329s accepts indented strings in implicit return statement of a block 329s accepts aligned strings in method call 329s accepts an empty heredoc string with interpolation 329s accepts string literal with line break concatenated with other string 329s registers an offense for aligned strings in an if/elsif/else statement 329s accepts a heredoc string with interpolation 329s registers an offense for unaligned strings in hash literal values 329s accepts indented strings in implicit return statement of a method definition 329s registers an offense for indented string 329s for assignment with x += 329s accepts aligned strings 329s registers an offense for indented strings 329s for assignment with x ||= 329s registers an offense for indented strings 329s accepts aligned strings 329s for assignment with X = 329s accepts aligned strings 329s registers an offense for indented strings 329s for assignment with @x = 329s registers an offense for indented strings 329s accepts aligned strings 329s for assignment with x = 329s registers an offense for indented strings 329s accepts aligned strings 329s for assignment with $x = 329s accepts aligned strings 329s registers an offense for indented strings 329s 329s RuboCop::Cop::Style::CollectionMethods 329s accepts collect without a block 329s accepts detect without a block 329s registers an offense for member? with proc param 329s accepts member? without a block 329s registers an offense for detect with an argument and proc param 329s accepts inject without a block 329s registers an offense for detect with proc param 329s registers an offense for member? with block 329s registers an offense for find_all with proc param 329s accepts find_all without a block 329s registers an offense for inject with proc param 329s registers an offense for collect with an argument and proc param 329s registers an offense for find_all with block 329s registers an offense for inject with an argument and proc param 329s registers an offense for inject with block 329s registers an offense for member? with an argument and proc param 329s registers an offense for collect with proc param 329s registers an offense for detect with block 329s registers an offense for find_all with an argument and proc param 329s registers an offense for collect with block 329s for methods that do not accept a symbol as implicit block 329s does not register an offense for a final symbol param 329s does not register an offense for a final symbol param with extra args 329s Ruby 2.7 329s registers an offense for collect with numblock 329s Ruby 2.7 329s registers an offense for member? with numblock 329s Ruby 2.7 329s registers an offense for inject with numblock 329s Ruby 2.7 329s registers an offense for find_all with numblock 329s for methods that accept a symbol as implicit block 329s registers an offense with an argument and final symbol param 329s registers an offense with a final symbol param 329s Ruby 2.7 329s registers an offense for detect with numblock 329s 329s RuboCop::Cop::Style::SoleNestedConditional 329s registers an offense and corrects when nested `||` operator condition 329s registers an offense and corrects when using `unless` and `||` without parens in the outer condition and nested modifier condition 329s registers an offense and corrects when using nested `if` within `unless` 329s registers an offense and corrects when using nested `if` modifier conditional 329s does not register an offense when using nested ternary within conditional 329s registers an offense and corrects when using nested `unless` modifier with a single expression condition 329s registers an offense and corrects when using nested `if` within `unless foo == bar` 329s registers an offense and corrects when using `||` in the outer condition 330s registers an offense and corrects when `unless` foo do_something end `if` bar 330s does not register an offense when nested conditional has an `else` branch 330s registers an offense and corrects for multiple nested conditionals with using method call outer condition by omitting parentheses 330s does not register an offense for nested conditionals when outer conditional has an `else` branch 330s registers an offense and corrects when using nested `if` within `if foo = bar` 330s registers an offense and corrects when `if` foo && bar do_something end `unless` baz 330s registers an offense and corrects when using nested `unless` modifier multiple conditional 330s registers an offense and corrects when using guard conditional with outer comment 330s registers an offense and corrects for multiple nested conditionals 330s registers an offense and corrects when using `unless` and multiple method arguments with parenthesesin the outer condition and nested modifier condition 330s registers an offense and corrects when using `unless` and `&&` without parens in the outer condition and nested modifier condition 330s registers an offense and corrects when there are outer and inline comments 330s registers an offense and corrects when `if` foo do_something end `unless` bar 330s registers an offense and corrects when using nested `unless` modifier conditional 330s does not register an offense when using nested modifier on value assigned in single condition 330s registers an offense and corrects when using `unless` and method arguments without parentheses in the outer condition and nested modifier condition 330s registers an offense and corrects when using nested `unless` within `if` 330s registers an offense and corrects when using `unless` and `||` and parens in the outer condition and nested modifier condition 330s registers an offense and corrects when using nested `if` within `if` 330s registers an offense and corrects when `if` foo do_something end `unless` bar && baz 330s registers an offense and corrects when using `unless` and method arguments with parentheses in the outer condition and nested modifier condition 330s registers an offense and corrects when `if` foo do_something end `if` bar 330s registers an offense and corrects when `if` foo do_something end `if` bar && baz 330s does not register an offense when no nested conditionals 330s registers an offense and corrects when using nested `unless` within `unless` 330s does not register an offense when using nested conditional within `elsif` 330s registers an offense and corrects when `if` foo && bar do_something end `if` baz 330s registers an offense and corrects when nested `||` operator modifier condition 330s registers an offense and corrects when `unless` foo && bar do_something end `if` baz 330s registers an offense and corrects when using nested conditional and branch contains a comment 330s does not register an offense when using nested conditional is not the whole body 330s does not register an offense when using nested modifier on value assigned in multiple conditions 330s registers an offense and corrects when using `||` in the outer condition and nested modifier condition 330s when AllowModifier is true 330s does not register an offense when using nested modifier conditional 330s when the inner condition has a send node with parens 330s in guard style 330s registers an offense and corrects 330s in modifier style 330s registers an offense and corrects 330s when disabling `Style/IfUnlessModifier` 330s registers an offense and corrects when using nested conditional and branch contains a comment 330s registers an offense and corrects when there are outer and inline comments 330s when the inner condition has a send node without parens 330s in modifier style 330s registers an offense and corrects 330s with a block 330s registers an offense and corrects 330s with a `csend` node 330s registers an offense and corrects 330s in guard style 330s registers an offense and corrects 330s 330s RuboCop::Formatter::PacmanFormatter 330s #step 330s character is ghost 330s removes the first • and puts a ghosts 330s character is a Pacdot 330s leaves the progress_line as it is 330s character is Pacman 330s removes the first • and puts a ᗧ 330s character is normal dot 330s removes the first • and puts a . 330s #update_progress_line 330s when total_files is greater than columns in the terminal 330s updates the progress_line properly 330s when need to change the line 330s updates the progress_line properly 330s when total_files less than columns in the terminal 330s updates the progress_line properly 330s #next_step 330s when a offense is detected in a file 330s calls the step function with a dot 330s when no offenses are detected 330s calls the step function with a dot 330s 330s RuboCop::Cop::Style::SymbolArray 330s when EnforcedStyle is percent 330s registers an offense for arrays of symbols 330s detects when the cop must be disabled to avoid offenses 330s does not register an offense if symbol contains whitespace 330s registers an offense in a non-ambiguous block context 330s does not register an offense for array starting with %i 330s does not register an offense for array with non-syms 330s detects right value for MinSize to use for --auto-gen-config 330s doesn't break when a symbol contains ) 330s uses %I when appropriate 330s autocorrects arrays of symbols with new line 330s autocorrects arrays of symbols with embedded newlines and tabs 330s autocorrects arrays of one symbol 330s when PreferredDelimiters is specified 330s autocorrects an array using partial newlines 330s autocorrects an array with delimiters 330s autocorrects an array in multiple lines 330s with non-default MinSize 330s does not autocorrect array of one symbol if MinSize > 1 330s when EnforcedStyle is brackets 330s autocorrects an array has interpolations 330s autocorrects an array starting with %i 330s does not register an offense for arrays of symbols 330s registers an offense for empty array starting with %i 330s registers an offense for array starting with %i 330s autocorrects multiline %i array 330s 330s RuboCop::Cop::Style::ClassAndModuleChildren 330s nested style 330s registers an offense for not nested classes 330s registers an offense for partially nested classes 330s registers an offense for not nested modules 330s accepts :: in parent class on inheritance 330s accepts cbase class name 330s registers an offense for not nested classes with explicit superclass 330s accepts cbase module name 330s accepts nested children 330s registers an offense for not nested classes when namespace is defined as a module 330s registers an offense for not nested classes when namespace is defined as a class 330s registers an offense for partially nested modules 330s preserves comments 330s compact style 330s accepts nesting for classes/modules with more than one child 330s registers and offense for deeply nested children 330s registers a offense for classes with nested one-liner children 330s accepts compact style for classes/modules 330s registers a offense for classes with nested children 330s accepts nesting for classes with an explicit superclass 330s correctly indents heavily nested children 330s preserves comments between classes 330s registers an offense for modules with partially nested children 330s accepts class/module with single method 330s registers a offense for modules with nested children 330s registers an offense for classes with partially nested children 330s 330s RuboCop::Cop::Offense 330s does not blow up if a message contains % 330s is frozen 330s redefines == to compare offenses based on their contents 330s overrides #to_s 330s has a few required attributes 330s #location 330s is frozen 330s when unknown severity is passed 330s raises error 330s #message 330s is frozen 330s #<=> 330s when receiver has {:cop=>"B"} and other has {:cop=>"A"} 330s returns 1 330s when receiver has {} and other has {} 330s returns 0 330s when receiver has {:line=>6, :col=>4} and other has {:line=>5, :col=>5} 330s returns 1 330s when receiver has {:line=>5, :col=>6} and other has {:line=>5, :col=>5} 330s returns 1 330s when receiver has {:line=>6} and other has {:line=>5} 330s returns 1 330s when receiver has {:col=>6, :cop=>"A"} and other has {:col=>5, :cop=>"B"} 330s returns 1 330s when receiver has {:line=>6, :cop=>"A"} and other has {:line=>5, :cop=>"B"} 330s returns 1 330s when the location is pseudo 330s returns a location with valid size and length 330s returns a line 330s returns a column range 330s returns a real column 330s returns a column length 330s returns a column 330s returns the last column 330s returns the first line 330s returns a source line 330s returns the last line 330s offenses that span multiple lines 330s highlights the first line 330s #severity_level 330s when severity is :info 330s is 1 330s when severity is :fatal 330s is 6 330s when severity is :refactor 330s is 2 330s offenses that span part of a line 330s highlights the first line 330s #cop_name 330s is frozen 330s #severity 330s is frozen 330s 330s RuboCop::Cop::Style::Proc 330s registers an offense for a Proc.new call 330s accepts the Proc.new call without block 330s registers an offense for ::Proc.new 330s accepts the ::Proc.new call without block 330s Ruby 2.7 330s registers an offense for a Proc.new call 330s 330s RuboCop::Formatter::MarkdownFormatter 330s outputs the cached result in Markdown 330s outputs the result in Markdown 330s 330s RuboCop::Cop::Style::RedundantReturn 330s reports an offense for defs with only a return 330s reports an offense for def ending with return with splat argument 330s reports an offense for defs ending with return 330s does not blow up on empty method body 330s reports an offense for def ending with return 330s reports an offense for def with only a return 330s does not blow up on empty if body 330s autocorrects by removing redundant returns 330s accepts return in a non-final position 330s when return is inside an if-branch 330s registers an offense and autocorrects 330s when return is inside a when-branch 330s registers an offense and autocorrects 330s when multi-value returns are not allowed 330s reports an offense for def ending with return 330s reports an offense for defs with only a return 330s reports an offense when multiple return values have a parenthesized return value 330s autocorrects by removing return when using an explicit hash 330s reports an offense for def with only a return 330s autocorrects by making an implicit hash explicit 330s reports an offense for defs ending with return 330s when case nodes are empty 330s accepts empty when nodes 330s when multi-value returns are allowed 330s accepts defs with only a return 330s accepts def ending with return 330s accepts def with only a return 330s accepts defs ending with return 330s when return has no arguments 330s behaves like common behavior 330s registers an offense for return() and autocorrects replacing return() with nil 330s behaves like common behavior 330s registers an offense for return and autocorrects replacing return with nil 330s when rescue and return blocks present 330s registers an offense and autocorrects when inside function or rescue block 330s registers an offense and autocorrects when rescue has else clause 330s when return is inside begin-end body 330s registers an offense and autocorrects 330s 330s RuboCop::Cop::InternalAffairs::CreateEmptyFile 330s registers an offense when using `create_file(path, '') 330s does not register an offense when using `create_file(path)` 330s does not register an offense when using `receiver.create_file(path, '')` 330s registers an offense when using `create_file(path, "") 330s does not register an offense when using `create_file(path, ['foo', 'bar'])` 330s does not register an offense when using `create_file(path, 'hello')` 330s 330s RuboCop::Cop::Style::AutoResourceCleanup 330s does not register an offense for File.open with block-pass 330s does not register an offense for File.open with immediate close 330s does not register an offense for File.open with block 330s registers an offense for File.open without block 330s 330s RuboCop::Cop::Style::NumericPredicate 330s when configured to enforce numeric predicate methods 330s when checking if a number is zero 330s allows comparing against a global variable 330s registers an offense 330s registers an offense with a complex expression 330s when comparing against a method argument variable 330s registers an offense with complex expression 330s registers an offense 330s when checking if a number is positive 330s when target ruby version is 2.2 or lower 330s does not register an offense 330s when target ruby version is 2.3 or higher 330s registers an offense in yoda condition 330s registers an offense 330s with a complex expression 330s registers an offense in yoda condition 330s registers an offense 330s when checking if a number is negative 330s when target ruby version is 2.3 or higher 330s registers an offense in yoda condition 330s registers an offense 330s with a complex expression 330s registers an offense in yoda condition 330s registers an offense 330s when target ruby version is 2.2 or lower 330s does not register an offense 330s with checking if a number is not zero 330s allows comparing against a complex expression 330s allows comparing against a global variable 330s allows comparing against a variable 330s when configured to enforce numeric comparison methods 330s registers an offense for checking if a number is positive 330s registers an offense for checking if a number is negative 330s registers an offense for checking if a number is zero 330s allows checking if a number is not zero 330s when there are allowed methods 330s simple method call 330s `EnforcedStyle` is `comparison` 330s allows checking if a number is zero 330s `EnforcedStyle` is `predicate` 330s allows checking if a number is zero 330s in argument 330s not ignored method 330s when checking if a number is negative 330s when target ruby version is 2.2 or lower 331s does not register an offense 331s when target ruby version is 2.3 or higher 331s registers an offense 331s when checking if a number is positive 331s when target ruby version is 2.3 or higher 331s registers an offense 331s when target ruby version is 2.2 or lower 331s does not register an offense 331s ignored method 331s with a regex 331s allows checking if a number is positive 331s allows checking if a number is negative 331s with a string 331s allows checking if a number is negative 331s allows checking if a number is positive 331s in block 331s not ignored method 331s registers an offense for checking if a number is negative 331s registers an offense for checking if a number is positive 331s ignored method 331s with a regex 331s allows checking if a number is positive 331s allows checking if a number is negative 331s with a string 331s allows checking if a number is negative 331s allows checking if a number is positive 331s 331s RuboCop::Cop::Style::GuardClause 331s registers an error with break in the else branch 331s doesn't register an error if condition has multiple lines 331s doesn't register an error if control flow expr has multiple lines 331s does not report an offense if next is inside elsif 331s registers an error if non-control-flow branch has multiple lines 331s doesn't register an error if control flow expr has multiple lines 331s registers an error if non-control-flow branch has multiple lines 331s does not report an offense if break is inside elsif 331s registers an offense when using `and return` in `then` branch 331s does not register an offense when assigning the result of a guard condition with `else` 331s registers an offense when using `and return` in `else` branch 331s registers an offense when using `|| raise` in `else` branch 331s registers an error with next in the else branch 331s does not report an offense if body is if..elsif..end 331s does not report an offense if raise "error" is inside if..elsif..else..end 331s does not report an offense if return is inside if..elsif..else..end 331s doesn't report an offense if condition has multiple lines 331s doesn't register an error if condition has multiple lines 331s registers an error with break in the if branch 331s does not report an offense if next is inside if..elsif..else..end 331s accepts a method which body does not end with if / unless 331s registers an error with return in the if branch 331s doesn't register an error if control flow expr has multiple lines 331s accepts a method which body is if / unless with else 331s accepts a method whose body is a modifier if / unless 331s registers an error with raise "error" in the if branch 331s does not report an offense if raise "error" is inside elsif 331s doesn't register an error if condition has multiple lines 331s registers an offense when using `|| raise` in `then` branch 331s does not report an offense if break is inside if..elsif..else..end 331s registers an error if non-control-flow branch has multiple lines 331s registers an error with raise "error" in the else branch 331s doesn't register an error if control flow expr has multiple lines 331s registers an error with next in the if branch 331s accepts a method with empty parentheses as its body 331s registers an error if non-control-flow branch has multiple lines 331s does not report an offense if return is inside elsif 331s doesn't register an error if condition has multiple lines 331s registers an error with return in the else branch 331s behaves like reports offense 331s reports an offense if method body is if / unless without else 331s reports an offense if method body ends with if / unless without else 331s with Metrics/MaxLineLength enabled 331s when the correction is too long for a single line 331s with a nested `if` node 331s does registers an offense 331s with a nested `begin` node 331s does registers an offense 331s with a trivial body 331s does not register an offense 331s AllowConsecutiveConditionals: false 331s reports an offense when not allowed same depth multiple if statement andpreceding expression is a conditional at the same depth 331s Invalid MinBodyLength 331s fails with an error 331s MinBodyLength: 4 331s accepts a method whose body has 3 lines 331s MinBodyLength: 1 331s reports an offense for if whose body has 1 line 331s AllowConsecutiveConditionals: true 331s does not register an offense when allowed same depth multiple if statement andpreceding expression is not a conditional at the same depth 331s reports an offense when allowed same depth multiple if statement andpreceding expression is not a conditional at the same depth 331s method in module 331s registers an offense for singleton methods 331s registers an offense for instance method 331s behaves like reports offense 331s reports an offense if method body is if / unless without else 331s reports an offense if method body ends with if / unless without else 331s with Metrics/MaxLineLength disabled 331s registers an offense with modifier example code regardless of length 331s 331s RuboCop::Cop::Style::LineEndConcatenation 331s registers an offense for string concat with << at line end 331s autocorrects a + with \ to just \ 331s accepts string concat at line end when followed by a comment line 331s registers multiple offenses when there are chained concatenationscombined with << calls 331s autocorrects a + with trailing whitespace to \ 331s registers multiple offenses when there are chained concatenations 331s accepts string concat at line end for special strings like __FILE__ 331s registers multiple offenses when there are chained << methods 331s accepts string concat with a return value of method on a string 331s autocorrects only the lines that should be autocorrected 331s registers offenses only for the appropriate lines in chained concats 331s registers an offense for string concat at line end 331s registers an offense for string concat with << and \ at line ends 331s accepts string concat on the same line 331s accepts string concat at line end when followed by comment 331s registers an offense for dynamic string concat at line end 331s registers an offense for dynamic string concat with << at line end 331s accepts string concat with a return value of method on an interpolated string 331s accepts string concat at line end when % literals are involved 331s 331s RuboCop::Cop::Style::RedundantCapitalW 331s registers no offense for arrays with character constants 331s registers no offense for %W with special characters 331s does not register an offense for array of non-words 331s registers an offense for misused %W with different bracket 331s registers an offense for misused %W 331s does not register an offense for array containing non-string 331s registers no offense for %w with interpolation-like syntax 331s registers no offense for %w without interpolation 331s does not register an offense for array with one element 331s registers no offense for normal arrays of strings with interpolation 331s does not register an offense for array with empty strings 331s registers no offense for %W with interpolation 331s registers no offense for normal arrays of strings 331s 331s RuboCop::Cop::Lint::ErbNewArguments 331s >= Ruby 2.6 331s registers an offense when using `ERB.new` with non-keyword 2nd, 3rd and 4th arguments andkeyword 5th argument 331s does not register an offense when using `ERB.new` with keyword arguments 331s registers an offense when using `ERB.new` with non-keyword 2nd and 3rd arguments 331s registers an offense when using `ERB.new` with non-keyword 2nd and 3rd arguments andkeyword 4th argument 331s registers an offense when using `::ERB.new` with non-keyword 2nd, 3rd and 4th arguments 331s registers an offense when using `ERB.new` with non-keyword 2nd argument 331s does not register an offense when using `ERB.new` without optional arguments 331s registers an offense when using `ERB.new` with non-keyword 2nd, 3rd and 4th arguments 331s when using `ActionView::Template::Handlers::ERB.new` 331s does not register an offense when using `ERB.new` without arguments 331s <= Ruby 2.5 331s does not register an offense when using `ERB.new` with non-keyword arguments 331s 331s RuboCop::Cop::Style::InPatternThen 331s >= Ruby 2.7 331s registers an offense for `in b, c | d;` 331s registers an offense for `in b | c | d;` (alternative pattern) 331s accepts `;` separating statements in the body of `in` 331s registers an offense for `in b, c, d;` (array pattern) 331s registers an offense for `in b;` 331s when inspecting a case statement with an empty branch 331s does not register an offense 331s 331s RuboCop::Cop::Layout::EmptyLinesAroundModuleBody 331s when EnforcedStyle is no_empty_lines 331s autocorrects beginning and end 331s registers an offense for module body starting with a blank 331s registers an offense for module body ending with a blank 331s when EnforcedStyle is empty_lines 331s registers an offense for module body not ending with a blank 331s accepts modules with an empty body 331s registers an offense for module body not starting or ending with a blank 331s autocorrects beginning and end 331s when EnforcedStyle is empty_lines_special 331s module with only constants 331s registers and autocorrects the offenses 331s when first child is an access modifier 331s with blank lines at the beginning and ending of module body 331s registers no offense 331s with no blank lines at the beginning and ending of module body 331s registers and corrects an offense 331s when first child is NOT a method 331s 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 331s when module has a namespace 331s 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 331s source with blank lines 331s registers and autocorrects the offenses 331s source without blank lines 331s registers and autocorrects the offenses 331s source with constants 331s registers and autocorrects the offenses 331s source with comment before method definition 331s registers an offense for module beginning with a blank line 331s source without blank lines 331s registers an offense for module not ending with a blank line 331s source with blank lines 331s registers an offense for module beginning with a blank line 331s when namespace has multiple children 331s requires empty lines for namespace 331s when first child is a method 331s requires blank line at the beginning and ending of module body 331s when module has a namespace 331s requires no empty lines for namespace but requires blank line at the beginning and ending of module body 331s source with blank lines 331s autocorrects the offenses 331s source without blank lines 331s registers and autocorrects the offenses 331s source without blank lines 331s registers an offense for module not beginning and ending with a blank line 331s module with constant and child module 331s registers and autocorrects the offenses 331s module with empty body 331s with empty line 331s does NOT register offenses 331s without empty line 331s does NOT register offenses 331s when EnforcedStyle is empty_lines_except_namespace 331s when only child is module 331s requires no empty lines for namespace 331s registers offense for namespace body ending with a blank 331s registers offense for namespace body starting with a blank 331s autocorrects beginning and end 331s registers offenses for namespaced module body not ending with a blank 331s registers offenses for namespaced module body not starting with a blank 331s when has multiple child modules 331s requires empty lines for namespace 331s registers offenses for namespace body starting and ending without a blank 331s when only child is class 331s registers offense for namespace body ending with a blank 331s registers offense for namespace body starting with a blank 331s requires no empty lines for namespace 331s 331s RuboCop::Cop::Style::ParallelAssignment 331s corrects when assignments must be reordered to avoid changing meaning 331s registers an offense with indices and attributes when assignments must be reordered to preserve meaning 331s corrects when the expression uses a modifier unless statement 331s allows more left variables than right variables 331s allows more right variables than left variables 331s corrects when the right variable is a symbol array 331s allows expanding an assigned var 331s corrects when the right variable is an array 331s corrects when using nested indentation 331s corrects when assigning from multiple methods with blocks 331s corrects when the expression uses a modifier if statement 331s corrects when assigning to method returns 331s corrects parallel assignment in if statements 331s registers an offense when the right side has mulitiple arrays 331s corrects parallel assignment inside rescue statements within method definitions 331s corrects when the expression uses a modifier if statement inside a method 331s corrects when the right variable is a word array 331s corrects when the expression uses a modifier rescue statement 331s registers an offense with attributes when assignments must be reordered to preserve meaning 331s registers an offense when the right side has constants 331s corrects when using constants 331s corrects when using parallel assignment in singleton method 331s registers an offense when left hand side ends with an implicit variable 331s registers an offense when the right side has multiple hashes 331s corrects when the expression uses a modifier until statement 331s registers an offense with indices 331s registers an offense when right hand side has namespaced constants 331s corrects parallel assignment in unless statements 331s registers an offense when assigning to namespaced constants 331s corrects parallel assignment in until statements 331s registers an offense when assigning to same variables in same order 331s registers an offense when the right side has mixed expressions 331s corrects when the expression is missing spaces 331s corrects when the expression uses a modifier while statement 331s corrects parallel assignment in while statements 331s corrects when using single indentation 331s corrects when the expression uses a modifier rescue statement as the only thing inside of a method 331s registers an offense when right hand side has maps with blocks 331s registers an offense when assignments must be reordered to preserve meaning 331s corrects when the number of left hand variables matches the number of right hand variables 331s corrects when the expression uses a modifier rescue statement inside of a method 331s registers an offense with indices of different variables 331s corrects parallel assignment in rescue statements within begin ... rescue 331s registers an offense when the right side has methods with/without blocks 331s behaves like allowed 331s allows assignment of: a, b = b, a 331s using custom indentation width 331s works with nesting 331s works with standard correction 331s works with guard clauses 331s works with rescue 331s behaves like allowed 331s allows assignment of: obj.attr1, ary[0] = ary[0], obj.attr1 331s behaves like allowed 331s allows assignment of: a, b, c = 1, 2, *node 331s behaves like allowed 331s allows assignment of: a, b, c = *node, 1, 2 331s behaves like allowed 331s allows assignment of: a, b = foo.map { |e| e.id } 331s behaves like allowed 331s allows assignment of: a[0], a[1] = a[1], a[0] 331s behaves like allowed 331s allows assignment of: begin_token, end_token = CONSTANT 331s behaves like allowed 331s allows assignment of: CONSTANT, = 1, 2 331s behaves like allowed 331s allows assignment of: a = *'foo' 331s behaves like allowed 331s allows assignment of: a, = *'foo' 331s behaves like allowed 331s allows assignment of: array = [1, 2, 3]; a, = array; 331s behaves like allowed 331s allows assignment of: a = a 331s behaves like allowed 331s allows assignment of: a = 1; b = 2; 331s behaves like allowed 331s allows assignment of: a, = 1 331s behaves like allowed 331s allows assignment of: obj.attr1, obj.attr2 = obj.attr2, obj.attr1 331s behaves like allowed 331s allows assignment of: a, b, c = b, c, a 331s behaves like allowed 331s allows assignment of: a, = 1, 2, 3 331s behaves like allowed 331s allows assignment of: a, = a 331s behaves like allowed 331s allows assignment of: self.a, self.b = self.b, self.a 331s behaves like allowed 331s allows assignment of: a, *b = [1, 2, 3] 331s behaves like allowed 331s allows assignment of: a, = *foo 331s behaves like allowed 331s allows assignment of: a, b = Float::INFINITY 331s behaves like allowed 331s allows assignment of: a, b = (a + b), (a - b) 331s behaves like allowed 331s allows assignment of: *a, b = [1, 2, 3] 331s behaves like allowed 331s allows assignment of: a = 1 331s behaves like allowed 331s allows assignment of: foo = [1, 2, 3]; a, b, c = foo; 331s behaves like allowed 331s allows assignment of: a, b = foo() 331s behaves like allowed 331s allows assignment of: ary[0], ary[1], ary[2] = ary[1], ary[2], ary[0] 331s behaves like allowed 331s allows assignment of: self.a, self.b = b, a 331s behaves like allowed 331s allows assignment of: a, b = *foo 331s 331s RuboCop::Cop::Layout::SpaceInsideBlockBraces 331s registers an offense and corrects right brace without inner space 331s register offenses and correct both braces without inner space 331s registers an offense and corrects left brace without inner space 331s accepts braces surrounded by spaces 331s accepts left brace without outer space 331s registers an offense and corrects both left and right brace without inner space after success 331s with invalid value for EnforcedStyleForEmptyBraces 331s fails with an error 331s configured with no_space 331s registers an offense and corrects both left and right brace with inner space after success 332s registers an offense and corrects left brace with inner space 332s registers an offense and corrects right brace with inner space 332s accepts left brace without outer space 332s accepts braces without spaces inside 332s with passed in parameters 332s and space before block parameters allowed 332s accepts left brace with inner space 332s registers an offense and corrects left brace without inner space 332s accepts new lambda syntax 332s and space before block parameters not allowed 332s accepts when braces are aligned in multiline block with bracket 332s registers an offense when braces are not aligned in multiline block 332s accepts when braces are aligned in multiline block 332s registers an offense and corrects left brace with inner space 332s registers an offense when braces are not aligned in multiline block with bracket 332s accepts new lambda syntax 332s with space inside empty braces not allowed 332s accepts multiline braces with content 332s accepts empty braces with no space inside 332s accepts empty braces with line break inside 332s accepts braces that are not empty 332s accepts empty braces with comment and line break inside 332s accepts braces with something inside 332s registers an offense and corrects empty braces with space inside 332s with passed in parameters 332s accepts new lambda syntax 332s and BlockDelimiters cop enabled 332s registers an offense and corrects multi-line blocks 332s registers an offense and corrects for single-line blocks 332s for multi-line blocks 332s accepts left brace with inner space 332s registers an offense and corrects left brace without inner space 332s and space before block parameters not allowed 332s registers an offense and corrects left brace with inner space 332s accepts new lambda syntax 332s accepts left brace without inner space 332s for single-line blocks 332s accepts left brace with inner space 332s registers an offense and corrects left brace without inner space 332s Ruby >= 2.7 332s registers an offense for numblocks without inner space 332s with space inside empty braces allowed 332s registers an offense and corrects empty braces with no space inside 332s accepts empty braces with space inside 332s 332s RuboCop::Cop::Style::Strip 332s registers an offense for str.rstrip.lstrip 332s registers an offense for str.lstrip.rstrip 332s 332s RuboCop::Cop::Layout::HeredocIndentation 332s quoted by 332s registers an offense for not indented, without `~` 332s accepts for not indented but with whitespace 332s registers an offense for too deep indented with whitespace line 332s registers an offense for minus level indented 332s accepts for include empty lines 332s accepts for indented, but without `~` 332s registers an offense for not indented 332s registers an offense for not indented enough with whitespace line 332s registers an offense for first line minus-level indented, with `-` 332s accepts for indented, with `~` 332s registers an offense for too deep indented 332s displays message to use `<<~` instead of `<<` 332s does not register an offense when not indented but with whitespace, with `-` 332s displays message to use `<<~` instead of `<<-` 332s registers an offense for too deep indented with empty line 332s registers an offense for not indented enough with empty line 332s accepts for an empty line 332s registers an offense for not indented, with `~` 332s accepts for indented, but with `-` 332s when Layout/LineLength is configured 332s accepts for long heredoc 332s quoted by " 332s registers an offense for first line minus-level indented, with `-` 332s registers an offense for not indented 332s registers an offense for too deep indented 332s registers an offense for not indented enough with whitespace line 332s accepts for include empty lines 332s registers an offense for not indented, with `~` 332s registers an offense for too deep indented with whitespace line 332s accepts for an empty line 332s registers an offense for too deep indented with empty line 332s registers an offense for minus level indented 332s displays message to use `<<~` instead of `<<` 332s accepts for indented, but with `-` 332s registers an offense for not indented, without `~` 332s does not register an offense when not indented but with whitespace, with `-` 332s accepts for not indented but with whitespace 332s accepts for indented, but without `~` 332s displays message to use `<<~` instead of `<<-` 332s registers an offense for not indented enough with empty line 332s accepts for indented, with `~` 332s when Layout/LineLength is configured 332s accepts for long heredoc 332s quoted by ' 332s registers an offense for too deep indented 332s registers an offense for minus level indented 332s registers an offense for not indented enough with empty line 332s does not register an offense when not indented but with whitespace, with `-` 332s displays message to use `<<~` instead of `<<-` 332s accepts for indented, but with `-` 332s accepts for an empty line 332s registers an offense for not indented, without `~` 332s registers an offense for first line minus-level indented, with `-` 332s registers an offense for not indented enough with whitespace line 332s registers an offense for not indented 332s registers an offense for not indented, with `~` 332s registers an offense for too deep indented with empty line 332s displays message to use `<<~` instead of `<<` 332s accepts for not indented but with whitespace 332s accepts for indented, but without `~` 332s registers an offense for too deep indented with whitespace line 332s accepts for indented, with `~` 332s accepts for include empty lines 332s when Layout/LineLength is configured 332s accepts for long heredoc 332s quoted by ` 332s registers an offense for too deep indented with empty line 332s displays message to use `<<~` instead of `<<-` 332s does not register an offense when not indented but with whitespace, with `-` 332s registers an offense for first line minus-level indented, with `-` 332s displays message to use `<<~` instead of `<<` 332s accepts for indented, with `~` 332s registers an offense for not indented enough with whitespace line 332s accepts for an empty line 332s accepts for indented, but without `~` 332s accepts for include empty lines 332s registers an offense for minus level indented 332s accepts for indented, but with `-` 332s registers an offense for not indented 332s registers an offense for not indented, without `~` 332s registers an offense for not indented, with `~` 332s registers an offense for too deep indented 332s registers an offense for too deep indented with whitespace line 332s registers an offense for not indented enough with empty line 332s accepts for not indented but with whitespace 332s when Layout/LineLength is configured 332s accepts for long heredoc 332s 332s RuboCop::RemoteConfig 332s .file 332s does not download the file if cache lifetime has not been reached 332s downloads the file if cache lifetime has been reached 332s downloads the file if the file does not exist 332s when remote URL is configured with token auth 332s downloads the file if cache lifetime has been reached 332s does not download the file if cache lifetime has not been reached 332s downloads the file if the file does not exist 332s when the remote URL responds with 404 332s raises error 332s when the remote URL responds with redirect 332s follows the redirect and downloads the file 332s when the network is inaccessible 332s reuses the existing cached file 332s when the remote URL responds with not modified 332s reuses the existing cached file 332s when remote URL is configured with basic auth 332s does not download the file if cache lifetime has not been reached 332s downloads the file if cache lifetime has been reached 332s downloads the file if the file does not exist 332s when the remote URL responds with 500 332s raises error 332s when the remote URL responds with 404 332s raises error 332s when the remote URL responds with 500 332s raises error 332s .inherit_from_remote 332s when the remote includes file starting with `./` 332s returns remote includes URI 332s 332s RuboCop::Cop::Gemspec::RequiredRubyVersion 332s registers an offense when `required_ruby_version` is blank 332s registers an offense when `required_ruby_version` is not specified 332s registers an offense when `required_ruby_version` is an empty array 332s target ruby version > 2.6 332s registers an offense when `required_ruby_version` is specified with >= and is higher than `TargetRubyVersion` 332s registers an offense when `required_ruby_version` is specified with ~> and is higher than `TargetRubyVersion` 332s target ruby version > 2.7 332s registers an offense when `required_ruby_version` is specified with ~> and is lower than `TargetRubyVersion` 332s recognizes a Gem::Requirement with multiple requirements and does not register an offense 332s registers an offense when `required_ruby_version` is specified with >= and is lower than `TargetRubyVersion` 332s registers an offense when `required_ruby_version` is specified in array and is lower than `TargetRubyVersion` 332s recognizes Gem::Requirement and registers offense 332s false negatives 332s does not register an offense when `required_ruby_version` is assigned as a variable (an array of string literal) 332s does not register an offense when `required_ruby_version` is assigned as a variable (string literal) 332s target ruby version > 2.7 332s registers an offense when `required_ruby_version` is specified with >= without a minor version and is lower than `TargetRubyVersion` 332s registers an offense when `required_ruby_version` is specified with ~> without a minor version and is lower than `TargetRubyVersion` 332s does not register an offense when `required_ruby_version` is specified with ~> without a patch version and equals `TargetRubyVersion` 332s does not register an offense when lowest version of `required_ruby_version` equals `TargetRubyVersion` 332s does not register an offense when `required_ruby_version` is specified with >= and equals `TargetRubyVersion` 332s does not register an offense when `required_ruby_version` is specified with ~> and equals `TargetRubyVersion` 332s does not register an offense when `required_ruby_version` is specified with >= without a patch version and equals `TargetRubyVersion` 332s 332s RuboCop::Cop::Lint::DuplicateRegexpCharacterClassElement 332s with a repeated character class element inside a group 332s registers an offense and corrects 332s with a repeated character class element with interpolation 332s registers an offense and corrects 332s with repeated character class elements when `"\0\08"` (means `"\u0000\u00008"`) 332s registers an offense 332s with a repeated character class element with quantifier 332s registers an offense and corrects 332s with repeated elements in different character classes 332s does not register an offense 332s with multiple regexps with the same interpolation 332s does not register an offense 332s with no repeated character class elements 332s does not register an offense 332s with a repeated intersection character class 332s does not register an offense 332s with no repeated character class elements when `"\0\07"` (means `"\u0000\a"`) 332s does not register an offense 332s with a repeated range element 332s registers an offense and corrects 332s with a repeated character posix character class inside a group 332s registers an offense and corrects 332s with a repeated character class element 332s registers an offense and corrects 332s with a repeated character class element and %r{} literal 332s registers an offense and corrects 332s with a range that covers a repeated element character class 332s does not register an offense 332s 332s RuboCop::Cop::Metrics::Utils::AbcSizeCalculator 332s #calculate 332s with a yield 332s is expected to eq "<0, 1, 0>" 332s same but with 7 arguments 332s is expected to eq "<9, 3, 0>" 332s when discounting repeated calls 332s when root receiver is self/nil 332s is expected to eq "<2, 9, 1>" 332s when some calls have arguments 332s is expected to eq "<1, 7, 0>" 332s when root receiver is a var 332s is expected to eq "<3, 9, 0>" 332s with &.foo 332s is expected to eq "<0, 4, 2>" 332s with repeated lvar receivers 332s is expected to eq "<3, 5, 3>" 332s with ||= 332s is expected to eq "<2, 0, 1>" 332s elsif vs else if 332s else if 332s is expected to eq "<0, 5, 4>" 332s elsif 332s is expected to eq "<0, 5, 3>" 332s multiple assignment with method setters 332s is expected to eq "<3, 5, 0>" 332s same with extra condition 332s is expected to eq "<2, 9, 5>" 332s with .foo = 332s is expected to eq "<1, 2, 0>" 332s equivalent to multiple assignment with method setters 332s is expected to eq "<3, 5, 0>" 332s with &&= 332s is expected to eq "<2, 0, 1>" 332s with a for 332s is expected to eq "<2, 1, 1>" 332s assignment with ternary operator 332s is expected to eq "<2, 6, 2>" 332s method with arguments 332s is expected to eq "<4, 0, 0>" 332s with += 332s is expected to eq "<2, 0, 0>" 332s with a block 332s is expected to eq "<2, 3, 0>" 332s with += for setters 332s is expected to eq "<1, 2, 0>" 332s when counting repeated calls 332s is expected to eq "<1, 4, 0>" 332s with []= 332s is expected to eq "<2, 1, 0>" 332s with a known iterating block 332s is expected to eq "<2, 4, 2>" 332s with ||= on a constant 332s is expected to eq "<1, 0, 1>" 332s with unused assignments 333s is expected to eq "<2, 1, 0>" 333s multiple calls with return 333s is expected to eq "<0, 3, 0>" 333s multiple assignment 333s is expected to eq "<3, 1, 0>" 333s if and arithmetic operations 333s is expected to eq "<2, 8, 4>" 333s 333s RuboCop::Cop::Style::PreferredHashMethods 333s with enforced `short` style 333s registers an offense for has_value? with one arg 333s accepts has_value? with no args 333s accepts has_key? with no args 333s registers an offense for has_key? with one arg 333s when using safe navigation operator 333s registers an offense for has_value? with one arg 333s with enforced `verbose` style 333s registers an offense for key? with one arg 333s accepts value? with no args 333s accepts key? with no args 333s registers an offense for value? with one arg 333s 333s RuboCop::Cop::Style::ConditionalAssignment 333s IncludeTernaryExpressions false 333s allows assigning any variable type to ternary 333s SingleLineConditionsOnly true 333s registers an offense for assignment using a method that ends with an equal sign 333s corrects assignment to a namespaced constant 333s corrects assignment when without `else` branch 333s registers an offense for assignment using []= 333s registers an offense for assignment to case when then else 333s allows a method call in the subject of a ternary operator 333s registers an offense for assignment to an if then else 333s behaves like multiline all assignment types allow 333s any assignment to a multiline case when 333s any assignment to a multiline if else 333s any assignment to a multiline unless else 333s behaves like all assignment types 333s allows any assignment to if without else 333s registers an offense any assignment to if else 333s registers an offense for any assignment to ternary 333s registers an offense any assignment to case when 333s does not crash when used inside rescue 333s registers an offense for any assignment to unless else 333s behaves like all variable types 333s registers an offense assigning any variable type to if elsewith multiple assignment 333s registers an offense assigning any variable type to ternary 333s does not crash for rescue assignment 333s registers an offense assigning any variable type to unless else 333s registers an offense assigning any variable type to if elsif else 333s registers an offense for assigning any variable type to case when 333s allows assignment to if without else 333s registers an offense assigning any variable type to if else 333s >= Ruby 2.7 333s registers an offense for assigning any variable type to case in 333s behaves like multiline all assignment types allow 333s any assignment to a multiline if else 333s any assignment to a multiline case when 333s any assignment to a multiline unless else 333s behaves like all assignment types 333s registers an offense any assignment to case when 333s registers an offense for any assignment to ternary 333s does not crash when used inside rescue 333s registers an offense any assignment to if else 333s registers an offense for any assignment to unless else 333s allows any assignment to if without else 333s behaves like all assignment types 333s does not crash when used inside rescue 333s registers an offense for any assignment to ternary 333s registers an offense any assignment to if else 333s registers an offense any assignment to case when 333s registers an offense for any assignment to unless else 333s allows any assignment to if without else 333s behaves like multiline all assignment types allow 333s any assignment to a multiline if else 333s any assignment to a multiline case when 333s any assignment to a multiline unless else 333s behaves like multiline all assignment types allow 333s any assignment to a multiline case when 333s any assignment to a multiline if else 333s any assignment to a multiline unless else 333s behaves like multiline all assignment types allow 333s any assignment to a multiline unless else 333s any assignment to a multiline if else 333s any assignment to a multiline case when 333s behaves like multiline all assignment types allow 333s any assignment to a multiline case when 333s any assignment to a multiline unless else 333s any assignment to a multiline if else 333s behaves like all variable types 333s registers an offense assigning any variable type to if else 333s allows assignment to if without else 333s does not crash for rescue assignment 333s registers an offense assigning any variable type to if elsif else 333s registers an offense for assigning any variable type to case when 333s registers an offense assigning any variable type to if elsewith multiple assignment 333s registers an offense assigning any variable type to unless else 333s registers an offense assigning any variable type to ternary 333s >= Ruby 2.7 333s registers an offense for assigning any variable type to case in 333s behaves like multiline all variable types allow 333s assigning any variable type to an if else with multiline in one branch 333s assigning any variable type to a multiline if else 333s assigning any variable type to a multiline if elsif else 333s assigning any variable type to a multiline case when 333s assigning any variable type to a multiline unless else 333s behaves like all variable types 333s registers an offense assigning any variable type to unless else 333s registers an offense assigning any variable type to ternary 333s registers an offense assigning any variable type to if elsif else 333s allows assignment to if without else 333s registers an offense assigning any variable type to if elsewith multiple assignment 333s registers an offense for assigning any variable type to case when 333s does not crash for rescue assignment 333s registers an offense assigning any variable type to if else 333s >= Ruby 2.7 333s registers an offense for assigning any variable type to case in 333s behaves like multiline all assignment types allow 333s any assignment to a multiline if else 333s any assignment to a multiline case when 333s any assignment to a multiline unless else 333s behaves like multiline all assignment types allow 333s any assignment to a multiline unless else 333s any assignment to a multiline case when 333s any assignment to a multiline if else 333s behaves like all assignment types 333s does not crash when used inside rescue 333s allows any assignment to if without else 333s registers an offense for any assignment to ternary 333s registers an offense for any assignment to unless else 333s registers an offense any assignment to case when 333s registers an offense any assignment to if else 333s behaves like all assignment types 333s allows any assignment to if without else 333s registers an offense any assignment to if else 333s registers an offense any assignment to case when 333s registers an offense for any assignment to unless else 333s does not crash when used inside rescue 333s registers an offense for any assignment to ternary 333s behaves like all variable types 333s does not crash for rescue assignment 333s allows assignment to if without else 333s registers an offense assigning any variable type to if else 333s registers an offense assigning any variable type to ternary 333s registers an offense for assigning any variable type to case when 333s registers an offense assigning any variable type to if elsewith multiple assignment 333s registers an offense assigning any variable type to unless else 333s registers an offense assigning any variable type to if elsif else 333s >= Ruby 2.7 333s registers an offense for assigning any variable type to case in 333s behaves like all assignment types 333s allows any assignment to if without else 333s registers an offense any assignment to if else 333s registers an offense for any assignment to unless else 333s does not crash when used inside rescue 333s registers an offense any assignment to case when 333s registers an offense for any assignment to ternary 333s behaves like all assignment types 333s does not crash when used inside rescue 333s registers an offense any assignment to case when 333s registers an offense any assignment to if else 333s registers an offense for any assignment to ternary 333s allows any assignment to if without else 333s registers an offense for any assignment to unless else 333s behaves like multiline all assignment types allow 333s any assignment to a multiline unless else 333s any assignment to a multiline if else 333s any assignment to a multiline case when 333s behaves like multiline all variable types allow 333s assigning any variable type to a multiline case when 333s assigning any variable type to a multiline unless else 333s assigning any variable type to a multiline if elsif else 333s assigning any variable type to a multiline if else 333s assigning any variable type to an if else with multiline in one branch 333s behaves like multiline all assignment types allow 333s any assignment to a multiline case when 333s any assignment to a multiline if else 333s any assignment to a multiline unless else 333s behaves like multiline all variable types allow 333s assigning any variable type to an if else with multiline in one branch 333s assigning any variable type to a multiline case when 333s assigning any variable type to a multiline unless else 333s assigning any variable type to a multiline if else 333s assigning any variable type to a multiline if elsif else 333s behaves like all assignment types 333s registers an offense for any assignment to ternary 333s allows any assignment to if without else 333s does not crash when used inside rescue 333s registers an offense for any assignment to unless else 333s registers an offense any assignment to case when 333s registers an offense any assignment to if else 333s behaves like multiline all variable types allow 333s assigning any variable type to an if else with multiline in one branch 333s assigning any variable type to a multiline unless else 333s assigning any variable type to a multiline if elsif else 333s assigning any variable type to a multiline case when 333s assigning any variable type to a multiline if else 333s for loop 333s ignores pseudo assignments in a for loop 333s behaves like multiline all variable types allow 333s assigning any variable type to a multiline unless else 333s assigning any variable type to a multiline if elsif else 333s assigning any variable type to a multiline case when 333s assigning any variable type to a multiline if else 333s assigning any variable type to an if else with multiline in one branch 333s behaves like multiline all assignment types allow 333s any assignment to a multiline if else 333s any assignment to a multiline case when 333s any assignment to a multiline unless else 333s behaves like all variable types 333s registers an offense assigning any variable type to unless else 333s does not crash for rescue assignment 333s registers an offense assigning any variable type to if elsif else 333s registers an offense assigning any variable type to if else 333s registers an offense assigning any variable type to if elsewith multiple assignment 333s allows assignment to if without else 333s registers an offense assigning any variable type to ternary 333s registers an offense for assigning any variable type to case when 333s >= Ruby 2.7 333s registers an offense for assigning any variable type to case in 333s behaves like all assignment types 333s registers an offense any assignment to if else 333s does not crash when used inside rescue 333s registers an offense any assignment to case when 333s registers an offense for any assignment to unless else 333s allows any assignment to if without else 333s registers an offense for any assignment to ternary 333s behaves like all assignment types 333s registers an offense for any assignment to unless else 333s registers an offense any assignment to if else 333s allows any assignment to if without else 333s does not crash when used inside rescue 333s registers an offense any assignment to case when 333s registers an offense for any assignment to ternary 333s behaves like all assignment types 333s allows any assignment to if without else 333s registers an offense any assignment to if else 333s does not crash when used inside rescue 333s registers an offense any assignment to case when 333s registers an offense for any assignment to unless else 333s registers an offense for any assignment to ternary 333s behaves like multiline all variable types allow 333s assigning any variable type to a multiline unless else 333s assigning any variable type to an if else with multiline in one branch 333s assigning any variable type to a multiline if elsif else 333s assigning any variable type to a multiline case when 333s assigning any variable type to a multiline if else 333s behaves like multiline all assignment types allow 333s any assignment to a multiline unless else 333s any assignment to a multiline if else 333s any assignment to a multiline case when 333s behaves like multiline all assignment types allow 333s any assignment to a multiline if else 333s any assignment to a multiline unless else 333s any assignment to a multiline case when 333s behaves like all variable types 333s registers an offense assigning any variable type to if elsewith multiple assignment 333s registers an offense assigning any variable type to if elsif else 333s registers an offense assigning any variable type to if else 333s does not crash for rescue assignment 333s registers an offense assigning any variable type to ternary 333s allows assignment to if without else 333s registers an offense for assigning any variable type to case when 333s registers an offense assigning any variable type to unless else 333s >= Ruby 2.7 333s registers an offense for assigning any variable type to case in 333s behaves like multiline all assignment types allow 333s any assignment to a multiline unless else 333s any assignment to a multiline if else 333s any assignment to a multiline case when 333s behaves like all assignment types 333s registers an offense any assignment to if else 333s does not crash when used inside rescue 333s registers an offense for any assignment to ternary 333s allows any assignment to if without else 333s registers an offense for any assignment to unless else 333s registers an offense any assignment to case when 333s behaves like all assignment types 333s does not crash when used inside rescue 333s allows any assignment to if without else 333s registers an offense any assignment to case when 333s registers an offense for any assignment to unless else 333s registers an offense any assignment to if else 333s registers an offense for any assignment to ternary 333s behaves like all assignment types 333s allows any assignment to if without else 333s registers an offense any assignment to if else 333s does not crash when used inside rescue 333s registers an offense for any assignment to ternary 333s registers an offense any assignment to case when 333s registers an offense for any assignment to unless else 333s behaves like all assignment types 333s registers an offense any assignment to case when 333s registers an offense for any assignment to ternary 333s registers an offense for any assignment to unless else 333s allows any assignment to if without else 333s does not crash when used inside rescue 333s registers an offense any assignment to if else 333s behaves like multiline all assignment types allow 333s any assignment to a multiline if else 333s any assignment to a multiline unless else 333s any assignment to a multiline case when 333s behaves like all assignment types 333s registers an offense for any assignment to unless else 333s allows any assignment to if without else 333s does not crash when used inside rescue 333s registers an offense for any assignment to ternary 333s registers an offense any assignment to case when 333s registers an offense any assignment to if else 333s behaves like single line condition autocorrect 333s corrects assignment to an if elsif else with multiple elsifs 333s corrects assignment to an unless else condition 333s corrects assignment to an if elsif else condition 333s corrects assignment to an if else condition 334s corrects assignment to a case when else condition 334s corrects assignment to a case when else with multiple whens 334s corrects assignment to a ternary operator 334s behaves like multiline all assignment types allow 334s any assignment to a multiline case when 334s any assignment to a multiline unless else 334s any assignment to a multiline if else 334s behaves like all assignment types 334s registers an offense for any assignment to unless else 334s does not crash when used inside rescue 334s allows any assignment to if without else 334s registers an offense for any assignment to ternary 334s registers an offense any assignment to case when 334s registers an offense any assignment to if else 334s behaves like multiline all assignment types allow 334s any assignment to a multiline case when 334s any assignment to a multiline unless else 334s any assignment to a multiline if else 334s behaves like all variable types 334s registers an offense assigning any variable type to if else 334s registers an offense assigning any variable type to if elsewith multiple assignment 334s registers an offense assigning any variable type to unless else 334s registers an offense assigning any variable type to ternary 334s registers an offense assigning any variable type to if elsif else 334s allows assignment to if without else 334s does not crash for rescue assignment 334s registers an offense for assigning any variable type to case when 334s >= Ruby 2.7 334s registers an offense for assigning any variable type to case in 334s behaves like multiline all variable types allow 334s assigning any variable type to a multiline case when 334s assigning any variable type to an if else with multiline in one branch 334s assigning any variable type to a multiline unless else 334s assigning any variable type to a multiline if else 334s assigning any variable type to a multiline if elsif else 334s behaves like multiline all assignment types allow 334s any assignment to a multiline case when 334s any assignment to a multiline if else 334s any assignment to a multiline unless else 334s behaves like all assignment types 334s registers an offense any assignment to case when 334s registers an offense for any assignment to ternary 334s does not crash when used inside rescue 334s registers an offense for any assignment to unless else 334s allows any assignment to if without else 334s registers an offense any assignment to if else 334s behaves like multiline all assignment types allow 334s any assignment to a multiline if else 334s any assignment to a multiline unless else 334s any assignment to a multiline case when 334s behaves like all assignment types 334s registers an offense any assignment to if else 334s registers an offense any assignment to case when 334s registers an offense for any assignment to unless else 334s registers an offense for any assignment to ternary 334s does not crash when used inside rescue 334s allows any assignment to if without else 334s SingleLineConditionsOnly false 334s corrects assignment to a multiline if else condition 334s corrects assignment to a multiline if elsif else condition 334s corrects assignment to an if elsif else with multiple elsifs 334s corrects assignment to an unless else condition 334s corrects assignment to a case when else condition 334s corrects assignment to a case when else with multiple whens 334s behaves like all assignment types 334s registers an offense any assignment to case when 334s allows any assignment to if without else 334s registers an offense any assignment to if else 334s registers an offense for any assignment to ternary 334s does not crash when used inside rescue 334s registers an offense for any assignment to unless else 334s behaves like multiline all assignment types offense 334s any assignment to a multiline case when 334s any assignment to a multiline unless else 334s any assignment to a multiline if else 334s behaves like multiline all assignment types offense 334s any assignment to a multiline unless else 334s any assignment to a multiline case when 334s any assignment to a multiline if else 334s behaves like multiline all assignment types offense 334s any assignment to a multiline unless else 334s any assignment to a multiline case when 334s any assignment to a multiline if else 334s behaves like all assignment types 334s does not crash when used inside rescue 334s registers an offense for any assignment to unless else 334s registers an offense any assignment to if else 334s registers an offense any assignment to case when 334s registers an offense for any assignment to ternary 334s allows any assignment to if without else 334s behaves like all variable types 334s registers an offense assigning any variable type to if elsewith multiple assignment 334s registers an offense assigning any variable type to ternary 334s registers an offense assigning any variable type to if elsif else 334s does not crash for rescue assignment 334s registers an offense assigning any variable type to if else 334s allows assignment to if without else 334s registers an offense assigning any variable type to unless else 334s registers an offense for assigning any variable type to case when 334s >= Ruby 2.7 334s registers an offense for assigning any variable type to case in 334s behaves like multiline all variable types offense 334s assigning any variable type to a multiline if else 334s assigning any variable type to an if else with multiline in one branch 334s assigning any variable type to a multiline if elsif else 334s assigning any variable type to a multiline unless else 334s assigning any variable type to a multiline case when 334s behaves like all assignment types 334s registers an offense any assignment to if else 334s registers an offense for any assignment to ternary 334s registers an offense any assignment to case when 334s allows any assignment to if without else 334s registers an offense for any assignment to unless else 334s does not crash when used inside rescue 334s behaves like all assignment types 334s registers an offense for any assignment to ternary 334s registers an offense any assignment to if else 334s registers an offense any assignment to case when 334s registers an offense for any assignment to unless else 334s allows any assignment to if without else 334s does not crash when used inside rescue 334s behaves like multiline all assignment types offense 334s any assignment to a multiline unless else 334s any assignment to a multiline if else 334s any assignment to a multiline case when 334s behaves like all variable types 334s registers an offense assigning any variable type to if elsewith multiple assignment 334s does not crash for rescue assignment 334s allows assignment to if without else 334s registers an offense assigning any variable type to if else 334s registers an offense assigning any variable type to ternary 334s registers an offense assigning any variable type to if elsif else 334s registers an offense assigning any variable type to unless else 334s registers an offense for assigning any variable type to case when 334s >= Ruby 2.7 334s registers an offense for assigning any variable type to case in 334s behaves like multiline all assignment types offense 334s any assignment to a multiline case when 334s any assignment to a multiline unless else 334s any assignment to a multiline if else 334s behaves like multiline all variable types offense 334s assigning any variable type to a multiline if elsif else 334s assigning any variable type to a multiline if else 334s assigning any variable type to an if else with multiline in one branch 334s assigning any variable type to a multiline unless else 334s assigning any variable type to a multiline case when 334s behaves like all assignment types 334s registers an offense for any assignment to ternary 334s allows any assignment to if without else 334s does not crash when used inside rescue 334s registers an offense for any assignment to unless else 334s registers an offense any assignment to if else 334s registers an offense any assignment to case when 334s behaves like all assignment types 334s allows any assignment to if without else 334s registers an offense for any assignment to ternary 334s registers an offense any assignment to case when 334s does not crash when used inside rescue 334s registers an offense for any assignment to unless else 334s registers an offense any assignment to if else 334s behaves like all assignment types 334s registers an offense for any assignment to ternary 334s registers an offense for any assignment to unless else 334s registers an offense any assignment to case when 334s allows any assignment to if without else 334s registers an offense any assignment to if else 334s does not crash when used inside rescue 334s behaves like all variable types 334s registers an offense for assigning any variable type to case when 334s registers an offense assigning any variable type to ternary 334s allows assignment to if without else 334s does not crash for rescue assignment 334s registers an offense assigning any variable type to unless else 334s registers an offense assigning any variable type to if else 334s registers an offense assigning any variable type to if elsif else 334s registers an offense assigning any variable type to if elsewith multiple assignment 334s >= Ruby 2.7 334s registers an offense for assigning any variable type to case in 334s behaves like all assignment types 334s registers an offense for any assignment to unless else 334s registers an offense any assignment to if else 334s allows any assignment to if without else 334s registers an offense any assignment to case when 334s does not crash when used inside rescue 334s registers an offense for any assignment to ternary 334s behaves like multiline all assignment types offense 334s any assignment to a multiline if else 334s any assignment to a multiline unless else 334s any assignment to a multiline case when 334s behaves like multiline all assignment types offense 334s any assignment to a multiline unless else 334s any assignment to a multiline case when 334s any assignment to a multiline if else 334s behaves like all variable types 334s registers an offense assigning any variable type to if elsif else 334s registers an offense assigning any variable type to ternary 334s allows assignment to if without else 334s registers an offense for assigning any variable type to case when 334s registers an offense assigning any variable type to unless else 334s registers an offense assigning any variable type to if else 334s does not crash for rescue assignment 334s registers an offense assigning any variable type to if elsewith multiple assignment 334s >= Ruby 2.7 334s registers an offense for assigning any variable type to case in 334s behaves like all assignment types 334s registers an offense for any assignment to ternary 334s registers an offense for any assignment to unless else 334s registers an offense any assignment to if else 334s registers an offense any assignment to case when 334s does not crash when used inside rescue 334s allows any assignment to if without else 334s behaves like all assignment types 334s registers an offense for any assignment to ternary 334s registers an offense any assignment to if else 334s registers an offense for any assignment to unless else 334s allows any assignment to if without else 334s registers an offense any assignment to case when 334s does not crash when used inside rescue 334s behaves like multiline all assignment types offense 334s any assignment to a multiline unless else 334s any assignment to a multiline if else 334s any assignment to a multiline case when 334s behaves like multiline all assignment types offense 334s any assignment to a multiline case when 334s any assignment to a multiline unless else 334s any assignment to a multiline if else 334s behaves like multiline all variable types offense 334s assigning any variable type to a multiline unless else 334s assigning any variable type to a multiline case when 334s assigning any variable type to an if else with multiline in one branch 334s assigning any variable type to a multiline if elsif else 334s assigning any variable type to a multiline if else 334s behaves like all assignment types 334s registers an offense for any assignment to ternary 334s allows any assignment to if without else 334s registers an offense for any assignment to unless else 334s registers an offense any assignment to if else 334s does not crash when used inside rescue 334s registers an offense any assignment to case when 334s behaves like all assignment types 334s registers an offense any assignment to case when 334s registers an offense for any assignment to ternary 334s registers an offense any assignment to if else 334s registers an offense for any assignment to unless else 334s does not crash when used inside rescue 334s allows any assignment to if without else 334s behaves like all assignment types 334s registers an offense any assignment to case when 334s registers an offense for any assignment to unless else 334s registers an offense for any assignment to ternary 334s does not crash when used inside rescue 334s registers an offense any assignment to if else 334s allows any assignment to if without else 334s behaves like all variable types 334s registers an offense assigning any variable type to if else 334s registers an offense assigning any variable type to if elsewith multiple assignment 334s registers an offense assigning any variable type to ternary 334s registers an offense assigning any variable type to unless else 334s does not crash for rescue assignment 334s registers an offense for assigning any variable type to case when 334s registers an offense assigning any variable type to if elsif else 334s allows assignment to if without else 334s >= Ruby 2.7 334s registers an offense for assigning any variable type to case in 334s behaves like multiline all assignment types offense 334s any assignment to a multiline case when 334s any assignment to a multiline unless else 334s any assignment to a multiline if else 334s behaves like all assignment types 334s allows any assignment to if without else 334s registers an offense for any assignment to unless else 334s registers an offense any assignment to case when 334s does not crash when used inside rescue 334s registers an offense for any assignment to ternary 334s registers an offense any assignment to if else 334s behaves like all assignment types 334s registers an offense any assignment to if else 334s does not crash when used inside rescue 334s registers an offense any assignment to case when 334s registers an offense for any assignment to unless else 334s allows any assignment to if without else 334s registers an offense for any assignment to ternary 334s behaves like multiline all assignment types offense 334s any assignment to a multiline if else 335s any assignment to a multiline unless else 335s any assignment to a multiline case when 335s behaves like multiline all assignment types offense 335s any assignment to a multiline case when 335s any assignment to a multiline unless else 335s any assignment to a multiline if else 335s behaves like multiline all variable types offense 335s assigning any variable type to an if else with multiline in one branch 335s assigning any variable type to a multiline if else 335s assigning any variable type to a multiline unless else 335s assigning any variable type to a multiline if elsif else 335s assigning any variable type to a multiline case when 335s behaves like multiline all assignment types offense 335s any assignment to a multiline case when 335s any assignment to a multiline unless else 335s any assignment to a multiline if else 335s behaves like all assignment types 335s registers an offense any assignment to case when 335s registers an offense for any assignment to ternary 335s allows any assignment to if without else 335s registers an offense any assignment to if else 335s does not crash when used inside rescue 335s registers an offense for any assignment to unless else 335s behaves like multiline all variable types offense 335s assigning any variable type to a multiline case when 335s assigning any variable type to a multiline if else 335s assigning any variable type to a multiline if elsif else 335s assigning any variable type to an if else with multiline in one branch 335s assigning any variable type to a multiline unless else 335s behaves like all variable types 335s allows assignment to if without else 335s does not crash for rescue assignment 335s registers an offense for assigning any variable type to case when 335s registers an offense assigning any variable type to if else 335s registers an offense assigning any variable type to if elsewith multiple assignment 335s registers an offense assigning any variable type to if elsif else 335s registers an offense assigning any variable type to ternary 335s registers an offense assigning any variable type to unless else 335s >= Ruby 2.7 335s registers an offense for assigning any variable type to case in 335s behaves like all assignment types 335s does not crash when used inside rescue 335s registers an offense for any assignment to unless else 335s registers an offense any assignment to if else 335s allows any assignment to if without else 335s registers an offense any assignment to case when 335s registers an offense for any assignment to ternary 335s behaves like all assignment types 335s registers an offense any assignment to if else 335s registers an offense for any assignment to ternary 335s allows any assignment to if without else 335s registers an offense any assignment to case when 335s registers an offense for any assignment to unless else 335s does not crash when used inside rescue 335s behaves like all variable types 335s registers an offense assigning any variable type to ternary 335s registers an offense assigning any variable type to if elsif else 335s registers an offense assigning any variable type to if elsewith multiple assignment 335s registers an offense for assigning any variable type to case when 335s does not crash for rescue assignment 335s registers an offense assigning any variable type to unless else 335s allows assignment to if without else 335s registers an offense assigning any variable type to if else 335s >= Ruby 2.7 335s registers an offense for assigning any variable type to case in 335s behaves like multiline all assignment types offense 335s any assignment to a multiline case when 335s any assignment to a multiline if else 335s any assignment to a multiline unless else 335s behaves like multiline all assignment types offense 335s any assignment to a multiline if else 335s any assignment to a multiline case when 335s any assignment to a multiline unless else 335s behaves like multiline all assignment types offense 335s any assignment to a multiline unless else 335s any assignment to a multiline if else 335s any assignment to a multiline case when 335s behaves like multiline all assignment types offense 335s any assignment to a multiline unless else 335s any assignment to a multiline if else 335s any assignment to a multiline case when 335s behaves like multiline all variable types offense 335s assigning any variable type to a multiline unless else 335s assigning any variable type to a multiline if else 335s assigning any variable type to a multiline case when 335s assigning any variable type to an if else with multiline in one branch 335s assigning any variable type to a multiline if elsif else 335s behaves like all assignment types 335s registers an offense for any assignment to ternary 335s does not crash when used inside rescue 335s registers an offense for any assignment to unless else 335s allows any assignment to if without else 335s registers an offense any assignment to if else 335s registers an offense any assignment to case when 335s behaves like single line condition autocorrect 335s corrects assignment to an if elsif else with multiple elsifs 335s corrects assignment to a ternary operator 335s corrects assignment to a case when else condition 335s corrects assignment to an if else condition 335s corrects assignment to a case when else with multiple whens 335s corrects assignment to an unless else condition 335s corrects assignment to an if elsif else condition 335s behaves like multiline all assignment types offense 335s any assignment to a multiline unless else 335s any assignment to a multiline case when 335s any assignment to a multiline if else 335s behaves like multiline all variable types offense 335s assigning any variable type to a multiline if else 335s assigning any variable type to a multiline case when 335s assigning any variable type to an if else with multiline in one branch 335s assigning any variable type to a multiline if elsif else 335s assigning any variable type to a multiline unless else 335s behaves like multiline all assignment types offense 335s any assignment to a multiline if else 335s any assignment to a multiline case when 335s any assignment to a multiline unless else 335s 335s RuboCop::Cop::Lint::SafeNavigationChain 335s TargetRubyVersion >= 2.3 335s accepts usages of safe navigation with assignment method 335s accepts usages of safe navigation with `blank?` method 335s registers an offense for safe navigation with > operator 335s registers an offense for safe navigation with <= operator 335s registers an offense for safe navigation with < operator 335s accepts usages of safe navigation with `-@` method 335s accepts usages of safe navigation with `try` method 335s registers an offense for ordinary method chain exists after safe navigation method call with a block 335s registers an offense for ordinary method call exists after safe navigation method call 335s accepts usages of safe navigation with `in?` method 335s registers an offense for safe navigation on the right-hand side of the `*` 335s registers an offense for safe navigation on the right-hand side of the `-` 335s registers an offense for safe navigation with [] operator 335s registers an offense for ordinary method call exists after safe navigation method call with an argument 335s accepts usages of safe navigation with `present?` method 335s accepts usages of method chain with safe navigation only with argument 335s registers an offense for ordinary method chain exists after safe navigation method call 335s accepts usages of safe navigation with `+@` method 335s accepts usages of safe navigation with == operator 335s accepts usages of safe navigation at last only 335s registers an offense for safe navigation with []= operator 335s registers an offense for ordinary method chain exists after safe navigation method call with an argument 335s registers an offense for ordinary method chain exists after safe navigation method call with a block-pass 335s accepts usages of safe navigation at last only with argument 335s registers an offense for safe navigation on the right-hand side of the `+` 335s accepts usages of safe navigation with | operator 335s registers an offense for safe navigation on the right-hand side of the `/` 335s accepts usages of safe navigation with || operator 335s accepts usages of safe navigation with `nil?` method 335s accepts usages of ordinary method chain 335s accepts usages of safe navigation with && operator 335s accepts usages of safe navigation with self assignment method 335s accepts usages of safe navigation with & operator 335s accepts usages of safe navigation with === operator 335s registers an offense for safe navigation with >= operator 335s registers an offense for safe navigation with + operator 335s accepts usages of method chain with safe navigation only 335s accepts usages of safe navigation with `to_d` method 335s accepts usages of ordinary method chain with argument 335s proper highlighting 335s when there are methods before 335s when in a method 335s when used with a modifier if 335s when in a begin 335s when there are methods after 335s >= Ruby 2.7 335s registers an offense for ordinary method chain exists after safe navigation method call with a block using numbered parameter 335s 335s RuboCop::Cop::Lint::NoReturnInBeginEndBlocks 335s rejects a return statement inside a block when using ||= 335s accepts a block with no return when using *= 335s rejects a return statement inside a block when using = 335s accepts a block with no return when using = 335s accepts a block with no return when using /= 335s rejects a return statement inside a block when using **= 335s rejects a return statement inside a block when using *= 335s accepts a block with no return when using **= 335s accepts a block with no return when using ||= 335s accepts a block with no return when using -= 335s rejects a return statement inside a block when using /= 335s rejects a return statement inside a block when using += 335s accepts a block with no return when using += 335s rejects a return statement inside a block when using -= 335s 335s RuboCop::Formatter::TextUtil 335s pluralize 335s will not pluralize 1 335s will not change 0 to no 335s will pluralize quantities greater than 1 335s will pluralize negative quantities less than -1 335s will pluralize fractions 335s will change 0 to no when configured 335s will pluralize -1 335s 335s RuboCop::Cop::Style::RedundantFetchBlock 335s with SafeForConstants: false 335s does not register an offense when using `#fetch` with constant in the block 335s with SafeForConstants: true 335s does not register an offense when using `#fetch` with an argument in the block 335s registers an offense and corrects when using `#fetch` with Float in the block 335s does not register an offense when using `#fetch` with String in the block and strings are not frozen 335s registers an offense and corrects when using `#fetch` with String in the block and strings are frozen 335s registers an offense and corrects when using `#fetch` with constant in the block 335s does not register an offense when using `#fetch` with interpolated Symbol in the block 335s registers an offense and corrects when using `#fetch` with Integer in the block 335s registers an offense and corrects when using `#fetch` with Rational in the block 335s registers an offense and corrects when using `#fetch` with Symbol in the block 335s does not register an offense when using `#fetch` with argument fallback 335s does not register an offense when using `#fetch` with `Rails.cache` 335s registers an offense and corrects when using `#fetch` with Complex in the block 335s registers an offense and corrects when using `#fetch` with empty block 335s 335s RuboCop::Cop::Layout::ClosingParenthesisIndentation 335s accepts begin nodes that are not grouped expressions 335s for method definitions 335s with no line break before 1st parameter 335s accepts empty () 335s registers an offense for misaligned ) 335s accepts a correctly aligned ) 335s with line break before 1st parameter 335s registers an offense for misaligned ) 335s accepts a correctly aligned ) 335s for grouped expressions 335s with no line break before 1st operand 335s accepts a correctly aligned ) 335s accepts ) that does not begin its line 335s registers an offense for misaligned ) 335s with line break before 1st operand 335s registers an offense for misaligned ) 335s accepts a correctly aligned ) 335s for method chains 335s registers an offense and corrects method chains 335s can handle multiple chains with differing breaks 335s when using safe navigation operator 335s registers an offense and corrects misaligned ) 335s for method assignments with indented parameters 335s with line break before 1st parameter 335s registers an offense for misaligned ) 335s accepts a correctly aligned ) 335s without arguments 335s can handle indentation up against the method 335s registers an offense for misaligned ) 335s can handle indentation up against the left edge 335s accepts empty () 335s accepts a correctly aligned ) against ( 335s with no line break before 1st parameter 335s can handle inner method calls 335s registers an offense for misaligned ) 335s can handle hash arguments that are not broken over lines 335s accepts a correctly indented ) 335s can handle indentation up against the left edge 335s can handle individual arguments that are broken over lines 335s accepts a correctly aligned ) 335s for method calls 335s with line break before 1st parameter 335s registers an offense for misaligned ) 335s accepts a correctly aligned ) 335s with first multiline arg on new line 335s accepts ) on the same level as ( with args on same line 335s accepts ) on the same level as ( with second arg on new line 335s without arguments 335s accepts a correctly aligned ) against ( 335s can handle indentation up against the left edge 335s accepts empty () 335s with no line break before 1st parameter 335s accepts a correctly aligned ) 335s accepts a correctly indented ) inside a block 335s accepts a correctly indented ) 335s registers an offense for misaligned ) 335s does not register an offense when using keyword arguments 335s registers an offense and corrects misindented ) when ) is aligned with the params 335s 335s RuboCop::Cop::Style::TrailingCommaInArguments 335s with a single argument spanning multiple lines 335s when EnforcedStyleForMultiline is consistent_comma 335s accepts a single argument with no trailing comma 335s with multi-line list of values 335s when EnforcedStyleForMultiline is comma 335s does not break when a method call is chained on the offending one 335s accepts a method call with two parameters on the same line 335s accepts trailing comma in a method call with hash parameters at the end 335s registers an offense for no trailing comma in a method call with hash parameters at the end 335s does not break when a safe method call is chained on the offending simple one 335s accepts a trailing comma in a method call with single line hashes 335s accepts an empty hash being passed as a method argument 335s does not break when a safe method call is chained on the offending more complex one 335s accepts a multiline call with a single argument and trailing comma 335s accepts missing comma after heredoc with comments 335s accepts no trailing comma in a method call with a multiline braceless hash at the end with more than one parameter on a line 335s when closing bracket is on same line as last value 335s accepts a method call with Hash as last parameter split on multiple lines 335s when EnforcedStyleForMultiline is no_comma 335s accepts comma inside a heredoc with method and comments inside 335s accepts comma inside a heredoc in brackets 335s accepts a method call with hash parameters at the end and no trailing comma 335s accepts comma inside a heredoc with comments inside 335s autocorrects unwanted comma after modified heredoc parameter 335s accepts comma inside a heredoc parameter at the end 335s registers an offense for trailing comma in a method call with hash parameters at the end 335s accepts comma inside a modified heredoc parameter 335s when there is string interpolation inside heredoc parameter 335s autocorrects unwanted comma inside string interpolation 335s accepts comma inside a heredoc parameter 335s accepts comma inside a heredoc parameter when on a single line 335s when EnforcedStyleForMultiline is consistent_comma 335s accepts a trailing comma in a method call with a single hash parameter 335s accepts a trailing comma in a method call with a single hash parameter to a receiver object 335s accepts a trailing comma in a method call with single line hashes 335s accepts a multiline call with single argument on multiple lines 335s autocorrects missing comma after a heredoc 335s accepts no trailing comma in a method call with a block parameter at the end 335s accepts a multiline call with a single argument and trailing comma 335s registers an offense for no trailing comma in a method call with hash parameters at the end 335s registers an offense for no trailing comma in a method call withtwo parameters on the same line 335s accepts trailing comma in a method call with hash parameters at the end 335s accepts a multiline call with arguments on a single line and trailing comma 335s when closing bracket is on same line as last value 335s registers an offense for a method call, with a Hash as the last parameter, split on multiple lines 335s with single line list of values 335s when EnforcedStyleForMultiline is comma 335s accepts chained single-line method calls 335s accepts method call without parameters 335s registers an offense for trailing comma in a method call with hash parameters at the end 335s accepts method call without trailing comma when a line break before a method call 336s accepts method call without trailing comma with single element hash parameters at the end 336s accepts heredoc without trailing comma 336s registers an offense for trailing comma preceded by whitespace in a method call 336s accepts method call without trailing comma 336s registers an offense for trailing comma in a method call 336s when using safe navigation operator 336s registers an offense for trailing comma in a method call with hash parameters at the end 336s registers an offense for trailing comma in a method call 336s when EnforcedStyleForMultiline is consistent_comma 336s accepts heredoc without trailing comma 336s accepts chained single-line method calls 336s accepts method call without trailing comma with single element hash parameters at the end 336s accepts method call without parameters 336s registers an offense for trailing comma in a method call 336s registers an offense for trailing comma preceded by whitespace in a method call 336s accepts method call without trailing comma when a line break before a method call 336s registers an offense for trailing comma in a method call with hash parameters at the end 336s accepts method call without trailing comma 336s when using safe navigation operator 336s registers an offense for trailing comma in a method call with hash parameters at the end 336s registers an offense for trailing comma in a method call 336s when EnforcedStyleForMultiline is no_comma 336s accepts method call without trailing comma 336s accepts chained single-line method calls 336s accepts method call without trailing comma with single element hash parameters at the end 336s registers an offense for trailing comma in a method call with hash parameters at the end 336s accepts method call without parameters 336s registers an offense for trailing comma in a method call 336s accepts heredoc without trailing comma 336s accepts method call without trailing comma when a line break before a method call 336s registers an offense for trailing comma preceded by whitespace in a method call 336s when using safe navigation operator 336s registers an offense for trailing comma in a method call 336s registers an offense for trailing comma in a method call with hash parameters at the end 336s with a single argument of anonymous function spanning multiple lines 336s when EnforcedStyleForMultiline is consistent_comma 336s accepts a single argument with no trailing comma 336s 336s RuboCop::Cop::Layout::SpaceAfterNot 336s registers an offense and corrects a single space after ! 336s registers an offense and corrects multiple spaces after ! 336s accepts no space after ! 336s accepts space after not keyword 336s registers an offense and corrects space after ! with the negated receiver wrapped in parentheses 336s 336s RuboCop::Cop::Lint::AmbiguousAssignment 336s registers an offense when using `!` with `@@x` 336s does not register an offense when no mistype assignments 336s registers an offense when using `-` with `$x` 336s does not register an offense when no mistype assignments 336s does not register an offense when no mistype assignments 336s does not register an offense when no mistype assignments 336s registers an offense when using `-` with `@x` 336s registers an offense when using `+` with `x` 336s registers an offense when using `-` with `x` 336s registers an offense when using `-` with `X` 336s does not register an offense when no mistype assignments 336s registers an offense when using `+` with `@x` 336s registers an offense when using `*` with `$x` 336s does not register an offense when no mistype assignments 336s registers an offense when using `-` with `@@x` 336s registers an offense when using `+` with `X` 336s does not register an offense when no mistype assignments 336s registers an offense when using `!` with `$x` 336s registers an offense when using `*` with `X` 336s does not register an offense when no mistype assignments 336s does not register an offense when no mistype assignments 336s does not register an offense when no mistype assignments 336s does not register an offense when no mistype assignments 336s registers an offense when using `!` with `@x` 336s registers an offense when using `!` with `x` 336s registers an offense when using `*` with `x` 336s does not register an offense when no mistype assignments 336s registers an offense when using `!` with `X` 336s does not register an offense when no mistype assignments 336s registers an offense when using `*` with `@x` 336s does not register an offense when no mistype assignments 336s does not register an offense when no mistype assignments 336s registers an offense when using `+` with `$x` 336s does not register an offense when no mistype assignments 336s does not register an offense when no mistype assignments 336s does not register an offense when no mistype assignments 336s does not register an offense when no mistype assignments 336s registers an offense when using `+` with `@@x` 336s registers an offense when using `*` with `@@x` 336s does not register an offense when no mistype assignments 336s 336s RuboCop::Cop::Style::AsciiComments 336s registers an offense for a comment with non-ascii chars 336s accepts comments with only ascii chars 336s registers an offense for comments with mixed chars 336s when certain non-ascii chars are allowed 336s accepts comment with allowed non-ascii chars 336s registers an offense for comments with non-allowed non-ascii chars 336s 336s RuboCop::Cop::Style::Dir 336s when using `#dirname` and `#realpath` 336s registers an offense with ::File 336s registers an offense 336s when using `#expand_path` and `#dirname` 336s registers an offense 336s registers an offense with ::File 336s 336s RuboCop::Cop::Style::StringLiterals 336s when configured with a bad value 336s fails 336s configured with single quotes preferred 336s accepts double quotes when interpolating a class variable 336s accepts double quotes when control characters are used 336s accepts double quotes in interpolation 336s does not register an offense for words with non-ascii chars and other control sequences 336s registers an offense for words with non-ascii chars 336s detects unneeded double quotes within concatenated string 336s accepts double quotes at the start of regexp literals 336s registers offense for correct + opposite 336s accepts % quotes 336s accepts double quotes when unicode control sequence is used 336s accepts double quotes when interpolating & quotes in multiple lines 336s accepts heredocs 336s can handle character literals 336s accepts double quotes when interpolating a global variable 336s accepts double quotes when single quotes are used 336s registers offense for double quotes when single quotes suffice 336s registers an offense for "\"" 336s accepts double quotes when interpolating an instance variable 336s accepts \\\n in a string 336s can handle a built-in constant parsed as string 336s registers an offense for "\" 336s accepts double quotes when new line is used 336s accepts %q and %Q quotes 336s accepts single quotes in interpolation 336s accepts " in a %w 336s accepts single quotes 336s accepts double quotes with some other special symbols 336s configured with double quotes preferred 336s accepts single quoted string with backslash 336s accepts double quotes 336s accepts %q and %Q quotes 336s can handle a built-in constant parsed as string 336s accepts single quotes at the start of regexp literals 336s accepts ' in a %w 336s accepts heredocs 336s accepts % quotes 336s registers offense for escaped single quote in single quotes 336s accepts single quotes in interpolation 336s accepts single quotes in string with escaped non-' character 336s flags single quotes with plain # (not #@var or #{interpolation} or #$global 336s accepts escaped single quote in string with escaped non-' character 336s accepts single quotes when they are needed 336s registers offense for single quotes when double quotes would be equivalent 336s registers offense for opposite + correct 336s does not accept multiple escaped single quotes in single quotes 336s when ConsistentQuotesInMultiline is true 336s and EnforcedStyle is single_quotes 336s accepts for double quotes with an escaped normal character 336s doesn't register offense for double quotes with interpolation 336s registers an offense for strings with line breaks in them 336s registers an offense for mixed quote styles in a continued string 336s accepts continued strings using all single quotes 336s registers an offense for unneeded double quotes in continuation 336s accepts for double quotes with an escaped special character 336s doesn't register offense for double quotes with embedded single 336s doesn't choke on heredocs with inconsistent indentation 336s and EnforcedStyle is double_quotes 336s registers an offense for unneeded single quotes in continuation 336s accepts continued strings using all double quotes 336s doesn't register offense for single quotes with embedded double 336s registers an offense for mixed quote styles in a continued string 336s 336s RuboCop::Cop::Layout::ClassStructure 336s registers an offense and corrects when there is a comment in the macro method 336s registers an offense and corrects when str heredoc constant is defined after public method 336s registers an offense and corrects when dstr heredoc constant is defined after public method 336s registers an offense and corrects when xstr heredoc constant is defined after public method 336s registers an offense and corrects when literal constant is after method definitions 336s when the first line ends with a comment 336s reports an offense and swaps the lines 336s when def modifier is used 336s registers an offense and corrects public method after private method marked by its name 336s registers an offense and corrects public method without modifier declared after private method with modifier 336s registers an offense and corrects public method with modifier declared after private method with modifier 336s with protected methods declared before private 336s is expected to eq class MyClass 336s def public_method 336s end 336s 336s private 336s 336s def first_private...ar before `private_methods`. 336s end 336s 336s def second_protected_method 336s end 336s end 336s constant is not a literal 336s registers offense but does not autocorrect 336s with attribute macros before after validations 336s is expected to eq class Person 336s include AnotherModule 336s extend SomeModule 336s 336s CustomError = Cla...rivate :other_public_method 336s 336s private 336s 336s def some_private_method 336s end 336s end 336s with a complete ordered example 336s does not create offense 336s simple example 336s is expected to eq "class Person\n include AnotherModule\n extend SomeModule\n CONST = 'wrong place'\nend\n" 336s initializer is private and comes after attribute macro 336s registers an offense and autocorrects 336s 336s RuboCop::Cop::Force 336s #run_hook 336s invokes a hook in all cops 336s .force_name 336s returns the class name without namespace 336s 336s RuboCop::Cop::InternalAffairs::NodeTypePredicate 336s does not register an offense for a predicate node type check 336s comparison node type check 336s registers an offense and autocorrects 336s 336s RuboCop::Cop::Layout::SpaceInsideArrayPercentLiteral 336s accepts non array percent literals 336s for W type and ["[", "]"] delimiters 336s accepts literals with escaped and additional spaces 336s accepts newlines and additional following alignment spaces 336s registers an offense for unnecessary spaces 336s accepts multi-line literals within a method 336s accepts literals without additional spaces 336s accepts literals with escaped spaces 336s registers an offense for multiple spaces between items 336s accepts multi-line literals 336s for w type and ["[", "]"] delimiters 336s accepts literals with escaped spaces 336s accepts literals with escaped and additional spaces 336s registers an offense for multiple spaces between items 336s registers an offense for unnecessary spaces 336s accepts multi-line literals within a method 336s accepts newlines and additional following alignment spaces 336s accepts literals without additional spaces 336s accepts multi-line literals 336s for W type and ["!", "!"] delimiters 336s accepts literals without additional spaces 336s accepts multi-line literals 336s registers an offense for unnecessary spaces 336s accepts literals with escaped and additional spaces 336s accepts newlines and additional following alignment spaces 336s accepts multi-line literals within a method 336s registers an offense for multiple spaces between items 336s accepts literals with escaped spaces 336s for i type and ["(", ")"] delimiters 336s accepts literals with escaped and additional spaces 336s accepts literals with escaped spaces 336s registers an offense for unnecessary spaces 336s accepts multi-line literals 336s accepts newlines and additional following alignment spaces 336s registers an offense for multiple spaces between items 336s accepts literals without additional spaces 336s accepts multi-line literals within a method 336s for I type and ["!", "!"] delimiters 336s accepts multi-line literals within a method 336s registers an offense for unnecessary spaces 336s accepts literals with escaped and additional spaces 336s registers an offense for multiple spaces between items 336s accepts newlines and additional following alignment spaces 336s accepts literals without additional spaces 336s accepts literals with escaped spaces 336s accepts multi-line literals 336s for W type and ["{", "}"] delimiters 336s accepts literals with escaped spaces 336s accepts multi-line literals within a method 336s accepts literals without additional spaces 336s registers an offense for unnecessary spaces 336s accepts multi-line literals 336s accepts newlines and additional following alignment spaces 336s accepts literals with escaped and additional spaces 336s registers an offense for multiple spaces between items 336s for i type and ["{", "}"] delimiters 336s accepts newlines and additional following alignment spaces 336s accepts literals without additional spaces 336s registers an offense for multiple spaces between items 336s accepts multi-line literals 336s accepts multi-line literals within a method 336s registers an offense for unnecessary spaces 336s accepts literals with escaped spaces 336s accepts literals with escaped and additional spaces 336s for I type and ["{", "}"] delimiters 336s accepts multi-line literals 336s accepts multi-line literals within a method 336s registers an offense for multiple spaces between items 336s accepts literals with escaped spaces 336s accepts newlines and additional following alignment spaces 336s accepts literals without additional spaces 336s registers an offense for unnecessary spaces 336s accepts literals with escaped and additional spaces 336s for I type and ["[", "]"] delimiters 336s accepts newlines and additional following alignment spaces 336s registers an offense for multiple spaces between items 336s accepts multi-line literals 336s accepts literals without additional spaces 336s accepts literals with escaped and additional spaces 336s registers an offense for unnecessary spaces 336s accepts multi-line literals within a method 336s accepts literals with escaped spaces 336s for w type and ["(", ")"] delimiters 336s registers an offense for unnecessary spaces 336s registers an offense for multiple spaces between items 336s accepts multi-line literals 336s accepts newlines and additional following alignment spaces 336s accepts literals with escaped spaces 336s accepts literals without additional spaces 336s accepts literals with escaped and additional spaces 336s accepts multi-line literals within a method 336s for i type and ["[", "]"] delimiters 336s accepts literals with escaped spaces 336s accepts newlines and additional following alignment spaces 336s accepts multi-line literals within a method 336s accepts literals without additional spaces 336s registers an offense for multiple spaces between items 336s accepts literals with escaped and additional spaces 336s registers an offense for unnecessary spaces 336s accepts multi-line literals 336s for w type and ["{", "}"] delimiters 336s accepts literals with escaped and additional spaces 336s registers an offense for unnecessary spaces 336s accepts newlines and additional following alignment spaces 336s accepts literals with escaped spaces 336s accepts literals without additional spaces 336s accepts multi-line literals within a method 336s accepts multi-line literals 336s registers an offense for multiple spaces between items 336s for I type and ["(", ")"] delimiters 336s registers an offense for multiple spaces between items 336s accepts literals with escaped and additional spaces 336s registers an offense for unnecessary spaces 336s accepts literals with escaped spaces 336s accepts multi-line literals 336s accepts multi-line literals within a method 336s accepts newlines and additional following alignment spaces 336s accepts literals without additional spaces 336s for i type and ["!", "!"] delimiters 336s accepts literals without additional spaces 336s accepts literals with escaped spaces 336s accepts multi-line literals 336s accepts literals with escaped and additional spaces 336s registers an offense for multiple spaces between items 336s accepts newlines and additional following alignment spaces 336s registers an offense for unnecessary spaces 336s accepts multi-line literals within a method 336s for W type and ["(", ")"] delimiters 336s accepts literals with escaped spaces 336s accepts newlines and additional following alignment spaces 336s accepts literals without additional spaces 336s accepts literals with escaped and additional spaces 336s accepts multi-line literals within a method 336s registers an offense for unnecessary spaces 336s registers an offense for multiple spaces between items 336s accepts multi-line literals 336s for w type and ["!", "!"] delimiters 336s accepts newlines and additional following alignment spaces 336s accepts literals with escaped and additional spaces 336s accepts literals with escaped spaces 336s registers an offense for multiple spaces between items 336s registers an offense for unnecessary spaces 336s accepts multi-line literals 336s accepts multi-line literals within a method 336s accepts literals without additional spaces 336s 336s RuboCop::Cop::Layout::CaseIndentation 336s when `when` is on the same line as `case` 336s registers an offense but does not autocorrect 336s with EnforcedStyle: end 336s with IndentOneStep: false 336s `case` ... `in` 336s `in` and `end` same line 336s does not register an offense 336s regarding assignment where the right hand side is a `case` 336s registers an offense and corrects an assignment indented some other way 336s accepts a correctly indented assignment 336s with everything on a single line 336s does not register an offense 336s `case` ... `when` 336s `else` and `end` same line 336s does not register an offense 336s `when` and `end` same line 336s does not register an offense 336s regarding assignment where the right hand side is a `case` 336s registers an offense and corrects an assignment indented some other way 336s accepts a correctly indented assignment 336s with everything on a single line 336s does not register an offense 336s with IndentOneStep: true 336s `case` ... `in` 336s regarding assignment where the right hand side is a `case` 336s registers an offense and corrects an assignment indented some other way 336s accepts a correctly indented assignment 336s registers an offense and corrects an assignment indented as `case` 336s with everything on a single line 336s does not register an offense 336s `case` ... `when` 336s with everything on a single line 336s does not register an offense 336s regarding assignment where the right hand side is a `case` 336s registers an offense and corrects an assignment indented some other way 336s registers an offense and corrects an assignment indented as `case` 336s accepts a correctly indented assignment 336s with EnforcedStyle: case 336s with IndentOneStep: false 336s `case` ... `when` 336s accepts a `when` clause that's equally indented with `case` 336s doesn't get confused by symbols named `case` or `when` 336s accepts correctly indented whens in complex combinations 336s registers an offense and corrects a `when` clause that is indented deeper than `case` 336s doesn't get confused by strings with `case` in them 336s with everything on a single line 336s does not register an offense 336s regarding assignment where the right hand side is a `case` 336s registers an offense and corrects assignment indented some other way 336s accepts a correctly indented assignment 337s registers an offense and corrects correct + opposite style 337s registers an offense and corrects assignment indented as end 337s `case` ... `in` 337s accepts an `in` clause that's equally indented with `case` 337s doesn't get confused by symbols named `case` or `in` 337s accepts correctly indented whens in complex combinations 337s registers an offense and corrects an `in` clause that is indented deeper than `case` 337s doesn't get confused by strings with `case` in them 337s with everything on a single line 337s does not register an offense 337s regarding assignment where the right hand side is a `case` 337s registers an offense and corrects assignment indented some other way 337s accepts a correctly indented assignment 337s registers an offense and corrects assignment indented as `end` 337s registers an offense and corrects correct + opposite style 337s with IndentOneStep: true 337s `case` ... `in` 337s accepts an `in` clause that's 2 spaces deeper than `case` 337s registers an offense and corrects an `in` clause that is equally indented with `case` 337s when indentation width is overridden for this cop only 337s respects cop-specific IndentationWidth 337s regarding assignment where the right hand side is a `case` 337s registers an offense and corrects an assignment indented some other way 337s accepts a correctly indented assignment 337s with everything on a single line 337s does not register an offense 337s `case` ... `when` 337s registers an offense and corrects a `when` clause that is equally indented with `case` 337s accepts a `when` clause that's 2 spaces deeper than `case` 337s when indentation width is overridden for this cop only 337s respects cop-specific IndentationWidth 337s with everything on a single line 337s does not register an offense 337s regarding assignment where the right hand side is a `case` 337s accepts a correctly indented assignment 337s registers an offense and corrects an assignment indented some other way 337s 337s RuboCop::Cop::VariableForce::Reference 337s .new 337s when non variable reference node is passed 337s raises error 337s 337s RuboCop::Cop::Style::ConditionalAssignment 337s registers an offense for assignment in unless else 337s allows different assignment types in case with when else 337s registers an offense for assignment in if elsif else 337s allows method calls in if else 337s allows assignment to the result of a ternary operation 337s allows if elsif else with the same assignment only in if else 337s registers an offense for assignment in ternary operation using strings 337s allows assignment in multiple branches when it is wrapped in a modifier 337s allows aref assignment with different indices in if..else 337s doesn't crash when assignment statement uses chars which have special meaning in a regex 337s allows modifier if inside of if else 337s registers an offense for assignment in if elsif elsif else 337s registers an offense for assignment in case when then else 337s allows if else without variable assignment 337s counts array assignment when determining multiple assignment 337s allows if elsif else with the same assignment only in elsif else 337s autocorrects assignment in if else when the assignment spans multiple lines 337s registers an offense for assignment in case with when else 337s allows if elsif else with the same assignment only in if elsif 337s allows assignment using different (method) operators in if..else 337s registers an offense in an if else if the assignment is already at the line length limit 337s allows assignment of different variables in if else 337s allows assignment using different operators in if else 337s doesn't crash with empty braces 337s allows method calls in conditionals 337s allows modifier if 337s allows assignment using different operators in if elsif else 337s registers an offense for assignment in if then elsif then else 337s allows assignment of different variables in case when else 337s behaves like all assignment types 337s with end alignment to start_of_line 337s for a class variable lval 337s registers an offense for assignment using &= in case when 337s registers an offense for assignment using &= in if else 337s for a constant lval 337s registers an offense for assignment using &= in case when 337s registers an offense for assignment using &= in if else 337s for a instance variable lval 337s registers an offense for assignment using &= in if else 337s registers an offense for assignment using &= in case when 337s for a global variable lval 337s registers an offense for assignment using &= in case when 337s registers an offense for assignment using &= in if else 337s for a local variable lval 337s registers an offense for assignment using &= in case when 337s registers an offense for assignment using &= in if else 337s for a instance variable lval 337s registers an offense for assignment using &= in ternary 337s for a class variable lval 337s registers an offense for assignment using &= in ternary 337s with end alignment to keyword 337s for a instance variable lval 337s registers an offense for assignment using &= in if else 337s registers an offense for assignment using &= in case when 337s for a global variable lval 337s registers an offense for assignment using &= in if else 337s registers an offense for assignment using &= in case when 337s for a local variable lval 337s registers an offense for assignment using &= in case when 337s registers an offense for assignment using &= in if else 337s for a constant lval 337s registers an offense for assignment using &= in case when 337s registers an offense for assignment using &= in if else 337s for a class variable lval 337s registers an offense for assignment using &= in case when 337s registers an offense for assignment using &= in if else 337s for a constant lval 337s registers an offense for assignment using &= in ternary 337s for a global variable lval 337s registers an offense for assignment using &= in ternary 337s for a local variable lval 337s registers an offense for assignment using &= in ternary 337s behaves like all assignment types 337s with end alignment to keyword 337s for a local variable lval 337s registers an offense for assignment using << in if else 337s registers an offense for assignment using << in case when 337s for a constant lval 337s registers an offense for assignment using << in if else 337s registers an offense for assignment using << in case when 337s for a global variable lval 337s registers an offense for assignment using << in case when 337s registers an offense for assignment using << in if else 337s for a instance variable lval 337s registers an offense for assignment using << in if else 337s registers an offense for assignment using << in case when 337s for a class variable lval 337s registers an offense for assignment using << in case when 337s registers an offense for assignment using << in if else 337s for a class variable lval 337s registers an offense for assignment using << in ternary 337s for a local variable lval 337s registers an offense for assignment using << in ternary 337s for a instance variable lval 337s registers an offense for assignment using << in ternary 337s for a global variable lval 337s registers an offense for assignment using << in ternary 337s with end alignment to start_of_line 337s for a instance variable lval 337s registers an offense for assignment using << in case when 337s registers an offense for assignment using << in if else 337s for a local variable lval 337s registers an offense for assignment using << in case when 337s registers an offense for assignment using << in if else 337s for a class variable lval 337s registers an offense for assignment using << in if else 337s registers an offense for assignment using << in case when 337s for a global variable lval 337s registers an offense for assignment using << in case when 337s registers an offense for assignment using << in if else 337s for a constant lval 337s registers an offense for assignment using << in case when 337s registers an offense for assignment using << in if else 337s for a constant lval 337s registers an offense for assignment using << in ternary 337s behaves like all assignment types 337s for a local variable lval 337s registers an offense for assignment using %= in ternary 337s with end alignment to start_of_line 337s for a constant lval 337s registers an offense for assignment using %= in if else 337s registers an offense for assignment using %= in case when 337s for a class variable lval 337s registers an offense for assignment using %= in case when 337s registers an offense for assignment using %= in if else 337s for a local variable lval 337s registers an offense for assignment using %= in if else 337s registers an offense for assignment using %= in case when 337s for a instance variable lval 337s registers an offense for assignment using %= in case when 337s registers an offense for assignment using %= in if else 337s for a global variable lval 337s registers an offense for assignment using %= in case when 337s registers an offense for assignment using %= in if else 337s for a constant lval 337s registers an offense for assignment using %= in ternary 337s with end alignment to keyword 337s for a global variable lval 337s registers an offense for assignment using %= in case when 337s registers an offense for assignment using %= in if else 337s for a constant lval 337s registers an offense for assignment using %= in case when 337s registers an offense for assignment using %= in if else 337s for a local variable lval 337s registers an offense for assignment using %= in case when 337s registers an offense for assignment using %= in if else 337s for a class variable lval 337s registers an offense for assignment using %= in if else 337s registers an offense for assignment using %= in case when 337s for a instance variable lval 337s registers an offense for assignment using %= in if else 337s registers an offense for assignment using %= in case when 337s for a global variable lval 337s registers an offense for assignment using %= in ternary 337s for a class variable lval 337s registers an offense for assignment using %= in ternary 337s for a instance variable lval 337s registers an offense for assignment using %= in ternary 337s behaves like all assignment types 337s for a local variable lval 337s registers an offense for assignment using += in ternary 337s for a class variable lval 337s registers an offense for assignment using += in ternary 337s with end alignment to start_of_line 337s for a class variable lval 337s registers an offense for assignment using += in case when 337s registers an offense for assignment using += in if else 337s for a constant lval 337s registers an offense for assignment using += in if else 337s registers an offense for assignment using += in case when 337s for a instance variable lval 337s registers an offense for assignment using += in if else 337s registers an offense for assignment using += in case when 337s for a local variable lval 337s registers an offense for assignment using += in case when 337s registers an offense for assignment using += in if else 337s for a global variable lval 337s registers an offense for assignment using += in if else 337s registers an offense for assignment using += in case when 337s for a constant lval 337s registers an offense for assignment using += in ternary 337s for a global variable lval 337s registers an offense for assignment using += in ternary 337s for a instance variable lval 337s registers an offense for assignment using += in ternary 337s with end alignment to keyword 337s for a global variable lval 337s registers an offense for assignment using += in if else 337s registers an offense for assignment using += in case when 337s for a instance variable lval 337s registers an offense for assignment using += in case when 337s registers an offense for assignment using += in if else 337s for a local variable lval 337s registers an offense for assignment using += in if else 337s registers an offense for assignment using += in case when 337s for a class variable lval 337s registers an offense for assignment using += in if else 337s registers an offense for assignment using += in case when 337s for a constant lval 337s registers an offense for assignment using += in case when 337s registers an offense for assignment using += in if else 337s behaves like comparison methods 337s registers an offense for comparison methods in ternary operations 337s with end alignment to start_of_line 337s corrects comparison methods in case when 337s corrects comparison methods in unless else 337s corrects comparison methods in if elsif else 337s >= Ruby 2.7 337s corrects comparison methods in case in 337s with end alignment to keyword 337s corrects comparison methods in if elsif else 337s corrects comparison methods in case when 337s corrects comparison methods in unless else 337s >= Ruby 2.7 337s corrects comparison methods in case in 337s behaves like comparison methods 337s registers an offense for comparison methods in ternary operations 337s with end alignment to keyword 337s corrects comparison methods in unless else 337s corrects comparison methods in case when 337s corrects comparison methods in if elsif else 337s >= Ruby 2.7 337s corrects comparison methods in case in 337s with end alignment to start_of_line 337s corrects comparison methods in if elsif else 337s corrects comparison methods in case when 337s corrects comparison methods in unless else 337s >= Ruby 2.7 337s corrects comparison methods in case in 337s behaves like all variable types 337s allows assignment to the return of case when 337s registers an offense assigning any variable type in if else 337s allows assignment to the return of if else 337s registers an offense assigning any variable type in case when 337s registers an offense assigning any variable type in ternary 337s allows assignment to the return of a ternary 337s behaves like all assignment types 337s with end alignment to start_of_line 337s for a local variable lval 337s registers an offense for assignment using **= in case when 337s registers an offense for assignment using **= in if else 337s for a global variable lval 337s registers an offense for assignment using **= in if else 337s registers an offense for assignment using **= in case when 337s for a instance variable lval 337s registers an offense for assignment using **= in if else 337s registers an offense for assignment using **= in case when 337s for a class variable lval 337s registers an offense for assignment using **= in case when 337s registers an offense for assignment using **= in if else 337s for a constant lval 337s registers an offense for assignment using **= in if else 337s registers an offense for assignment using **= in case when 337s with end alignment to keyword 337s for a instance variable lval 337s registers an offense for assignment using **= in case when 337s registers an offense for assignment using **= in if else 337s for a class variable lval 337s registers an offense for assignment using **= in if else 337s registers an offense for assignment using **= in case when 337s for a global variable lval 337s registers an offense for assignment using **= in if else 337s registers an offense for assignment using **= in case when 337s for a constant lval 337s registers an offense for assignment using **= in case when 337s registers an offense for assignment using **= in if else 337s for a local variable lval 337s registers an offense for assignment using **= in if else 337s registers an offense for assignment using **= in case when 337s for a local variable lval 337s registers an offense for assignment using **= in ternary 337s for a constant lval 337s registers an offense for assignment using **= in ternary 337s for a instance variable lval 337s registers an offense for assignment using **= in ternary 337s for a global variable lval 337s registers an offense for assignment using **= in ternary 337s for a class variable lval 337s registers an offense for assignment using **= in ternary 337s behaves like comparison methods 337s registers an offense for comparison methods in ternary operations 337s with end alignment to start_of_line 337s corrects comparison methods in if elsif else 337s corrects comparison methods in case when 337s corrects comparison methods in unless else 337s >= Ruby 2.7 337s corrects comparison methods in case in 337s with end alignment to keyword 337s corrects comparison methods in unless else 337s corrects comparison methods in case when 337s corrects comparison methods in if elsif else 337s >= Ruby 2.7 337s corrects comparison methods in case in 337s IncludeTernaryExpressions false 337s allows assignment in ternary operation 337s behaves like all variable types 337s registers an offense assigning any variable type in if else 337s allows assignment to the return of case when 337s allows assignment to the return of if else 337s allows assignment to the return of a ternary 337s registers an offense assigning any variable type in case when 337s registers an offense assigning any variable type in ternary 337s autocorrect 337s preserves comments during correction in if else 337s preserves comments during correction in case when else 337s corrects assignment to unbracketed array in if else 337s corrects =~ in ternary operations 337s assignment from a method 337s corrects unless else 337s corrects if else 337s corrects case when 337s aref assignment 337s corrects if..else 337s with different indices 337s doesn't register an offense 337s constant assignment 337s corrects if..else with top-level constant 337s corrects if..else with namespaced constant 337s multiple assignment 337s does not register an offense in if else 337s does not register an offense in case when 337s self.attribute= assignment 337s corrects if..else 337s with different receivers 337s doesn't register an offense 337s behaves like comparison methods 337s registers an offense for comparison methods in ternary operations 337s with end alignment to start_of_line 338s corrects comparison methods in case when 338s corrects comparison methods in unless else 338s corrects comparison methods in if elsif else 338s >= Ruby 2.7 338s corrects comparison methods in case in 338s with end alignment to keyword 338s corrects comparison methods in unless else 338s corrects comparison methods in if elsif else 338s corrects comparison methods in case when 338s >= Ruby 2.7 338s corrects comparison methods in case in 338s behaves like all variable types 338s allows assignment to the return of a ternary 338s registers an offense assigning any variable type in case when 338s allows assignment to the return of case when 338s registers an offense assigning any variable type in ternary 338s allows assignment to the return of if else 338s registers an offense assigning any variable type in if else 338s empty branch 338s allows case with an empty else 338s allows an empty if statement 338s allows if elsif without else 338s allows an empty when branch with an else 338s allows assignment in case when without an else 338s allows an empty elsif statement 338s allows assignment in unless without an else 338s allows assignment in if without an else 338s behaves like all assignment types 338s with end alignment to keyword 338s for a global variable lval 338s registers an offense for assignment using -= in case when 338s registers an offense for assignment using -= in if else 338s for a instance variable lval 338s registers an offense for assignment using -= in if else 338s registers an offense for assignment using -= in case when 338s for a constant lval 338s registers an offense for assignment using -= in if else 338s registers an offense for assignment using -= in case when 338s for a class variable lval 338s registers an offense for assignment using -= in case when 338s registers an offense for assignment using -= in if else 338s for a local variable lval 338s registers an offense for assignment using -= in if else 338s registers an offense for assignment using -= in case when 338s with end alignment to start_of_line 338s for a class variable lval 338s registers an offense for assignment using -= in case when 338s registers an offense for assignment using -= in if else 338s for a local variable lval 338s registers an offense for assignment using -= in case when 338s registers an offense for assignment using -= in if else 338s for a instance variable lval 338s registers an offense for assignment using -= in if else 338s registers an offense for assignment using -= in case when 338s for a constant lval 338s registers an offense for assignment using -= in if else 338s registers an offense for assignment using -= in case when 338s for a global variable lval 338s registers an offense for assignment using -= in case when 338s registers an offense for assignment using -= in if else 338s for a local variable lval 338s registers an offense for assignment using -= in ternary 338s for a class variable lval 338s registers an offense for assignment using -= in ternary 338s for a global variable lval 338s registers an offense for assignment using -= in ternary 338s for a instance variable lval 338s registers an offense for assignment using -= in ternary 338s for a constant lval 338s registers an offense for assignment using -= in ternary 338s behaves like comparison methods 338s registers an offense for comparison methods in ternary operations 338s with end alignment to start_of_line 338s corrects comparison methods in if elsif else 338s corrects comparison methods in case when 338s corrects comparison methods in unless else 338s >= Ruby 2.7 338s corrects comparison methods in case in 338s with end alignment to keyword 338s corrects comparison methods in if elsif else 338s corrects comparison methods in unless else 338s corrects comparison methods in case when 338s >= Ruby 2.7 338s corrects comparison methods in case in 338s configured to check conditions with multiple statements 338s registers an offense for multiple assignment when an earlier assignment is is protected by a modifier 338s allows assignment in multiple branches when it is wrapped in a modifier 338s assignment as the last statement 338s registers offense for multiple assignment in if elsif elsif else 338s registers offense for multiple assignment in unless else 338s registers an offense in if elsif else with some branches only containing variable assignment and others containing more than variable assignment 338s registers an offense in if elsif else with more than variable assignment 338s registers an offense in case when else with more than variable assignment 338s registers an offense in if else with more than variable assignment 338s registers offense for multiple assignments in case when with multiple whens 338s registers an offense in unless else with more than variable assignment 338s registers an offense for multiple assignment in if elsif else 338s registers offense for multiple assignments in case when with only one when 338s register an offense for multiple assignment in if else 338s multiple assignment in only one branch 338s registers an offense when multiple assignment is in if 338s registers an offense when multiple assignment is in else 338s registers an offense when multiple assignment is in elsif 338s behaves like allows out of order multiple assignment in if elsif else 338s allows out of order multiple assignment in if elsif else 338s autocorrect 338s corrects multiple assignment in if elsif else 338s corrects multiple assignment in if else 338s corrects multiple assignment in case when with multiple whens 338s corrects multiple assignment in unless else 338s corrects multiple assignment in case when 338s corrects multiple assignment in if elsif else with multiple elsifs 338s corrects assignment in an if statement that is nested in unless else 338s behaves like all assignment types 338s for a local variable lval 338s registers an offense for assignment using >>= in ternary 338s with end alignment to start_of_line 338s for a instance variable lval 338s registers an offense for assignment using >>= in case when 338s registers an offense for assignment using >>= in if else 338s for a local variable lval 338s registers an offense for assignment using >>= in if else 338s registers an offense for assignment using >>= in case when 338s for a class variable lval 338s registers an offense for assignment using >>= in if else 338s registers an offense for assignment using >>= in case when 338s for a constant lval 338s registers an offense for assignment using >>= in if else 338s registers an offense for assignment using >>= in case when 338s for a global variable lval 338s registers an offense for assignment using >>= in if else 338s registers an offense for assignment using >>= in case when 338s for a constant lval 338s registers an offense for assignment using >>= in ternary 338s for a class variable lval 338s registers an offense for assignment using >>= in ternary 338s for a global variable lval 338s registers an offense for assignment using >>= in ternary 338s for a instance variable lval 338s registers an offense for assignment using >>= in ternary 338s with end alignment to keyword 338s for a class variable lval 338s registers an offense for assignment using >>= in if else 338s registers an offense for assignment using >>= in case when 338s for a constant lval 338s registers an offense for assignment using >>= in case when 338s registers an offense for assignment using >>= in if else 338s for a global variable lval 338s registers an offense for assignment using >>= in case when 338s registers an offense for assignment using >>= in if else 338s for a instance variable lval 338s registers an offense for assignment using >>= in if else 338s registers an offense for assignment using >>= in case when 338s for a local variable lval 338s registers an offense for assignment using >>= in case when 338s registers an offense for assignment using >>= in if else 338s behaves like all variable types 338s registers an offense assigning any variable type in if else 338s allows assignment to the return of case when 338s registers an offense assigning any variable type in ternary 338s allows assignment to the return of if else 338s registers an offense assigning any variable type in case when 338s allows assignment to the return of a ternary 338s behaves like else followed by new conditional without else 338s allows if elsif else if 338s behaves like comparison methods 338s registers an offense for comparison methods in ternary operations 338s with end alignment to start_of_line 338s corrects comparison methods in case when 338s corrects comparison methods in if elsif else 338s corrects comparison methods in unless else 338s >= Ruby 2.7 338s corrects comparison methods in case in 338s with end alignment to keyword 338s corrects comparison methods in unless else 338s corrects comparison methods in case when 338s corrects comparison methods in if elsif else 338s >= Ruby 2.7 338s corrects comparison methods in case in 338s with nested conditionals 338s does not consider branches of nested ifs 338s eventually autocorrects all branches 338s behaves like all assignment types 338s for a local variable lval 338s registers an offense for assignment using /= in ternary 338s with end alignment to keyword 338s for a local variable lval 338s registers an offense for assignment using /= in case when 338s registers an offense for assignment using /= in if else 338s for a instance variable lval 338s registers an offense for assignment using /= in case when 338s registers an offense for assignment using /= in if else 338s for a global variable lval 338s registers an offense for assignment using /= in case when 338s registers an offense for assignment using /= in if else 338s for a constant lval 338s registers an offense for assignment using /= in case when 338s registers an offense for assignment using /= in if else 338s for a class variable lval 338s registers an offense for assignment using /= in case when 338s registers an offense for assignment using /= in if else 338s for a constant lval 338s registers an offense for assignment using /= in ternary 338s for a class variable lval 338s registers an offense for assignment using /= in ternary 338s for a instance variable lval 338s registers an offense for assignment using /= in ternary 338s with end alignment to start_of_line 338s for a local variable lval 338s registers an offense for assignment using /= in case when 338s registers an offense for assignment using /= in if else 338s for a global variable lval 338s registers an offense for assignment using /= in if else 338s registers an offense for assignment using /= in case when 338s for a instance variable lval 338s registers an offense for assignment using /= in case when 338s registers an offense for assignment using /= in if else 338s for a constant lval 338s registers an offense for assignment using /= in case when 338s registers an offense for assignment using /= in if else 338s for a class variable lval 338s registers an offense for assignment using /= in if else 338s registers an offense for assignment using /= in case when 338s for a global variable lval 338s registers an offense for assignment using /= in ternary 338s behaves like comparison methods 338s registers an offense for comparison methods in ternary operations 338s with end alignment to start_of_line 338s corrects comparison methods in case when 338s corrects comparison methods in unless else 338s corrects comparison methods in if elsif else 338s >= Ruby 2.7 338s corrects comparison methods in case in 338s with end alignment to keyword 338s corrects comparison methods in if elsif else 338s corrects comparison methods in unless else 338s corrects comparison methods in case when 338s >= Ruby 2.7 338s corrects comparison methods in case in 338s behaves like all variable types 338s registers an offense assigning any variable type in ternary 338s registers an offense assigning any variable type in case when 338s registers an offense assigning any variable type in if else 338s allows assignment to the return of a ternary 338s allows assignment to the return of case when 338s allows assignment to the return of if else 338s correction would exceed max line length 338s allows assignment to the same variable in if else if the correction would cause the condition to exceed the configured LineLength 338s allows assignment to the same variable in if else if the correction would create a line longer than the configured LineLength 338s allows assignment to the same variable in case when else if the correction would create a line longer than the configured LineLength 338s behaves like all assignment types 338s for a class variable lval 338s registers an offense for assignment using <<= in ternary 338s for a constant lval 338s registers an offense for assignment using <<= in ternary 338s for a local variable lval 338s registers an offense for assignment using <<= in ternary 338s with end alignment to start_of_line 338s for a constant lval 338s registers an offense for assignment using <<= in case when 338s registers an offense for assignment using <<= in if else 338s for a local variable lval 338s registers an offense for assignment using <<= in case when 338s registers an offense for assignment using <<= in if else 338s for a global variable lval 338s registers an offense for assignment using <<= in case when 338s registers an offense for assignment using <<= in if else 338s for a instance variable lval 338s registers an offense for assignment using <<= in case when 338s registers an offense for assignment using <<= in if else 338s for a class variable lval 338s registers an offense for assignment using <<= in if else 338s registers an offense for assignment using <<= in case when 338s for a instance variable lval 338s registers an offense for assignment using <<= in ternary 338s for a global variable lval 338s registers an offense for assignment using <<= in ternary 338s with end alignment to keyword 338s for a local variable lval 338s registers an offense for assignment using <<= in if else 338s registers an offense for assignment using <<= in case when 338s for a constant lval 338s registers an offense for assignment using <<= in case when 338s registers an offense for assignment using <<= in if else 338s for a instance variable lval 338s registers an offense for assignment using <<= in case when 338s registers an offense for assignment using <<= in if else 338s for a class variable lval 338s registers an offense for assignment using <<= in case when 338s registers an offense for assignment using <<= in if else 338s for a global variable lval 338s registers an offense for assignment using <<= in if else 338s registers an offense for assignment using <<= in case when 338s behaves like all assignment types 338s with end alignment to start_of_line 338s for a instance variable lval 338s registers an offense for assignment using ^= in if else 338s registers an offense for assignment using ^= in case when 338s for a class variable lval 338s registers an offense for assignment using ^= in case when 338s registers an offense for assignment using ^= in if else 338s for a global variable lval 338s registers an offense for assignment using ^= in if else 338s registers an offense for assignment using ^= in case when 338s for a local variable lval 338s registers an offense for assignment using ^= in if else 338s registers an offense for assignment using ^= in case when 338s for a constant lval 338s registers an offense for assignment using ^= in case when 338s registers an offense for assignment using ^= in if else 338s for a local variable lval 338s registers an offense for assignment using ^= in ternary 338s for a constant lval 338s registers an offense for assignment using ^= in ternary 338s with end alignment to keyword 338s for a class variable lval 338s registers an offense for assignment using ^= in case when 338s registers an offense for assignment using ^= in if else 338s for a global variable lval 338s registers an offense for assignment using ^= in case when 338s registers an offense for assignment using ^= in if else 338s for a constant lval 338s registers an offense for assignment using ^= in case when 338s registers an offense for assignment using ^= in if else 338s for a local variable lval 338s registers an offense for assignment using ^= in if else 338s registers an offense for assignment using ^= in case when 338s for a instance variable lval 338s registers an offense for assignment using ^= in if else 338s registers an offense for assignment using ^= in case when 338s for a class variable lval 338s registers an offense for assignment using ^= in ternary 338s for a global variable lval 338s registers an offense for assignment using ^= in ternary 338s for a instance variable lval 338s registers an offense for assignment using ^= in ternary 338s for if elsif else if else 338s autocorrects the inner offense first 338s autocorrects the outer offense later 338s EndAlignment configured to start_of_line 338s autocorrect 338s uses proper end alignment in if 339s uses proper end alignment in case 339s uses proper end alignment in unless 339s behaves like comparison methods 339s registers an offense for comparison methods in ternary operations 339s with end alignment to start_of_line 339s corrects comparison methods in if elsif else 339s corrects comparison methods in unless else 339s corrects comparison methods in case when 339s >= Ruby 2.7 339s corrects comparison methods in case in 339s with end alignment to keyword 339s corrects comparison methods in if elsif else 339s corrects comparison methods in case when 339s corrects comparison methods in unless else 339s >= Ruby 2.7 339s corrects comparison methods in case in 339s assignment as the last statement 339s allows assignment in if elsif else with some branches only containing variable assignment and others containing more than variable assignment 339s allows multiple assignment in unless else 339s allows multiple assignments in case when with multiple whens 339s allows multiple assignment in if elsif else when the last assignment is the same and the earlier assignments do not appear in all branches 339s allows multiple assignment in if elsif elsif else 339s allows multiple assignment in case when else when the last assignment is the same and the earlier assignments do not appear in all branches 339s allows multiple assignment in if elsif else 339s allows multiple assignments in case when with only one when 339s allows multiple assignments in case when if there are uniq variables in the when branches 339s allows multiple assignment in case statements when the last assignment is the same and the earlier assignments do not appear in all branches 339s allows variable assignment in case when else with more than variable assignment 339s allows more than variable assignment in if elsif else 339s allows multiple assignment in if else 339s allows more than variable assignment in if else 339s allows variable assignment in unless else with more than variable assignment 339s behaves like allows out of order multiple assignment in if elsif else 339s allows out of order multiple assignment in if elsif else 339s multiple assignment in only one branch 339s allows multiple assignment is in if 339s does not register an offense when multiple assignment is in else 339s allows multiple assignment is in elsif 339s behaves like all assignment types 339s for a constant lval 339s registers an offense for assignment using &&= in ternary 339s for a global variable lval 339s registers an offense for assignment using &&= in ternary 339s for a instance variable lval 339s registers an offense for assignment using &&= in ternary 339s with end alignment to keyword 339s for a instance variable lval 339s registers an offense for assignment using &&= in case when 339s registers an offense for assignment using &&= in if else 339s for a class variable lval 339s registers an offense for assignment using &&= in if else 339s registers an offense for assignment using &&= in case when 339s for a constant lval 339s registers an offense for assignment using &&= in if else 339s registers an offense for assignment using &&= in case when 339s for a global variable lval 339s registers an offense for assignment using &&= in if else 339s registers an offense for assignment using &&= in case when 339s for a local variable lval 339s registers an offense for assignment using &&= in if else 339s registers an offense for assignment using &&= in case when 339s with end alignment to start_of_line 339s for a constant lval 339s registers an offense for assignment using &&= in case when 339s registers an offense for assignment using &&= in if else 339s for a global variable lval 339s registers an offense for assignment using &&= in if else 339s registers an offense for assignment using &&= in case when 339s for a instance variable lval 339s registers an offense for assignment using &&= in case when 339s registers an offense for assignment using &&= in if else 339s for a class variable lval 339s registers an offense for assignment using &&= in if else 339s registers an offense for assignment using &&= in case when 339s for a local variable lval 339s registers an offense for assignment using &&= in if else 339s registers an offense for assignment using &&= in case when 339s for a local variable lval 339s registers an offense for assignment using &&= in ternary 339s for a class variable lval 339s registers an offense for assignment using &&= in ternary 339s behaves like all variable types 339s registers an offense assigning any variable type in ternary 339s registers an offense assigning any variable type in if else 339s registers an offense assigning any variable type in case when 339s allows assignment to the return of if else 339s allows assignment to the return of case when 339s allows assignment to the return of a ternary 339s behaves like all assignment types 339s with end alignment to start_of_line 339s for a global variable lval 339s registers an offense for assignment using ||= in if else 339s registers an offense for assignment using ||= in case when 339s for a instance variable lval 339s registers an offense for assignment using ||= in if else 339s registers an offense for assignment using ||= in case when 339s for a constant lval 339s registers an offense for assignment using ||= in case when 339s registers an offense for assignment using ||= in if else 339s for a class variable lval 339s registers an offense for assignment using ||= in if else 339s registers an offense for assignment using ||= in case when 339s for a local variable lval 339s registers an offense for assignment using ||= in case when 339s registers an offense for assignment using ||= in if else 339s with end alignment to keyword 339s for a global variable lval 339s registers an offense for assignment using ||= in case when 339s registers an offense for assignment using ||= in if else 339s for a instance variable lval 339s registers an offense for assignment using ||= in if else 339s registers an offense for assignment using ||= in case when 339s for a local variable lval 339s registers an offense for assignment using ||= in if else 339s registers an offense for assignment using ||= in case when 339s for a constant lval 339s registers an offense for assignment using ||= in case when 339s registers an offense for assignment using ||= in if else 339s for a class variable lval 339s registers an offense for assignment using ||= in case when 339s registers an offense for assignment using ||= in if else 339s for a local variable lval 339s registers an offense for assignment using ||= in ternary 339s for a constant lval 339s registers an offense for assignment using ||= in ternary 339s for a instance variable lval 339s registers an offense for assignment using ||= in ternary 339s for a class variable lval 339s registers an offense for assignment using ||= in ternary 339s for a global variable lval 339s registers an offense for assignment using ||= in ternary 339s behaves like all variable types 339s allows assignment to the return of case when 339s registers an offense assigning any variable type in ternary 339s registers an offense assigning any variable type in case when 339s allows assignment to the return of if else 339s allows assignment to the return of a ternary 339s registers an offense assigning any variable type in if else 339s behaves like comparison methods 339s registers an offense for comparison methods in ternary operations 339s with end alignment to keyword 339s corrects comparison methods in if elsif else 339s corrects comparison methods in unless else 339s corrects comparison methods in case when 339s >= Ruby 2.7 339s corrects comparison methods in case in 339s with end alignment to start_of_line 339s corrects comparison methods in if elsif else 339s corrects comparison methods in case when 339s corrects comparison methods in unless else 339s >= Ruby 2.7 339s corrects comparison methods in case in 339s behaves like else followed by new conditional without else 339s allows if elsif else unless 339s behaves like comparison methods 339s registers an offense for comparison methods in ternary operations 339s with end alignment to start_of_line 339s corrects comparison methods in case when 339s corrects comparison methods in if elsif else 339s corrects comparison methods in unless else 339s >= Ruby 2.7 339s corrects comparison methods in case in 339s with end alignment to keyword 339s corrects comparison methods in if elsif else 339s corrects comparison methods in unless else 339s corrects comparison methods in case when 339s >= Ruby 2.7 339s corrects comparison methods in case in 339s behaves like all assignment types 339s for a global variable lval 339s registers an offense for assignment using *= in ternary 339s for a instance variable lval 339s registers an offense for assignment using *= in ternary 339s with end alignment to start_of_line 339s for a class variable lval 339s registers an offense for assignment using *= in case when 339s registers an offense for assignment using *= in if else 339s for a global variable lval 339s registers an offense for assignment using *= in case when 339s registers an offense for assignment using *= in if else 339s for a instance variable lval 339s registers an offense for assignment using *= in if else 339s registers an offense for assignment using *= in case when 339s for a constant lval 339s registers an offense for assignment using *= in if else 339s registers an offense for assignment using *= in case when 339s for a local variable lval 339s registers an offense for assignment using *= in if else 339s registers an offense for assignment using *= in case when 339s with end alignment to keyword 339s for a constant lval 339s registers an offense for assignment using *= in if else 339s registers an offense for assignment using *= in case when 339s for a local variable lval 339s registers an offense for assignment using *= in if else 339s registers an offense for assignment using *= in case when 339s for a global variable lval 339s registers an offense for assignment using *= in case when 339s registers an offense for assignment using *= in if else 339s for a class variable lval 339s registers an offense for assignment using *= in if else 339s registers an offense for assignment using *= in case when 339s for a instance variable lval 339s registers an offense for assignment using *= in if else 339s registers an offense for assignment using *= in case when 339s for a constant lval 339s registers an offense for assignment using *= in ternary 339s for a local variable lval 339s registers an offense for assignment using *= in ternary 339s for a class variable lval 339s registers an offense for assignment using *= in ternary 339s behaves like all assignment types 339s for a global variable lval 339s registers an offense for assignment using = in ternary 339s with end alignment to keyword 339s for a instance variable lval 339s registers an offense for assignment using = in if else 339s registers an offense for assignment using = in case when 339s for a constant lval 339s registers an offense for assignment using = in if else 339s registers an offense for assignment using = in case when 339s for a class variable lval 339s registers an offense for assignment using = in if else 339s registers an offense for assignment using = in case when 339s for a global variable lval 339s registers an offense for assignment using = in if else 339s registers an offense for assignment using = in case when 339s for a local variable lval 339s registers an offense for assignment using = in if else 339s registers an offense for assignment using = in case when 339s for a local variable lval 339s registers an offense for assignment using = in ternary 339s with end alignment to start_of_line 339s for a instance variable lval 339s registers an offense for assignment using = in case when 339s registers an offense for assignment using = in if else 339s for a class variable lval 339s registers an offense for assignment using = in case when 339s registers an offense for assignment using = in if else 339s for a constant lval 339s registers an offense for assignment using = in case when 339s registers an offense for assignment using = in if else 339s for a global variable lval 339s registers an offense for assignment using = in case when 339s registers an offense for assignment using = in if else 339s for a local variable lval 339s registers an offense for assignment using = in case when 339s registers an offense for assignment using = in if else 339s for a instance variable lval 339s registers an offense for assignment using = in ternary 339s for a constant lval 339s registers an offense for assignment using = in ternary 339s for a class variable lval 339s registers an offense for assignment using = in ternary 339s behaves like all assignment types 339s for a local variable lval 339s registers an offense for assignment using |= in ternary 339s for a class variable lval 339s registers an offense for assignment using |= in ternary 339s with end alignment to keyword 339s for a instance variable lval 339s registers an offense for assignment using |= in if else 339s registers an offense for assignment using |= in case when 339s for a global variable lval 339s registers an offense for assignment using |= in if else 339s registers an offense for assignment using |= in case when 339s for a local variable lval 339s registers an offense for assignment using |= in if else 339s registers an offense for assignment using |= in case when 339s for a class variable lval 339s registers an offense for assignment using |= in if else 339s registers an offense for assignment using |= in case when 339s for a constant lval 339s registers an offense for assignment using |= in if else 339s registers an offense for assignment using |= in case when 339s for a constant lval 339s registers an offense for assignment using |= in ternary 339s for a global variable lval 339s registers an offense for assignment using |= in ternary 339s for a instance variable lval 339s registers an offense for assignment using |= in ternary 339s with end alignment to start_of_line 339s for a instance variable lval 339s registers an offense for assignment using |= in if else 339s registers an offense for assignment using |= in case when 339s for a local variable lval 339s registers an offense for assignment using |= in case when 339s registers an offense for assignment using |= in if else 339s for a class variable lval 339s registers an offense for assignment using |= in case when 339s registers an offense for assignment using |= in if else 339s for a global variable lval 339s registers an offense for assignment using |= in if else 339s registers an offense for assignment using |= in case when 339s for a constant lval 339s registers an offense for assignment using |= in case when 339s registers an offense for assignment using |= in if else 339s 339s RuboCop::Cop::Layout::SpaceBeforeBlockBraces 339s with space before empty braces allowed 339s registers an offense and corrects empty braces 339s accepts empty braces with outer space 339s when EnforcedStyle is space 339s accepts braces surrounded by spaces 339s registers an offense and corrects opposite + correct style 339s registers an offense and corrects multiline block where the left brace has no outer space 339s registers an offense and corrects left brace without outer space 339s Ruby 2.7 339s registers an offense and corrects multiline block where the left brace has no outer space 339s registers an offense and corrects opposite + correct style 339s with space before empty braces not allowed 339s accepts empty braces without outer space 339s registers an offense and corrects empty braces 339s when EnforcedStyle is no_space 339s registers an offense and corrects braces surrounded by spaces 339s registers an offense and corrects correct + opposite style 339s accepts left brace without outer space 339s Ruby 2.7 339s registers an offense and corrects correct + opposite style 339s with `EnforcedStyle` of `Style/BlockDelimiters` 339s accepts left brace without outer space 339s with invalid value for EnforcedStyleForEmptyBraces 339s fails with an error 339s 339s RuboCop::Cop::Style::Next 339s does not blow up on empty body for block 339s handles `then` when autocorrecting 339s does not blow up on empty body until block 339s handles nested autocorrections 339s keeps comments when autocorrecting 339s allows loops with conditions at the end with ternary op 339s does not blow up on empty body while block 339s does not crash with empty brackets 339s allows super nodes 339s allows empty blocks 339s doesn't reindent heredoc bodies when autocorrecting 339s does not crash with an empty body branch 339s behaves like iterators 339s registers an offense for if inside of select 339s registers an offense for if inside of times 339s autocorrects a misaligned end 339s registers an offense for if inside of nested iterators 339s allows loops with if being the entire body with else 339s allows loops with if with else at the end 339s registers an offense for a condition at the end of an iterator when there is more in the iterator than the condition 339s reports an offense for if whose body has 3 lines 339s registers an offense when line break before condition 339s registers an offense for if inside of for 339s allows loops with conditional return 339s registers an offense for if inside of each_with_object 339s registers an offense for if inside of reject 339s registers an offense for if inside of loop 339s registers an offense for if inside of reject! 339s registers an offense for if inside of select! 340s registers an offense for if inside of each 340s registers an offense for if inside of collect 340s registers an offense for if inside of nested iterators 340s registers an offense for if inside of map 340s allows loops with conditional break 340s allows loops with if with else, nested in another condition 340s registers an offense for if inside of downto 340s EnforcedStyle: always 340s registers an offense for modifier if 340s Ruby 2.7 340s registers an offense for if inside of downto numblock 340s EnforcedStyle: skip_modifier_ifs 340s allows modifier if 340s Invalid MinBodyLength 340s fails with an error 340s MinBodyLength: 3 340s accepts if whose body has 1 line 340s behaves like iterators 340s registers an offense for unless inside of downto 340s allows loops with conditional break 340s allows loops with unless with else, nested in another condition 340s registers an offense for unless inside of collect 340s reports an offense for unless whose body has 3 lines 340s registers an offense for unless inside of nested iterators 340s autocorrects a misaligned end 340s registers an offense for unless inside of reject 340s registers an offense for unless inside of times 340s allows loops with unless with else at the end 340s registers an offense for unless inside of select! 340s allows loops with unless being the entire body with else 340s registers an offense for unless inside of select 340s allows loops with conditional return 340s registers an offense for unless inside of map 340s registers an offense when line break before condition 340s registers an offense for unless inside of loop 340s registers an offense for a condition at the end of an iterator when there is more in the iterator than the condition 340s registers an offense for unless inside of for 340s registers an offense for unless inside of reject! 340s registers an offense for unless inside of each_with_object 340s registers an offense for unless inside of nested iterators 340s registers an offense for unless inside of each 340s Ruby 2.7 340s registers an offense for unless inside of downto numblock 340s EnforcedStyle: always 340s registers an offense for modifier unless 340s EnforcedStyle: skip_modifier_ifs 340s allows modifier unless 340s 340s RuboCop::CLI --disable-uncorrectable 340s --disable-uncorrectable 340s does not disable anything for cops that support autocorrect 340s if one one-line disable statement fits 340s adds it 340s adds it when the cop supports autocorrect but does not correct the offense 340s and there are two offenses of the same kind on one line 340s adds a single one-line disable statement 340s but there are more offenses on the line and they don't all fit 341s adds both one-line and before-and-after disable statements 341s if a one-line disable statement doesn't fit 341s adds before-and-after disable statement 341s and the offense is inside a heredoc 341s adds before-and-after disable statement around the heredoc 341s when exist offense for Layout/SpaceInsideArrayLiteralBrackets 341s when `EnforcedStyle: no_space` 341s does not disable anything for cops that support autocorrect 341s when `EnforcedStyle: space` 341s does not disable anything for cops that support autocorrect 341s 341s RuboCop::Cop::Style::ReturnNil 341s when enforced style is `return` 341s does not register an offense for return nil from iterators 341s does not register an offense for returning others 341s registers an offense for return nil 341s when enforced style is `return_nil` 341s does not register an offense for returning others 341s registers an offense for return 341s 341s RuboCop::Cop::Style::RedundantParentheses 341s registers an offense for parens around a literal in array and following newline 341s registers an offense for parens around last expressions in block body 341s registers an offense for parens around a literal in array 341s registers an offense for parens around a variable after semicolon 341s registers an offense for parens around an integer exponentiation base 341s accepts parentheses around an irange 341s accepts parentheses around a constant passed to when 341s registers an offense and corrects an array of multiple heredocs 341s accepts parentheses when enclosed in parentheses at `while-post` 341s accepts parentheses inside an irange 341s accepts parentheses around a method call with unparenthesized arguments 341s accepts parentheses when they touch the preceding keyword 341s accepts parentheses around an erange 341s registers an offense for parens around a literal hash value and following newline 341s registers an offense for parens around a receiver of a method call with an argument 341s registers an offense for parens around a literal hash value 341s registers an offense for parens around a negative exponent 341s accepts parentheses around operator keywords 341s registers an offense when there is space around the parentheses 341s accepts parentheses in yield call with hash 341s accepts parentheses when enclosed in parentheses at `until-post` 341s registers an offense for parens around a float exponentiation base 341s accepts parentheses in super call with hash 341s accepts parentheses inside an erange 341s registers an offense and corrects for a parenthesized item in a hash where the comma is on a line with the closing parens 341s accepts parentheses around the error passed to rescue 341s registers an offense for parens around last expressions in method body 341s registers an offense for parens around a positive exponent 341s registers an offense for parens around an interpolated expression 341s registers an offense and corrects when method arguments are unnecessarily parenthesized 341s registers an offense for parens around method body 341s registers an offense for parens around a block body 341s accepts parentheses when they touch the following keyword 341s behaves like redundant 341s registers an offense for parentheses around a literal 341s behaves like redundant 341s registers an offense for parentheses around a method call 341s literals in an array 341s when there is a comma on the same line as the closing parentheses 341s registers an offense and corrects when there is a subsequent item 341s registers an offense and corrects when there is a trailing comma 341s registers an offense and corrects when there is no subsequent item 341s registers an offense and corrects when there is assignment 341s behaves like redundant 341s registers an offense for parentheses around a keyword 341s behaves like redundant 341s registers an offense for parentheses around a literal 341s behaves like plausible 341s accepts parentheses when arguments are unparenthesized 341s behaves like plausible 341s accepts parentheses when arguments are unparenthesized 341s behaves like plausible 341s accepts parentheses when arguments are unparenthesized 341s behaves like plausible 341s accepts parentheses when arguments are unparenthesized 341s behaves like redundant 341s registers an offense for parentheses around a literal 341s behaves like plausible 341s accepts parentheses when arguments are unparenthesized 341s behaves like redundant 341s registers an offense for parentheses around an unary operation 341s behaves like redundant 341s registers an offense for parentheses around a literal 341s behaves like redundant 341s registers an offense for parentheses around a variable 341s behaves like redundant 341s registers an offense for parentheses around a method call 341s behaves like redundant 341s registers an offense for parentheses around a literal 341s behaves like redundant 341s registers an offense for parentheses around a literal 341s behaves like plausible 341s accepts parentheses when arguments are unparenthesized 341s behaves like redundant 341s registers an offense for parentheses around a keyword 341s behaves like plausible 341s accepts parentheses when arguments are unparenthesized 341s behaves like redundant 341s registers an offense for parentheses around a literal 341s behaves like redundant 341s registers an offense for parentheses around a literal 341s when parentheses are used like method argument parentheses 342s accepts parens around the arg 342s when a non-parenthesized call has an arg and a block 342s accepts parens around the arg 342s behaves like redundant 342s registers an offense for parentheses around an unary operation 342s behaves like redundant 342s registers an offense for parentheses around a literal 342s ternaries 342s when Style/TernaryParentheses has EnforcedStyle: require_no_parentheses 342s registers an offense for parens around ternary condition 342s when Style/TernaryParentheses is not enabled 342s registers an offense for parens around constant ternary condition 342s when Style/TernaryParentheses has EnforcedStyle: require_parentheses 342s behaves like plausible 342s accepts parentheses when arguments are unparenthesized 342s when Style/TernaryParentheses has EnforcedStyle: require_parentheses_when_complex 342s behaves like plausible 342s accepts parentheses when arguments are unparenthesized 342s behaves like redundant 342s registers an offense for parentheses around a constant 342s behaves like plausible 342s accepts parentheses when arguments are unparenthesized 342s behaves like plausible 342s accepts parentheses when arguments are unparenthesized 342s behaves like plausible 342s accepts parentheses when arguments are unparenthesized 342s behaves like plausible 342s accepts parentheses when arguments are unparenthesized 342s behaves like plausible 342s accepts parentheses when arguments are unparenthesized 342s behaves like redundant 342s registers an offense for parentheses around a variable 342s behaves like redundant 342s registers an offense for parentheses around a literal 342s behaves like redundant 342s registers an offense for parentheses around an unary operation 342s behaves like redundant 342s registers an offense for parentheses around a method call 342s behaves like redundant 342s registers an offense for parentheses around a method call 342s behaves like redundant 342s registers an offense for parentheses around a method call 342s behaves like keyword with arguments 342s behaves like redundant 342s registers an offense for parentheses around a keyword 342s behaves like plausible 342s accepts parentheses when arguments are unparenthesized 342s behaves like redundant 342s registers an offense for parentheses around a keyword 342s behaves like redundant 342s registers an offense for parentheses around a keyword 342s behaves like redundant 342s registers an offense for parentheses around a method call 342s behaves like keyword with return value 342s behaves like redundant 342s registers an offense for parentheses around a keyword 342s behaves like plausible 342s accepts parentheses when arguments are unparenthesized 342s behaves like redundant 342s registers an offense for parentheses around a keyword 342s behaves like redundant 342s registers an offense for parentheses around a keyword 342s behaves like plausible 342s accepts parentheses when arguments are unparenthesized 342s behaves like plausible 342s accepts parentheses when arguments are unparenthesized 342s when a hash literal is the second argument in a method call 342s registers an offense 342s when the first argument in a method call begins with a hash literal 342s registers an offense if the argument list is parenthesized 342s accepts parentheses if the argument list is not parenthesized 342s behaves like redundant 342s registers an offense for parentheses around a keyword 342s behaves like redundant 342s registers an offense for parentheses around a keyword 342s behaves like redundant 342s registers an offense for parentheses around a keyword 342s behaves like plausible 342s accepts parentheses when arguments are unparenthesized 342s behaves like redundant 342s registers an offense for parentheses around a literal 342s behaves like redundant 342s registers an offense for parentheses around an unary operation 342s behaves like plausible 342s accepts parentheses when arguments are unparenthesized 342s behaves like redundant 342s registers an offense for parentheses around a variable 342s behaves like redundant 342s registers an offense for parentheses around a method call 342s behaves like plausible 342s accepts parentheses when arguments are unparenthesized 342s behaves like keyword with return value 342s behaves like plausible 342s accepts parentheses when arguments are unparenthesized 342s behaves like redundant 342s registers an offense for parentheses around a keyword 342s behaves like redundant 342s registers an offense for parentheses around a keyword 342s behaves like redundant 342s registers an offense for parentheses around a keyword 342s behaves like redundant 342s registers an offense for parentheses around a method call 342s behaves like redundant 342s registers an offense for parentheses around a method call 342s behaves like keyword with return value 342s behaves like redundant 342s registers an offense for parentheses around a keyword 342s behaves like redundant 342s registers an offense for parentheses around a keyword 342s behaves like plausible 342s accepts parentheses when arguments are unparenthesized 342s behaves like redundant 342s registers an offense for parentheses around a keyword 342s behaves like redundant 342s registers an offense for parentheses around a keyword 342s pin operator 342s behaves like allowed parentheses 342s accepts parentheses on a hash literal 342s behaves like allowed parentheses 342s accepts parentheses on an expression 342s behaves like redundant parentheses 342s registers an offense and corrects a local variable 342s behaves like allowed parentheses 342s accepts parentheses on a range literal 342s behaves like allowed parentheses 342s accepts parentheses on a method call on an instance variable 342s behaves like allowed parentheses 342s accepts parentheses on an array literal 342s behaves like allowed parentheses 342s accepts parentheses on a function call with arguments 342s behaves like allowed parentheses 342s accepts parentheses on a function call with no arguments 342s behaves like allowed parentheses 342s accepts parentheses on a method call on a local variable 342s behaves like allowed parentheses 342s accepts parentheses on an int literal 342s behaves like allowed parentheses 342s accepts parentheses on a method call on a class variable 342s behaves like redundant parentheses 342s registers an offense and corrects a class variable 342s behaves like redundant parentheses 342s registers an offense and corrects an instance variable 342s behaves like allowed parentheses 342s accepts parentheses on a method call on a global variable 342s behaves like redundant parentheses 342s registers an offense and corrects a global variable 342s behaves like plausible 342s accepts parentheses when arguments are unparenthesized 342s behaves like redundant 342s registers an offense for parentheses around a keyword 342s behaves like redundant 342s registers an offense for parentheses around a literal 342s behaves like redundant 342s registers an offense for parentheses around a literal 342s behaves like redundant 342s registers an offense for parentheses around a literal 342s behaves like redundant 342s registers an offense for parentheses around a literal 342s behaves like keyword with arguments 342s behaves like redundant 342s registers an offense for parentheses around a keyword 342s behaves like redundant 342s registers an offense for parentheses around a keyword 342s behaves like redundant 342s registers an offense for parentheses around a keyword 342s behaves like plausible 342s accepts parentheses when arguments are unparenthesized 342s behaves like redundant 342s registers an offense for parentheses around a literal 342s 342s RuboCop::Cop::Lint::EmptyInterpolation 342s registers an offense and corrects #{ } in interpolation 342s finds interpolations in string-like contexts 342s accepts non-empty interpolation 342s registers an offense and corrects #{} in interpolation 342s 342s RuboCop::Cop::InternalAffairs::MethodNameEqual 342s registers an offense when using `#method == :do_something` 342s does not register an offense when using `#method?` 342s registers an offense when using `#method == other_node.do_something` 342s 342s RuboCop::Cop::Style::ArrayCoercion 342s registers an offense and corrects when splatting variable into array 342s does not register an offense when splat is not in array 342s registers an offense and corrects when converting variable into array with check 342s does not register an offense when splatting multiple variables into array 342s does not register an offense when converting variable into other named array variable with check 342s 342s RuboCop::Cop::Style::EmptyElse 342s with nested if and case statement 342s behaves like autocorrect 342s MissingElse is if 342s does autocorrection 342s MissingElse is case 342s does not autocorrect 342s MissingElse is disabled 342s does autocorrection 342s MissingElse is both 342s does not autocorrect 342s configured to warn on nil in else 342s given an if-statement 342s with no else-clause 342s doesn't register an offense 342s with an else-clause with side-effects 342s doesn't register an offense 342s with an else-clause containing only the literal nil using semicolons 342s with one elsif 342s behaves like autocorrect 342s MissingElse is disabled 342s does autocorrection 342s MissingElse is if 342s does not autocorrect 342s MissingElse is both 342s does not autocorrect 342s MissingElse is case 342s does autocorrection 342s with multiple elsifs 342s behaves like autocorrect 342s MissingElse is case 342s does autocorrection 342s MissingElse is both 342s does not autocorrect 342s MissingElse is disabled 342s does autocorrection 342s MissingElse is if 342s does not autocorrect 342s with a completely empty else-clause 342s doesn't register an offense 342s with an else-clause containing only the literal nil 342s when standalone 342s behaves like autocorrect 342s MissingElse is case 342s does autocorrection 342s MissingElse is if 342s does not autocorrect 342s MissingElse is disabled 342s does autocorrection 342s MissingElse is both 342s does not autocorrect 342s when the result is assigned to a variable 342s behaves like autocorrect 342s MissingElse is if 342s does not autocorrect 342s MissingElse is both 342s does not autocorrect 342s MissingElse is case 342s does autocorrection 342s MissingElse is disabled 342s does autocorrection 342s given an unless-statement 342s with no else-clause 342s doesn't register an offense 342s with an else-clause with side-effects 342s doesn't register an offense 342s with a completely empty else-clause 342s doesn't register an offense 342s with an else-clause containing only the literal nil 342s behaves like autocorrect 342s MissingElse is both 342s does not autocorrect 342s MissingElse is disabled 342s does autocorrection 342s MissingElse is if 342s does not autocorrect 342s MissingElse is case 342s does autocorrection 342s given a case statement 342s with an else-clause with side-effects 342s doesn't register an offense 342s with a completely empty else-clause 342s doesn't register an offense 342s with no else-clause 342s doesn't register an offense 342s with an else-clause containing only the literal nil 342s when the result is assigned to a variable 342s behaves like autocorrect 342s MissingElse is both 342s does not autocorrect 342s MissingElse is case 342s does not autocorrect 342s MissingElse is disabled 342s does autocorrection 342s MissingElse is if 342s does autocorrection 342s using semicolons 342s behaves like autocorrect 342s MissingElse is if 342s does autocorrection 342s MissingElse is both 342s does not autocorrect 342s MissingElse is disabled 342s does autocorrection 342s MissingElse is case 342s does not autocorrect 342s configured to warn on empty else and nil in else 342s given a case statement 342s with no else-clause 342s doesn't register an offense 342s with a completely empty else-clause 342s behaves like autocorrect 342s MissingElse is both 342s does not autocorrect 342s MissingElse is case 342s does not autocorrect 342s MissingElse is disabled 342s does autocorrection 342s MissingElse is if 342s does autocorrection 342s with an else-clause with side-effects 342s doesn't register an offense 342s with an else-clause containing only the literal nil 342s behaves like autocorrect 342s MissingElse is both 342s does not autocorrect 342s MissingElse is if 342s does autocorrection 342s MissingElse is disabled 342s does autocorrection 342s MissingElse is case 342s does not autocorrect 342s given an unless-statement 342s with no else-clause 342s doesn't register an offense 342s with an else-clause containing only the literal nil 342s behaves like autocorrect 342s MissingElse is both 342s does not autocorrect 342s MissingElse is disabled 342s does autocorrection 342s MissingElse is if 342s does not autocorrect 342s MissingElse is case 342s does autocorrection 342s with a completely empty else-clause 342s behaves like autocorrect 342s MissingElse is if 342s does not autocorrect 342s MissingElse is disabled 342s does autocorrection 342s MissingElse is both 342s does not autocorrect 342s MissingElse is case 342s does autocorrection 342s with an else-clause with side-effects 342s doesn't register an offense 342s given an if-statement 342s with a completely empty else-clause 342s behaves like autocorrect 342s MissingElse is case 342s does autocorrection 342s MissingElse is disabled 342s does autocorrection 342s MissingElse is both 342s does not autocorrect 342s MissingElse is if 342s does not autocorrect 342s with an else-clause containing only the literal nil 342s with one elsif 342s behaves like autocorrect 342s MissingElse is if 342s does not autocorrect 342s MissingElse is both 342s does not autocorrect 342s MissingElse is case 342s does autocorrection 342s MissingElse is disabled 342s does autocorrection 342s with multiple elsifs 342s behaves like autocorrect 342s MissingElse is both 342s does not autocorrect 342s MissingElse is case 342s does autocorrection 342s MissingElse is disabled 342s does autocorrection 342s MissingElse is if 342s does not autocorrect 342s with no else-clause 342s doesn't register an offense 342s with an else-clause with side-effects 342s doesn't register an offense 342s when `AllowComments: true` 342s given a case statement 342s with comment and empty else-clause 342s doesn't register an offense 342s with comment and nil else-clause 342s doesn't register an offense 342s with not comment and nil else-clause 342s registers an offense 342s with not comment and empty else-clause 342s registers an offense 342s given an if-statement 342s with not comment and empty else-clause 342s registers an offense 342s with comment and empty else-clause 342s doesn't register an offense 342s with comment and nil else-clause 342s doesn't register an offense 342s with not comment and nil else-clause 342s registers an offense 342s given an unless-statement 342s with not comment and nil else-clause 342s registers an offense 342s with comment and nil else-clause 342s doesn't register an offense 342s with not comment and empty else-clause 342s registers an offense 342s with comment and empty else-clause 342s doesn't register an offense 342s configured to warn on empty else 342s given an unless-statement 342s with no else-clause 342s doesn't register an offense 342s with an else-clause with side-effects 342s doesn't register an offense 342s with an else-clause containing only the literal nil 342s doesn't register an offense 342s with a completely empty else-clause 342s behaves like autocorrect 342s MissingElse is both 342s does not autocorrect 342s MissingElse is disabled 342s does autocorrection 342s MissingElse is if 342s does not autocorrect 342s MissingElse is case 342s does autocorrection 342s given a case statement 342s with an else-clause with side-effects 342s doesn't register an offense 342s with a completely empty else-clause 342s behaves like autocorrect 342s MissingElse is if 342s does autocorrection 342s MissingElse is both 342s does not autocorrect 342s MissingElse is case 342s does not autocorrect 342s MissingElse is disabled 342s does autocorrection 342s with no else-clause 342s doesn't register an offense 342s with an else-clause containing only the literal nil 342s doesn't register an offense 342s given an if-statement 342s with an empty comment 342s does not autocorrect 342s with a completely empty else-clause 342s not using semicolons 342s behaves like autocorrect 342s MissingElse is both 342s does not autocorrect 342s MissingElse is disabled 342s does autocorrection 342s MissingElse is if 342s does not autocorrect 342s MissingElse is case 342s does autocorrection 342s using semicolons 342s behaves like autocorrect 342s MissingElse is disabled 342s does autocorrection 342s MissingElse is if 342s does not autocorrect 342s MissingElse is case 342s does autocorrection 342s MissingElse is both 342s does not autocorrect 342s with no else-clause 342s doesn't register an offense 342s with an else-clause with side-effects 342s doesn't register an offense 342s in an if-statement 342s behaves like autocorrect 342s MissingElse is both 342s does not autocorrect 342s MissingElse is disabled 342s does autocorrection 342s MissingElse is if 342s does not autocorrect 342s MissingElse is case 342s does autocorrection 342s with an else-clause containing only the literal nil 342s doesn't register an offense 342s 342s RuboCop::Cop::Metrics::PerceivedComplexity 342s when Max is 1 342s registers an offense for an unless modifier 342s registers an offense for an until block 342s accepts an empty `define_method` 342s counts else in a case with no argument 342s counts only a single method 342s accepts complex code outside of methods 342s registers an offense for a ternary operator 342s registers an offense for elsif and else blocks 342s registers an offense for and 342s registers an offense for a for block 342s registers an offense for a while block 342s registers an offense for a case/when block without an expression after case 342s accepts a method with no decision points 342s registers an offense for or 342s accepts an empty method 342s deals with nested if blocks containing && and || 342s registers an offense for a `define_method` 342s counts known iterating block 342s registers an offense for a rescue block 342s registers an offense for || 342s does not count unknown block calls 342s registers an offense for a case/when block 342s registers an offense for && 342s registers an offense for an if modifier 342s when Max is 2 342s counts stupid nested if and else blocks 342s when AllowedPatterns is enabled 342s does not register an offense when defining an instance method 342s does not register an offense when defining a class method 342s does not register an offense when using `define_method` 342s when AllowedMethods is enabled 342s does not register an offense when defining an instance method 342s does not register an offense when using `define_method` 342s does not register an offense when defining a class method 342s 342s RuboCop::Cop::Gemspec::DependencyVersion 342s with `EnforcedStyle: forbidden` 342s using add_runtime_dependency 342s does not register an offense when adding runtime dependency by parenthesized call without version specification 342s registers an offense when adding runtime dependency with branch specification 342s does not register an offense when adding runtime dependency without version specification 342s registers an offense when adding runtime dependency with version specification 342s registers an offense when adding runtime dependency by parenthesized call with version specification 342s does not register an offense when adding runtime dependency using git option without version specification 342s registers an offense when adding runtime dependency by parenthesized call with tag specification 342s registers an offense when adding runtime dependency by parenthesized call with branch specification 342s registers an offense when adding runtime dependency by parenthesized call with commit ref specification 342s registers an offense when adding runtime dependency with tag specification 342s registers an offense when adding runtime dependency with commit ref specification 342s does not register an offense when adding runtime dependency using git option by parenthesized call without version specification 342s with `AllowedGems` 342s registers an offense when adding dependency without version specification 342s registers an offense when adding dependency by parenthesized call without version specification 342s using add_development_dependency 342s does not register an offense when adding development dependency using git option by parenthesized call without version specification 342s registers an offense when adding development dependency by parenthesized call with commit ref specification 342s does not register an offense when adding development dependency without version specification 342s does not register an offense when adding development dependency using git option without version specification 342s registers an offense when adding development dependency by parenthesized call with branch specification 342s registers an offense when adding development dependency by parenthesized call with tag specification 342s does not register an offense when adding development dependency by parenthesized call without version specification 342s registers an offense when adding development dependency by parenthesized call with version specification 342s registers an offense when adding development dependency with branch specification 342s registers an offense when adding development dependency with version specification 342s registers an offense when adding development dependency with tag specification 342s registers an offense when adding development dependency with commit ref specification 342s using add_dependency 342s registers an offense when adding dependency with branch specification 343s registers an offense when adding dependency with tag specification 343s registers an offense when adding dependency by parenthesized call with branch specification 343s registers an offense when adding dependency with version specification 343s registers an offense when adding dependency by parenthesized call with version specification 343s does not register an offense when adding dependency using git option by parenthesized call without version specification 343s does not register an offense when adding dependency using git option without version specification 343s registers an offense when adding dependency by parenthesized call with tag specification 343s does not register an offense when adding dependency by parenthesized call without version specification 343s registers an offense when adding dependency by parenthesized call with commit ref specification 343s registers an offense when adding dependency with commit ref specification 343s does not register an offense when adding dependency without version specification 343s with `EnforcedStyle: required` 343s using add_dependency 343s does not register an offense when adding dependency by parenthesized call with branch specification 343s does not register an offense when adding dependency with branch specification 343s does not register an offense when adding dependency with version specification 343s registers an offense when adding dependency using git option without version specification 343s does not register an offense when adding dependency by parenthesized call with commit ref specification 343s does not register an offense when adding dependency with commit ref specification 343s registers an offense when adding dependency using git option by parenthesized call without version specification 343s registers an offense when adding dependency by parenthesized call without version specification 343s does not register an offense when adding dependency by parenthesized call with version specification 343s does not register an offense when adding dependency by parenthesized call with tag specification 343s registers an offense when adding dependency without version specification 343s does not register an offense when adding dependency with tag specification 343s using add_runtime_dependency 343s registers an offense when adding runtime dependency without version specification 343s does not register an offense when adding runtime dependency by parenthesized call with branch specification 343s does not register an offense when adding runtime dependency with version specification 343s registers an offense when adding runtime dependency using git option by parenthesized call without version specification 343s does not register an offense when adding runtime dependency with branch specification 343s does not register an offense when adding runtime dependency by parenthesized call with version specification 343s registers an offense when adding runtime dependency using git option without version specification 343s does not register an offense when adding runtime dependency by parenthesized call with tag specification 343s does not register an offense when adding runtime dependency with tag specification 343s does not register an offense when adding runtime dependency with commit ref specification 343s does not register an offense when adding runtime dependency by parenthesized call with commit ref specification 343s registers an offense when adding runtime dependency by parenthesized call without version specification 343s with `AllowedGems` 343s registers an offense when adding dependency by parenthesized call without version specification excepts allowed gems 343s registers an offense when adding dependency without version specification excepts allowed gems 343s using add_development_dependency 343s does not register an offense when adding development dependency with commit ref specification 343s does not register an offense when adding development dependency with tag specification 343s does not register an offense when adding development dependency with version specification 343s does not register an offense when adding development dependency by parenthesized call with tag specification 343s does not register an offense when adding development dependency by parenthesized call with version specification 343s registers an offense when adding development dependency by parenthesized call without version specification 343s does not register an offense when adding development dependency with branch specification 343s registers an offense when adding development dependency using git option without version specification 343s registers an offense when adding development dependency without version specification 343s does not register an offense when adding development dependency by parenthesized call with branch specification 343s does not register an offense when adding development dependency by parenthesized call with commit ref specification 343s registers an offense when adding development dependency using git option by parenthesized call without version specification 343s 343s RuboCop::Cop::Style::NestedModifier 343s adds parentheses to method arguments when needed in autocorrection 343s registers one offense for more than two modifiers 343s does not add redundant parentheses in autocorrection 343s autocorrects unless with a comparison operator + if 343s adds parentheses when needed in autocorrection 343s autocorrects if + if 343s autocorrects if + unless 343s autocorrects unless + unless 343s autocorrects unless + if 343s until 343s behaves like not correctable 343s does not autocorrect when until is the inner modifier 343s does not autocorrect when until is the outer modifier 343s while 343s behaves like not correctable 343s does not autocorrect when while is the inner modifier 343s does not autocorrect when while is the outer modifier 343s 343s RuboCop::Cop::Style::EachForSimpleLoop 343s does not register offense if range endpoint is not constant 343s does not register offense if range startpoint is not constant 343s does not register offense for character range 343s when using an inclusive end range 343s autocorrects the source with multiline block 343s autocorrects the source with inline block 343s autocorrects the range not starting with zero 343s does not register offense for range not starting with zero and using param 343s with multiline block with parameters 343s autocorrects an offense 343s when using an exclusive end range 343s does not register offense for range not starting with zero and using param 343s autocorrects the range not starting with zero 343s autocorrects the source with multiline block 343s autocorrects the source with inline block 343s with inline block with parameters 343s autocorrects an offense 343s 343s RuboCop::Cop::Style::DateTime 343s registers an offense when using ::DateTime for current time 343s registers an offense when using DateTime for current time 343s does not register an offense when using Time for current time 343s does not register an offense when using DateTime for historic date 343s registers an offense when using DateTime for modern date 343s does not register an offense when using Date for modern date 343s does not register an offense when using ::DateTime for historic date 343s does not register an offense when using DateTime in another namespace 343s when configured to allow #to_datetime 343s does not register an offense 343s when configured to not allow #to_datetime 343s registers an offense 343s 343s RuboCop::Cop::Style::PerlBackrefs 343s autocorrects $+ to Regexp.last_match(-1) 343s autocorrects $PREMATCH to Regexp.last_match.pre_match 343s autocorrects $1 to ::Regexp.last_match(1) in namespace 343s autocorrects /#$1/ to /#{Regexp.last_match(1)}/ 343s autocorrects $MATCH to Regexp.last_match(0) 343s autocorrects "#$1" to "#{Regexp.last_match(1)}" 343s autocorrects `#$1` to `#{Regexp.last_match(1)}` 343s autocorrects puts $1 to puts Regexp.last_match(1) 343s autocorrects $POSTMATCH to Regexp.last_match.post_match 343s autocorrects $LAST_PAREN_MATCH to Regexp.last_match(-1) 343s autocorrects $& to Regexp.last_match(0) 343s autocorrects $9 to Regexp.last_match(9) 343s autocorrects $' to Regexp.last_match.post_match 343s autocorrects $` to Regexp.last_match.pre_match 343s 343s RuboCop::Cop::VariableForce::Variable 343s #referenced? 343s when the variable is not assigned 343s is expected to be falsey 343s and the variable is referenced 343s is expected to be truthy 343s when the variable has an assignment 343s and the variable is referenced 343s is expected to be truthy 343s and the variable is not yet referenced 343s is expected to be falsey 343s .new 343s when non variable declaration node is passed 343s raises error 343s 343s RuboCop::Cop::Layout::RedundantLineBreak 343s when InspectBlocks is true 343s for an expression that fits on a single line 343s accepts a method call on multiple lines if there are comments on them 343s registers an offense for a method call on multiple lines with backslash 343s accepts a binary expression containing an if expression 343s registers an offense for a method call with a split operation 343s registers an offense for a method call on multiple lines inside a block 343s accepts a method call with a block 343s accepts an assignment containing a case expression 343s registers an offense for a method call with a double quoted split string in parentheses 343s registers an offense for a method call as right hand side of an assignment 343s registers an offense for a method call with a double quoted split string without parentheses 343s registers an offense for a method call on multiple lines 343s accepts a method call on a single line 343s registers an offense for a method call with a double and single quoted split string 343s registers an offense for a method call with a single quoted split string 343s accepts an assignment containing a begin-end expression 343s accepts an assignment containing an if expression 343s with LineLength Max 100 343s registers an offense for a method without parentheses on multiple lines 343s method chains 343s registers an offense and corrects with a string argument on multiple lines 343s registers an offense and corrects with a arguments on multiple lines 343s does not register an offense with a heredoc argument 343s properly corrects a method chain on multiple lines 343s for a block 343s registers an offense when the method call has no arguments 343s registers an offense when the method call has parentheses 343s when Layout/SingleLineBlockChain is disabled 343s reports an offense for a multiline block without a chained method call 343s reports an offense for a method call chained onto a multiline block 343s when Layout/SingleLineBlockChain is enabled 343s reports an offense for a multiline block without a chained method call 343s when Layout/SingleLineBlockChain is disabled 343s reports an offense for a method call chained onto a single line block 343s when Layout/SingleLineBlockChain is enabled 343s accepts a method call chained onto a single line block 343s for an expression that does not fit on a single line 343s accepts a method call on a multiple lines 343s with a longer max line length 343s registers an offense for a method call with a do keyword that is just under the max line length 343s accepts a method call followed by binary operations that are too long taken together 343s accepts a complex method call on a multiple lines 343s accepts an assignment containing a heredoc 343s accepts method call with a do keyword that would just surpass the max line length 343s accepts an assignment containing a method definition 343s for a block 343s accepts when it is difficult to convert to single line 343s when InspectBlocks is false 343s when Layout/SingleLineBlockChain is enabled 343s accepts a method call chained onto a single line block 343s when Layout/SingleLineBlockChain is disabled 343s reports an offense for a method call chained onto a single line block 343s for an expression that fits on a single line 343s accepts a method call with a block 343s registers an offense for a method call on multiple lines 343s accepts a method call on multiple lines if there are comments on them 343s registers an offense for a method call with a single quoted split string 343s registers an offense for a method call with a double quoted split string in parentheses 343s accepts a binary expression containing an if expression 343s accepts an assignment containing an if expression 343s accepts an assignment containing a case expression 343s registers an offense for a method call with a double and single quoted split string 343s registers an offense for a method call with a split operation 343s registers an offense for a method call on multiple lines with backslash 343s registers an offense for a method call as right hand side of an assignment 343s accepts an assignment containing a begin-end expression 343s accepts a method call on a single line 343s registers an offense for a method call with a double quoted split string without parentheses 343s registers an offense for a method call on multiple lines inside a block 343s method chains 343s properly corrects a method chain on multiple lines 343s does not register an offense with a heredoc argument 343s registers an offense and corrects with a string argument on multiple lines 343s registers an offense and corrects with a arguments on multiple lines 343s with LineLength Max 100 343s registers an offense for a method without parentheses on multiple lines 343s for a block 343s accepts when the method call has parentheses 343s accepts when the method call has no arguments 343s when Layout/SingleLineBlockChain is enabled 343s accepts a multiline block without a chained method call 343s when Layout/SingleLineBlockChain is disabled 343s accepts a multiline block without a chained method call 343s accepts a method call chained onto a multiline block 343s for an expression that does not fit on a single line 343s accepts a method call on a multiple lines 343s with a longer max line length 343s registers an offense for a method call with a do keyword that is just under the max line length 343s accepts a method call followed by binary operations that are too long taken together 343s accepts a complex method call on a multiple lines 343s accepts an assignment containing a method definition 343s accepts an assignment containing a heredoc 343s accepts method call with a do keyword that would just surpass the max line length 343s for a block 343s accepts when it is difficult to convert to single line 343s 343s RuboCop::Cop::Style::OneLineConditional 343s when AlwaysCorrectToMultiline is false 343s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with ternary operator for unless/then/else/end 343s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with multi-line construct for if-then-elsif-then-elsif-then-else-end 343s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 343s does not register an offense for if/then/else/end with empty else 343s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with multi-line construct for if-then-elsif-then-else-end 343s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with ternary operator without adding parentheses for if/then/else/end that contains unparenthesized operator method calls 343s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 343s does not register an offense for unless/then/end 343s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with ternary operator for if/then/else/end when `then` without body 343s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with ternary operator for if/then/else/end 343s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with ternary operator when one of the branches of if/then/else/end contains `next` keyword 343s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with ternary operator without adding parentheses for if/then/else/end that contains method calls with parenthesized arguments 343s does not register an offense for if/then/end 343s registers and corrects an offense with multi-line construct for if-then-elsif-then-end 343s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 343s does not register an offense for unless/then/else/end with empty else 343s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with ternary operator and adding parentheses for if/then/else/end that contains method calls with unparenthesized arguments 343s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 343s behaves like if/then/else/end with constructs changing precedence 343s registers and corrects an offense with ternary operator and adding parentheses inside for if/then/else/end with `a ? b : c` constructs inside inner branches 343s behaves like if/then/else/end with keyword 343s registers and corrects an offense with ternary operator when one of the branches of if/then/else/end contains `raise` keyword 343s behaves like if/then/else/end with constructs changing precedence 343s registers and corrects an offense with ternary operator and adding parentheses inside for if/then/else/end with `yield a` constructs inside inner branches 343s behaves like if/then/else/end with constructs changing precedence 343s registers and corrects an offense with ternary operator and adding parentheses inside for if/then/else/end with `a and b` constructs inside inner branches 343s behaves like if/then/else/end with constructs changing precedence 343s registers and corrects an offense with ternary operator and adding parentheses inside for if/then/else/end with `a = b` constructs inside inner branches 343s behaves like if/then/else/end with constructs changing precedence 343s registers and corrects an offense with ternary operator and adding parentheses inside for if/then/else/end with `puts 1` constructs inside inner branches 343s behaves like if/then/else/end with keyword 343s registers and corrects an offense with ternary operator when one of the branches of if/then/else/end contains `break` keyword 343s behaves like if/then/else/end with keyword 343s registers and corrects an offense with ternary operator when one of the branches of if/then/else/end contains `self` keyword 343s behaves like if/then/else/end with keyword 343s registers and corrects an offense with ternary operator when one of the branches of if/then/else/end contains `retry` keyword 343s behaves like if/then/else/end with constructs changing precedence 343s registers and corrects an offense with ternary operator and adding parentheses inside for if/then/else/end with `super b` constructs inside inner branches 343s behaves like if/then/else/end with constructs changing precedence 343s registers and corrects an offense with ternary operator and adding parentheses inside for if/then/else/end with `a or b` constructs inside inner branches 343s behaves like if/then/else/end with constructs changing precedence 343s registers and corrects an offense with ternary operator and adding parentheses inside for if/then/else/end with `not a` constructs inside inner branches 343s behaves like if/then/else/end with constructs changing precedence 343s registers and corrects an offense with ternary operator and adding parentheses inside for if/then/else/end with `defined? :A` constructs inside inner branches 343s when AlwaysCorrectToMultiline is true 343s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end that contains unparenthesized operator method calls 343s registers and corrects an offense with multi-line construct for unless/then/else/end 343s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end that contains method calls with parenthesized arguments 343s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 343s does not register an offense for unless/then/else/end with empty else 343s does not register an offense for if/then/else/end with empty else 343s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 343s does not register an offense for unless/then/end 343s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end that contains method calls with unparenthesized arguments 343s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with multi-line construct for if-then-elsif-then-elsif-then-else-end 343s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 343s does not register an offense for if/then/end 343s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with multi-line construct when one of the branches of if/then/else/end contains `next` keyword 343s registers and corrects an offense with multi-line construct for if-then-elsif-then-else-end 343s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with multi-line construct for if/then/else/end when `then` without body 343s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with multi-line construct for if/then/else/end 343s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 343s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 343s behaves like if/then/else/end with constructs changing precedence 343s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end with `puts 1` constructs inside inner branches 343s behaves like if/then/else/end with keyword 343s registers and corrects an offense with multi-line construct when one of the branches of if/then/else/end contains `break` keyword 343s behaves like if/then/else/end with keyword 343s registers and corrects an offense with multi-line construct when one of the branches of if/then/else/end contains `raise` keyword 343s behaves like if/then/else/end with constructs changing precedence 343s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end with `yield a` constructs inside inner branches 343s behaves like if/then/else/end with constructs changing precedence 343s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end with `super b` constructs inside inner branches 343s behaves like if/then/else/end with constructs changing precedence 343s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end with `a = b` constructs inside inner branches 343s behaves like if/then/else/end with constructs changing precedence 343s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end with `not a` constructs inside inner branches 343s behaves like if/then/else/end with constructs changing precedence 343s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end with `a and b` constructs inside inner branches 343s behaves like if/then/else/end with keyword 343s registers and corrects an offense with multi-line construct when one of the branches of if/then/else/end contains `self` keyword 343s behaves like if/then/else/end with constructs changing precedence 343s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end with `a or b` constructs inside inner branches 343s behaves like if/then/else/end with constructs changing precedence 344s 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 344s behaves like if/then/else/end with constructs changing precedence 344s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end with `defined? :A` constructs inside inner branches 344s when IndentationWidth differs from default 344s registers and corrects an offense with multi-line construct for if/then/else/end 344s behaves like if/then/else/end with keyword 344s registers and corrects an offense with multi-line construct when one of the branches of if/then/else/end contains `retry` keyword 344s 344s RuboCop::Cop::Layout::MultilineMethodParameterLineBreaks 344s when two parameters are on next line 344s does not add any offenses 344s when many parameter are on multiple lines, two on same line 344s registers an offense and corrects 344s when parameter's default value starts on same line but ends on different line 344s registers an offense and corrects 344s when there are multiple parameters on the first line 344s registers an offense and corrects starting from the 2nd argument 344s when second parameter starts on same line as end of first 344s registers an offense and corrects 344s when there are no parameters 344s does not add any offenses 344s when many parameters are on multiple lines, three on same line 344s registers an offense and corrects 344s when one parameter on same line 344s does not add any offenses 344s when many parameters including hash are on multiple lines, three on same line 344s registers an offense and corrects 344s 344s RuboCop::Cop::Style::BisectedAttrAccessor 344s registers and corrects in a module 344s registers an offense and corrects when both accessors are in the same visibility scope 344s does not register an offense when using `attr_accessor` 344s registers an offense and corrects when attr and attr_writer exists 344s does not register an offense when only one accessor of the name exists 344s registers an offense and corrects when both accessors of the splat exists 344s registers an offense and corrects when within eigenclass 344s registers an offense and corrects when both accessors of the name exists 344s registers an offense and corrects when both accessors of the name exists and accessor contains multiple names 344s does not register an offense when accessors are within different visibility scopes 344s registers an offense and corrects properly when attr_writer is before attr_reader 344s registers an offense for accessors with the same visibility in different scopes 344s multiple bisected accessors 344s when some attr names are bisected 344s registers and retains non-bisected attrs 344s when all attr names are bisected 344s registers and replaces with attr_accessor 344s 344s RuboCop::Cop::Lint::DuplicateCaseCondition 344s accepts trivial case expressions 344s registers an offense for repeated case conditionals 344s registers an offense for subsequent repeated case conditionals 344s accepts non-redundant case expressions with an else expression 344s registers an offense for repeated logical operator when expressions 344s registers multiple offenses for multiple repeated case conditionals 344s registers multiple offenses for repeated multi-value conditionals 344s accepts similar but not equivalent && expressions 344s accepts non-redundant case expressions 344s 344s RuboCop::Cop::Lint::RedundantStringCoercion 344s accepts #to_s with arguments in an interpolation 344s registers an offense and corrects `to_s` in interpolation 344s accepts interpolation without #to_s 344s registers an offense and corrects an implicit receiver 344s registers an offense and corrects `to_s` in an interpolation with several expressions 344s does not explode on empty interpolation 344s 344s RuboCop::MagicComment 344s returns "ascii-8bit" for encoding when comment is # vim: filetype=ruby, fileencoding=ascii-8bit 344s returns "ascii-8bit" for encoding when comment is # vim: filetype=ruby, fileencoding=ascii-8bit 344s returns nil for frozen_string_literal when comment is # coding: utf-8 344s returns nil for frozen_string_literal when comment is # @typed 344s returns nil for shareable_constant_value when comment is # coding: utf-8 344s returns "true" for typed when comment is # typed: true 344s returns nil for shareable_constant_value when comment is # typed: false 344s returns "ascii-8bit" for encoding when comment is # -*- coding: ASCII-8BIT; typed: strict -*- 344s returns "none" for shareable_constant_value when comment is # shareable_constant_value: none 344s returns nil for frozen_string_literal when comment is #vim: filetype=ruby, fileencoding=ascii-8bit, typed=strict 344s returns nil for typed when comment is # -*- coding: ASCII-8BIT; typed: strict -*- 344s returns nil for frozen_string_literal when comment is # shareable_constant_value: literal 344s returns nil for frozen_string_literal when comment is # typed: true 344s returns nil for frozen_string_literal when comment is # -*- coding: ASCII-8BIT; typed: strict -*- 344s returns nil for shareable_constant_value when comment is # vim: filetype=ruby,fileencoding=ascii-8bit 344s returns nil for shareable_constant_value when comment is CSV.generate(encoding: Encoding::UTF_8) do |csv| 344s returns true for frozen_string_literal when comment is # coding: utf-8 -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- 344s returns true for frozen_string_literal when comment is # -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- 344s returns nil for encoding when comment is # xyz shareable_constant_value: literal 344s returns nil for encoding when comment is # shareable_constant_value: experimental_copy 344s returns nil for shareable_constant_value when comment is # eNcOdInG: utf-8 344s returns "utf-8" for encoding when comment is # coding: utf-8 vim: filetype=ruby, fileencoding=ascii-8bit 344s returns nil for shareable_constant_value when comment is # frozen_string_literal: true encoding: ascii-8bit 344s returns "ascii-8bit" for encoding when comment is # -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- 344s returns nil for typed when comment is # -*- encoding : ascii-8bit -*- 344s returns "experimental_copy" for shareable_constant_value when comment is # shareable_constant_value: experimental_copy 344s returns nil for typed when comment is # encoding: stateless-iso-2022-jp-kddi 344s returns "literal" for shareable_constant_value when comment is # SHAREABLE-CONSTANT-VALUE: literal 344s returns nil for typed when comment is # SHAREABLE-CONSTANT-VALUE: literal 344s returns nil for shareable_constant_value when comment is # frozen_string_literal: false 344s returns nil for shareable_constant_value when comment is # -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- 344s returns nil for typed when comment is # shareable_constant_value: experimental_copy 344s returns nil for typed when comment is CSV.generate(encoding: Encoding::UTF_8) do |csv| 344s returns nil for encoding when comment is # typed: ignore 344s returns "ascii-8bit" for encoding when comment is # encoding: ascii-8bit frozen_string_literal: true 344s returns "literal" for shareable_constant_value when comment is # shareable_constant_value:literal 344s returns nil for frozen_string_literal when comment is # vim: filetype=ruby,fileencoding=ascii-8bit 344s returns "ignore" for typed when comment is # typed: ignore 344s returns nil for typed when comment is # sHaReaBLE-CoNstANT-ValUE: literal 344s returns nil for typed when comment is # ENCODING: utf-8 344s returns nil for typed when comment is # frozen_string_literal: false 344s returns nil for typed when comment is # shareable_constant_value: literal 344s returns nil for typed when comment is # coding: utf-8 -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- 344s returns nil for typed when comment is # vim:fileencoding=utf-8 344s returns nil for frozen_string_literal when comment is # encoding: ascii-8bit frozen_string_literal: true 344s returns nil for frozen_string_literal when comment is CSV.generate(encoding: Encoding::UTF_8) do |csv| 344s returns false for frozen_string_literal when comment is # frozen_string_literal: false 344s returns nil for frozen_string_literal when comment is # shareable_constant_value: experimental_copy 344s returns nil for shareable_constant_value when comment is # -*- frozen-string-literal: true -*- 344s returns "strict" for typed when comment is #typed:strict 344s returns nil for typed when comment is # coding: utf-8 344s returns nil for encoding when comment is # shareable_constant_value: experimental_everything 344s returns "ascii-8bit" for encoding when comment is # -*- encoding : ascii-8bit -*- 344s returns nil for encoding when comment is # shareable_constant_value: none 344s returns nil for frozen_string_literal when comment is # 344s returns "stateless-iso-2022-jp-kddi" for encoding when comment is # encoding: stateless-iso-2022-jp-kddi 344s returns nil for encoding when comment is # vim:fileencoding=utf-8 344s returns nil for typed when comment is # FROZEN-STRING-LITERAL: true 344s returns nil for typed when comment is # vim: filetype=python, fileencoding=ascii-8bit 344s returns nil for encoding when comment is # xyz shareable_constant_value: literal xyz 344s returns nil for shareable_constant_value when comment is # fRoZeN-sTrInG_lItErAl: true 344s returns nil for encoding when comment is # vim: filetype=ruby,fileencoding=ascii-8bit 344s returns nil for shareable_constant_value when comment is # coding: utf-8 -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- 344s returns nil for typed when comment is # frozen_string_literal:true 344s returns nil for typed when comment is # vim: filetype=ruby,fileencoding=ascii-8bit 344s returns nil for shareable_constant_value when comment is # typed:strict 344s returns nil for frozen_string_literal when comment is # typed: ignore 344s returns nil for encoding when comment is # frozen_string_literal: invalid 344s returns nil for typed when comment is # fRoZeN-sTrInG_lItErAl: true 344s returns nil for shareable_constant_value when comment is #typed:strict 344s returns true for frozen_string_literal when comment is # fRoZeN-sTrInG_lItErAl: true 344s returns nil for shareable_constant_value when comment is # vim: filetype=ruby, fileencoding=ascii-8bit 344s returns nil for frozen_string_literal when comment is # vim: filetype=ruby, fileencoding=ascii-8bit 344s returns nil for typed when comment is # vim: filetype=ruby, fileencoding=ascii-8bit 344s returns nil for encoding when comment is # frozen_string_literal: true 344s returns "strict" for typed when comment is # typed:strict 344s returns nil for shareable_constant_value when comment is # frozen_string_literal: true 344s returns nil for frozen_string_literal when comment is # -*- encoding : ascii-8bit -*- 344s returns nil for typed when comment is # shareable-constant-value: literal 344s returns nil for typed when comment is # shareable_constant_value: experimental_everything 344s returns nil for shareable_constant_value when comment is #vim: filetype=ruby, fileencoding=ascii-8bit, typed=strict 344s returns true for frozen_string_literal when comment is # frozen_string_literal: true 344s returns nil for frozen_string_literal when comment is # typed:strict 344s returns nil for encoding when comment is # frozen_string_literal: false 344s returns nil for frozen_string_literal when comment is # shareable_constant_value:literal 344s returns "utf-8" for encoding when comment is # encoding: utf-8 344s returns nil for typed when comment is # frozen_string_literal: true 344s returns true for frozen_string_literal when comment is # FROZEN-STRING-LITERAL: true 344s returns nil for encoding when comment is # 344s returns nil for shareable_constant_value when comment is # frozen_string_literal: true 344s returns nil for typed when comment is # encoding: utf-8 344s returns nil for frozen_string_literal when comment is # coding: utf-8 344s returns "false" for typed when comment is # typed: false 344s returns nil for shareable_constant_value when comment is # typed: true 344s returns "ascii-8bit" for encoding when comment is # vim: filetype=python, fileencoding=ascii-8bit 344s returns nil for frozen_string_literal when comment is # coding: utf-8 vim: filetype=ruby, fileencoding=ascii-8bit 344s returns nil for typed when comment is # eNcOdInG: utf-8 344s returns nil for typed when comment is # frozen_string_literal: invalid 344s returns "ascii-8bit" for encoding when comment is # frozen_string_literal: true encoding: ascii-8bit 344s returns nil for shareable_constant_value when comment is # typed: strict 344s returns "utf-8" for encoding when comment is # coding: utf-8 344s returns nil for shareable_constant_value when comment is # -*- encoding : ascii-8bit -*- 344s returns nil for shareable_constant_value when comment is # frozen_string_literal:true 344s returns nil for encoding when comment is # typed: strong 344s returns nil for shareable_constant_value when comment is # encoding: stateless-iso-2022-jp-kddi 344s returns "utf-8" for encoding when comment is # eNcOdInG: utf-8 344s returns nil for typed when comment is # -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- 344s returns nil for frozen_string_literal when comment is # vim:fileencoding=utf-8 344s returns nil for frozen_string_literal when comment is # sHaReaBLE-CoNstANT-ValUE: literal 344s returns nil for encoding when comment is # FROZEN-STRING-LITERAL: true 344s returns nil for shareable_constant_value when comment is # xyz shareable_constant_value: literal 344s returns "experimental_everything" for shareable_constant_value when comment is # shareable_constant_value: experimental_everything 344s returns nil for shareable_constant_value when comment is # vim: filetype=ruby, fileencoding=ascii-8bit 344s returns nil for encoding when comment is #typed:strict 344s returns nil for shareable_constant_value when comment is # encoding: utf-8 344s returns "literal" for shareable_constant_value when comment is # shareable-constant-value: literal 344s returns nil for encoding when comment is # typed: false 344s returns nil for encoding when comment is # sHaReaBLE-CoNstANT-ValUE: literal 344s returns nil for frozen_string_literal when comment is # xyz shareable_constant_value: literal 344s returns nil for shareable_constant_value when comment is # typed: ignore 344s returns nil for encoding when comment is # incoding: utf-8 344s returns "ascii-8bit" for encoding when comment is #vim: filetype=ruby, fileencoding=ascii-8bit 344s returns nil for typed when comment is # 344s returns true for frozen_string_literal when comment is # frozen-string-literal: true 344s returns nil for typed when comment is # frozen_string_literal: true encoding: ascii-8bit 344s returns nil for encoding when comment is # frozen_string_literal: true 344s returns nil for shareable_constant_value when comment is # ENCODING: utf-8 344s returns "strong" for typed when comment is # typed: strong 344s returns nil for frozen_string_literal when comment is # frozen_string_literal: true encoding: ascii-8bit 344s returns "invalid" for frozen_string_literal when comment is # frozen_string_literal: invalid 344s returns nil for encoding when comment is # @typed 344s returns nil for frozen_string_literal when comment is # vim: filetype=python, fileencoding=ascii-8bit 344s returns nil for encoding when comment is # frozen_string_literal:true 344s returns nil for typed when comment is # xyz shareable_constant_value: literal 344s returns nil for frozen_string_literal when comment is # typed: false 344s returns nil for encoding when comment is # SHAREABLE-CONSTANT-VALUE: literal 344s returns nil for shareable_constant_value when comment is # xyz shareable_constant_value: literal xyz 344s returns nil for typed when comment is # frozen_string_literal: true 344s returns nil for frozen_string_literal when comment is # typed: strict 344s returns "utf-8" for encoding when comment is # coding: utf-8 344s returns nil for encoding when comment is # shareable-constant-value: literal 344s returns nil for frozen_string_literal when comment is # eNcOdInG: utf-8 344s returns nil for typed when comment is # coding: utf-8 vim: filetype=ruby, fileencoding=ascii-8bit 344s returns true for frozen_string_literal when comment is # frozen_string_literal:true 344s returns nil for frozen_string_literal when comment is # shareable_constant_value: none 344s returns nil for typed when comment is # vim: filetype=ruby, fileencoding=ascii-8bit 344s returns nil for frozen_string_literal when comment is # SHAREABLE-CONSTANT-VALUE: literal 344s returns nil for shareable_constant_value when comment is # 344s returns nil for typed when comment is # encoding: ascii-8bit frozen_string_literal: true 344s returns nil for frozen_string_literal when comment is # encoding: stateless-iso-2022-jp-kddi 344s returns "ascii-8bit" for encoding when comment is #vim: filetype=ruby, fileencoding=ascii-8bit, typed=strict 344s returns nil for frozen_string_literal when comment is # shareable-constant-value: literal 344s returns nil for encoding when comment is # -*- frozen-string-literal: true -*- 344s returns nil for encoding when comment is # shareable_constant_value:literal 344s returns nil for shareable_constant_value when comment is # coding: utf-8 vim: filetype=ruby, fileencoding=ascii-8bit 344s returns nil for shareable_constant_value when comment is # vim: filetype=python, fileencoding=ascii-8bit 344s returns nil for shareable_constant_value when comment is # @typed 344s returns nil for shareable_constant_value when comment is # encoding: ascii-8bit frozen_string_literal: true 344s returns nil for typed when comment is #vim: filetype=ruby, fileencoding=ascii-8bit, typed=strict 344s returns nil for frozen_string_literal when comment is # typed: strong 344s returns nil for frozen_string_literal when comment is # xyz shareable_constant_value: literal xyz 344s returns nil for typed when comment is # incoding: utf-8 344s returns nil for frozen_string_literal when comment is # shareable_constant_value: experimental_everything 344s returns nil for encoding when comment is # frozen-string-literal: true 344s returns nil for typed when comment is # shareable_constant_value: none 344s returns nil for shareable_constant_value when comment is # coding: utf-8 344s returns true for frozen_string_literal when comment is # frozen_string_literal: true 344s returns nil for frozen_string_literal when comment is #typed:strict 344s returns nil for shareable_constant_value when comment is # frozen_string_literal: invalid 344s returns nil for shareable_constant_value when comment is # incoding: utf-8 344s returns nil for typed when comment is # shareable_constant_value:literal 344s returns "utf-8" for encoding when comment is # ENCODING: utf-8 344s returns nil for encoding when comment is # typed:strict 344s returns nil for shareable_constant_value when comment is # vim:fileencoding=utf-8 344s returns nil for encoding when comment is # typed: true 344s returns nil for encoding when comment is CSV.generate(encoding: Encoding::UTF_8) do |csv| 344s returns nil for typed when comment is # @typed 344s returns nil for frozen_string_literal when comment is # incoding: utf-8 344s returns nil for frozen_string_literal when comment is #vim: filetype=ruby, fileencoding=ascii-8bit 344s returns nil for encoding when comment is # fRoZeN-sTrInG_lItErAl: true 344s returns nil for typed when comment is # xyz shareable_constant_value: literal xyz 344s returns nil for typed when comment is # -*- frozen-string-literal: true -*- 344s returns "ascii-8bit" for encoding when comment is # coding: utf-8 -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- 344s returns nil for frozen_string_literal when comment is # vim: filetype=ruby, fileencoding=ascii-8bit 344s returns "literal" for shareable_constant_value when comment is # shareable_constant_value: literal 344s returns nil for shareable_constant_value when comment is # FROZEN-STRING-LITERAL: true 344s returns nil for encoding when comment is # shareable_constant_value: literal 344s returns nil for shareable_constant_value when comment is # -*- coding: ASCII-8BIT; typed: strict -*- 344s returns nil for frozen_string_literal when comment is # encoding: utf-8 344s returns nil for typed when comment is # coding: utf-8 344s returns true for frozen_string_literal when comment is # -*- frozen-string-literal: true -*- 344s returns nil for shareable_constant_value when comment is # typed: strong 344s returns nil for frozen_string_literal when comment is # ENCODING: utf-8 344s returns nil for typed when comment is #vim: filetype=ruby, fileencoding=ascii-8bit 344s returns nil for typed when comment is # frozen-string-literal: true 344s returns "literal" for shareable_constant_value when comment is # sHaReaBLE-CoNstANT-ValUE: literal 344s returns nil for shareable_constant_value when comment is #vim: filetype=ruby, fileencoding=ascii-8bit 344s returns "strict" for typed when comment is # typed: strict 344s returns nil for encoding when comment is # typed: strict 344s returns nil for shareable_constant_value when comment is # frozen-string-literal: true 344s #valid_shareable_constant_value? 344s when given comment specified as `none` 344s is expected to equal true 344s when given comment specified as `experimental_copy` 344s is expected to equal true 344s when given comment specified as `experimental_everything` 344s is expected to equal true 344s when given comment specified as `literal` 344s is expected to equal true 344s when given comment specified as unknown value 344s is expected to equal false 344s when given comment is not specified 344s is expected to equal false 344s #valid? 344s with an empty string 344s is expected to equal false 344s with an frozen string literal comment 344s is expected to equal true 344s with a non magic comment 344s is expected to equal false 344s with an encoding comment 344s is expected to equal true 344s with an shareable constant value comment 344s is expected to equal true 344s #without 344s simple format 344s when the comment contains a different magic value 344s is expected to eq "# frozen-string-literal: true" 344s when the entire comment is a single value 344s is expected to eq "" 344s vim format 344s when the comment has multiple tokens 344s is expected to eq "# vim: filetype=ruby" 344s emacs format 344s with one token 344s is expected to eq "" 344s with multiple tokens 344s is expected to eq "# -*- frozen_string_literal: true -*-" 344s 344s RuboCop::Cop::Lint::EmptyWhen 344s when a `when` body is present 344s accepts case with when ... then statements and else clause 344s accepts case with when ... then statements 344s accepts case with when bodies and else clause 344s accepts with no case line expression 344s accepts case with when bodies 344s when `AllowComments: true` 344s accepts an empty when ... then body with a comment 344s accepts an empty when body with a comment 344s registers an offense for missing when body without a comment 344s when a `when` body is missing 344s registers an offense for a missing when body 344s registers an offense for missing when body with a comment followed by else 344s registers an offense for missing when ... then body 344s registers an offense for missing when ... then body followed by else 344s registers an offense for missing when body followed by else 344s registers an offense for missing when body with a comment 344s registers an offense when case line has no expression 344s when `AllowComments: false` 344s registers an offense for empty when body with a comment 344s 344s RuboCop::Cop::Layout::FirstHashElementLineBreak 344s registers an offense and corrects single element multi-line hash 344s ignores implicit hashes in method calls that are improperly formatted 344s registers an offense and corrects elements listed on the first line 344s ignores elements listed on a single line 344s registers an offense and corrects hash nested in a method call 344s ignores implicit hashes in method calls without parens 344s ignores implicit hashes in method calls with parens 344s 344s RuboCop::Cop::Layout::BlockAlignment 344s registers an offense for mismatched end with a method call with arguments 344s accepts end aligned with an instance variable 344s accepts end aligned with a global variable 344s accepts end aligned with the block when the block is a method argument 344s registers an offense for mismatched block end with a constant 344s registers an offense for mismatched block end with a variable 344s registers an offense for mismatched block end with an or-asgn (||=) 344s accepts end aligned with a constant 344s registers an offense for mismatched block end with a mass assignment 344s does not raise an error for nested block in a method call 344s accepts a block end that does not begin its line 344s accepts end aligned with an op-asgn (+=, -=) 344s accepts end aligned with an and-asgn (&&=) 344s registers an offense for mismatched block end with a class variable 344s registers an offense for mismatched block end with an instance variable 344s accepts end aligned with an or-asgn (||=) 344s accepts end aligned with a variable 344s accepts end aligned with a method call with arguments 344s registers an offense for mismatched block end with a method call 344s registers an offense for mismatched block end with an op-asgn (+=, -=) 344s registers an offense for mismatched end not aligned with the block that is an argument 344s accepts end aligned with a method call 344s accepts end aligned with a class variable 344s registers an offense for mismatched block end with an and-asgn (&&=) 344s accepts end aligned with a call chain left hand side 344s accepts end aligned with a mass assignment 344s registers an offense for mismatched block end with a global variable 344s when variables of a mass assignment spans several lines 344s accepts end aligned with the variables 344s registers an offense for end aligned with the block 344s on a logically negated method call 344s aligns end with the ! operator 344s registers an offense and corrects 344s and the block is an operand 344s accepts end aligned with a variable 344s on a bit-flipped method call 344s aligns end with the ~ operator 344s registers an offense and corrects misaligned end brace 344s when configured to align with start_of_line 344s allows when start_of_line aligned 344s errors when do aligned 344s when multiple similar-looking blocks have misaligned ends 344s registers an offense for each of them 344s Ruby 2.7 344s registers an offense for mismatched block end with a mass assignment 344s accepts end aligned with a call chain left hand side 344s on a splatted method call 344s aligns end with the splat operator 344s registers an offense and corrects misaligned end braces 344s when the block is a logical operand 344s accepts a correctly aligned block end 344s when configured to align with do 344s errors when start_of_line aligned 344s allows when do aligned 344s when the method part is a call chain that spans several lines 344s accepts pretty alignment style 344s accepts end indented as the start of the block 344s registers offenses for misaligned ends 344s accepts two kinds of end alignment 344s when there is an assignment chain 344s registers an offense for an end aligned with the 2nd variable 344s accepts end aligned with the first variable 344s when the block is defined on the next line 344s registers an offenses for mismatched end alignment 344s accepts end aligned with the block expression 344s when the block has arguments 344s registers an offense for mismatched block end 344s when the block has no arguments 344s registers an offense for mismatched block end 344s on an arithmetically negated method call 344s registers an offense and corrects 344s aligns end with the - operator 344s when the block is terminated by } 344s mentions } (not end) in the message 344s 344s RuboCop::Cop::Style::MethodCalledOnDoEndBlock 344s with a single-line do..end block 344s registers an offense for a chained call 344s accepts a single-line do..end block with a chained block 344s Ruby 2.7 344s registers an offense for a chained call 344s with a multi-line do..end block 344s accepts a chained block 344s registers an offense for a chained call 344s accepts it if there is no chained call 344s when using safe navigation operator 344s registers an offense for a chained call 344s with a {} block 344s accepts a single-line block with a chained call 344s accepts a multi-line block with a chained call 344s 344s RuboCop::Cop::Style::CombinableLoops 344s when looping method 344s does not register an offense when different loop methods are used over the same collection 344s does not register an offense when the same loop method is used over different collections 344s does not register an offense when the same loops are interleaved with some code 344s does not register an offense for when the same method with different arguments 344s does not register an offense when each branch contains the same single loop over the same collection 344s registers an offense when looping over the same data as previous loop 344s does not register an offense for when the same method with different arguments and safe navigation 344s Ruby 2.7 344s registers an offense when looping over the same data as previous loop in numblocks 344s when for loop 344s does not register an offense when each branch contains the same single loop over the same collection 344s does not register an offense when the same loops are interleaved with some code 344s does not register an offense when the same loop method is used over different collections 344s registers an offense when looping over the same data as previous loop 344s 344s RuboCop::Cop::Lint::RedundantSafeNavigation 344s does not register an offense when using `&.` with non-allowed method in condition 344s registers an offense and corrects when `&.` is used inside `#{loop_type}` condition 344s does not register an offense when using `&.` outside of conditions 344s registers an offense and corrects when `&.` is used inside complex condition 344s does not register an offense when using `&.respond_to?` with `nil` specific method as argument in condition 344s registers an offense and corrects when `&.` is used inside `if` condition 344s registers an offense and corrects when `&.` is used inside `unless` condition 344s registers an offense and corrects when `&.` is used inside `#{loop_type}` condition 344s 344s RuboCop::Cop::Style::NilLambda 344s block lambda 344s does not remove block params or change spacing 344s registers an offense when returning nil with `next` 344s registers an offense when returning nil with `break` 344s registers an offense when returning nil with `return` 344s properly corrects single line 344s does not register an offense when doing more than returning nil 344s registers an offense when returning nil implicitly 344s does not register an offense when not returning nil 344s Proc.new 344s properly corrects single line 344s does not remove block params or change spacing 344s registers an offense when returning nil implicitly 344s registers an offense when returning nil with `break` 344s does not register an offense when doing more than returning nil 344s registers an offense when returning nil with `next` 344s registers an offense when returning nil with `return` 344s does not register an offense when not returning nil 344s stabby lambda 344s registers an offense when returning nil with `return` 344s registers an offense when returning nil with `next` 344s properly corrects multiline 344s does not register an offense when not returning nil 344s registers an offense when returning nil with `break` 344s does not register an offense when doing more than returning nil 344s registers an offense when returning nil implicitly 344s proc 344s registers an offense when returning nil implicitly 344s does not register an offense when doing more than returning nil 344s registers an offense when returning nil with `return` 344s registers an offense when returning nil with `break` 344s properly corrects single line 344s does not remove block params or change spacing 344s registers an offense when returning nil with `next` 344s does not register an offense when not returning nil 344s 344s RuboCop::Cop::Style::TrailingCommaInBlockArgs 344s when `->` has multiple arguments 344s does not register an offense 344s do/end block format 344s ignores commas in default argument strings 344s does not register an offense when a trailing comma is required 344s does not register an offense when no arguments are present 344s does not register an offense for keyword arguments 344s does not register an offense when more than one argument is present with no trailing comma 344s registers an offense when a trailing comma is not needed 344s preserves semicolons in block/local variables 344s does not register an offense for an empty block 344s does not register an offense for default arguments 344s curly brace block format 344s does not register an offense when a trailing comma is required 344s does not register an offense for default arguments 344s does not register an offense for keyword arguments 344s preserves semicolons in block/local variables 344s registers an offense when a trailing comma is not needed 344s does not register an offense when no arguments are present 344s ignores commas in default argument strings 344s does not register an offense when more than one argument is present with no trailing comma 344s when `lambda` has multiple arguments 344s does not register an offense when more than one argument is present with no trailing comma 344s registers an offense and corrects when a trailing comma isn't needed 344s 344s RuboCop::Cop::Style::StderrPuts 344s registers an offense when using `$stderr.puts('hello')` 344s registers no offense when using `STDERR.puts` with no arguments 344s registers an offense when using `::STDERR.puts('hello')` 344s registers no offense when using `$stderr.puts` with no arguments 344s registers an offense when using `STDERR.puts('hello')` 344s 344s RuboCop::Formatter::HTMLFormatter 344s outputs the result in HTML 345s outputs the cached result in HTML 345s 345s RuboCop::Cop::Layout::BlockEndNewline 345s registers an offense and corrects when multiline block `}` is not on its own line and using heredoc argument with method chain 345s accepts multiline blocks with newlines before the end 345s registers an offense and corrects when multiline block `}` is not on its own line and using method chain 345s registers an offense and corrects when multiline block `}` is not on its own line 345s registers an offense and corrects when multiline block `}` is not on its own line and using multiple heredoc argument method chain 345s registers an offense and corrects when multiline block end is not on its own line 345s accepts a one-liner 345s registers an offense and corrects when a multiline block ends with a method call with hash arguments 345s registers an offense and corrects when multiline block `}` is not on its own line and using multiple heredoc arguments 345s registers an offense and corrects when `}` of multiline block without processing is not on its own line 345s registers an offense and corrects when multiline block `}` is not on its own line and using heredoc argument 345s registers an offense and corrects when a multiline block ends with a hash 345s Ruby 2.7 345s registers an offense and corrects when multiline block `}` is not on its own line and using heredoc argument 345s registers an offense and corrects when multiline block `}` is not on its own line and using method chain 345s 345s RuboCop::Cop::Layout::ExtraSpacing 345s when AllowForAlignment is true 345s registers an offense and corrects alignment with token not preceded by space 345s registers an offense and corrects extra spacing before a unary plus in an argument list 345s ignores whitespace at the beginning of the line 345s accepts aligned values of an implicit hash literal 345s ignores whitespace inside a string 345s registers an offense and corrects extra space before a float 345s accepts space between key and value in a hash with hash rockets 345s registers an offense and corrects double extra spacing in variable assignment 345s ignores trailing whitespace 345s registers an offense and corrects extra spacing in class inheritance 345s with extra spacing for alignment purposes 345s such as lining up different kinds of assignments 345s allows it 345s such as lining up assignments with empty lines and comments in between 345s allows it 345s such as aligning = on lines where there are trailing comments 345s allows it 345s such as aligning tokens with empty line between 345s allows it 345s such as aligning with the same character 345s allows it 345s such as aligning comments on non-adjacent lines 345s allows it 345s such as lining up assignments 345s allows it 345s such as aligning long assignment expressions that include line breaks 345s allows it 345s such as aligning trailing comments 345s allows it 345s when spaces are present in a single-line hash literal 345s registers an offense and corrects hashes with symbol keys 345s registers an offense and corrects hashes with hash rockets 345s when AllowBeforeTrailingComments is 345s false 345s regsiters offense 345s does not trigger on only one space before comment 345s true 345s allows it 345s doesn't interfere with AllowForAlignment 345s being true 345s such as aligning = on lines where there are trailing comments 345s allows it 345s such as aligning with the same character 345s allows it 345s such as lining up different kinds of assignments 345s allows it 345s such as lining up assignments 345s allows it 345s such as lining up assignments with empty lines and comments in between 345s allows it 345s such as aligning trailing comments 345s allows it 345s such as aligning comments on non-adjacent lines 345s allows it 345s such as aligning long assignment expressions that include line breaks 345s allows it 345s such as aligning tokens with empty line between 345s allows it 345s being false 345s such as aligning trailing comments 345s does not register an offense 345s such as aligning comments on non-adjacent lines 345s registers offense(s) 345s such as lining up assignments with empty lines and comments in between 345s registers offense(s) 345s such as lining up different kinds of assignments 345s registers offense(s) 345s such as lining up assignments 345s registers offense(s) 345s such as aligning long assignment expressions that include line breaks 345s registers offense(s) 345s such as aligning with the same character 345s registers offense(s) 345s such as aligning tokens with empty line between 345s does not register an offense 345s such as aligning = on lines where there are trailing comments 345s registers offense(s) 345s when AllowForAlignment is false 345s ignores trailing whitespace 345s registers an offense and corrects extra spacing in class inheritance 345s registers an offense and corrects extra spacing before a unary plus in an argument list 345s ignores whitespace at the beginning of the line 345s accepts aligned values of an implicit hash literal 345s accepts space between key and value in a hash with hash rockets 345s ignores whitespace inside a string 345s registers an offense and corrects extra space before a float 345s registers an offense and corrects double extra spacing in variable assignment 345s registers an offense and corrects alignment with token not preceded by space 345s with extra spacing for alignment purposes 345s such as lining up different kinds of assignments 345s registers offense(s) 345s such as aligning trailing comments 345s registers offense(s) 345s such as aligning = on lines where there are trailing comments 345s registers offense(s) 345s such as lining up assignments 345s registers offense(s) 345s such as aligning long assignment expressions that include line breaks 345s registers offense(s) 345s such as aligning tokens with empty line between 345s registers offense(s) 345s such as lining up assignments with empty lines and comments in between 345s registers offense(s) 345s such as aligning with the same character 345s registers offense(s) 345s such as aligning comments on non-adjacent lines 345s registers offense(s) 345s when spaces are present in a single-line hash literal 345s registers an offense and corrects hashes with hash rockets 345s registers an offense and corrects hashes with symbol keys 345s when ForceEqualSignAlignment is true 345s registers an offense and corrects consecutive aref assignments which are not aligned 345s register offenses and correct consecutive operator assignments which are not aligned 345s does not register offenses for multiple complex nested assignments 345s does not register an offense when optarg equals is not aligned with assignment equals sign 345s does not register alignment errors on outdented lines 345s does not register an offense if assignments are separated by blanks 345s register offenses and correct consecutive attribute assignments which are not aligned 345s registers an offense and corrects consecutive assignments that are not aligned 345s register offenses and correct complex nested assignments 345s does not register an offense if assignments are aligned 345s aligns the first assignment with the following assignment 345s 345s RuboCop::Cop::Style::MultilineMethodSignature 345s when arguments span a single line 345s when defining an instance method 345s registers an offense and corrects when line break after opening parenthesis 345s registers an offense and corrects when closing paren is on the following line 345s when method signature is on a single line 345s does not register an offense for unparameterized method 345s does not register an offense for parameterized method 345s when defining an class method 345s when method signature is on a single line 345s does not register an offense for unparameterized method 345s does not register an offense for parameterized method 345s when arguments span a single line 345s registers an offense and corrects when closing paren is on the following line 345s when arguments span multiple lines 345s when correction would not exceed maximum line length 345s registers an offense and corrects 345s when correction would exceed maximum line length 345s does not register an offense 345s when defining an class method 345s registers an offense and corrects when `end` is on the same line 345s registers an offense and corrects when `end` is on the same line with only closing parentheses 345s registers an offense and corrects when `end` is on the following line 345s when defining an instance method 345s registers an offense and corrects when `end` is on the same line with only closing parentheses 345s registers an offense and corrects when `end` is on the same line with last argument 345s registers an offense and corrects when `end` is on the following line 345s 345s RuboCop::Cop::Metrics::ParameterLists 345s does not register an offense when method has allowed amount of args with block arg 345s registers an offense for a method def with 5 parameters 345s accepts a method def with 4 parameters 345s registers an offense when optargs count exceeds the maximum 345s does not register an offense when method has allowed amount of optargs 345s accepts a proc with more than 4 parameters 345s does not register an offense when method has no args 345s accepts a lambda with more than 4 parameters 345s When CountKeywordArgs is true 345s counts keyword arguments as well 345s When CountKeywordArgs is false 345s does not count keyword arguments 345s does not count keyword arguments without default values 345s 345s RuboCop::Cop::Layout::MultilineMethodCallIndentation 345s when EnforcedStyle is indented_relative_to_receiver 345s accepts indented methods in for body 345s accepts indented methods inside and outside a block 345s accepts any indentation of parameters to #[] 345s accepts an expression where the first method spans multiple lines 345s accepts indented methods in LHS of []= assignment 345s doesn't fail on unary operators 345s does not register an offense when multiline method chain has expected indent width and the method is preceded by splat 345s accepts correctly indented methods in operation 345s registers an offense and corrects extra indentation of 3rd line in typical RSpec code 345s registers an offense and corrects the emacs ruby-mode 1.1 indentation of an expression in an array 345s registers an offense and corrects no indentation of second line 345s accepts no extra indentation of third line 345s accepts alignment inside a grouped expression 345s registers an offense and corrects proc call without a selector 345s accepts indentation relative to first receiver 345s registers an offense and corrects 3 spaces indentation of second line 345s registers an offense and corrects one space indentation of 2nd line 345s accepts indented methods in ordinary statement 345s does not register an offense when multiline method chain has expected indent width and the method is preceded by double splat 345s registers an offense and corrects extra indentation of 3rd line 345s accepts indentation of consecutive lines in typical RSpec code 345s doesn't crash on unaligned multiline lambdas 345s accepts alignment of method with assignment and operator-like method 345s for possible semantic alignment 345s accepts indented methods 345s when EnforcedStyle is aligned 345s registers an offense and corrects proc call without a selector 345s registers an offense and corrects the emacs ruby-mode 1.1 indentation of an expression in an array 345s accepts indented and aligned methods in binary operation 345s registers an offense and corrects extra indentation of 3rd line in typical RSpec code 345s accepts indented methods in for body 345s registers an offense and corrects extra indentation of third line 345s registers an offense and corrects misaligned methods in until condition 345s accepts indented methods inside and outside a block 345s accepts correctly aligned methods in operands 345s registers an offense and corrects unaligned methods in assignment 345s accepts alignment of method with assignment and operator-like method 345s registers an offense and corrects misaligned methods in unless condition 345s accepts no extra indentation of third line 345s accepts indented method when there is nothing to align with 345s accepts aligned methods in assignment 345s accepts indentation relative to first receiver 345s accepts correctly aligned methods in assignment 345s registers an offense and corrects misaligned method in []= call 345s accepts alignment inside a grouped expression 345s accepts aligned methods in if condition 345s registers an offense and corrects misaligned methods in local variable assignment 345s registers an offense and corrects misaligned methods in if condition 345s accepts aligned methods in if + assignment 345s accepts aligned methods in a begin..end block 345s accepts aligned method in assignment + block + assignment 345s does not check binary operations when string wrapped with + 345s accepts aligned methods in constant assignment 345s accepts indented methods in ordinary statement 345s accepts any indentation of parameters to #[] 345s accepts aligned methods in operator assignment 345s accepts an expression where the first method spans multiple lines 345s accepts aligned method in return 345s registers an offense and corrects one space indentation of 3rd line 345s registers an offense and corrects no indentation of second line 345s does not check binary operations when string wrapped with backslash 345s registers an offense and corrects misaligned methods in while condition 345s accepts even indentation of consecutive lines in typical RSpec code 345s registers an offense and corrects one space indentation of 2nd line 345s doesn't crash on unaligned multiline lambdas 345s doesn't fail on unary operators 345s accepts indented methods in LHS of []= assignment 345s registers an offense and corrects 3 spaces indentation of 2nd line 345s for semantic alignment 345s accepts aligned method even when an aref is in the chain 345s accepts key access to hash 345s accepts method being aligned with method in assignment 345s accepts aligned method with blocks in operation assignment 345s doesn't fail on a chain of aref calls 345s accepts methods being aligned with method that is an argument 345s accepts 3 aligned methods 345s accepts nested method calls 345s accepts method being aligned with method 345s registers an offense and corrects unaligned method in block body 345s accepts methods being aligned with method that is an argument in assignment 345s registers an offense and corrects unaligned methods 345s accepts aligned method even when an aref is first in the chain 345s >= Ruby 2.7 345s accepts methods being aligned with method that is an argumentwhen using numbered parameter 345s when EnforcedStyle is indented 345s accepts indented methods in for body 345s registers an offense and corrects aligned methods in if condition 345s accepts indentation of assignment to obj.a with newline after = 345s accepts even indentation of consecutive lines in typical RSpec code 345s registers an offense for a 2 space indentation of if condition 345s accepts indentation of assignment to a[:key] with rhs on same line 345s accepts indented methods in if body 345s accepts correctly indented methods in operation 345s registers an offense and corrects proc call without a selector 345s accepts double indentation of while condition 345s accepts indented methods in until body 345s accepts double indentation of unless condition 345s accepts indentation of assignment to a with newline after = 345s accepts any indentation of parameters to #[] 345s registers an offense and corrects the emacs ruby-mode 1.1 indentation of an expression in an array 345s registers an offense and corrects extra indentation of 3rd line in typical RSpec code 345s accepts indented methods in LHS of []= assignment 345s registers an offense and corrects aligned operators in assignment 345s registers an offense and corrects one space indentation of 2nd line 345s accepts no extra indentation of third line 345s accepts indented methods in unless body 345s registers an offense for a 2 space indentation of while condition 345s registers an offense and corrects 0 space indentation inside square brackets 345s registers an offense and corrects 3 spaces indentation of 2nd line 345s accepts indented methods inside and outside a block 345s accepts alignment inside a grouped expression 345s accepts indentation of assignment to obj.a[:key] with newline after = 345s accepts indented methods in ordinary statement 345s registers an offense and corrects 1 space indentation of 3rd line 345s doesn't crash on unaligned multiline lambdas 345s accepts indented methods in while body 345s accepts special indentation of return if condition 345s registers an offense and corrects correct + unrecognized style 345s accepts double indentation of if condition 345s accepts special indentation of return unless condition 345s accepts an expression where the first method spans multiple lines 345s accepts normal indentation inside grouped expression 345s accepts indented methods in if condition 345s doesn't fail on unary operators 345s accepts indentation of assignment to a with rhs on same line 345s accepts normal indentation of method parameters 345s accepts alignment of method with assignment and operator-like method 345s accepts indentation of assignment to a[:key] with newline after = 345s accepts special indentation of for expression 345s accepts double indentation of until condition 345s registers an offense and corrects no indentation of second line 345s accepts indentation relative to first receiver 346s registers an offense for a 2 space indentation of until condition 346s accepts any indentation of method parameters 346s registers an offense and corrects extra indentation of third line 346s registers an offense for a 2 space indentation of unless condition 346s registers an offense and corrects wrong indentation of for expression 346s when indentation width is overridden for this cop 346s accepts indentation of until condition which is offset by a single normal indentation step 346s accepts indentation of unless condition which is offset by a single normal indentation step 346s accepts indented methods in if condition 346s registers an offense for a 4 space indentation of unless condition 346s registers an offense for a 4 space indentation of until condition 346s accepts indented methods in unless body 346s accepts indented methods 346s accepts indentation of assignment 346s registers an offense for a 4 space indentation of if condition 346s accepts indentation of while condition which is offset by a single normal indentation step 346s accepts indented methods in if body 346s accepts correctly indented methods in operation 346s accepts indented methods in until body 346s registers an offense for a 4 space indentation of while condition 346s accepts indented methods in while body 346s accepts indentation of if condition which is offset by a single normal indentation step 346s for possible semantic alignment 346s accepts indented methods 346s 346s RuboCop::Cop::Lint::RescueException 346s registers an offense for rescue with StandardError, Exception 346s does not register an offense for rescue with no class and => e 346s registers an offense for rescue with Exception => e 346s registers an offense for rescue with ::Exception 346s does not register an offense for rescue with other class 346s does not register an offense for rescue with other classes 346s registers an offense for rescue from Exception 346s does not register an offense for rescue with no class 346s does not register an offense for rescue with a module prefix 346s does not crash when the namespace of a rescued class is in a local variable 346s does not crash when the splat operator is used in a rescue 346s 346s RuboCop::Formatter::DisabledConfigFormatter 346s when no files are inspected 346s creates a .rubocop_todo.yml even in such case 346s when there's .rubocop.yml 346s merges in excludes from .rubocop.yml 346s with autocorrect supported cop 346s adds a comment about --autocorrect option 346s when exclude_limit option is omitted 346s disables the cop with 15 offending files 346s when exclude_limit option is passed 346s respects the file exclusion list limit 346s when any offenses are detected 346s displays YAML configuration disabling all cops with offenses 346s 346s RuboCop::Cop::Naming::VariableNumber 346s when configured for normal 346s registers an offense for snake case numbering in method parameter 346s registers an offense for snake case numbering in symbol 346s registers an offense for snake case numbering in a global variable name 346s registers an offense for snake case numbering in method name 346s does not register an offense for normal case numbering in symbol 346s registers an offense for snake case numbering in method camel case parameter 346s behaves like accepts 346s accepts sha256 in normalcase 346s behaves like offense 346s registers an offense for local_FOO_1 in normalcase 346s behaves like accepts integer symbols 346s accepts integer symbol array literal 346s accepts integer symbol 346s behaves like offense 346s registers an offense for _myLocal_1 in normalcase 346s behaves like accepts 346s accepts snake_case in normalcase 346s behaves like accepts 346s accepts _ in normalcase 346s behaves like accepts 346s accepts local_ in normalcase 346s behaves like accepts 346s accepts localFOO1 in normalcase 346s behaves like accepts 346s accepts emparejó in normalcase 346s behaves like offense_array 346s registers an offense for ["a_1", "a2"] in normalcase 346s behaves like offense 346s registers an offense for @local_1 in normalcase 346s behaves like accepts 346s accepts _1 in normalcase 346s behaves like offense 346s registers an offense for @@local_1 in normalcase 346s behaves like accepts 346s accepts @foo in normalcase 346s behaves like accepts 346s accepts local1 in normalcase 346s behaves like accepts 346s accepts user_1_id in normalcase 346s behaves like offense 346s registers an offense for myAttribute_1 in normalcase 346s behaves like accepts 346s accepts foo10_bar in normalcase 346s behaves like offense 346s registers an offense for @myAttribute_1 in normalcase 346s behaves like accepts 346s accepts target_u2f_device in normalcase 346s behaves like offense 346s registers an offense for localFOO_1 in normalcase 346s behaves like accepts 346s accepts _foo in normalcase 346s behaves like accepts 346s accepts @__foo__ in normalcase 346s behaves like accepts 346s accepts user1_id in normalcase 346s behaves like offense 346s registers an offense for local_1 in normalcase 346s behaves like offense 346s registers an offense for sha_256 in normalcase 346s when AllowedPatterns is set 346s registers an offense for a local variable name that does not match an allowed pattern 346s registers an offense for a class variable name that does not match an allowed pattern 346s does not register an offense for a instance variable name that matches an allowed pattern 346s does not register an offense for a global variable name that matches an allowed pattern 346s registers an offense for a global variable name that does not match an allowed pattern 346s does not register an offense for a symbol that matches an allowed pattern 346s registers an offense for a symbol that does not match an allowed pattern 346s does not register an offense for a method name that matches an allowed pattern 346s does not register an offense for a local variable name that matches an allowed pattern 346s does not register an offense for a class variable name that matches an allowed pattern 346s registers an offense for a method name that does not match an allowed pattern 346s registers an offense for a instance variable name that does not match an allowed pattern 346s when CheckSymbols is false 346s does not register an offense for snake case numbering in symbol 346s when CheckMethodNames is false 346s does not register an offense for snake case numbering in method name 346s when configured for snake_case 346s registers an offense for normal case numbering in a global variable name 346s registers an offense for normal case numbering in method parameter 346s registers an offense for normal case numbering in method camel case parameter 346s registers an offense for normal case numbering in method name 346s registers an offense for normal case numbering in symbol 346s does not register an offense for snake case numbering in symbol 346s behaves like accepts 346s accepts @foo in snake_case 346s behaves like accepts 346s accepts local_123 in snake_case 346s behaves like offense 346s registers an offense for local1 in snake_case 346s behaves like accepts 346s accepts a_1_b_1 in snake_case 346s behaves like offense 346s registers an offense for @camelCase1 in snake_case 346s behaves like offense 346s registers an offense for aB1 in snake_case 346s behaves like accepts 346s accepts local_ in snake_case 346s behaves like accepts 346s accepts _1 in snake_case 346s behaves like accepts 346s accepts _ in snake_case 346s behaves like offense 346s registers an offense for @@local1 in snake_case 346s behaves like accepts 346s accepts local_1 in snake_case 346s behaves like accepts 346s accepts local_12 in snake_case 346s behaves like offense_array 346s registers an offense for ["a1", "a_2"] in snake_case 346s behaves like accepts 346s accepts @__foo__ in snake_case 346s behaves like offense 346s registers an offense for camelCase1 in snake_case 346s behaves like accepts 346s accepts _foo in snake_case 346s behaves like accepts 346s accepts emparejó in snake_case 346s behaves like accepts 346s accepts a_1_b in snake_case 346s behaves like offense 346s registers an offense for @local1 in snake_case 346s behaves like accepts integer symbols 346s accepts integer symbol 346s accepts integer symbol array literal 346s behaves like offense 346s registers an offense for _unused1 in snake_case 346s behaves like accepts 346s accepts aB_1 in snake_case 346s when configured for non integer 346s registers an offense for snake case numbering in method camel case parameter 346s registers an offense for normal case numbering in symbol 346s registers an offense for normal case numbering in method parameter 346s registers an offense for snake case numbering in method parameter 346s registers an offense for snake case numbering in symbol 346s registers an offense for snake case numbering in method name 346s registers an offense for normal case numbering in method name 346s registers an offense for normal case numbering in method camel case parameter 346s behaves like offense 346s registers an offense for _myLocal1 in non_integer 346s behaves like accepts 346s accepts emparejó in non_integer 346s behaves like accepts 346s accepts @@foo in non_integer 346s behaves like accepts 346s accepts @foo in non_integer 346s behaves like accepts 346s accepts fooBar in non_integer 346s behaves like offense 346s registers an offense for local1 in non_integer 346s behaves like accepts integer symbols 346s accepts integer symbol 346s accepts integer symbol array literal 346s behaves like accepts 346s accepts _ in non_integer 346s behaves like offense 346s registers an offense for local_1 in non_integer 346s behaves like accepts 346s accepts @__foo__ in non_integer 346s behaves like offense_array 346s registers an offense for ["a_1", "aone"] in non_integer 346s behaves like offense 346s registers an offense for @local_1 in non_integer 346s behaves like accepts 346s accepts _foo in non_integer 346s behaves like offense 346s registers an offense for @local1 in non_integer 346s behaves like accepts 346s accepts local_ in non_integer 346s behaves like accepts 346s accepts localone in non_integer 346s behaves like accepts 346s accepts local_one in non_integer 346s behaves like offense 346s registers an offense for @myAttribute_1 in non_integer 346s behaves like offense 346s registers an offense for @myAttribute1 in non_integer 346s behaves like offense 346s registers an offense for _myLocal_1 in non_integer 346s behaves like accepts 346s accepts _1 in non_integer 346s behaves like offense 346s registers an offense for myAttribute_1 in non_integer 346s behaves like offense 346s registers an offense for myAttribute1 in non_integer 346s when AllowedIdentifiers is set 346s does not register an offense for a class variable name that is allowed 346s does not register an offense for a local variable name that is allowed 346s does not register an offense for a symbol that is allowed 346s does not register an offense for a method name that is allowed 346s does not register an offense for a global variable name that is allowed 346s does not register an offense for a instance variable name that is allowed 346s 346s RuboCop::Cop::Style::BarePercentLiterals 346s when EnforcedStyle is bare_percent 346s and strings are dynamic 346s accepts __FILE__ 346s accepts "" string with interpolation 346s accepts regular expressions 346s accepts "" 346s accepts '' 346s registers an offense for %Q() 346s accepts heredoc 346s accepts %() 346s accepts %q 346s and strings are static 346s accepts "" string with interpolation 346s accepts "" 346s accepts regular expressions 346s accepts %() 346s accepts __FILE__ 346s accepts heredoc 346s registers an offense for %Q() 346s accepts '' 346s accepts %q 346s when EnforcedStyle is percent_q 346s and strings are static 346s accepts '' 346s registers an offense for %() 346s accepts %Q() 346s accepts "" string with interpolation 346s accepts "" 346s accepts %q 346s accepts __FILE__ 346s accepts heredoc 346s accepts regular expressions 346s and strings are dynamic 346s accepts %q 346s accepts "" string with interpolation 346s accepts "" 346s registers an offense for %() 346s accepts %Q() 346s accepts '' 346s accepts heredoc 346s accepts __FILE__ 346s accepts regular expressions 346s 346s RuboCop::Cop::Style::MultilineBlockChain 346s accepts a multi-line block chained with calls on one line 346s accepts a chain of blocks spanning one line 346s accepts a chain of calls followed by a multi-line block 346s with multi-line block chaining 346s registers an offense for a simple case 346s registers an offense for a slightly more complicated case 346s accepts a chain where the first block is single-line 346s registers two offenses for a chain of three blocks 346s registers an offense for a chain where the second block is single-line 346s Ruby 2.7 346s registers an offense for a slightly more complicated case 346s 346s RuboCop::Cop::Naming::FileName 346s with snake_case file names with non-rb extension 346s does not register an offense 346s with non-ascii characters in filename 346s does not register an offense 346s with snake_case file names without file extension 346s does not register an offense 346s when ExpectMatchingDefinition is true 346s on a file which defines a Struct without a block 346s in a directory with multiple instances of lib 346s does not register an offense 346s in a directory with multiple instances of src 346s does not register an offense 346s in a non-matching directory under spec 346s registers an offense 346s in a non-matching directory under lib 346s registers an offense 346s in a directory with multiple instances of spec 346s does not register an offense 346s in a directory elsewhere which does not match the module name 346s registers an offense 346s in a directory elsewhere which only matches the module name 346s does not register an offense 346s in a matching directory under src 346s does not register an offense 346s in a non-matching directory under src 346s registers an offense 346s in a matching directory under test 346s does not register an offense 346s in a matching directory under spec 346s does not register an offense 346s in a non-matching directory under test 346s registers an offense 346s in a directory with multiple instances of test 346s does not register an offense 346s in a matching directory under lib 346s does not register an offense 346s on a file which uses Name::Spaced::Module syntax 346s in a non-matching directory under test 346s registers an offense 346s in a directory with multiple instances of src 346s does not register an offense 346s in a directory with multiple instances of lib 346s does not register an offense 346s in a non-matching directory under src 346s registers an offense 346s in a directory with multiple instances of spec 346s does not register an offense 346s in a matching directory under test 346s does not register an offense 346s in a matching directory under lib 346s does not register an offense 346s in a non-matching directory under lib 346s registers an offense 346s in a non-matching directory under spec 346s registers an offense 346s in a matching directory under spec 346s does not register an offense 346s in a directory with multiple instances of test 346s does not register an offense 346s in a directory elsewhere which only matches the module name 346s does not register an offense 346s in a directory elsewhere which does not match the module name 346s registers an offense 346s in a matching directory under src 346s does not register an offense 346s on a file which defines a nested module 346s in a directory with multiple instances of test 346s does not register an offense 346s in a non-matching directory under src 346s registers an offense 346s in a directory with multiple instances of src 346s does not register an offense 346s in a non-matching directory under lib 346s registers an offense 346s in a matching directory under lib 346s does not register an offense 346s in a non-matching directory under test 346s registers an offense 346s in a matching directory under test 346s does not register an offense 346s in a directory with multiple instances of lib 346s does not register an offense 346s in a directory elsewhere which does not match the module name 346s registers an offense 346s in a directory elsewhere which only matches the module name 346s does not register an offense 346s in a non-matching directory under spec 346s registers an offense 346s in a matching directory under spec 346s does not register an offense 346s in a matching directory under src 346s does not register an offense 346s in a directory with multiple instances of spec 346s does not register an offense 346s on an empty file with a space in its filename 346s registers an offense 346s on a file which defines a nested class 346s in a matching directory under spec 346s does not register an offense 346s in a non-matching directory under lib 346s registers an offense 346s in a non-matching directory under spec 346s registers an offense 346s in a directory with multiple instances of src 346s does not register an offense 346s in a directory with multiple instances of lib 346s does not register an offense 346s in a non-matching directory under test 346s registers an offense 346s in a matching directory under test 346s does not register an offense 346s in a non-matching directory under src 346s registers an offense 346s in a directory with multiple instances of test 346s does not register an offense 346s in a directory with multiple instances of spec 346s does not register an offense 346s in a matching directory under src 346s does not register an offense 346s in a directory elsewhere which only matches the module name 346s does not register an offense 346s in a directory elsewhere which does not match the module name 346s registers an offense 346s in a matching directory under lib 346s does not register an offense 346s on a file which defines multiple classes 346s in a directory elsewhere which does not match the module name 346s registers an offense 346s in a matching directory under lib 346s does not register an offense 346s in a non-matching directory under spec 346s registers an offense 346s in a non-matching directory under test 346s registers an offense 346s in a non-matching directory under src 346s registers an offense 346s in a directory elsewhere which only matches the module name 346s does not register an offense 346s in a matching directory under src 346s does not register an offense 346s in a directory with multiple instances of src 346s does not register an offense 346s in a directory with multiple instances of spec 346s does not register an offense 346s in a directory with multiple instances of lib 346s does not register an offense 346s in a matching directory under spec 346s does not register an offense 346s in a directory with multiple instances of test 346s does not register an offense 346s in a non-matching directory under lib 346s registers an offense 346s in a matching directory under test 346s does not register an offense 346s on a file which defines no class or module at all 346s under spec 346s registers an offense 346s under test 346s registers an offense 346s under lib 346s registers an offense 346s under lib when not added to root 346s registers an offense 346s under some other random directory 346s registers an offense 346s under src 346s registers an offense 346s on a file which defines a Struct with a block 346s in a directory with multiple instances of src 346s does not register an offense 346s in a non-matching directory under src 346s registers an offense 346s in a non-matching directory under test 346s registers an offense 346s in a matching directory under spec 346s does not register an offense 346s in a matching directory under test 346s does not register an offense 346s in a matching directory under src 346s does not register an offense 346s in a directory with multiple instances of spec 346s does not register an offense 346s in a directory elsewhere which does not match the module name 346s registers an offense 346s in a directory with multiple instances of lib 346s does not register an offense 346s in a non-matching directory under lib 346s registers an offense 346s in a directory elsewhere which only matches the module name 347s does not register an offense 347s in a non-matching directory under spec 347s registers an offense 347s in a directory with multiple instances of test 347s does not register an offense 347s in a matching directory under lib 347s does not register an offense 347s on an empty file 347s registers an offense 347s with include acronym name 347s does not register an offense 347s with acronym namespace 347s does not register an offense 347s with camelCase file names without file extension 347s registers an offense 347s when CheckDefinitionPathHierarchy is false 347s on a file with a non-matching struct 347s registers an offense 347s with a matching module containing a non-matching struct 347s does not register an offense 347s with a non-matching module containing a matching class 347s does not register an offense 347s on a file with a matching struct 347s does not register an offense 347s on an empty file 347s registers an offense 347s in a non-matching directory, but with a matching class 347s does not register an offense 347s on a file with a non-matching class 347s registers an offense 347s with a non-matching module containing a matching struct 347s does not register an offense 347s on a file with a matching class 347s does not register an offense 347s with a matching module containing a non-matching class 347s does not register an offense 347s when the file is specified in AllCops/Include 347s with a non-snake_case file name 347s does not register an offense 347s with camelCase file names ending in .rb 347s registers an offense 347s with non-snake-case file names with a shebang 347s does not register an offense 347s when IgnoreExecutableScripts is disabled 347s registers an offense 347s when Regex is set 347s with a non-matching name 347s registers an offense 347s with a matching name 347s does not register an offense 347s with snake_case file names with multiple extensions 347s does not register an offense 347s with acronym class name 347s does not register an offense 347s with dotfiles 347s does not register an offense 347s with snake_case names which use ? and ! 347s does not register an offense 347s with snake_case names which use + 347s does not register an offense 347s with snake_case file names ending in .rb 347s does not register an offense 347s 347s RuboCop::Cop::Layout::SpaceAroundBlockParameters 347s when EnforcedStyleInsidePipes is no_space 347s registers an offense and corrects a lambda for space after the last parameter 347s accepts a block with spaces in the right places 347s accepts line break after closing pipe 347s accepts an empty block 347s registers an offense and corrects all types of spacing issues for a lambda 347s registers an offense and corrects no space after closing pipe 347s registers an offense and corrects multiple spaces before parameter 347s accepts block parameters with surrounding space that includes line breaks 347s accepts a block with parameters but no body 347s skips lambda without args 347s registers an offense and corrects for space with parens 347s skips lambda without parens 347s registers an offense and corrects space before first parameter 347s accepts a block parameter without preceding space 347s registers an offense and corrects a lambda for space before first parameter 347s registers an offense and corrects all types of spacing issues 347s registers an offense and corrects space after last parameter 347s accepts a lambda with spaces in the right places 347s trailing comma 347s registers an offense for space after the last comma 347s registers an offense for space before and after the last comma 347s when EnforcedStyleInsidePipes is space 347s accepts a lambda with spaces in the right places 347s accepts a block parameter without preceding space 347s accepts a block with spaces in the right places 347s registers an offense and corrects spacing in lambda args 347s registers an offense and corrects multiple spaces before parameter 347s registers an offense and corrects block arguments inside Hash#each 347s registers an offense and corrects no space after closing pipe 347s registers an offense and corrects missing space before first argument and after last argument 347s registers an offense and corrects a lambda for no space before first parameter 347s skips lambda without parens 347s registers an offense and corrects multiple spaces after last parameter 347s registers an offense and corrects space with parens at middle 347s accepts a block with parameters but no body 347s registers an offense and corrects a lambda for no space after last parameter 347s registers an offense and corrects extra space before first parameter 347s accepts line break after closing pipe 347s registers an offense and corrects no space after last parameter 347s registers an offense and corrects a lambda for multiple spacesafter last parameter 347s skips lambda without args 347s registers an offense for no space before first parameter 347s registers an offense and corrects a lambda for extra spacebefore first parameter 347s accepts an empty block 347s trailing comma 347s registers an offense and corrects no space after the last comma 347s accepts space after the last comma 347s accepts space both before and after the last comma 347s 347s RuboCop::Formatter::OffenseCountFormatter 347s #finished 347s when output tty is true 347s has a progress bar 347s when there are many offenses 347s when --display-style-guide was given 347s shows links and sorts by offense count first and then by cop name 347s when --display-style-guide was not given 347s sorts by offense count first and then by cop name 347s #file_finished 347s when no offenses are detected 347s does not add to offense_counts 347s when any offenses are detected 347s increments the count for the cop in offense_counts 347s #report_summary 347s when an offense is detected 347s shows the cop and the offense count 347s 347s RuboCop::Cop::Lint::UnreachableCode 347s registers an offense for `next` in all `if` and `elsif` branches 347s accepts `break` is in `if`, and without `else` 347s registers an offense for `fail` in all `case` branches 347s accepts `redo` is in `case` branch without else 347s accepts `raise` is not in `elsif` branch 347s accepts `exit` is in `case` branch without else 347s accepts `throw` is in `if`, and without `else` 347s accepts `next` is in `if` branch only 347s accepts `exit` is not in `elsif` branch 347s accepts `exit!` is in `if` branch only 347s registers an offense for `fail` in all `if` branches 347s accepts `fail` as the final expression 347s registers an offense for `retry` in all `case` branches 347s registers an offense for `break` in all `if` branches with other expressions 347s accepts `retry` is in all `if` branches 347s registers an offense for `exit` in all `if` and `elsif` branches 347s accepts `raise` is in `if`, and without `else` 347s registers an offense for `exit` in `begin` 347s accepts `return` is in all `if` branches 347s accepts `retry` as the final expression 347s registers an offense for `return` in all `if` branches with other expressions 347s registers an offense for `throw` in all `if` and `elsif` branches 347s registers an offense for `redo` in all `if` branches with other expressions 347s accepts `next` is in all `if` branches 347s accepts `fail` is in all `if` branches 347s registers an offense for `throw` before other statements 347s accepts code with conditional `return` 347s registers an offense for `redo` in `begin` 347s accepts `raise` is in `if` branch only 347s accepts `fail` is in `if`, and without `else` 347s registers an offense for `retry` in all `if` branches 347s accepts `throw` is in `case` branch without else 347s accepts `exit!` is in `case` branch without else 347s accepts `raise` is in `else` branch only 347s accepts `throw` is in `else` branch only 347s registers an offense for `next` in all `case` branches 347s accepts `exit!` is in all `if` branches 347s accepts code with conditional `exit` 347s accepts `next` is in `else` branch only 347s registers an offense for `redo` in all `if` and `elsif` branches 347s accepts `break` as the final expression 347s accepts `redo` is not in `elsif` branch 347s registers an offense for `break` in all `if` and `elsif` branches 347s accepts `retry` is not in `elsif` branch 347s accepts `exit!` as the final expression 347s accepts `abort` as the final expression 347s accepts `exit` is in `else` branch only 347s accepts `retry` is in `if` branch only 347s accepts `throw` as the final expression 347s accepts code with conditional `next` 347s registers an offense for `exit!` in all `if` and `elsif` branches 347s accepts code with conditional `throw` 347s accepts `break` is not in `elsif` branch 347s registers an offense for `return` in `begin` 347s accepts `break` is in `case` branch without else 347s registers an offense for `exit!` in `begin` 347s accepts `redo` is in `if` branch only 347s accepts `break` is in all `if` branches 347s registers an offense for `abort` in all `if` and `elsif` branches 347s accepts `redo` is in `if`, and without `else` 347s registers an offense for `throw` in all `case` branches 347s registers an offense for `break` before other statements 347s registers an offense for `raise` before other statements 347s accepts `exit` as the final expression 347s accepts `retry` is in `case` branch without else 347s accepts `exit!` is not in `elsif` branch 347s accepts code with conditional `raise` 347s registers an offense for `redo` in all `case` branches 347s accepts `return` is not in `elsif` branch 347s registers an offense for `exit!` before other statements 347s registers an offense for `abort` in all `case` branches 347s accepts `exit!` is in `else` branch only 347s accepts `retry` is in `else` branch only 347s registers an offense for `raise` in all `if` branches 347s registers an offense for `redo` in all `if` branches 347s accepts `break` is in `if` branch only 347s accepts `return` is in `if` branch only 347s accepts `retry` is in `if`, and without `else` 347s registers an offense for `exit!` in all `if` branches 347s registers an offense for `return` in all `case` branches 347s accepts `throw` is in `if` branch only 347s accepts code with conditional `abort` 347s accepts `next` is in `case` branch without else 347s registers an offense for `retry` before other statements 347s registers an offense for `retry` in all `if` branches with other expressions 347s registers an offense for `abort` before other statements 347s registers an offense for `next` before other statements 347s accepts `redo` as the final expression 347s registers an offense for `return` in all `if` and `elsif` branches 347s registers an offense for `redo` before other statements 347s accepts `abort` is in `case` branch without else 347s accepts `throw` is in all `if` branches 347s registers an offense for `fail` before other statements 347s registers an offense for `fail` in all `if` branches with other expressions 347s accepts `fail` is in `if` branch only 347s registers an offense for `exit!` in all `case` branches 347s accepts code with conditional `exit!` 347s registers an offense for `next` in all `if` branches with other expressions 347s registers an offense for `exit!` in all `if` branches with other expressions 347s accepts `next` as the final expression 347s registers an offense for `raise` in all `case` branches 347s registers an offense for `return` before other statements 347s registers an offense for `abort` in `begin` 347s registers an offense for `raise` in all `if` and `elsif` branches 347s registers an offense for `exit` in all `if` branches 347s accepts `raise` is in `case` branch without else 347s accepts `fail` is in `else` branch only 347s accepts `next` is in `if`, and without `else` 347s accepts `exit` is in all `if` branches 347s accepts `return` is in `case` branch without else 347s registers an offense for `break` in all `case` branches 347s registers an offense for `fail` in `begin` 347s registers an offense for `exit` in all `case` branches 347s registers an offense for `fail` in all `if` and `elsif` branches 347s accepts `next` is not in `elsif` branch 347s accepts `exit` is in `if`, and without `else` 347s registers an offense for `retry` in `begin` 347s registers an offense for `exit` before other statements 347s accepts code with conditional `redo` 347s accepts `abort` is in `else` branch only 347s accepts code with conditional `fail` 347s accepts `break` is in `else` branch only 347s accepts code with conditional `break` 347s registers an offense for `return` in all `if` branches 347s accepts `redo` is in `else` branch only 347s accepts `fail` is not in `elsif` branch 347s accepts `exit!` is in `if`, and without `else` 347s accepts `return` as the final expression 347s accepts `exit` is in `if` branch only 347s registers an offense for `break` in `begin` 347s accepts `throw` is not in `elsif` branch 347s accepts `abort` is in all `if` branches 347s accepts `abort` is in `if`, and without `else` 347s accepts `raise` is in all `if` branches 347s registers an offense for `abort` in all `if` branches with other expressions 347s accepts `return` is in `if`, and without `else` 347s accepts `fail` is in `case` branch without else 347s registers an offense for `break` in all `if` branches 347s registers an offense for `retry` in all `if` and `elsif` branches 347s accepts `raise` as the final expression 347s registers an offense for `throw` in all `if` branches with other expressions 347s registers an offense for `throw` in `begin` 347s registers an offense for `exit` in all `if` branches with other expressions 347s registers an offense for `throw` in all `if` branches 347s registers an offense for `next` in all `if` branches 347s accepts `abort` is in `if` branch only 347s registers an offense for `raise` in all `if` branches with other expressions 347s registers an offense for `next` in `begin` 347s registers an offense for `raise` in `begin` 347s registers an offense for `abort` in all `if` branches 347s accepts `abort` is not in `elsif` branch 347s accepts `return` is in `else` branch only 347s accepts `redo` is in all `if` branches 347s accepts code with conditional `retry` 347s 347s RuboCop::Cop::Style::RedundantAssignment 347s accepts empty when nodes 347s accepts empty if body 347s reports an offense for def ending with assignment and returning 347s does not register an offense when ensure block present 347s accepts empty method body 347s when inside begin-end body 347s registers an offense and autocorrects 347s when inside a when-branch 347s registers an offense and autocorrects 347s when inside an if-branch 347s registers an offense and autocorrects 347s when rescue blocks present 347s registers an offense and autocorrects when inside function or rescue block 347s 347s RuboCop::Ext::RegexpNode 347s #parsed_tree 347s with a regexp containing a multi-line interpolation 347s returns the expected blanked tree 347s with an extended mode regexp with comment 347s returns the expected tree 347s with a regexp containing interpolation 347s returns the expected blanked tree 347s with a regexp with subexpressions 347s has location information 347s with a regexp not containing interpolation 347s returns the expected tree 347s #each_capture 347s when called without argument 347s is expected to match [(be an instance of Regexp::Expression::Group::Capture), (be an instance of Regexp::Expression::Group::Named)] 347s when called with a `named: true` 347s is expected to match [(be an instance of Regexp::Expression::Group::Named)] 347s when called with a `named: false` 347s is expected to match [(be an instance of Regexp::Expression::Group::Capture)] 347s 347s RuboCop::Cop::Style::IfUnlessModifierOfIfUnless 347s provides a good error message 347s nested conditionals 347s accepts 347s conditional with modifier 347s registers an offense and corrects 347s ternary with modifier 347s registers an offense and corrects 347s `unless` / `else` with modifier 347s registers an offense and corrects 347s conditional with modifier in body 347s accepts 347s 347s RuboCop::Cop::Style::NumberedParametersLimit 347s with Ruby >= 2.7 347s does not register an offense for a numblock with exactly `Max` parameters 347s does not register an offense for a numblock with fewer than `Max` parameters 347s sets Max properly for auto-gen-config 347s does not register an offense for a normal block with too many parameters 347s when configuring Max 347s does not register an offense when there are not too many numbered params 347s when Max is 1 347s uses the right offense message 347s when there are more than `Max` numbered parameters 347s registers an offense for a multiline `numblock` 347s registers an offense for a single line `numblock` 347s 347s RuboCop::Cop::Style::TrailingMethodEndStatement 347s does not register on single line no op 347s register offense with trailing end on 2 line method 348s register offense with trailing end on method with block 348s register offense with trailing end on 3 line method 348s register offense with trailing end inside class 348s does not register on single line method 348s register offense with trailing end on method with comment 348s autocorrects all trailing ends for larger example 348s when Ruby 3.0 or higher 348s does not register an offense when endless method definition signature and body are on different lines 348s does not register an offense when using endless method definition 348s 348s RuboCop::Cop::Lint::IncompatibleIoSelectWithFiberScheduler 348s registers and corrects an offense when using `IO.select` with multiple read argument and specify the first argument only 348s does not register an offense when using `IO.select` with multiple read arguments 348s registers and corrects an offense when using `IO.select` with single write, `nil`, and timeout arguments 348s registers and corrects an offense when using `IO.select` with single read argument and specify the first argument only 348s registers and corrects an offense when using `IO.select` with single read argument 348s registers and corrects an offense when using `::IO.select` with single read argument 348s registers and corrects an offense when using `::IO.select` with single read and timeout arguments 348s registers and corrects an offense when using `IO.select` with single write argument 348s registers and corrects an offense when using `IO.select` with single write and timeout arguments 348s registers and corrects an offense when using `IO.select` with single read and timeout arguments 348s registers and corrects an offense when using `IO.select` with single read as `self` and timeout arguments 348s does not register an offense when using `Enumerable#select` 348s registers and corrects an offense when using `IO.select` with single write as `self` and timeout arguments 348s registers an offense when using `IO.select` with write argument and using return value but does not autocorrect 348s does not register an offense when using `IO.select` with multiple write arguments 348s does not register an offense when using `IO.select` with read and write arguments 348s registers an offense when using `IO.select` with read argument and using return value but does not autocorrect 348s registers and corrects an offense when using `IO.select` with single read, `nil`, and timeout arguments 348s 348s RuboCop::Cop::Registry 348s exposes a list of cop names 348s can filter down to one type 348s can be cloned 348s can filter down to all but one type 348s exposes cop departments 348s exposes the number of stored cops 348s exposes a mapping of cop names to cop classes 348s when dismissing a cop class 348s allows re-listing 348s allows it if done rapidly 348s disallows it if done too late 348s #cops 348s exposes a list of cops 348s with cops having the same inner-most module 348s exposes both cops 348s names_for_department 348s returns array of cops for specified department 348s #qualified_cop_name 348s emits a warning when namespace is incorrect 348s returns the provided name if no namespace is found 348s qualifies names with the correct namespace 348s raises an error when a cop name is ambiguous 348s gives back already properly qualified names 348s qualifies names without a namespace 348s #contains_cop_matching? 348s returns false for cops not included in the store 348s can find cops matching a given name 348s #enabled 348s selects cops which are enabled in the config 348s selects only safe cops if :safe passed 348s overrides config if :only includes the cop 348s when new cops are introduced 348s does not include them 348s overrides config if :only includes the cop 348s when specifying `NewCops: enable` option in .rubocop.yml 348s includes them 348s when specifying `NewCops: pending` option in .rubocop.yml 348s does not include them 348s when specifying `--disable-pending-cops` command-line option 348s does not include them 348s when specifying `NewCops: enable` option in .rubocop.yml 348s does not include them because command-line option takes precedence over .rubocop.yml 348s when specifying `NewCops: disable` option in .rubocop.yml 348s does not include them 348s when specifying `--enable-pending-cops` command-line option 348s includes them 348s when specifying `NewCops: disable` option in .rubocop.yml 348s includes them because command-line option takes precedence over .rubocop.yml 348s #department? 348s returns true for department name 348s returns false for other names 348s 348s RuboCop::Cop::Lint::SuppressedException 348s with AllowComments set to false 348s registers an offense for empty rescue block 348s does not register an offense for rescue with body 348s when empty rescue for `def` 348s registers an offense for empty rescue with comment 348s registers an offense for empty rescue without comment 348s with AllowNil set to true 348s does not register an offense for inline nil rescue 348s does not register an offense for rescue block with nil 348s with AllowNil set to false 348s registers an offense for inline nil rescue 348s registers an offense for rescue block with nil 348s Ruby 2.5 or higher 348s when empty rescue for `do` block 348s registers an offense for empty rescue without comment 348s registers an offense for empty rescue with comment 348s when empty rescue for defs 348s registers an offense for empty rescue without comment 348s registers an offense for empty rescue with comment 348s with AllowComments set to true 348s does not register an offense for empty rescue with comment 348s registers an offense for empty rescue on single line with a comment after it 348s when empty rescue for `defs` 348s does not register an offense for empty rescue with comment 348s registers an offense for empty rescue without comment 348s when empty rescue for `def` 348s registers an offense for empty rescue without comment 348s does not register an offense for empty rescue with comment 348s Ruby 2.7 or higher 348s when empty rescue for `do` block with a numbered parameter 348s does not register an offense for empty rescue with comment 348s registers an offense for empty rescue without comment 348s Ruby 2.5 or higher 348s when empty rescue for `do` block 348s does not register an offense for empty rescue with comment 348s registers an offense for empty rescue without comment 348s 348s RuboCop::Cop::InternalAffairs::RedundantDescribedClassAsSubject 348s registers an offense when using `subject(:cop)` and `:config` is already specified in `describe` 348s registers an offense when using `subject(:cop)` and `:config` is not specified in `describe` 348s does not register an offense when using `subject(:cop)` with multiple arguments to `described_class.new` 348s registers an offense when using `subject(:cop)` with no argument `described_class.new` and `:config` is specified 348s 348s RuboCop::Cop::Lint::UnreachableLoop 348s does not register an offense when using `return do_something(value) || redo` in a loop 348s does not register an offense when branch includes continue statement preceding break statement 348s does not register an offense when using `return do_something(value) || next` in a loop 348s registers an offense when using `return do_something(value) || break` in a loop 348s handles inner loops 348s with an enumerator method 348s not chained 348s registers an offense 348s in the middle of a method chain 348s does not register an offense 348s as the last item in a method chain 348s registers an offense 348s with preceding continue statements 348s does not register an offense when using `case-when-else` with all break branches 348s does not register an offense when using `if-else` with all break branches 348s does not register an offense when using `break` 348s without preceding continue statements 348s does not register an offense when using `case` without `else` 348s registers an offense when using `case-when-else` with all break branches 348s registers an offense when using `if-else` with all break branches 348s does not register an offense when using `case-when-else` and not all branches are breaking 348s does not register an offense when using `if-elsif-else` and not all branches are breaking 348s does not register an offense when using `if` without `else` 348s registers an offense when using `break` 348s Ruby 2.7 348s registers an offense when using `return do_something(value) || break` in a loop 348s with AllowedPatterns 348s with a ignored method call 348s does not register an offense 348s with a non ignored method call 348s registers an offense 348s Ruby 2.7 348s registers an offense 348s 348s RuboCop::Cop::Security::Eval 348s registers an offense for eval as command 348s accepts eval as variable 348s accepts eval with a multiline string 348s registers an offense for eval as function 348s accepts eval as method 348s accepts eval with a string that interpolates a literal 348s accepts eval on a literal string 348s accepts eval with no arguments 348s registers an offense `Binding#eval` 348s registers an offense for eval with string that has an interpolation 348s with an explicit binding, filename, and line number 348s registers an offense for eval as command 348s accepts eval on a literal string 348s registers an offense for eval as function 348s 348s RuboCop::Cop::Layout::SpaceInsideReferenceBrackets 348s with space inside empty brackets not allowed 348s accepts empty brackets with no space inside 348s registers an offense and corrects empty brackets with 1 space inside 348s registers an offense and corrects empty brackets with multiple spaces inside 348s registers an offense and corrects empty brackets with newline inside 348s when EnforcedStyle is no_space 348s registers an offense and corrects when a reference bracket with a trailing whitespace is assigned by another reference bracket 348s accepts square brackets as method name 348s does not register offense for array literals 348s registers an offense and corrects ref brackets with trailing whitespace 348s registers an offense and corrects when a reference bracket is assigned by another reference bracket with trailing whitespace 348s registers an offense and corrects second ref brackets with leading whitespace 348s accepts an array as a reference object 348s does not register offense for non-empty brackets with newline inside 348s registers an offense and corrects when a reference bracket with a leading whitespace is assigned by another reference bracket 348s does not register offense for ref bcts with no spaces that assign 348s registers an offense and corrects ref brackets with leading whitespace 348s accepts square brackets called with method call syntax 348s registers multiple offenses and corrects multiple sets of ref brackets 348s accepts extra spacing in array brackets 348s register and correct multiple offenses for multiple sets of ref brackets 348s registers an offense and corrects third ref brackets with trailing whitespace 348s registers an offense and corrects third ref brackets with leading whitespace 348s registers multiple offenses and corrects one set of ref brackets 348s registers an offense and corrects second ref brackets with trailing whitespace 348s does not register offense for reference brackets with no spaces 348s registers an offense and corrects outer ref brackets 348s with space inside empty braces allowed 348s registers offense and corrects empty brackets with more than one space inside 348s registers offense and corrects empty brackets with no space inside 348s accepts empty brackets with space inside 348s registers offense and corrects empty brackets with newline inside 348s when EnforcedStyle is space 348s registers an offense and corrects when a reference bracket is assigned by another reference bracket with no trailing whitespace 348s registers an offense and corrects ref brackets with no leading whitespace 348s registers an offense and correct third ref brackets with no trailing whitespace 348s registers an offense and corrects second ref brackets with no leading whitespace 348s registers an offense and corrects second ref brackets with no trailing whitespace 348s accepts spaces in array brackets 348s accepts an array as a reference object 348s registers and corrects multiple offenses in one set of ref brackets 348s registers an offense and corrects third ref brackets with no leading whitespace 348s accepts square brackets as method name 348s does not register offense for ref bcts with spaces that assign 348s accepts square brackets called with method call syntax 348s registers an offense and corrects ref brackets with no trailing whitespace 348s registers and corrects multiple offenses for multiple sets of ref brackets 348s registers an offense and corrects when a reference bracket with no leading whitespace is assigned by another reference bracket 348s does not register offense for array literals 348s registers an offense and corrects when a reference bracket with no trailing whitespace is assigned by another reference bracket 348s does not register offense for reference brackets with spaces 348s 348s RuboCop::Formatter::TapFormatter 348s #file_finished 348s when no offenses are detected 348s prints "ok" 348s when any offenses are detected 348s prints "not ok" 348s #finished 348s when no offenses are detected 348s does not report offenses 348s when any offenses are detected 348s reports all detected offenses for all failed files 348s #report_file 348s when the source contains multibyte characters 348s displays text containing the offending source line 348s 348s RuboCop::Cop::Lint::MissingCopEnableDirective 348s when the maximum range size is finite 348s registers an offense when a cop is disabled for too many lines 348s registers an offense when a department is disabled for too many lines 348s does not register an offense when the disable cop is re-enabled within the limit 348s does not register an offense when the disable department is re-enabled within the limit 348s registers an offense when a department is disabled and never re-enabled 348s registers an offense when a cop is disabled and never re-enabled 348s when the maximum range size is infinite 348s does not register an offense when the disable cop is re-enabled 348s registers an offense when a cop is disabled and never re-enabled 348s does not register an offense when the disable department is re-enabled 348s registers an offense when a department is disabled and never re-enabled 348s when the cop is disabled in the config 348s reports no offense when re-disabling it until EOF 348s 348s RuboCop::Cop::Style::EnvHome 348s registers and corrects an offense when using `::ENV['HOME']` 348s registers and corrects an offense when using `ENV.fetch('HOME')` 348s does not register an offense when using `Dir.home` 348s registers and corrects an offense when using `ENV['HOME']` 348s does not register an offense when using `ENV.fetch('HOME', default)` 348s does not register an offense when using `ENV['HOME'] = '/home/foo'` 348s registers and corrects an offense when using `ENV.fetch('HOME', nil)` 348s 348s RuboCop::Cop::Style::MultilineInPatternThen 348s >= Ruby 2.7 348s doesn't register an offense when `then` required for a body of `in` is used 348s registers an offense when one line for multiple candidate values of `in` 348s doesn't register an offense for singleline `in` statement with `then` 348s doesn't register an offense for multiline `in` statement with `then` followed by other lines 348s does not register an offense when line break for multiple candidate values of `in` 348s does not register an offense for array `when` statement with `then` 348s autocorrects when the body of `in` branch starts with `then` 348s registers an offense for multiline (one line in a body) `in` statement with `then` 348s doesn't register an offense for multiline `in` statement without `then` 348s registers an offense for multiline (two lines in a body) `in` statement with `then` 348s does not register an offense for hash `in` statement with `then` 348s doesn't register an offense for empty `in` statement without `then` 348s registers an offense for empty `in` statement with `then` 348s 348s RuboCop::Cop::Style::SingleLineMethods 348s autocorrects def with semicolon after method name 348s autocorrects def with semicolon before end 348s registers an offense for a single-line method 348s autocorrects defs with parentheses after method name 348s does not crash on an method with a capitalized name 348s autocorrects def with argument and no parentheses 348s registers an offense for a single-line method and method body is enclosed in parentheses 348s autocorrects def with argument in parentheses 348s accepts a multi-line method 348s when AllowIfMethodIsEmpty is disabled 348s registers an offense for an empty method 348s endless methods 348s does not register an offense 348s when AllowIfMethodIsEmpty is enabled 348s accepts a single-line empty method 348s when `Style/EndlessMethod` is enabled 348s with `allow_always` style 348s behaves like convert to endless method 348s corrects to an endless class method definition when using > 348s corrects to a normal method if the method body contains multiple statements 348s corrects to an endless method definition when single line method call with parentheses 348s corrects to an endless method definition when single line method call without parentheses 348s corrects to an endless class method definition when using >= 348s corrects to an endless method definition when method body is a literal 348s corrects to an endless class method definition when using == 348s corrects to an endless class method definition when using <= 348s does not to an endless class method definition when using `next` 348s does not to an endless class method definition when using `return` 348s retains comments 348s does not add parens if they are already present 348s corrects to an endless method definition 348s corrects to multiline method definition when defining setter method 348s corrects to an endless class method definition 348s corrects to an endless class method definition when using < 348s corrects to an endless class method definition when using != 348s handles arguments properly 348s does not to an endless class method definition when using `break` 348s corrects to an endless class method definition when using === 348s with AllowIfMethodIsEmpty: true 348s does not correct 348s with AllowIfMethodIsEmpty: false 348s does not turn a method with no body into an endless method 348s with `disallow` style 348s corrects to an normal method 348s with `allow_single_line` style 348s behaves like convert to endless method 348s does not to an endless class method definition when using `break` 348s corrects to an endless class method definition when using == 348s corrects to an endless class method definition when using === 348s corrects to an endless class method definition when using < 348s corrects to an endless method definition when single line method call with parentheses 348s corrects to an endless class method definition when using > 348s retains comments 348s handles arguments properly 348s corrects to multiline method definition when defining setter method 348s corrects to an endless class method definition 348s corrects to an endless class method definition when using >= 348s corrects to an endless method definition when single line method call without parentheses 348s corrects to an endless method definition when method body is a literal 348s does not to an endless class method definition when using `next` 348s does not add parens if they are already present 348s corrects to a normal method if the method body contains multiple statements 348s corrects to an endless class method definition when using <= 348s corrects to an endless method definition 348s does not to an endless class method definition when using `return` 348s corrects to an endless class method definition when using != 348s with AllowIfMethodIsEmpty: false 348s does not turn a method with no body into an endless method 348s with AllowIfMethodIsEmpty: true 348s does not correct 348s prior to ruby 3.0 348s corrects to a multiline method 348s when `Style/EndlessMethod` is disabled 348s corrects to an normal method 348s 348s RuboCop::Cop::Style::RedundantInitialize 348s registers an offense for an `initialize` method with a default argument that does nothing 348s does not register an offense for an `initialize` method with a default keyword argument that calls `super` 348s registers and corrects an offense for an `initialize` method with arguments that only calls `super` 348s does not register an offense for an `initialize` method that calls another method before `super` 348s does not register an offense for an empty `initialize` method with a kwsplat` 348s registers and corrects an offense for an empty `initialize` method 348s does not register an offense for an `initialize` method that calls another method after `super` 348s does not register an offense for an `initialize` method with only a comment 348s does not register an offense for an `initialize` method that calls `super` with no arguments 348s does not register an offense for an empty `initialize` method with a splat` 348s does not register an offense for an `initialize` method with a default argument that calls `super` 348s registers an offense for an `initialize` method with a default keyword argument that does nothing 348s does not register an offense for an empty `initialize` method with a splat` and super 348s does not register an offense for an empty `initialize` method with a argument forwarding` 348s does not register an offense for an `initialize` method that calls `super` with a different argument list 348s does not register an offense for a method not named `initialize` that only calls super 348s registers and corrects an offense for an `initialize` method with arguments that only calls `super` with explicit args 348s does not register an offense for an empty method not named `initialize` 348s registers and corrects an offense for an `initialize` method with no arguments that calls `super` with no arguments 348s registers and corrects an offense for an `initialize` method that only calls `super` 348s does not register an offense for an `initialize` method that calls another method 348s when `AllowComments: false` 348s registers and corrects an offense for an `initialize` method with only a comment 348s 348s RuboCop::Cop::Lint::RedundantDirGlobSort 348s does not register an offense when not using `sort` for `Dir` 348s does not register an offense when using `sort` without a receiver 348s when Ruby 2.7 or lower 348s does not register an offense and correction when using `::Dir.glob.sort` 348s does not register an offense and correction when using `Dir[].sort.each do` 348s does not register an offense and correction when using `Dir[].sort.each(&do_something)` 348s does not register an offense and correction when using `Dir.glob.sort` 348s when Ruby 3.0 or higher 348s registers an offense and correction when using `Dir[].sort.each(&do_something)` 349s registers an offense and correction when using `Dir.glob.sort` 349s registers an offense and correction when using `Dir[].sort.each do` 349s does not register an offense when using `Dir[*path].sort` 349s does not register an offense when not using `sort` with `sort: false` option for `Dir` 349s does not register an offense when using `Dir.glob('./b/*.txt', './a/*.txt').sort` 349s does not register an offense when using `collection.sort` 349s registers an offense and correction when using `::Dir.glob.sort` 349s does not register an offense when using `Dir['./b/*.txt', './a/*.txt'].sort` 349s does not register an offense when using `Dir.glob(*path).sort` 349s 349s RuboCop::Cop::Lint::BooleanSymbol 349s does not register an offense when using `false` 349s does not register an offense when using `true` 349s registers an offense when using `:false` 349s does not register an offense when using regular symbol 349s registers an offense when using `:true` 349s does not register an offense when used inside percent-literal symbol array 349s when using the new hash syntax 349s registers an offense when using `false:` 349s registers an offense when using `key: :false` 349s registers an offense when using `true:` 349s 349s RuboCop::Cop::Naming::BlockForwarding 349s when `EnforcedStyle: explicit 349s Ruby >= 3.1 349s registers and corrects an offense when using anonymous block forwarding 349s does not register an offense when using explicit block forwarding without method body 349s does not register an offense when defining without block argument method 349s registers and corrects an offense when using `yield` in method body 349s does not register an offense when assigning the block arg 349s does not register an offense when using explicit block forwarding 349s registers and corrects an offense when using anonymous block forwarding in singleton method 349s registers and corrects and corrects an offense when using anonymous block forwarding without method body 349s registers and corrects an offense when using symbol proc argument in method body 349s when `BlockForwardingName: block` is already in use 349s registers and no corrects an offense when using anonymous block forwarding 349s when `BlockForwardingName: proc 349s registers and corrects an offense when using anonymous block forwarding 349s when `EnforcedStyle: anonymous 349s Ruby < 3.0 349s does not register an offense when not using anonymous block forwarding 349s Ruby >= 3.1 349s does not register an offense when assigning the block arg 349s does not register an offense when using anonymous block forwarding 349s registers and corrects an offense when using symbol proc argument in method body 349s registers and corrects an offense when using `yield` in method body 349s registers and corrects an offense when using explicit block forwarding 349s registers and corrects an offense when using explicit block forwarding in singleton method 349s does not register an offense when using block argument as a variable 349s registers and corrects an offense when using explicit block forwarding without method body 349s does not register an offense when using anonymous block forwarding without method body 349s does not register an offense when defining kwarg with block args method 349s registers and corrects an offense when using explicit block forwarding without method definition parentheses 349s does not register an offense when defining without block argument method 349s does not register an offense when defining kwoptarg with block args method 349s registers and corrects an only explicit block forwarding when using multiple proc arguments 349s does not register an offense when defining no arguments method 349s 349s RuboCop::Cop::Style::CommandLiteral 349s when PercentLiteralDelimiters is configured and a default exists 349s ignores the default when autocorrecting 349s when EnforcedStyle is set to backticks 349s a multi-line %x string without backticks 349s registers an offense and corrects to backticks 349s a single-line %x string without backticks 349s registers an offense and corrects to backticks 349s a single-line ` string with backticks 349s registers an offense without autocorrection 349s when configured to allow inner backticks 349s is accepted 349s a single-line %x string with backticks 349s is accepted 349s when configured to allow inner backticks 349s registers an offense without autocorrection 349s a multi-line ` string with backticks 349s registers an offense without autocorrection 349s when configured to allow inner backticks 349s is accepted 349s a multi-line %x string with backticks 349s is accepted 349s when configured to allow inner backticks 349s registers an offense without autocorrection 349s a single-line ` string without backticks 349s is accepted 349s a multi-line ` string without backticks 349s is accepted 349s when EnforcedStyle is set to percent_x 349s a multi-line ` string without backticks 349s registers an offense and corrects to %x 349s a single-line %x string with backticks 349s is accepted 349s a single-line ` string with backticks 349s registers an offense without autocorrection 349s a multi-line ` string with backticks 349s registers an offense without autocorrection 349s a multi-line %x string with backticks 349s is accepted 349s a single-line %x string without backticks 349s is accepted 349s a single-line ` string without backticks 349s registers an offense and corrects to %x 349s a multi-line %x string without backticks 349s is accepted 349s when PercentLiteralDelimiters is configured with curly braces 349s respects the configuration when autocorrecting 349s when EnforcedStyle is set to mixed 349s a multi-line %x string with backticks 349s is accepted 349s a single-line %x string with backticks 349s is accepted 349s when configured to allow inner backticks 349s registers an offense without autocorrection 349s a single-line ` string without backticks 349s is accepted 349s a multi-line %x string without backticks 349s is accepted 349s a multi-line ` string with backticks 349s registers an offense without autocorrection 349s a single-line ` string with backticks 349s registers an offense without autocorrection 349s when configured to allow inner backticks 349s is accepted 349s a single-line %x string without backticks 349s registers an offense and corrects to backticks 349s a multi-line ` string without backticks 349s registers an offense and corrects to %x 349s %x commands with other delimiters than parentheses 349s registers an offense 349s when PercentLiteralDelimiters only has a default 349s respects the configuration when autocorrecting 349s heredoc commands 349s is ignored 349s 349s RuboCop::Cop::Layout::MultilineMethodArgumentLineBreaks 349s when bracket hash assignment key on multiple lines 349s does not add any offenses 349s when bracket hash assignment on multiple lines 349s does not add any offenses 349s when two arguments are on next line 349s does not add any offenses 349s when there are multiple arguments on the first line 349s registers an offense and corrects starting from the 2nd argument 349s when many arguments including hash are on multiple lines, three on same line 349s registers an offense and corrects 349s when argument starts on same line but ends on different line 349s registers an offense and corrects 349s when many arguments are on multiple lines, two on same line 349s registers an offense and corrects 349s when second argument starts on same line as end of first 349s registers an offense and corrects 349s when many arguments are on multiple lines, three on same line 349s registers an offense and corrects 349s when one argument on same line 349s does not add any offenses 349s 349s RuboCop::Cop::InternalAffairs::ExampleHeredocDelimiter 349s when unexpected heredoc delimiter is used at non RuboCop specific expectation 349s does not register an offense 349s when unexpected heredoc delimiter is used in multi-line heredoc 349s registers an offense 349s when expected heredoc delimiter is used at RuboCop specific expectation 349s does not register an offense 349s when unexpected heredoc delimiter is used in single-line heredoc 349s registers an offense 349s when unexpected heredoc delimiter is used but heredoc body contains an expected delimiter line 349s does not register an offense 349s 349s RuboCop::Cop::Style::DocumentationMethod 349s when declaring methods outside a class 349s when declaring methods in a class 349s with annotation comment 349s registers an offense 349s with directive comment 349s registers an offense 349s with both public and private methods 349s when required for non-public methods 349s registers an offense 349s when the public method has no documentation 349s registers an offense 349s when the public method has documentation 349s does not register an offense 349s without documentation comment 349s when method is public 349s registers an offense 349s registers an offense with `end` on the same line 349s when method is private 349s does not register an offense with inline `private` and `end` 349s does not register an offense with `end` on the same line 349s does not register an offense with inline `private` 349s does not register an offense 349s when required for non-public methods 349s registers an offense with inline `private` 349s registers an offense 349s registers an offense with `end` on the same line 349s registers an offense with inline `private` and `end` 349s with documentation comment 349s when method is public 349s does not register an offense with `end` on the same line 349s does not register an offense 349s with both public and private methods 349s when the public method has no documentation 349s registers an offense 349s when required for non-public methods 349s registers an offense 349s when the public method has documentation 349s does not register an offense 349s when declaring methods for class instance 349s without documentation comment 349s registers an offense with `end` on the same line 349s registers an offense 349s with documentation comment 349s does not register an offense 349s does not register an offense with `end` on the same line 349s with both public and private methods 349s when the public method has documentation 349s does not register an offense 349s when the public method has no documentation 349s registers an offense 349s when required for non-public methods 349s registers an offense 349s when method is private 349s does not register an offense 349s does not register an offense with `end` on the same line 349s does not register an offense with inline `private` 349s does not register an offense with inline `private` and `end` 349s when required for non-public methods 349s registers an offense 349s registers an offense with inline `private` and `end` 349s registers an offense with inline `private` 349s registers an offense with `end` on the same line 349s with documentation comment 349s does not register an offense with `end` on the same line 349s does not register an offense 349s when declaring methods in a module 349s with both public and private methods 349s when the public method has no documentation 349s registers an offense 349s when the public method has documentation 349s does not register an offense 349s when required for non-public methods 349s registers an offense 349s without documentation comment 349s when method is public 349s registers an offense with `end` on the same line 349s registers an offense 349s when method is module_function 349s registers an offense for separate def 349s registers an offense for inline def 349s when method is private 349s does not register an offense 349s does not register an offense with inline `private` 349s does not register an offense with inline `private` and `end` 349s does not register an offense with `end` on the same line 349s when required for non-public methods 349s registers an offense with inline `private` and `end` 349s registers an offense with `end` on the same line 349s registers an offense 349s registers an offense with inline `private` 349s with documentation comment 349s when method is module_function 349s does not register an offense for separate def 349s does not register an offense for inline def 349s when method is public 349s does not register an offense 349s does not register an offense with `end` on the same line 349s without documentation comment 349s when method is public 349s registers an offense 349s registers an offense with `end` on the same line 349s registers an offense when method is public, but there were private methods before 349s when method is private 349s does not register an offense 349s does not register an offense with inline `private` 349s does not register an offense with `end` on the same line 349s does not register an offense with inline `private` and `end` 349s when required for non-public methods 349s registers an offense with inline `private` 349s registers an offense with `end` on the same line 349s registers an offense with inline `private` and `end` 349s registers an offense 349s when method is protected 349s does not register an offense 349s does not register an offense with inline `protected` 349s when required for non-public methods 349s registers an offense with inline `protected` 349s registers an offense 349s 349s RuboCop::Cop::Style::UnpackFirst 349s ruby version >= 2.4 349s registers offense 349s when using `#unpack` with `#slice` 349s when using `#unpack` with dot and square brackets 349s when using `#unpack` with square brackets 349s when using `#unpack` with `#at` 349s when using `#unpack` with `#first` 349s does not register offense 349s when using `#unpack` accessing second element 349s when using `#unpack1` 349s 349s RuboCop::Cop::Style::MultilineWhenThen 349s registers an offense when one line for multiple candidate values of `when` 349s registers an offense for empty when statement with then 349s does not register an offense for array when statement with then 349s doesn't register an offense for empty when statement without then 349s registers an offense for multiline (one line in a body) when statement with then 349s does not register an offense when line break for multiple candidate values of `when` 349s doesn't register an offense for multiline when statement without then 349s doesn't register an offense for multiline when statementwith then followed by other lines 349s doesn't register an offense when `then` required for a body of `when` is used 349s does not register an offense for hash when statement with then 349s doesn't register an offense for singleline when statement with then 349s registers an offense for multiline (two lines in a body) when statement with then 349s autocorrects when the body of `when` branch starts with `then` 349s 349s Pending: (Failures listed here are expected and do not affect your suite's status) 349s 349s 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 349s # Requires an advanced logic that checks whether the return value of an operator assignment is used or not. 349s Failure/Error: 349s expect_offense(<<~RUBY) 349s def some_method 349s total = 0 349s foo = 0 349s 349s while total < 100 349s total += 1 349s foo += 1 349s ^^^ Useless assignment to variable - `foo`. 349s end 349s 349s Diff: 349s @@ -5,7 +5,6 @@ 349s while total < 100 349s total += 1 349s foo += 1 349s - ^^^ Useless assignment to variable - `foo`. 349s end 349s 349s total 349s # /usr/share/rubygems-integration/all/gems/rubocop-1.39.0/lib/rubocop/rspec/expect_offense.rb:123:in `expect_offense' 349s # ./spec/rubocop/cop/lint/useless_assignment_spec.rb:341:in `block (3 levels) in ' 349s # /usr/share/rubygems-integration/all/gems/webmock-3.18.1/lib/webmock/rspec.rb:37:in `block (2 levels) in ' 349s 349s Finished in 2 minutes 1.3 seconds (files took 5.25 seconds to load) 349s 19119 examples, 0 failures, 1 pending 349s 349s Randomized with seed 12602 349s 351s mv ./.gem2deb.lib lib 352s autopkgtest [11:07:13]: test gem2deb-test-runner: -----------------------] 353s autopkgtest [11:07:14]: test gem2deb-test-runner: - - - - - - - - - - results - - - - - - - - - - 353s gem2deb-test-runner PASS 354s autopkgtest [11:07:15]: @@@@@@@@@@@@@@@@@@@@ summary 354s gem2deb-test-runner PASS 372s Creating nova instance adt-noble-arm64-rubocop-20240311-110120-juju-7f2275-prod-proposed-migration-environment-3 from image adt/ubuntu-noble-arm64-server-20240311.img (UUID 900cfff9-7f1a-42c7-81a7-22635cd2a5f9)...