0s autopkgtest [23:44:50]: starting date: 2024-03-07 0s autopkgtest [23:44:50]: git checkout: d9c0295 adt_testbed.py: supress warnings from apt using a shell pipeline 0s autopkgtest [23:44:50]: host juju-7f2275-prod-proposed-migration-environment-3; command line: /home/ubuntu/autopkgtest/runner/autopkgtest --output-dir /tmp/autopkgtest-work.l0uov73f/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.2,src:openssl --apt-upgrade rubocop --timeout-short=300 --timeout-copy=20000 --timeout-build=20000 '--env=ADT_TEST_TRIGGERS=ruby3.2/3.2.3-1build2 openssl/3.0.10-1ubuntu5' -- ssh -s /home/ubuntu/autopkgtest/ssh-setup/nova -- --flavor autopkgtest --security-groups autopkgtest-juju-7f2275-prod-proposed-migration-environment-3@bos03-arm64-19.secgroup --name adt-noble-arm64-rubocop-20240307-234449-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/ 72s autopkgtest [23:46:02]: @@@@@@@@@@@@@@@@@@@@ test bed setup 73s Get:1 http://ftpmaster.internal/ubuntu noble-proposed InRelease [117 kB] 73s Get:2 http://ftpmaster.internal/ubuntu noble-proposed/multiverse Sources [23.8 kB] 73s Get:3 http://ftpmaster.internal/ubuntu noble-proposed/universe Sources [1838 kB] 74s Get:4 http://ftpmaster.internal/ubuntu noble-proposed/main Sources [321 kB] 74s Get:5 http://ftpmaster.internal/ubuntu noble-proposed/restricted Sources [3976 B] 74s Get:6 http://ftpmaster.internal/ubuntu noble-proposed/main arm64 Packages [444 kB] 74s Get:7 http://ftpmaster.internal/ubuntu noble-proposed/main arm64 c-n-f Metadata [3144 B] 74s Get:8 http://ftpmaster.internal/ubuntu noble-proposed/restricted arm64 Packages [20.3 kB] 74s Get:9 http://ftpmaster.internal/ubuntu noble-proposed/restricted arm64 c-n-f Metadata [116 B] 74s Get:10 http://ftpmaster.internal/ubuntu noble-proposed/universe arm64 Packages [2181 kB] 74s Get:11 http://ftpmaster.internal/ubuntu noble-proposed/universe arm64 c-n-f Metadata [8528 B] 74s Get:12 http://ftpmaster.internal/ubuntu noble-proposed/multiverse arm64 Packages [21.5 kB] 74s Get:13 http://ftpmaster.internal/ubuntu noble-proposed/multiverse arm64 c-n-f Metadata [116 B] 75s Fetched 4983 kB in 1s (3866 kB/s) 75s Reading package lists... 78s Reading package lists... 79s Building dependency tree... 79s Reading state information... 79s Calculating upgrade... 79s The following packages will be REMOVED: 79s libssl3 79s The following NEW packages will be installed: 79s libssl3t64 79s The following packages will be upgraded: 79s libproc2-0 openssl pci.ids procps 80s 4 upgraded, 1 newly installed, 1 to remove and 0 not upgraded. 80s Need to get 3785 kB of archives. 80s After this operation, 91.1 kB of additional disk space will be used. 80s Get:1 http://ftpmaster.internal/ubuntu noble-proposed/main arm64 openssl arm64 3.0.10-1ubuntu5 [982 kB] 80s Get:2 http://ftpmaster.internal/ubuntu noble-proposed/main arm64 libssl3t64 arm64 3.0.10-1ubuntu5 [1763 kB] 80s Get:3 http://ftpmaster.internal/ubuntu noble/main arm64 libproc2-0 arm64 2:4.0.4-4ubuntu1 [58.4 kB] 80s Get:4 http://ftpmaster.internal/ubuntu noble/main arm64 procps arm64 2:4.0.4-4ubuntu1 [708 kB] 80s Get:5 http://ftpmaster.internal/ubuntu noble/main arm64 pci.ids all 0.0~2024.02.02-1 [273 kB] 81s Fetched 3785 kB in 1s (5252 kB/s) 81s (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 ... 74662 files and directories currently installed.) 81s Preparing to unpack .../openssl_3.0.10-1ubuntu5_arm64.deb ... 81s Unpacking openssl (3.0.10-1ubuntu5) over (3.0.10-1ubuntu4) ... 81s dpkg: libssl3:arm64: dependency problems, but removing anyway as you requested: 81s wget depends on libssl3 (>= 3.0.0). 81s u-boot-tools depends on libssl3 (>= 3.0.0). 81s tnftp depends on libssl3 (>= 3.0.0). 81s tcpdump depends on libssl3 (>= 3.0.0). 81s systemd-resolved depends on libssl3 (>= 3.0.0). 81s systemd depends on libssl3 (>= 3.0.0). 81s sudo depends on libssl3 (>= 3.0.0). 81s sbsigntool depends on libssl3 (>= 3.0.0). 81s rsync depends on libssl3 (>= 3.0.0). 81s python3-cryptography depends on libssl3 (>= 3.0.0). 81s openssh-server depends on libssl3 (>= 3.0.10). 81s openssh-client depends on libssl3 (>= 3.0.10). 81s mtd-utils depends on libssl3 (>= 3.0.0). 81s mokutil depends on libssl3 (>= 3.0.0). 81s linux-headers-6.8.0-11-generic depends on libssl3 (>= 3.0.0). 81s libsystemd-shared:arm64 depends on libssl3 (>= 3.0.0). 81s libssh-4:arm64 depends on libssl3 (>= 3.0.0). 81s libsasl2-modules:arm64 depends on libssl3 (>= 3.0.0). 81s libsasl2-2:arm64 depends on libssl3 (>= 3.0.0). 81s libpython3.12-minimal:arm64 depends on libssl3 (>= 3.0.0). 81s libnvme1 depends on libssl3 (>= 3.0.0). 81s libkrb5-3:arm64 depends on libssl3 (>= 3.0.0). 81s libkmod2:arm64 depends on libssl3 (>= 3.0.0). 81s libfido2-1:arm64 depends on libssl3 (>= 3.0.0). 81s libcurl4:arm64 depends on libssl3 (>= 3.0.0). 81s libcryptsetup12:arm64 depends on libssl3 (>= 3.0.0). 81s kmod depends on libssl3 (>= 3.0.0). 81s dhcpcd-base depends on libssl3 (>= 3.0.0). 81s bind9-libs:arm64 depends on libssl3 (>= 3.0.0). 81s 81s (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 ... 74662 files and directories currently installed.) 81s Removing libssl3:arm64 (3.0.10-1ubuntu4) ... 81s Selecting previously unselected package libssl3t64:arm64. 81s (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 ... 74651 files and directories currently installed.) 81s Preparing to unpack .../libssl3t64_3.0.10-1ubuntu5_arm64.deb ... 81s Unpacking libssl3t64:arm64 (3.0.10-1ubuntu5) ... 81s Preparing to unpack .../libproc2-0_2%3a4.0.4-4ubuntu1_arm64.deb ... 81s Unpacking libproc2-0:arm64 (2:4.0.4-4ubuntu1) over (2:4.0.4-2ubuntu1) ... 81s Preparing to unpack .../procps_2%3a4.0.4-4ubuntu1_arm64.deb ... 81s Unpacking procps (2:4.0.4-4ubuntu1) over (2:4.0.4-2ubuntu1) ... 82s Preparing to unpack .../pci.ids_0.0~2024.02.02-1_all.deb ... 82s Unpacking pci.ids (0.0~2024.02.02-1) over (0.0~2023.11.11-1) ... 82s Setting up pci.ids (0.0~2024.02.02-1) ... 82s Setting up libssl3t64:arm64 (3.0.10-1ubuntu5) ... 82s Setting up libproc2-0:arm64 (2:4.0.4-4ubuntu1) ... 82s Setting up procps (2:4.0.4-4ubuntu1) ... 82s Setting up openssl (3.0.10-1ubuntu5) ... 82s Processing triggers for man-db (2.12.0-3) ... 83s Processing triggers for libc-bin (2.39-0ubuntu2) ... 84s Reading package lists... 84s Building dependency tree... 84s Reading state information... 84s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 85s sh: Attempting to set up Debian/Ubuntu apt sources automatically 85s sh: Distribution appears to be Ubuntu 86s Reading package lists... 86s Building dependency tree... 86s Reading state information... 87s eatmydata is already the newest version (131-1). 87s dbus is already the newest version (1.14.10-4ubuntu1). 87s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 87s Reading package lists... 87s Building dependency tree... 87s Reading state information... 88s rng-tools-debian is already the newest version (2.4). 88s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 88s Reading package lists... 88s Building dependency tree... 88s Reading state information... 89s haveged is already the newest version (1.9.14-1ubuntu1). 89s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 89s Reading package lists... 89s Building dependency tree... 89s Reading state information... 90s The following packages will be REMOVED: 90s cloud-init* python3-configobj* python3-debconf* 90s 0 upgraded, 0 newly installed, 3 to remove and 0 not upgraded. 90s After this operation, 3248 kB disk space will be freed. 90s (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 ... 74664 files and directories currently installed.) 90s Removing cloud-init (24.1-0ubuntu1) ... 91s Removing python3-configobj (5.0.8-3) ... 91s Removing python3-debconf (1.5.86) ... 91s Processing triggers for man-db (2.12.0-3) ... 91s (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 ... 74275 files and directories currently installed.) 91s Purging configuration files for cloud-init (24.1-0ubuntu1) ... 92s dpkg: warning: while removing cloud-init, directory '/etc/cloud/cloud.cfg.d' not empty so not removed 92s Processing triggers for rsyslog (8.2312.0-3ubuntu3) ... 92s Reading package lists... 93s Building dependency tree... 93s Reading state information... 93s linux-generic is already the newest version (6.8.0-11.11+1). 93s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 94s Hit:1 http://ftpmaster.internal/ubuntu noble InRelease 94s Hit:2 http://ftpmaster.internal/ubuntu noble-updates InRelease 94s Hit:3 http://ftpmaster.internal/ubuntu noble-security InRelease 94s Hit:4 http://ftpmaster.internal/ubuntu noble-proposed InRelease 95s Reading package lists... 95s Reading package lists... 95s Building dependency tree... 95s Reading state information... 96s Calculating upgrade... 96s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 96s Reading package lists... 96s Building dependency tree... 96s Reading state information... 97s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 97s autopkgtest [23:46:27]: rebooting testbed after setup commands that affected boot 123s autopkgtest [23:46:53]: testbed running kernel: Linux 6.8.0-11-generic #11-Ubuntu SMP PREEMPT_DYNAMIC Wed Feb 14 02:53:31 UTC 2024 124s autopkgtest [23:46:54]: testbed dpkg architecture: arm64 125s autopkgtest [23:46:55]: @@@@@@@@@@@@@@@@@@@@ apt-source rubocop 127s Get:1 http://ftpmaster.internal/ubuntu noble/universe rubocop 1.39.0+dfsg-1 (dsc) [2430 B] 127s Get:2 http://ftpmaster.internal/ubuntu noble/universe rubocop 1.39.0+dfsg-1 (tar) [1029 kB] 127s Get:3 http://ftpmaster.internal/ubuntu noble/universe rubocop 1.39.0+dfsg-1 (diff) [11.0 kB] 127s gpgv: Signature made Tue Dec 20 23:20:36 2022 UTC 127s gpgv: using RSA key 8ED6C3F8BAC9DB7FC130A870F823A2729883C97C 127s gpgv: issuer "kanashiro@debian.org" 127s gpgv: Can't check signature: No public key 127s dpkg-source: warning: cannot verify inline signature for ./rubocop_1.39.0+dfsg-1.dsc: no acceptable signature found 128s autopkgtest [23:46:58]: testing package rubocop version 1.39.0+dfsg-1 128s autopkgtest [23:46:58]: build not needed 129s autopkgtest [23:46:59]: test gem2deb-test-runner: preparing testbed 134s Reading package lists... 135s Building dependency tree... 135s Reading state information... 136s Correcting dependencies...Starting pkgProblemResolver with broken count: 0 136s Starting 2 pkgProblemResolver with broken count: 0 136s Done 136s Done 137s Starting pkgProblemResolver with broken count: 0 137s Starting 2 pkgProblemResolver with broken count: 0 137s Done 137s The following additional packages will be installed: 137s gem2deb-test-runner libjs-jquery libjs-jquery-easing libjs-jquery-fancybox 137s libjs-jquery-mousewheel libjs-jquery-ui libruby libruby3.1 pry rake rubocop 137s ruby ruby-addressable ruby-ast ruby-coderay ruby-crack ruby-diff-lcs 137s ruby-docile ruby-hashdiff ruby-method-source ruby-net-telnet ruby-parallel 137s ruby-progressbar ruby-public-suffix ruby-rainbow ruby-regexp-parser 137s ruby-rspec ruby-rspec-core ruby-rspec-expectations ruby-rspec-mocks 137s ruby-rspec-support ruby-rubocop-ast ruby-rubygems ruby-sdbm ruby-simplecov 137s ruby-simplecov-html ruby-unicode-display-width ruby-webmock ruby-webrick 137s ruby-whitequark-parser ruby-xmlrpc ruby3.1 rubygems-integration 137s Suggested packages: 137s libjs-jquery-ui-docs ri ruby-dev bundler 137s Recommended packages: 137s javascript-common zip fonts-lato 137s The following NEW packages will be installed: 137s gem2deb-test-runner libjs-jquery libjs-jquery-easing libjs-jquery-fancybox 137s libjs-jquery-mousewheel libjs-jquery-ui libruby libruby3.1 pry rake rubocop 137s ruby ruby-addressable ruby-ast ruby-coderay ruby-crack ruby-diff-lcs 137s ruby-docile ruby-hashdiff ruby-method-source ruby-net-telnet ruby-parallel 137s ruby-progressbar ruby-public-suffix ruby-rainbow ruby-regexp-parser 137s ruby-rspec ruby-rspec-core ruby-rspec-expectations ruby-rspec-mocks 137s ruby-rspec-support ruby-rubocop-ast ruby-rubygems ruby-sdbm ruby-simplecov 137s ruby-simplecov-html ruby-unicode-display-width ruby-webmock ruby-webrick 137s ruby-whitequark-parser ruby-xmlrpc ruby3.1 rubygems-integration 138s 0 upgraded, 43 newly installed, 0 to remove and 0 not upgraded. 138s 1 not fully installed or removed. 138s Need to get 8555 kB of archives. 138s After this operation, 50.2 MB of additional disk space will be used. 138s Get:1 http://ftpmaster.internal/ubuntu noble/main arm64 rubygems-integration all 1.18 [5336 B] 138s Get:2 http://ftpmaster.internal/ubuntu noble/main arm64 rake all 13.0.6-3 [61.6 kB] 138s Get:3 http://ftpmaster.internal/ubuntu noble/main arm64 ruby-net-telnet all 0.2.0-1 [13.3 kB] 138s Get:4 http://ftpmaster.internal/ubuntu noble/main arm64 ruby-webrick all 1.8.1-1 [52.3 kB] 138s Get:5 http://ftpmaster.internal/ubuntu noble/main arm64 ruby-xmlrpc all 0.3.2-2 [24.8 kB] 138s Get:6 http://ftpmaster.internal/ubuntu noble/main arm64 libruby arm64 1:3.1+1 [4640 B] 138s Get:7 http://ftpmaster.internal/ubuntu noble/main arm64 ruby-sdbm arm64 1.0.0-5build3 [17.9 kB] 138s Get:8 http://ftpmaster.internal/ubuntu noble/main arm64 libruby3.1 arm64 3.1.2-7ubuntu4 [5115 kB] 138s Get:9 http://ftpmaster.internal/ubuntu noble/main arm64 ruby3.1 arm64 3.1.2-7ubuntu4 [49.0 kB] 138s Get:10 http://ftpmaster.internal/ubuntu noble/main arm64 ruby-rubygems all 3.4.20-1 [238 kB] 138s Get:11 http://ftpmaster.internal/ubuntu noble/main arm64 ruby arm64 1:3.1+1 [3464 B] 138s Get:12 http://ftpmaster.internal/ubuntu noble/universe arm64 ruby-progressbar all 1.11.0-1 [16.3 kB] 138s Get:13 http://ftpmaster.internal/ubuntu noble/universe arm64 ruby-parallel all 1.22.1-2 [12.3 kB] 138s Get:14 http://ftpmaster.internal/ubuntu noble/universe arm64 ruby-ast all 2.4.2-1 [10.7 kB] 138s Get:15 http://ftpmaster.internal/ubuntu noble/universe arm64 ruby-whitequark-parser all 3.1.3.0-1 [433 kB] 138s Get:16 http://ftpmaster.internal/ubuntu noble/universe arm64 ruby-rainbow all 3.1.1-1 [12.4 kB] 138s Get:17 http://ftpmaster.internal/ubuntu noble/universe arm64 ruby-regexp-parser all 2.6.1-1 [54.5 kB] 138s Get:18 http://ftpmaster.internal/ubuntu noble/universe arm64 ruby-rubocop-ast all 1.24.0-2 [50.3 kB] 138s Get:19 http://ftpmaster.internal/ubuntu noble/universe arm64 ruby-unicode-display-width all 1.6.1-1 [8904 B] 138s Get:20 http://ftpmaster.internal/ubuntu noble/universe arm64 rubocop all 1.39.0+dfsg-1 [456 kB] 138s Get:21 http://ftpmaster.internal/ubuntu noble/universe arm64 ruby-coderay all 1.1.3-8 [78.5 kB] 138s Get:22 http://ftpmaster.internal/ubuntu noble/universe arm64 ruby-method-source all 1.0.0-2 [8904 B] 138s Get:23 http://ftpmaster.internal/ubuntu noble/universe arm64 pry all 0.14.2-1 [121 kB] 138s Get:24 http://ftpmaster.internal/ubuntu noble/universe arm64 ruby-rspec-support all 3.12.0c0e1m1s0-1 [28.8 kB] 138s Get:25 http://ftpmaster.internal/ubuntu noble/universe arm64 ruby-rspec-core all 3.12.0c0e1m1s0-1 [163 kB] 138s Get:26 http://ftpmaster.internal/ubuntu noble/universe arm64 ruby-diff-lcs all 1.5.0-1 [23.9 kB] 138s Get:27 http://ftpmaster.internal/ubuntu noble/universe arm64 ruby-rspec-expectations all 3.12.0c0e1m1s0-1 [89.2 kB] 138s Get:28 http://ftpmaster.internal/ubuntu noble/universe arm64 ruby-rspec-mocks all 3.12.0c0e1m1s0-1 [79.4 kB] 138s Get:29 http://ftpmaster.internal/ubuntu noble/universe arm64 ruby-rspec all 3.12.0c0e1m1s0-1 [3506 B] 138s Get:30 http://ftpmaster.internal/ubuntu noble/universe arm64 ruby-docile all 1.1.5-2.1 [5708 B] 138s Get:31 http://ftpmaster.internal/ubuntu noble/main arm64 libjs-jquery all 3.6.1+dfsg+~3.5.14-1 [328 kB] 138s Get:32 http://ftpmaster.internal/ubuntu noble/universe arm64 libjs-jquery-easing all 12-4 [6970 B] 139s Get:33 http://ftpmaster.internal/ubuntu noble/universe arm64 libjs-jquery-mousewheel all 1:3.1.13-5 [6324 B] 139s Get:34 http://ftpmaster.internal/ubuntu noble/universe arm64 libjs-jquery-fancybox all 12-4 [45.7 kB] 139s Get:35 http://ftpmaster.internal/ubuntu noble/universe arm64 libjs-jquery-ui all 1.13.2+dfsg-1 [252 kB] 139s Get:36 http://ftpmaster.internal/ubuntu noble/universe arm64 ruby-simplecov-html all 0.12.3-2 [477 kB] 139s Get:37 http://ftpmaster.internal/ubuntu noble/universe arm64 ruby-simplecov all 0.22.0-1 [40.7 kB] 139s Get:38 http://ftpmaster.internal/ubuntu noble/universe arm64 ruby-public-suffix all 4.0.6+ds-2 [14.1 kB] 139s Get:39 http://ftpmaster.internal/ubuntu noble/universe arm64 ruby-addressable all 2.8.5-1 [55.3 kB] 139s Get:40 http://ftpmaster.internal/ubuntu noble/universe arm64 ruby-crack all 0.4.4-4 [8764 B] 139s Get:41 http://ftpmaster.internal/ubuntu noble/universe arm64 ruby-hashdiff all 1.1.0-1 [12.9 kB] 139s Get:42 http://ftpmaster.internal/ubuntu noble/universe arm64 ruby-webmock all 3.18.1-2 [47.1 kB] 139s Get:43 http://ftpmaster.internal/ubuntu noble/universe arm64 gem2deb-test-runner arm64 2.2.2 [18.2 kB] 139s Fetched 8555 kB in 1s (6947 kB/s) 139s Selecting previously unselected package rubygems-integration. 139s (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 ... 74220 files and directories currently installed.) 139s Preparing to unpack .../00-rubygems-integration_1.18_all.deb ... 139s Unpacking rubygems-integration (1.18) ... 139s Selecting previously unselected package rake. 139s Preparing to unpack .../01-rake_13.0.6-3_all.deb ... 139s Unpacking rake (13.0.6-3) ... 140s Selecting previously unselected package ruby-net-telnet. 140s Preparing to unpack .../02-ruby-net-telnet_0.2.0-1_all.deb ... 140s Unpacking ruby-net-telnet (0.2.0-1) ... 140s Selecting previously unselected package ruby-webrick. 140s Preparing to unpack .../03-ruby-webrick_1.8.1-1_all.deb ... 140s Unpacking ruby-webrick (1.8.1-1) ... 140s Selecting previously unselected package ruby-xmlrpc. 140s Preparing to unpack .../04-ruby-xmlrpc_0.3.2-2_all.deb ... 140s Unpacking ruby-xmlrpc (0.3.2-2) ... 140s Selecting previously unselected package libruby:arm64. 140s Preparing to unpack .../05-libruby_1%3a3.1+1_arm64.deb ... 140s Unpacking libruby:arm64 (1:3.1+1) ... 140s Selecting previously unselected package ruby-sdbm:arm64. 140s Preparing to unpack .../06-ruby-sdbm_1.0.0-5build3_arm64.deb ... 140s Unpacking ruby-sdbm:arm64 (1.0.0-5build3) ... 140s Selecting previously unselected package libruby3.1:arm64. 140s Preparing to unpack .../07-libruby3.1_3.1.2-7ubuntu4_arm64.deb ... 140s Unpacking libruby3.1:arm64 (3.1.2-7ubuntu4) ... 140s Selecting previously unselected package ruby3.1. 140s Preparing to unpack .../08-ruby3.1_3.1.2-7ubuntu4_arm64.deb ... 140s Unpacking ruby3.1 (3.1.2-7ubuntu4) ... 140s Selecting previously unselected package ruby-rubygems. 140s Preparing to unpack .../09-ruby-rubygems_3.4.20-1_all.deb ... 140s Unpacking ruby-rubygems (3.4.20-1) ... 141s Selecting previously unselected package ruby. 141s Preparing to unpack .../10-ruby_1%3a3.1+1_arm64.deb ... 141s Unpacking ruby (1:3.1+1) ... 141s Selecting previously unselected package ruby-progressbar. 141s Preparing to unpack .../11-ruby-progressbar_1.11.0-1_all.deb ... 141s Unpacking ruby-progressbar (1.11.0-1) ... 141s Selecting previously unselected package ruby-parallel. 141s Preparing to unpack .../12-ruby-parallel_1.22.1-2_all.deb ... 141s Unpacking ruby-parallel (1.22.1-2) ... 141s Selecting previously unselected package ruby-ast. 141s Preparing to unpack .../13-ruby-ast_2.4.2-1_all.deb ... 141s Unpacking ruby-ast (2.4.2-1) ... 141s Selecting previously unselected package ruby-whitequark-parser. 141s Preparing to unpack .../14-ruby-whitequark-parser_3.1.3.0-1_all.deb ... 141s Unpacking ruby-whitequark-parser (3.1.3.0-1) ... 141s Selecting previously unselected package ruby-rainbow. 141s Preparing to unpack .../15-ruby-rainbow_3.1.1-1_all.deb ... 141s Unpacking ruby-rainbow (3.1.1-1) ... 141s Selecting previously unselected package ruby-regexp-parser. 141s Preparing to unpack .../16-ruby-regexp-parser_2.6.1-1_all.deb ... 141s Unpacking ruby-regexp-parser (2.6.1-1) ... 141s Selecting previously unselected package ruby-rubocop-ast. 141s Preparing to unpack .../17-ruby-rubocop-ast_1.24.0-2_all.deb ... 141s Unpacking ruby-rubocop-ast (1.24.0-2) ... 141s Selecting previously unselected package ruby-unicode-display-width. 141s Preparing to unpack .../18-ruby-unicode-display-width_1.6.1-1_all.deb ... 141s Unpacking ruby-unicode-display-width (1.6.1-1) ... 141s Selecting previously unselected package rubocop. 141s Preparing to unpack .../19-rubocop_1.39.0+dfsg-1_all.deb ... 141s Unpacking rubocop (1.39.0+dfsg-1) ... 142s Selecting previously unselected package ruby-coderay. 142s Preparing to unpack .../20-ruby-coderay_1.1.3-8_all.deb ... 142s Unpacking ruby-coderay (1.1.3-8) ... 142s Selecting previously unselected package ruby-method-source. 142s Preparing to unpack .../21-ruby-method-source_1.0.0-2_all.deb ... 142s Unpacking ruby-method-source (1.0.0-2) ... 142s Selecting previously unselected package pry. 142s Preparing to unpack .../22-pry_0.14.2-1_all.deb ... 142s Unpacking pry (0.14.2-1) ... 142s Selecting previously unselected package ruby-rspec-support. 142s Preparing to unpack .../23-ruby-rspec-support_3.12.0c0e1m1s0-1_all.deb ... 142s Unpacking ruby-rspec-support (3.12.0c0e1m1s0-1) ... 142s Selecting previously unselected package ruby-rspec-core. 142s Preparing to unpack .../24-ruby-rspec-core_3.12.0c0e1m1s0-1_all.deb ... 142s Unpacking ruby-rspec-core (3.12.0c0e1m1s0-1) ... 142s Selecting previously unselected package ruby-diff-lcs. 142s Preparing to unpack .../25-ruby-diff-lcs_1.5.0-1_all.deb ... 142s Unpacking ruby-diff-lcs (1.5.0-1) ... 142s Selecting previously unselected package ruby-rspec-expectations. 142s Preparing to unpack .../26-ruby-rspec-expectations_3.12.0c0e1m1s0-1_all.deb ... 142s Unpacking ruby-rspec-expectations (3.12.0c0e1m1s0-1) ... 142s Selecting previously unselected package ruby-rspec-mocks. 142s Preparing to unpack .../27-ruby-rspec-mocks_3.12.0c0e1m1s0-1_all.deb ... 142s Unpacking ruby-rspec-mocks (3.12.0c0e1m1s0-1) ... 142s Selecting previously unselected package ruby-rspec. 142s Preparing to unpack .../28-ruby-rspec_3.12.0c0e1m1s0-1_all.deb ... 142s Unpacking ruby-rspec (3.12.0c0e1m1s0-1) ... 142s Selecting previously unselected package ruby-docile. 142s Preparing to unpack .../29-ruby-docile_1.1.5-2.1_all.deb ... 142s Unpacking ruby-docile (1.1.5-2.1) ... 142s Selecting previously unselected package libjs-jquery. 142s Preparing to unpack .../30-libjs-jquery_3.6.1+dfsg+~3.5.14-1_all.deb ... 142s Unpacking libjs-jquery (3.6.1+dfsg+~3.5.14-1) ... 142s Selecting previously unselected package libjs-jquery-easing. 142s Preparing to unpack .../31-libjs-jquery-easing_12-4_all.deb ... 142s Unpacking libjs-jquery-easing (12-4) ... 142s Selecting previously unselected package libjs-jquery-mousewheel. 142s Preparing to unpack .../32-libjs-jquery-mousewheel_1%3a3.1.13-5_all.deb ... 142s Unpacking libjs-jquery-mousewheel (1:3.1.13-5) ... 142s Selecting previously unselected package libjs-jquery-fancybox. 142s Preparing to unpack .../33-libjs-jquery-fancybox_12-4_all.deb ... 142s Unpacking libjs-jquery-fancybox (12-4) ... 142s Selecting previously unselected package libjs-jquery-ui. 142s Preparing to unpack .../34-libjs-jquery-ui_1.13.2+dfsg-1_all.deb ... 142s Unpacking libjs-jquery-ui (1.13.2+dfsg-1) ... 143s Selecting previously unselected package ruby-simplecov-html. 143s Preparing to unpack .../35-ruby-simplecov-html_0.12.3-2_all.deb ... 143s Unpacking ruby-simplecov-html (0.12.3-2) ... 143s Selecting previously unselected package ruby-simplecov. 143s Preparing to unpack .../36-ruby-simplecov_0.22.0-1_all.deb ... 143s Unpacking ruby-simplecov (0.22.0-1) ... 143s Selecting previously unselected package ruby-public-suffix. 143s Preparing to unpack .../37-ruby-public-suffix_4.0.6+ds-2_all.deb ... 143s Unpacking ruby-public-suffix (4.0.6+ds-2) ... 143s Selecting previously unselected package ruby-addressable. 143s Preparing to unpack .../38-ruby-addressable_2.8.5-1_all.deb ... 143s Unpacking ruby-addressable (2.8.5-1) ... 143s Selecting previously unselected package ruby-crack. 143s Preparing to unpack .../39-ruby-crack_0.4.4-4_all.deb ... 143s Unpacking ruby-crack (0.4.4-4) ... 143s Selecting previously unselected package ruby-hashdiff. 143s Preparing to unpack .../40-ruby-hashdiff_1.1.0-1_all.deb ... 143s Unpacking ruby-hashdiff (1.1.0-1) ... 143s Selecting previously unselected package ruby-webmock. 143s Preparing to unpack .../41-ruby-webmock_3.18.1-2_all.deb ... 143s Unpacking ruby-webmock (3.18.1-2) ... 143s Selecting previously unselected package gem2deb-test-runner. 143s Preparing to unpack .../42-gem2deb-test-runner_2.2.2_arm64.deb ... 143s Unpacking gem2deb-test-runner (2.2.2) ... 143s Setting up ruby-rainbow (3.1.1-1) ... 143s Setting up ruby-regexp-parser (2.6.1-1) ... 143s Setting up ruby-hashdiff (1.1.0-1) ... 143s Setting up ruby-public-suffix (4.0.6+ds-2) ... 143s Setting up libjs-jquery-mousewheel (1:3.1.13-5) ... 143s Setting up rubygems-integration (1.18) ... 143s Setting up ruby-method-source (1.0.0-2) ... 143s Setting up ruby-ast (2.4.2-1) ... 143s Setting up ruby-net-telnet (0.2.0-1) ... 143s Setting up ruby-rspec-support (3.12.0c0e1m1s0-1) ... 143s Setting up ruby-webrick (1.8.1-1) ... 143s Setting up ruby-progressbar (1.11.0-1) ... 143s Setting up libjs-jquery (3.6.1+dfsg+~3.5.14-1) ... 143s Setting up ruby-xmlrpc (0.3.2-2) ... 143s Setting up libjs-jquery-easing (12-4) ... 143s Setting up ruby-addressable (2.8.5-1) ... 143s Setting up libjs-jquery-fancybox (12-4) ... 143s Setting up ruby-parallel (1.22.1-2) ... 143s Setting up libjs-jquery-ui (1.13.2+dfsg-1) ... 143s Setting up rake (13.0.6-3) ... 143s Setting up libruby:arm64 (1:3.1+1) ... 143s Setting up ruby-rubygems (3.4.20-1) ... 143s Setting up ruby-sdbm:arm64 (1.0.0-5build3) ... 143s Setting up libruby3.1:arm64 (3.1.2-7ubuntu4) ... 143s Setting up ruby3.1 (3.1.2-7ubuntu4) ... 143s Setting up ruby (1:3.1+1) ... 143s Setting up ruby-coderay (1.1.3-8) ... 143s Setting up ruby-rspec-core (3.12.0c0e1m1s0-1) ... 143s Setting up ruby-docile (1.1.5-2.1) ... 143s Setting up ruby-unicode-display-width (1.6.1-1) ... 143s Setting up pry (0.14.2-1) ... 143s Setting up ruby-diff-lcs (1.5.0-1) ... 143s Setting up ruby-whitequark-parser (3.1.3.0-1) ... 143s Setting up ruby-simplecov-html (0.12.3-2) ... 143s Setting up ruby-crack (0.4.4-4) ... 143s Setting up gem2deb-test-runner (2.2.2) ... 143s Setting up ruby-rubocop-ast (1.24.0-2) ... 143s Setting up ruby-simplecov (0.22.0-1) ... 143s Setting up ruby-rspec-expectations (3.12.0c0e1m1s0-1) ... 143s Setting up rubocop (1.39.0+dfsg-1) ... 143s Setting up ruby-rspec-mocks (3.12.0c0e1m1s0-1) ... 143s Setting up ruby-webmock (3.18.1-2) ... 143s Setting up ruby-rspec (3.12.0c0e1m1s0-1) ... 143s Setting up autopkgtest-satdep (0) ... 143s Processing triggers for libc-bin (2.39-0ubuntu2) ... 143s Processing triggers for man-db (2.12.0-3) ... 148s (Reading database ... 79754 files and directories currently installed.) 148s Removing autopkgtest-satdep (0) ... 149s autopkgtest [23:47:19]: test gem2deb-test-runner: gem2deb-test-runner --autopkgtest --check-dependencies 2>&1 149s autopkgtest [23:47:19]: test gem2deb-test-runner: [----------------------- 149s 149s ┌──────────────────────────────────────────────────────────────────────────────┐ 149s │ Checking Rubygems dependency resolution on ruby3.1 │ 149s └──────────────────────────────────────────────────────────────────────────────┘ 149s 149s RUBYLIB=. GEM_PATH= ruby3.1 -e gem\ \"rubocop\" 149s mv lib ./.gem2deb.lib 150s mv ./.gem2deb.lib lib 150s 150s ┌──────────────────────────────────────────────────────────────────────────────┐ 150s │ Run tests for ruby3.1 from debian/ruby-tests.rake │ 150s └──────────────────────────────────────────────────────────────────────────────┘ 150s 150s RUBYLIB=. GEM_PATH= ruby3.1 -S rake --rakelibdir /gem2deb-nonexistent -f debian/ruby-tests.rake 150s mv lib ./.gem2deb.lib 150s /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 155s 155s Randomized with seed 16316 155s 155s RuboCop::Cop::Style::ExpandPathArguments 155s registers an offense when using `File.expand_path('.', __FILE__)` 155s registers an offense when using `Pathname.new(__FILE__).parent.expand_path` 155s does not register an offense when using `File.expand_path('..', __dir__)` 155s registers an offense when using `File.expand_path('..', __FILE__)` 155s registers an offense when using `File.expand_path('../../..', __FILE__)` 155s registers an offense when using `File.expand_path('../../lib', __FILE__)` 155s does not register an offense when using `File.expand_path(__FILE__)` 155s does not register an offense when using `File.expand_path("#{path_to_file}.png", __FILE__)` 155s registers an offense when using `File.expand_path('./../..', __FILE__)` 155s does not register an offense when using `File.expand_path(__dir__)` 155s registers an offense when using `File.expand_path('../..', __FILE__)` 155s registers an offense when using `::File.expand_path('./../..', __FILE__)` 155s registers an offense when using `::Pathname.new(__FILE__).parent.expand_path` 155s does not register an offense when using `Pathname(__dir__).expand_path` 155s does not register an offense when using `File.expand_path(path, __FILE__)` 155s registers an offense when using `Pathname(__FILE__).parent.expand_path` 155s 155s RuboCop::Cop::Style::StringChars 155s registers and corrects an offense when using `split("")` 155s registers and corrects an offense when using `split('')` 155s does not register an offense when using `chars` 155s registers and corrects an offense when using `split(//)` 155s registers and corrects an offense when using `split` without parentheses 155s does not register an offense when using `split` 155s does not register an offense when using `split(/ /)` 155s 155s RuboCop::Cop::Style::SingleLineMethods 155s does not crash on an method with a capitalized name 155s autocorrects def with semicolon before end 155s autocorrects def with argument and no parentheses 155s autocorrects def with argument in parentheses 155s registers an offense for a single-line method and method body is enclosed in parentheses 155s autocorrects def with semicolon after method name 155s accepts a multi-line method 155s autocorrects defs with parentheses after method name 155s registers an offense for a single-line method 155s when AllowIfMethodIsEmpty is enabled 155s accepts a single-line empty method 155s when `Style/EndlessMethod` is disabled 155s corrects to an normal method 155s when AllowIfMethodIsEmpty is disabled 155s registers an offense for an empty method 155s when `Style/EndlessMethod` is enabled 155s with `disallow` style 155s corrects to an normal method 155s with `allow_always` style 155s behaves like convert to endless method 155s corrects to an endless method definition 155s handles arguments properly 155s corrects to an endless class method definition when using != 155s corrects to an endless method definition when method body is a literal 155s corrects to a normal method if the method body contains multiple statements 155s corrects to an endless method definition when single line method call with parentheses 155s corrects to an endless class method definition 155s corrects to an endless class method definition when using === 155s corrects to multiline method definition when defining setter method 155s corrects to an endless class method definition when using < 155s does not to an endless class method definition when using `return` 155s corrects to an endless class method definition when using == 155s does not add parens if they are already present 155s corrects to an endless class method definition when using <= 155s retains comments 155s corrects to an endless class method definition when using > 155s does not to an endless class method definition when using `next` 155s does not to an endless class method definition when using `break` 155s corrects to an endless class method definition when using >= 155s corrects to an endless method definition when single line method call without parentheses 155s with AllowIfMethodIsEmpty: false 155s does not turn a method with no body into an endless method 155s with AllowIfMethodIsEmpty: true 155s does not correct 155s prior to ruby 3.0 155s corrects to a multiline method 155s with `allow_single_line` style 155s behaves like convert to endless method 155s retains comments 155s corrects to multiline method definition when defining setter method 155s corrects to a normal method if the method body contains multiple statements 155s corrects to an endless class method definition when using == 155s corrects to an endless class method definition 155s handles arguments properly 155s corrects to an endless class method definition when using < 155s corrects to an endless method definition 155s corrects to an endless class method definition when using === 155s does not to an endless class method definition when using `break` 155s does not add parens if they are already present 155s corrects to an endless class method definition when using <= 155s corrects to an endless method definition when method body is a literal 155s corrects to an endless class method definition when using >= 155s does not to an endless class method definition when using `next` 155s corrects to an endless class method definition when using != 155s does not to an endless class method definition when using `return` 155s corrects to an endless method definition when single line method call with parentheses 155s corrects to an endless method definition when single line method call without parentheses 155s corrects to an endless class method definition when using > 155s with AllowIfMethodIsEmpty: true 155s does not correct 155s with AllowIfMethodIsEmpty: false 155s does not turn a method with no body into an endless method 155s endless methods 155s does not register an offense 155s 155s RuboCop::Cop::Style::TrailingMethodEndStatement 155s register offense with trailing end on 2 line method 155s does not register on single line method 155s register offense with trailing end on method with block 155s does not register on single line no op 155s register offense with trailing end inside class 155s register offense with trailing end on 3 line method 155s autocorrects all trailing ends for larger example 155s register offense with trailing end on method with comment 155s when Ruby 3.0 or higher 155s does not register an offense when endless method definition signature and body are on different lines 155s does not register an offense when using endless method definition 155s 155s RuboCop::Cop::Lint::DuplicateMethods 155s doesn't register offense for non-duplicate class methods in class_eval block 155s registers an offense for duplicate alias in class_eval block 155s does not register an offense for same method name defined in different self methods 155s recognizes difference between instance and class methods in dynamic class 155s doesn't register offense for non-duplicate class methods in class 155s doesn't register an offense for non-duplicate method in dynamic class 155s doesn't register an offense for non-duplicate alias in class 155s doesn't register offense for non-duplicate class methods in dynamic module 155s accepts for attr_reader and setter in class 155s registers an offense for duplicate private methods in class_eval block 155s registers offenses for duplicate assignable attr in dynamic class 155s doesn't register an offense for non-duplicate method in module 155s doesn't register an offense for non-duplicate method in dynamic module 155s doesn't register an offense for non-duplicate method in class 155s registers an offense for duplicate protected methods in class 155s registers 2 offenses for pair of duplicate methods in dynamic module 155s registers an offense for duplicate class methods with named receiver in class 156s accepts for attr_reader and setter in class_eval block 156s only registers an offense for the second instance of a duplicate instance method in separate files 156s understands class << self 156s understands class << A 156s registers an offense when class << exp is used 156s accepts for attr_reader and setter in module 156s registers an offense for duplicate attr_reader in dynamic class 156s registers an offense for duplicate alias_method in class_eval block 156s registers an offense when class << exp is used 156s registers 2 offenses for pair of duplicate methods in class_eval block 156s properly registers and offense when deeply nested 156s registers offenses for duplicate attr_accessor in dynamic module 156s registers an offense for duplicate method in dynamic module 156s registers an offense for duplicate nested method in self method of class 156s registers an offense for duplicate attr in module 156s accepts for attr_reader and setter in dynamic module 156s registers an offense for duplicate attr_reader in module 156s accepts for non-duplicate alias_method in dynamic module 156s understands nested modules 156s registers an offense for duplicate attr_reader in class 156s recognizes difference between instance and class methods in class_eval block 156s registers an offense for duplicate nested method in self method of dynamic class 156s registers an offense for duplicate protected methods in dynamic module 156s understands nested modules 156s does not register for the same method in different scopes within `class << self` 156s registers an offense for a duplicate class method in separate class blocks 156s registers an offense for duplicate attr_writer in class 156s accepts for attr_reader and setter in dynamic class 156s registers an offense for a duplicate instance method in separate module blocks 156s does not register an offense for same method name defined in different methods 156s registers an offense for duplicate private self methods in dynamic class 156s recognizes difference between instance and class methods in class 156s registers an offense for a duplicate class method in separate class_eval block blocks 156s registers an offense for duplicate protected methods in module 156s does not register an offense for same method name defined in different methods 156s registers an offense when class << exp is used 156s ignores method definitions in RSpec `describe` blocks 156s only registers an offense for the second instance of a duplicate instance method in separate files 156s registers an offense for duplicate private methods in module 156s registers an offense for duplicate attr_writer in class_eval block 156s accepts for non-duplicate alias_method in class_eval block 156s registers an offense for duplicate nested method in dynamic class 156s accepts for attr_writer and getter in class_eval block 156s doesn't register an offense for alias for gvar in module 156s registers offenses for duplicate assignable attr in module 156s does not register an offense for same method name defined in different self methods 156s understands class << self 156s doesn't register an offense for alias for gvar in dynamic module 156s registers an offense for duplicate method in module 156s doesn't register an offense for different private methods in class 156s registers an offense for duplicate nested method in class 156s registers offenses for duplicate assignable attr in dynamic module 156s does not register an offense for same method name defined in different methods 156s registers an offense for duplicate nested method in self method of class_eval block 156s registers an offense for duplicate class methods in dynamic module 156s registers an offense for duplicate attr in class 156s registers offenses for duplicate assignable attr in class_eval block 156s does not register an offense for same method name defined in different self methods 156s registers offenses for duplicate assignable attr in class 156s registers an offense for duplicate nested method in self method of dynamic module 156s accepts for attr_writer and getter in class 156s understands nested modules 156s ignores Class.new blocks which are assigned to local variables 156s registers an offense for duplicate attr in class_eval block 156s registers an offense for duplicate protected methods in dynamic class 156s registers an offense for a duplicate class method in separate module blocks 156s doesn't register offense for non-duplicate class methods in dynamic class 156s accepts for attr_writer and getter in dynamic module 156s registers an offense for duplicate method in class_eval block 156s registers an offense for duplicate alias_method in dynamic module 156s registers an offense for duplicate class methods with `<<` and named receiver in module 156s registers offenses for duplicate attr_accessor in class 156s doesn't register offense for non-duplicate class methods in module 156s accepts for attr_writer and getter in dynamic class 156s registers an offense for duplicate private self methods in class 156s registers an offense for duplicate class methods in module 156s registers an offense for duplicate private methods in dynamic class 156s registers an offense for duplicate attr_reader in dynamic module 156s registers an offense for duplicate protected methods in class_eval block 156s registers offenses for duplicate attr_accessor in dynamic class 156s understands nested modules 156s accepts for non-duplicate alias_method in module 156s registers an offense for duplicate class methods with `<<` and named receiver in class 156s registers an offense for duplicate method in dynamic class 156s registers an offense for duplicate attr_writer in dynamic module 156s registers an offense for duplicate method in class 156s registers an offense for a duplicate instance method in separate dynamic class blocks 156s doesn't register an offense for non-duplicate alias in dynamic module 156s registers offenses for duplicate attr_accessor in class_eval block 156s does not register an offense for same method name defined in different methods 156s doesn't register an offense for non-duplicate alias in module 156s registers an offense for duplicate private self methods in class_eval block 156s registers an offense for duplicate attr in dynamic module 156s registers an offense for duplicate attr_writer in module 156s registers 2 offenses for pair of duplicate methods in dynamic class 156s registers an offense for a duplicate class method in separate dynamic module blocks 156s registers an offense for duplicate class methods in class 156s registers an offense for duplicate nested method in self method of module 156s registers an offense for duplicate attr_reader in class_eval block 156s doesn't register an offense for alias for gvar in class 156s registers an offense for duplicate nested method in class_eval block 156s recognizes difference between instance and class methods in module 156s doesn't register an offense for different private methods in module 156s registers an offense for duplicate class methods with `self` and named receiver in class 156s registers an offense for duplicate class methods with `self` and named receiver in module 156s registers an offense for duplicate attr in dynamic class 156s recognizes difference between instance and class methods in dynamic module 156s registers an offense for duplicate alias_method in module 156s understands class << self 156s does not register an offense for same method name defined in different methods 156s accepts for non-duplicate alias_method in dynamic class 156s only registers an offense for the second instance of a duplicate instance method in separate files 156s registers an offense for duplicate class methods in dynamic class 156s registers an offense for duplicate attr_writer in dynamic class 156s registers an offense for duplicate private methods in dynamic module 156s doesn't register an offense for non-duplicate alias in class_eval block 156s registers an offense for duplicate alias in dynamic class 156s registers an offense when class << exp is used 156s registers 2 offenses for pair of duplicate methods in module 156s registers an offense for duplicate class methods with named receiver in module 156s only registers an offense for the second instance of a duplicate instance method in separate files 156s registers an offense for a duplicate instance method in separate class blocks 156s handles class_eval with implicit receiver 156s registers an offense for a duplicate instance method in separate dynamic module blocks 156s registers an offense for duplicate alias in dynamic module 156s registers 2 offenses for pair of duplicate methods in class 156s registers an offense when class << exp is used 156s doesn't register an offense for different private methods in dynamic module 156s doesn't register an offense for alias for gvar in dynamic class 156s registers an offense for duplicate class methods in class_eval block 156s registers an offense for duplicate methods at top level 156s registers an offense for duplicate alias_method in class 156s registers an offense for duplicate nested method in dynamic module 156s registers an offense for duplicate alias in module 156s doesn't register an offense for different private methods in class_eval block 156s registers an offense for duplicate private methods in class 156s doesn't register an offense for non-duplicate method in class_eval block 156s accepts for attr_writer and getter in module 156s registers offenses for duplicate attr_accessor in module 156s doesn't register an offense for alias for gvar in class_eval block 156s registers an offense for duplicate alias in class 156s registers an offense for duplicate private self methods in module 156s registers an offense for duplicate alias_method in dynamic class 156s registers an offense for duplicate private self methods in dynamic module 156s only registers an offense for the second instance of a duplicate instance method in separate files 156s accepts for non-duplicate alias_method in class 156s does not register an offense for same method name defined in different self methods 156s understands class << self 156s registers an offense for a duplicate instance method in separate class_eval block blocks 156s understands class << self 156s registers an offense for duplicate nested method in module 156s doesn't register an offense for non-duplicate alias in dynamic class 156s registers an offense for a duplicate class method in separate dynamic class blocks 156s doesn't register an offense for different private methods in dynamic class 156s does not register an offense for same method name defined in different self methods 156s understands nested modules 156s when path is in the project root 156s adds a message with relative path 156s when path is not in the project root 156s adds a message with absolute path 156s 156s RuboCop::Formatter::FormatterSet 156s responds to all formatter API methods 156s #custom_formatter_class 156s can handle namespaced constant name 156s can handle top level namespaced constant name 156s returns constant represented by the passed string 156s when non-existent constant name is passed 156s raises error 156s add_formatter 156s adds a formatter with specified formatter type 156s adds a formatter to itself 156s can add multiple formatters by being invoked multiple times 156s when output path is omitted 156s adds a formatter outputs to $stdout 156s when output path is specified 156s adds a formatter outputs to the specified file 156s when parent directories don't exist 156s creates them 156s #close_output_files 156s does not close non file output 156s closes all output files 156s formatter API method 156s invokes the same method of all containing formatters 156s #builtin_formatter_class 156s returns class which matches double character alias name 156s returns class which matches passed alias name exactly 156s returns class which matches single character alias name 156s 156s RuboCop::ResultCache 156s #save 156s when the default internal encoding is UTF-8 156s writes non UTF-8 encodable data to file with no exception 156s when the @path is not writable 156s behaves like invalid cache location 156s doesn't raise an exception 156s behaves like invalid cache location 156s doesn't raise an exception 156s cached result that was saved with no command line option 156s when --display-cop-names is given 156s is invalid 156s when --cache-root is given 156s takes the cache_root from the options 156s when --format is given 156s is valid and can be loaded 156s when offenses are saved 156s an offense with status unsupported 156s serializes them with unsupported status 156s an offense with status corrected 156s serializes them with uncorrected status 156s an offense with status uncorrected 156s serializes them with uncorrected status 156s an offense with status new_status 156s serializes them with new_status status 156s an offense with status corrected_with_todo 156s serializes them with uncorrected status 156s when no option is given 156s is valid and can be loaded 156s when file permission have changed 156s is invalid 156s when end of line characters have changed 156s is invalid 156s when team external_dependency_checksum is the same 156s is valid 156s when file contents have changed 156s is invalid 156s when team external_dependency_checksum changes 156s is invalid 156s when a symlink is present in the cache location 156s and symlink attack protection is enabled 156s prevents caching and prints a warning 156s and symlink attack protection is disabled 156s permits caching and prints no warning 156s when a cache source is read 156s has utf8 encoding 156s when --only is given 156s is invalid 156s the cache path 156s when CacheRootDirectory is set 156s contains the given root 156s and RUBOCOP_CACHE_ROOT is set 156s contains the root from RUBOCOP_CACHE_ROOT 156s when CacheRootDirectory not set 156s and XDG_CACHE_HOME is not set 156s contains $HOME/.cache 156s and XDG_CACHE_HOME is set 156s contains the given path and UID 156s .cleanup 156s removes the oldest files in the cache if needed 156s 156s RuboCop::Cop::Naming::BlockParameterName 156s registers offense when param ends in number 156s registers offense when param contains uppercase characters 156s registers offense when param is less than minimum length 156s does not register offense for valid parameter names 156s registers offense when param with prefix is less than minimum length 156s can register multiple offenses in one block 156s does not register for block without parameters 156s does not register for brace block without parameters 156s with AllowedNames 156s registers unlisted offensive names 156s accepts specified block param names 156s with AllowNamesEndingInNumbers 156s accept params that end in numbers 156s with ForbiddenNames 156s accepts param that uses a forbidden name's letters 156s registers offense for param listed as forbidden 156s 156s RuboCop::Cop::Layout::LineContinuationSpacing 156s EnforcedStyle: space 156s registers an offense when too much space in front of backslash 156s ignores when too much space in front of backslash after `__END__` 156s marks the offense correctly when offense is not in first line 156s registers no offense with one space in front of backslash 156s ignores heredocs and comments 156s ignores empty code 156s registers an offense when no space in front of backslash 156s EnforcedStyle: no_space 156s ignores when too much space in front of backslash after `__END__` 156s registers no offense with zero spaces in front of backslash 156s registers an offense when many spaces in front of backslash 156s ignores empty code 156s registers an offense when one space in front of backslash 156s marks the offense correctly when offense is not in first line 156s ignores heredocs and comments 156s 156s RuboCop::Formatter::SimpleTextFormatter 156s #report_summary 156s when no files inspected 156s handles pluralization correctly 156s when 2 offenses detected 156s handles pluralization correctly 156s when 2 offenses are corrected and 2 offenses autocorrectable 156s handles pluralization correctly 156s when a file inspected and no offenses detected 156s handles pluralization correctly 156s when 2 offenses are corrected 156s handles pluralization correctly 156s when a offense detected and a offense autocorrectable 156s handles pluralization correctly 156s when an offense is corrected 156s prints about correction 156s when 2 offenses detected and 2 offenses autocorrectable 156s handles pluralization correctly 156s when a offense detected 156s handles pluralization correctly 156s #report_file 156s behaves like report for severity 156s when the offense is marked as todo 156s prints [Todo] along with message 156s the file is under the current working directory 156s prints as relative path 156s when the offense is correctable 156s prints message as-is 156s when the offense is automatically corrected 156s prints [Corrected] along with message 156s when the offense is not corrected 156s prints message as-is 156s the file is outside of the current working directory 156s prints as absolute path 156s behaves like report for severity 156s the file is under the current working directory 156s prints as relative path 156s when the offense is marked as todo 156s prints [Todo] along with message 156s when the offense is not corrected 156s prints message as-is 156s the file is outside of the current working directory 156s prints as absolute path 156s when the offense is automatically corrected 156s prints [Corrected] along with message 156s when the offense is correctable 156s prints message as-is 156s behaves like report for severity 156s the file is under the current working directory 156s prints as relative path 156s when the offense is automatically corrected 156s prints [Corrected] along with message 156s when the offense is not corrected 156s prints message as-is 156s the file is outside of the current working directory 156s prints as absolute path 156s when the offense is correctable 156s prints message as-is 156s when the offense is marked as todo 156s prints [Todo] along with message 156s behaves like report for severity 156s the file is outside of the current working directory 156s prints as absolute path 156s when the offense is correctable 156s prints message as-is 156s when the offense is marked as todo 156s prints [Todo] along with message 156s the file is under the current working directory 156s prints as relative path 156s when the offense is automatically corrected 156s prints [Corrected] along with message 156s when the offense is not corrected 156s prints message as-is 156s behaves like report for severity 156s the file is under the current working directory 156s prints as relative path 156s the file is outside of the current working directory 156s prints as absolute path 156s when the offense is not corrected 156s prints message as-is 156s when the offense is marked as todo 156s prints [Todo] along with message 156s when the offense is correctable 156s prints message as-is 156s when the offense is automatically corrected 156s prints [Corrected] along with message 156s behaves like report for severity 156s when the offense is correctable 156s prints message as-is 156s the file is outside of the current working directory 156s prints as absolute path 156s when the offense is automatically corrected 156s prints [Corrected] along with message 156s when the offense is marked as todo 156s prints [Todo] along with message 156s when the offense is not corrected 156s prints message as-is 156s the file is under the current working directory 156s prints as relative path 156s 156s RuboCop::Cop::Layout::HeredocIndentation 156s quoted by ' 156s accepts for indented, with `~` 156s accepts for indented, but without `~` 156s registers an offense for first line minus-level indented, with `-` 156s accepts for not indented but with whitespace 156s accepts for an empty line 156s registers an offense for too deep indented 156s registers an offense for not indented 156s accepts for include empty lines 156s registers an offense for minus level indented 156s registers an offense for too deep indented with empty line 156s displays message to use `<<~` instead of `<<-` 156s registers an offense for not indented, with `~` 156s registers an offense for not indented enough with whitespace line 156s displays message to use `<<~` instead of `<<` 156s registers an offense for too deep indented with whitespace line 156s does not register an offense when not indented but with whitespace, with `-` 156s registers an offense for not indented enough with empty line 156s accepts for indented, but with `-` 156s registers an offense for not indented, without `~` 156s when Layout/LineLength is configured 156s accepts for long heredoc 156s quoted by " 156s registers an offense for not indented, with `~` 156s accepts for an empty line 156s accepts for not indented but with whitespace 156s does not register an offense when not indented but with whitespace, with `-` 156s displays message to use `<<~` instead of `<<` 156s registers an offense for not indented enough with empty line 156s registers an offense for too deep indented with whitespace line 156s accepts for indented, but with `-` 156s accepts for indented, with `~` 156s accepts for include empty lines 156s accepts for indented, but without `~` 156s registers an offense for not indented 156s displays message to use `<<~` instead of `<<-` 156s registers an offense for too deep indented 156s registers an offense for first line minus-level indented, with `-` 156s registers an offense for too deep indented with empty line 156s registers an offense for minus level indented 156s registers an offense for not indented enough with whitespace line 156s registers an offense for not indented, without `~` 156s when Layout/LineLength is configured 156s accepts for long heredoc 156s quoted by 156s accepts for indented, but without `~` 156s registers an offense for not indented 156s registers an offense for not indented enough with whitespace line 156s accepts for not indented but with whitespace 156s registers an offense for minus level indented 156s registers an offense for too deep indented with whitespace line 156s registers an offense for not indented, without `~` 156s registers an offense for first line minus-level indented, with `-` 156s displays message to use `<<~` instead of `<<` 156s accepts for an empty line 156s does not register an offense when not indented but with whitespace, with `-` 156s displays message to use `<<~` instead of `<<-` 156s accepts for include empty lines 156s accepts for indented, but with `-` 156s registers an offense for too deep indented with empty line 156s accepts for indented, with `~` 156s registers an offense for too deep indented 156s registers an offense for not indented enough with empty line 156s registers an offense for not indented, with `~` 156s when Layout/LineLength is configured 156s accepts for long heredoc 156s quoted by ` 156s displays message to use `<<~` instead of `<<-` 156s does not register an offense when not indented but with whitespace, with `-` 156s accepts for include empty lines 156s displays message to use `<<~` instead of `<<` 156s registers an offense for too deep indented 156s registers an offense for first line minus-level indented, with `-` 156s accepts for indented, but without `~` 157s accepts for indented, with `~` 157s registers an offense for not indented, with `~` 157s registers an offense for not indented enough with empty line 157s registers an offense for not indented, without `~` 157s registers an offense for not indented 157s accepts for an empty line 157s registers an offense for minus level indented 157s registers an offense for not indented enough with whitespace line 157s registers an offense for too deep indented with empty line 157s accepts for indented, but with `-` 157s registers an offense for too deep indented with whitespace line 157s accepts for not indented but with whitespace 157s when Layout/LineLength is configured 157s accepts for long heredoc 157s 157s RuboCop::Cop::Lint::DuplicateElsifCondition 157s does not register an offense for partially repeated elsif conditions 157s does not register an offense for non-repeated elsif conditions 157s registers multiple offenses for multiple repeated elsif conditions 157s registers an offense for repeated elsif conditions 157s registers an offense for subsequent repeated elsif conditions 157s 157s RuboCop::Cop::Style::MultilineWhenThen 157s doesn't register an offense when `then` required for a body of `when` is used 157s doesn't register an offense for multiline when statementwith then followed by other lines 157s does not register an offense when line break for multiple candidate values of `when` 157s does not register an offense for array when statement with then 157s doesn't register an offense for multiline when statement without then 157s autocorrects when the body of `when` branch starts with `then` 157s doesn't register an offense for empty when statement without then 157s doesn't register an offense for singleline when statement with then 157s registers an offense for empty when statement with then 157s registers an offense for multiline (one line in a body) when statement with then 157s registers an offense when one line for multiple candidate values of `when` 157s does not register an offense for hash when statement with then 157s registers an offense for multiline (two lines in a body) when statement with then 157s 157s RuboCop::Formatter::DisabledConfigFormatter 157s when exclude_limit option is passed 157s respects the file exclusion list limit 157s when exclude_limit option is omitted 157s disables the cop with 15 offending files 157s when any offenses are detected 157s displays YAML configuration disabling all cops with offenses 157s when there's .rubocop.yml 157s merges in excludes from .rubocop.yml 157s when no files are inspected 157s creates a .rubocop_todo.yml even in such case 157s with autocorrect supported cop 157s adds a comment about --autocorrect option 157s 157s RuboCop::Cop::Style::UnpackFirst 157s ruby version >= 2.4 157s does not register offense 157s when using `#unpack` accessing second element 157s when using `#unpack1` 157s registers offense 157s when using `#unpack` with dot and square brackets 157s when using `#unpack` with `#slice` 157s when using `#unpack` with `#at` 157s when using `#unpack` with square brackets 157s when using `#unpack` with `#first` 157s 157s RuboCop::Cop::Layout::SpaceBeforeComma 157s does not register an offense for no spaces before comma 157s handles more than one space before a comma 157s registers an offense and corrects array index with space before comma 157s registers an offense and corrects block argument with space before comma 157s registers an offense and corrects method call arg with space before comma 157s heredocs 157s registers an offense and corrects 157s 157s RuboCop::Cop::Style::Alias 157s when EnforcedStyle is prefer_alias_method 157s registers an offense for alias with bareword args 157s does not register an offense for alias_method 157s registers an offense for alias with symbol args 157s does not register an offense for alias with gvars 157s does not register an offense for alias in an instance_eval block 157s when EnforcedStyle is prefer_alias 157s does not register an offense for alias_method with non-literal method call argument 157s does not register an offense for alias_method in self.method def 157s does not register an offense for alias in an instance_eval block 157s registers an offense for alias_method in a class block 157s does not register an offense for alias with bareword args 157s does not register an offense for alias_method with explicit receiver 157s registers an offense for alias_method in a module block 157s does not register an offense for alias_method in a method def 157s does not register an offense for alias_method with non-literal constant argument 157s does not register an offense for alias_method in a block 157s registers an offense for alias_method at the top level 157s registers an offense for alias with symbol args 157s 157s RuboCop::Cop::Style::RedundantInitialize 157s does not register an offense for an `initialize` method that calls `super` with a different argument list 157s does not register an offense for an `initialize` method that calls `super` with no arguments 157s registers an offense for an `initialize` method with a default argument that does nothing 157s does not register an offense for an `initialize` method that calls another method after `super` 157s does not register an offense for an `initialize` method that calls another method 157s registers and corrects an offense for an `initialize` method with no arguments that calls `super` with no arguments 157s does not register an offense for an `initialize` method with a default keyword argument that calls `super` 157s does not register an offense for a method not named `initialize` that only calls super 157s registers and corrects an offense for an `initialize` method that only calls `super` 157s registers an offense for an `initialize` method with a default keyword argument that does nothing 157s does not register an offense for an empty method not named `initialize` 157s registers and corrects an offense for an empty `initialize` method 157s registers and corrects an offense for an `initialize` method with arguments that only calls `super` 157s does not register an offense for an empty `initialize` method with a splat` and super 157s does not register an offense for an empty `initialize` method with a splat` 157s does not register an offense for an `initialize` method with a default argument that calls `super` 157s does not register an offense for an `initialize` method that calls another method before `super` 157s does not register an offense for an empty `initialize` method with a kwsplat` 157s registers and corrects an offense for an `initialize` method with arguments that only calls `super` with explicit args 157s does not register an offense for an `initialize` method with only a comment 157s does not register an offense for an empty `initialize` method with a argument forwarding` 157s when `AllowComments: false` 157s registers and corrects an offense for an `initialize` method with only a comment 157s 157s RuboCop::Cop::Style::SafeNavigation 157s allows a method chain that is used in a comparison safe guarded by an object check 157s allows an object check before a method chain that is used in a comparison 157s allows an object check before a long chain with a block 157s allows an object check before a method call that is used in a spaceship comparison 157s allows calls on nil 157s allows an object check before a nil check on a long chain 157s allows an object check before a negated predicate 157s allows a method call as a parameter when the parameter is safe guarded with an object check 157s allows an object check before a method call that is used in a comparison 157s allows chained method calls during assignment safe guardedby an object check 157s allows method call that is used in a comparison safe guarded by an object check 157s allows an object check before a method chain longer than 2 methods 157s allows calls to methods not safeguarded by respond_to 157s allows an object check before a method call that is used in a negated regex comparison 157s allows calls using safe navigation 157s allows method call that is used in a spaceship comparison safe guarded by an object check 157s allows an object check before a blank check 157s allows an object check before a method call that is used in a regex comparison 157s allows an object check before a negated predicate method chain 157s allows a method call safeguarded when using `unless nil?` 157s allows method call that is used in a negated regex comparison safe guarded by an object check 157s allows an object check before a nil check on a short chain 157s allows object checks in the condition of an elsif statement and a method call on that object in the body 157s allows for empty if blocks with comments 157s allows method call that is used in a regex comparison safe guarded by an object check 157s allows a method call safeguarded with a negative check for the object when using `if` 157s allows method calls that do not get called using . safe guarded by an object check 157s allows an object check before a negated method call with a safe navigation 157s allows an object check before a method call that is used with `empty?` 157s allows an object check before hash access 157s allows a method call safeguarded with a negative check for the object when using `unless` 157s allows chained method calls during arithmetic operations safe guarded by an object check 157s does not move comments that are inside an inner block 157s behaves like all variable types 157s object check before method call 157s allows a nil object check followed by a method call with params and a block 157s allows a non object check followed by a method call with params 157s allows a non object check followed by a method call 157s allows a non object check followed by a method call with a block 157s allows a nil object check followed by a method call 157s allows a nil object check followed by a method call with a block 157s allows a non object check followed by a method call with params and a block 157s allows a nil object check followed by a method call with params 157s ConvertCodeThatCanStartToReturnNil false 157s allows a non-nil object check followed by a method call with params 157s registers an offense for an object check followed by a method calls that nil responds to 157s registers an offense for a check for the object followed by a method call in the condition for an if expression 157s registers an offense for an object check followed by a method call with params 157s allows a non-nil object check followed by a method call 157s allows a non-nil object check followed by a method call with a block 157s registers an offense for an object check followed by a method call with a block 157s registers an offense for an object check followed by a method call with params and a block 157s allows a non-nil object check followed by a method call with params and a block 157s registers an offense for an object check followed by a method call 157s method chaining 157s corrects an object check followed by a chained method call with params 157s corrects an object check followed by a chained method call 157s corrects an object check followed by a chained method call with a block 157s corrects an object check followed by a chained method call with a symbol proc 157s ConvertCodeThatCanStartToReturnNil true 157s registers an offense for an object check followed by a method call with a block 157s registers an offense for an object check followed by a method call with params and a block 157s registers an offense for a non-nil object check followed by a method call 157s registers an offense for a check for the object followed by a method call in the condition for an if expression 157s registers an offense for a non-nil object check followed by a method call with params and a block 157s registers an offense for an object check followed by a method call 157s registers an offense for an object check followed by a method call with params 157s corrects an object check followed by a method call and another check 157s registers an offense for a non-nil object check followed by a method call with params 157s registers an offense for a non-nil object check followed by a method call with a block 157s method chaining 157s registers an offense for an object check followed by chained method calls with blocks 157s with Lint/SafeNavigationChain disabled 157s allows an object check followed by chained method calls 157s allows an object check followed by chained method calls with blocks 157s MaxChainLength: 3 157s registers an offense for an object check followed by 3 chained method calls 157s allows an object check followed by 4 chained method calls 157s MaxChainLength: 1 157s allows an object check followed by 2 chained method calls 157s registers an offense for an object check followed by 1 chained method calls 157s if expression 157s allows a single method call inside of a check for the object with an else 157s registers an offense for a single method call with params inside of an unless negative check for the object 157s registers an offense for a single method call with params inside of a check for the object 157s registers an offense for a single method call inside of a check for the object 157s registers an offense for a single method call with a block inside of an unless negative check for the object 157s registers an offense for a single method call with a block inside of a check for the object 157s registers an offense for a single method call with params inside of a non-nil check for the object 157s registers an offense for a single method call with params and a block inside of an unless negative check for the object 157s registers an offense for a single method call with params inside of an unless nil check for the object 157s registers an offense for a single method call with params and a block inside of a non-nil check for the object 157s does not lose comments within if expression 157s registers an offense for a single method call inside of a non-nil check for the object 157s registers an offense for a single method call with a block inside of an unless nil check for the object 157s registers an offense for a single method call with a block inside of a non-nil check for the object 157s registers an offense for a single method call inside of an unless negative check for the object 157s registers an offense for a single method call with params and a block inside of an unless nil check for the object 157s registers an offense for a single method call inside of an unless nil check for the object 157s registers an offense for a single method call with params and a block inside of a check for the object 157s only moves comments that fall within the expression 157s ternary expression 157s allows ternary expression 157s modifier if 157s registers an offense for a method call that nil responds to safe guarded by an object check 157s registers an offense for a method call with params and a block safeguarded with a negative nil check for the object 157s registers an offense for a chained method call safeguarded with an unless nil check for the object 157s registers an offense for a method call safeguarded with a negative nil check for the object 157s registers an offense for a method call with params safeguarded with a nil check for the object 157s registers an offense for a method call with a block safeguarded with a negative check for the object 157s registers an offense for a method call with params and a block safeguarded with a negative check for the object 157s registers an offense for a method call with a block safeguarded with a check for the object 157s registers an offense when safe guard check and safe navigation method call are connected with `&&` condition 157s registers an offense for a method call with a block safeguarded with a negative nil check for the object 157s registers an offense for a chained method call safeguarded with a negative nil check for the object 157s registers an offense for an object check followed by a method call with a comment at EOL 157s registers an offense for a method call with params safeguarded with a check for the object 157s registers an offense for a method call safeguarded with a negative check for the object 157s registers an offense for a method call safeguarded with a check for the object 157s registers an offense for a method call with params safeguarded with a negative nil check for the object 157s registers an offense for a method call with params safeguarded with a negative check for the object 157s registers an offense for a chained method call safeguarded with a check for the object 157s registers an offense for a method call on an accessor safeguarded by a check for the accessed variable 157s registers an offense for a method call with params and a block safeguarded with a check for the object 157s registers an offense for a method call safeguarded with a nil check for the object 157s registers an offense for a method call with params and a block safeguarded with a nil check for the object 157s registers an offense for a method call with a block safeguarded with a nil check for the object 157s behaves like safe guarding logical break keywords 157s allows a method call being passed to yield safe guarded by an object check 157s behaves like safe guarding logical break keywords 157s allows a method call being passed to throw safe guarded by an object check 157s behaves like safe guarding logical break keywords 157s allows a method call being passed to return safe guarded by an object check 157s behaves like safe guarding logical break keywords 157s allows a method call being passed to raise safe guarded by an object check 157s behaves like safe guarding logical break keywords 157s allows a method call being passed to fail safe guarded by an object check 157s behaves like safe guarding logical break keywords 157s allows a method call being passed to break safe guarded by an object check 157s behaves like safe guarding logical break keywords 157s allows a method call being passed to next safe guarded by an object check 157s behaves like all variable types 157s modifier if 157s registers an offense for a method call safeguarded with a negative nil check for the object 157s registers an offense for a method call on an accessor safeguarded by a check for the accessed variable 157s registers an offense for a method call with a block safeguarded with a negative nil check for the object 157s registers an offense for a method call with a block safeguarded with a nil check for the object 157s registers an offense for a method call with params safeguarded with a negative nil check for the object 157s registers an offense for a method call with params and a block safeguarded with a nil check for the object 157s registers an offense for a method call with params and a block safeguarded with a negative nil check for the object 157s registers an offense for a method call with params safeguarded with a nil check for the object 157s registers an offense for a method call with params safeguarded with a negative check for the object 157s registers an offense for a method call with params and a block safeguarded with a negative check for the object 157s registers an offense for a method call with params and a block safeguarded with a check for the object 157s registers an offense for a chained method call safeguarded with an unless nil check for the object 157s registers an offense for a method call with params safeguarded with a check for the object 157s registers an offense for a method call safeguarded with a negative check for the object 157s registers an offense for a method call safeguarded with a nil check for the object 157s registers an offense for an object check followed by a method call with a comment at EOL 157s registers an offense for a method call with a block safeguarded with a negative check for the object 157s registers an offense for a method call that nil responds to safe guarded by an object check 157s registers an offense for a method call safeguarded with a check for the object 157s registers an offense when safe guard check and safe navigation method call are connected with `&&` condition 157s registers an offense for a method call with a block safeguarded with a check for the object 157s registers an offense for a chained method call safeguarded with a negative nil check for the object 157s registers an offense for a chained method call safeguarded with a check for the object 157s behaves like safe guarding logical break keywords 157s allows a method call being passed to next safe guarded by an object check 157s behaves like safe guarding logical break keywords 157s allows a method call being passed to fail safe guarded by an object check 157s behaves like safe guarding logical break keywords 157s allows a method call being passed to return safe guarded by an object check 157s behaves like safe guarding logical break keywords 157s allows a method call being passed to yield safe guarded by an object check 157s behaves like safe guarding logical break keywords 157s allows a method call being passed to break safe guarded by an object check 157s behaves like safe guarding logical break keywords 157s allows a method call being passed to throw safe guarded by an object check 157s behaves like safe guarding logical break keywords 157s allows a method call being passed to raise safe guarded by an object check 157s object check before method call 157s allows a non object check followed by a method call with params 157s allows a nil object check followed by a method call with params 157s allows a nil object check followed by a method call with a block 157s allows a nil object check followed by a method call 157s allows a non object check followed by a method call 157s allows a nil object check followed by a method call with params and a block 157s allows a non object check followed by a method call with a block 157s allows a non object check followed by a method call with params and a block 157s ConvertCodeThatCanStartToReturnNil false 157s allows a non-nil object check followed by a method call with a block 157s registers an offense for an object check followed by a method calls that nil responds to 157s registers an offense for an object check followed by a method call 157s registers an offense for an object check followed by a method call with params and a block 157s registers an offense for a check for the object followed by a method call in the condition for an if expression 157s registers an offense for an object check followed by a method call with a block 157s allows a non-nil object check followed by a method call with params 157s allows a non-nil object check followed by a method call 157s registers an offense for an object check followed by a method call with params 157s allows a non-nil object check followed by a method call with params and a block 157s method chaining 157s corrects an object check followed by a chained method call 157s corrects an object check followed by a chained method call with params 157s corrects an object check followed by a chained method call with a symbol proc 157s corrects an object check followed by a chained method call with a block 157s ConvertCodeThatCanStartToReturnNil true 157s registers an offense for a non-nil object check followed by a method call with params and a block 157s registers an offense for a check for the object followed by a method call in the condition for an if expression 157s registers an offense for an object check followed by a method call with params 157s registers an offense for an object check followed by a method call with a block 157s registers an offense for an object check followed by a method call with params and a block 157s registers an offense for a non-nil object check followed by a method call with a block 157s registers an offense for an object check followed by a method call 157s registers an offense for a non-nil object check followed by a method call 157s corrects an object check followed by a method call and another check 157s registers an offense for a non-nil object check followed by a method call with params 157s method chaining 157s registers an offense for an object check followed by chained method calls with blocks 157s with Lint/SafeNavigationChain disabled 157s allows an object check followed by chained method calls with blocks 157s allows an object check followed by chained method calls 157s MaxChainLength: 3 157s allows an object check followed by 4 chained method calls 157s registers an offense for an object check followed by 3 chained method calls 157s MaxChainLength: 1 157s registers an offense for an object check followed by 1 chained method calls 157s allows an object check followed by 2 chained method calls 157s if expression 157s registers an offense for a single method call inside of a non-nil check for the object 157s registers an offense for a single method call with params inside of an unless negative check for the object 157s registers an offense for a single method call with a block inside of an unless nil check for the object 157s registers an offense for a single method call with params and a block inside of an unless negative check for the object 157s registers an offense for a single method call inside of an unless nil check for the object 157s only moves comments that fall within the expression 157s registers an offense for a single method call with a block inside of a check for the object 157s does not lose comments within if expression 157s registers an offense for a single method call with params and a block inside of a check for the object 157s registers an offense for a single method call with params and a block inside of an unless nil check for the object 157s registers an offense for a single method call with a block inside of an unless negative check for the object 157s registers an offense for a single method call with params and a block inside of a non-nil check for the object 157s registers an offense for a single method call with a block inside of a non-nil check for the object 157s allows a single method call inside of a check for the object with an else 157s registers an offense for a single method call with params inside of a non-nil check for the object 157s registers an offense for a single method call inside of a check for the object 157s registers an offense for a single method call inside of an unless negative check for the object 157s registers an offense for a single method call with params inside of a check for the object 157s registers an offense for a single method call with params inside of an unless nil check for the object 157s ternary expression 157s allows ternary expression 157s behaves like all variable types 157s modifier if 157s registers an offense for a method call with a block safeguarded with a negative check for the object 157s registers an offense when safe guard check and safe navigation method call are connected with `&&` condition 157s registers an offense for a chained method call safeguarded with an unless nil check for the object 157s registers an offense for a method call with params and a block safeguarded with a check for the object 157s registers an offense for a method call with a block safeguarded with a check for the object 158s registers an offense for an object check followed by a method call with a comment at EOL 158s registers an offense for a method call with a block safeguarded with a nil check for the object 158s registers an offense for a chained method call safeguarded with a check for the object 158s registers an offense for a method call with params safeguarded with a negative nil check for the object 158s registers an offense for a method call safeguarded with a check for the object 158s registers an offense for a method call that nil responds to safe guarded by an object check 158s registers an offense for a method call with a block safeguarded with a negative nil check for the object 158s registers an offense for a method call safeguarded with a negative nil check for the object 158s registers an offense for a method call safeguarded with a nil check for the object 158s registers an offense for a method call with params safeguarded with a negative check for the object 158s registers an offense for a method call with params and a block safeguarded with a negative check for the object 158s registers an offense for a method call with params safeguarded with a check for the object 158s registers an offense for a method call with params and a block safeguarded with a negative nil check for the object 158s registers an offense for a method call safeguarded with a negative check for the object 158s registers an offense for a chained method call safeguarded with a negative nil check for the object 158s registers an offense for a method call with params and a block safeguarded with a nil check for the object 158s registers an offense for a method call on an accessor safeguarded by a check for the accessed variable 158s registers an offense for a method call with params safeguarded with a nil check for the object 158s behaves like safe guarding logical break keywords 158s allows a method call being passed to throw safe guarded by an object check 158s behaves like safe guarding logical break keywords 158s allows a method call being passed to raise safe guarded by an object check 158s behaves like safe guarding logical break keywords 158s allows a method call being passed to next safe guarded by an object check 158s behaves like safe guarding logical break keywords 158s allows a method call being passed to fail safe guarded by an object check 158s behaves like safe guarding logical break keywords 158s allows a method call being passed to yield safe guarded by an object check 158s behaves like safe guarding logical break keywords 158s allows a method call being passed to break safe guarded by an object check 158s behaves like safe guarding logical break keywords 158s allows a method call being passed to return safe guarded by an object check 158s if expression 158s registers an offense for a single method call with params inside of a check for the object 158s registers an offense for a single method call with params inside of an unless nil check for the object 158s registers an offense for a single method call with params inside of an unless negative check for the object 158s registers an offense for a single method call with a block inside of an unless nil check for the object 158s does not lose comments within if expression 158s registers an offense for a single method call with a block inside of a non-nil check for the object 158s registers an offense for a single method call with a block inside of an unless negative check for the object 158s only moves comments that fall within the expression 158s registers an offense for a single method call with params and a block inside of an unless negative check for the object 158s registers an offense for a single method call inside of an unless nil check for the object 158s registers an offense for a single method call with params and a block inside of a non-nil check for the object 158s registers an offense for a single method call with params and a block inside of a check for the object 158s allows a single method call inside of a check for the object with an else 158s registers an offense for a single method call inside of a check for the object 158s registers an offense for a single method call inside of a non-nil check for the object 158s registers an offense for a single method call inside of an unless negative check for the object 158s registers an offense for a single method call with a block inside of a check for the object 158s registers an offense for a single method call with params inside of a non-nil check for the object 158s registers an offense for a single method call with params and a block inside of an unless nil check for the object 158s ternary expression 158s allows ternary expression 158s object check before method call 158s allows a non object check followed by a method call 158s allows a nil object check followed by a method call with params and a block 158s allows a non object check followed by a method call with params and a block 158s allows a nil object check followed by a method call 158s allows a nil object check followed by a method call with a block 158s allows a non object check followed by a method call with a block 158s allows a nil object check followed by a method call with params 158s allows a non object check followed by a method call with params 158s ConvertCodeThatCanStartToReturnNil false 158s registers an offense for an object check followed by a method call 158s registers an offense for an object check followed by a method call with a block 158s allows a non-nil object check followed by a method call with params and a block 158s registers an offense for an object check followed by a method call with params 158s allows a non-nil object check followed by a method call with a block 158s allows a non-nil object check followed by a method call with params 158s registers an offense for an object check followed by a method call with params and a block 158s registers an offense for a check for the object followed by a method call in the condition for an if expression 158s registers an offense for an object check followed by a method calls that nil responds to 158s allows a non-nil object check followed by a method call 158s method chaining 158s corrects an object check followed by a chained method call with a symbol proc 158s corrects an object check followed by a chained method call 158s corrects an object check followed by a chained method call with params 158s corrects an object check followed by a chained method call with a block 158s ConvertCodeThatCanStartToReturnNil true 158s registers an offense for an object check followed by a method call 158s registers an offense for a non-nil object check followed by a method call with a block 158s registers an offense for a non-nil object check followed by a method call with params 158s registers an offense for an object check followed by a method call with a block 158s registers an offense for a check for the object followed by a method call in the condition for an if expression 158s registers an offense for a non-nil object check followed by a method call with params and a block 158s registers an offense for an object check followed by a method call with params 158s registers an offense for a non-nil object check followed by a method call 158s registers an offense for an object check followed by a method call with params and a block 158s corrects an object check followed by a method call and another check 158s method chaining 158s registers an offense for an object check followed by chained method calls with blocks 158s with Lint/SafeNavigationChain disabled 158s allows an object check followed by chained method calls with blocks 158s allows an object check followed by chained method calls 158s MaxChainLength: 3 158s registers an offense for an object check followed by 3 chained method calls 158s allows an object check followed by 4 chained method calls 158s MaxChainLength: 1 158s allows an object check followed by 2 chained method calls 158s registers an offense for an object check followed by 1 chained method calls 158s behaves like all variable types 158s if expression 158s registers an offense for a single method call with params inside of a check for the object 158s registers an offense for a single method call with params inside of an unless nil check for the object 158s registers an offense for a single method call with params and a block inside of an unless negative check for the object 158s only moves comments that fall within the expression 158s registers an offense for a single method call with a block inside of a check for the object 158s registers an offense for a single method call with a block inside of an unless nil check for the object 158s does not lose comments within if expression 158s registers an offense for a single method call with params inside of an unless negative check for the object 158s registers an offense for a single method call with a block inside of a non-nil check for the object 158s registers an offense for a single method call with a block inside of an unless negative check for the object 158s registers an offense for a single method call with params and a block inside of a non-nil check for the object 158s registers an offense for a single method call with params and a block inside of an unless nil check for the object 158s registers an offense for a single method call inside of a non-nil check for the object 158s registers an offense for a single method call with params inside of a non-nil check for the object 158s registers an offense for a single method call inside of an unless negative check for the object 158s registers an offense for a single method call with params and a block inside of a check for the object 158s allows a single method call inside of a check for the object with an else 158s registers an offense for a single method call inside of an unless nil check for the object 158s registers an offense for a single method call inside of a check for the object 158s ternary expression 158s allows ternary expression 158s object check before method call 158s allows a non object check followed by a method call with params 158s allows a nil object check followed by a method call with params 158s allows a nil object check followed by a method call 158s allows a nil object check followed by a method call with a block 158s allows a non object check followed by a method call with a block 158s allows a non object check followed by a method call with params and a block 158s allows a non object check followed by a method call 158s allows a nil object check followed by a method call with params and a block 158s ConvertCodeThatCanStartToReturnNil false 158s allows a non-nil object check followed by a method call 158s registers an offense for an object check followed by a method call with a block 158s registers an offense for an object check followed by a method call with params 158s allows a non-nil object check followed by a method call with a block 158s registers an offense for an object check followed by a method call 158s registers an offense for a check for the object followed by a method call in the condition for an if expression 158s allows a non-nil object check followed by a method call with params 158s registers an offense for an object check followed by a method call with params and a block 158s registers an offense for an object check followed by a method calls that nil responds to 158s allows a non-nil object check followed by a method call with params and a block 158s method chaining 158s corrects an object check followed by a chained method call with a symbol proc 158s corrects an object check followed by a chained method call with a block 158s corrects an object check followed by a chained method call with params 158s corrects an object check followed by a chained method call 158s ConvertCodeThatCanStartToReturnNil true 158s registers an offense for a non-nil object check followed by a method call 158s registers an offense for a check for the object followed by a method call in the condition for an if expression 158s registers an offense for a non-nil object check followed by a method call with a block 158s registers an offense for a non-nil object check followed by a method call with params and a block 158s registers an offense for an object check followed by a method call with params 158s registers an offense for an object check followed by a method call 158s registers an offense for an object check followed by a method call with params and a block 158s registers an offense for an object check followed by a method call with a block 158s corrects an object check followed by a method call and another check 158s registers an offense for a non-nil object check followed by a method call with params 158s method chaining 158s registers an offense for an object check followed by chained method calls with blocks 158s MaxChainLength: 1 158s registers an offense for an object check followed by 1 chained method calls 158s allows an object check followed by 2 chained method calls 158s MaxChainLength: 3 158s allows an object check followed by 4 chained method calls 158s registers an offense for an object check followed by 3 chained method calls 158s with Lint/SafeNavigationChain disabled 158s allows an object check followed by chained method calls with blocks 158s allows an object check followed by chained method calls 158s modifier if 158s registers an offense for an object check followed by a method call with a comment at EOL 158s registers an offense for a method call with a block safeguarded with a negative check for the object 158s registers an offense for a method call with a block safeguarded with a check for the object 158s registers an offense when safe guard check and safe navigation method call are connected with `&&` condition 158s registers an offense for a method call with params safeguarded with a check for the object 158s registers an offense for a chained method call safeguarded with a negative nil check for the object 158s registers an offense for a method call with a block safeguarded with a negative nil check for the object 158s registers an offense for a method call with params safeguarded with a nil check for the object 158s registers an offense for a method call safeguarded with a negative nil check for the object 158s registers an offense for a method call with params and a block safeguarded with a check for the object 158s registers an offense for a method call safeguarded with a negative check for the object 158s registers an offense for a method call with params and a block safeguarded with a negative check for the object 158s registers an offense for a method call on an accessor safeguarded by a check for the accessed variable 158s registers an offense for a method call with params and a block safeguarded with a nil check for the object 158s registers an offense for a method call safeguarded with a check for the object 158s registers an offense for a method call that nil responds to safe guarded by an object check 158s registers an offense for a method call with a block safeguarded with a nil check for the object 158s registers an offense for a method call with params safeguarded with a negative nil check for the object 158s registers an offense for a chained method call safeguarded with a check for the object 158s registers an offense for a method call with params and a block safeguarded with a negative nil check for the object 158s registers an offense for a method call with params safeguarded with a negative check for the object 158s registers an offense for a method call safeguarded with a nil check for the object 158s registers an offense for a chained method call safeguarded with an unless nil check for the object 158s behaves like safe guarding logical break keywords 158s allows a method call being passed to fail safe guarded by an object check 158s behaves like safe guarding logical break keywords 158s allows a method call being passed to yield safe guarded by an object check 158s behaves like safe guarding logical break keywords 158s allows a method call being passed to throw safe guarded by an object check 158s behaves like safe guarding logical break keywords 158s allows a method call being passed to raise safe guarded by an object check 158s behaves like safe guarding logical break keywords 158s allows a method call being passed to return safe guarded by an object check 158s behaves like safe guarding logical break keywords 158s allows a method call being passed to break safe guarded by an object check 158s behaves like safe guarding logical break keywords 158s allows a method call being passed to next safe guarded by an object check 158s when Ruby <= 2.2 158s does not register an offense when a method call that nil responds to safe guarded by an object check 158s behaves like all variable types 158s if expression 158s does not lose comments within if expression 158s registers an offense for a single method call with params and a block inside of a non-nil check for the object 158s registers an offense for a single method call with params and a block inside of a check for the object 158s registers an offense for a single method call with params inside of a check for the object 158s registers an offense for a single method call with a block inside of an unless negative check for the object 158s registers an offense for a single method call inside of a non-nil check for the object 158s registers an offense for a single method call inside of a check for the object 158s only moves comments that fall within the expression 158s registers an offense for a single method call with a block inside of a non-nil check for the object 158s registers an offense for a single method call with params and a block inside of an unless nil check for the object 158s registers an offense for a single method call with a block inside of a check for the object 158s allows a single method call inside of a check for the object with an else 158s registers an offense for a single method call with params inside of an unless nil check for the object 158s registers an offense for a single method call inside of an unless negative check for the object 158s registers an offense for a single method call with a block inside of an unless nil check for the object 158s registers an offense for a single method call inside of an unless nil check for the object 158s registers an offense for a single method call with params inside of an unless negative check for the object 158s registers an offense for a single method call with params inside of a non-nil check for the object 158s registers an offense for a single method call with params and a block inside of an unless negative check for the object 158s ternary expression 158s allows ternary expression 158s object check before method call 158s allows a non object check followed by a method call with a block 158s allows a nil object check followed by a method call with params and a block 158s allows a nil object check followed by a method call 158s allows a non object check followed by a method call with params and a block 158s allows a nil object check followed by a method call with params 158s allows a non object check followed by a method call with params 158s allows a nil object check followed by a method call with a block 158s allows a non object check followed by a method call 158s ConvertCodeThatCanStartToReturnNil false 158s registers an offense for an object check followed by a method call with a block 158s allows a non-nil object check followed by a method call with params 158s registers an offense for an object check followed by a method calls that nil responds to 158s allows a non-nil object check followed by a method call with a block 158s registers an offense for a check for the object followed by a method call in the condition for an if expression 158s registers an offense for an object check followed by a method call with params and a block 158s registers an offense for an object check followed by a method call with params 158s allows a non-nil object check followed by a method call with params and a block 158s registers an offense for an object check followed by a method call 158s allows a non-nil object check followed by a method call 158s method chaining 158s corrects an object check followed by a chained method call 158s corrects an object check followed by a chained method call with params 158s corrects an object check followed by a chained method call with a symbol proc 158s corrects an object check followed by a chained method call with a block 158s ConvertCodeThatCanStartToReturnNil true 158s registers an offense for a non-nil object check followed by a method call 158s corrects an object check followed by a method call and another check 158s registers an offense for an object check followed by a method call 158s registers an offense for an object check followed by a method call with params 158s registers an offense for a check for the object followed by a method call in the condition for an if expression 158s registers an offense for a non-nil object check followed by a method call with params and a block 158s registers an offense for a non-nil object check followed by a method call with a block 158s registers an offense for an object check followed by a method call with a block 158s registers an offense for an object check followed by a method call with params and a block 158s registers an offense for a non-nil object check followed by a method call with params 158s method chaining 158s registers an offense for an object check followed by chained method calls with blocks 158s with Lint/SafeNavigationChain disabled 158s allows an object check followed by chained method calls 158s allows an object check followed by chained method calls with blocks 158s MaxChainLength: 1 158s allows an object check followed by 2 chained method calls 158s registers an offense for an object check followed by 1 chained method calls 158s MaxChainLength: 3 158s allows an object check followed by 4 chained method calls 158s registers an offense for an object check followed by 3 chained method calls 158s modifier if 158s registers an offense for a method call with a block safeguarded with a negative nil check for the object 158s registers an offense for a method call with params and a block safeguarded with a nil check for the object 158s registers an offense when safe guard check and safe navigation method call are connected with `&&` condition 158s registers an offense for a method call with a block safeguarded with a nil check for the object 158s registers an offense for an object check followed by a method call with a comment at EOL 158s registers an offense for a method call safeguarded with a negative nil check for the object 158s registers an offense for a method call on an accessor safeguarded by a check for the accessed variable 158s registers an offense for a chained method call safeguarded with a check for the object 158s registers an offense for a method call with params and a block safeguarded with a check for the object 158s registers an offense for a method call with params safeguarded with a negative nil check for the object 158s registers an offense for a method call with params safeguarded with a nil check for the object 158s registers an offense for a method call safeguarded with a check for the object 158s registers an offense for a method call safeguarded with a negative check for the object 158s registers an offense for a method call with params and a block safeguarded with a negative check for the object 158s registers an offense for a method call with a block safeguarded with a negative check for the object 158s registers an offense for a chained method call safeguarded with an unless nil check for the object 158s registers an offense for a method call with params and a block safeguarded with a negative nil check for the object 158s registers an offense for a method call with a block safeguarded with a check for the object 158s registers an offense for a method call that nil responds to safe guarded by an object check 158s registers an offense for a chained method call safeguarded with a negative nil check for the object 158s registers an offense for a method call with params safeguarded with a check for the object 158s registers an offense for a method call with params safeguarded with a negative check for the object 158s registers an offense for a method call safeguarded with a nil check for the object 158s behaves like safe guarding logical break keywords 158s allows a method call being passed to fail safe guarded by an object check 158s behaves like safe guarding logical break keywords 158s allows a method call being passed to next safe guarded by an object check 158s behaves like safe guarding logical break keywords 158s allows a method call being passed to return safe guarded by an object check 158s behaves like safe guarding logical break keywords 158s allows a method call being passed to raise safe guarded by an object check 158s behaves like safe guarding logical break keywords 158s allows a method call being passed to yield safe guarded by an object check 158s behaves like safe guarding logical break keywords 158s allows a method call being passed to throw safe guarded by an object check 158s behaves like safe guarding logical break keywords 158s allows a method call being passed to break safe guarded by an object check 158s behaves like all variable types 158s if expression 158s registers an offense for a single method call with params inside of an unless nil check for the object 158s registers an offense for a single method call inside of a check for the object 158s registers an offense for a single method call inside of an unless negative check for the object 158s registers an offense for a single method call with a block inside of an unless nil check for the object 158s registers an offense for a single method call with a block inside of a non-nil check for the object 158s registers an offense for a single method call inside of a non-nil check for the object 158s registers an offense for a single method call with params inside of a non-nil check for the object 158s registers an offense for a single method call with a block inside of an unless negative check for the object 158s registers an offense for a single method call with params and a block inside of a non-nil check for the object 158s registers an offense for a single method call with params and a block inside of an unless negative check for the object 158s registers an offense for a single method call with params and a block inside of an unless nil check for the object 158s only moves comments that fall within the expression 158s registers an offense for a single method call with params inside of an unless negative check for the object 158s registers an offense for a single method call inside of an unless nil check for the object 158s allows a single method call inside of a check for the object with an else 158s does not lose comments within if expression 158s registers an offense for a single method call with params inside of a check for the object 158s registers an offense for a single method call with a block inside of a check for the object 158s registers an offense for a single method call with params and a block inside of a check for the object 158s ternary expression 158s allows ternary expression 158s object check before method call 158s allows a nil object check followed by a method call with params and a block 158s allows a nil object check followed by a method call with params 158s allows a non object check followed by a method call 158s allows a non object check followed by a method call with a block 158s allows a non object check followed by a method call with params 158s allows a non object check followed by a method call with params and a block 158s allows a nil object check followed by a method call with a block 158s allows a nil object check followed by a method call 158s ConvertCodeThatCanStartToReturnNil true 158s registers an offense for a non-nil object check followed by a method call with a block 158s registers an offense for an object check followed by a method call 158s registers an offense for a non-nil object check followed by a method call with params and a block 158s registers an offense for a check for the object followed by a method call in the condition for an if expression 158s registers an offense for an object check followed by a method call with params 158s registers an offense for an object check followed by a method call with params and a block 158s registers an offense for an object check followed by a method call with a block 158s corrects an object check followed by a method call and another check 158s registers an offense for a non-nil object check followed by a method call with params 158s registers an offense for a non-nil object check followed by a method call 158s method chaining 159s registers an offense for an object check followed by chained method calls with blocks 159s MaxChainLength: 3 159s registers an offense for an object check followed by 3 chained method calls 159s allows an object check followed by 4 chained method calls 159s MaxChainLength: 1 159s allows an object check followed by 2 chained method calls 159s registers an offense for an object check followed by 1 chained method calls 159s with Lint/SafeNavigationChain disabled 159s allows an object check followed by chained method calls with blocks 159s allows an object check followed by chained method calls 159s ConvertCodeThatCanStartToReturnNil false 159s registers an offense for an object check followed by a method call with params 159s allows a non-nil object check followed by a method call with a block 159s registers an offense for an object check followed by a method call with params and a block 159s registers an offense for an object check followed by a method calls that nil responds to 159s registers an offense for an object check followed by a method call 159s allows a non-nil object check followed by a method call with params and a block 159s registers an offense for an object check followed by a method call with a block 159s allows a non-nil object check followed by a method call 159s registers an offense for a check for the object followed by a method call in the condition for an if expression 159s allows a non-nil object check followed by a method call with params 159s method chaining 159s corrects an object check followed by a chained method call with a symbol proc 159s corrects an object check followed by a chained method call with params 159s corrects an object check followed by a chained method call 159s corrects an object check followed by a chained method call with a block 159s modifier if 159s registers an offense for an object check followed by a method call with a comment at EOL 159s registers an offense for a method call with a block safeguarded with a check for the object 159s registers an offense for a chained method call safeguarded with an unless nil check for the object 159s registers an offense for a method call with params and a block safeguarded with a negative check for the object 159s registers an offense for a method call with a block safeguarded with a negative check for the object 159s registers an offense for a method call safeguarded with a nil check for the object 159s registers an offense for a chained method call safeguarded with a check for the object 159s registers an offense for a method call with params safeguarded with a nil check for the object 159s registers an offense for a method call safeguarded with a negative check for the object 159s registers an offense for a method call with params safeguarded with a check for the object 159s registers an offense for a method call safeguarded with a check for the object 159s registers an offense for a method call with params safeguarded with a negative check for the object 159s registers an offense for a method call with params and a block safeguarded with a nil check for the object 159s registers an offense when safe guard check and safe navigation method call are connected with `&&` condition 159s registers an offense for a method call with params and a block safeguarded with a negative nil check for the object 159s registers an offense for a method call with a block safeguarded with a nil check for the object 159s registers an offense for a method call with params safeguarded with a negative nil check for the object 159s registers an offense for a method call on an accessor safeguarded by a check for the accessed variable 159s registers an offense for a chained method call safeguarded with a negative nil check for the object 159s registers an offense for a method call with a block safeguarded with a negative nil check for the object 159s registers an offense for a method call with params and a block safeguarded with a check for the object 159s registers an offense for a method call that nil responds to safe guarded by an object check 159s registers an offense for a method call safeguarded with a negative nil check for the object 159s behaves like safe guarding logical break keywords 159s allows a method call being passed to break safe guarded by an object check 159s behaves like safe guarding logical break keywords 159s allows a method call being passed to raise safe guarded by an object check 159s behaves like safe guarding logical break keywords 159s allows a method call being passed to return safe guarded by an object check 159s behaves like safe guarding logical break keywords 159s allows a method call being passed to fail safe guarded by an object check 159s behaves like safe guarding logical break keywords 159s allows a method call being passed to next safe guarded by an object check 159s behaves like safe guarding logical break keywords 159s allows a method call being passed to yield safe guarded by an object check 159s behaves like safe guarding logical break keywords 159s allows a method call being passed to throw safe guarded by an object check 159s respond_to? 159s allows method calls safeguarded by a respond_to check on adifferent variable and method 159s allows method calls safeguarded by a respond_to check 159s allows method calls safeguarded by a respond_to check to a different method 159s allows enumerable accessor method calls safeguarded by a respond_to check 159s allows method calls safeguarded by a respond_to check on adifferent variable but the same method 159s 159s RuboCop::YAMLDuplicationChecker 159s when yaml has duplicated keys in the second level 159s calls block 159s calls block with keys 159s when yaml does not have any duplication 159s does not call block 159s when yaml has duplicated keys in the top level 159s calls block 159s calls block with keys 159s 159s RuboCop::Cop::Layout::SpaceAfterNot 159s accepts no space after ! 159s registers an offense and corrects a single space after ! 159s accepts space after not keyword 159s registers an offense and corrects multiple spaces after ! 159s registers an offense and corrects space after ! with the negated receiver wrapped in parentheses 159s 159s RuboCop::Cop::Lint::PercentStringArray 159s with invalid byte sequence in UTF-8 159s add an offense and corrects when tokens contain quotes 159s accepts if tokens contain invalid byte sequence only 159s detecting quotes or commas in a %w/%W string 159s accepts likely false positive %w(#{a} b) 159s accepts likely false positive %W(' ") 159s adds an offense and corrects when tokens contain both types of quotes 159s adds an offense and corrects when there are no quotes but one comma 159s accepts likely false positive %w(' ") 159s accepts likely false positive :"#{a}" 159s accepts likely false positive :"#{a}" 159s accepts tokens without quotes or commas 159s adds an offense and corrects when tokens contain both types of quotes 159s accepts likely false positive %W(' " ! = # ,) 159s adds an offense and corrects when one token is quoted but there are no commas 159s accepts likely false positive %w(' " ! = # ,) 159s adds an offense and corrects when there are no quotes but one comma 159s accepts tokens without quotes or commas 159s adds an offense and corrects when tokens contain quotes and are comma separated 159s adds an offense and corrects when one token is quoted but there are no commas 159s adds an offense and corrects when tokens contain quotes and are comma separated 159s accepts likely false positive %W(#{a} b) 159s with binary encoded source 159s accepts if tokens contain no quotes 159s adds an offense and corrects when tokens contain quotes 159s 159s RuboCop::Cop::Lint::NumberedParameterAssignment 159s registers an offense when using `_10` lvar 159s registers an offense when using `_0` lvar 159s does not register an offense when index assignment 159s does not register an offense when using non numbered parameter 159s when Ruby 2.7 or lower 159s registers an offense when using `_7` numbered parameter 159s registers an offense when using `_5` numbered parameter 159s registers an offense when using `_2` numbered parameter 159s registers an offense when using `_9` numbered parameter 159s registers an offense when using `_6` numbered parameter 159s registers an offense when using `_3` numbered parameter 159s registers an offense when using `_4` numbered parameter 159s registers an offense when using `_8` numbered parameter 159s registers an offense when using `_1` numbered parameter 159s 159s RuboCop::Cop::Lint::AmbiguousBlockAssociation 159s behaves like accepts 159s does not register an offense 159s behaves like accepts 159s does not register an offense 159s behaves like accepts 159s does not register an offense 159s behaves like accepts 159s does not register an offense 159s behaves like accepts 159s does not register an offense 159s behaves like accepts 159s does not register an offense 159s behaves like accepts 159s does not register an offense 159s without parentheses 159s with receiver 159s registers an offense 159s when using safe navigation operator 159s registers an offense 159s rspec expect {}.to change {} 159s registers an offense 159s without receiver 159s registers an offense 159s as a hash key 159s registers an offense 159s with assignment 159s registers an offense 159s behaves like accepts 159s does not register an offense 159s behaves like accepts 159s does not register an offense 159s behaves like accepts 159s does not register an offense 159s behaves like accepts 159s does not register an offense 159s behaves like accepts 159s does not register an offense 159s behaves like accepts 159s does not register an offense 159s when AllowedMethods is enabled 159s does not register an offense for an allowed method 159s registers an offense for other methods 159s behaves like accepts 159s does not register an offense 159s behaves like accepts 159s does not register an offense 159s behaves like accepts 159s does not register an offense 159s behaves like accepts 159s does not register an offense 159s behaves like accepts 159s does not register an offense 159s when AllowedPatterns is enabled 159s registers an offense for other methods 159s does not register an offense for an allowed method 159s behaves like accepts 159s does not register an offense 159s behaves like accepts 159s does not register an offense 159s behaves like accepts 159s does not register an offense 159s behaves like accepts 159s does not register an offense 159s 159s RuboCop::Cop::Layout::SpaceInsidePercentLiteralDelimiters 159s accepts other percent literals 159s accepts execute-string literals 159s for x type and ["(", ")"] delimiters 159s registers an offense for literals with escaped and other spaces 159s accepts literals with escaped spaces 159s registers an offense for spaces after first delimiter 159s accepts multi-line literals within a method 159s accepts multi-line literals 159s registers an offense for unnecessary spaces 159s registers an offense for spaces before final delimiter 159s accepts newlines and additional following alignment spaces 159s accepts spaces between entries 159s accepts literals without additional spaces 159s with newline in blank percent literals 159s registers and corrects an offense 159s with space in blank percent literals 159s registers and corrects an offense 159s with spaces in blank percent literals 159s registers and corrects an offense 159s for W type and ["{", "}"] delimiters 159s accepts literals with escaped spaces 159s accepts literals without additional spaces 159s accepts multi-line literals within a method 159s accepts spaces between entries 159s registers an offense for unnecessary spaces 159s registers an offense for spaces after first delimiter 159s registers an offense for spaces before final delimiter 159s registers an offense for literals with escaped and other spaces 159s accepts multi-line literals 159s accepts newlines and additional following alignment spaces 159s with space in blank percent literals 159s registers and corrects an offense 159s with newline in blank percent literals 159s registers and corrects an offense 159s with spaces in blank percent literals 159s registers and corrects an offense 159s for i type and ["!", "!"] delimiters 159s registers an offense for spaces after first delimiter 159s accepts literals with escaped spaces 159s accepts multi-line literals within a method 159s accepts multi-line literals 159s accepts literals without additional spaces 159s accepts newlines and additional following alignment spaces 159s registers an offense for spaces before final delimiter 159s registers an offense for literals with escaped and other spaces 159s accepts spaces between entries 159s registers an offense for unnecessary spaces 159s with spaces in blank percent literals 159s registers and corrects an offense 159s with newline in blank percent literals 159s registers and corrects an offense 159s with space in blank percent literals 159s registers and corrects an offense 159s for I type and ["{", "}"] delimiters 159s accepts literals with escaped spaces 159s accepts literals without additional spaces 159s accepts newlines and additional following alignment spaces 159s registers an offense for literals with escaped and other spaces 159s accepts multi-line literals within a method 159s registers an offense for unnecessary spaces 159s registers an offense for spaces after first delimiter 159s registers an offense for spaces before final delimiter 159s accepts spaces between entries 159s accepts multi-line literals 159s with space in blank percent literals 159s registers and corrects an offense 159s with spaces in blank percent literals 159s registers and corrects an offense 159s with newline in blank percent literals 159s registers and corrects an offense 159s for w type and ["!", "!"] delimiters 159s registers an offense for literals with escaped and other spaces 159s registers an offense for spaces after first delimiter 159s accepts spaces between entries 159s accepts newlines and additional following alignment spaces 159s registers an offense for spaces before final delimiter 159s accepts multi-line literals within a method 159s accepts literals without additional spaces 159s accepts multi-line literals 159s registers an offense for unnecessary spaces 159s accepts literals with escaped spaces 159s with spaces in blank percent literals 159s registers and corrects an offense 159s with newline in blank percent literals 159s registers and corrects an offense 159s with space in blank percent literals 159s registers and corrects an offense 159s for I type and ["(", ")"] delimiters 159s accepts literals without additional spaces 159s accepts literals with escaped spaces 159s accepts multi-line literals within a method 159s registers an offense for spaces before final delimiter 159s accepts multi-line literals 159s registers an offense for literals with escaped and other spaces 159s registers an offense for unnecessary spaces 159s accepts newlines and additional following alignment spaces 159s accepts spaces between entries 159s registers an offense for spaces after first delimiter 159s with space in blank percent literals 159s registers and corrects an offense 159s with spaces in blank percent literals 159s registers and corrects an offense 159s with newline in blank percent literals 159s registers and corrects an offense 159s for i type and ["[", "]"] delimiters 159s accepts multi-line literals within a method 159s accepts newlines and additional following alignment spaces 159s accepts spaces between entries 159s registers an offense for unnecessary spaces 159s registers an offense for spaces before final delimiter 159s registers an offense for spaces after first delimiter 159s accepts literals with escaped spaces 159s accepts literals without additional spaces 159s registers an offense for literals with escaped and other spaces 159s accepts multi-line literals 159s with spaces in blank percent literals 159s registers and corrects an offense 159s with space in blank percent literals 159s registers and corrects an offense 159s with newline in blank percent literals 159s registers and corrects an offense 159s for w type and ["{", "}"] delimiters 159s registers an offense for literals with escaped and other spaces 159s accepts literals with escaped spaces 159s accepts multi-line literals 159s registers an offense for spaces before final delimiter 159s registers an offense for unnecessary spaces 159s accepts literals without additional spaces 159s accepts spaces between entries 159s accepts newlines and additional following alignment spaces 159s registers an offense for spaces after first delimiter 159s accepts multi-line literals within a method 159s with spaces in blank percent literals 159s registers and corrects an offense 159s with space in blank percent literals 159s registers and corrects an offense 159s with newline in blank percent literals 159s registers and corrects an offense 159s for i type and ["{", "}"] delimiters 159s registers an offense for unnecessary spaces 159s accepts multi-line literals 159s registers an offense for spaces before final delimiter 159s accepts literals with escaped spaces 159s registers an offense for spaces after first delimiter 159s accepts newlines and additional following alignment spaces 159s accepts spaces between entries 159s accepts literals without additional spaces 159s registers an offense for literals with escaped and other spaces 159s accepts multi-line literals within a method 159s with space in blank percent literals 159s registers and corrects an offense 159s with spaces in blank percent literals 160s registers and corrects an offense 160s with newline in blank percent literals 160s registers and corrects an offense 160s for W type and ["!", "!"] delimiters 160s accepts spaces between entries 160s accepts multi-line literals within a method 160s accepts literals with escaped spaces 160s registers an offense for spaces after first delimiter 160s accepts multi-line literals 160s registers an offense for spaces before final delimiter 160s accepts literals without additional spaces 160s registers an offense for literals with escaped and other spaces 160s registers an offense for unnecessary spaces 160s accepts newlines and additional following alignment spaces 160s with newline in blank percent literals 160s registers and corrects an offense 160s with space in blank percent literals 160s registers and corrects an offense 160s with spaces in blank percent literals 160s registers and corrects an offense 160s for I type and ["[", "]"] delimiters 160s accepts multi-line literals within a method 160s registers an offense for spaces after first delimiter 160s registers an offense for literals with escaped and other spaces 160s accepts literals without additional spaces 160s accepts literals with escaped spaces 160s registers an offense for spaces before final delimiter 160s accepts multi-line literals 160s accepts spaces between entries 160s accepts newlines and additional following alignment spaces 160s registers an offense for unnecessary spaces 160s with newline in blank percent literals 160s registers and corrects an offense 160s with spaces in blank percent literals 160s registers and corrects an offense 160s with space in blank percent literals 160s registers and corrects an offense 160s for w type and ["(", ")"] delimiters 160s registers an offense for spaces after first delimiter 160s accepts multi-line literals within a method 160s accepts multi-line literals 160s accepts literals with escaped spaces 160s registers an offense for unnecessary spaces 160s registers an offense for literals with escaped and other spaces 160s accepts newlines and additional following alignment spaces 160s accepts literals without additional spaces 160s registers an offense for spaces before final delimiter 160s accepts spaces between entries 160s with newline in blank percent literals 160s registers and corrects an offense 160s with spaces in blank percent literals 160s registers and corrects an offense 160s with space in blank percent literals 160s registers and corrects an offense 160s for W type and ["(", ")"] delimiters 160s registers an offense for spaces before final delimiter 160s accepts literals with escaped spaces 160s registers an offense for spaces after first delimiter 160s accepts spaces between entries 160s registers an offense for unnecessary spaces 160s accepts multi-line literals 160s accepts literals without additional spaces 160s accepts newlines and additional following alignment spaces 160s accepts multi-line literals within a method 160s registers an offense for literals with escaped and other spaces 160s with space in blank percent literals 160s registers and corrects an offense 160s with spaces in blank percent literals 160s registers and corrects an offense 160s with newline in blank percent literals 160s registers and corrects an offense 160s for w type and ["[", "]"] delimiters 160s registers an offense for spaces before final delimiter 160s accepts newlines and additional following alignment spaces 160s accepts multi-line literals within a method 160s registers an offense for spaces after first delimiter 160s accepts spaces between entries 160s accepts literals without additional spaces 160s registers an offense for unnecessary spaces 160s accepts multi-line literals 160s accepts literals with escaped spaces 160s registers an offense for literals with escaped and other spaces 160s with newline in blank percent literals 160s registers and corrects an offense 160s with spaces in blank percent literals 160s registers and corrects an offense 160s with space in blank percent literals 160s registers and corrects an offense 160s for i type and ["(", ")"] delimiters 160s registers an offense for spaces before final delimiter 160s accepts spaces between entries 160s accepts literals without additional spaces 160s registers an offense for unnecessary spaces 160s registers an offense for spaces after first delimiter 160s registers an offense for literals with escaped and other spaces 160s accepts multi-line literals within a method 160s accepts multi-line literals 160s accepts literals with escaped spaces 160s accepts newlines and additional following alignment spaces 160s with newline in blank percent literals 160s registers and corrects an offense 160s with spaces in blank percent literals 160s registers and corrects an offense 160s with space in blank percent literals 160s registers and corrects an offense 160s for x type and ["[", "]"] delimiters 160s registers an offense for spaces after first delimiter 160s accepts newlines and additional following alignment spaces 160s registers an offense for literals with escaped and other spaces 160s accepts multi-line literals within a method 160s registers an offense for spaces before final delimiter 160s accepts multi-line literals 160s accepts spaces between entries 160s accepts literals with escaped spaces 160s accepts literals without additional spaces 160s registers an offense for unnecessary spaces 160s with spaces in blank percent literals 160s registers and corrects an offense 160s with space in blank percent literals 160s registers and corrects an offense 160s with newline in blank percent literals 160s registers and corrects an offense 160s for I type and ["!", "!"] delimiters 160s accepts literals without additional spaces 160s accepts newlines and additional following alignment spaces 160s accepts multi-line literals 160s registers an offense for spaces after first delimiter 160s registers an offense for unnecessary spaces 160s registers an offense for spaces before final delimiter 160s accepts spaces between entries 160s accepts multi-line literals within a method 160s accepts literals with escaped spaces 160s registers an offense for literals with escaped and other spaces 160s with space in blank percent literals 160s registers and corrects an offense 160s with newline in blank percent literals 160s registers and corrects an offense 160s with spaces in blank percent literals 160s registers and corrects an offense 160s for x type and ["{", "}"] delimiters 160s accepts multi-line literals 160s accepts multi-line literals within a method 160s registers an offense for literals with escaped and other spaces 160s accepts literals without additional spaces 160s accepts newlines and additional following alignment spaces 160s accepts spaces between entries 160s accepts literals with escaped spaces 160s registers an offense for spaces after first delimiter 160s registers an offense for unnecessary spaces 160s registers an offense for spaces before final delimiter 160s with newline in blank percent literals 160s registers and corrects an offense 160s with space in blank percent literals 160s registers and corrects an offense 160s with spaces in blank percent literals 160s registers and corrects an offense 160s for W type and ["[", "]"] delimiters 160s accepts literals without additional spaces 160s registers an offense for literals with escaped and other spaces 160s accepts newlines and additional following alignment spaces 160s accepts multi-line literals within a method 160s accepts spaces between entries 160s registers an offense for spaces before final delimiter 160s accepts literals with escaped spaces 160s registers an offense for unnecessary spaces 160s accepts multi-line literals 160s registers an offense for spaces after first delimiter 160s with spaces in blank percent literals 160s registers and corrects an offense 160s with space in blank percent literals 160s registers and corrects an offense 160s with newline in blank percent literals 160s registers and corrects an offense 160s for x type and ["!", "!"] delimiters 160s accepts literals with escaped spaces 160s registers an offense for literals with escaped and other spaces 160s accepts newlines and additional following alignment spaces 160s registers an offense for spaces before final delimiter 160s registers an offense for unnecessary spaces 160s registers an offense for spaces after first delimiter 160s accepts multi-line literals 160s accepts multi-line literals within a method 160s accepts spaces between entries 160s accepts literals without additional spaces 160s with spaces in blank percent literals 160s registers and corrects an offense 160s with space in blank percent literals 160s registers and corrects an offense 160s with newline in blank percent literals 160s registers and corrects an offense 160s 160s RuboCop::Cop::Lint::UnreachableCode 160s accepts `raise` is in `else` branch only 160s accepts `break` as the final expression 160s registers an offense for `exit` in all `if` branches 160s registers an offense for `fail` in all `case` branches 160s registers an offense for `redo` in all `if` and `elsif` branches 160s registers an offense for `next` in all `if` and `elsif` branches 160s accepts `redo` as the final expression 160s accepts code with conditional `break` 160s registers an offense for `break` in all `if` branches with other expressions 160s accepts `abort` is in `if`, and without `else` 160s registers an offense for `throw` in all `if` branches 160s accepts `redo` is in `if` branch only 160s accepts `fail` is in `if` branch only 160s accepts `redo` is not in `elsif` branch 160s accepts `break` is not in `elsif` branch 160s registers an offense for `throw` in all `if` branches with other expressions 160s registers an offense for `abort` in all `if` and `elsif` branches 160s accepts `abort` is not in `elsif` branch 160s accepts `abort` as the final expression 160s accepts code with conditional `exit` 160s registers an offense for `abort` in all `case` branches 160s registers an offense for `raise` in all `if` branches with other expressions 160s accepts `exit` is not in `elsif` branch 160s accepts `abort` is in all `if` branches 160s registers an offense for `abort` before other statements 160s registers an offense for `exit` before other statements 160s registers an offense for `redo` before other statements 160s registers an offense for `fail` in all `if` branches 160s registers an offense for `retry` in all `if` branches with other expressions 160s accepts `break` is in all `if` branches 160s registers an offense for `raise` in all `if` and `elsif` branches 160s accepts `next` as the final expression 160s registers an offense for `exit!` in all `if` branches with other expressions 160s accepts `throw` is in `if` branch only 160s accepts `return` is in `if`, and without `else` 160s registers an offense for `exit` in all `if` and `elsif` branches 160s registers an offense for `fail` before other statements 160s accepts `raise` is in all `if` branches 160s accepts `retry` as the final expression 160s accepts `next` is in `case` branch without else 160s accepts `break` is in `if`, and without `else` 160s accepts `throw` as the final expression 160s registers an offense for `exit!` before other statements 160s accepts `retry` is in `if` branch only 160s registers an offense for `return` in all `if` branches 160s registers an offense for `redo` in all `if` branches 160s accepts `redo` is in `if`, and without `else` 160s registers an offense for `exit!` in all `if` and `elsif` branches 160s accepts `break` is in `if` branch only 160s registers an offense for `break` in all `if` branches 160s registers an offense for `next` in all `if` branches 160s registers an offense for `return` in all `if` branches with other expressions 160s accepts `return` is not in `elsif` branch 160s registers an offense for `raise` in `begin` 160s accepts `abort` is in `else` branch only 160s registers an offense for `break` in all `case` branches 160s registers an offense for `retry` in all `case` branches 160s accepts `next` is in `if` branch only 160s accepts `throw` is in `else` branch only 160s registers an offense for `abort` in all `if` branches with other expressions 160s accepts code with conditional `retry` 160s accepts `exit!` is not in `elsif` branch 160s accepts `retry` is in all `if` branches 160s registers an offense for `next` in all `case` branches 160s accepts `exit!` is in `if` branch only 160s registers an offense for `exit` in `begin` 160s registers an offense for `redo` in `begin` 160s accepts `next` is in all `if` branches 160s accepts `retry` is in `else` branch only 160s registers an offense for `return` in all `if` and `elsif` branches 160s registers an offense for `throw` before other statements 160s registers an offense for `return` before other statements 160s accepts `fail` is in all `if` branches 160s registers an offense for `retry` in all `if` and `elsif` branches 160s accepts `abort` is in `case` branch without else 160s accepts `next` is in `if`, and without `else` 160s accepts code with conditional `next` 160s accepts `fail` is not in `elsif` branch 160s accepts `break` is in `case` branch without else 160s accepts `throw` is in `case` branch without else 160s registers an offense for `abort` in all `if` branches 160s registers an offense for `throw` in all `case` branches 160s accepts `throw` is in all `if` branches 160s registers an offense for `fail` in all `if` branches with other expressions 160s accepts `exit` is in `else` branch only 160s accepts `throw` is not in `elsif` branch 160s registers an offense for `abort` in `begin` 160s accepts code with conditional `throw` 160s registers an offense for `throw` in all `if` and `elsif` branches 160s registers an offense for `return` in `begin` 160s registers an offense for `retry` in `begin` 160s accepts code with conditional `fail` 160s accepts `exit!` is in all `if` branches 160s registers an offense for `break` in `begin` 160s registers an offense for `raise` before other statements 160s registers an offense for `exit!` in all `case` branches 160s registers an offense for `fail` in all `if` and `elsif` branches 160s registers an offense for `break` in all `if` and `elsif` branches 160s accepts `retry` is not in `elsif` branch 160s accepts `exit` is in all `if` branches 160s accepts `raise` is not in `elsif` branch 160s accepts `return` as the final expression 160s accepts `return` is in `else` branch only 160s accepts `fail` is in `else` branch only 160s registers an offense for `retry` in all `if` branches 160s registers an offense for `raise` in all `if` branches 160s accepts code with conditional `redo` 160s accepts `exit` is in `if`, and without `else` 160s accepts `exit` is in `if` branch only 160s registers an offense for `redo` in all `if` branches with other expressions 160s accepts `exit!` is in `else` branch only 160s accepts `exit!` as the final expression 160s registers an offense for `retry` before other statements 160s registers an offense for `throw` in `begin` 160s registers an offense for `return` in all `case` branches 160s registers an offense for `exit!` in all `if` branches 160s accepts `next` is in `else` branch only 160s accepts `return` is in `if` branch only 160s accepts `raise` is in `if` branch only 160s registers an offense for `raise` in all `case` branches 160s accepts `fail` is in `case` branch without else 160s accepts `redo` is in all `if` branches 160s accepts code with conditional `return` 160s accepts `return` is in `case` branch without else 160s accepts `return` is in all `if` branches 160s registers an offense for `next` in all `if` branches with other expressions 160s registers an offense for `next` before other statements 160s accepts `next` is not in `elsif` branch 160s accepts `fail` is in `if`, and without `else` 160s accepts `raise` as the final expression 160s accepts `retry` is in `case` branch without else 160s accepts `redo` is in `case` branch without else 160s accepts `exit` as the final expression 160s accepts `retry` is in `if`, and without `else` 160s accepts `exit!` is in `case` branch without else 160s accepts `abort` is in `if` branch only 160s accepts `break` is in `else` branch only 160s registers an offense for `exit` in all `if` branches with other expressions 160s registers an offense for `redo` in all `case` branches 160s registers an offense for `break` before other statements 160s accepts `raise` is in `if`, and without `else` 160s accepts `exit!` is in `if`, and without `else` 160s registers an offense for `exit` in all `case` branches 160s accepts code with conditional `raise` 160s accepts code with conditional `abort` 160s accepts `exit` is in `case` branch without else 160s accepts `fail` as the final expression 160s accepts `throw` is in `if`, and without `else` 160s registers an offense for `next` in `begin` 160s accepts `raise` is in `case` branch without else 160s accepts code with conditional `exit!` 160s registers an offense for `exit!` in `begin` 160s registers an offense for `fail` in `begin` 160s accepts `redo` is in `else` branch only 160s 160s RuboCop::Cop::InternalAffairs::RedundantLocationArgument 160s when location argument is passed 160s when location argument is :expression 160s registers an offense 160s removes default `location` when preceded by another keyword 160s removes default `location` surrounded by other keywords 160s when there is a message argument 160s registers an offense 160s when location argument does not equal to :expression 160s does not register an offense 160s when location argument is not passed 160s does not register an offense 160s 160s RuboCop::Cop::Layout::DotPosition 160s Leading dots style 160s does not err on method call on same line 160s registers an offense for only dot line 160s registers an offense for trailing dot in multi-line call 160s registers an offense for correct + opposite 160s accepts leading do in multi-line method call 160s does not err on method call without a method name 160s does not err on method call with no dots 160s when using safe navigation operator 160s registers an offense for correct + opposite 160s accepts leading do in multi-line method call 160s when a method spans multiple lines 160s registers an offense 160s when the receiver has a heredoc argument 160s with a dynamic heredoc 160s registers an offense 160s as the first argument 160s registers an offense 160s as the last argument 160s registers an offense 160s with multiple heredocs 160s registers an offense 160s with another method on the same line 160s does not register an offense 160s with multiple offenses 160s registers all of them 160s when the receiver is a heredoc 160s registers an offense 160s when there is an intervening line comment 160s does not register offense 160s when there is an intervening blank line 160s does not register offense 160s Trailing dots style 160s accepts trailing dot in multi-line method call 160s does not err on method call on same line 160s does not err on method call with no dots 160s does not err on method call without a method name 160s registers an offense for leading dot in multi-line call 160s does not err on method call with multi-line arguments 160s does not get confused by several lines of chained methods 160s when there is a heredoc with a following method 160s does not register an offense for a heredoc 160s when the receiver is a heredoc 160s registers an offense 160s when the receiver has a heredoc argument 160s as the last argument 160s registers an offense 160s with a dynamic heredoc 160s registers an offense 160s as the first argument 160s registers an offense 160s with multiple heredocs 160s registers an offense 160s with another method on the same line 160s does not register an offense 160s when using safe navigation operator 160s registers an offense for correct + opposite 160s accepts trailing dot in multi-line method call 160s 160s RuboCop::Cop::Lint::ScriptPermission 160s with file permission 0755 160s accepts with shebang line 160s accepts with blank 160s accepts without shebang line 160s with stdin 160s skips investigation 160s with file permission 0644 160s registers an offense for script permission 160s if autocorrection is off 160s leaves the file intact 160s 160s RuboCop::Cop::Layout::SpaceAfterMethodName 160s accepts a def with arguments but no parentheses 160s accepts a defs without arguments 160s registers an offense and corrects def with space before the parenthesis 160s accepts class method def with arguments but no parentheses 160s accepts a def without arguments 160s registers offense and corrects assignment def with space before parenthesis 160s registers offense and corrects class def with space before parenthesis 160s accepts an assignment def with arguments but no parentheses 160s 160s RuboCop::Cop::Style::ColonMethodDefinition 160s accepts a class method defined using . 160s using the class name 160s registers an offense for a class method defined using :: 160s using self 160s registers an offense for a class method defined using :: 160s 160s RuboCop::Cop::Style::FloatDivision 160s EnforcedStyle is left_coerce 161s does not register offense for left coerce 161s registers offense and corrects for right coerce 161s registers offense and corrects for both coerce 161s registers offense and corrects for right coerce with calculations 161s EnforcedStyle is single_coerce 161s registers offense and corrects for both coerce 161s registers offense and corrects for left coerce with calculations 161s does not register offense for right coerce only 161s does not register offense for left coerce only 161s EnforcedStyle is fdiv 161s registers offense and corrects for left coerce with calculations 161s registers offense and corrects for both coerce 161s does not register offense on usage of fdiv 161s registers offense and corrects for left coerce 161s registers offense and corrects for right coerce 161s EnforcedStyle is right_coerce 161s registers offense and corrects for left coerce 161s does not register offense for right coerce 161s registers offense and corrects for left coerce with calculations 161s registers offense and corrects for both coerce 161s 161s RuboCop::Cop::Lint::NonAtomicFileOperation 161s registers an offense when using `FileTest.exist?` as a condition for `elsif` 161s registers an offense when use `FileTest.exist?` before force remove file 161s registers an offense when use `FileTest.exist?` before remove file 161s registers an offense when use file existence checks `if` by postfix before removing file 161s registers an offense when use `FileTest.exist?` before creating file with an option not `force` 161s does not register an offense when processing other than file operations 161s registers an offense when use `FileTest.exist?` before force remove file 161s does not register an offense when use `FileTest.exist?` before creating file with an option `force: false` 161s does not register an offense when use `FileTest.exist?` before remove recursive file 161s does not register an offense when checking for the existence of different files 161s registers an offense when use `FileTest.exist?` before force creating file 161s does not register an offense when using complex conditional with `||` 161s registers an offense when use `FileTest.exist?` before remove file 161s does not register an offense when using complex conditional with `&&` 161s registers an offense when use `FileTest.exist?` before force creating file 161s registers an offense when use `FileTest.exist?` with negated `if` before creating file 161s registers an offense when use `FileTest.exist?` before remove file 161s registers an offense when use `FileTest.exists?` before creating file 161s registers an offense when use file existence checks `unless` by postfix before creating file 161s registers an offense when use `FileTest.exist?` before remove file 161s registers an offense when use `FileTest.exist?` before remove file 161s registers an offense when use `FileTest.exist?` before remove file 161s does not register an offense when not checking for the existence 161s registers an offense when use `FileTest.exist?` before remove file 161s registers an offense when use `FileTest.exist?` before remove file 161s does not register an offense when not an exist check 161s registers an offense when use `FileTest.exist?` before force creating file 161s does not register an offense when not a method of file operation 161s does not register an offense when using `FileTest.exist?` with `if` condition that has `else` branch 161s registers an offense when use `FileTest.exist?` before creating file 161s does not register an offense when use `FileTest.exist?` before remove recursive file 161s registers an offense when use `FileTest.exist?` before creating file with an option `force: true` 161s registers an offense when use `FileTest.exist?` before remove file 161s registers an offense when use `FileTest.exist?` before remove file 161s 161s RuboCop::Cop::Style::IfInsideElse 161s handles a nested `if...then...elsif...end` 161s handles a nested `if...then...else...end` 161s handles a nested `if...then...elsif...else...end` 161s ignores ternary inside if..else 161s catches a modifier if nested inside an else after elsif 161s ignores unless inside else 161s catches an `if..else` nested inside an `else` and nested inside `if` branch code is empty 161s handles a nested `if...then...end` 161s ignores if inside unless 161s catches an if..else nested inside an else 161s isn't offended by if..elsif..else 161s isn't offended if there is a statement following the if node 161s handles a nested multiline `if...then...elsif...else...end` 161s isn't offended if there is a statement preceding the if node 161s catches an if..elsif..else nested inside an else 161s catches an if node nested inside an else 161s ignores nested ternary expressions 161s when AllowIfModifier is false 161s catches a modifier if nested inside an else 161s when AllowIfModifier is true 161s accepts a modifier if nested inside an else 161s 161s RuboCop::Cop::Style::EmptyCaseCondition 161s given a case statement with an empty case 161s with when branches using then 161s behaves like detect/correct empty case, accept non-empty case 161s accepts the source with case 161s registers an offense and autocorrects 161s when using `return ... if` in `when` clause and assigning the return value of `case` 161s does not register an offense 161s when using `return ... if` in `else` clause and assigning the return value of `case` 161s does not register an offense 161s with first when branch including comma-delimited alternatives 161s behaves like detect/correct empty case, accept non-empty case 161s accepts the source with case 161s registers an offense and autocorrects 161s when used as an argument of a method without comment 161s behaves like detect/correct empty case, accept non-empty case 161s registers an offense and autocorrects 161s accepts the source with case 161s with a when branch including comma-delimited alternatives 161s behaves like detect/correct empty case, accept non-empty case 161s registers an offense and autocorrects 161s accepts the source with case 161s when using `return` in `else` clause and assigning the return value of `case` 161s does not register an offense 161s when using `when ... then` in `case` in `return` 161s behaves like detect/correct empty case, accept non-empty case 161s registers an offense and autocorrects 161s accepts the source with case 161s with a single when branch and an else 161s behaves like detect/correct empty case, accept non-empty case 161s registers an offense and autocorrects 161s accepts the source with case 161s with multiple when branches and an else 161s behaves like detect/correct empty case, accept non-empty case 161s registers an offense and autocorrects 161s accepts the source with case 161s with multiple when branches and no else 161s behaves like detect/correct empty case, accept non-empty case 161s registers an offense and autocorrects 161s accepts the source with case 161s with a single when branch and no else 161s behaves like detect/correct empty case, accept non-empty case 161s accepts the source with case 161s registers an offense and autocorrects 161s when used as an argument of a method with comment 161s behaves like detect/correct empty case, accept non-empty case 161s registers an offense and autocorrects 161s accepts the source with case 161s with multiple when branches and an `else` with code comments 161s behaves like detect/correct empty case, accept non-empty case 161s accepts the source with case 161s registers an offense and autocorrects 161s when using `when ... then` in `case` in a method call 161s behaves like detect/correct empty case, accept non-empty case 161s registers an offense and autocorrects 161s accepts the source with case 161s when using `return` in `when` clause and assigning the return value of `case` 161s does not register an offense 161s 161s RuboCop::Cop::Lint::UnifiedInteger 161s target ruby version < 2.4 161s when Bignum 161s without any decorations 161s registers an offense and autocorrects 161s when explicitly specified as toplevel constant 161s registers an offense 161s with MyNamespace 161s does not register an offense 161s when Integer 161s with MyNamespace 161s does not register an offense 161s when explicitly specified as toplevel constant 161s does not register an offense 161s without any decorations 161s does not register an offense 161s target ruby version < 2.4 161s when Fixnum 161s with MyNamespace 161s does not register an offense 161s when explicitly specified as toplevel constant 161s registers an offense 161s without any decorations 161s registers an offense and autocorrects 161s target ruby version >= 2.4 161s when Fixnum 161s without any decorations 161s registers an offense 161s with MyNamespace 161s does not register an offense 161s when explicitly specified as toplevel constant 161s registers an offense 161s target ruby version >= 2.4 161s when Bignum 161s with MyNamespace 161s does not register an offense 161s without any decorations 161s registers an offense 161s when explicitly specified as toplevel constant 161s registers an offense 161s 161s RuboCop::Cop::Layout::FirstHashElementLineBreak 161s ignores implicit hashes in method calls that are improperly formatted 161s ignores implicit hashes in method calls with parens 161s registers an offense and corrects single element multi-line hash 161s ignores implicit hashes in method calls without parens 161s registers an offense and corrects elements listed on the first line 161s registers an offense and corrects hash nested in a method call 161s ignores elements listed on a single line 161s 161s RuboCop::Cop::Style::StructInheritance 161s registers an offense when extending instance of Struct without `do` ... `end` and class body is empty 161s registers an offense when extending instance of ::Struct with do ... end 161s registers an offense when extending instance of Struct 161s registers an offense when extending instance of `Struct` when there is a comment before class declaration 161s accepts assignment to block form of Struct.new 161s accepts assignment to Struct.new 161s accepts plain class 161s registers an offense when extending instance of ::Struct 161s accepts extending DelegateClass 161s registers an offense when extending instance of Struct without `do` ... `end` and class body is empty and single line definition 161s registers an offense when extending instance of Struct with do ... end 161s accepts assignment to ::Struct.new 161s 161s RuboCop::Cop::Style::NegatedUnless 161s does not blow up for empty if condition 161s does not blow up on a negated ternary operator 161s does not blow up for empty unless condition 161s does not blow up for ternary ops 161s with “both” style 161s autocorrects by replacing parenthesized unless not with if 161s accepts an unless where the condition is doubly negated 161s accepts an unless where only part of the condition is negated 161s registers an offense for unless with exclamation point condition 161s accepts an unless/else with negative condition 161s registers an offense for unless with "not" condition 161s with “prefix” style 161s does not register an offense for postfix 161s registers an offense for prefix 161s with “postfix” style 161s does not register an offense for prefix 161s registers an offense for postfix 161s 161s RuboCop::Cop::Style::FormatString 161s when enforced style is percent 161s accepts format without arguments 161s registers an offense and corrects when using springf with second argument that uses an operator 161s registers an offense for sprintf with 3 arguments 161s accepts sprintf without arguments 161s accepts String#% 161s registers an offense for format 161s registers an offense for format with a hash argument 161s registers an offense for sprintf 161s registers an offense for format with 3 arguments 161s accepts sprintf with 1 argument 161s accepts format with 1 argument 161s registers an offense for sprintf with a hash argument 161s when enforced style is format 161s registers an offense for something followed by a hash 161s registers an offense for variable argument but does not autocorrect 161s registers an offense for a string followed by something 161s does not autocorrect String#% with variable argument and assignment 161s registers an offense for sprintf 161s does not register an offense for numbers 161s works if the first operand contains embedded expressions 161s does not register an offense for ambiguous cases 161s registers an offense for sprintf with 2 arguments 161s registers an offense for something followed by an array 161s when enforced style is sprintf 161s registers an offense for variable argument and assignment but does not autocorrect 161s registers an offense for String#% with a hash argument 161s does not register an offense for ambiguous cases 161s works if the first operand contains embedded expressions 161s registers an offense for a string followed by something 161s does not register an offense for numbers 161s registers an offense for format 161s registers an offense for something followed by an array 161s registers an offense for format with 2 arguments 161s registers an offense for variable argument but does not autocorrect 161s 161s RuboCop::Formatter::QuietFormatter 161s #report_summary 161s when 2 offenses are corrected 161s handles pluralization correctly 161s when 2 offenses detected 161s handles pluralization correctly 161s when no files inspected 161s handles pluralization correctly 161s when 2 offenses are corrected and 2 offenses correctable 161s handles pluralization correctly 161s when a file inspected and no offenses detected 161s handles pluralization correctly 161s when a offense detected and a offense correctable 161s handles pluralization correctly 161s when a offense detected 161s handles pluralization correctly 161s when an offense is corrected 161s prints about correction 161s when 2 offenses detected and 2 offenses correctable 161s handles pluralization correctly 161s #report_file 161s the file is outside of the current working directory 161s prints as absolute path 161s when the offense is not corrected 161s prints message as-is 161s when the offense is automatically corrected 161s prints [Corrected] along with message 161s the file is under the current working directory 161s prints as relative path 161s when the offense is correctable 161s prints message as-is 161s 161s RuboCop::Cop::Style::ClassVars 161s does not register an offense for class variable usage 161s registers an offense for class variable declaration 161s registers an offense for class variable set on class receiver 161s registers an offense for class variable set in class 161s 161s RuboCop::Cop::Security::MarshalLoad 161s registers an offense for using Marshal.restore 161s registers an offense for using Marshal.load 161s does not register an offense Marshal methods under another namespace 161s allows using dangerous Marshal methods for deep cloning 161s does not register an offense for Marshal.dump 161s 161s RuboCop::Cop::VariableForce::Variable 161s .new 161s when non variable declaration node is passed 161s raises error 161s #referenced? 161s when the variable is not assigned 161s is expected to be falsey 161s and the variable is referenced 161s is expected to be truthy 161s when the variable has an assignment 161s and the variable is not yet referenced 161s is expected to be falsey 161s and the variable is referenced 161s is expected to be truthy 161s 161s RuboCop::Cop::Layout::FirstParameterIndentation 161s consistent style 161s single line method defs 161s ignores with hash args 161s ignores 161s invalid indentation on multi-line defs 161s hash arguments static method def 161s registers an offense and corrects incorrectly indented first element 161s hash arguments 161s registers an offense and corrects incorrectly indented first element 161s normal arguments 161s registers an offense and corrects incorrectly indented first element 161s valid indentation on multi-line defs 161s accepts correctly indented first element 161s accepts correctly indented first element hash 161s valid indentation on static multi-line defs 161s accepts correctly indented first element 161s accepts correctly indented first element hash 161s no paren method defs 161s ignores with hash args 161s ignores 161s align_parentheses style 161s valid indentation on multi-line defs 161s accepts correctly indented first element 161s accepts correctly indented first element hash 161s single line method defs 161s ignores 161s ignores with hash args 161s no paren method defs 161s ignores with hash args 161s ignores 161s invalid indentation on multi-line defs 161s normal arguments 161s registers an offense and corrects incorrectly indented first element 161s hash arguments 161s registers an offense and corrects incorrectly indented first element 161s hash arguments static def 161s registers an offense and corrects incorrectly indented first element 161s 161s RuboCop::Cop::Style::SymbolArray 161s when EnforcedStyle is percent 161s does not register an offense if symbol contains whitespace 161s autocorrects arrays of symbols with embedded newlines and tabs 161s autocorrects arrays of symbols with new line 161s detects right value for MinSize to use for --auto-gen-config 161s registers an offense for arrays of symbols 161s uses %I when appropriate 162s does not register an offense for array starting with %i 162s doesn't break when a symbol contains ) 162s registers an offense in a non-ambiguous block context 162s autocorrects arrays of one symbol 162s detects when the cop must be disabled to avoid offenses 162s does not register an offense for array with non-syms 162s when PreferredDelimiters is specified 162s autocorrects an array using partial newlines 162s autocorrects an array with delimiters 162s autocorrects an array in multiple lines 162s when EnforcedStyle is brackets 162s autocorrects an array has interpolations 162s registers an offense for array starting with %i 162s autocorrects an array starting with %i 162s registers an offense for empty array starting with %i 162s autocorrects multiline %i array 162s does not register an offense for arrays of symbols 162s with non-default MinSize 162s does not autocorrect array of one symbol if MinSize > 1 162s 162s RuboCop::Cop::Style::SingleLineBlockParams 162s ignores do..end blocks 162s allows calls with proper argument names 162s reports an offense if the arguments names are wrong and not all arguments are given 162s reports an offense if the names are partially correct 162s does not report if the right names are used but not all arguments are given 162s ignores :reduce symbols 162s finds wrong argument names in calls with different syntax 162s does not report if no block arguments are present 162s finds incorrectly named parameters with leading underscores 162s allows an unused parameter to have a leading underscore 162s does not report when destructuring is used 162s reports an offense if the names are in reverse order 162s 162s RuboCop::Cop::Metrics::ModuleLength 162s accepts empty modules 162s rejects a module with more than 5 lines 162s accepts a module with less than 5 lines 162s does not count blank lines 162s reports the correct beginning and end lines 162s accepts a module with 5 lines 162s when inspecting a class defined with Module.new 162s registers an offense 162s when using numbered parameter 162s when inspecting a class defined with Module.new 162s registers an offense 162s when inspecting a class defined with ::Module.new 162s registers an offense 162s when inspecting a class defined with ::Module.new 162s registers an offense 162s when a module has inner modules 162s rejects a module with 6 lines that belong to the module directly 162s does not count lines of inner modules 162s when `CountAsOne` is not empty 162s folds array into one line 162s when CountComments is enabled 162s also counts commented lines 162s when a module has inner classes 162s does not count lines of inner classes 162s rejects a module with 6 lines that belong to the module directly 162s 162s RuboCop::Cop::Style::ExponentialNotation 162s EnforcedStyle is integral 162s registers no offense for a regular float 162s registers no offense for negative mantissa 162s registers no offense for negative exponent 162s registers an offense for mantissa divisible by 10 162s registers an offense for decimal mantissa 162s registers no offense for an integral mantissa 162s registers no offense for a float smaller than 1 162s EnforcedStyle is engineering 162s registers an offense for exponent equal to -2 162s registers no offense for a mantissa equal to 1 162s registers an offense for mantissa smaller than 0.1 162s registers no offense for a float smaller than 1 162s registers no offense for a negative exponent 162s registers an offense for exponent equal to 4 162s registers no offense for a regular float 162s registers no offense for a large mantissa 162s registers no offense for a negative mantissa 162s registers an offense for a mantissa greater than -0.1 162s registers an offense for mantissa smaller than -1000 162s EnforcedStyle is scientific 162s registers no offense for a negative exponent 162s registers no offense for a mantissa between 1 and 10 162s registers an offense for mantissa smaller than 1 162s registers an offense for mantissa equal to 10 162s registers no offense for a float smaller than 1 162s registers an offense for mantissa greater than 10 162s registers no offense for a mantissa equal to 1 162s registers no offense for a regular float 162s registers no offense for a negative mantissa 162s 162s RuboCop::Cop::Style::MultilineIfModifier 162s unless guard clause 162s allows a one liner 162s registers an offense 162s allows a multiline condition 162s registers an offense when indented 162s if guard clause 162s registers an offense when indented 162s registers an offense 162s allows a multiline condition 162s allows a one liner 162s 162s RuboCop::Cop::Style::CommentAnnotation 162s with default RequireColon configuration (colon + space) 162s accepts a comment that is obviously a code example 162s accepts upper case keyword with colon, space and note 162s accepts upper case keyword alone 162s accepts a keyword that is somewhere in a sentence 162s accepts a keyword that is just the beginning of a sentence 162s capitalized keyword 162s registers an offense and upcases 162s upper case keyword with colon but no note 162s registers an offense without autocorrection 162s multiline comment 162s only registers an offense on the first line 162s missing colon 162s registers an offense and adds colon 162s missing space after colon 162s registers an offense and adds space 162s lower case keyword 162s registers an offense and upcases 162s with multiword keywords 162s registers an offense for each matching keyword 162s upper case keyword with space but no note 162s registers an offense without autocorrection 162s with configured keyword 162s registers an offense for a missing colon after the word 162s offenses in consecutive inline comments 162s registers each of them 162s when a keyword is not in the configuration 162s accepts the word without colon 162s with RequireColon configuration set to false 162s accepts a comment that is obviously a code example 162s accepts a keyword that is somewhere in a sentence 162s accepts upper case keyword with colon, space and note 162s accepts upper case keyword alone 162s accepts a keyword that is just the beginning of a sentence 162s lower case keyword 162s registers an offense and upcases 162s upper case keyword with space but no note 162s registers an offense without autocorrection 162s with colon 162s registers an offense and removes colon 162s with configured keyword 162s registers an offense for containing a colon after the word 162s when a keyword is not in the configuration 162s accepts the word with colon 162s upper case keyword with colon but no note 162s registers an offense without autocorrection 162s offenses in consecutive inline comments 162s registers each of them 162s multiline comment 162s only registers an offense on the first line 162s 162s RuboCop::Cop::Lint::SymbolConversion 162s does not register an offense for a symbol that requires quotes 162s does not register an offense for a dstr 162s does not register an offense for a normal symbol 162s behaves like offense 162s registers an offense for :"foo" 162s behaves like offense 162s registers an offense for :foo.to_sym 162s single quoted symbol 162s does not register an offense 162s behaves like offense 162s registers an offense for :foo.intern 162s behaves like offense 162s registers an offense for "foo".to_sym 162s in an alias 162s does not register an offense 162s behaves like offense 162s registers an offense for "foo-bar".to_sym 162s behaves like offense 162s registers an offense for "foo".intern 162s behaves like offense 162s registers an offense for "foo_bar".to_sym 162s inside a percent literal array 162s does not register an offense 162s EnforcedStyle: consistent 162s with different quote styles 162s does not register an offense 162s with a mix of string and symbol keys 162s does not register an offense 162s with a key with = 162s requires symbols to be quoted 162s hash where keys are quoted but do not need to be 162s registers an offense 162s hash where no keys need to be quoted 162s does not register an offense 162s hash where there are keys needing quoting 162s registers an offense for unquoted keys 162s implicit `to_sym` call 162s does not register an offense 162s behaves like offense 162s registers an offense for "foo_bar".intern 162s behaves like offense 162s registers an offense for :"foo_bar" 162s in a hash 162s keys 162s does not register an offense for a require quoted symbol that contains `:` 162s does not register an offense for a normal symbol 162s registers and corrects an offense for a quoted symbol that ends with `!` 162s does not register an offense for operators 162s registers an offense for a quoted symbol 162s does not register an offense for a require quoted symbol that ends with `=` 162s does not register an offense for a require quoted symbol 162s registers and corrects an offense for a quoted symbol that ends with `?` 162s values 162s does not register an offense for a normal symbol 162s registers an offense for a quoted symbol key 162s registers an offense for a quoted symbol value 162s behaves like offense 162s registers an offense for "foo-bar".intern 162s 162s RuboCop::Cop::Style::EmptyBlockParameter 162s accepts a block that is do-end style without parameter 162s registers an offense for an empty block parameter with lambda 162s accepts an empty block parameter with a lambda 162s registers an offense for an empty block parameter with {} style 162s registers an offense for an empty block parameter with super 162s accepts a non-empty block parameter with do-end style 162s accepts a block that is {} style without parameter 162s registers an offense for an empty block parameter with do-end style 162s accepts a non-empty block parameter with {} style 162s 162s RuboCop::Cop::Lint::RequireParentheses 162s accepts method call with parentheses in ternary 162s accepts method calls without parentheses followed by keyword and/or 162s accepts missing parentheses around expression with + operator 162s registers an offense for missing parentheses around expression with || operator 162s registers an offense for missing parentheses around expression with && operator 162s accepts missing parentheses when method is not a predicate 162s accepts calls to methods that are operators 162s accepts parentheses around expression with boolean operator 162s accepts method calls that are all operations 162s accepts condition that is not a call 162s registers an offense for missing parentheses around expression in ternary 162s accepts missing parentheses when using ternary operator 162s accepts calls to methods that are setters 162s accepts missing parentheses when using ternary operator in square bracksts 162s when using safe navigation operator 162s registers an offense for missing parentheses around expression with && operator 162s 162s RuboCop::Cop::Style::MagicCommentFormat 162s all issues at once 162s registers and corrects multiple issues 162s snake case style 162s registers an offense for kebab case in emacs style 162s registers an offense for kebab case 162s accepts a magic comments in snake case 162s registers an offense for mixed case 162s does not register an offense for incorrect style in comments after the first statement 162s does not register an offense for dashes in other comments 162s accepts a source with no tokens 162s accepts a frozen string literal in snake case in emacs style 162s accepts an empty source 162s invalid config 162s DirectiveCapitalization 162s raises an error 162s ValueCapitalization 162s raises an error 162s ValueCapitalization 162s when lowercase 162s registers an offense and corrects when the case does not match 162s when uppercase 162s registers an offense and corrects when the case does not match 162s when not set 162s does not change the case of magic comment directives 162s DirectiveCapitalization 162s when uppercase 162s registers an offense and corrects when the case does not match 162s when lowercase 162s registers an offense and corrects when the case does not match 162s when not set 162s does not change the case of magic comment directives 162s kebab case style 162s does not register an offense for incorrect style in comments after the first statement 162s registers an offense for mixed case 162s registers an offense for snake case 162s accepts a frozen string literal in snake case in emacs style 162s accepts an empty source 162s does not register an offense for dashes in other comments 162s accepts a source with no tokens 162s registers an offense for snake case in emacs style 162s accepts a magic comments in kebab case 162s 162s RuboCop::Cop::Style::NilLambda 162s stabby lambda 162s does not register an offense when doing more than returning nil 162s registers an offense when returning nil implicitly 162s registers an offense when returning nil with `return` 162s registers an offense when returning nil with `next` 162s does not register an offense when not returning nil 162s properly corrects multiline 162s registers an offense when returning nil with `break` 162s Proc.new 162s registers an offense when returning nil with `return` 162s registers an offense when returning nil with `next` 162s registers an offense when returning nil implicitly 162s registers an offense when returning nil with `break` 162s does not register an offense when doing more than returning nil 162s does not remove block params or change spacing 162s does not register an offense when not returning nil 162s properly corrects single line 162s block lambda 162s does not register an offense when not returning nil 162s registers an offense when returning nil with `next` 162s registers an offense when returning nil with `return` 162s does not register an offense when doing more than returning nil 162s does not remove block params or change spacing 162s properly corrects single line 162s registers an offense when returning nil with `break` 162s registers an offense when returning nil implicitly 162s proc 162s does not register an offense when not returning nil 162s properly corrects single line 162s does not remove block params or change spacing 162s does not register an offense when doing more than returning nil 162s registers an offense when returning nil implicitly 162s registers an offense when returning nil with `next` 162s registers an offense when returning nil with `break` 162s registers an offense when returning nil with `return` 162s 162s RuboCop::Cop::Security::JSONLoad 162s allows JSON.dump 162s registers an offense and corrects JSON.load 162s registers an offense and corrects JSON.restore 162s does not register an offense for JSON under another namespace 162s allows JSON.parse 162s 162s RuboCop::Cop::Style::ColonMethodCall 162s registers an offense for instance method call with arg 162s does not register an offense for op methods 162s registers an offense for instance method call 162s does not register an offense for constant access 162s registers an offense for class method call 162s does not register an offense for Java static types 162s does not register an offense for Java package namespaces 162s does not register an offense when for constructor methods 162s does not register an offense for nested class 162s registers an offense for class method call with arg 162s 162s RuboCop::Cop::Style::DisableCopsWithinSourceCodeDirective 162s registers an offense for disabled cop within source code 162s registers an offense for disabling all cops 162s registers an offense for enabled cop within source code 162s with AllowedCops 162s when using leading source comment 162s does not register an offense 162s when an non-allowed cop is disabled 162s registers an offense and corrects 162s when an mix of cops are disabled 162s registers an offense and corrects 162s when an allowed cop is disabled 162s does not register an offense 162s 162s RuboCop::Cop::Bundler::InsecureProtocolSource 162s does not register an offense when using `source 'https://rubygems.org'` 162s registers an offense when using `source :rubygems` 162s registers an offense when using `source :gemcutter` 162s registers an offense when using `source :rubyforge` 162s when `AllowHttpProtocol: true` 162s does not register an offense when using `source 'http://rubygems.org'` 162s when `AllowHttpProtocol: false` 162s registers an offense when using `source 'http://rubygems.org'` 162s 162s RuboCop::Cop::Lint::NoReturnInBeginEndBlocks 162s accepts a block with no return when using -= 162s rejects a return statement inside a block when using = 162s rejects a return statement inside a block when using *= 162s accepts a block with no return when using ||= 162s rejects a return statement inside a block when using ||= 162s rejects a return statement inside a block when using += 162s accepts a block with no return when using += 162s rejects a return statement inside a block when using /= 162s rejects a return statement inside a block when using -= 162s accepts a block with no return when using **= 162s accepts a block with no return when using = 162s rejects a return statement inside a block when using **= 162s accepts a block with no return when using *= 162s accepts a block with no return when using /= 162s 162s RuboCop::Cop::Style::MinMax 162s with an array literal containing calls to `#min` and `#max` 162s when the expression is used as a return value 162s does not register an offense if the receivers do not match 162s registers an offense if the receivers match 162s does not register an offense if the receiver is implicit 162s does not register an offense if there are additional elements 162s when the expression is used in a parallel assignment 162s does not register an offense if there are additional elements 162s registers an offense if the receivers match 162s does not register an offense if the receiver is implicit 162s does not register an offense if the receivers do not match 162s when the expression stands alone 162s does not register an offense if there are additional elements 162s registers an offense if the receivers match 162s does not register an offense if the receiver is implicit 162s does not register an offense if the receivers do not match 162s 162s RuboCop::Cop::Lint::SuppressedException 162s with AllowComments set to false 162s does not register an offense for rescue with body 162s registers an offense for empty rescue block 162s when empty rescue for `def` 162s registers an offense for empty rescue with comment 162s registers an offense for empty rescue without comment 162s with AllowNil set to false 162s registers an offense for rescue block with nil 162s registers an offense for inline nil rescue 162s with AllowNil set to true 162s does not register an offense for inline nil rescue 162s does not register an offense for rescue block with nil 162s when empty rescue for defs 162s registers an offense for empty rescue without comment 162s registers an offense for empty rescue with comment 162s Ruby 2.5 or higher 162s when empty rescue for `do` block 162s registers an offense for empty rescue without comment 162s registers an offense for empty rescue with comment 162s with AllowComments set to true 162s registers an offense for empty rescue on single line with a comment after it 162s does not register an offense for empty rescue with comment 162s Ruby 2.5 or higher 162s when empty rescue for `do` block 162s does not register an offense for empty rescue with comment 162s registers an offense for empty rescue without comment 162s when empty rescue for `def` 162s registers an offense for empty rescue without comment 162s does not register an offense for empty rescue with comment 162s when empty rescue for `defs` 162s does not register an offense for empty rescue with comment 162s registers an offense for empty rescue without comment 162s Ruby 2.7 or higher 162s when empty rescue for `do` block with a numbered parameter 162s does not register an offense for empty rescue with comment 162s registers an offense for empty rescue without comment 162s 162s RuboCop::Cop::Style::CombinableLoops 162s when looping method 162s does not register an offense when the same loops are interleaved with some code 162s does not register an offense when the same loop method is used over different collections 162s registers an offense when looping over the same data as previous loop 162s does not register an offense when each branch contains the same single loop over the same collection 162s does not register an offense for when the same method with different arguments 162s does not register an offense when different loop methods are used over the same collection 162s does not register an offense for when the same method with different arguments and safe navigation 162s Ruby 2.7 162s registers an offense when looping over the same data as previous loop in numblocks 162s when for loop 162s does not register an offense when the same loop method is used over different collections 162s registers an offense when looping over the same data as previous loop 162s does not register an offense when each branch contains the same single loop over the same collection 162s does not register an offense when the same loops are interleaved with some code 162s 162s RuboCop::Cop::VisibilityHelp 162s #node_visibility 162s with inline public 162s is expected to eq :public 162s with inline private 162s is expected to eq :private 162s with visibility block private after public 162s is expected to eq :private 162s without visibility block 162s is expected to eq :public 162s with visibility block private 162s is expected to eq :private 162s with visibility block public 162s is expected to eq :public 162s with inline private with symbol 162s is expected to eq :private 162s 162s RuboCop::Cop::Naming::PredicateName 162s with permitted predicate names 162s accepts method name which is in permitted list 162s without method definition macros 162s accepts method name when corrected name is invalid identifier 162s registers an offense when using `define_method` 162s does not register any offenses when using an internal affair macro 162s with restricted prefixes 162s registers an offense when method name starts with "is" 162s registers an offense when method name starts with "has" 163s accepts method name when corrected name is invalid identifier 163s accepts method name that starts with unknown prefix 163s accepts method name that is an assignment 163s without restricted prefixes 163s registers an offense when method name starts with "has" 163s accepts method name that starts with unknown prefix 163s accepts method name when corrected name is invalid identifier 163s registers an offense when method name starts with "is" 163s with method definition macros 163s registers an offense when using an internal affair macro 163s accepts method name when corrected name is invalid identifier 163s registers an offense when using `define_method` 163s 163s RuboCop::Cop::Lint::RefinementImportMethods 163s Ruby <= 3.0 163s does not register an offense when using `prepend` in `refine` block 163s does not register an offense when using `include` in `refine` block 163s Ruby >= 3.1 163s registers an offense when using `include` in `refine` block 163s registers an offense when using `prepend` in `refine` block 163s does not register an offense when using `import_methods` in `refine` block 163s does not register an offense when using `include` with a receiver in `refine` block 163s 163s RuboCop::Cop::Layout::EndAlignment 163s accepts matching if ... end 163s accepts matching puts 1; case ... end 163s registers an offense for mismatched module Test end and autocorrects 163s registers an offense for mismatched while test end and autocorrects 163s registers an offense for mismatched case a when b end and autocorrects 163s accepts matching puts 1; until ... end 163s accepts matching class ... end 163s registers an offense for mismatched puts 1; class Test end and autocorrects 163s registers an offense for mismatched puts 1; until test end and autocorrects 163s accepts matching until ... end 163s registers an offense for mismatched if test end and autocorrects 163s accepts matching unless ... end 163s registers an offense for mismatched puts 1; case a when b end and autocorrects 163s registers an offense for mismatched until test end and autocorrects 163s accepts matching puts 1; while ... end 163s accepts matching puts 1; module ... end 163s registers an offense for mismatched puts 1; unless test end and autocorrects 163s registers an offense for mismatched unless test end and autocorrects 163s registers an offense for mismatched puts 1; while test end and autocorrects 163s can handle ternary if 163s accepts matching while ... end 163s registers an offense for mismatched module Test end and autocorrects 163s registers an offense for mismatched puts 1; class Test end and autocorrects 163s accepts matching puts 1; unless ... end 163s accepts matching puts 1; class ... end 163s accepts matching class ... end 163s can handle modifier if 163s accepts matching case ... end 163s accepts matching puts 1; if ... end 163s accepts matching module ... end 163s registers an offense for mismatched puts 1; if test end and autocorrects 163s correct + opposite 163s registers an offense and corrects 163s when EnforcedStyleAlignWith is variable 163s registers an offense for mismatched puts 1; while test end and autocorrects 163s registers an offense for mismatched puts 1; until test end and autocorrects 163s registers an offense for mismatched puts 1; class Test end and autocorrects 163s registers an offense for mismatched unless test end and autocorrects 163s registers an offense for mismatched class Test end and autocorrects 163s registers an offense for mismatched module Test end and autocorrects 163s accepts matching if ... end 163s registers an offense for mismatched puts 1; case a when b end and autocorrects 163s registers an offense for mismatched until test end and autocorrects 163s registers an offense for mismatched while test end and autocorrects 163s accepts matching class ... end 163s accepts matching module ... end 163s register an offense when using `+` operator method and `end` is not aligned 163s register an offense when using a conditional statement in a method argument and `end` is not aligned 163s registers an offense for mismatched puts 1; if test end and autocorrects 163s accepts matching puts 1; module ... end 163s accepts matching case ... end 163s register an offense when using `-` operator method and `end` is not aligned 163s accepts matching puts 1; case ... end 163s accepts matching until ... end 163s registers an offense for mismatched if test end and autocorrects 163s accepts matching unless ... end 163s accepts matching puts 1; unless ... end 163s accepts matching puts 1; while ... end 163s registers an offense for mismatched case a when b end and autocorrects 163s accepts matching puts 1; class ... end 163s accepts matching while ... end 163s registers an offense for mismatched puts 1; module Test end and autocorrects 163s accepts matching puts 1; until ... end 163s accepts matching puts 1; if ... end 163s registers an offense for mismatched puts 1; unless test end and autocorrects 163s regarding assignment 163s when EnforcedStyleAlignWith is keyword 163s accepts matching var = unless ... end 163s accepts matching var = if ... end 163s accepts matching var = until ... end 163s registers an offense for mismatched var = while test end and autocorrects 163s registers an offense for mismatched var = until test end and autocorrects 163s registers an offense for mismatched var << until test end and autocorrects 163s registers an offense for mismatched var = if test end and autocorrects 163s registers an offense for mismatched var = unless test end and autocorrects 163s accepts matching var = case ... end 163s accepts matching var[0] = case ... end 163s accepts matching var = while ... end 163s when EnforcedStyleAlignWith is variable 163s registers an offense for mismatched var = until test end.j and autocorrects 163s registers an offense for mismatched var = if test end and autocorrects 163s accepts matching var = unless ... end 163s registers an offense for mismatched var = while test end and autocorrects 163s registers an offense for mismatched h[k] = if test end and autocorrects 163s registers an offense for mismatched var = unless test end and autocorrects 163s accepts matching $var = if ... end 163s accepts matching var = until ... end 163s accepts matching var << if ... end 163s registers an offense for mismatched var ||= if test end and autocorrects 163s registers an offense for mismatched var = until test end and autocorrects 163s registers an offense for mismatched var = until test do_something end and autocorrects 163s registers an offense for mismatched var << case a when b end and autocorrects 163s accepts matching var = if ... end 163s accepts matching var += if ... end 163s registers an offense for mismatched a, b = if test end and autocorrects 163s registers an offense for mismatched @@var << if test end and autocorrects 163s registers an offense for mismatched @var = if test end and autocorrects 163s registers an offense for mismatched var << until test end and autocorrects 163s registers an offense for mismatched $var << if test end and autocorrects 163s accepts matching var = until ... end 163s registers an offense for mismatched @@var = if test end and autocorrects 163s registers an offense for mismatched var = unless test end and autocorrects 163s accepts matching var = case ... end 163s registers an offense for mismatched @var << if test end and autocorrects 163s accepts matching var = if ... end 163s registers an offense for mismatched CNST << if test end and autocorrects 163s accepts matching h.k = if ... end 163s registers an offense for mismatched var << unless test end and autocorrects 163s accepts matching CNST = if ... end 163s registers an offense for mismatched var &&= if test end and autocorrects 163s registers an offense for mismatched var = case a when b end and autocorrects 163s accepts matching var &&= if ... end 163s registers an offense for mismatched $var = if test end and autocorrects 163s accepts matching @@var = if ... end 163s registers an offense for mismatched h.k = if test end and autocorrects 163s registers an offense for mismatched var[x] = while test end and autocorrects 163s registers an offense for mismatched CNST = if test end and autocorrects 163s accepts matching var ||= if ... end 163s accepts matching var = while ... end 163s registers an offense for mismatched var = if test end and autocorrects 163s registers an offense for mismatched var = # comment while test end and autocorrects 163s registers an offense for mismatched var << if test end and autocorrects 163s accepts matching @var = if ... end 163s accepts matching var = until ... end 163s accepts matching a, b = if ... end 163s registers an offense for mismatched h[k] << if test end and autocorrects 163s registers an offense for mismatched var += if test end and autocorrects 163s accepts matching h[k] = if ... end 163s case as argument 163s when EnforcedStyleAlignWith is keyword 163s accepts matching test case ... end 163s registers an offense for mismatched test case a when b end and autocorrects 163s when EnforcedStyleAlignWith is variable 163s accepts matching test case ... end 163s registers an offense for mismatched test case a when b end and autocorrects 163s when EnforcedStyleAlignWith is start_of_line 163s registers an offense for mismatched test case a when b end and autocorrects 163s accepts matching test case a when b ... end 163s when end is preceded by something else than whitespace 163s does not register an offense 163s when EnforcedStyleAlignWith is start_of_line 163s accepts matching var = while ... end 163s registers an offense for mismatched unless test end and autocorrects 163s accepts matching puts 1; unless ... end 163s registers an offense for mismatched var << until test end and autocorrects 163s registers an offense for mismatched var = until test end and autocorrects 163s accepts matching var = unless ... end 163s registers an offense for mismatched var << while test end and autocorrects 163s registers an offense for mismatched var << case a when b end and autocorrects 163s registers an offense for mismatched while test end and autocorrects 163s accepts matching puts 1; module ... end 163s accepts matching puts 1; while ... end 163s accepts matching var = if ... end 163s accepts matching puts 1; if ... end 163s registers an offense for mismatched var << unless test end and autocorrects 163s registers an offense for mismatched puts(if test end) and autocorrects 163s accepts matching puts 1; class ... end 163s accepts matching var = if ... end 163s registers an offense for mismatched var << if test end and autocorrects 163s registers an offense for mismatched puts 1; module Test end and autocorrects 163s accepts matching var << while ... end 163s registers an offense for mismatched puts 1; while test end and autocorrects 163s registers an offense for mismatched module Test end and autocorrects 163s registers an offense for mismatched var = case a when b end and autocorrects 163s registers an offense for mismatched var = while test end and autocorrects 163s registers an offense for mismatched var = unless test end and autocorrects 163s registers an offense for mismatched case a when b end and autocorrects 163s registers an offense for mismatched puts 1; case a when b end and autocorrects 163s registers an offense for mismatched puts 1; unless test end and autocorrects 163s accepts matching var = case ... end 163s registers an offense for mismatched class Test end and autocorrects 163s registers an offense for mismatched puts 1; until test end and autocorrects 163s registers an offense for mismatched var = if test end and autocorrects 163s registers an offense for mismatched until test end and autocorrects 163s registers an offense for mismatched puts 1; if test end and autocorrects 163s accepts matching puts 1; case ... end 163s registers an offense for mismatched if test end and autocorrects 163s accepts matching var = until ... end 163s registers an offense for mismatched puts 1; class Test end and autocorrects 163s registers an offense for mismatched var = if test end and autocorrects 163s accepts matching puts 1; until ... end 163s 163s RuboCop::Cop::Style::HashConversion 163s wraps complex statements in parens if needed 163s reports different offense for hash argument Hash[] 163s reports an offense for single-argument Hash[] 163s does not try to correct multi-argument Hash with odd number of arguments 163s registers and corrects an offense when using multi-argument `Hash[]` as a method argument 163s reports different offense for Hash[(a || b)] 163s registers and corrects an offense when using argumentless `zip` with parentheses in `Hash[]` 163s reports different offense for Hash[a || b] 163s reports different offense for Hash[(a && b)] 163s reports different offense for Hash[a && b] 163s reports different offense for empty Hash[] 163s reports different offense for hash argument Hash[] as a method argument with parentheses 163s registers and corrects an offense when using `zip` with argument in `Hash[]` 163s registers and corrects an offense when using argumentless `zip` without parentheses in `Hash[]` 163s reports different offense for hash argument Hash[] as a method argument without parentheses 163s reports different offense for multi-argument Hash[] 163s AllowSplatArgument: true 163s does not register an offense for unpacked array 163s AllowSplatArgument: false 163s reports uncorrectable offense for unpacked array 163s 163s RuboCop::Cop::Naming::MemoizedInstanceVariableName 163s does not register an offense when or-assignment-based memoization is used outside a method definition 163s EnforcedStyleForLeadingUnderscores: optional 163s when or-assignment-based memoization is used 163s memoized variable matches method name 163s does not register an offense with a leading underscore 163s does not register an offense with a leading `_` for both names 163s does not register an offense without a leading underscore 163s does not register an offense with a leading `_` for method name 163s when defined?-based memoization is used 163s memoized variable matches method name 163s does not register an offense with a leading `_` for method name 163s does not register an offense with a leading `_` for both names 163s does not register an offense without a leading underscore 163s does not register an offense with a leading underscore 163s EnforcedStyleForLeadingUnderscores: required 163s when or-assignment-based memoization is used 163s registers an offense when names match but missing a leading _ 163s does not register an offense with a leading `_` for both names 163s registers an offense when it has leading `_` but names do not match 163s with dynamically defined methods 163s when the variable name matches the method name 163s does not register an offense 163s when the variable name does not match the method name 163s registers an offense 163s when a method is defined inside a module callback 163s when the method does not match 163s registers an offense 163s when the method matches 163s does not register an offense 163s when a singleton method is defined inside a module callback 163s when the method does not match 163s registers an offense 163s when the method matches 163s does not register an offense 163s when defined?-based memoization is used 163s registers an offense when names match but missing a leading _ 163s registers an offense when it has leading `_` but names do not match 163s does not register an offense with a leading `_` for both names 163s with dynamically defined methods 163s when a method is defined inside a module callback 163s when the method does not match 163s registers an offense 163s when the method matches 163s does not register an offense 163s when the variable name matches the method name 163s does not register an offense 163s when the variable name does not match the method name 163s registers an offense 163s when a singleton method is defined inside a module callback 163s when the method matches 163s does not register an offense 163s when the method does not match 163s registers an offense 163s with default EnforcedStyleForLeadingUnderscores => disallowed 163s when defined?-based memoization is used 163s registers an offense when memoized variable does not match method name 163s does not register an offense when some code before defined 163s registers an offense when memoized variable does not match class method name 163s does not register an offense when some code after assignment 163s does not register an offense when there is no assignment 163s with dynamically defined methods 163s when a singleton method is defined inside a module callback 163s when the method matches 163s does not register an offense 163s when the method does not match 163s registers an offense 163s when a method is defined inside a module callback 163s when the method does not match 163s registers an offense 163s when the method matches 163s does not register an offense 163s when the variable name does not match the method name 163s registers an offense 163s when the variable name matches the method name 163s does not register an offense 163s memoized variable matches method name 163s does not register an offense when memoized variable matches predicate method name 163s does not register an offense when memoized variable matches bang method name 163s does not register an offense when method has leading `_` 163s does not register an offense 163s does not register an offense with a leading `_` for both names 163s non-memoized variable does not match method name 163s does not register an offense 163s when or-assignment-based memoization is used 163s memoized variable does not match method name for block 163s registers an offense 163s memoized variable does not match class method name 163s registers an offense 163s memoized variable after other code does not match method name 163s registers an offense for a bang method 163s registers an offense 163s registers an offense for a predicate method 163s memoized variable matches method name 163s does not register an offense when method has leading `_` 163s does not register an offense with a leading `_` for both names 163s does not register an offense 163s memoized variable matches predicate method name 163s does not register an offense 163s non-memoized variable does not match method name 163s does not register an offense 163s code follows memoized variable assignment 163s does not register an offense 163s instance variables in initialize methods 163s does not register an offense 163s memoized variable after other code 163s does not register an offense 163s memoized variable matches method name during assignment 163s does not register an offense 163s memoized variable matches bang method name 163s does not register an offense 163s memoized variable matches method name for block 163s does not register an offense 163s memoized variable does not match method name during assignment 163s registers an offense 163s with dynamically defined methods 163s when a method is defined inside a module callback 163s when the method matches 163s does not register an offense 163s when the method does not match 163s registers an offense 163s when the variable name does not match the method name 163s registers an offense 163s when the variable name matches the method name 163s does not register an offense 163s when a singleton method is defined inside a module callback 163s when the method matches 163s does not register an offense 163s when the method does not match 163s registers an offense 163s memoized variable does not match method name 163s registers an offense 163s 163s RuboCop::Cop::Gemspec::RubyVersionGlobalsUsage 163s registers an offense when using `::RUBY_VERSION` 163s does not register an offense when no `RUBY_VERSION` 163s registers an offense when using `RUBY_VERSION` 163s 163s RuboCop::Cop::Lint::DuplicateRescueException 163s registers an offense when duplicate exception exists within rescues with `else` branch 163s registers an offense when duplicate exception splat exists 163s registers an offense when duplicate exception exists within rescues with empty `rescue` branch 163s registers an offense when multiple duplicate exceptions exist 163s registers an offense when duplicate exception exists 163s does not register an offense when there are no duplicate exceptions 163s 163s RuboCop::Cop::Style::NestedParenthesizedCalls 163s on a nested, parenthesized method call 163s doesn't register an offense 163s on a deeply nested argument 163s doesn't register an offense 163s backslash newline in method call 163s registers an offense 163s on a permitted method 163s doesn't register an offense 163s on a call to a setter method 163s doesn't register an offense 163s on a method call with no arguments 163s doesn't register an offense 163s on a non-parenthesized call nested in a parenthesized one 163s with a single argument to the nested call 163s registers an offense 163s when using safe navigation operator 163s registers an offense 163s with multiple arguments to the nested call 163s registers an offense 163s on a non-parenthesized method call 163s doesn't register an offense 163s on an aref, nested in a parenthesized method call 163s doesn't register an offense 163s on a call with no arguments, nested in a parenthesized one 163s doesn't register an offense 163s 163s RuboCop::Cop::Layout::ClassStructure 163s registers an offense and corrects when xstr heredoc constant is defined after public method 163s registers an offense and corrects when str heredoc constant is defined after public method 163s registers an offense and corrects when dstr heredoc constant is defined after public method 163s registers an offense and corrects when there is a comment in the macro method 163s registers an offense and corrects when literal constant is after method definitions 163s when the first line ends with a comment 163s reports an offense and swaps the lines 163s simple example 163s is expected to eq "class Person\n include AnotherModule\n extend SomeModule\n CONST = 'wrong place'\nend\n" 163s with protected methods declared before private 163s is expected to eq class MyClass 163s def public_method 163s end 163s 163s private 163s 163s def first_private...ar before `private_methods`. 163s end 163s 163s def second_protected_method 163s end 163s end 163s with attribute macros before after validations 163s is expected to eq class Person 163s include AnotherModule 163s extend SomeModule 163s 163s CustomError = Cla...rivate :other_public_method 163s 163s private 163s 163s def some_private_method 163s end 163s end 163s constant is not a literal 163s registers offense but does not autocorrect 163s with a complete ordered example 163s does not create offense 163s when def modifier is used 163s registers an offense and corrects public method without modifier declared after private method with modifier 163s registers an offense and corrects public method after private method marked by its name 163s registers an offense and corrects public method with modifier declared after private method with modifier 163s initializer is private and comes after attribute macro 163s registers an offense and autocorrects 163s 163s RuboCop::Cop::Layout::ParameterAlignment 163s aligned with first parameter 163s registers an offense and corrects alignment in simple case 163s doesn't get confused by splat 163s registers an offense and corrects parameters with double indent 163s registers an offense and corrects parameters with single indent 163s accepts proper indentation 163s accepts a method definition without parameters 163s accepts parameter lists on a single line 163s accepts the first parameter being on a new row 163s defining self.method 163s registers an offense and corrects parameters with single indent 163s accepts proper indentation 163s aligned with fixed indentation 163s accepts parameter lists on a single line 163s registers an offense and corrects parameters aligned to first param 163s accepts proper indentation 163s registers an offense and corrects parameters with double indent 163s accepts the first parameter being on a new row 163s accepts a method definition without parameters 163s doesn't get confused by splat 163s defining self.method 163s accepts proper indentation 163s registers an offense and corrects parameters aligned to first param 163s 163s RuboCop::Cop::Layout::ExtraSpacing 163s when ForceEqualSignAlignment is true 163s register offenses and correct complex nested assignments 163s registers an offense and corrects consecutive aref assignments which are not aligned 163s does not register an offense if assignments are aligned 163s register offenses and correct consecutive attribute assignments which are not aligned 163s does not register offenses for multiple complex nested assignments 163s register offenses and correct consecutive operator assignments which are not aligned 163s registers an offense and corrects consecutive assignments that are not aligned 163s does not register an offense when optarg equals is not aligned with assignment equals sign 163s does not register alignment errors on outdented lines 163s does not register an offense if assignments are separated by blanks 163s aligns the first assignment with the following assignment 163s when AllowBeforeTrailingComments is 163s false 163s regsiters offense 163s does not trigger on only one space before comment 163s true 163s allows it 163s doesn't interfere with AllowForAlignment 163s being false 163s such as aligning long assignment expressions that include line breaks 163s registers offense(s) 163s such as aligning = on lines where there are trailing comments 163s registers offense(s) 163s such as aligning tokens with empty line between 163s does not register an offense 163s such as aligning trailing comments 163s does not register an offense 164s such as aligning with the same character 164s registers offense(s) 164s such as lining up assignments with empty lines and comments in between 164s registers offense(s) 164s such as lining up different kinds of assignments 164s registers offense(s) 164s such as lining up assignments 164s registers offense(s) 164s such as aligning comments on non-adjacent lines 164s registers offense(s) 164s being true 164s such as aligning with the same character 164s allows it 164s such as lining up different kinds of assignments 164s allows it 164s such as aligning comments on non-adjacent lines 164s allows it 164s such as aligning long assignment expressions that include line breaks 164s allows it 164s such as lining up assignments with empty lines and comments in between 164s allows it 164s such as aligning tokens with empty line between 164s allows it 164s such as aligning = on lines where there are trailing comments 164s allows it 164s such as lining up assignments 164s allows it 164s such as aligning trailing comments 164s allows it 164s when AllowForAlignment is true 164s registers an offense and corrects double extra spacing in variable assignment 164s registers an offense and corrects alignment with token not preceded by space 164s registers an offense and corrects extra space before a float 164s accepts space between key and value in a hash with hash rockets 164s accepts aligned values of an implicit hash literal 164s ignores whitespace inside a string 164s ignores trailing whitespace 164s registers an offense and corrects extra spacing in class inheritance 164s ignores whitespace at the beginning of the line 164s registers an offense and corrects extra spacing before a unary plus in an argument list 164s when spaces are present in a single-line hash literal 164s registers an offense and corrects hashes with hash rockets 164s registers an offense and corrects hashes with symbol keys 164s with extra spacing for alignment purposes 164s such as aligning comments on non-adjacent lines 164s allows it 164s such as aligning with the same character 164s allows it 164s such as lining up different kinds of assignments 164s allows it 164s such as aligning tokens with empty line between 164s allows it 164s such as aligning = on lines where there are trailing comments 164s allows it 164s such as lining up assignments with empty lines and comments in between 164s allows it 164s such as aligning trailing comments 164s allows it 164s such as lining up assignments 164s allows it 164s such as aligning long assignment expressions that include line breaks 164s allows it 164s when AllowForAlignment is false 164s accepts aligned values of an implicit hash literal 164s registers an offense and corrects extra spacing before a unary plus in an argument list 164s accepts space between key and value in a hash with hash rockets 164s ignores whitespace inside a string 164s registers an offense and corrects extra spacing in class inheritance 164s ignores trailing whitespace 164s ignores whitespace at the beginning of the line 164s registers an offense and corrects double extra spacing in variable assignment 164s registers an offense and corrects alignment with token not preceded by space 164s registers an offense and corrects extra space before a float 164s with extra spacing for alignment purposes 164s such as lining up different kinds of assignments 164s registers offense(s) 164s such as aligning trailing comments 164s registers offense(s) 164s such as lining up assignments with empty lines and comments in between 164s registers offense(s) 164s such as lining up assignments 164s registers offense(s) 164s such as aligning tokens with empty line between 164s registers offense(s) 164s such as aligning long assignment expressions that include line breaks 164s registers offense(s) 164s such as aligning = on lines where there are trailing comments 164s registers offense(s) 164s such as aligning with the same character 164s registers offense(s) 164s such as aligning comments on non-adjacent lines 164s registers offense(s) 164s when spaces are present in a single-line hash literal 164s registers an offense and corrects hashes with hash rockets 164s registers an offense and corrects hashes with symbol keys 164s 164s RuboCop::ConfigRegeneration 164s #options 164s when there is a blank todo file 164s is expected to eq {:auto_gen_config=>true} 164s it parses options from the generation comment 164s is expected to eq {:auto_gen_config=>true, :auto_gen_only_exclude=>true, :auto_gen_timestamp=>false, :exclude_limit=>"100", :offense_counts=>false} 164s when no todo file exists 164s is expected to eq {:auto_gen_config=>true} 164s when the todo file is malformed 164s is expected to eq {:auto_gen_config=>true} 164s 164s RuboCop::Cop::InternalAffairs::MethodNameEndWith 164s registers an offense if there is potentially usage of `assignment_method?` 164s does not register offense if argument for end_with? is some other string 164s registers offense if there is potentially usage of `bang_method?` 164s registers offense if there is potentially usage of `predicate_method?` 164s registers an offense if `method_name` is a variable and there is potentially usage of `assignment_method?` 164s registers offense if there is potentially usage of `bang_method?` with safe navigation operator 164s Ruby >= 2.7 164s registers an offense if method_name is symbol 164s registers offense if argument for Symbol#end_with? is '!' with safe navigation operator 164s registers offense if argument for Symbol#end_with? is '?' 164s registers an offense if method_name is symbol with safe navigation operator 164s registers offense if argument for Symbol#end_with? is '!' 164s does not register offense if argument for Symbol#end_with? is some other string 164s registers offense if argument for Symbol#end_with? is '?' with safe navigation operator 164s 164s RuboCop::Cop::Metrics::BlockNesting 164s accepts `Max` levels of nesting 164s accepts if/elsif 164s `Max + 2` levels of `if` nesting 164s registers an offense 164s Multiple nested `ifs` at same level 164s registers 2 offenses 164s nested modifier `while` 164s registers an offense 164s nested `for` 164s registers an offense 164s `Max + 1` levels of `if` nesting 164s registers an offense 164s when CountBlocks is true 164s nested multiline block 164s registers an offense 164s nested inline block 164s registers an offense 164s nested `while` 164s registers an offense 164s nested `case` 164s registers an offense 164s nested `rescue` 164s registers an offense 164s nested modifier `until` 164s registers an offense 164s when CountBlocks is false 164s accepts nested inline blocks 164s accepts nested multiline blocks 164s nested `until` 164s registers an offense 164s 164s RuboCop::Cop::InternalAffairs::OffenseLocationKeyword 164s does not register an offense when the `loc` is on a child node 164s does not register an offense when the `loc` is on a different node 164s when `node.loc.selector` is passed 164s registers an offense if message argument is passed 164s registers an offense 164s 164s RuboCop::Cop::VariableForce::Scope 164s #each_node 164s outer scope boundary handling 164s when the scope is singleton method 164s yields the argument and the body nodes 164s when the scope is instance method 164s yields the argument and the body nodes 164s when the scope is class 164s yields the body nodes 164s when the scope is top level 164s yields the body nodes 164s when the scope is singleton class 164s yields the body nodes 164s when the scope is block 164s yields the argument and the body nodes 164s when the scope is module 164s yields the body nodes 164s inner scope boundary handling 164s when there's a singleton method definition 164s yields only the defs node and the method host node 164s when there's a method invocation with block 164s yields only the block node and the child send node 164s #body_node 164s when the scope is top level 164s returns the body node 164s when the scope is singleton method 164s returns the body node 164s when the scope is instance method 164s returns the body node 164s when the scope is module 164s returns the body node 164s when the scope is singleton class 164s returns the body node 164s when the scope is class 164s returns the body node 164s when the scope is block 164s returns the body node 164s #include? 164s with child node the scope includes 164s is expected to equal true 164s with node of the scope itself 164s is expected to equal false 164s with descendant node the scope does not include 164s is expected to equal false 164s with ancestor node the scope does not include 164s is expected to equal false 164s with child node the scope does not include 164s is expected to equal false 164s .new 164s when begin node is passed 164s accepts that as top level scope 164s when lvasgn node is passed 164s accepts that as top level scope 164s #name 164s when the scope is singleton method definition 164s returns the method name 164s when the scope is instance method definition 164s returns the method name 164s 164s RuboCop::Cop::Gemspec::DependencyVersion 164s with `EnforcedStyle: required` 164s using add_dependency 164s registers an offense when adding dependency using git option by parenthesized call without version specification 164s does not register an offense when adding dependency with tag specification 164s does not register an offense when adding dependency by parenthesized call with tag specification 164s does not register an offense when adding dependency by parenthesized call with version specification 164s does not register an offense when adding dependency with commit ref specification 164s registers an offense when adding dependency by parenthesized call without version specification 164s registers an offense when adding dependency without version specification 164s does not register an offense when adding dependency by parenthesized call with commit ref specification 164s does not register an offense when adding dependency by parenthesized call with branch specification 164s does not register an offense when adding dependency with version specification 164s does not register an offense when adding dependency with branch specification 164s registers an offense when adding dependency using git option without version specification 164s using add_runtime_dependency 164s does not register an offense when adding runtime dependency with commit ref specification 164s does not register an offense when adding runtime dependency by parenthesized call with version specification 164s does not register an offense when adding runtime dependency with version specification 164s does not register an offense when adding runtime dependency by parenthesized call with tag specification 164s registers an offense when adding runtime dependency using git option by parenthesized call without version specification 164s registers an offense when adding runtime dependency using git option without version specification 164s does not register an offense when adding runtime dependency by parenthesized call with branch specification 164s does not register an offense when adding runtime dependency with branch specification 164s does not register an offense when adding runtime dependency with tag specification 164s registers an offense when adding runtime dependency by parenthesized call without version specification 164s does not register an offense when adding runtime dependency by parenthesized call with commit ref specification 164s registers an offense when adding runtime dependency without version specification 164s using add_development_dependency 164s does not register an offense when adding development dependency with commit ref specification 164s does not register an offense when adding development dependency by parenthesized call with commit ref specification 164s registers an offense when adding development dependency using git option without version specification 164s does not register an offense when adding development dependency with version specification 164s does not register an offense when adding development dependency with tag specification 164s does not register an offense when adding development dependency by parenthesized call with version specification 164s registers an offense when adding development dependency by parenthesized call without version specification 164s does not register an offense when adding development dependency with branch specification 164s registers an offense when adding development dependency without version specification 164s does not register an offense when adding development dependency by parenthesized call with branch specification 164s does not register an offense when adding development dependency by parenthesized call with tag specification 164s registers an offense when adding development dependency using git option by parenthesized call without version specification 164s with `AllowedGems` 164s registers an offense when adding dependency without version specification excepts allowed gems 164s registers an offense when adding dependency by parenthesized call without version specification excepts allowed gems 164s with `EnforcedStyle: forbidden` 164s using add_development_dependency 164s does not register an offense when adding development dependency using git option by parenthesized call without version specification 164s registers an offense when adding development dependency by parenthesized call with branch specification 164s does not register an offense when adding development dependency by parenthesized call without version specification 164s registers an offense when adding development dependency with tag specification 164s does not register an offense when adding development dependency without version specification 164s registers an offense when adding development dependency by parenthesized call with version specification 164s registers an offense when adding development dependency by parenthesized call with tag specification 164s registers an offense when adding development dependency with version specification 164s registers an offense when adding development dependency with commit ref specification 164s registers an offense when adding development dependency by parenthesized call with commit ref specification 164s registers an offense when adding development dependency with branch specification 164s does not register an offense when adding development dependency using git option without version specification 164s using add_runtime_dependency 164s does not register an offense when adding runtime dependency using git option without version specification 164s does not register an offense when adding runtime dependency using git option by parenthesized call without version specification 164s registers an offense when adding runtime dependency with branch specification 164s registers an offense when adding runtime dependency by parenthesized call with branch specification 164s registers an offense when adding runtime dependency with tag specification 164s registers an offense when adding runtime dependency by parenthesized call with tag specification 164s registers an offense when adding runtime dependency by parenthesized call with version specification 164s registers an offense when adding runtime dependency with commit ref specification 164s does not register an offense when adding runtime dependency by parenthesized call without version specification 164s registers an offense when adding runtime dependency by parenthesized call with commit ref specification 164s registers an offense when adding runtime dependency with version specification 164s does not register an offense when adding runtime dependency without version specification 164s with `AllowedGems` 164s registers an offense when adding dependency by parenthesized call without version specification 164s registers an offense when adding dependency without version specification 164s using add_dependency 164s registers an offense when adding dependency by parenthesized call with commit ref specification 164s does not register an offense when adding dependency using git option without version specification 164s does not register an offense when adding dependency without version specification 164s registers an offense when adding dependency with version specification 164s does not register an offense when adding dependency using git option by parenthesized call without version specification 164s registers an offense when adding dependency with branch specification 164s registers an offense when adding dependency by parenthesized call with version specification 164s registers an offense when adding dependency with commit ref specification 164s does not register an offense when adding dependency by parenthesized call without version specification 164s registers an offense when adding dependency with tag specification 164s registers an offense when adding dependency by parenthesized call with branch specification 164s registers an offense when adding dependency by parenthesized call with tag specification 164s 164s RuboCop::Cop::Style::EnvHome 164s registers and corrects an offense when using `ENV.fetch('HOME', nil)` 164s registers and corrects an offense when using `::ENV['HOME']` 164s registers and corrects an offense when using `ENV.fetch('HOME')` 164s does not register an offense when using `Dir.home` 164s does not register an offense when using `ENV.fetch('HOME', default)` 164s does not register an offense when using `ENV['HOME'] = '/home/foo'` 164s registers and corrects an offense when using `ENV['HOME']` 164s 164s RuboCop::Cop::Lint::MissingSuper 164s constructor 164s does not register an offense for the class without parent class 164s does not register an offense when there is a `super` call 164s registers an offense when no `super` call 164s does not register an offense for the constructor-like method defined outside of a class 164s does not register an offense for the class with stateless parent class 164s callbacks 164s registers no offense when module callback without `super` call 164s does not register an offense when callback has a `super` call 164s registers an offense when class callback without `super` call 164s registers an offense when method callback is without `super` call 164s registers an offense when class callback within `self << class` and without `super` call 164s 164s RuboCop::Cop::Bundler::DuplicatedGem 164s when investigating Ruby files 164s does not register any offenses 164s when investigating Gemfiles 164s does not register an offense when gem is duplicated within `case` statement 164s registers an offense when gem from default group is conditionally duplicated 164s does not register an offense when gem is duplicated within `if-elsif` statement 164s does not register an offense when gem is duplicated within `if-else` statement 164s and no duplicate gems are present 164s does not register any offenses 164s and a duplicated gem is in a git/path/group/platforms block 164s registers an offense 164s and the file is empty 164s does not register any offenses 164s and a gem is duplicated in default group 164s registers an offense 164s 164s RuboCop::Cop::InternalAffairs::SingleLineComparison 164s registers and corrects an offense when negative comparing `first_line` with `last_line` 164s registers and corrects an offense when comparing `last_line` with `first_line` 164s registers and corrects an offense when comparing `source_range.first_line` with `source_range.last_line` 164s registers and corrects an offense when comparing `loc.last_line` with `loc.line` 164s registers and corrects an offense when comparing `loc.line` with `loc.last_line` 164s registers and corrects an offense when comparing `loc.last_line` with `loc.first_line` 164s registers and corrects an offense when comparing `first_line` with `last_line` 164s registers and corrects an offense when comparing `loc.first_line` with `loc.last_line` 164s registers and corrects an offense when comparing `source_range.last_line` with `source_range.first_line` 164s does not register an offense when comparing the same line 164s registers and corrects an offense when negative comparing `last_line` with `first_line` 164s does not register an offense when the receivers are not a match 164s 164s RuboCop::Cop::Bundler::GemVersion 164s when EnforcedStyle is set to required (default) 164s flags gems that do not specify a version 164s does not flag gems included in AllowedGems metadata 164s does not flag gems with a specified version 164s when EnforcedStyle is set to forbidden 164s flags gems that specify a gem version 164s does not flag gems included in AllowedGems metadata 164s does not flag gems without a specified version 164s 164s RuboCop::Cop::Lint::OrAssignmentToConstant 164s does not register an offense with plain assignment to a constant 164s does not register an offense with or-assignment to a class variable 164s registers an offense with or-assignment to a constant 164s does not register an offense with or-assignment to an instance variable 164s does not register an offense with or-assignment to a global variable 164s does not register an offense with or-assignment to an attribute 164s does not register an offense with or-assignment to a local variable 164s 164s RuboCop::Cop::Style::OptionHash 164s registers an offense 164s when the last argument is a non-options-hash optional hash 164s does not register an offense 164s when the last argument is an options hash named something else 164s does not register an offense 164s when the argument name is in the list of suspicious names 164s registers an offense 164s when passing options hash to super 164s does not register an offense when call to super is in a nested block 164s does not register an offense 164s does not register an offense when code exists before call to super 164s when there are no arguments 164s does not register an offense 164s permitted list 164s ignores if the method is permitted 164s 164s RuboCop::Cop::Naming::RescuedExceptionsVariableName 164s with default config 164s when the variable is reassigned using multiple assignment 164s only corrects uses of the exception 164s with nested rescues 164s handles it 164s with explicit rescue 164s without `Exception` variable 164s does not register an offense 164s with lower letters class name 164s does not register an offense 164s with method as `Exception` 164s registers an offense with unexpected variable name 164s does not register an offense without variable name 164s does not register an offense with expected variable name 164s with `Exception` variable 164s registers an offense when using `_exc` 164s does not register an offense when using `_e` 164s does not register an offense when using `e` 164s registers an offense when using `exc` and renames its usage 164s registers offenses when using `foo` and `bar` in multiple rescues 164s does not register an offense when using _e followed by e 164s registers an offense when using `exc` 164s shadowing an external variable 164s does not register an offense 164s with splat operator as `Exception` list 164s registers an offense with unexpected variable name 164s does not register an offense without variable name 164s does not register an offense with expected variable name 164s with multiple branches 164s registers and corrects each offense 164s with implicit rescue 164s without `Exception` variable 164s does not register an offense 164s with `Exception` variable 164s does not register an offense when using `_e` 164s does not register an offense when using `e` 164s registers an offense when using `exc` 164s registers an offense when using `_exc` 164s when the variable is reassigned 164s only corrects uses of the exception 164s only corrects the exception variable 164s with variable being referenced 164s renames the variable references when autocorrecting 164s with the `PreferredName` setup 164s does not register an offense when using `exception` 164s registers an offense when using `e` 164s registers offenses when using `foo` and `bar` in multiple rescues 164s does not register an offense when using `_exception` 164s registers an offense when using `_e` 164s 164s RuboCop::Cop::Style::CharacterLiteral 164s autocorrects ?' to "'" 164s accepts ? in a %w literal 164s registers an offense for character literals 164s accepts literals like ?\C-\M-d 164s registers an offense for literals like \n 164s 164s RuboCop::Cop::Style::SingleArgumentDig 164s >= Ruby 2.7 164s when using dig with arguments forwarding 164s does not register an offense 164s dig over a variable as caller 164s with single argument 164s registers an offense and corrects unsuitable use of dig 164s when using dig with splat operator 164s does not register an offense 164s with multiple arguments 164s does not register an offense 164s when using multiple `dig` in a method chain 164s registers and corrects an offense 164s when without a receiver 164s does not register an offense 164s dig over literal 164s with multiple arguments 164s does not register an offense 164s when using dig with splat operator 164s does not register an offense 164s with single argument 164s registers an offense and corrects unsuitable use of dig 164s 164s RuboCop::Cop::Layout::FirstHashElementIndentation 164s when hash is method argument 164s and argument are not surrounded by parentheses 164s accepts braceless hash 164s 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 164s accepts single line hash with braces 164s 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 164s registers an offense for incorrectly indented multi-line hash with braces 164s 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 164s accepts indent based on the left brace when the outer hash key and the left brace is not on the same line 164s accepts a correctly indented multi-line hash with braces 164s and arguments are surrounded by parentheses 164s and EnforcedStyle is special_inside_parentheses 164s accepts indent based on the left brace when the outer hash key and the left brace is not on the same line 164s registers an offense and corrects 'consistent' indentation 164s accepts special indentation for first argument 164s accepts indent based on the preceding left parenthesiswhen the right brace and its following pair is on the same line 164s registers an offense for incorrectly indented hash that is the value of a single pair hash 164s registers an offense and corrects 'align_braces' indentation 164s accepts special indentation for second argument 164s 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 164s accepts normal indentation for hash within hash 164s when using safe navigation operator 164s registers an offense and corrects 'consistent' indentation 164s and EnforcedStyle is consistent 164s registers an offense and corrects incorrect indentation 164s 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 164s 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 164s accepts indent based on the left brace when the outer hash key and the left brace is not on the same line 164s registers an offense for incorrectly indented hash that is the value of a single pair hash 164s accepts normal indentation for second argument 164s accepts normal indentation for first argument 164s when EnforcedStyle is align_braces 164s registers an offense for incorrectly indented hash that is the value of a single pair hash 164s accepts a first pair on the same line as the left brace 164s accepts an empty hash 164s accepts several pairs per line 164s registers an offense and corrects incorrectly indented } 164s 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 164s accepts correctly indented first pair 164s accepts single line hash 164s when 'consistent' style is used 164s registers an offense and corrects incorrect indentation 164s when 'special_inside_parentheses' style is used 164s registers an offense and corrects incorrect indentation 164s when hash is right hand side in assignment 164s registers an offense and corrects incorrectly indented first pair 164s accepts an empty hash 164s accepts single line hash 164s accepts several pairs per line 164s accepts a first pair on the same line as the left brace 164s accepts correctly indented first pair 164s when indentation width is overridden for this cop 164s registers an offense and corrects incorrectly indented first pair 164s accepts correctly indented first pair 164s when the HashAlignment style is separator for => 164s registers an offense and corrects incorrectly indented } 164s accepts correctly indented first pair 164s registers an offense and corrects incorrectly indented first pair with => 164s when the HashAlignment style is separator for : 164s registers an offense and corrects incorrectly indented first pair with : 164s accepts correctly indented first pair 164s registers an offense and corrects incorrectly indented } 164s when hash is argument to setter 164s accepts correctly indented first pair 164s registers an offense and corrects incorrectly indented first pair 164s when hash is operand 164s registers an offense and corrects incorrectly indented } 164s accepts correctly indented first pair 164s registers an offense and corrects incorrectly indented first pair 164s 164s RuboCop::Cop::Layout::EmptyLinesAroundBlockBody 164s when EnforcedStyle is empty_lines for { } block 164s ignores block with an empty body 164s is not fooled by single line blocks 164s registers an offense for block body not starting or ending with a blank 164s when EnforcedStyle is empty_lines for do end block 165s registers an offense for block body not starting or ending with a blank 165s ignores block with an empty body 165s is not fooled by single line blocks 165s when EnforcedStyle is no_empty_lines for do end block 165s is not fooled by single line blocks 165s registers an offense for block body ending with a blank 165s accepts block body starting with a line with spaces 165s registers an offense for block body starting with a blank 165s registers an offense for block body starting with a blank passed to a multi-line method call 165s Ruby 2.7 165s registers an offense for block body ending with a blank 165s when EnforcedStyle is no_empty_lines for { } block 165s registers an offense for block body starting with a blank 165s is not fooled by single line blocks 165s registers an offense for block body starting with a blank passed to a multi-line method call 165s registers an offense for block body ending with a blank 165s accepts block body starting with a line with spaces 165s Ruby 2.7 165s registers an offense for block body ending with a blank 165s 165s RuboCop::Cop::Style::SelectByRegexp 165s with select 165s does not register an offense when the receiver is `Hash[]` 165s registers an offense and corrects when the receiver is a range 165s does not register an offense when there is no block 165s does not register an offense when the receiver is `to_hash` 165s registers an offense and corrects when there is no explicit regexp 165s registers an offense and corrects for `Regexp#match?` 165s registers an offense and corrects for `blockvar =~ lvar` 165s registers an offense if `to_h` is in the receiver chain but not the actual receiver 165s does not register an offense when the block param is a method argument 165s does not register an offense when the block has multiple expressions 165s does not register an offense when given a proc 165s does not register an offense when the block does not match a regexp 165s does not register an offense when the receiver is `ENV` 165s does not register an offense when the receiver is `to_h` 165s registers an offense and corrects for `lvar =~ blockvar` 165s registers an offense and corrects when the receiver is a set 165s registers an offense and corrects for `regexp =~ blockvar` 165s registers an offense and corrects when the receiver is an array 165s does not register an offense when the receiver is `Hash.new` 165s registers an offense and corrects for `match?` 165s does not register an offense when the receiver is a hash literal 165s registers an offense and corrects for `blockvar =~ regexp` 165s does not register an offense when the block uses an external variable in a regexp match 165s registers an offense and corrects without a receiver 165s registers an offense and corrects with a multiline block 165s does not register an offense when the block arity is not 1 165s with `numblock`s 165s registers an offense and corrects for `blockvar =~ regexp` 165s does not register an offense when the param is a method argument 165s does not register an offense if there is more than one numbered param 165s registers an offense and corrects for `regexp =~ blockvar` 165s does not register an offense when using `match?` without a receiver 165s registers an offense and corrects for `Regexp#match?` 165s registers an offense and corrects for `match?` 165s with find_all 165s does not register an offense when the block arity is not 1 165s registers an offense and corrects for `regexp =~ blockvar` 165s registers an offense and corrects for `Regexp#match?` 165s does not register an offense when the receiver is a hash literal 165s does not register an offense when the receiver is `Hash.new` 165s does not register an offense when the receiver is `to_h` 165s registers an offense and corrects for `lvar =~ blockvar` 165s does not register an offense when the receiver is `Hash[]` 165s registers an offense and corrects with a multiline block 165s does not register an offense when there is no block 165s does not register an offense when the block does not match a regexp 165s does not register an offense when the receiver is `to_hash` 165s registers an offense and corrects for `blockvar =~ lvar` 165s does not register an offense when the receiver is `ENV` 165s registers an offense and corrects when the receiver is an array 165s registers an offense and corrects for `blockvar =~ regexp` 165s registers an offense and corrects without a receiver 165s does not register an offense when given a proc 165s does not register an offense when the block param is a method argument 165s does not register an offense when the block uses an external variable in a regexp match 165s registers an offense and corrects when the receiver is a range 165s registers an offense and corrects when there is no explicit regexp 165s does not register an offense when the block has multiple expressions 165s registers an offense and corrects for `match?` 165s registers an offense and corrects when the receiver is a set 165s registers an offense if `to_h` is in the receiver chain but not the actual receiver 165s with `numblock`s 165s registers an offense and corrects for `Regexp#match?` 165s does not register an offense when using `match?` without a receiver 165s registers an offense and corrects for `blockvar =~ regexp` 165s does not register an offense when the param is a method argument 165s does not register an offense if there is more than one numbered param 165s registers an offense and corrects for `match?` 165s registers an offense and corrects for `regexp =~ blockvar` 165s with reject 165s does not register an offense when the receiver is `Hash.new` 165s does not register an offense when there is no block 165s registers an offense if `to_h` is in the receiver chain but not the actual receiver 165s registers an offense and corrects for `lvar =~ blockvar` 165s registers an offense and corrects for `Regexp#match?` 165s registers an offense and corrects for `blockvar =~ regexp` 165s does not register an offense when the block param is a method argument 165s does not register an offense when the receiver is `Hash[]` 165s registers an offense and corrects for `regexp =~ blockvar` 165s does not register an offense when given a proc 165s does not register an offense when the block arity is not 1 165s registers an offense and corrects for `match?` 165s registers an offense and corrects when the receiver is a set 165s does not register an offense when the receiver is a hash literal 165s does not register an offense when the block uses an external variable in a regexp match 165s does not register an offense when the receiver is `to_h` 165s registers an offense and corrects when there is no explicit regexp 165s does not register an offense when the block does not match a regexp 165s registers an offense and corrects for `blockvar =~ lvar` 165s registers an offense and corrects when the receiver is a range 165s does not register an offense when the block has multiple expressions 165s registers an offense and corrects without a receiver 165s registers an offense and corrects when the receiver is an array 165s does not register an offense when the receiver is `ENV` 165s does not register an offense when the receiver is `to_hash` 165s registers an offense and corrects with a multiline block 165s with `numblock`s 165s does not register an offense if there is more than one numbered param 165s does not register an offense when using `match?` without a receiver 165s registers an offense and corrects for `match?` 165s registers an offense and corrects for `Regexp#match?` 165s registers an offense and corrects for `blockvar =~ regexp` 165s does not register an offense when the param is a method argument 165s registers an offense and corrects for `regexp =~ blockvar` 165s 165s RuboCop::Cop::InternalAffairs::UselessRestrictOnSend 165s does not register an offense when using `RESTRICT_ON_SEND` and defines `after_send` with alias 165s does not register an offense when using `RESTRICT_ON_SEND` and defines `on_send` 165s does not register an offense when using `RESTRICT_ON_SEND` and defines `on_send` with alias_method 165s does not register an offense when using `RESTRICT_ON_SEND` and defines `after_send` with alias_method 165s does not register an offense when using `RESTRICT_ON_SEND` and defines `on_send` with alias 165s does not register an offense when using `RESTRICT_ON_SEND` and defines `after_send` 165s registers an offense when using `RESTRICT_ON_SEND` and not defines send callback method 165s 165s RuboCop::Cop::Layout::TrailingWhitespace 165s registers an offense for a blank line with space 165s autocorrects unwanted space 165s is not fooled by heredoc containing __END__ 165s registers an offense for a tab in a heredoc 165s is not fooled by __END__ within a documentation comment 165s is not fooled by heredoc containing __END__ within a doc comment 165s registers offenses before __END__ but not after 165s registers an offense for a line ending with tab 165s accepts a line without trailing whitespace 165s registers an offense for a line ending with space 165s registers an offense for trailing whitespace in a heredoc string 165s when `AllowInHeredoc` is set to false 165s corrects by removing trailing whitespace used for indentation in a heredoc string 165s corrects safely trailing whitespace in a heredoc string 165s corrects a whitespace line in a heredoc string that is longer than the indentation 165s does not correct trailing whitespace in a static heredoc string 165s when `AllowInHeredoc` is set to true 165s registers an offense for trailing whitespace at the heredoc begin 165s accepts trailing whitespace in a heredoc string 165s 165s RuboCop::Cop::Style::EmptyLambdaParameter 165s accepts a keyword lambda 165s does not crash on a super 165s registers an offense for an empty block parameter with a lambda 165s 165s RuboCop::Cop::InternalAffairs::InheritDeprecatedCopClass 165s does not register an offense when using `Base` 165s does not register an offense when not inherited super class 165s registers an offense when using `Cop` 165s registers an offense when using `RuboCop::Cop::Cop` 165s 165s RuboCop::Cop::Style::FileRead 165s registers an offense for and corrects `File.open(filename, 'rt').read` 165s registers an offense for and corrects the `File.open` with symbolic read proc (implicit text mode) 165s registers an offense for and corrects the `File.open` with inline read block (mode 'rt') 165s registers an offense for and corrects the `File.open` with symbolic read proc (mode 'r') 165s registers an offense for and corrects the `File.open` with multiline read block (mode 'r+t') 165s registers an offense for and corrects the `File.open` with symbolic read proc (mode 'rb') 165s registers an offense for and corrects the `File.open` with symbolic read proc (mode 'r+') 165s registers an offense for and corrects the `File.open` with multiline read block (mode 'r+') 165s registers an offense for and corrects `File.open(filename, 'rb').read` 165s registers an offense for and corrects `File.open(filename, 'r+t').read` 165s registers an offense for and corrects the `File.open` with inline read block (mode 'r') 165s registers an offense for and corrects the `File.open` with multiline read block (implicit text mode) 165s registers an offense for and corrects `File.open(filename, 'r').read` 165s registers an offense for and corrects the `File.open` with inline read block (mode 'r+t') 165s registers an offense for and corrects the `File.open` with symbolic read proc (mode 'rt') 165s does not register an offense when not reading from the block variable 165s registers an offense for and corrects the `File.open` with symbolic read proc (mode 'r+b') 165s registers an offense for and corrects the `File.open` with multiline read block (mode 'r') 165s registers an offense for and corrects the `File.open` with symbolic read proc (mode 'r+t') 165s registers an offense for and corrects the `File.open` with inline read block (mode 'rb') 165s registers an offense for and corrects the `File.open` with inline read block (mode 'r+') 165s registers an offense for and corrects `File.open(filename, 'r+b').read` 165s registers an offense for and corrects the `File.open` with multiline read block (mode 'r+b') 165s registers an offense for and corrects the `File.open` with multiline read block (mode 'rb') 165s registers an offense for and corrects `File.open(filename).read` 165s registers an offense for and corrects the `File.open` with inline read block (implicit text mode) 165s registers an offense for and corrects `::File.open(filename).read` 165s registers an offense for and corrects the `File.open` with inline read block (mode 'r+b') 165s registers an offense for and corrects the `File.open` with multiline read block (mode 'rt') 165s registers an offense for and corrects `File.open(filename, 'r+').read` 165s 165s RuboCop::CLI --auto-gen-config 165s --auto-gen-config 165s overwrites an existing todo file 165s can be called when there are no files to inspection 166s can generate a todo list 166s does not generate configuration for the Syntax cop 166s generates Exclude if no EnforcedStyle solves all offenses 166s honors rubocop:disable comments 166s generates EnforcedStyle parameter if it solves all offenses 166s does not include a timestamp when --no-auto-gen-timestamp is used 167s does not include offense counts when --no-offense-counts is used 167s generates Exclude instead of Max when --auto-gen-only-exclude is used 167s can generate Exclude properties with a given limit 167s includes --auto-gen-only-exclude in the command comment when given 167s generates a todo list that removes the reports 167s when working with a cop who do not support autocorrection 167s can generate a todo list 167s when hash value omission enabled 168s generates Exclude if it solves all offenses 168s when .rubocop.yml inherits only from .rubocop_todo.yml in an array 168s bases other cops' configuration on the code base's current maximum line length 168s when .rubocop.yml inherits from another file 168s bases other cops' configuration on the code base's current maximum line length 168s when different styles appear in different files 168s generates Exclude list if --exclude-limit is not exceeded 168s disables cop if --exclude-limit is exceeded 168s when .rubocop.yml is empty 168s bases other cops' configuration on the code base's current maximum line length 168s when .rubocop.yml does not exist 169s bases other cops' configuration on the code base's current maximum line length 169s when cop is not safe to autocorrect 169s can generate a todo list, with the appropriate flag 169s with Layout/LineLength:Max overridden 169s when .rubocop.yml has Layout/LineLength disabled 169s skips the cop from both phases of the run 169s when .rubocop.yml has Layout/LineLength:Max more than code base max 169s bases other cops' configuration on the overridden LineLength:Max 169s when .rubocop.yml has Layout/LineLength:Max less than code base max 169s bases other cops' configuration on the overridden LineLength:Max 169s when existing config file has a YAML document start header 169s inserts `inherit_from` key after hearder 169s when --config is used 170s can generate a todo list 170s can generate a todo list if default .rubocop.yml exists 170s when inheriting from a URL 170s when there are multiple entries 170s can generate a todo list 170s when there is a single entry 170s can generate a todo list 170s for existing configuration with Exclude 171s leaves out Excludes that appear in .rubocop.yml but are merged for the cop 171s generates Excludes that appear in .rubocop.yml 172s leaves out Excludes that appear in .rubocop.yml but are merged globally 172s when .rubocop.yml inherits from another file and .rubocop_todo.yml 172s bases other cops' configuration on the code base's current maximum line length 172s when .rubocop.yml doesn't inherit 172s bases other cops' configuration on the code base's current maximum line length 172s console output 172s displays report summary but no offenses 172s when duplicated default configuration parameter 172s parameters are displayed without duplication 172s when .rubocop.yml inherits only from .rubocop_todo.yml 173s bases other cops' configuration on the code base's current maximum line length 173s when working in a subdirectory 173s can generate a todo list 173s when --no-exclude-limit is given 173s always prefers Exclude to Enabled 173s when .rubocop.yml inherits from two other files 173s bases other cops' configuration on the code base's current maximum line length 173s 173s RuboCop::Cop::Lint::TopLevelReturnWithArgument 173s Code segment with inline if along with top-level return 173s expects multiple offense from the return with arguments 173s expects no offense from the return without arguments 173s Code segment with only top-level return statement 173s expects multiple offenses from the return with arguments statements 173s expects offense from the return with arguments 173s expects no offense from the return without arguments 173s Code segment containing semi-colon separated statements 173s expects no offense from the return with arguments and multi-line code 173s expects an offense from the return with arguments and multi-line code 173s Code segment with block level returns other than the top-level return 173s expects offense from the return with arguments 173s expects no offense from the return without arguments 173s Code segment with method-level return statements 173s expects offense when method-level & top-level return co-exist 173s 173s RuboCop::Cop::Style::HashSyntax 173s configured to enforce hash rockets style 173s accepts an empty hash 173s registers offense for Ruby 1.9 style 173s registers an offense for mixed syntax 173s registers an offense for 1.9 style in method calls 173s accepts hash rockets in a hash literal 173s accepts hash rockets in method calls 173s UseHashRocketsWithSymbolValues has no impact 173s does not register an offense when there is a symbol value 173s configured to enforce explicit hash value syntax style 173s Ruby >= 3.1 173s does not register an offense when hash key and hash value are the same 173s registers and corrects an offense when hash key and hash value are partially the same 173s registers and corrects an offense when hash values are omitted 173s does not register an offense when hash key and hash value are not the same 173s Ruby <= 3.0 173s does not register an offense when hash key and hash value are the same 173s configured to enforce ruby 1.9 style with no mixed keys 173s UseHashRocketsWithSymbolValues enabled 173s registers an offense when keys have special symbols in them 173s autocorrects to hash rockets when all elements have symbol value 173s registers an offense when keys start with a digit 173s registers an offense when keys have different types and styles 173s registers an offense for mixed syntax when new is possible 173s registers offense for hash rocket syntax when new is possible 173s accepts new syntax when keys are interpolated string 173s accepts hash rockets when keys have different types 173s registers an offense when any element has a symbol value in method calls 173s accepts new syntax in method calls 173s accepts an empty hash 173s registers an offense for hash rockets in method calls 173s registers an offense when keys have whitespaces in them 173s registers an offense when any element uses a symbol for the value 173s accepts new syntax in a hash literal 173s ruby < 2.2 174s registers an offense when keys have whitespaces and mix styles 174s accepts hash rockets when keys have whitespaces in them 174s registers an offense when keys have special symbols and mix styles 174s registers an offense when keys start with a digit and mix styles 174s accepts hash rockets when keys start with a digit 174s accepts hash rockets when keys have special symbols in them 174s UseHashRocketsWithSymbolValues disabled 174s accepts an empty hash 174s accepts hash rockets when keys have different types 174s registers an offense when keys have different types and styles 174s registers an offense when keys start with a digit 174s registers an offense when keys have special symbols in them 174s registers an offense for mixed syntax when new is possible 174s registers an offense when keys have whitespaces in them 174s registers an offense for hash rockets in method calls 174s registers offense for hash rocket syntax when new is possible 174s accepts new syntax in method calls 174s accepts new syntax when keys are interpolated string 174s accepts new syntax in a hash literal 174s ruby < 2.2 174s registers an offense when keys have special symbols and mix styles 174s accepts hash rockets when keys have whitespaces in them 174s accepts hash rockets when keys start with a digit 174s registers an offense when keys start with a digit and mix styles 174s registers an offense when keys have whitespaces and mix styles 174s accepts hash rockets when keys have special symbols in them 174s configured to enforce shorthand syntax style 174s Ruby >= 3.1 174s registers an offense when one line `if` condition follows (with parentheses) 174s does not register an offense when with parentheses call expr follows assignment expr 174s does not register an offense when lvar hash key and hash value are the same 174s registers and corrects an offense when hash key and hash value are the same and it in the method bodyand an expression follows 174s registers and corrects an offense when hash key and hash value are the same 174s registers and corrects an offense when `Hash[foo: foo]` and an expression follows 174s does not register an offense when with parentheses call expr follows 174s registers an offense when hash key and hash value are not the same and method with `[]` is called 174s does not register an offense when hash key and hash value are the same but the value ends `!` 174s registers and corrects an offense when `Hash[foo: foo]` 174s does not register an offense when one line `until` condition follows (without parentheses) 174s registers and corrects an offense when hash key and hash value are partially the same 174s does not register an offense when call expr without arguments and with a block follows 174s does not register an offense when symbol hash key and hash value (lvar) are not the same 174s does not register an offense when hash key and hash value are partially the same 174s does not register an offense when `return` with one line `if` condition follows (without parentheses) 174s does not register an offense when without parentheses call expr follows after nested method call 174s does not register an offense when hash key and hash value are not the same 174s does not register an offense when hash pattern matching 174s does not register an offense when hash key and hash value are the same but the value ends `?` 174s does not register an offense when call expr with argument and a block follows 174s registers an offense when one line `until` condition follows (with parentheses) 174s does not register an offense when symbol hash key and string hash value are the same 174s does not register an offense when without parentheses call expr follows 174s does not register an offense when one line `if` condition follows (without parentheses) 174s registers and corrects an offense when hash key and hash value (lvar) are the same 174s does not register an offense when method call hash key and hash value are the same 174s registers and corrects an offense when hash key and hash value are the same and it in the method body 174s does not register an offense when hash values are omitted 174s when hash roket syntax 174s does not register an offense 174s Ruby <= 3.0 174s does not register an offense when hash key and hash value are the same 174s configured to accept both shorthand and explicit use of hash literal value 174s Ruby >= 3.1 174s does not register an offense when hash key and hash value are the same 174s does not register an offense when hash key and hash value are partially the same 174s does not register an offense when hash key and hash value are not the same 174s does not register an offense when hash values are omitted 174s Ruby <= 3.0 174s does not register an offense when hash key and hash value are the same 174s configured to enforce no mixed keys 174s accepts new syntax in a hash literal 174s accepts old hash rockets style 174s accepts hash rockets when keys have whitespaces in them 174s registers an offense for mixed syntax when new is possible 174s accepts hash rockets when keys have different types 174s accepts an empty hash 174s registers an offense when keys start with a digit and mix styles 174s accepts the hash rocket syntax when new is possible 174s registers an offense when keys have whitespaces and mix styles 174s accepts new hash style 174s accepts hash rockets when keys have special symbols in them 174s accepts hash rockets when keys start with a digit 174s accepts hash rockets in method calls 174s registers an offense when keys have special symbols and mix styles 174s accepts new syntax in method calls 174s autocorrects mixed key hashes 174s registers an offense when keys have different types and styles 174s configured to enforce ruby19 style 174s with SpaceAroundOperators enabled 174s registers an offense for hash rockets in method calls 174s registers an offense for mixed syntax when new is possible 174s accepts hash rockets when symbol keys end with = 174s registers offense when keys start with an uppercase letter 174s accepts new syntax in a hash literal 174s registers offense for hash rocket syntax when new is possible 174s autocorrects a missing space when hash is used as argument 174s registers an offense when symbol keys have strings in them 174s accepts hash rockets when keys have different types 174s preserves quotes during autocorrection 174s accepts an empty hash 174s autocorrects even if it interferes with SpaceAroundOperators 174s accepts new syntax in method calls 174s accepts hash rockets when symbol characters are not supported 174s ruby < 2.2 174s accepts hash rockets when symbol keys have string in them 174s when using a return value uses `return` 174s registers an offense and corrects when not enclosed in parentheses 174s registers an offense and corrects when enclosed in parentheses 174s if PreferHashRocketsForNonAlnumEndingSymbols is false 174s registers an offense for hash rockets when symbols end with ? 174s registers an offense for hash rockets when symbols end with ! 174s if PreferHashRocketsForNonAlnumEndingSymbols is true 174s accepts hash rockets when symbols end with ! 174s accepts hash rockets when symbols end with ? 174s with SpaceAroundOperators disabled 174s autocorrects even if there is no space around => 174s configured to use hash rockets when symbol values are found 174s accepts both hash rockets and ruby19 syntax in the same code 174s accepts ruby19 syntax when no elements have symbol values 174s accepts ruby19 syntax when no elements have symbol values in method calls 174s registers an offense when any element has a symbol value in method calls 174s autocorrects to hash rockets when all elements have symbol value 174s registers an offense when any element uses a symbol for the value 174s registers an offense for hashes with elements on multiple lines 174s registers an offense when using hash rockets and no elements have a symbol value 174s accepts an empty hash 174s accepts hash in ruby19 style with no symbol values 174s configured to disallow mixing of implicit and explicit hash literal value 174s Ruby >= 3.1 174s registers an offense when some hash values are omitted but they can all be omitted 174s registers an offense when all hash values are present, but can all be omitted 174s does not register an offense when all hash values are omitted 174s does not register an offense when all hash values are present, but only some values can be omitted 174s does not register an offense when all hash values are present, but no values can be omitted 174s registers an offense when some hash values are omitted but they cannot all be omitted 174s Ruby <= 3.0 174s does not register an offense when all hash key and hash values are the same 174s 174s RuboCop::Cop::Lint::Loop 174s registers an offense for begin/end/until 174s registers an offense and corrects for begin/end/while 174s accepts loop/break if 174s accepts loop/break unless 174s 174s RuboCop::Cop::Layout::EmptyLinesAroundClassBody 174s when EnforcedStyle is no_empty_lines 174s registers an offense for class body starting with a blank 174s autocorrects singleton class body containing only a blank 174s registers an offense for singleton class body ending with a blank 174s registers an offense for class body ending with a blank 174s when EnforcedStyle is ending_only 174s ignores empty lines at the beginning of a class 174s registers an offense for an empty line at the end of a class 174s when EnforcedStyle is empty_lines_except_namespace 174s when only child is class 174s autocorrects beginning and end 174s requires no empty lines for namespace 174s registers offenses for namespaced class body not ending with a blank 174s registers offense for namespace body ending with a blank 174s registers offense for namespace body starting with a blank 174s registers offenses for namespaced class body not starting with a blank 174s when only child is module 174s requires no empty lines for namespace 174s registers offense for namespace body starting with a blank 174s registers offense for namespace body ending with a blank 174s when has multiple child classes 174s registers offenses for namespace body starting and ending without a blank 174s requires empty lines for namespace 174s when EnforcedStyle is beginning_only 174s ignores empty lines at the beginning of a class 174s registers an offense for an empty line at the end of a class 174s when EnforcedStyle is empty_lines_special 174s when namespace has multiple children 174s requires empty lines for namespace 174s when first child is a method 174s requires blank line at the beginning and ending of class body 174s source without blank lines 174s registers an offense for class not beginning and ending with a blank line 174s when class has a namespace 174s requires no empty lines for namespace but requires blank line at the beginning and ending of class body 174s source with blank lines 174s autocorrects the offenses 174s source without blank lines 174s registers and autocorrects the offenses 174s class with only constants 174s registers and autocorrects the offenses 174s when first child is NOT a method 174s 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 174s source without blank lines 174s registers an offense for class not ending with a blank line 174s source with comment before method definition 174s registers an offense for class beginning with a blank line 174s source with blank lines 174s registers an offense for class beginning with a blank line 174s when class has a namespace 174s 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 174s source with blank lines 174s registers and autocorrects the offenses 174s source with constants 174s registers and autocorrects the offenses 174s source without blank lines 174s registers and autocorrects the offenses 174s class with empty body 174s with empty line 174s does NOT register offenses 174s without empty line 174s does NOT register offenses 174s when first child is an access modifier 174s with no blank lines at the beginning and ending of class body 174s registers and corrects an offense 174s with blank lines at the beginning and ending of class body 174s registers no offense 174s class with constant and child class 174s registers and autocorrects the offenses 174s when EnforcedStyle is empty_lines 174s accepts singleton classes with an empty body 174s accepts classes with an empty body 174s does not register offenses when specifying a superclass that breaks the line 174s registers an offense for singleton class body not starting or ending with a blank 174s registers an offense for class body not starting or ending with a blank 174s does not register offenses 174s 174s RuboCop::Cop::Style::NonNilCheck 174s when `EnforcedStyle: comparison` of `Style/NilComparison` cop 174s `IncludeSemanticChanges: true` 174s registers an offense for `foo != nil` 174s `IncludeSemanticChanges: false` 174s does not register an offense for `foo != nil` 174s when not allowing semantic changes 174s does not register an offense if only expression in predicate 174s does not register an offense with implicit receiver 174s does not register an offense for not x.nil? 174s does not register an offense for !x.nil? 174s does not register an offense if last expression in class predicate 174s does not register an offense if last expression in predicate 174s does not register an offense if only expression in class predicate 174s registers an offense but does not correct when the code was not modified 174s registers an offense for != nil 174s does not register an offense for != 0 174s when allowing semantic changes 174s does not register an offense for `x.nil?` 174s registers an offense for unless x.nil? 174s autocorrects by changing `x != nil` to `x` 174s does not blow up with ternary operators 174s does not blow up when autocorrecting implicit receiver 174s does not register an offense for `!x` 174s registers an offense for `!x.nil?` 174s corrects code that would not be modified if IncludeSemanticChanges were false 174s registers an offense for `not x.nil?` 174s 174s RuboCop::Cop::Style::NumberedParametersLimit 174s with Ruby >= 2.7 174s does not register an offense for a numblock with exactly `Max` parameters 174s sets Max properly for auto-gen-config 174s does not register an offense for a numblock with fewer than `Max` parameters 174s does not register an offense for a normal block with too many parameters 174s when there are more than `Max` numbered parameters 174s registers an offense for a multiline `numblock` 174s registers an offense for a single line `numblock` 174s when configuring Max 174s does not register an offense when there are not too many numbered params 174s when Max is 1 174s uses the right offense message 174s 174s RuboCop::Cop::Style::Semicolon 174s accepts semicolon after params if so configured 174s accept semicolons inside strings 174s accepts one line empty class definitions 174s registers an offense for range (`1...42`) with semicolon 174s accepts semicolon before end if so configured 174s registers an offense for semicolon at the end no matter what 174s registers an offense for range (`1..42`) with semicolon 174s accepts one line method definitions 174s accepts one line empty module definitions 174s registers an offense for several expressions 174s accepts one line empty method definitions 174s registers an offense for one line method with two statements 174s registers an offense for a single expression 174s registers an offense for a semicolon at the beginning of a line 174s Ruby >= 2.6 174s does not register an offense for endless range without semicolon 174s registers an offense for endless range with semicolon in the method definition 174s registers an offense for endless range with semicolon (irange only) 174s registers an offense for endless range with semicolon (irange and erange) 174s when AllowAsExpressionSeparator is true 174s accepts one line method with two statements 174s accepts several expressions 174s with a multi-expression line without a semicolon 174s does not register an offense 174s 174s RuboCop::Cop::Style::ExplicitBlockArgument 174s does not add extra parens when correcting 174s registers an offense and corrects when multiple arguments are yielded 174s adds to the existing arguments when correcting 174s correctly corrects when using safe navigation method call 174s registers an offense and corrects when block just yields its arguments 174s does not register an offense when `yield` arguments is not a prefix of block arguments 174s does not register an offense when arguments are yielded in a different order 174s registers an offense and corrects when `yield` is inside block of `super` 174s registers an offense and corrects when method contains multiple `yield`s 174s does not add extra parens to `super` when correcting 174s does not register an offense when there is more than one block argument and not all are yielded 174s correctly corrects when method already has an explicit block argument 174s registers an offense and corrects when `yield` inside block has no arguments 174s does not register an offense when code is called outside of a method 174s does not register an offense when `yield` is the sole block body 174s correctly corrects when the method call has a trailing comma in its argument list 174s does not register an offense when `yield` is not inside block 174s 174s RuboCop::Cop::Style::MultilineTernaryOperator 174s registers an offense and corrects when everything is on a separate line 174s accepts a single line ternary operator expression 174s register an offense and corrects when returning a multiline ternary operator expression with method call 174s registers an offense and corrects when the false branch is on a separate line and assigning a return value 174s registers offense and corrects when the if branch and the else branch are on a separate line from the condition 174s registers an offense and corrects when condition is multiline and using hash key assignment 174s registers an offense and corrects when condition is multiline 174s registers an offense and corrects when the false branch is on a separate line 174s registers an offense and corrects when condition is multiline and using assignment method 174s register an offense and corrects when returning a multiline ternary operator expression with `next` 174s register an offense and corrects when returning a multiline ternary operator expression with `break` 174s register an offense and corrects when returning a multiline ternary operator expression with `return` 174s 174s RuboCop::Cop::Lint::NestedMethodDefinition 174s registers an offense for a nested class method definition 174s does not register offense for nested definition inside module_eval 174s does not register offense for nested definition inside Struct.new 174s does not register offense for definition of method on local var 174s does not register offense for nested definition inside class_eval 174s registers an offense for a nested method definition inside lambda 174s does not register offense for nested definition inside instance_exec 174s does not register offense for nested definition inside ::Module.new 174s does not register offense for nested definition inside Module.new 174s does not register offense for nested definition inside ::Struct.new 174s does not register an offense for a lambda definition inside method 174s does not register offense for nested definition inside instance_eval 174s does not register offense for nested definition inside class shovel 174s does not register offense for nested definition inside Class.new 174s does not register offense for nested definition inside module_exec 174s registers an offense for a nested method definition 174s does not register offense for nested definition inside ::Class.new 174s registers an offense for a nested singleton method definition 174s does not register offense for nested definition inside class_exec 174s when `AllowedPatterns: [baz]` 174s registers offense for nested definition inside `do_qux` 174s does not register offense for nested definition inside `do_baz` 174s when `AllowedMethods: [has_many]` 174s does not register offense for nested definition inside `has_many` 174s registers offense for nested definition inside `denied_method` 174s 174s RuboCop::Cop::Style::NestedFileDirname 174s Ruby >= 3.1 174s does not register an offense when using `File.dirname(path, 2)` 174s registers and corrects an offense when using `File.dirname(path)` nested two times 174s registers and corrects an offense when using `File.dirname(path)` nested three times 174s does not register an offense when using non nested `File.dirname(path)` 174s Ruby <= 3.0 174s does not register an offense when using `File.dirname(path)` nested two times 174s 174s RuboCop::Cop::Gemspec::DeprecatedAttributeAssignment 174s behaves like deprecated attributes 174s registers and corrects an offense when using `s.rubygems_version =` 174s does not register an offense when using `rubygems_version =` and receiver is not `Gem::Specification.new` block variable 174s does not register an offense when using `s.rubygems_version =` outside `Gem::Specification.new` 174s registers and corrects an offense when using `spec.rubygems_version =` 174s behaves like deprecated attributes with addition 174s registers and corrects an offense when using `spec.rubygems_version +=` 174s registers and corrects an offense when using `s.rubygems_version +=` 174s behaves like deprecated attributes 174s does not register an offense when using `s.rubygems_version =` outside `Gem::Specification.new` 174s registers and corrects an offense when using `spec.rubygems_version =` 174s does not register an offense when using `rubygems_version =` and receiver is not `Gem::Specification.new` block variable 174s registers and corrects an offense when using `s.rubygems_version =` 174s behaves like deprecated attributes 174s does not register an offense when using `s.rubygems_version =` outside `Gem::Specification.new` 174s registers and corrects an offense when using `s.rubygems_version =` 174s registers and corrects an offense when using `spec.rubygems_version =` 174s does not register an offense when using `rubygems_version =` and receiver is not `Gem::Specification.new` block variable 174s behaves like deprecated attributes 174s registers and corrects an offense when using `spec.rubygems_version =` 174s does not register an offense when using `rubygems_version =` and receiver is not `Gem::Specification.new` block variable 174s does not register an offense when using `s.rubygems_version =` outside `Gem::Specification.new` 174s registers and corrects an offense when using `s.rubygems_version =` 174s 174s RuboCop::Cop::Style::PreferredHashMethods 174s with enforced `verbose` style 174s registers an offense for key? with one arg 174s registers an offense for value? with one arg 174s accepts key? with no args 174s accepts value? with no args 174s with enforced `short` style 174s registers an offense for has_value? with one arg 174s registers an offense for has_key? with one arg 174s accepts has_key? with no args 174s accepts has_value? with no args 174s when using safe navigation operator 174s registers an offense for has_value? with one arg 174s 174s RuboCop::Cop::Metrics::ClassLength 174s rejects a class with more than 5 lines 174s accepts a class with less than 5 lines 174s accepts a class with 5 lines 174s accepts empty classes 174s does not count blank lines 174s reports the correct beginning and end lines 174s when overlapping constant assignments 174s does not register an offense 174s when CountComments is disabled 174s accepts classes that only contain comments 174s when inspecting a class defined with Class.new 174s registers an offense 174s when `CountAsOne` is not empty 174s folds array into one line 174s when a class has inner classes 174s does not count lines of inner classes 174s rejects a class with 6 lines that belong to the class directly 174s when CountComments is enabled 174s also counts commented lines 174s registers an offense for a class that only contains comments 174s when using numbered parameter 174s when inspecting a class defined with Class.new 174s registers an offense 174s when inspecting a class defined with ::Class.new 174s registers an offense 174s when inspecting a class defined with Struct.new 174s registers an offense 174s registers an offense when inspecting or equals (`||=`) for constant 174s registers an offense when multiple assignments to constants 174s when inspecting a class defined with Struct.new 174s registers an offense 174s registers an offense when multiple assignments to constants 174s registers an offense when inspecting or equals (`||=`) for constant 174s when inspecting a class defined with ::Class.new 174s registers an offense 174s 174s RuboCop::Cop::Lint::LiteralInInterpolation 174s does not register an offense when space literal at the end of heredoc line 174s handles backslash in single quotes when autocorrecting 174s accepts interpolation of erange where endpoints are not literals 174s handles double quotes in single quotes when autocorrecting 174s handles backslash in double quotes when autocorrecting 174s handles nested interpolations when autocorrecting 174s accepts interpolation of xstr 174s accepts empty interpolation 174s accepts interpolation of irange where endpoints are not literals 174s behaves like literal interpolation 174s registers an offense for nil in interpolation and removes interpolation around it 174s removes interpolation around multiple nil 174s removes interpolation around nil when there is more text 174s registers an offense only for final nil in interpolation 174s when there is non-literal and literal interpolation 174s when literal interpolation is after non-literal 175s only removes interpolation around literal 175s when literal interpolation is before non-literal 175s only removes interpolation around literal 175s behaves like literal interpolation 175s registers an offense for 1.2e-3 in interpolation and removes interpolation around it 175s removes interpolation around multiple 1.2e-3 175s registers an offense only for final 1.2e-3 in interpolation 175s removes interpolation around 1.2e-3 when there is more text 175s when there is non-literal and literal interpolation 175s when literal interpolation is after non-literal 175s only removes interpolation around literal 175s when literal interpolation is before non-literal 175s only removes interpolation around literal 175s behaves like literal interpolation 175s removes interpolation around multiple %w[v1] 175s registers an offense only for final %w[v1] in interpolation 175s removes interpolation around %w[v1] when there is more text 175s registers an offense for %w[v1] in interpolation and removes interpolation around it 175s when there is non-literal and literal interpolation 175s when literal interpolation is after non-literal 175s only removes interpolation around literal 175s when literal interpolation is before non-literal 175s only removes interpolation around literal 175s behaves like literal interpolation 175s removes interpolation around 1 when there is more text 175s registers an offense only for final 1 in interpolation 175s registers an offense for 1 in interpolation and removes interpolation around it 175s removes interpolation around multiple 1 175s when there is non-literal and literal interpolation 175s when literal interpolation is before non-literal 175s only removes interpolation around literal 175s when literal interpolation is after non-literal 175s only removes interpolation around literal 175s behaves like literal interpolation 175s registers an offense for %I[s1 s2] in interpolation and removes interpolation around it 175s removes interpolation around multiple %I[s1 s2] 175s registers an offense only for final %I[s1 s2] in interpolation 175s removes interpolation around %I[s1 s2] when there is more text 175s when there is non-literal and literal interpolation 175s when literal interpolation is after non-literal 175s only removes interpolation around literal 175s when literal interpolation is before non-literal 175s only removes interpolation around literal 175s behaves like literal interpolation 175s removes interpolation around :symbol when there is more text 175s registers an offense for :symbol in interpolation and removes interpolation around it 175s registers an offense only for final :symbol in interpolation 175s removes interpolation around multiple :symbol 175s when there is non-literal and literal interpolation 175s when literal interpolation is before non-literal 175s only removes interpolation around literal 175s when literal interpolation is after non-literal 175s only removes interpolation around literal 175s behaves like literal interpolation 175s removes interpolation around 0xaabb when there is more text 175s registers an offense only for final 0xaabb in interpolation 175s registers an offense for 0xaabb in interpolation and removes interpolation around it 175s removes interpolation around multiple 0xaabb 175s when there is non-literal and literal interpolation 175s when literal interpolation is after non-literal 175s only removes interpolation around literal 175s when literal interpolation is before non-literal 175s only removes interpolation around literal 175s behaves like literal interpolation in words literal 175s accepts interpolation of a string literal with space in %I[] 175s removes interpolation of a string literal without space in %I[] 175s removes interpolation of an array containing a symbol literal without space in %I[] 175s accepts interpolation of an array literal containing a string with space in %I[] 175s accepts interpolation of an array literal containing a symbol with space in %I[] 175s accepts interpolation of a symbol literal with space in %I[] 175s removes interpolation of an array containing a string literal without space in %I[] 175s removes interpolation of a symbol literal without space in %I[] 175s behaves like literal interpolation 175s registers an offense only for final :"symbol" in interpolation 175s removes interpolation around multiple :"symbol" 175s removes interpolation around :"symbol" when there is more text 175s registers an offense for :"symbol" in interpolation and removes interpolation around it 175s when there is non-literal and literal interpolation 175s when literal interpolation is after non-literal 175s only removes interpolation around literal 175s when literal interpolation is before non-literal 175s only removes interpolation around literal 175s behaves like non-special string literal interpolation 175s registers an offense for 'foo' and removes the interpolation and quotes around 'foo' 175s behaves like literal interpolation 175s removes interpolation around [] when there is more text 175s removes interpolation around multiple [] 175s registers an offense for [] in interpolation and removes interpolation around it 175s registers an offense only for final [] in interpolation 175s when there is non-literal and literal interpolation 175s when literal interpolation is before non-literal 175s only removes interpolation around literal 175s when literal interpolation is after non-literal 175s only removes interpolation around literal 175s behaves like literal interpolation 175s registers an offense only for final 2.0 in interpolation 175s removes interpolation around 2.0 when there is more text 175s removes interpolation around multiple 2.0 175s registers an offense for 2.0 in interpolation and removes interpolation around it 175s when there is non-literal and literal interpolation 175s when literal interpolation is before non-literal 175s only removes interpolation around literal 175s when literal interpolation is after non-literal 175s only removes interpolation around literal 175s behaves like literal interpolation 175s registers an offense only for final -1 in interpolation 175s registers an offense for -1 in interpolation and removes interpolation around it 175s removes interpolation around -1 when there is more text 175s removes interpolation around multiple -1 175s when there is non-literal and literal interpolation 175s when literal interpolation is after non-literal 175s only removes interpolation around literal 175s when literal interpolation is before non-literal 175s only removes interpolation around literal 175s behaves like literal interpolation 175s registers an offense only for final %w[v1 v2] in interpolation 175s removes interpolation around multiple %w[v1 v2] 175s removes interpolation around %w[v1 v2] when there is more text 175s registers an offense for %w[v1 v2] in interpolation and removes interpolation around it 175s when there is non-literal and literal interpolation 175s when literal interpolation is after non-literal 175s only removes interpolation around literal 175s when literal interpolation is before non-literal 175s only removes interpolation around literal 175s behaves like literal interpolation 175s registers an offense for false in interpolation and removes interpolation around it 175s registers an offense only for final false in interpolation 175s removes interpolation around false when there is more text 175s removes interpolation around multiple false 175s when there is non-literal and literal interpolation 175s when literal interpolation is after non-literal 175s only removes interpolation around literal 175s when literal interpolation is before non-literal 175s only removes interpolation around literal 175s behaves like literal interpolation 175s removes interpolation around 123_456_789_123_456_789 when there is more text 175s removes interpolation around multiple 123_456_789_123_456_789 175s registers an offense for 123_456_789_123_456_789 in interpolation and removes interpolation around it 175s registers an offense only for final 123_456_789_123_456_789 in interpolation 175s when there is non-literal and literal interpolation 175s when literal interpolation is before non-literal 175s only removes interpolation around literal 175s when literal interpolation is after non-literal 175s only removes interpolation around literal 175s behaves like literal interpolation 175s removes interpolation around multiple %i[ s1 s2 ] 175s registers an offense only for final %i[ s1 s2 ] in interpolation 175s removes interpolation around %i[ s1 s2 ] when there is more text 175s registers an offense for %i[ s1 s2 ] in interpolation and removes interpolation around it 175s when there is non-literal and literal interpolation 175s when literal interpolation is after non-literal 175s only removes interpolation around literal 175s when literal interpolation is before non-literal 175s only removes interpolation around literal 175s behaves like literal interpolation 175s registers an offense only for final {"a" => "b"} in interpolation 175s removes interpolation around {"a" => "b"} when there is more text 175s registers an offense for {"a" => "b"} in interpolation and removes interpolation around it 175s removes interpolation around multiple {"a" => "b"} 175s when there is non-literal and literal interpolation 175s when literal interpolation is before non-literal 175s only removes interpolation around literal 175s when literal interpolation is after non-literal 175s only removes interpolation around literal 175s behaves like literal interpolation 175s removes interpolation around 1..2 when there is more text 175s removes interpolation around multiple 1..2 175s registers an offense for 1..2 in interpolation and removes interpolation around it 175s registers an offense only for final 1..2 in interpolation 175s when there is non-literal and literal interpolation 175s when literal interpolation is before non-literal 175s only removes interpolation around literal 175s when literal interpolation is after non-literal 175s only removes interpolation around literal 175s behaves like special keywords 175s registers an offense and autocorrects interpolation after __LINE__ 175s accepts strings like __LINE__ 175s behaves like non-special string literal interpolation 175s registers an offense for "foo" and removes the interpolation and quotes around "foo" 175s behaves like literal interpolation 175s registers an offense only for final 1...2 in interpolation 175s removes interpolation around 1...2 when there is more text 175s registers an offense for 1...2 in interpolation and removes interpolation around it 175s removes interpolation around multiple 1...2 175s when there is non-literal and literal interpolation 175s when literal interpolation is before non-literal 175s only removes interpolation around literal 175s when literal interpolation is after non-literal 175s only removes interpolation around literal 175s behaves like literal interpolation 175s registers an offense for ["a", "b"] in interpolation and removes interpolation around it 175s registers an offense only for final ["a", "b"] in interpolation 175s removes interpolation around ["a", "b"] when there is more text 175s removes interpolation around multiple ["a", "b"] 175s when there is non-literal and literal interpolation 175s when literal interpolation is after non-literal 175s only removes interpolation around literal 175s when literal interpolation is before non-literal 175s only removes interpolation around literal 175s behaves like literal interpolation in words literal 175s removes interpolation of an array containing a symbol literal without space in %W[] 175s accepts interpolation of an array literal containing a string with space in %W[] 175s accepts interpolation of an array literal containing a symbol with space in %W[] 175s removes interpolation of a string literal without space in %W[] 175s accepts interpolation of a string literal with space in %W[] 175s removes interpolation of a symbol literal without space in %W[] 175s accepts interpolation of a symbol literal with space in %W[] 175s removes interpolation of an array containing a string literal without space in %W[] 175s behaves like literal interpolation 175s registers an offense for %w[] in interpolation and removes interpolation around it 175s removes interpolation around %w[] when there is more text 175s registers an offense only for final %w[] in interpolation 175s removes interpolation around multiple %w[] 175s when there is non-literal and literal interpolation 175s when literal interpolation is after non-literal 175s only removes interpolation around literal 175s when literal interpolation is before non-literal 175s only removes interpolation around literal 175s behaves like literal interpolation 175s removes interpolation around multiple true 175s registers an offense only for final true in interpolation 175s registers an offense for true in interpolation and removes interpolation around it 175s removes interpolation around true when there is more text 175s when there is non-literal and literal interpolation 175s when literal interpolation is after non-literal 175s only removes interpolation around literal 175s when literal interpolation is before non-literal 175s only removes interpolation around literal 175s behaves like special keywords 175s registers an offense and autocorrects interpolation after __ENCODING__ 175s accepts strings like __ENCODING__ 175s behaves like special keywords 175s accepts strings like __END__ 175s registers an offense and autocorrects interpolation after __END__ 175s behaves like literal interpolation 175s registers an offense for %i[s1 s2] in interpolation and removes interpolation around it 175s removes interpolation around %i[s1 s2] when there is more text 175s registers an offense only for final %i[s1 s2] in interpolation 175s removes interpolation around multiple %i[s1 s2] 175s when there is non-literal and literal interpolation 175s when literal interpolation is after non-literal 175s only removes interpolation around literal 175s when literal interpolation is before non-literal 175s only removes interpolation around literal 175s behaves like literal interpolation 175s registers an offense for 0o377 in interpolation and removes interpolation around it 175s removes interpolation around multiple 0o377 175s registers an offense only for final 0o377 in interpolation 175s removes interpolation around 0o377 when there is more text 175s when there is non-literal and literal interpolation 175s when literal interpolation is after non-literal 175s only removes interpolation around literal 175s when literal interpolation is before non-literal 175s only removes interpolation around literal 175s behaves like literal interpolation 175s removes interpolation around 1_123 when there is more text 175s removes interpolation around multiple 1_123 175s registers an offense only for final 1_123 in interpolation 175s registers an offense for 1_123 in interpolation and removes interpolation around it 175s when there is non-literal and literal interpolation 175s when literal interpolation is after non-literal 175s only removes interpolation around literal 175s when literal interpolation is before non-literal 175s only removes interpolation around literal 175s in string-like contexts 175s removes interpolation in backticks 175s removes interpolation in symbols 175s removes interpolation in regular expressions 175s behaves like special keywords 175s registers an offense and autocorrects interpolation after __FILE__ 175s accepts strings like __FILE__ 175s behaves like literal interpolation 175s removes interpolation around %i[s1 s2] when there is more text 175s registers an offense for %i[s1 s2] in interpolation and removes interpolation around it 175s registers an offense only for final %i[s1 s2] in interpolation 175s removes interpolation around multiple %i[s1 s2] 175s when there is non-literal and literal interpolation 175s when literal interpolation is after non-literal 175s only removes interpolation around literal 175s when literal interpolation is before non-literal 175s only removes interpolation around literal 175s 175s RuboCop::Cop::Lint::Syntax 175s .offenses_from_processed_source 175s with a parser error 175s returns an offense 175s with --display-cop-names option 175s returns an offense with cop name 175s with a diagnostic error 175s returns an offense 175s with --autocorrect --disable-uncorrectable options 175s returns an offense 175s with --display-cop-names option 175s returns an offense with cop name 175s 175s RuboCop::Cop::InternalAffairs::NodeMatcherDirective 175s registers an offense if the matcher does not have a directive but has preceding comments 175s registers an offense if the matcher does not have a directive and a method call is used for a pattern argument 175s registers an offense if the matcher has multiple directives 175s autocorrects with the right arguments if the pattern references a non-contiguous argument 175s retains indentation properly when inserting 175s does not register an offense if called with a dynamic method name 175s does not register an offense if the node matcher already has a directive 175s retains indentation properly when inserting 175s registers an offense if the matcher does not have a directive 175s does not register an offense if the directive is in a comment block 175s retains indentation properly when correcting 175s inserts a blank line between multiple pattern matchers 175s registers an offense if the directive name does not match the actual name 175s does not register an offense if the directive is in a comment block 175s registers an offense if the matcher does not have a directive and a method call is used for a pattern argument 175s does not insert a blank line if one already exists 175s registers an offense if the matcher does not have a directive but has preceding comments 175s autocorrects with the right arguments if the pattern includes arguments 175s registers an offense if the directive name does not match the actual name 175s inserts a blank line between multiple pattern matchers 175s inserts a blank line between multiple multi-line pattern matchers 175s autocorrects with the right arguments if the pattern references a non-contiguous argument 175s autocorrects with the right arguments if the pattern includes arguments 175s registers an offense if the matcher has multiple directives 175s inserts a blank line between multiple multi-line pattern matchers 175s does not register an offense if the node matcher already has a directive 175s does not register an offense if called with a dynamic method name 175s does not insert a blank line if one already exists 175s registers an offense if the matcher does not have a directive 175s retains indentation properly when correcting 175s 175s RuboCop::Cop::Style::NegatedIf 175s does not blow up for ternary ops 175s does not blow up for empty unless condition 175s does not blow up on a negated ternary operator 175s does not blow up for empty if condition 175s with “both” style 175s accepts an if/else with negative condition 175s is not confused by negated elsif 175s accepts an if where the condition is doubly negated 175s accepts an if where only part of the condition is negated 175s registers an offense for if with "not" condition 175s autocorrects by replacing parenthesized if not with unless 175s registers an offense for if with exclamation point condition 175s with “prefix” style 175s registers an offense for prefix 175s does not register an offense for postfix 175s with “postfix” style 175s registers an offense for postfix 175s does not register an offense for prefix 175s 175s RuboCop::Cop::Style::SlicingWithRange 175s >= Ruby 2.7 175s reports no offense for startless 175s >= Ruby 2.6 175s reports an offense for slicing from expression to ..-1 175s reports no offense for array with range inside 175s reports no offense for other methods 175s reports no offense for excluding end 175s reports an offense for slicing to ..-1 175s <= Ruby 2.5 175s reports no offense for array slicing with -1 175s 175s RuboCop::Cop::Style::ClassAndModuleChildren 175s compact style 175s registers an offense for modules with partially nested children 175s accepts nesting for classes with an explicit superclass 175s registers a offense for classes with nested one-liner children 175s preserves comments between classes 175s correctly indents heavily nested children 175s accepts class/module with single method 175s registers an offense for classes with partially nested children 175s registers a offense for classes with nested children 175s accepts nesting for classes/modules with more than one child 175s accepts compact style for classes/modules 175s registers a offense for modules with nested children 175s registers and offense for deeply nested children 175s nested style 175s registers an offense for not nested classes when namespace is defined as a class 175s registers an offense for not nested classes 175s accepts cbase module name 175s registers an offense for not nested modules 175s accepts :: in parent class on inheritance 175s registers an offense for partially nested modules 175s preserves comments 175s registers an offense for partially nested classes 175s registers an offense for not nested classes when namespace is defined as a module 175s registers an offense for not nested classes with explicit superclass 175s accepts nested children 175s accepts cbase class name 175s 175s RuboCop::Cop::Layout::MultilineHashBraceLayout 175s ignores empty hashes 175s ignores single-line hashes 175s ignores implicit hashes 175s behaves like multiline literal brace layout method argument 175s when arguments to a method 175s and a comment after the last element 175s detects closing brace on separate line from last element 175s but no comment after the last element 175s autocorrects the closing brace 175s behaves like multiline literal brace layout 175s heredoc 175s detects heredoc structures that are safe to add to 175s ignores heredocs that could share a last line 175s same_line style 175s opening brace on same line as first element 175s detects closing brace on different line from multiline element 175s autocorrects closing brace on different line as last element 175s allows closing brace on same line as multi-line element 175s allows closing brace on same line from last element 175s with a chained call on the closing brace 175s and a comment after the last element 175s detects closing brace on separate line from last elementbut does not autocorrect the closing brace 175s but no comment after the last element 175s autocorrects the closing brace 175s opening brace on separate line from first element 175s detects closing brace on different line from last element 175s allows closing brace on same line as last element 175s allows closing brace on same line as last multiline element 175s symmetrical style 175s opening brace on same line as first element 175s detects closing brace on different line from last element 175s autocorrects closing brace on different line from last element 175s allows closing brace on same line as last element 175s allows closing brace on same line as last multiline element 175s with a chained call on the closing brace 175s but no comment after the last element 175s autocorrects the closing brace 175s and a comment after the last element 175s detects closing brace on separate line from last elementbut does not autocorrect the closing brace 175s opening brace on separate line from first element 175s detects closing brace on same line as last element 175s allows closing brace on separate line from last element 175s allows closing brace on separate line from last multiline element 175s new_line style 175s opening brace on separate line from first element 175s allows closing brace on separate line from last element 175s allows closing brace on separate line from last multiline element 175s detects closing brace on same line as last element 175s opening brace on same line as first element 175s detects closing brace on same line as last multiline element 175s autocorrects closing brace on same line as last element 175s allows closing brace on different line from multi-line element 175s allows closing brace on different line from last element 175s behaves like multiline literal brace layout trailing comma 175s symmetrical style 175s opening brace on same line as first element 175s last element has a trailing comma 175s autocorrects closing brace on different line from last element 175s same_line style 175s opening brace on same line as first element 175s last element has a trailing comma 175s autocorrects closing brace on different line as last element 175s 175s RuboCop::Server::CLI 175s when not using any server options 175s returns exit status 0 175s when not using any server options and specifying `--server` in .rubocop file 176s returns exit status 0 and display an information message 176s when using exclusive `--server-status` option 176s returns exit status 2 and display an error message 176s when using `--no-server` option 176s returns exit status 0 176s when using `--server` option 176s returns exit status 0 and display an information message 176s when using server option with `--cache-root path` option 176s returns exit status 0 and display an error message 176s when using server option with `--cache-root=path` option 176s returns exit status 0 and display an information message 176s when using `--server-status` option 176s returns exit status 0 and display an information message 176s when using exclusive `--start-server` option 176s returns exit status 2 and display an error message 176s when using `--restart-server` option 176s returns exit status 0 and display an information and a warning messages 176s when using exclusive `--restart-server` option 176s returns exit status 2 and display an error message 176s when using multiple server options 176s returns exit status 2 and display an error message 176s when using `--stop-server` option 176s returns exit status 0 and display a warning message 176s when not using any server options and specifying `--server` in `RUBOCOP_OPTS` environment variable 176s returns exit status 0 and display an information message 176s when using `--start-server` option 176s returns exit status 0 and display an information message 176s when using exclusive `--stop-server` option 177s returns exit status 2 and display an error message 177s 177s RuboCop::Cop::Style::Dir 177s when using `#expand_path` and `#dirname` 177s registers an offense with ::File 177s registers an offense 177s when using `#dirname` and `#realpath` 177s registers an offense 177s registers an offense with ::File 177s 177s RuboCop::Cop::Style::SwapValues 177s handles comments when correcting 177s does not register an offense when assigning receiver object at `def` 177s does not register an offense when idiomatically swapping variables 177s does not register an offense when almost swapping variables 177s behaves like verbosely swapping 177s registers an offense and corrects when verbosely swapping global variables 177s behaves like verbosely swapping 177s registers an offense and corrects when verbosely swapping constant with namespaces variables 177s behaves like verbosely swapping 177s registers an offense and corrects when verbosely swapping mixed variables 177s behaves like verbosely swapping 177s registers an offense and corrects when verbosely swapping instance variables 177s behaves like verbosely swapping 177s registers an offense and corrects when verbosely swapping local variables 177s behaves like verbosely swapping 177s registers an offense and corrects when verbosely swapping constant variables 177s behaves like verbosely swapping 177s registers an offense and corrects when verbosely swapping class variables 177s 177s RuboCop::Cop::Style::CaseLikeIf 177s registers an offense and corrects when using `match?` with regexp 177s registers an offense and corrects when using nested conditions with `||` 177s does not register an offense when only single `if` 177s does not register an offense when using `==` with constant containing 1 letter in name 177s registers an offense and corrects when using `match?` with non regexp in other branches except first 177s registers an offense and corrects when target is a method call 177s does not register an offense when using `=~` in first branch with non regexp 177s does not register an offense when one of `||` subconditions is not convertible 177s does not register an offense when using `match?` in first branch with non regexp 177s does not register an offense when using `include?` without a receiver 177s does not register an offense when using `cover?` without a receiver 177s does not register an offense when using `match?` without a receiver 177s does not register an offense when only `if-else` 177s registers an offense and corrects when using `||` within conditions 177s does not register an offense when using `unless` 177s does not register an offense when an object overrides `equal?` with no arity 177s registers an offense and corrects when using `include?` with range 177s registers an offense and corrects when using `==` with literal 177s does not register an offense when using `equal?` without a receiver 177s registers an offense and corrects when using `=~` 177s registers an offense and corrects when using `===` 177s does not register an offense when using `match?` with non regexp 177s registers an offense and corrects when using `is_a?` 177s does not register an offense when one of the branches contains `==` with class reference 177s does not register an offense when not all conditions contain target 177s does not register an offense when using modifier `if` 177s registers an offense and corrects when using `==` with constant 177s does not register an offense when using `==` with method call with arguments 177s does not register an offense when using ternary operator 177s does not register an offense when using `==` with class reference 177s when using regexp with named captures 177s does not register an offense with match and regexp on rhs 177s registers and corrects an offense with =~ and regexp on rhs 177s does not register an offense with =~ and regexp on lhs 177s registers and corrects an offense with match? and regexp on lhs 177s registers and corrects an offense with match? and regexp on rhs 177s does not register an offense with match and regexp on lhs 177s 177s RuboCop::Cop::Lint::AmbiguousRange 177s for an irange 177s registers an offense and corrects when one side is parenthesized but the other is not 177s does not register an offense if the range is composed of literals 177s does not register an offense for `self` 177s registers an offense and corrects when the entire range is parenthesized but contains complex boundaries 177s registers an offense and corrects when not parenthesized 177s registers an offense and corrects when there are clauses on both sides 177s does not register an offense for a variable 177s does not register an offense if the range is parenthesized 177s can handle an endless range 177s can handle a beginningless range 177s does not register an offense for a constant 177s method calls 177s with RequireParenthesesForMethodChains: false 177s does not register an offense for a chained method call without parens 177s does not register an offense for a chained method call with parens 177s behaves like common behavior 177s does not register an offense for a non-chained method call 177s does not register an offense for a unary + 177s requires parens when calling a method on a basic literal 177s does not register an offense for a unary - 177s with RequireParenthesesForMethodChains: true 177s does not register an offense for a chained method call with parens 177s registers an offense for a chained method call without parens 177s behaves like common behavior 177s requires parens when calling a method on a basic literal 177s does not register an offense for a unary + 177s does not register an offense for a unary - 177s does not register an offense for a non-chained method call 177s for an erange 177s does not register an offense for a variable 177s can handle an endless range 177s registers an offense and corrects when not parenthesized 177s does not register an offense for `self` 177s does not register an offense if the range is parenthesized 177s does not register an offense for a constant 177s registers an offense and corrects when the entire range is parenthesized but contains complex boundaries 177s registers an offense and corrects when one side is parenthesized but the other is not 177s can handle a beginningless range 177s registers an offense and corrects when there are clauses on both sides 177s does not register an offense if the range is composed of literals 177s method calls 177s with RequireParenthesesForMethodChains: true 177s does not register an offense for a chained method call with parens 177s registers an offense for a chained method call without parens 177s behaves like common behavior 177s requires parens when calling a method on a basic literal 177s does not register an offense for a non-chained method call 177s does not register an offense for a unary + 177s does not register an offense for a unary - 177s with RequireParenthesesForMethodChains: false 177s does not register an offense for a chained method call with parens 177s does not register an offense for a chained method call without parens 177s behaves like common behavior 177s does not register an offense for a non-chained method call 177s requires parens when calling a method on a basic literal 177s does not register an offense for a unary + 177s does not register an offense for a unary - 177s 177s RuboCop::Cop::Style::TrailingBodyOnClass 177s autocorrects with comment after body 177s accepts regular class 177s registers offense with multi-line class 177s accepts class inheritance 177s registers an offense when body trails after class definition 177s when class is not on first line of processed_source 177s autocorrect offense 177s 177s RuboCop::Cop::Metrics::ParameterLists 177s does not register an offense when method has allowed amount of args with block arg 177s accepts a proc with more than 4 parameters 177s does not register an offense when method has allowed amount of optargs 177s registers an offense for a method def with 5 parameters 177s accepts a lambda with more than 4 parameters 177s accepts a method def with 4 parameters 177s registers an offense when optargs count exceeds the maximum 177s does not register an offense when method has no args 177s When CountKeywordArgs is true 177s counts keyword arguments as well 177s When CountKeywordArgs is false 177s does not count keyword arguments 177s does not count keyword arguments without default values 177s 177s RuboCop::Cop::Style::SoleNestedConditional 177s registers an offense and corrects when using `unless` and method arguments with parentheses in the outer condition and nested modifier condition 177s registers an offense and corrects when using nested `unless` within `unless` 177s registers an offense and corrects when `if` foo do_something end `if` bar 177s registers an offense and corrects when `if` foo do_something end `if` bar && baz 177s does not register an offense when using nested modifier on value assigned in single condition 177s registers an offense and corrects when `unless` foo do_something end `if` bar 177s registers an offense and corrects when using nested `unless` within `if` 177s registers an offense and corrects when `if` foo && bar do_something end `unless` baz 177s registers an offense and corrects when using nested `if` within `if` 177s does not register an offense when using nested ternary within conditional 177s registers an offense and corrects when nested `||` operator condition 177s registers an offense and corrects when using nested `if` within `unless foo == bar` 177s registers an offense and corrects when using `unless` and multiple method arguments with parenthesesin the outer condition and nested modifier condition 177s does not register an offense when using nested conditional is not the whole body 177s registers an offense and corrects when using nested `if` modifier conditional 177s registers an offense and corrects for multiple nested conditionals 177s does not register an offense when using nested modifier on value assigned in multiple conditions 177s registers an offense and corrects when using nested conditional and branch contains a comment 177s registers an offense and corrects when using `unless` and `||` without parens in the outer condition and nested modifier condition 177s registers an offense and corrects for multiple nested conditionals with using method call outer condition by omitting parentheses 177s does not register an offense when using nested conditional within `elsif` 177s registers an offense and corrects when using nested `unless` modifier with a single expression condition 177s registers an offense and corrects when using nested `if` within `unless` 177s registers an offense and corrects when using `unless` and `&&` without parens in the outer condition and nested modifier condition 177s registers an offense and corrects when using nested `unless` modifier multiple conditional 177s registers an offense and corrects when using nested `unless` modifier conditional 177s registers an offense and corrects when using `||` in the outer condition and nested modifier condition 177s registers an offense and corrects when `if` foo do_something end `unless` bar 177s registers an offense and corrects when using `||` in the outer condition 177s does not register an offense when nested conditional has an `else` branch 177s does not register an offense for nested conditionals when outer conditional has an `else` branch 177s registers an offense and corrects when using guard conditional with outer comment 177s registers an offense and corrects when using nested `if` within `if foo = bar` 177s registers an offense and corrects when `unless` foo && bar do_something end `if` baz 177s registers an offense and corrects when `if` foo && bar do_something end `if` baz 178s registers an offense and corrects when nested `||` operator modifier condition 178s registers an offense and corrects when using `unless` and method arguments without parentheses in the outer condition and nested modifier condition 178s registers an offense and corrects when there are outer and inline comments 178s does not register an offense when no nested conditionals 178s registers an offense and corrects when `if` foo do_something end `unless` bar && baz 178s registers an offense and corrects when using `unless` and `||` and parens in the outer condition and nested modifier condition 178s when the inner condition has a send node with parens 178s in guard style 178s registers an offense and corrects 178s in modifier style 178s registers an offense and corrects 178s when disabling `Style/IfUnlessModifier` 178s registers an offense and corrects when there are outer and inline comments 178s registers an offense and corrects when using nested conditional and branch contains a comment 178s when the inner condition has a send node without parens 178s in modifier style 178s registers an offense and corrects 178s with a `csend` node 178s registers an offense and corrects 178s with a block 178s registers an offense and corrects 178s in guard style 178s registers an offense and corrects 178s when AllowModifier is true 178s does not register an offense when using nested modifier conditional 178s 178s RuboCop::Cop::Layout::MultilineAssignmentLayout 178s new_line style 178s registers an offense when the rhs is on the same line in []= 178s registers an offense when the rhs is on the same line 178s registers an offense for masgn with multi-line lhs 178s allows multi-line assignments on separate lines 178s ignores arrays 178s registers an offense when the rhs is on the same line in setters 178s configured supported types 178s allows supported types to be configured 178s when supported types is block 178s allows multi-line block defines on separate lines 178s allows multi-line assignments when using block definition on separate lines 178s registers an offense when multi-line assignments using block definition is on the same line 178s allows multi-line assignments when using shovel operator 178s same_line style 178s registers an offense for masgn with multi-line lhs 178s ignores arrays 178s allows multi-line assignments on the same line 178s registers an offense when the rhs is a different line in setters 178s registers an offense when the rhs is a different line 178s registers an offense when the rhs is a different line in []= 178s when supported types is block 178s allows multi-line assignments when using shovel operator 178s registers an offense when multi-line assignments using block definition on separate lines 178s allows multi-line block defines on separate lines 178s allows when multi-line assignments using block definition is on the same line 178s configured supported types 178s allows supported types to be configured 178s 178s RuboCop::Cop::Lint::RedundantRequireStatement 178s registers an offense when using requiring `enumerator` in condition 178s registers an offense when using requiring `enumerator` with modifier form 178s registers an offense when using requiring `enumerator` 178s target ruby version >= 2.7 178s registers an offense when using requiring `ruby2_keywords` or already redundant features 178s target ruby version >= 2.2 178s registers an offense when using requiring `rational`, `complex` 178s target ruby version >= 2.5 178s register an offense and corrects when using requiring `pp` or already redundant features 178s target ruby version >= 3.1 178s registers an offense and corrects when using requiring `fiber` or already redundant features 178s target ruby version >= 3.2 178s registers an offense and corrects when using requiring `set` 178s target ruby version <= 2.1 178s does not register an offense when using requiring `rational`, `complex` 178s target ruby version <= 2.4 178s does not register an offense when using requiring `pp` 178s target ruby version <= 2.6 178s does not register an offense when using requiring `ruby2_keywords` 178s target ruby version >= 2.1 178s register an offense and corrects when using requiring `thread` or already redundant features 178s target ruby version <= 2.0 178s does not register an offense when using requiring `thread` 178s target ruby version < 3.1 178s does not register an offense and corrects when using requiring `fiber` 178s 178s RuboCop::Cop::Style::RescueModifier 178s handles parentheses around a rescue modifier 178s does not register an offense for normal rescue with ensure 178s registers an offense for modifier rescue 178s does not register an offense for normal rescue 178s registers an offense for modifier rescue around parallel assignment 178s does not register an offense for nested normal rescue 178s handles modifier rescue in a method 178s handles more complex expression with modifier rescue 178s handles modifier rescue in normal rescue 178s when a singleton method has implicit begin 178s accepts normal rescue 178s handles modifier rescue in body of implicit begin 178s autocorrect 178s corrects doubled rescue modifiers 178s corrects complex rescue modifier 178s when an instance method has implicit begin 178s handles modifier rescue in body of implicit begin 178s accepts normal rescue 178s excluded file 178s processes excluded files with issue 178s 178s RuboCop::Cop::Style::RedundantParentheses 178s registers an offense for parens around an integer exponentiation base 178s registers an offense for parens around a literal hash value 178s accepts parentheses when enclosed in parentheses at `while-post` 178s registers an offense for parens around a positive exponent 178s registers an offense for parens around last expressions in block body 178s accepts parentheses around a constant passed to when 178s accepts parentheses around an irange 178s registers an offense and corrects when method arguments are unnecessarily parenthesized 178s registers an offense for parens around a literal in array and following newline 178s registers an offense for parens around a block body 178s registers an offense for parens around an interpolated expression 178s accepts parentheses when enclosed in parentheses at `until-post` 178s accepts parentheses around an erange 178s registers an offense for parens around a literal in array 178s registers an offense for parens around a literal hash value and following newline 178s registers an offense when there is space around the parentheses 178s accepts parentheses in yield call with hash 178s accepts parentheses inside an irange 178s registers an offense for parens around a float exponentiation base 178s accepts parentheses when they touch the following keyword 178s accepts parentheses when they touch the preceding keyword 178s accepts parentheses in super call with hash 178s registers an offense for parens around a receiver of a method call with an argument 178s accepts parentheses inside an erange 178s registers an offense for parens around method body 178s registers an offense and corrects for a parenthesized item in a hash where the comma is on a line with the closing parens 178s registers an offense for parens around a variable after semicolon 178s registers an offense for parens around a negative exponent 178s registers an offense and corrects an array of multiple heredocs 178s accepts parentheses around a method call with unparenthesized arguments 178s accepts parentheses around the error passed to rescue 178s accepts parentheses around operator keywords 178s registers an offense for parens around last expressions in method body 178s behaves like redundant 178s registers an offense for parentheses around an unary operation 178s behaves like redundant 178s registers an offense for parentheses around a literal 178s behaves like redundant 178s registers an offense for parentheses around a constant 178s behaves like redundant 178s registers an offense for parentheses around a keyword 178s behaves like redundant 178s registers an offense for parentheses around a literal 178s behaves like plausible 178s accepts parentheses when arguments are unparenthesized 178s behaves like redundant 178s registers an offense for parentheses around a literal 178s behaves like redundant 178s registers an offense for parentheses around a literal 178s behaves like redundant 178s registers an offense for parentheses around a method call 178s behaves like redundant 178s registers an offense for parentheses around a literal 178s behaves like plausible 178s accepts parentheses when arguments are unparenthesized 178s behaves like redundant 178s registers an offense for parentheses around a method call 178s behaves like plausible 178s accepts parentheses when arguments are unparenthesized 178s behaves like redundant 178s registers an offense for parentheses around an unary operation 178s when parentheses are used like method argument parentheses 178s accepts parens around the arg 178s behaves like redundant 178s registers an offense for parentheses around an unary operation 178s behaves like redundant 178s registers an offense for parentheses around a keyword 178s behaves like redundant 178s registers an offense for parentheses around a method call 178s behaves like redundant 178s registers an offense for parentheses around a method call 178s behaves like plausible 178s accepts parentheses when arguments are unparenthesized 178s behaves like redundant 178s registers an offense for parentheses around a literal 178s pin operator 178s behaves like allowed parentheses 178s accepts parentheses on a method call on a local variable 178s behaves like allowed parentheses 178s accepts parentheses on a function call with arguments 178s behaves like redundant parentheses 178s registers an offense and corrects a local variable 178s behaves like redundant parentheses 178s registers an offense and corrects a global variable 178s behaves like allowed parentheses 178s accepts parentheses on a range literal 178s behaves like allowed parentheses 178s accepts parentheses on an expression 178s behaves like allowed parentheses 178s accepts parentheses on a hash literal 178s behaves like allowed parentheses 178s accepts parentheses on a method call on a global variable 178s behaves like allowed parentheses 178s accepts parentheses on a method call on a class variable 178s behaves like allowed parentheses 178s accepts parentheses on an array literal 178s behaves like redundant parentheses 178s registers an offense and corrects an instance variable 178s behaves like allowed parentheses 178s accepts parentheses on an int literal 178s behaves like redundant parentheses 178s registers an offense and corrects a class variable 178s behaves like allowed parentheses 178s accepts parentheses on a function call with no arguments 178s behaves like allowed parentheses 178s accepts parentheses on a method call on an instance variable 178s behaves like redundant 178s registers an offense for parentheses around a literal 178s behaves like redundant 178s registers an offense for parentheses around a keyword 178s behaves like redundant 178s registers an offense for parentheses around a method call 178s behaves like plausible 178s accepts parentheses when arguments are unparenthesized 178s behaves like redundant 178s registers an offense for parentheses around a variable 178s behaves like plausible 178s accepts parentheses when arguments are unparenthesized 178s when a non-parenthesized call has an arg and a block 178s accepts parens around the arg 178s behaves like redundant 178s registers an offense for parentheses around a method call 178s behaves like redundant 178s registers an offense for parentheses around a literal 178s behaves like plausible 178s accepts parentheses when arguments are unparenthesized 178s behaves like plausible 178s accepts parentheses when arguments are unparenthesized 178s behaves like plausible 178s accepts parentheses when arguments are unparenthesized 178s behaves like redundant 178s registers an offense for parentheses around a literal 178s behaves like plausible 178s accepts parentheses when arguments are unparenthesized 178s behaves like redundant 178s registers an offense for parentheses around a literal 178s behaves like plausible 178s accepts parentheses when arguments are unparenthesized 178s when a hash literal is the second argument in a method call 178s registers an offense 178s behaves like redundant 178s registers an offense for parentheses around a literal 178s behaves like keyword with return value 178s behaves like redundant 178s registers an offense for parentheses around a keyword 178s behaves like redundant 178s registers an offense for parentheses around a keyword 178s behaves like redundant 178s registers an offense for parentheses around a keyword 178s behaves like plausible 178s accepts parentheses when arguments are unparenthesized 178s behaves like redundant 178s registers an offense for parentheses around a keyword 178s when the first argument in a method call begins with a hash literal 178s registers an offense if the argument list is parenthesized 178s accepts parentheses if the argument list is not parenthesized 178s behaves like plausible 178s accepts parentheses when arguments are unparenthesized 178s behaves like keyword with arguments 178s behaves like redundant 178s registers an offense for parentheses around a keyword 178s behaves like plausible 178s accepts parentheses when arguments are unparenthesized 178s behaves like redundant 178s registers an offense for parentheses around a keyword 178s behaves like redundant 178s registers an offense for parentheses around a keyword 178s behaves like plausible 178s accepts parentheses when arguments are unparenthesized 178s behaves like keyword with return value 178s behaves like redundant 178s registers an offense for parentheses around a keyword 178s behaves like redundant 178s registers an offense for parentheses around a keyword 178s behaves like redundant 178s registers an offense for parentheses around a keyword 178s behaves like plausible 178s accepts parentheses when arguments are unparenthesized 178s literals in an array 178s when there is a comma on the same line as the closing parentheses 178s registers an offense and corrects when there is assignment 178s registers an offense and corrects when there is a subsequent item 178s registers an offense and corrects when there is a trailing comma 178s registers an offense and corrects when there is no subsequent item 178s behaves like plausible 178s accepts parentheses when arguments are unparenthesized 178s behaves like redundant 178s registers an offense for parentheses around a keyword 178s ternaries 178s when Style/TernaryParentheses has EnforcedStyle: require_no_parentheses 178s registers an offense for parens around ternary condition 178s when Style/TernaryParentheses is not enabled 178s registers an offense for parens around constant ternary condition 178s when Style/TernaryParentheses has EnforcedStyle: require_parentheses_when_complex 178s behaves like plausible 178s accepts parentheses when arguments are unparenthesized 178s when Style/TernaryParentheses has EnforcedStyle: require_parentheses 178s behaves like plausible 178s accepts parentheses when arguments are unparenthesized 178s behaves like plausible 178s accepts parentheses when arguments are unparenthesized 178s behaves like redundant 178s registers an offense for parentheses around a literal 178s behaves like redundant 178s registers an offense for parentheses around a variable 178s behaves like redundant 178s registers an offense for parentheses around a method call 178s behaves like redundant 178s registers an offense for parentheses around a method call 178s behaves like redundant 178s registers an offense for parentheses around an unary operation 178s behaves like redundant 178s registers an offense for parentheses around a literal 178s behaves like redundant 178s registers an offense for parentheses around a method call 178s behaves like redundant 178s registers an offense for parentheses around a keyword 178s behaves like redundant 178s registers an offense for parentheses around a literal 178s behaves like redundant 178s registers an offense for parentheses around a keyword 178s behaves like keyword with arguments 178s behaves like redundant 178s registers an offense for parentheses around a keyword 178s behaves like plausible 178s accepts parentheses when arguments are unparenthesized 178s behaves like redundant 178s registers an offense for parentheses around a keyword 178s behaves like redundant 178s registers an offense for parentheses around a keyword 178s behaves like redundant 178s registers an offense for parentheses around a literal 178s behaves like plausible 178s accepts parentheses when arguments are unparenthesized 178s behaves like redundant 178s registers an offense for parentheses around a literal 178s behaves like plausible 178s accepts parentheses when arguments are unparenthesized 178s behaves like plausible 178s accepts parentheses when arguments are unparenthesized 178s behaves like redundant 178s registers an offense for parentheses around a variable 178s behaves like keyword with return value 178s behaves like redundant 178s registers an offense for parentheses around a keyword 178s behaves like redundant 178s registers an offense for parentheses around a keyword 178s behaves like plausible 178s accepts parentheses when arguments are unparenthesized 178s behaves like redundant 178s registers an offense for parentheses around a keyword 178s 178s RuboCop::Cop::Lint::UnreachableLoop 178s handles inner loops 178s does not register an offense when using `return do_something(value) || next` in a loop 178s does not register an offense when branch includes continue statement preceding break statement 178s does not register an offense when using `return do_something(value) || redo` in a loop 178s registers an offense when using `return do_something(value) || break` in a loop 178s with an enumerator method 178s not chained 178s registers an offense 178s as the last item in a method chain 178s registers an offense 178s in the middle of a method chain 178s does not register an offense 178s with preceding continue statements 178s does not register an offense when using `if-else` with all break branches 178s does not register an offense when using `case-when-else` with all break branches 178s does not register an offense when using `break` 178s without preceding continue statements 178s does not register an offense when using `case` without `else` 178s registers an offense when using `break` 178s does not register an offense when using `if` without `else` 178s does not register an offense when using `case-when-else` and not all branches are breaking 178s registers an offense when using `case-when-else` with all break branches 178s does not register an offense when using `if-elsif-else` and not all branches are breaking 178s registers an offense when using `if-else` with all break branches 178s Ruby 2.7 178s registers an offense when using `return do_something(value) || break` in a loop 178s with AllowedPatterns 178s with a ignored method call 178s does not register an offense 178s with a non ignored method call 178s registers an offense 178s Ruby 2.7 178s registers an offense 178s 178s RuboCop::Cop::Style::MultilineMemoization 178s EnforcedStyle: keyword 178s with a single line memoization 178s allows expression on first line 178s allows expression on the following line 178s with a multiline memoization 178s without a `begin` and `end` block 178s allows with another block on the first line 178s allows with another block on the following line 178s allows with a conditional on the following line 178s allows with a conditional on the first line 178s with a multiline memoization 178s without a `begin` and `end` block 178s when the expression is wrapped in parentheses 178s registers an offense when expression starts on following line 178s registers an offense with multiline expression 178s registers an offense when expression starts on first line 178s EnforcedStyle: braces 178s with a multiline memoization 178s without a `begin` and `end` block 178s allows with a conditional on the following line 178s allows with another block on the following line 178s allows with a conditional on the first line 178s allows with another block on the first line 178s with a single line memoization 178s allows expression on first line 178s allows expression on the following line 178s with a multiline memoization 178s without braces 178s when the expression is wrapped in `begin` and `end` keywords 178s registers an offense for begin...end block on following line 178s registers an offense for begin...end block on first line 178s 178s RuboCop::StringInterpreter 178s .interpret 178s handles extended unicode 178s handles octal 178s handles hex 178s handles unicode 178s behaves like simple escape 178s handles \\b 178s behaves like simple escape 178s handles \\r 178s behaves like simple escape 178s handles \\s 178s behaves like simple escape 178s handles \\n 178s behaves like simple escape 178s handles \\v 178s behaves like simple escape 178s handles \\t 178s behaves like simple escape 178s handles \\e 178s behaves like simple escape 178s handles \\a 178s behaves like simple escape 178s handles \\f 178s 178s RuboCop::Cop::Style::NegatedWhile 178s registers an offense for until with exclamation point condition 178s autocorrects by replacing until not with while 178s accepts a while where only part of the condition is negated 178s registers an offense for while with exclamation point condition 178s does not blow up for empty until condition 178s accepts a while where the condition is doubly negated 178s registers an offense for while with "not" condition 178s does not blow up for empty while condition 178s autocorrects by replacing while not with until 178s 178s RuboCop::Cop::Generator::RequireFileInjector 178s when a `require_relative` entry does not exist from before 178s injects a `require_relative` statement on the right line in the root file 178s when using an unknown department 178s inserts a `require_relative` statement to the bottom of the file 178s when a `require` entry already exists 178s does not write to any file 178s when a cop of style department already exists 178s injects a `require_relative` statement on the end of style department 178s 178s RuboCop::Cop::Lint::UnusedMethodArgument 178s when IgnoreEmptyMethods config parameter is set 178s accepts an empty method with multiple unused parameters 178s accepts an empty method with a single unused parameter 178s registers an offense for a non-empty method with a single unused parameter 178s accepts an empty singleton method with a single unused parameter 178s registers an offense for a non-empty method with multiple unused parameters 178s inspection 178s in a method calling `super` without arguments 178s when a method argument is not used explicitly 178s accepts since the arguments are guaranteed to be the same as superclass' ones and the user has no control on them 178s when an argument with a default value is unused 178s registers an offense and preserves the default value 178s when a trailing block argument is unused 178s registers an offense and removes the unused block arg 178s in a method calling `super` with arguments 178s when a method argument is unused 178s registers an offense 178s when a singleton method argument is unused 178s registers an offense 178s when a required keyword argument is unused 178s when a required keyword argument is unused 178s registers an offense but does not suggest underscore-prefix 178s when an optional keyword argument is unused 178s registers an offense but does not suggest underscore-prefix 178s and AllowUnusedKeywordArguments set 178s does not care 178s when a method argument is used 178s accepts 178s when a variable is unused 178s does not care 178s when a splat argument is unused 178s registers an offense and preserves the splat 178s when a block argument is unused 178s does not care 178s in a method calling `binding` with arguments 178s when a method argument is unused 178s registers an offense 178s when an underscore-prefixed method argument is unused 178s accepts 178s in a method calling `binding` without arguments 178s accepts all arguments 178s inside another method definition 178s registers offenses 178s when a method takes multiple arguments 178s and all the arguments are unused 178s registers offenses and suggests the use of `*` and autocorrects to add underscore-prefix to all arguments 178s and an argument is unused 178s registers an offense and adds underscore-prefix 178s and arguments are swap-assigned 178s accepts 178s and there is some whitespace around the unused argument 178s registers an offense and preserves whitespace 178s and one argument is assigned to another, whilst other's value is not used 178s registers an offense 178s when IgnoreNotImplementedMethods config parameter is set 178s registers an offense for a non-empty method with multiple unused parameters 178s accepts a method with a single unused parameter & raises NotImplementedError 178s accepts an empty method with multiple unused parameters 178s accepts a method with a single unused parameter & fails with message 178s accepts an empty singleton method with a single unused parameter &raise NotImplementedError 178s accepts a method with a single unused parameter & raises ::NotImplementedError 178s registers an offense for a non-empty method with a single unused parameter 178s accepts a method with a single unused parameter & fails without message 178s accepts a method with a single unused parameter & raises NotImplementedError, message 178s 178s RuboCop::Cop::Style::AccessorGrouping 178s when EnforcedStyle is grouped 178s registers offense and corrects if at least two separate accessors without comments 178s registers an offense and corrects when using separated accessors 178s registers an offense and correct if the same accessor is listed twice 178s registers an offense and corrects when using separated accessors with different access modifiers 178s does not register an offense when using grouped accessors 178s registers an offense and corrects when using separated accessors within eigenclass 178s does not register an offense when the same accessor is given more than once in the same statement 178s does not register offense for accessors with comments 178s when EnforcedStyle is separated 178s does not register an offense when using separated accessors 178s registers an offense and corrects when using grouped accessors within eigenclass 178s does not register an offense if the same accessor is listed twice 178s registers an offense and corrects when the same accessor is given more than once in the same statement 178s does not register an offense for grouped accessors with comments 178s registers an offense and corrects when using grouped accessors with different access modifiers 178s registers an offense and corrects when using grouped accessors 178s when there are comments for attributes 178s registers and corrects an offense 178s 178s RuboCop::Cop::Lint::ParenthesesAsGroupedExpression 178s registers an offense and corrects for predicate method call with space before the parenthesis 178s accepts a chain of method calls 178s does not register an offense for expression followed by chained expression 178s does not register an offense for ternary operator 178s does not register an offesne when heredoc has a space between the same string as the method name and `(` 178s does not register an offense for math expression 178s accepts a method call without arguments 178s does not register an offense when method argument parentheses are omitted and hash argument key is enclosed in parentheses 178s accepts a method call with arguments but no parentheses 178s accepts an operator call with argument in parentheses 178s does not register an offense for expression followed by an operator 178s does not register an offense for a call with multiple arguments 179s accepts a space inside opening paren followed by left paren 179s does not register an offense for math expression with `to_i` 179s registers an offense and corrects for method call with space before the parenthesis 179s does not register an offense for expression followed by chained expression with safe navigation operator 179s accepts method with parens as arg to method without 179s when using safe navigation operator 179s registers an offense and corrects for method call with space before the parenthesis 179s 179s RuboCop::Cop::Style::Documentation 179s accepts namespace module without documentation 179s accepts namespace module which defines constants 179s registers an offense for non-namespace 179s registers an offense for non-empty class with encoding comment 179s registers an offense for compact-style nested class 179s accepts non-empty module with documentation 179s does not raise an error for an implicit match conditional 179s accepts namespace class without documentation 179s registers an offense for a deeply nested class 179s does not consider comment followed by empty line to be class documentation 179s accepts empty class without documentation 179s registers an offense for non-empty class with directive comment 179s accepts namespace class which defines constants 179s registers an offense for non-empty class 179s registers an offense for empty module without documentation 179s registers an offense for compact-style nested module 179s accepts non-empty class with comment that ends with an annotation 179s registers an offense for non-empty class with annotation comment 179s registers an offense if the comment line contains code 179s registers an offense for non-empty cbase class 179s registers offense for non-empty class with frozen string comment 179s accepts non-empty class with annotation comment followed by other comment 179s accepts non-empty class with documentation 179s with # :nodoc: 179s accepts non-namespace module without documentation 179s registers an offense for nested class without documentation 179s accepts compact-style nested module without documentation 179s registers an offense for nested module without documentation 179s accepts non-namespace class without documentation 179s accepts compact-style nested class without documentation 179s with `all` modifier 179s accepts nested module without documentation 179s with `all` modifier 179s accepts nested class without documentation 179s on a subclass 179s accepts non-namespace subclass without documentation 179s registers an offense for nested subclass without documentation 179s with `all` modifier 179s accepts nested subclass without documentation 179s when AllowedConstants is configured 179s ignores the constants in the config 179s sparse and trailing comments 179s ignores sparse comments inside class node 179s ignores comments after class node end 179s ignores comments after module node end 179s ignores sparse comments inside module node 179s without documentation 179s macro-only class 179s registers offense for macro with other methods 179s does not register offense with multiple macros 179s does not register offense with single macro 179s with non-empty module 179s with constants visibility declaration content 179s does not register an offense 179s with non-empty class 179s with constants visibility declaration content 179s does not register an offense 179s 179s RuboCop::Cop::Style::MixinGrouping 179s when configured with grouped style 179s when using a mix of diffent methods 179s registers an offense with some duplicated mixin methods 179s allows all different mixin methods 179s when using `prepend` 179s registers an offense when other mixins have receivers 179s registers an offense for single mixins in separate calls, interspersed 179s registers an offense for single mixins in separate calls 179s when using `extend` 179s registers an offense for single mixins in separate calls 179s when using include 179s registers an offense for single mixins in separate calls 179s registers an offense for several mixins in separate calls 179s allows include with an explicit receiver 179s when configured with separated style 179s when using `extend` 179s registers an offense for several mixins in one call 179s when using `prepend` 179s registers an offense for several mixins in one call 179s when using `include` 179s allows include call as an argument to another method 179s registers an offense for several mixins in one call 179s registers an offense for several mixins in separate calls 179s when using a mix of diffent methods 179s registers an offense for some calls having several mixins 179s 179s RuboCop::Cop::Lint::Void 179s registers an offense for void `self` if not on last line 179s accepts backtick commands 179s accepts void op == if on last line 179s registers an offense for void lit {} if not on last line 179s registers an offense for void op < if not on last line 179s registers an offense for void op === if not on last line 179s accepts void unary op - if on last line 179s registers an offense for void lit /test/ if not on last line 179s accepts void op <=> if on last line 179s accepts void op * if on last line 179s accepts void op === by itself without a begin block 179s accepts void op <=> by itself without a begin block 179s registers an offense for void lit :test if not on last line 179s registers an offense for void lit [1] if not on last line 179s handles `#each` block with single expression 179s registers an offense for void var @var if not on last line 179s registers an offense for void op <=> if not on last line 179s accepts void op >= by itself without a begin block 179s registers an offense for void var VAR if not on last line 179s registers an offense for void sign op + if not on last line 179s registers an offense for void sign op - if not on last line 179s registers an offense for void op / if not on last line 179s registers an offense for void var $var if not on last line 179s handles explicit begin blocks 179s registers an offense for void op - if not on last line 179s registers an offense for void op >= if not on last line 179s registers an offense for void lit 2.0 if not on last line 179s accepts method with erange block 179s registers two offenses for void literals in an initialize method 179s registers an offense for void op != if not on last line 179s accepts void unary op + by itself without a begin block 179s accepts void op - by itself without a begin block 179s accepts void unary op + if on last line 179s registers two offenses for void literals in a setter method 179s registers an offense for void op <= if not on last line 179s accepts void op != if on last line 179s accepts void op > by itself without a begin block 179s accepts void op % by itself without a begin block 179s registers an offense for void literal in a method definition 179s accepts void op - if on last line 179s registers two offenses for void literals in a `for` 179s accepts void op + if on last line 179s accepts void unary op ~ if on last line 179s accepts void op === if on last line 179s registers an offense for void lit 1 if not on last line 179s registers an offense for void op % if not on last line 179s accepts void op + by itself without a begin block 179s registers an offense for void `defined?` if not on last line 179s accepts method with irange block 179s registers an offense for void op == if not on last line 179s accepts void op * by itself without a begin block 179s accepts void op != by itself without a begin block 179s accepts void op < if on last line 179s accepts void unary op ! if on last line 179s registers two offenses for void literals in `#tap` method 179s accepts void unary op ! by itself without a begin block 179s registers an offense for void op + if not on last line 179s accepts percent-x commands 179s accepts void unary op ~ by itself without a begin block 179s accepts void op >= if on last line 179s accepts void op / if on last line 179s registers two offenses for void literals in a `#each` method 179s registers an offense for void unary op ~ if not on last line 179s accepts void unary op - by itself without a begin block 179s accepts empty block 179s accepts short call syntax 179s accepts void op == by itself without a begin block 179s registers an offense for void op > if not on last line 179s registers an offense for void unary op ! if not on last line 179s registers an offense for void var @@var if not on last line 179s accepts void op / by itself without a begin block 179s registers an offense for void var var if not on last line 179s accepts void op <= if on last line 179s accepts void op < by itself without a begin block 179s accepts void op % if on last line 179s registers an offense for void op * if not on last line 179s accepts void op > if on last line 179s accepts void op <= by itself without a begin block 179s when not checking for methods with no side effects 179s does not register an offense for void nonmutating methods 179s when checking for methods with no side effects 179s registers an offense if not on last line 179s registers an offense for chained methods 179s Ruby 2.7 179s registers two offenses for void literals in `#tap` method 179s 179s RuboCop::Cop::Lint::Debugger 179s does not register an offense for a irb method 179s does not register an offense for a byebug in comments 179s does not register an offense for a pry in comments 179s does not register an offense for a debugger method 179s does not register an offense for a pry method 179s does not register an offense for a save_and_open_page in comments 179s does not register an offense for a console in comments 179s does not register an offense for a pry_remote method 179s does not register an offense for a save_and_open_screenshot method 179s does not register an offense for a remote_byebug method 179s does not register an offense for a byebug method 179s does not register an offense for a remote_pry method 179s does not register an offense for a binding method that is not disallowed 179s does not register an offense for a save_and_open_page method 179s does not register an offense for a debugger in comments 179s does not register an offense for a remote_pry in comments 179s does not register an offense for a remote_byebug in comments 179s does not register an offense for a save_and_open_screenshot in comments 179s does not register an offense for a console method 179s does not register an offense for a pry_remote in comments 179s does not register an offense for a irb in comments 179s capybara 179s registers an offense for save_and_open_screenshot 179s registers an offense for save_and_open_page 179s with an argument 179s registers an offense for save_and_open_screenshot 179s registers an offense for save_and_open_page 179s with the DebuggerMethods configuration 179s does not register an offense for a byebug call 179s registers an offense for a `custom_debugger` call 179s with a const chain 179s registers an offense for a `Foo::Bar::Baz.debug` call 179s with a method chain 179s registers an offense for a `debugger.foo.bar` call 179s nested custom configurations 179s registers an offense for a `custom_debugger call 179s with a const chain and a method chain 179s registers an offense for a `Foo::Bar::Baz.debug.this.code` call 179s pry 179s registers an offense for a Pry.rescue call 179s registers an offense for a pry binding call 179s registers an offense for a remote_pry binding call 179s does not register an offense for a `pry` call without binding 179s registers an offense for a pry_remote binding with an argument call 179s registers an offense for a pry binding with an argument call 179s does not register an offense for a `rescue` call without Pry 179s registers an offense for a remote_pry binding with an argument call 179s registers an offense for a binding.pry with Kernel call 179s registers an offense for a pry_remote binding call 179s web console 179s registers an offense for a `binding.console` call 179s does not register an offense for `console` without a receiver 179s when a method group is disabled with nil 179s does register an offense for another group 179s does not register an offense for a Pry debugger call 179s RubyJard 179s registers an offense for a jard call 179s when a method group is disabled with false 179s does not register an offense for a Pry debugger call 179s does register an offense for another group 179s rails 179s registers an offense for a debugger with an argument call 179s registers an offense for a debugger with ::Kernel call 179s registers an offense for a debugger call 179s registers an offense for a debugger with Kernel call 179s built-in methods 179s registers an offense for a binding.irb with Kernel call 179s registers an offense for a irb binding call 179s debug.rb 179s registers an offense for a `break` binding call 179s registers an offense for a `b` binding call 179s registers an offense for a `binding.b` with `Kernel` call 179s registers an offense for a `binding.break` with `Kernel` call 179s byebug 179s registers an offense for a byebug call 179s registers an offense for a Kernel.byebug call 179s registers an offense for a Kernel.remote_byebug call 179s registers an offense for a byebug with an argument call 179s registers an offense for a remote_byebug call 179s 179s RuboCop::Cop::Lint::RedundantCopDisableDirective 179s .check 179s when there are disabled lines 179s and there are no offenses 179s and a comment disables 179s multiple cops, and the leftmost one has no offenses 179s returns an offense 179s a cop that is disabled in the config 179s returns an offense 179s if that cop has offenses 179s returns an offense 179s when that cop was previously enabled 179s returns no offense 179s an unknown cop 179s returns an offense 179s when using a directive comment after a non-directive comment 179s returns an offense 179s multiple cops, and one of them has offenses 179s returns an offense 179s comment is not at the beginning of the file 179s and not all cops have offenses 179s returns an offense 179s multiple cops, with abbreviated names 179s one of them has offenses 179s returns an offense 179s all cops 179s returns an offense 179s itself and all cops 179s disabled on different ranges 179s returns no offense 179s itself and another cop 179s disabled on the same range 179s returns no offense 179s and the other cop is disabled a second time 179s returns no offense 179s disabled on different ranges 179s returns no offense 179s one cop 179s returns an offense 179s misspelled cops 179s returns an offense 179s multiple cops 179s returns an offense 179s and there is an offense 179s and a comment disables 179s that cop but on other lines 179s returns an offense 179s that cop 179s returns no offense 179s all cops 179s returns no offense 179s and there are two offenses 179s and a comment disables 179s one cop twice 179s returns an offense 179s one cop and then all cops 179s returns an offense 179s when there are no disabled lines 179s returns no offense 179s autocorrecting whitespace 179s when the comment is the first line of the file 179s followed by another comment 179s removes the comment and newline 179s followed by a newline 179s removes the comment and newline 179s followed by code 179s removes the comment 179s when the comment is not the first line of the file 179s preserves whitespace before the comment 179s when there is only whitespace before the comment 179s leaves the whitespace 179s when there is a blank line before inline comment 179s removes the comment and preceding whitespace 179s inline comment 179s removes the comment and preceding whitespace 179s nested inside a namespace 179s preserves indentation 179s with a disabled department 179s removes cop duplicated by department on previous line 179s removes cop duplicated by department and leaves free text as a comment 179s removes cop duplicated by department 179s does not remove correct department 179s removes redundant department 179s removes entire comment 179s 179s RuboCop::Cop::InternalAffairs::RedundantLetRuboCopConfigNew 179s registers an offense when using `let(:config)` and `:config` is not specified in `describe` 179s does not register an offense when using `let(:config)` with arguments to `RuboCop::Config.new` 179s registers an offense when using `let(:config)` with no argument `RuboCop::Config.new` and `:config` is specified 179s registers an offense when using `let(:config)` and `:config` is already specified in `describe` 179s 179s RuboCop::Cop::Lint::SafeNavigationConsistency 179s allows safe navigation when different variables are used 179s registers an offense and corrects using safe navigation on the left of && 179s registers an offense and corrects using unsafe navigation with both && and || 179s registers an offense and corrects unsafe navigation that appears before safe navigation 179s registers a single offense and corrects when safe navigation is used multiple times 179s registers an offense and corrects using unsafe navigation and the safe navigation appears in a group 179s allows || without safe navigation 179s registers an offense and corrects using safe navigation on the left of || 179s registers an offense and corrects using safe navigation on the right of && 179s registers an offense and corrects when there is code before or after the condition 179s allows calls to methods that nil responds to 179s allows && without safe navigation 179s registers an offense and corrects using safe navigation inside of separated conditions 179s registers an offense but does not correct non dot method calls 179s registers an offense and corrects assignment 179s registers and corrects multiple offenses 179s registers an offense and corrects using safe navigation in conditions on the right hand side 179s registers an offense and corrects using unsafe navigation with grouped conditions 179s registers an offense and corrects using safe navigation on the right of || 179s 179s RuboCop::Cop::Style::StringLiteralsInInterpolation 179s when configured with a bad value 179s fails 179s configured with double quotes preferred 179s registers an offense for single quotes within embedded expression 179s registers an offense for single quotes within embedded expression in a heredoc string 179s configured with single quotes preferred 179s registers an offense for double quotes within embedded expression in a heredoc string 179s accepts double quotes on a static string 179s accepts double quotes on a broken static string 179s accepts double quotes on static strings within a method 179s registers an offense for double quotes within embedded expression 179s can handle a built-in constant parsed as string 179s can handle character literals 179s 179s RuboCop::Cop::Layout::RescueEnsureAlignment 179s accepts aligned rescue in do-end block assigned to class variable 179s accepts aligned rescue do-end block assigned to local variable 179s accepts correctly aligned rescue/ensure with def with no body 179s accepts correctly aligned ensure 179s accepts aligned rescue with do-end block that line break with leading dot for method calls 179s accepts aligned rescue in do-end block assigned to global variable 179s accepts rescue and ensure on the same line 179s accepts aligned rescue in do-end block in a method 179s accepts aligned rescue in do-end block with `.()` call 179s accepts aligned rescue in do-end block on multi-assignment 179s accepts aligned rescue in do-end block on operation assignment 179s accepts aligned rescue with do-end block that line break with trailing dot for method calls 179s accepts the modifier form 179s accepts correctly aligned rescue/ensure with def 179s accepts end being misaligned 179s accepts correctly aligned rescue in assigned begin-end block 179s accepts aligned rescue in do-end block 179s accepts aligned rescue in do-end block on and-assignment 179s accepts aligned rescue in do-end block on or-assignment 179s accepts correctly aligned rescue 179s accepts aligned rescue in do-end block assigned to instance variable 179s accepts aligned rescue in assigned do-end block starting on newline 179s accepts aligned rescue in do-end block assigned to class 179s when using zsuper with block 179s does not register an offense when correct alignment 179s registers and corrects an offense and corrects when incorrect alignment 179s rescue in do-end block assigned to class variable 179s registers an offense 179s ensure with class 179s registers an offense 179s rescue in do-end block assigned to local variable 179s registers an offense 179s rescue in do-end block assigned to class 179s registers an offense 179s rescue with module 179s registers an offense when rescue used with module 179s rescue with class 179s registers an offense when rescue used with class 179s rescue in do-end block assigned to instance variable 179s registers an offense 179s ensure with def 179s registers an offense 179s rescue with do-end block 180s registers an offense 180s rescue with begin 180s registers an offense 180s as RHS of assignment 180s when `EnforcedStyleAlignWith: begin` of `Layout/BeginEndAlignment` cop 180s accepts multi-line, aligned 180s accepts multi-line, indented 180s registers an offense and corrects for incorrect alignment 180s when `EnforcedStyleAlignWith: start_of_line` of `Layout/BeginEndAlignment` cop 180s accepts multi-line, aligned 180s registers an offense and corrects for incorrect alignment 180s accepts multi-line, indented 180s `Layout/BeginEndAlignment` cop is not enabled 180s accepts multi-line, indented 180s registers an offense and corrects for incorrect alignment 180s accepts multi-line, aligned 180s rescue in do-end block on multi-assignment 180s registers an offense 180s rescue in assigned do-end block starting on newline 180s registers an offense 180s rescue in do-end block on operation assignment 180s registers an offense 180s rescue with defs 180s registers an offense 180s ensure with module 180s registers an offense when ensure used with module 180s rescue in do-end block on or-assignment 180s registers an offense 180s ensure with defs 180s registers an offense 180s allows inline access modifier 180s with private modifier 180s rescue with def 180s registers an offense 180s correct alignment 180s rescue with defs 180s correct alignment 180s registers an offense 180s ensure with def 180s registers an offense 180s correct alignment 180s ensure with defs 180s registers an offense 180s correct alignment 180s with public_class_method modifier 180s ensure with def 180s correct alignment 180s registers an offense 180s ensure with defs 180s registers an offense 180s correct alignment 180s rescue with def 180s correct alignment 180s registers an offense 180s rescue with defs 180s registers an offense 180s correct alignment 180s with private_class_method modifier 180s rescue with defs 180s correct alignment 180s registers an offense 180s rescue with def 180s registers an offense 180s correct alignment 180s ensure with defs 180s registers an offense 180s correct alignment 180s ensure with def 180s registers an offense 180s correct alignment 180s rescue with def 180s registers an offense 180s allows inline expression before 180s rescue 180s registers an offense 180s ensure 180s registers an offense 180s excluded file 180s processes excluded files with issue 180s rescue in do-end block assigned to global variable 180s registers an offense 180s rescue in do-end block on and-assignment 180s registers an offense 180s ensure with begin 180s registers an offense when ensure used with begin 180s 180s RuboCop::Cop::Lint::UnmodifiedReduceAccumulator 180s behaves like reduce/inject 180s does not affect inject called without a block 180s does not affect inject called with no block args 180s given a inject block 180s registers an offense with the element in heredoc 180s does not register an offense when returning a method called on the accumulator 180s does not register an offense when returning a method called with the accumulator 180s registers an offense when called with no argument 180s does not register an offense when mutating the element with the accumulator 180s allows the element to be the return value if the accumulator is returned in any branch 180s registers an offense when returning accumulator[element]= 180s does not look inside inner blocks 180s does not register an offense when and-assigning the accumulator 180s registers an offense when returning an index setter on the accumulator 180s does not register an offense when op-assigning the accumulator 180s does not register an offense when returning accumulator[element] 180s does not register an offense when mutating the element with the another value 180s does not register an offense when returning the accumulator in an expression 180s does not register an offense when or-assigning the accumulator 180s registers an offense when returning an expression with the element 180s registers an offense when returning the element 180s does not register an offense when shovelling the accumulator 180s registers an offense for values returned with `next` 180s registers an offense when returning an index of the accumulator 180s registers an offense for values returned with `break` 180s allows break with no value 180s does not register an offense when calling a method on the accumulator with the element 180s does not register an offense when assigning the accumulator 180s registers an offense for every violating return value 180s does not register an offense if the return value cannot be determined 180s does not register an offense when returning the accumulator 180s registers an offense with the element in interpolation 180s does not register an offense when returning a literal 180s does not register an offense with the accumulator in interpolation 180s does not register an offense when returning the accumulator in a boolean statement 180s does not register an offense with the accumulator in heredoc 180s registers an offense when mutating the accumulator with the element but not returning it 180s does not register an offense when comparing 180s argument count 180s ignores when there are not enough block arguments 180s ignores when there is a splat argument 180s registers an offense when there are more than two arguments but the element is returned 180s numblocks 180s registers an offense when returning the element 180s does not register an offense when when returning the accumulator 180s behaves like reduce/inject 180s does not affect reduce called with no block args 180s does not affect reduce called without a block 180s given a reduce block 180s registers an offense when called with no argument 180s does not register an offense when comparing 180s does not register an offense when and-assigning the accumulator 180s registers an offense when returning the element 180s does not register an offense when mutating the element with the accumulator 180s registers an offense for values returned with `next` 180s registers an offense for every violating return value 180s does not register an offense when mutating the element with the another value 180s does not register an offense when shovelling the accumulator 180s does not register an offense when returning a method called with the accumulator 180s does not look inside inner blocks 180s does not register an offense if the return value cannot be determined 180s allows break with no value 180s does not register an offense when returning accumulator[element] 180s registers an offense when returning an index of the accumulator 180s registers an offense when returning accumulator[element]= 180s registers an offense when returning an index setter on the accumulator 180s registers an offense when returning an expression with the element 180s does not register an offense when assigning the accumulator 180s does not register an offense when returning a literal 180s does not register an offense when or-assigning the accumulator 180s does not register an offense when returning a method called on the accumulator 180s does not register an offense with the accumulator in interpolation 180s does not register an offense when op-assigning the accumulator 180s does not register an offense when returning the accumulator 180s registers an offense for values returned with `break` 180s does not register an offense with the accumulator in heredoc 180s does not register an offense when returning the accumulator in a boolean statement 180s does not register an offense when calling a method on the accumulator with the element 180s does not register an offense when returning the accumulator in an expression 180s allows the element to be the return value if the accumulator is returned in any branch 180s registers an offense with the element in interpolation 180s registers an offense when mutating the accumulator with the element but not returning it 180s registers an offense with the element in heredoc 180s numblocks 180s registers an offense when returning the element 180s does not register an offense when when returning the accumulator 180s argument count 180s ignores when there are not enough block arguments 180s registers an offense when there are more than two arguments but the element is returned 180s ignores when there is a splat argument 180s 180s RuboCop::Cop::Style::EvenOdd 180s converts (x % 2) == 1 to #odd? 180s converts (x % 2) == 0 to #even? 180s converts complex examples 180s converts x % 2 != 1 to #even? 180s converts 1 % 2 != 1 to even? 180s accepts x % 2 == 2 180s converts (x.y % 2) != 1 to #even? 180s converts x % 2 != 0 to #odd? 180s converts x % 2 == 0 to #even? 180s converts x % 2 == 1 to #odd? 180s accepts x % 3 != 0 180s converts (x._(y)) % 2 != 1 to even? 180s converts (x(y) % 2) != 1 to #even? 180s converts x._(y) % 2 != 1 to even? 180s converts (x._(y) % 2) != 1 to even? 180s accepts x % 3 == 0 180s converts (y % 2) != 1 to #even? 180s converts (x % 2) != 0 to #odd? 180s 180s RuboCop::Cop::Style::RedundantRegexpCharacterClass 180s with a character class containing an interpolation 180s does not register an offense 180s with a character class containing a single character 180s registers an offense and corrects 180s with %r{} regexp 180s with a character class containing a single character inside a group 180s registers an offense and corrects 180s with a character class containing a single character 180s registers an offense and corrects 180s with a character class containing a single character before `{n,m}` quantifier 180s registers an offense and corrects 180s with multiple character classes containing single characters 180s registers an offense and corrects 180s with a character class containing a single character before `+` quantifier 180s registers an offense and corrects 180s with a character class containing a negated-space meta-character 180s registers an offense and corrects 180s with a multi-line interpolation 180s ignores offenses in the interpolated expression 180s with a character class containing a posix bracket expression 180s does not register an offense 180s with a character class containing an unescaped-# 180s registers an offense and corrects 180s with multiple character classes containing single characters 180s registers an offense and corrects 180s with escaped square brackets surrounding a single character 180s does not register an offense 180s with a regexp containing invalid g escape 180s registers an offense and corrects 180s with a character class containing a single character inside a group 180s registers an offense and corrects 180s with a character class with first element an escaped ] 180s does not register an offense 180s with a character class containing set intersection 180s does not register an offense 180s with a character class containing a single unicode character property 180s registers an offense and corrects 180s with a character class containing a single negated unicode character property 180s registers an offense and corrects 180s with a character class containing a single range 180s does not register an offense 180s with a character class containing two characters 180s does not register an offense 180s with an array index inside an interpolation 180s does not register an offense 180s with a negated character class with a single element 180s does not register an offense 180s with a character class containing a single character before `+` quantifier 180s registers an offense and corrects 180s with consecutive escaped square brackets 180s does not register an offense 180s with a character class containing a single character before `{n,m}` quantifier 180s registers an offense and corrects 180s with a character class containing a single unicode code-point 180s registers an offense and corrects 180s with a character class containing multiple unicode code-points 180s does not register an offense and corrects 180s with a character class containing an escaped ] 180s registers an offense and corrects 180s with an interpolated unnecessary-character-class regexp 180s registers an offense and corrects 180s with a character class containing escaped character requiring escape outside 180s registers an offense and corrects 180s with a character class containing an escaped-0 180s does not register an offense 180s with a character class containing a space meta-character 180s registers an offense and corrects 180s with a character class containing a negated posix bracket expression 180s does not register an offense 180s with a character class containing an escaped-# 180s registers an offense and corrects 180s with a redundant character class after an interpolation 180s registers an offense and corrects 180s with a character class containing a character requiring escape outside 180s does not register an offense 180s with a character class containing an escaped-b 180s does not register an offense 180s with consecutive escaped square brackets inside a character class 180s does not register an offense 180s with a character class containing an escaped [ 180s registers an offense and corrects 180s with a character class containing a space 180s when using free-spaced mode 180s with a single space character class 180s does not register an offense with only /x 180s does not register an offense with /iux 180s does not register an offense with /ix 180s with a commented single-element character class 180s does not register an offense 180s with an unnecessary-character-class after a comment 180s registers an offense and corrects 180s when not using free-spaced mode 180s registers an offense and corrects 180s 180s RuboCop::Cop::Style::RedundantFreeze 180s allows .freeze on method call 180s behaves like mutable objects 180s allows { a: 1, b: 2 } with freeze 180s behaves like mutable objects 180s allows "top#{1 + 2}" with freeze 180s behaves like immutable objects 180s registers an offense for frozen :sym 180s behaves like immutable objects 180s registers an offense for frozen (a > b) 180s behaves like immutable objects 180s registers an offense for frozen 1.5 180s behaves like mutable objects 180s allows ([42] * 42) with freeze 180s behaves like immutable objects 180s registers an offense for frozen 1 180s behaves like immutable objects 180s registers an offense for frozen ('a' > 'b') 180s when the receiver is a string literal 180s Regexp and Range literals 180s Ruby 2.7 or lower 180s behaves like mutable objects 180s allows (1...5) with freeze 180s behaves like mutable objects 180s allows /./ with freeze 180s behaves like mutable objects 180s allows (1..5) with freeze 180s Ruby 3.0 or higher 180s behaves like immutable objects 180s registers an offense for frozen (1..5) 180s behaves like immutable objects 180s registers an offense for frozen /./ 180s behaves like immutable objects 180s registers an offense for frozen (1...5) 180s Ruby 3.0 or higher 180s when the frozen string literal comment is missing 180s behaves like mutable objects 180s allows "#{a}" with freeze 180s when the frozen string literal comment is false 180s behaves like mutable objects 180s allows "#{a}" with freeze 180s when the frozen string literal comment is true 180s behaves like mutable objects 180s allows "#{a}" with freeze 180s Ruby 2.7 or lower 180s when the frozen string literal comment is true 180s behaves like immutable objects 180s registers an offense for frozen "#{a}" 180s when the frozen string literal comment is missing 180s behaves like mutable objects 180s allows "#{a}" with freeze 180s when the frozen string literal comment is false 180s behaves like mutable objects 180s allows "#{a}" with freeze 180s behaves like mutable objects 180s allows (a + b) with freeze 180s behaves like mutable objects 180s allows [1, 2, 3] with freeze 180s behaves like immutable objects 180s registers an offense for frozen :"" 180s behaves like mutable objects 180s allows 'str' with freeze 180s behaves like mutable objects 180s allows ('a' + 'b') with freeze 180s behaves like mutable objects 180s allows ENV['foo'] with freeze 180s behaves like immutable objects 180s registers an offense for frozen (1 + 2) 180s behaves like immutable objects 180s registers an offense for frozen (2 > 1) 180s behaves like mutable objects 180s allows ::ENV['foo'] with freeze 180s behaves like immutable objects 180s registers an offense for frozen 'foo'.count 180s behaves like mutable objects 180s allows ('a' * 20) with freeze 180s behaves like immutable objects 180s registers an offense for frozen [1, 2, 3].size 180s 180s RuboCop::Cop::Layout::SpaceAroundEqualsInParameterDefault 180s when EnforcedStyle is space 180s registers an offense and corrects default value assignment without space 180s registers an offense and corrects assignment of empty list without space 180s accepts default value assignment with space 180s registers an offense and corrects default value assignment where first is partially right without space 180s accepts default value assignment with spaces and unary + operator 180s registers an offense and corrects missing space for arguments with unary operators 180s registers an offense and corrects assigning empty string without space 180s when EnforcedStyle is no_space 180s accepts default value assignment without space 180s registers an offense and corrects assignment of empty string with space 180s registers an offense and corrects default value assignment with space 180s registers an offense and corrects assignment of empty list with space 180s 180s RuboCop::Cop::Lint::DisjunctiveAssignmentInConstructor 180s constructor does not have disjunctive assignment 180s accepts 180s constructor has disjunctive assignment 180s LHS is ivar 180s registers an offense and corrects 180s constructor calls any method before disjunctive assignment 180s accepts 180s constructor calls super before disjunctive assignment 180s accepts 180s constructor calls super after assignment 180s registers an offense and corrects 180s LHS is lvar 180s accepts 180s empty constructor 180s accepts 180s 180s RuboCop::Cop::Style::SpecialGlobalVars 180s when style is use_english_names 180s when add require English is disabled 180s registers an offense for $: 180s is clear about variables from the English library vs those not 180s autocorrects #$: to #{$LOAD_PATH} 180s does not register an offense for backrefs like $1 180s autocorrects #{$!} to #{$ERROR_INFO} 180s registers an offense for $0 180s generates correct auto-config when mixed styles are used 180s generates correct auto-config when Perl variable names are used 180s registers an offense for $$ 180s registers an offense for $" 180s autocorrects $/ to $INPUT_RECORD_SEPARATOR 180s when add require English is enabled 180s when English is already required at top-level 180s moves require English above replacement 180s leaves require English alone for $$ 180s when English has not been required at top-level 180s does not add for replacement outside of English lib 180s adds require English for $$ 180s adds require English for twice `$*` in nested code 180s adds require English for $$ in nested code 180s when style is use_builtin_english_names 180s does not register an offense for backrefs like $1 180s does not register an offenses for builtin names 180s generates correct auto-config when Perl variable names are used 180s generates correct auto-config when mixed styles are used 180s does not register an offense for Perl names 180s autocorrects non-preffered builtin names 180s when style is use_perl_names 180s registers an offense for $PROCESS_ID 180s registers an offense for $LOAD_PATH 180s does not register an offense for backrefs like $1 180s registers an offense for $PID 180s registers an offense for $PROGRAM_NAME 180s autocorrects $INPUT_RECORD_SEPARATOR to $/ 180s autocorrects #{$LOAD_PATH} to #$: 180s registers an offense for $LOADED_FEATURES 180s 180s RuboCop::Cop::Lint::ErbNewArguments 180s >= Ruby 2.6 180s does not register an offense when using `ERB.new` without optional arguments 180s registers an offense when using `::ERB.new` with non-keyword 2nd, 3rd and 4th arguments 180s registers an offense when using `ERB.new` with non-keyword 2nd and 3rd arguments 180s registers an offense when using `ERB.new` with non-keyword 2nd argument 180s registers an offense when using `ERB.new` with non-keyword 2nd, 3rd and 4th arguments 180s registers an offense when using `ERB.new` with non-keyword 2nd and 3rd arguments andkeyword 4th argument 180s registers an offense when using `ERB.new` with non-keyword 2nd, 3rd and 4th arguments andkeyword 5th argument 180s does not register an offense when using `ERB.new` with keyword arguments 180s when using `ActionView::Template::Handlers::ERB.new` 180s does not register an offense when using `ERB.new` without arguments 180s <= Ruby 2.5 180s does not register an offense when using `ERB.new` with non-keyword arguments 180s 180s RuboCop::Cop::Layout::BlockAlignment 180s registers an offense for mismatched block end with an and-asgn (&&=) 180s accepts end aligned with an instance variable 180s accepts end aligned with a variable 180s accepts end aligned with an or-asgn (||=) 180s registers an offense for mismatched block end with an or-asgn (||=) 180s accepts end aligned with a class variable 180s registers an offense for mismatched block end with a mass assignment 180s accepts a block end that does not begin its line 180s registers an offense for mismatched end with a method call with arguments 180s accepts end aligned with a call chain left hand side 180s registers an offense for mismatched block end with a method call 180s registers an offense for mismatched end not aligned with the block that is an argument 180s does not raise an error for nested block in a method call 180s registers an offense for mismatched block end with a class variable 180s accepts end aligned with a mass assignment 180s accepts end aligned with a global variable 180s accepts end aligned with a method call with arguments 180s accepts end aligned with a method call 180s registers an offense for mismatched block end with a global variable 180s accepts end aligned with the block when the block is a method argument 180s registers an offense for mismatched block end with a constant 180s registers an offense for mismatched block end with an instance variable 180s accepts end aligned with an op-asgn (+=, -=) 180s accepts end aligned with a constant 180s accepts end aligned with an and-asgn (&&=) 180s registers an offense for mismatched block end with an op-asgn (+=, -=) 180s registers an offense for mismatched block end with a variable 180s when multiple similar-looking blocks have misaligned ends 180s registers an offense for each of them 180s when the block has arguments 180s registers an offense for mismatched block end 180s and the block is an operand 180s accepts end aligned with a variable 180s on a splatted method call 181s registers an offense and corrects misaligned end braces 181s aligns end with the splat operator 181s on a logically negated method call 181s registers an offense and corrects 181s aligns end with the ! operator 181s when configured to align with do 181s errors when start_of_line aligned 181s allows when do aligned 181s when variables of a mass assignment spans several lines 181s accepts end aligned with the variables 181s registers an offense for end aligned with the block 181s Ruby 2.7 181s accepts end aligned with a call chain left hand side 181s registers an offense for mismatched block end with a mass assignment 181s on a bit-flipped method call 181s registers an offense and corrects misaligned end brace 181s aligns end with the ~ operator 181s when there is an assignment chain 181s registers an offense for an end aligned with the 2nd variable 181s accepts end aligned with the first variable 181s on an arithmetically negated method call 181s aligns end with the - operator 181s registers an offense and corrects 181s when the block is defined on the next line 181s accepts end aligned with the block expression 181s registers an offenses for mismatched end alignment 181s when the block is a logical operand 181s accepts a correctly aligned block end 181s when the block has no arguments 181s registers an offense for mismatched block end 181s when configured to align with start_of_line 181s allows when start_of_line aligned 181s errors when do aligned 181s when the method part is a call chain that spans several lines 181s accepts two kinds of end alignment 181s registers offenses for misaligned ends 181s accepts pretty alignment style 181s accepts end indented as the start of the block 181s when the block is terminated by } 181s mentions } (not end) in the message 181s 181s RuboCop::Cop::Lint::EmptyClass 181s registers an offense when empty metaclass contains only comments 181s does not register an offense when empty has a parent 181s registers an offense for empty class 181s does not register an offense when metaclass is not empty 181s registers an offense for empty class metaclass 181s does not register an offense when class is not empty 181s registers an offense for empty object metaclass 181s when AllowComments is true 181s does not register an offense when empty class contains only comments 181s does not register an offense when empty metaclass contains only comments 181s 181s RuboCop::Cop::Style::StabbyLambdaParentheses 181s require_no_parentheses 181s registers an offense for a stabby lambda with parentheses 181s behaves like common 181s does not check a stabby lambda without arguments 181s does not check a method call named lambda 181s does not check the old lambda syntax 181s require_parentheses 181s does not register an offense for a stabby lambda with parentheses 181s registers an offense for a stabby lambda without parentheses 181s behaves like common 181s does not check a stabby lambda without arguments 181s does not check the old lambda syntax 181s does not check a method call named lambda 181s 181s RuboCop::Cop::Layout::SpaceInsideHashLiteralBraces 181s registers an offense for hashes with no spaces if so configured 181s accepts hash literals with no braces 181s registers an offense for correct + opposite 181s accepts hashes with spaces by default 181s can handle interpolation in a braceless hash literal 181s with space inside empty braces not allowed 181s registers an offense for empty braces with space inside 181s accepts empty braces with no space inside 181s on { key: "{" } 181s does not register an offense 181s on Hash[{ x: 1 } => [1]] 181s does not register an offense 181s offending hash following empty hash 181s registers an offense on both sides 181s with newline inside empty braces not allowed 181s registers an offense 181s when EnforcedStyle is compact 181s registers offenses for hashes with no spaces 181s doesn't register an offense for non-nested hashes with spaces 181s registers an offense for nested hashes with spaces 181s registers an offense for opposite + correct 181s accepts multiline hash with comment 181s accepts multiline hash 181s with space inside empty braces allowed 181s registers an offense for empty braces with no space inside 181s accepts empty braces with space inside 181s when using method argument that both key and value are hash literals 181s registers hashes with no spaces 181s when EnforcedStyle is no_space 181s accepts hashes with no spaces 181s registers an offense for opposite + correct 181s accepts multiline hash 181s registers an offense for hashes with spaces 181s accepts multiline hash with comment 181s when using method argument that both key and value are hash literals 181s accepts hashes with no spaces 181s 181s RuboCop::Cop::Style::RedundantSelf 181s accepts a self receiver used to distinguish from argument of block 181s accepts a self receiver of methods also defined on `Kernel` 181s does not report an offense when self receiver in a method argument and multiple assigned lvalue have the same name 181s accepts a self receiver on an lvalue of an assignment 181s accepts a self receiver used to distinguish from constant 181s accepts a self receiver on an lvalue of an and-assignment 181s does not report an offense when lvasgn name is used in `if` 181s does not report an offense when masgn name is used in `if` 181s reports an offense when a different lvasgn name is used in `if` 181s does not report an offense when lvasgn name is nested below `if` 181s reports an offense when a different masgn name is used in `if` 181s does not report an offense when masgn name is used in `while` 181s accepts a self receiver on an lvalue of an or-assignment 181s accepts a self receiver with the double less-than operator 181s accepts a self receiver for methods named like ruby keywords 181s accepts a self receiver on an lvalue of a parallel assignment 181s does not report an offense when lvasgn name is used in `unless` 181s accepts when nested receiver and lvalue have the name name 181s accepts a self receiver of .() 181s does not report an offense when receiver and multiple assigned lvalue have the same name 181s accepts a self receiver with the square bracket operator 181s does not report an offense when lvasgn name is used in `while` 181s does not report an offense when masgn name is used in `until` 181s does not report an offense when lvasgn name is used in `until` 181s does not report an offense when self receiver in a method argument and lvalue have the same name 181s does not report an offense when receiver and lvalue have the same name 181s accepts a self receiver on an lvalue of a plus-assignment 181s reports an offense a self receiver on an rvalue 181s does not report an offense when masgn name is used in `unless` 181s accepts a self receiver on an lvalue of mlhs arguments 181s reports an offense a self receiver of .call 181s instance methods 181s accepts a self receiver used to distinguish from blockarg 181s accepts a self receiver used to distinguish from optional argument 181s accepts a self receiver used to distinguish from local variable 181s accepts a self receiver used to distinguish from argument 181s accepts a self receiver used to distinguish from an argument 181s accepts a self receiver used to distinguish from an argument when an inner method is defined 181s with ruby >= 2.7 181s with pattern matching 181s registers an offense when using self with a different match var 181s accepts a self receiver in a nested pattern` 181s accepts a self receiver with a `match-alt` 181s registers an offense when using a self receiver with a pin 181s accepts a self receiver in a `if-guard` 181s accepts a self receiver on a `hash-pattern` 181s accepts a self receiver on an `match-var` 181s accepts a self receiver in a conditional pattern 181s accepts a self receiver on a `array-pattern` 181s class methods 181s accepts a self receiver used to distinguish from argument 181s accepts a self receiver used to distinguish from blockarg 181s accepts a self receiver used to distinguish from optional argument 181s accepts a self receiver used to distinguish from local variable 181s Ruby 2.7 181s registers offense for self usage in numblocks 181s 181s RuboCop::Cop::Layout::EndOfLine 181s when EnforcedStyle is crlf 181s does not register offenses after __END__ 181s does not register offense for no CR at end of file 181s registers an offense for CR+LF 181s accepts an empty file 181s and there are many lines ending with LF 181s registers only one offense 181s can inspect non-UTF-8 encoded source with proper encoding comment 181s and the default external encoding is US_ASCII 181s does not crash on UTF-8 encoded non-ascii characters 181s can inspect non-UTF-8 encoded source with proper encoding comment 181s when EnforcedStyle is native 181s registers an offense for an incorrect EOL 181s when EnforcedStyle is lf 181s accepts an empty file 181s registers an offense for CR at end of file 181s does not register offenses after __END__ 181s registers an offense for CR+LF 181s and there are many lines ending with CR+LF 181s can inspect non-UTF-8 encoded source with proper encoding comment 181s registers only one offense 181s and the default external encoding is US_ASCII 181s can inspect non-UTF-8 encoded source with proper encoding comment 181s does not crash on UTF-8 encoded non-ascii characters 181s 181s RuboCop::Cop::Layout::InitialIndentation 181s accepts empty file 181s registers an offense for indented method definition 181s accepts unindented comment + assignment 181s accepts unindented method definition 181s registers an offense and corrects indented assignment disregarding comment 181s for a file with byte order mark 181s accepts unindented method call 181s registers an offense and corrects indented method call after comment 181s registers an offense and corrects indented method call 181s 181s RuboCop::Cop::InternalAffairs::ExampleDescription 181s with `expect_correction` 181s registers an offense when given an improper description 181s in conjunction with expect_offense 181s registers an offense when given an improper description 181s when the description is invalid for both methods 181s registers an offense for the first method encountered 181s with `expect_no_corrections` 181s registers an offense when given an improper description 181s in conjunction with expect_offense 181s registers an offense when given an improper description 181s with `expect_no_offenses` 181s does not register an offense when given an unexpected description 181s does not register an offense when given a proper description 181s registers an offense when given an improper description 181s does not crash when given a proper description that is split with + 181s with `expect_offense` 181s registers an offense when given an improper description 181s does not register an offense when given a proper description 181s does not register an offense when given an unexpected description 181s when not making an expectation on offenses 181s does not register an offense 181s 181s RuboCop::Cop::Lint::EmptyWhen 181s when `AllowComments: false` 181s registers an offense for empty when body with a comment 181s when a `when` body is present 181s accepts case with when ... then statements 181s accepts case with when ... then statements and else clause 181s accepts with no case line expression 181s accepts case with when bodies 181s accepts case with when bodies and else clause 181s when a `when` body is missing 181s registers an offense when case line has no expression 181s registers an offense for missing when body with a comment followed by else 181s registers an offense for missing when body with a comment 181s registers an offense for missing when ... then body followed by else 181s registers an offense for missing when ... then body 181s registers an offense for a missing when body 181s registers an offense for missing when body followed by else 181s when `AllowComments: true` 181s accepts an empty when ... then body with a comment 181s accepts an empty when body with a comment 181s registers an offense for missing when body without a comment 181s 181s RuboCop::Cop::InternalAffairs::NodeTypePredicate 181s does not register an offense for a predicate node type check 181s comparison node type check 181s registers an offense and autocorrects 181s 181s RuboCop::Cop::Naming::MethodParameterName 181s does not register for method without parameters 181s registers offense when parameter contains uppercase characters 181s registers offense when parameter ends in number 181s does not register offense for valid parameter names 181s can register multiple offenses in one method definition 181s registers offense when parameter is less than minimum length 181s does not register offense for valid keyword parameters 181s registers offense when parameter with prefix is less than minimum length 181s does not register offense for valid default parameters 181s registers offense for offensive default parameter 181s does not register offense for valid parameter names on self.method 181s registers offense for offensive keyword parameters 181s does not register offense for empty restarg 181s registers offense when parameter ends in number on class method 181s does not register offense for empty kwrestarg 181s with ForbiddenNames 181s registers offense for parameter listed as forbidden 181s accepts parameter that uses a forbidden name's letters 181s with AllowedNames 181s accepts underscore param names 181s accepts specified block param names 181s accepts param names prefixed with underscore 181s registers unlisted offensive names 181s with AllowNamesEndingInNumbers 181s accept parameters that end in numbers 181s when using argument forwarding 181s does not register an offense 181s 181s RuboCop::Cop::Style::HashTransformValues 181s when using Ruby 2.6 or newer 181s does not flag `_.to_h{...}` when its receiver is `zip` 181s register and corrects an offense _.to_h{...} when value is a hash literal and is not enclosed in braces 181s register and corrects an offense _.to_h{...} when value is a hash literal and is enclosed in braces 181s does not flag `_.to_h{...}` when its receiver is `with_index` 181s does not flag `_.to_h{...}` when both key & value are transformed 181s does not flag _.to_h {...} when value block argument is unused 181s does not flag `_.to_h{...}` when its receiver is an array literal 181s flags _.to_h{...} when transform_values could be used 181s does not flag `_.to_h{...}` when its receiver is `each_with_index` 181s below Ruby 2.6 181s does not flag _.to_h{...} 181s when using Ruby 2.4 or newer 181s does not flag value transformation in the absence of to_h 181s does not flag each_with_object when receiver is array literal 181s does not flag `Hash[_.map{...}]` when its receiver is `with_index` 181s does not flag `_.map{...}.to_h` when its receiver is `each_with_index` 181s does not flag `each_with_object` when its argument is used in the value 181s does not flag each_with_object when its argument is not modified 181s does not flag `Hash[_.map{...}]` when its receiver is an array literal 181s flags Hash[_.map{...}] when transform_values could be used 181s does not flag each_with_object when no transformation occurs 181s does not flag Hash[_.map{...}] when both key & value are transformed 181s does not flag `each_with_object` when its receiver is `zip` 181s correctly autocorrects _.map{...}.to_h with block 181s does not flag each_with_object when both key & value are transformed 181s flags _.map {...}.to_h when transform_values could be used 181s does not flag `each_with_object` when its receiver is `each_with_index` 181s does not flag `_.map{...}.to_h` when its receiver is `zip` 181s does not flag each_with_object when value transformation uses key 181s does not flag `Hash[_.map{...}]` when its receiver is `zip` 181s does not flag `each_with_object` when its receiver is `with_index` 181s flags _.map {...}.to_h when transform_values could be used when line break before `to_h` 181s does not flag `_.map{...}.to_h` when its receiver is `with_index` 181s does not flag value transformation when receiver is array literal 181s does not flag _.map{...}.to_h when both key & value are transformed 181s flags _.map {...}.to_h when transform_values could be used when wrapped in another block 181s does not flag _.map {...}.to_h when value block argument is unused 181s does not flag `Hash[_.map{...}]` when its receiver is `each_with_index` 181s with multiline block 181s flags each_with_object when transform_values could be used 181s with safe navigation operator 181s flags each_with_object when transform_values could be used 181s with inline block 181s flags each_with_object when transform_values could be used 181s below Ruby 2.4 181s does not flag even if transform_values could be used 181s 181s RuboCop::CommentConfig 181s comment_only_line? 181s when line contains only comment 181s returns true 181s returns true 181s when line contains code and comment 181s returns false 181s when line is empty 181s returns true 181s when line contains only code 181s returns false 181s returns false 181s returns false 181s returns false 181s #extra_enabled_comments 181s has keys as instances of Parser::Source::Comment for extra enabled comments 181s has values as arrays of extra enabled cops 181s #cop_disabled_line_ranges 181s collects line ranges by disabled cops 181s #cop_enabled_at_line? 182s supports disabling all cops except Lint/RedundantCopDisableDirective with keyword all 182s supports disabling all lines after a directive 182s supports enabling/disabling multiple cops along with a comment 182s does not confuse a cop name including "all" with all cops 182s supports enabling/disabling multiple cops in a single directive 182s can handle double disable of one cop 182s supports disabling multiple lines with a pair of directive 182s does not confuse a comment directive embedded in a string literal with a real comment 182s just ignores unpaired enabling directives 182s supports disabling cops with multiple levels in department name 182s handles indented single line 183s supports enabling/disabling cops without a prefix 183s supports disabling cops with numbers in their name 183s supports disabling cops on a comment line with an EOL comment 183s supports disabling single line with a directive at end of line 183s supports disabling cops with multiple uppercase letters 183s 183s RuboCop::Formatter::FileListFormatter 183s #file_finished 183s displays parsable text 183s 183s RuboCop::Cop::Style::NilComparison 183s configured with predicate preferred 183s registers and corrects an offense when using `x == nil` as a guard condition 183s registers an offense for === nil 183s registers an offense for == nil 183s configured with comparison preferred 183s registers an offense for nil? 183s registers and corrects an offense for `!x.nil?` 183s 183s RuboCop::Cop::Style::MutableConstant 183s Strict: true 183s allows calls to freeze 183s freezes a heredoc 183s behaves like mutable objects 183s when assigning with ||= 183s registers an offense for Something.new assigned to a constant and corrects by adding .freeze 183s when assigning with = 183s registers an offense for Something.new assigned to a constant and corrects by adding .freeze 183s operators that produce unfrozen objects 183s registers an offense when operating on multiple strings 183s registers an offense when operating on a constant and a string 183s behaves like immutable objects 183s allows ::Namespace::OTHER_CONST to be assigned to a constant 183s allows ::Namespace::OTHER_CONST to be ||= to a constant 183s behaves like immutable objects 183s allows Namespace::OTHER_CONST to be assigned to a constant 183s allows Namespace::OTHER_CONST to be ||= to a constant 183s behaves like mutable objects 183s when assigning with ||= 183s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 183s when assigning with = 183s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 183s behaves like mutable objects 183s when assigning with = 183s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 183s when assigning with ||= 183s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 183s behaves like immutable objects 183s allows 1 to be ||= to a constant 183s allows 1 to be assigned to a constant 183s behaves like mutable objects 183s when assigning with = 183s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 183s when assigning with ||= 183s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 183s behaves like immutable objects 183s allows Struct.new(:a, :b) to be assigned to a constant 183s allows Struct.new(:a, :b) to be ||= to a constant 183s methods and operators that produce frozen objects 183s accepts operating on a constant and an interger 183s accepts operating on multiple floats 183s accepts operating on a constant and a float 183s accepts assigning to an environment variable with a fallback 183s accepts checking fixed size 183s accepts operating on multiple integers 183s accepts comparison operators 183s when assigning with multiple operator calls 183s registers an offense and corrects with parens and freeze 183s behaves like immutable objects 183s allows ::OTHER_CONST to be ||= to a constant 183s allows ::OTHER_CONST to be assigned to a constant 183s behaves like immutable objects 183s allows ENV['foo'] to be ||= to a constant 183s allows ENV['foo'] to be assigned to a constant 183s behaves like immutable objects 183s allows 1.5 to be assigned to a constant 183s allows 1.5 to be ||= to a constant 183s behaves like immutable objects 183s allows Struct.new(:node) do 183s def assignment? 183s true 183s end 183s end 183s to be ||= to a constant 183s allows Struct.new(:node) do 183s def assignment? 183s true 183s end 183s end 183s to be assigned to a constant 183s when assigning an array without brackets 183s adds brackets when autocorrecting 183s does not insert brackets for %w() arrays 183s behaves like immutable objects 183s allows :sym to be assigned to a constant 183s allows :sym to be ||= to a constant 183s splat expansion 183s expansion of a range 183s registers an offense and corrects to use to_a.freeze 183s with parentheses 183s registers an offense and corrects to use to_a.freeze 183s behaves like immutable objects 183s allows ::ENV['foo'] to be ||= to a constant 183s allows ::ENV['foo'] to be assigned to a constant 183s behaves like mutable objects 183s when assigning with ||= 183s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 183s when assigning with = 183s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 183s behaves like immutable objects 183s allows OTHER_CONST to be ||= to a constant 183s allows OTHER_CONST to be assigned to a constant 183s when assigning with an operator 183s behaves like operator methods 183s registers an offense and corrects with parens and freeze 183s behaves like operator methods 183s registers an offense and corrects with parens and freeze 183s behaves like operator methods 183s registers an offense and corrects with parens and freeze 183s behaves like operator methods 183s registers an offense and corrects with parens and freeze 183s behaves like operator methods 183s registers an offense and corrects with parens and freeze 183s behaves like operator methods 183s registers an offense and corrects with parens and freeze 183s behaves like mutable objects 183s when assigning with = 183s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 183s when assigning with ||= 183s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 183s behaves like string literal 183s Ruby 2.7 or lower 183s when the frozen string literal comment is false 183s behaves like mutable objects 183s when assigning with ||= 183s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 183s when assigning with = 183s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 183s when the frozen string literal comment is true 183s does not register an offense when using a multiline string 183s does not register an offense when using interpolated heredoc constant 183s behaves like immutable objects 183s allows "#{a}" to be ||= to a constant 183s allows "#{a}" to be assigned to a constant 183s behaves like immutable objects 183s allows <<~HERE 183s foo 183s bar 183s HERE 183s to be ||= to a constant 183s allows <<~HERE 183s foo 183s bar 183s HERE 183s to be assigned to a constant 183s when the frozen string literal comment is missing 183s behaves like mutable objects 183s when assigning with = 183s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 183s when assigning with ||= 183s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 183s Ruby 3.0 or higher 183s when the frozen string literal comment is false 183s behaves like mutable objects 183s when assigning with = 183s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 183s when assigning with ||= 183s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 183s when the frozen string literal comment is missing 183s behaves like mutable objects 183s when assigning with ||= 183s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 183s when assigning with = 183s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 183s when the frozen string literal comment is true 183s registers an offense when using a multiline string with interpolation 183s does not register an offense when using a multiline string 183s registers an offense when using interpolated heredoc constant 183s behaves like immutable objects 183s allows <<~HERE 183s foo 183s bar 183s HERE 183s to be ||= to a constant 183s allows <<~HERE 183s foo 183s bar 183s HERE 183s to be assigned to a constant 183s behaves like mutable objects 183s when assigning with = 183s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 183s when assigning with ||= 183s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 183s behaves like immutable objects 183s allows Struct.new to be assigned to a constant 183s allows Struct.new to be ||= to a constant 183s behaves like immutable objects 183s allows ::Struct.new to be assigned to a constant 183s allows ::Struct.new to be ||= to a constant 183s Strict: false 183s allows method call assignments 183s behaves like immutable objects 183s allows 1.5 to be ||= to a constant 183s allows 1.5 to be assigned to a constant 183s behaves like immutable objects 183s allows 1 to be assigned to a constant 183s allows 1 to be ||= to a constant 183s behaves like immutable objects 183s allows :sym to be assigned to a constant 183s allows :sym to be ||= to a constant 183s behaves like mutable objects 183s when assigning with ||= 183s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 183s when assigning with = 183s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 183s behaves like immutable objects 183s allows ::ENV['foo'] to be assigned to a constant 183s allows ::ENV['foo'] to be ||= to a constant 183s behaves like string literal 183s Ruby 3.0 or higher 183s when the frozen string literal comment is true 183s registers an offense when using interpolated heredoc constant 183s does not register an offense when using a multiline string 183s registers an offense when using a multiline string with interpolation 183s behaves like immutable objects 183s allows <<~HERE 183s foo 183s bar 183s HERE 183s to be ||= to a constant 183s allows <<~HERE 183s foo 183s bar 183s HERE 183s to be assigned to a constant 183s behaves like mutable objects 183s when assigning with = 183s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 183s when assigning with ||= 183s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 183s when the frozen string literal comment is false 183s behaves like mutable objects 183s when assigning with = 183s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 183s when assigning with ||= 183s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 183s when the frozen string literal comment is missing 183s behaves like mutable objects 183s when assigning with ||= 183s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 183s when assigning with = 183s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 183s Ruby 2.7 or lower 183s when the frozen string literal comment is true 183s does not register an offense when using interpolated heredoc constant 183s does not register an offense when using a multiline string 183s behaves like immutable objects 183s allows "#{a}" to be assigned to a constant 183s allows "#{a}" to be ||= to a constant 183s behaves like immutable objects 183s allows <<~HERE 183s foo 183s bar 183s HERE 183s to be assigned to a constant 183s allows <<~HERE 183s foo 183s bar 183s HERE 183s to be ||= to a constant 183s when the frozen string literal comment is false 183s behaves like mutable objects 183s when assigning with ||= 183s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 183s when assigning with = 183s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 183s when the frozen string literal comment is missing 183s behaves like mutable objects 183s when assigning with = 183s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 183s when assigning with ||= 183s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 183s behaves like mutable objects 183s when assigning with = 183s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 183s when assigning with ||= 183s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 183s Ruby 2.7 or lower 183s when assigning a range (irange) without parenthesis 183s does not insert parenthesis to range enclosed in parentheses 183s adds parentheses when autocorrecting 183s when assigning a range (erange) without parenthesis 183s does not insert parenthesis to range enclosed in parentheses 183s adds parentheses when autocorrecting 183s when assigning a regexp 183s registers an offense 183s when using shareable_constant_values 183s behaves like literals that are not frozen 183s behaves like immutable objects 183s allows 1 to be assigned to a constant 183s allows 1 to be ||= to a constant 183s behaves like mutable objects 183s when assigning with ||= 183s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 183s when assigning with = 183s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 183s behaves like immutable objects 183s allows ::ENV['foo'] to be ||= to a constant 183s allows ::ENV['foo'] to be assigned to a constant 183s behaves like mutable objects 183s when assigning with = 183s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 183s when assigning with ||= 183s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 183s behaves like immutable objects 183s allows FOO - BAR to be assigned to a constant 183s allows FOO - BAR to be ||= to a constant 183s behaves like immutable objects 183s allows ENV['foo'] to be assigned to a constant 183s allows ENV['foo'] to be ||= to a constant 183s behaves like immutable objects 183s allows 'foo' + 'bar' to be ||= to a constant 183s allows 'foo' + 'bar' to be assigned to a constant 183s behaves like mutable objects 183s when assigning with ||= 183s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 183s when assigning with = 183s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 183s behaves like mutable objects 183s when assigning with = 183s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 183s when assigning with ||= 183s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 183s behaves like immutable objects 183s allows 1.5 to be assigned to a constant 183s allows 1.5 to be ||= to a constant 183s behaves like immutable objects 183s allows :sym to be ||= to a constant 183s allows :sym to be assigned to a constant 183s behaves like mutable objects 183s when assigning with ||= 183s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 183s when assigning with = 183s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 183s behaves like immutable objects 183s allows FOO + BAR to be assigned to a constant 183s allows FOO + BAR to be ||= to a constant 183s behaves like literals that are not frozen 183s behaves like immutable objects 183s allows FOO - BAR to be assigned to a constant 183s allows FOO - BAR to be ||= to a constant 183s behaves like immutable objects 183s allows ENV['foo'] to be assigned to a constant 183s allows ENV['foo'] to be ||= to a constant 183s behaves like immutable objects 183s allows :sym to be assigned to a constant 183s allows :sym to be ||= to a constant 183s behaves like mutable objects 183s when assigning with ||= 183s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 183s when assigning with = 183s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 183s behaves like immutable objects 183s allows 'foo' + 'bar' to be assigned to a constant 183s allows 'foo' + 'bar' to be ||= to a constant 183s behaves like immutable objects 183s allows 1.5 to be assigned to a constant 183s allows 1.5 to be ||= to a constant 183s behaves like immutable objects 183s allows 1 to be assigned to a constant 183s allows 1 to be ||= to a constant 183s behaves like mutable objects 183s when assigning with = 183s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 183s when assigning with ||= 183s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 183s behaves like mutable objects 183s when assigning with = 183s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 183s when assigning with ||= 183s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 183s behaves like immutable objects 183s allows FOO + BAR to be assigned to a constant 183s allows FOO + BAR to be ||= to a constant 183s behaves like immutable objects 183s allows ::ENV['foo'] to be assigned to a constant 183s allows ::ENV['foo'] to be ||= to a constant 183s behaves like mutable objects 183s when assigning with ||= 183s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 183s when assigning with = 183s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 183s behaves like mutable objects 183s when assigning with = 183s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 183s when assigning with ||= 183s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 183s behaves like literals that are not frozen 183s behaves like immutable objects 183s allows ::ENV['foo'] to be assigned to a constant 183s allows ::ENV['foo'] to be ||= to a constant 183s behaves like mutable objects 183s when assigning with ||= 183s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 183s when assigning with = 183s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 183s behaves like immutable objects 183s allows 1 to be ||= to a constant 183s allows 1 to be assigned to a constant 183s behaves like immutable objects 183s allows 'foo' + 'bar' to be ||= to a constant 183s allows 'foo' + 'bar' to be assigned to a constant 183s behaves like mutable objects 183s when assigning with = 183s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 183s when assigning with ||= 183s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 183s behaves like immutable objects 183s allows 1.5 to be ||= to a constant 183s allows 1.5 to be assigned to a constant 183s behaves like mutable objects 183s when assigning with ||= 183s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 183s when assigning with = 183s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 183s behaves like mutable objects 183s when assigning with ||= 183s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 183s when assigning with = 183s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 183s behaves like immutable objects 183s allows FOO + BAR to be assigned to a constant 183s allows FOO + BAR to be ||= to a constant 183s behaves like immutable objects 183s allows :sym to be ||= to a constant 183s allows :sym to be assigned to a constant 183s behaves like mutable objects 183s when assigning with ||= 183s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 183s when assigning with = 183s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 183s behaves like immutable objects 183s allows FOO - BAR to be ||= to a constant 183s allows FOO - BAR to be assigned to a constant 183s behaves like immutable objects 183s allows ENV['foo'] to be ||= to a constant 183s allows ENV['foo'] to be assigned to a constant 183s behaves like literals that are not frozen 183s behaves like immutable objects 183s allows FOO + BAR to be ||= to a constant 183s allows FOO + BAR to be assigned to a constant 183s behaves like immutable objects 183s allows 'foo' + 'bar' to be ||= to a constant 183s allows 'foo' + 'bar' to be assigned to a constant 183s behaves like immutable objects 183s allows 1.5 to be ||= to a constant 183s allows 1.5 to be assigned to a constant 183s behaves like immutable objects 183s allows ::ENV['foo'] to be assigned to a constant 183s allows ::ENV['foo'] to be ||= to a constant 183s behaves like immutable objects 183s allows FOO - BAR to be assigned to a constant 183s allows FOO - BAR to be ||= to a constant 183s behaves like mutable objects 183s when assigning with = 183s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 183s when assigning with ||= 183s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 183s behaves like mutable objects 183s when assigning with ||= 183s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 183s when assigning with = 183s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 183s behaves like mutable objects 183s when assigning with = 183s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 183s when assigning with ||= 183s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 183s behaves like mutable objects 183s when assigning with ||= 183s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 183s when assigning with = 183s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 183s behaves like mutable objects 183s when assigning with ||= 183s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 183s when assigning with = 183s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 183s behaves like immutable objects 183s allows :sym to be ||= to a constant 183s allows :sym to be assigned to a constant 183s behaves like immutable objects 183s allows ENV['foo'] to be assigned to a constant 183s allows ENV['foo'] to be ||= to a constant 183s behaves like immutable objects 183s allows 1 to be assigned to a constant 183s allows 1 to be ||= to a constant 183s behaves like mutable objects 183s when assigning with ||= 183s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 183s when assigning with = 183s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 183s behaves like immutable objects 183s allows FOO - BAR to be assigned to a constant 183s allows FOO - BAR to be ||= to a constant 183s behaves like immutable objects 183s allows 'foo' + 'bar' to be assigned to a constant 183s allows 'foo' + 'bar' to be ||= to a constant 183s behaves like mutable objects 183s when assigning with ||= 183s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 183s when assigning with = 183s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 183s splat expansion 183s expansion of a range 183s registers an offense and corrects to use to_a.freeze 183s with parentheses 183s registers an offense and corrects to use to_a.freeze 183s when assigning an array without brackets 183s adds brackets when autocorrecting 183s does not insert brackets for %w() arrays 183s Ruby 3.0 or higher 183s raises offense only for shareable_constant_value as none when set in the order of: literal, none and experimental_everything 183s raises offense when shareable_constant_value is specified as an inline comment 183s when assigning a range (irange) 183s does not register an offense when with parenthesis 183s does not register an offense when without parenthesis 183s when assigning a range (erange) 183s does not register an offense when without parenthesis 183s does not register an offense when with parenthesis 183s when assigning a regexp 183s does not register an offense 183s when using shareable_constant_value 183s behaves like literals that are frozen 183s behaves like immutable objects 183s allows 'foo' + 'bar' to be assigned to a constant 183s allows 'foo' + 'bar' to be ||= to a constant 183s behaves like immutable objects 183s allows "top#{1 + 2}" to be ||= to a constant 183s allows "top#{1 + 2}" to be assigned to a constant 183s behaves like immutable objects 183s allows [1, 2, 3] to be ||= to a constant 183s allows [1, 2, 3] to be assigned to a constant 183s behaves like immutable objects 183s allows ::ENV['foo'] to be ||= to a constant 183s allows ::ENV['foo'] to be assigned to a constant 183s behaves like immutable objects 183s allows 1 to be ||= to a constant 183s allows 1 to be assigned to a constant 183s behaves like immutable objects 183s allows 'str' to be assigned to a constant 183s allows 'str' to be ||= to a constant 183s behaves like immutable objects 183s allows FOO + BAR to be assigned to a constant 183s allows FOO + BAR to be ||= to a constant 183s behaves like immutable objects 183s allows 1.5 to be ||= to a constant 183s allows 1.5 to be assigned to a constant 183s behaves like immutable objects 183s allows FOO - BAR to be assigned to a constant 183s allows FOO - BAR to be ||= to a constant 183s behaves like immutable objects 183s allows %w(a b c) to be ||= to a constant 183s allows %w(a b c) to be assigned to a constant 183s behaves like immutable objects 183s allows { a: 1, b: 2 } to be ||= to a constant 183s allows { a: 1, b: 2 } to be assigned to a constant 183s behaves like immutable objects 183s allows ENV['foo'] to be ||= to a constant 183s allows ENV['foo'] to be assigned to a constant 183s behaves like immutable objects 183s allows :sym to be ||= to a constant 183s allows :sym to be assigned to a constant 183s behaves like literals that are frozen 183s behaves like immutable objects 183s allows 1.5 to be ||= to a constant 183s allows 1.5 to be assigned to a constant 183s behaves like immutable objects 183s allows ENV['foo'] to be assigned to a constant 183s allows ENV['foo'] to be ||= to a constant 183s behaves like immutable objects 183s allows %w(a b c) to be assigned to a constant 183s allows %w(a b c) to be ||= to a constant 183s behaves like immutable objects 183s allows FOO + BAR to be assigned to a constant 183s allows FOO + BAR to be ||= to a constant 183s behaves like immutable objects 183s allows { a: 1, b: 2 } to be assigned to a constant 183s allows { a: 1, b: 2 } to be ||= to a constant 183s behaves like immutable objects 183s allows [1, 2, 3] to be assigned to a constant 183s allows [1, 2, 3] to be ||= to a constant 183s behaves like immutable objects 183s allows ::ENV['foo'] to be assigned to a constant 183s allows ::ENV['foo'] to be ||= to a constant 183s behaves like immutable objects 183s allows 'foo' + 'bar' to be ||= to a constant 183s allows 'foo' + 'bar' to be assigned to a constant 183s behaves like immutable objects 183s allows 1 to be assigned to a constant 183s allows 1 to be ||= to a constant 183s behaves like immutable objects 183s allows FOO - BAR to be assigned to a constant 183s allows FOO - BAR to be ||= to a constant 183s behaves like immutable objects 184s allows :sym to be assigned to a constant 184s allows :sym to be ||= to a constant 184s behaves like immutable objects 184s allows 'str' to be ||= to a constant 184s allows 'str' to be assigned to a constant 184s behaves like immutable objects 184s allows "top#{1 + 2}" to be assigned to a constant 184s allows "top#{1 + 2}" to be ||= to a constant 184s behaves like literals that are frozen 184s behaves like immutable objects 184s allows ::ENV['foo'] to be assigned to a constant 184s allows ::ENV['foo'] to be ||= to a constant 184s behaves like immutable objects 184s allows 1.5 to be ||= to a constant 184s allows 1.5 to be assigned to a constant 184s behaves like immutable objects 184s allows FOO + BAR to be assigned to a constant 184s allows FOO + BAR to be ||= to a constant 184s behaves like immutable objects 184s allows :sym to be ||= to a constant 184s allows :sym to be assigned to a constant 184s behaves like immutable objects 184s allows ENV['foo'] to be assigned to a constant 184s allows ENV['foo'] to be ||= to a constant 184s behaves like immutable objects 184s allows [1, 2, 3] to be ||= to a constant 184s allows [1, 2, 3] to be assigned to a constant 184s behaves like immutable objects 184s allows FOO - BAR to be ||= to a constant 184s allows FOO - BAR to be assigned to a constant 184s behaves like immutable objects 184s allows 'foo' + 'bar' to be ||= to a constant 184s allows 'foo' + 'bar' to be assigned to a constant 184s behaves like immutable objects 184s allows { a: 1, b: 2 } to be ||= to a constant 184s allows { a: 1, b: 2 } to be assigned to a constant 184s behaves like immutable objects 184s allows 1 to be ||= to a constant 184s allows 1 to be assigned to a constant 184s behaves like immutable objects 184s allows %w(a b c) to be assigned to a constant 184s allows %w(a b c) to be ||= to a constant 184s behaves like immutable objects 184s allows 'str' to be assigned to a constant 184s allows 'str' to be ||= to a constant 184s behaves like immutable objects 184s allows "top#{1 + 2}" to be ||= to a constant 184s allows "top#{1 + 2}" to be assigned to a constant 184s behaves like literals that are not frozen 184s behaves like immutable objects 184s allows ENV['foo'] to be assigned to a constant 184s allows ENV['foo'] to be ||= to a constant 184s behaves like mutable objects 184s when assigning with = 184s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 184s when assigning with ||= 184s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 184s behaves like immutable objects 184s allows 'foo' + 'bar' to be assigned to a constant 184s allows 'foo' + 'bar' to be ||= to a constant 184s behaves like mutable objects 184s when assigning with = 184s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 184s when assigning with ||= 184s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 184s behaves like immutable objects 184s allows ::ENV['foo'] to be assigned to a constant 184s allows ::ENV['foo'] to be ||= to a constant 184s behaves like mutable objects 184s when assigning with ||= 184s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 184s when assigning with = 184s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 184s behaves like mutable objects 184s when assigning with ||= 184s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 184s when assigning with = 184s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 184s behaves like mutable objects 184s when assigning with = 184s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 184s when assigning with ||= 184s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 184s behaves like immutable objects 184s allows FOO + BAR to be assigned to a constant 184s allows FOO + BAR to be ||= to a constant 184s behaves like immutable objects 184s allows 1 to be assigned to a constant 184s allows 1 to be ||= to a constant 184s behaves like immutable objects 184s allows :sym to be assigned to a constant 184s allows :sym to be ||= to a constant 184s behaves like immutable objects 184s allows FOO - BAR to be assigned to a constant 184s allows FOO - BAR to be ||= to a constant 184s behaves like immutable objects 184s allows 1.5 to be ||= to a constant 184s allows 1.5 to be assigned to a constant 184s behaves like immutable objects 184s allows FOO + BAR to be ||= to a constant 184s allows FOO + BAR to be assigned to a constant 184s behaves like mutable objects 184s when assigning with = 184s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 184s when assigning with ||= 184s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 184s behaves like immutable objects 184s allows ENV['foo'] to be assigned to a constant 184s allows ENV['foo'] to be ||= to a constant 184s 184s RuboCop::Cop::Security::CompoundHash 184s registers an offense when using XOR operator in the implementation of a dynamic hash singleton method 184s registers an offense when using XOR operator in the implementation of a dynamic hash method 184s registers an offense when using XOR between an array hash and a class 184s registers an offense when using multiplication assignment operator in the implementation of the hash method 184s does not register an offense when delegating to a single object 184s registers an offense when delegating to Array#hash for a single value 184s registers an offense when using XOR operator in the implementation of the hash singleton method 184s registers an offense when using addition in the implementation of the hash method 184s registers an offense if .hash is called on any elements of a hashed array 184s registers an offense when using XOR involving super 184s registers an offense when using XOR and bitshifts 184s registers an offense when using XOR operator in the implementation of the hash method, even if intermediate variable is used 184s registers an offense when using multiplication in the implementation of the hash method 184s registers an offense when using XOR operator in the implementation of the hash method 184s registers an offense for complex usage 184s registers an offense when using addition assignment operator in the implementation of the hash method 184s registers an offense when using XOR operator in the implementation of the hash method, even without sub-calls to hash 184s registers an offense when using XOR assignment operator in the implementation of the hash method 184s does not register an offense when delegating to Array#hash 184s registers an offense when using bitshift and OR 184s 184s RuboCop::Cop::Lint::DeprecatedClassMethods 184s when using `ENV.clone` 184s registers an offense 184s does not register an offense for method calls to `ENV` other than `clone` 184s when using `ENV.dup` 184s registers an offense 184s does not register an offense for method calls to `ENV` other than `dup` 184s prefer `block_given?` over `iterator?` 184s does not register an offense for block_given? 184s registers an offense and corrects iterator? 184s does not register an offense for offensive method `iterator?`on other receivers 184s prefer `Dir.exist?` over `Dir.exists?` 184s registers an offense and corrects Dir.exists? 184s does not register an offense for offensive method `exists?`on other receivers 184s does not register an offense for Dir.exist? 184s registers an offense and corrects ::Dir.exists? 184s prefer `Addrinfo#getaddrinfo` over `Socket.gethostbyname` 184s registers an offense for Socket.gethostbyname 184s does not register an offense for method `gethostbyname` on other receivers 184s registers an offense for ::Socket.gethostbyname 184s prefer `Addrinfo#getnameinfo` over `Socket.gethostbyaddr` 184s registers an offense for Socket.gethostbyaddr 184s does not register an offense for method `gethostbyaddr` on other receivers 184s registers an offense for ::Socket.gethostbyaddr 184s prefer `File.exist?` over `File.exists?` 184s registers an offense and corrects ::File.exists? 184s does not register an offense for File.exist? 184s registers an offense and corrects File.exists? 184s when using `ENV.freeze` 184s does not register an offense for method calls to `ENV` other than `freeze` 184s registers an offense 184s 184s RuboCop::Cop::Style::RedundantSortBy 184s autocorrects array.sort_by { |y| y } 184s autocorrects array.sort_by do |x| x end 184s autocorrects array.sort_by { |x| x } 184s Ruby 2.7 184s autocorrects array.sort_by { |x| x } 184s 184s RuboCop::Cop::Style::IfWithBooleanLiteralBranches 184s when complex condition 184s does not register an offense when using `if foo? && (bar || baz)?` with boolean literal branches 184s registers and corrects an offense when using `if foo? || (bar && baz)?` with boolean literal branches 184s register and corrects an offense when using `if (foo? || bar) && baz?` with boolean literal branches 184s registers and corrects an offense when using `if foo? && bar && baz?` with boolean literal branches 184s does not register an offense when using `if foo? && bar || baz?` with boolean literal branches 184s does not register an offense when using `if foo? || bar || baz?` with boolean literal branches 184s does not register an offense when using `if (foo? && bar) || baz?` with boolean literal branches 184s registers and corrects an offense when using `if foo? || bar && baz?` with boolean literal branches 184s when double negative is used in condition 184s registers and corrects an offense when using `if !!condition` with opposite boolean literal branches 184s registers and corrects an offense when using `if !!condition` with boolean literal branches 184s when using `elsif` with boolean literal branches 184s registers and corrects an offense when using single `elsif` with boolean literal branches 184s does not register an offense when using multiple `elsif` with boolean literal branches 184s when `AllowedMethods: nonzero?` 184s does not register an offense when using `nonzero?` 184s when condition is a method that does not known whether to return boolean value 184s does not register an offense when using `if condition` with opposite boolean literal branches 184s does not register an offense when using `unless condition` with opposite boolean literal branches 184s does not register an offense when using `if condition` with boolean literal branches 184s does not register an offense when using `unless condition` with boolean literal branches 184s when condition is a logical operator and operands do not known whether to return boolean value 184s does not register an offense when using `unless foo && bar` with opposite boolean literal branches 184s does not register an offense when using `unless foo || bar` with opposite boolean literal branches 184s does not register an offense when using `if foo && bar` with opposite boolean literal branches 184s does not register an offense when using `if foo || bar` with opposite boolean literal branches 184s does not register an offense when using `if foo || bar` with boolean literal branches 184s does not register an offense when using `unless foo || bar` with boolean literal branches 184s does not register an offense when using `unless foo && bar` with boolean literal branches 184s does not register an offense when using `if foo && bar` with boolean literal branches 184s when condition is a comparison method 184s registers and corrects an offense when using `if foo == bar` with opposite boolean literal branches 184s registers and corrects an offense when using `if` with boolean literal branches directly under `def` 184s registers and corrects an offense when using `if` with boolean literal branches directly under `def` 184s registers and corrects an offense when using ternary operator with boolean literal branches 184s does not register an offense when using a branch that is not boolean literal 184s does not register an offense when using a branch that is not boolean literal 184s registers and corrects an offense when using `if` with boolean literal branches directly under `def` 184s does not register an offense when using a branch that is not boolean literal 184s registers and corrects an offense when using `if foo == bar` with opposite boolean literal branches 184s registers and corrects an offense when using `if foo == bar` with opposite boolean literal branches 184s registers and corrects an offense when using `if` with boolean literal branches directly under `def` 184s does not register an offense when using a branch that is not boolean literal 184s registers and corrects an offense when using `unless foo == bar` with opposite boolean literal branches 184s registers and corrects an offense when using `unless foo == bar` with boolean literal branches 184s registers and corrects an offense when using opposite ternary operator with boolean literal branches 184s registers and corrects an offense when using `unless foo == bar` with opposite boolean literal branches 184s registers and corrects an offense when using `unless foo == bar` with boolean literal branches 184s registers and corrects an offense when using opposite ternary operator with boolean literal branches 184s registers and corrects an offense when using opposite ternary operator with boolean literal branches 184s does not register an offense when using a branch that is not boolean literal 184s registers and corrects an offense when using ternary operator with boolean literal branches 184s registers and corrects an offense when using `unless foo == bar` with boolean literal branches 184s registers and corrects an offense when using opposite ternary operator with boolean literal branches 184s registers and corrects an offense when using `if foo == bar` with boolean literal branches 184s registers and corrects an offense when using `unless foo == bar` with opposite boolean literal branches 184s does not register an offense when using a branch that is not boolean literal 184s does not register an offense when using a branch that is not boolean literal 184s registers and corrects an offense when using `unless foo == bar` with opposite boolean literal branches 184s registers and corrects an offense when using `if foo == bar` with boolean literal branches 184s registers and corrects an offense when using `if foo == bar` with opposite boolean literal branches 184s registers and corrects an offense when using `unless foo == bar` with opposite boolean literal branches 184s registers and corrects an offense when using `if foo == bar` with boolean literal branches 184s registers and corrects an offense when using ternary operator with boolean literal branches 184s registers and corrects an offense when using `if foo == bar` with boolean literal branches 184s registers and corrects an offense when using `if foo == bar` with boolean literal branches 184s registers and corrects an offense when using `unless foo == bar` with boolean literal branches 184s registers and corrects an offense when using `if` with boolean literal branches directly under `def` 184s registers and corrects an offense when using `if foo == bar` with opposite boolean literal branches 184s registers and corrects an offense when using ternary operator with boolean literal branches 184s registers and corrects an offense when using `if` with boolean literal branches directly under `def` 184s registers and corrects an offense when using `unless foo == bar` with boolean literal branches 184s registers and corrects an offense when using `unless foo == bar` with opposite boolean literal branches 184s registers and corrects an offense when using `if foo == bar` with boolean literal branches 184s registers and corrects an offense when using ternary operator with boolean literal branches 184s registers and corrects an offense when using `if foo == bar` with opposite boolean literal branches 184s registers and corrects an offense when using `if foo == bar` with opposite boolean literal branches 184s registers and corrects an offense when using `unless foo == bar` with boolean literal branches 184s registers and corrects an offense when using `if` with boolean literal branches directly under `def` 184s registers and corrects an offense when using `if foo == bar` with boolean literal branches 184s registers and corrects an offense when using ternary operator with boolean literal branches 184s registers and corrects an offense when using `unless foo == bar` with opposite boolean literal branches 184s registers and corrects an offense when using opposite ternary operator with boolean literal branches 184s registers and corrects an offense when using opposite ternary operator with boolean literal branches 184s registers and corrects an offense when using opposite ternary operator with boolean literal branches 184s registers and corrects an offense when using ternary operator with boolean literal branches 184s registers and corrects an offense when using `unless foo == bar` with boolean literal branches 184s when condition is a logical operator and all operands are predicate methods 184s registers and corrects an offense when using `unless foo? || bar?` with opposite boolean literal branches 184s registers and corrects an offense when using `unless foo? || bar?` with boolean literal branches 184s registers and corrects an offense when using `if foo? && bar?` with opposite boolean literal branches 184s registers and corrects an offense when using `if foo? && bar? || baz?` with boolean literal branches 184s registers and corrects an offense when using `if foo? && bar? && baz?` with boolean literal branches 184s registers and corrects an offense when using `if foo? && bar?` with boolean literal branches 184s when condition is a predicate method 184s registers and corrects an offense when using `elsif foo.do_something?` with boolean literal branches 184s registers and corrects an offense when using `if foo.do_something?` with opposite boolean literal branches 184s registers and corrects an offense when using `if foo.do_something?` with boolean literal branches 184s registers and corrects an offense when using `elsif foo.do_something?` with opposite boolean literal branches 184s registers and corrects an offense when using `unless foo.do_something?` with boolean literal branches 184s registers and corrects an offense when using `unless foo.do_something?` with opposite boolean literal branches 184s 184s RuboCop::Cop::Security::Eval 184s accepts eval with no arguments 184s registers an offense for eval as command 184s registers an offense for eval with string that has an interpolation 184s accepts eval on a literal string 184s accepts eval as variable 184s accepts eval with a string that interpolates a literal 184s registers an offense `Binding#eval` 184s accepts eval as method 184s registers an offense for eval as function 184s accepts eval with a multiline string 184s with an explicit binding, filename, and line number 184s registers an offense for eval as function 184s registers an offense for eval as command 184s accepts eval on a literal string 184s 184s RuboCop::Cop::Metrics::PerceivedComplexity 184s when Max is 2 184s counts stupid nested if and else blocks 184s when AllowedPatterns is enabled 184s does not register an offense when using `define_method` 184s does not register an offense when defining an instance method 184s does not register an offense when defining a class method 184s when Max is 1 184s registers an offense for a rescue block 184s registers an offense for a while block 184s registers an offense for a case/when block 184s registers an offense for or 184s accepts an empty method 184s accepts an empty `define_method` 184s counts only a single method 184s accepts complex code outside of methods 184s registers an offense for an unless modifier 184s registers an offense for an if modifier 184s does not count unknown block calls 184s deals with nested if blocks containing && and || 184s counts else in a case with no argument 184s registers an offense for a case/when block without an expression after case 184s counts known iterating block 184s registers an offense for and 184s registers an offense for || 184s registers an offense for a `define_method` 184s registers an offense for && 184s registers an offense for an until block 184s registers an offense for a for block 184s accepts a method with no decision points 184s registers an offense for elsif and else blocks 184s registers an offense for a ternary operator 184s when AllowedMethods is enabled 184s does not register an offense when using `define_method` 184s does not register an offense when defining a class method 184s does not register an offense when defining an instance method 184s 184s RuboCop::Cop::Style::DocumentDynamicEvalDefinition 184s does not register an offense when using eval-type method with interpolated string that is not heredoc with comment doc 184s registers an offense when using eval-type method with string interpolation without comment docs 184s registers an offense when using eval-type method with interpolated string that is not heredoc without comment doc 184s does not register an offense when using eval-type method with string interpolation with comment docs 184s does not register an offense when using eval-type method without string interpolation 184s block comment in heredoc 184s does not register an offense when using multiple methods with split comments 184s does not register an offense for a matching block comment 184s does not register an offense when using inline comments 184s does not register an offense when using multiple methods 184s registers an offense if the comment does not match the method 184s does not register an offense when using other text 184s does not evaluate comments if there is no interpolation 184s block comment outside heredoc 184s does not register an offense when using other text 184s registers an offense if the comment does not match the method 184s does not register an offense when using multiple methods 184s does not register an offense when using inline comments 184s does not register an offense for a matching block comment after the heredoc 184s does not register an offense for a matching block comment before the heredoc 184s 184s RuboCop::Cop::Layout::LeadingCommentSpace 184s does not register an offense for more than one space 184s registers an offense and corrects comment without leading space 184s does not register an offense for # followed by no text 184s accepts sprockets directives 184s registers an offense and corrects #! after the first line 184s does not register an offense for #! on first line 184s accepts =begin/=end comments 184s does not register an offense for more than one # 184s does not register an offense for only #s 184s Gemfile Ruby comment 184s when config option is enabled 184s file not named Gemfile 184s registers an offense when using ruby config as comment 184s file named Gemfile 184s does not register an offense when using ruby config as comment 184s when config option is disabled 184s registers an offense when using ruby config as comment 184s RDoc syntax 184s registers an offense when starting `:` 184s does not register an offense when using `#++` or `#--` 184s file named config.ru 184s does not register an offense for #\ on first line 184s registers an offense and corrects for #\ after the first line 184s file not named config.ru 184s registers an offense and corrects #\ after the first line 184s registers an offense and corrects #\ on first line 184s Doxygen style 184s when config option is disabled 184s registers an offense and corrects using Doxygen style 184s when config option is enabled 184s does not register offense when using Doxygen style 184s 184s RuboCop::MagicComment 184s returns nil for encoding when comment is # shareable_constant_value:literal 184s returns "experimental_copy" for shareable_constant_value when comment is # shareable_constant_value: experimental_copy 184s returns "experimental_everything" for shareable_constant_value when comment is # shareable_constant_value: experimental_everything 184s returns nil for typed when comment is # shareable_constant_value: literal 184s returns nil for typed when comment is # eNcOdInG: utf-8 184s returns nil for frozen_string_literal when comment is # coding: utf-8 184s returns nil for typed when comment is # coding: utf-8 -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- 184s returns nil for frozen_string_literal when comment is # typed: strong 184s returns true for frozen_string_literal when comment is # frozen_string_literal:true 184s returns true for frozen_string_literal when comment is # -*- frozen-string-literal: true -*- 184s returns "false" for typed when comment is # typed: false 184s returns nil for shareable_constant_value when comment is # xyz shareable_constant_value: literal xyz 184s returns nil for frozen_string_literal when comment is # eNcOdInG: utf-8 184s returns "utf-8" for encoding when comment is # coding: utf-8 184s returns nil for shareable_constant_value when comment is # typed: false 184s returns nil for encoding when comment is # typed: strong 184s returns nil for encoding when comment is # shareable_constant_value: none 184s returns nil for typed when comment is # vim: filetype=ruby, fileencoding=ascii-8bit 184s returns nil for typed when comment is # shareable_constant_value: none 184s returns nil for shareable_constant_value when comment is # coding: utf-8 -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- 184s returns nil for encoding when comment is # typed: true 184s returns nil for shareable_constant_value when comment is # eNcOdInG: utf-8 184s returns nil for frozen_string_literal when comment is CSV.generate(encoding: Encoding::UTF_8) do |csv| 184s returns nil for encoding when comment is # vim: filetype=ruby,fileencoding=ascii-8bit 184s returns nil for frozen_string_literal when comment is # encoding: ascii-8bit frozen_string_literal: true 184s returns nil for encoding when comment is # typed: false 184s returns nil for typed when comment is # vim: filetype=ruby, fileencoding=ascii-8bit 184s returns nil for frozen_string_literal when comment is # vim: filetype=ruby, fileencoding=ascii-8bit 184s returns nil for encoding when comment is # typed: ignore 184s returns nil for typed when comment is # @typed 184s returns nil for typed when comment is # frozen_string_literal: true encoding: ascii-8bit 184s returns nil for frozen_string_literal when comment is # typed: false 184s returns nil for encoding when comment is # sHaReaBLE-CoNstANT-ValUE: literal 184s returns nil for frozen_string_literal when comment is # shareable_constant_value: none 184s returns nil for typed when comment is # shareable_constant_value:literal 184s returns nil for shareable_constant_value when comment is # coding: utf-8 184s returns "strong" for typed when comment is # typed: strong 184s returns "utf-8" for encoding when comment is # coding: utf-8 184s returns nil for typed when comment is # coding: utf-8 184s returns "literal" for shareable_constant_value when comment is # SHAREABLE-CONSTANT-VALUE: literal 184s returns nil for shareable_constant_value when comment is # vim: filetype=ruby, fileencoding=ascii-8bit 184s returns nil for typed when comment is # shareable_constant_value: experimental_everything 184s returns "ascii-8bit" for encoding when comment is # -*- coding: ASCII-8BIT; typed: strict -*- 184s returns false for frozen_string_literal when comment is # frozen_string_literal: false 184s returns nil for shareable_constant_value when comment is # @typed 184s returns nil for shareable_constant_value when comment is # fRoZeN-sTrInG_lItErAl: true 184s returns "utf-8" for encoding when comment is # eNcOdInG: utf-8 184s returns nil for shareable_constant_value when comment is #vim: filetype=ruby, fileencoding=ascii-8bit, typed=strict 184s returns nil for frozen_string_literal when comment is # shareable-constant-value: literal 184s returns nil for shareable_constant_value when comment is # frozen_string_literal: true encoding: ascii-8bit 184s returns nil for typed when comment is #vim: filetype=ruby, fileencoding=ascii-8bit, typed=strict 184s returns nil for frozen_string_literal when comment is # sHaReaBLE-CoNstANT-ValUE: literal 184s returns nil for shareable_constant_value when comment is # coding: utf-8 vim: filetype=ruby, fileencoding=ascii-8bit 184s returns nil for encoding when comment is # 184s returns true for frozen_string_literal when comment is # frozen_string_literal: true 184s returns nil for frozen_string_literal when comment is # encoding: stateless-iso-2022-jp-kddi 184s returns nil for frozen_string_literal when comment is # vim: filetype=ruby, fileencoding=ascii-8bit 184s returns nil for typed when comment is # -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- 184s returns nil for encoding when comment is # -*- frozen-string-literal: true -*- 184s returns nil for shareable_constant_value when comment is # frozen_string_literal: true 184s returns nil for frozen_string_literal when comment is # shareable_constant_value: experimental_copy 184s returns nil for shareable_constant_value when comment is # typed: true 184s returns nil for shareable_constant_value when comment is # coding: utf-8 184s returns "ignore" for typed when comment is # typed: ignore 184s returns "ascii-8bit" for encoding when comment is # encoding: ascii-8bit frozen_string_literal: true 184s returns true for frozen_string_literal when comment is # frozen-string-literal: true 184s returns "utf-8" for encoding when comment is # ENCODING: utf-8 184s returns nil for typed when comment is # frozen_string_literal: false 184s returns nil for frozen_string_literal when comment is # incoding: utf-8 184s returns nil for typed when comment is # shareable_constant_value: experimental_copy 184s returns nil for frozen_string_literal when comment is # xyz shareable_constant_value: literal 184s returns nil for frozen_string_literal when comment is # frozen_string_literal: true encoding: ascii-8bit 184s returns nil for typed when comment is # -*- encoding : ascii-8bit -*- 184s returns nil for frozen_string_literal when comment is # typed: strict 184s returns nil for typed when comment is # frozen_string_literal:true 184s returns nil for typed when comment is # vim: filetype=ruby,fileencoding=ascii-8bit 184s returns nil for shareable_constant_value when comment is #typed:strict 184s returns nil for encoding when comment is #typed:strict 184s returns true for frozen_string_literal when comment is # fRoZeN-sTrInG_lItErAl: true 184s returns nil for shareable_constant_value when comment is # vim: filetype=ruby, fileencoding=ascii-8bit 184s returns nil for shareable_constant_value when comment is CSV.generate(encoding: Encoding::UTF_8) do |csv| 184s returns "ascii-8bit" for encoding when comment is # coding: utf-8 -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- 184s returns "literal" for shareable_constant_value when comment is # sHaReaBLE-CoNstANT-ValUE: literal 184s returns "stateless-iso-2022-jp-kddi" for encoding when comment is # encoding: stateless-iso-2022-jp-kddi 184s returns nil for frozen_string_literal when comment is # vim: filetype=python, fileencoding=ascii-8bit 184s returns "strict" for typed when comment is #typed:strict 184s returns nil for encoding when comment is # frozen_string_literal: true 184s returns nil for encoding when comment is # shareable_constant_value: experimental_copy 184s returns nil for typed when comment is # vim:fileencoding=utf-8 184s returns nil for typed when comment is # xyz shareable_constant_value: literal 184s returns nil for typed when comment is # vim: filetype=python, fileencoding=ascii-8bit 184s returns nil for shareable_constant_value when comment is # vim:fileencoding=utf-8 184s returns "invalid" for frozen_string_literal when comment is # frozen_string_literal: invalid 184s returns nil for encoding when comment is # xyz shareable_constant_value: literal 184s returns "literal" for shareable_constant_value when comment is # shareable_constant_value:literal 184s returns nil for frozen_string_literal when comment is # coding: utf-8 184s returns nil for encoding when comment is # frozen_string_literal: false 184s returns nil for encoding when comment is # shareable_constant_value: literal 184s returns "strict" for typed when comment is # typed:strict 184s returns nil for shareable_constant_value when comment is # typed:strict 184s returns nil for encoding when comment is # @typed 184s returns "true" for typed when comment is # typed: true 184s returns nil for typed when comment is # frozen_string_literal: true 184s returns nil for typed when comment is # frozen_string_literal: true 184s returns nil for typed when comment is # encoding: utf-8 184s returns nil for shareable_constant_value when comment is # encoding: utf-8 184s returns "literal" for shareable_constant_value when comment is # shareable_constant_value: literal 184s returns nil for shareable_constant_value when comment is # typed: strong 184s returns true for frozen_string_literal when comment is # FROZEN-STRING-LITERAL: true 184s returns nil for encoding when comment is # frozen_string_literal:true 184s returns nil for shareable_constant_value when comment is # incoding: utf-8 184s returns nil for typed when comment is CSV.generate(encoding: Encoding::UTF_8) do |csv| 184s returns nil for shareable_constant_value when comment is # frozen_string_literal: true 184s returns nil for shareable_constant_value when comment is # xyz shareable_constant_value: literal 184s returns nil for frozen_string_literal when comment is # typed: ignore 184s returns nil for shareable_constant_value when comment is #vim: filetype=ruby, fileencoding=ascii-8bit 184s returns nil for frozen_string_literal when comment is # 184s returns nil for frozen_string_literal when comment is # vim:fileencoding=utf-8 184s returns true for frozen_string_literal when comment is # frozen_string_literal: true 184s returns nil for encoding when comment is CSV.generate(encoding: Encoding::UTF_8) do |csv| 184s returns "ascii-8bit" for encoding when comment is # -*- encoding : ascii-8bit -*- 184s returns "ascii-8bit" for encoding when comment is # frozen_string_literal: true encoding: ascii-8bit 184s returns nil for frozen_string_literal when comment is # -*- encoding : ascii-8bit -*- 184s returns nil for typed when comment is # shareable-constant-value: literal 184s returns nil for shareable_constant_value when comment is # -*- frozen-string-literal: true -*- 184s returns nil for typed when comment is # -*- frozen-string-literal: true -*- 184s returns true for frozen_string_literal when comment is # -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- 184s returns "ascii-8bit" for encoding when comment is # vim: filetype=python, fileencoding=ascii-8bit 184s returns nil for shareable_constant_value when comment is # vim: filetype=python, fileencoding=ascii-8bit 184s returns "strict" for typed when comment is # typed: strict 184s returns "ascii-8bit" for encoding when comment is #vim: filetype=ruby, fileencoding=ascii-8bit, typed=strict 184s returns nil for encoding when comment is # incoding: utf-8 184s returns nil for encoding when comment is # typed:strict 184s returns "literal" for shareable_constant_value when comment is # shareable-constant-value: literal 184s returns nil for encoding when comment is # shareable-constant-value: literal 184s returns nil for encoding when comment is # shareable_constant_value: experimental_everything 184s returns nil for typed when comment is # FROZEN-STRING-LITERAL: true 184s returns nil for typed when comment is # incoding: utf-8 184s returns nil for frozen_string_literal when comment is # encoding: utf-8 184s returns nil for shareable_constant_value when comment is # encoding: stateless-iso-2022-jp-kddi 184s returns nil for shareable_constant_value when comment is # frozen_string_literal: false 184s returns nil for encoding when comment is # FROZEN-STRING-LITERAL: true 184s returns nil for encoding when comment is # frozen_string_literal: invalid 184s returns "ascii-8bit" for encoding when comment is #vim: filetype=ruby, fileencoding=ascii-8bit 184s returns nil for frozen_string_literal when comment is # shareable_constant_value: experimental_everything 184s returns nil for typed when comment is # coding: utf-8 vim: filetype=ruby, fileencoding=ascii-8bit 184s returns nil for shareable_constant_value when comment is # 184s returns nil for encoding when comment is # typed: strict 184s returns nil for shareable_constant_value when comment is # -*- coding: ASCII-8BIT; typed: strict -*- 184s returns nil for shareable_constant_value when comment is # encoding: ascii-8bit frozen_string_literal: true 184s returns nil for shareable_constant_value when comment is # frozen-string-literal: true 184s returns nil for encoding when comment is # xyz shareable_constant_value: literal xyz 184s returns nil for shareable_constant_value when comment is # typed: strict 184s returns nil for typed when comment is # encoding: stateless-iso-2022-jp-kddi 184s returns nil for shareable_constant_value when comment is # ENCODING: utf-8 184s returns nil for typed when comment is # frozen-string-literal: true 184s returns nil for frozen_string_literal when comment is # vim: filetype=ruby,fileencoding=ascii-8bit 184s returns nil for frozen_string_literal when comment is # @typed 184s returns "ascii-8bit" for encoding when comment is # vim: filetype=ruby, fileencoding=ascii-8bit 184s returns nil for encoding when comment is # frozen-string-literal: true 184s returns nil for shareable_constant_value when comment is # -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- 184s returns nil for typed when comment is # 184s returns nil for shareable_constant_value when comment is # -*- encoding : ascii-8bit -*- 184s returns nil for shareable_constant_value when comment is # typed: ignore 184s returns nil for shareable_constant_value when comment is # vim: filetype=ruby,fileencoding=ascii-8bit 184s returns nil for typed when comment is # frozen_string_literal: invalid 184s returns nil for frozen_string_literal when comment is #vim: filetype=ruby, fileencoding=ascii-8bit, typed=strict 184s returns nil for typed when comment is # ENCODING: utf-8 184s returns nil for encoding when comment is # SHAREABLE-CONSTANT-VALUE: literal 184s returns nil for typed when comment is # SHAREABLE-CONSTANT-VALUE: literal 184s returns nil for frozen_string_literal when comment is # ENCODING: utf-8 184s returns nil for typed when comment is # xyz shareable_constant_value: literal xyz 184s returns nil for shareable_constant_value when comment is # frozen_string_literal:true 184s returns nil for frozen_string_literal when comment is # shareable_constant_value: literal 184s returns nil for shareable_constant_value when comment is # FROZEN-STRING-LITERAL: true 184s returns nil for shareable_constant_value when comment is # frozen_string_literal: invalid 184s returns nil for frozen_string_literal when comment is # -*- coding: ASCII-8BIT; typed: strict -*- 184s returns "none" for shareable_constant_value when comment is # shareable_constant_value: none 184s returns nil for encoding when comment is # vim:fileencoding=utf-8 184s returns nil for frozen_string_literal when comment is # typed:strict 184s returns nil for encoding when comment is # frozen_string_literal: true 184s returns nil for typed when comment is # encoding: ascii-8bit frozen_string_literal: true 184s returns nil for frozen_string_literal when comment is # typed: true 184s returns nil for frozen_string_literal when comment is #typed:strict 184s returns nil for frozen_string_literal when comment is # SHAREABLE-CONSTANT-VALUE: literal 184s returns "ascii-8bit" for encoding when comment is # -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- 184s returns "utf-8" for encoding when comment is # encoding: utf-8 184s returns nil for typed when comment is # fRoZeN-sTrInG_lItErAl: true 184s returns nil for frozen_string_literal when comment is # shareable_constant_value:literal 184s returns nil for typed when comment is # -*- coding: ASCII-8BIT; typed: strict -*- 184s returns nil for frozen_string_literal when comment is #vim: filetype=ruby, fileencoding=ascii-8bit 184s returns true for frozen_string_literal when comment is # coding: utf-8 -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- 184s returns nil for encoding when comment is # fRoZeN-sTrInG_lItErAl: true 184s returns nil for frozen_string_literal when comment is # xyz shareable_constant_value: literal xyz 184s returns nil for typed when comment is # sHaReaBLE-CoNstANT-ValUE: literal 184s returns nil for typed when comment is #vim: filetype=ruby, fileencoding=ascii-8bit 184s returns nil for typed when comment is # coding: utf-8 184s returns "utf-8" for encoding when comment is # coding: utf-8 vim: filetype=ruby, fileencoding=ascii-8bit 184s returns "ascii-8bit" for encoding when comment is # vim: filetype=ruby, fileencoding=ascii-8bit 184s returns nil for frozen_string_literal when comment is # coding: utf-8 vim: filetype=ruby, fileencoding=ascii-8bit 184s #without 184s emacs format 184s with multiple tokens 184s is expected to eq "# -*- frozen_string_literal: true -*-" 184s with one token 184s is expected to eq "" 184s simple format 184s when the comment contains a different magic value 184s is expected to eq "# frozen-string-literal: true" 184s when the entire comment is a single value 184s is expected to eq "" 184s vim format 184s when the comment has multiple tokens 184s is expected to eq "# vim: filetype=ruby" 184s #valid_shareable_constant_value? 184s when given comment is not specified 184s is expected to equal false 184s when given comment specified as unknown value 184s is expected to equal false 184s when given comment specified as `literal` 184s is expected to equal true 184s when given comment specified as `experimental_everything` 184s is expected to equal true 184s when given comment specified as `experimental_copy` 184s is expected to equal true 184s when given comment specified as `none` 184s is expected to equal true 184s #valid? 184s with a non magic comment 184s is expected to equal false 184s with an encoding comment 184s is expected to equal true 184s with an empty string 184s is expected to equal false 184s with an shareable constant value comment 184s is expected to equal true 184s with an frozen string literal comment 184s is expected to equal true 184s 184s RuboCop::Cop::Style::DateTime 184s does not register an offense when using ::DateTime for historic date 184s does not register an offense when using DateTime in another namespace 184s registers an offense when using DateTime for current time 184s registers an offense when using ::DateTime for current time 184s does not register an offense when using Date for modern date 184s does not register an offense when using DateTime for historic date 184s registers an offense when using DateTime for modern date 184s does not register an offense when using Time for current time 184s when configured to allow #to_datetime 184s does not register an offense 184s when configured to not allow #to_datetime 184s registers an offense 184s 184s RuboCop::Cop::Layout::EmptyLinesAroundExceptionHandlingKeywords 184s accepts `rescue` and `end` are on the same line 184s accepts `def` and `rescue` are on the same line 184s accepts last `rescue` and `end` are on the same line 184s accepts `begin` and `rescue` are on the same line 184s with complex begin-end - registers many offenses 184s accepts empty method definition 184s registers an offense for rescue section ending for method definition a blank 184s registers an offense for above rescue keyword with a blank 184s with complex method definition - registers many offenses 184s accepts no empty line 184s registers an offense for rescue section ending with a blank 184s registers an offense for rescue section starting with a blank 184s accepts empty lines around begin body 184s accepts empty begin 184s 184s RuboCop::Cop::Lint::HashCompareByIdentity 184s registers an offense when using hash methods with `object_id` on receiver as a key 184s registers an offense when using hash method with `object_id` as a key 184s does not register an offense for hash methods without `object_id` as key 184s 184s RuboCop::Cop::Style::ImplicitRuntimeError 184s registers an offense for `raise` with a multiline string 184s does not register an offense for `raise` without arguments 184s registers an offense for `fail` with a multiline string 184s registers an offense for `fail` without error class 184s does not register an offense for `raise` with an error class 184s registers an offense for `raise` without error class 184s does not register an offense for `fail` with an error class 184s does not register an offense for `fail` without arguments 184s 184s RuboCop::Cop::Style::WhenThen 184s accepts ; separating statements in the body of when 184s registers an offense for when b; 184s registers an offense for when b, c; 184s when inspecting a case statement with an empty branch 184s does not register an offense 184s 184s RuboCop::Cop::Style::TopLevelMethodDefinition 184s does not register an offense when define_method is not top-level 184s registers an offense top-level methods 185s does not register an offense when defined within arbitrary block 185s does not register an offense when using Struct 185s does not register an offense when using class 185s does not register an offense when using module 185s registers an offense top-level class methods 185s registers an offense when defining a top-level method after a class definition 185s does not register an offense when just called method on top-level 185s top-level define_method 185s registers offense for multi-line block 185s registers offense for proc argument 185s registers offense with inline block 185s Ruby >= 2.7 185s registers offense with inline numblock 185s 185s RuboCop::Cop::Lint::ConstantDefinitionInBlock 185s registers an offense for a module defined within a block 185s registers an offense for a constant defined within a block 185s does not register an offense for a top-level constant 185s registers an offense for a class defined within a block followed by another statement 185s does not register an offense for a top-level class 185s does not register an offense for a top-level class followed by another statement 185s registers an offense for a constant defined within a block followed by another statement 185s does not register an offense for a top-level module followed by another statement 185s does not register an offense for a constant with an explicit top-level scope followed by another statement 185s does not register an offense for a top-level constant followed by another statement 185s registers an offense for a module defined within a block followed by another statement 185s does not register an offense for a top-level module 185s registers an offense for a class defined within a block 185s does not register an offense for a constant with an explicit top-level scope 185s does not register an offense for a constant with an explicit self scope followed by another statement 185s does not register an offense for a constant with an explicit self scope 185s when `AllowedMethods: []` 185s registers an offense for a module defined within a block of `enums` method 185s registers an offense for a casign used within a block of `enums` method 185s registers an offense for a class defined within a block of `enums` method 185s when `AllowedMethods: [enums]` 185s does not register an offense for a module defined within a block of `enums` method 185s does not register an offense for a class defined within a block of `enums` method 185s does not register an offense for a casign used within a block of `enums` method 185s 185s RuboCop::Cop::Layout::SpaceBeforeSemicolon 185s registers an offense and corrects space before semicolon 185s registers an offense and corrects more than one space before a semicolon 185s does not register an offense for no space before semicolons 185s inside block braces 185s when EnforcedStyle for SpaceInsideBlockBraces is no_space 185s registers an offense and corrects a space between an opening brace and a semicolon 185s behaves like common behavior 185s accepts no space between an opening brace and a semicolon 185s when EnforcedStyle for SpaceInsideBlockBraces is space 185s accepts a space between an opening brace and a semicolon 185s behaves like common behavior 185s accepts no space between an opening brace and a semicolon 185s heredocs 185s registers an offense and corrects 185s 185s RuboCop::Cop::Layout::SingleLineBlockChain 185s registers an offense for no selector method call chained on the same line as a block 185s does not register an offense for method call chained on a new line after a single line block with trailing dot 185s registers an offense for method call chained on the same line as a block 185s does not register an offense for method call chained on the same line as a multiline block 185s does not register an offense for method call chained without a dot 185s does not register an offense for method call chained on a new line after a single line block 185s 185s RuboCop::Cop::Style::MultilineInPatternThen 185s >= Ruby 2.7 185s registers an offense for multiline (one line in a body) `in` statement with `then` 185s registers an offense for multiline (two lines in a body) `in` statement with `then` 185s does not register an offense for hash `in` statement with `then` 185s doesn't register an offense for multiline `in` statement without `then` 185s does not register an offense when line break for multiple candidate values of `in` 185s registers an offense when one line for multiple candidate values of `in` 185s doesn't register an offense when `then` required for a body of `in` is used 185s does not register an offense for array `when` statement with `then` 185s doesn't register an offense for singleline `in` statement with `then` 185s registers an offense for empty `in` statement with `then` 185s doesn't register an offense for empty `in` statement without `then` 185s autocorrects when the body of `in` branch starts with `then` 185s doesn't register an offense for multiline `in` statement with `then` followed by other lines 185s 185s RuboCop::Cop::Naming::VariableNumber 185s when CheckSymbols is false 185s does not register an offense for snake case numbering in symbol 185s when AllowedPatterns is set 185s does not register an offense for a symbol that matches an allowed pattern 185s registers an offense for a method name that does not match an allowed pattern 185s does not register an offense for a global variable name that matches an allowed pattern 185s registers an offense for a class variable name that does not match an allowed pattern 185s does not register an offense for a class variable name that matches an allowed pattern 185s does not register an offense for a local variable name that matches an allowed pattern 185s registers an offense for a symbol that does not match an allowed pattern 185s registers an offense for a instance variable name that does not match an allowed pattern 185s registers an offense for a local variable name that does not match an allowed pattern 185s does not register an offense for a method name that matches an allowed pattern 185s registers an offense for a global variable name that does not match an allowed pattern 185s does not register an offense for a instance variable name that matches an allowed pattern 185s when configured for non integer 185s registers an offense for normal case numbering in symbol 185s registers an offense for normal case numbering in method camel case parameter 185s registers an offense for snake case numbering in symbol 185s registers an offense for normal case numbering in method parameter 185s registers an offense for normal case numbering in method name 185s registers an offense for snake case numbering in method name 185s registers an offense for snake case numbering in method parameter 185s registers an offense for snake case numbering in method camel case parameter 185s behaves like offense 185s registers an offense for myAttribute_1 in non_integer 185s behaves like offense 185s registers an offense for @local1 in non_integer 185s behaves like accepts 185s accepts _foo in non_integer 185s behaves like accepts integer symbols 185s accepts integer symbol array literal 185s accepts integer symbol 185s behaves like accepts 185s accepts emparejó in non_integer 185s behaves like accepts 185s accepts local_one in non_integer 185s behaves like accepts 185s accepts localone in non_integer 185s behaves like offense_array 185s registers an offense for ["a_1", "aone"] in non_integer 185s behaves like offense 185s registers an offense for @myAttribute1 in non_integer 185s behaves like accepts 185s accepts fooBar in non_integer 185s behaves like offense 185s registers an offense for @myAttribute_1 in non_integer 185s behaves like offense 185s registers an offense for @local_1 in non_integer 185s behaves like accepts 185s accepts @__foo__ in non_integer 185s behaves like offense 185s registers an offense for myAttribute1 in non_integer 185s behaves like offense 185s registers an offense for _myLocal_1 in non_integer 185s behaves like offense 185s registers an offense for _myLocal1 in non_integer 185s behaves like accepts 185s accepts local_ in non_integer 185s behaves like accepts 185s accepts @@foo in non_integer 185s behaves like accepts 185s accepts _ in non_integer 185s behaves like offense 185s registers an offense for local1 in non_integer 185s behaves like accepts 185s accepts @foo in non_integer 185s behaves like offense 185s registers an offense for local_1 in non_integer 185s behaves like accepts 185s accepts _1 in non_integer 185s when configured for normal 185s registers an offense for snake case numbering in method parameter 185s registers an offense for snake case numbering in symbol 185s registers an offense for snake case numbering in method camel case parameter 185s registers an offense for snake case numbering in method name 185s does not register an offense for normal case numbering in symbol 185s registers an offense for snake case numbering in a global variable name 185s behaves like accepts 185s accepts user_1_id in normalcase 185s behaves like accepts 185s accepts _foo in normalcase 185s behaves like offense 185s registers an offense for local_1 in normalcase 185s behaves like offense 185s registers an offense for @local_1 in normalcase 185s behaves like offense 185s registers an offense for localFOO_1 in normalcase 185s behaves like accepts 185s accepts emparejó in normalcase 185s behaves like offense 185s registers an offense for @@local_1 in normalcase 185s behaves like accepts 185s accepts local_ in normalcase 185s behaves like offense_array 185s registers an offense for ["a_1", "a2"] in normalcase 185s behaves like accepts 185s accepts target_u2f_device in normalcase 185s behaves like accepts 185s accepts @foo in normalcase 185s behaves like accepts 185s accepts sha256 in normalcase 185s behaves like offense 185s registers an offense for sha_256 in normalcase 185s behaves like accepts 185s accepts @__foo__ in normalcase 185s behaves like offense 185s registers an offense for local_FOO_1 in normalcase 185s behaves like offense 185s registers an offense for myAttribute_1 in normalcase 185s behaves like accepts 185s accepts _1 in normalcase 185s behaves like offense 185s registers an offense for @myAttribute_1 in normalcase 185s behaves like accepts 185s accepts local1 in normalcase 185s behaves like offense 185s registers an offense for _myLocal_1 in normalcase 185s behaves like accepts 185s accepts foo10_bar in normalcase 185s behaves like accepts 185s accepts user1_id in normalcase 185s behaves like accepts 185s accepts _ in normalcase 185s behaves like accepts 185s accepts snake_case in normalcase 185s behaves like accepts 185s accepts localFOO1 in normalcase 185s behaves like accepts integer symbols 185s accepts integer symbol array literal 185s accepts integer symbol 185s when AllowedIdentifiers is set 185s does not register an offense for a local variable name that is allowed 185s does not register an offense for a instance variable name that is allowed 185s does not register an offense for a symbol that is allowed 185s does not register an offense for a class variable name that is allowed 185s does not register an offense for a global variable name that is allowed 185s does not register an offense for a method name that is allowed 185s when CheckMethodNames is false 185s does not register an offense for snake case numbering in method name 185s when configured for snake_case 185s registers an offense for normal case numbering in a global variable name 185s does not register an offense for snake case numbering in symbol 185s registers an offense for normal case numbering in method camel case parameter 185s registers an offense for normal case numbering in method name 185s registers an offense for normal case numbering in symbol 185s registers an offense for normal case numbering in method parameter 185s behaves like accepts 185s accepts _foo in snake_case 185s behaves like offense 185s registers an offense for local1 in snake_case 185s behaves like offense 185s registers an offense for @camelCase1 in snake_case 185s behaves like accepts 185s accepts emparejó in snake_case 185s behaves like accepts 185s accepts local_12 in snake_case 185s behaves like accepts 185s accepts aB_1 in snake_case 185s behaves like accepts 185s accepts local_ in snake_case 185s behaves like offense 185s registers an offense for @local1 in snake_case 185s behaves like accepts 185s accepts local_123 in snake_case 185s behaves like accepts 185s accepts _ in snake_case 185s behaves like offense 185s registers an offense for _unused1 in snake_case 185s behaves like offense 185s registers an offense for @@local1 in snake_case 185s behaves like accepts 185s accepts a_1_b_1 in snake_case 185s behaves like offense 185s registers an offense for camelCase1 in snake_case 185s behaves like accepts 185s accepts a_1_b in snake_case 185s behaves like accepts 185s accepts @foo in snake_case 185s behaves like accepts integer symbols 185s accepts integer symbol 185s accepts integer symbol array literal 185s behaves like accepts 185s accepts local_1 in snake_case 185s behaves like accepts 185s accepts _1 in snake_case 185s behaves like accepts 185s accepts @__foo__ in snake_case 185s behaves like offense 185s registers an offense for aB1 in snake_case 185s behaves like offense_array 185s registers an offense for ["a1", "a_2"] in snake_case 185s 185s RuboCop::Cop::Style::ArgumentsForwarding 185s TargetRubyVersion >= 2.7 185s registers an offense when forwarding to a method in block 185s does not register an offense when referencing the restarg outside forwarding method arguments 185s does not register an offense when the kwarg is overwritten 185s does not register an offense when the block arg is overwritten 185s does not register an offense when assigning the restarg outside forwarding method arguments 185s does not register an offense when using arguments forwarding 185s does not register an offense when different argument names are used 185s registers an offense when delegating 185s does not register an offense when using the restarg outside forwarding method arguments 185s does not register an offense when the restarg is overwritten 185s registers an offense when using restarg, kwargs and block arg 185s does not register an offense when body of method definition is empty 185s does not register an offense when different arguments are used 185s registers an offense when using restarg and block arg 185s registers an offense when passing restarg and block arg in defs 185s registers an offense when the parentheses of arguments are omitted 185s AllowOnlyRestArgument: true 185s does not register an offense when using only kwrest arg 185s does not register an offense when using only rest arg 185s AllowOnlyRestArgument: false 185s registers an offense when using only kwrest arg 185s registers an offense when using only rest arg 185s TargetRubyVersion <= 2.6 185s does not register an offense when using restarg with block arg 185s TargetRubyVersion >= 3.1 185s registers an offense when using restarg and anonymous block arg 185s registers an offense when using restarg, kwargs, and anonymous block arg 185s 185s RuboCop::Cop::Layout::SpaceInsideParens 185s when EnforcedStyle is space 185s accepts parentheses with spaces 185s accepts empty parentheses without spaces 185s registers an offense for no spaces inside parens 185s registers an offense for no space around heredoc start 185s accepts parentheses with comment and line break 185s registers an offense in block parameter list with no spaces 185s registers an offense for space inside empty parens 185s accepts parentheses with line break 185s when EnforcedStyle is compact 185s accepts parentheses with spaces 185s accepts two consecutive right parentheses 185s accepts empty parentheses without spaces 185s registers multiple offense for a missing and extra space between consecutive brackets 185s accepts three consecutive right parentheses 185s accepts three consecutive left parentheses 185s registers an offense for space between consecutive brackets 185s registers an offense for no space around heredoc start 185s accepts parentheses with line break 185s accepts parentheses with comment and line break 185s registers an offense for space inside empty parens 185s registers an offense for no spaces inside parens 185s registers an offense in block parameter list with no spaces 185s accepts two consecutive left parentheses 185s when EnforcedStyle is no_space 185s accepts parentheses with line break 185s accepts parentheses in block parameter list 185s accepts parentheses with comment and line break 185s registers an offense for spaces inside parens 185s registers an offense for space around heredoc start 185s accepts parentheses with no spaces 185s 185s RuboCop::Cop::Layout::EmptyLineBetweenDefs 185s accepts a def that is the first of a module 185s finds offenses in inner classes 185s accepts a def that follows code and a comment 185s registers an offense for multiple one-liners on the same line 185s accepts a nested def 185s accepts a def that follows an empty line and then a comment 185s autocorrects when there are too many new lines 185s accepts a def that follows a line with code 185s doesn't allow more than the required number of newlines 185s treats lines with whitespaces as blank 185s registers an offense for adjacent one-liners by default 185s accepts the first def without leading empty line in a class 185s when a maximum of empty lines is specified 185s finds no offense for no empty line 185s finds no offense for one empty line 185s finds an offense for two empty lines 185s when multiple lines between defs are allowed 185s treats lines with whitespaces as blank 185s registers an offense and corrects when there are too many new lines 185s EmptyLineBetweenModuleDefs 185s registers offense when no empty lines between module and method definitions 185s when disabled 185s does not register offense 185s endless methods 185s with AllowAdjacentOneLineDefs: false 185s registers an offense and corrects 185s between regular and endless methods 185s registers an offense and corrects 185s between endless and regular methods 185s registers an offense and corrects 185s with AllowAdjacentOneLineDefs: true 185s does not register an offense 185s between endless class method and regular class methods 185s registers an offense and corrects 185s between endless class method and regular methods 185s registers an offense and corrects 185s when AllowAdjacentOneLineDefs is enabled 185s accepts adjacent one-liners 185s registers an offense for adjacent defs if some are multi-line 185s when empty lines between classes and modules together 185s registers offense when no empty lines between module and method definitions 185s when there are only comments between defs 185s registers an offense 185s class methods 185s mixed instance and class methods 185s registers an offense for missing blank line between methods 185s adjacent class methods 185s registers an offense for missing blank line between methods 185s conditional method definitions 185s accepts defs inside a conditional without blank lines in between 185s registers an offense for consecutive defs inside a conditional 185s EmptyLineBetweenClassDefs 185s registers offense when no empty lines between class and method definitions 185s when disabled 185s does not register offense 185s with AllowAdjacentOneLineDefs enabled 185s does not register offense 185s 185s RuboCop::Cop::Layout::EmptyLineAfterGuardClause 185s accepts a guard clause after a single line heredoc 185s accepts a guard clause when the next line is `rescue`-`else` 185s registers an offense and corrects a method starting with end_ 185s registers an offense when the clause ends with a semicolon but the next clause is on the next line 185s registers an offense and corrects a `raise` guard clause not followed by empty line when `unless` condition is after heredoc 185s accepts a guard clause when the next line is `else` 185s registers an offense and corrects `next` guard clause not followed by empty line 185s registers an offense and corrects only the last guard clause 185s accepts a guard clause when the next line is `ensure` 185s accepts a guard clause followed by end 185s registers an offense and corrects a guard clause not followed by empty line 185s accepts a `raise` guard clause not followed by empty line when guard clause is after condition without method invocation 185s registers an offense and corrects a guard clause is before `begin` 185s registers an offense and corrects a guard clause not followed by empty line when guard clause including heredoc 185s registers an offense and corrects using heredoc with `and return` before guard condition 185s accepts a guard clause that is after a multiline heredoc with chained calls 185s accepts a guard clause that is after a multiline heredoc nested argument call 185s registers an offense and corrects a `raise` guard clause not followed by empty line when `if` condition is after heredoc 185s accepts a guard clause inside oneliner block 185s accepts a guard clause when the next line is `rescue` 185s accepts modifier if 185s registers no offenses using heredoc with `and return` before guard condition with empty line 185s accepts a guard clause followed by empty line when guard clause including heredoc 185s registers and corrects when using guard clause is after `rubocop:enable` comment 185s registers an offense and corrects when using `or return` before guard condition 185s accepts a guard clause when the next line is `elsif` 185s does not register an offense when the clause is not followed by other code 185s accepts using guard clause is after `raise` 185s accepts a modifier if when the next line is `end` 185s registers an offense and corrects a guard clause that is a ternary operator 185s accepts a guard clause that is after multiline heredoc 185s registers and corrects when using guard clause is after `rubocop:disable` comment 185s registers an offense and corrects when using `and return` before guard condition 185s accepts using guard clause is after `rubocop:enable` comment 185s accepts multiple guard clauses 185s does not register an offense when there are multiple clauses on the same line 185s registers an offense and corrects a next guard clause not followed by empty line when guard clause is after heredoc including string interpolation 185s registers an offense and corrects a `raise` guard clause not followed by empty line when guard clause is after method call with argument 185s does not register an offense when the clause ends with a semicolon but is followed by a newline 185s 185s RuboCop::Cop::Metrics::AbcSize 185s when Max is 100.321 185s reports size and max as <100, 100, 400> 424.3/100.3 185s when Max is 2 185s accepts two assignments 185s when Max is 1.3 185s reports size and max as <1, 1, 4> 4.24/1.3 185s when Max is 0 185s registers an offense for an assignment of a local variable 185s treats safe navigation method calls like regular method calls + a condition 185s accepts an empty method 185s registers an offense for an if modifier 185s accepts an empty `define_method` 185s registers an offense for a `define_method` 185s registers an offense for complex content including A, B, and C scores 185s registers an offense for an assignment of an element 185s when method is in list of allowed methods 185s when AllowedMethods is enabled 185s does not register an offense when using `define_method` 185s does not register an offense when defining a class method 185s does not register an offense when defining an instance method 185s when AllowedPatterns is enabled 185s does not register an offense when defining an instance method 185s does not register an offense when using `define_method` 186s does not register an offense when defining a class method 186s when CountRepeatedAttributes is `false` 186s does not count repeated attributes 186s when CountRepeatedAttributes is `true` 186s counts repeated attributes 186s Ruby 2.7 186s registers an offense for a `define_method` with numblock 186s when Max is 2.3 186s accepts a total score of 2.24 186s when Max is 1000.3 186s reports size and max as <1000, 1000, 4000> 4243/1000 186s when Max is 10.3 186s reports size and max as <10, 10, 40> 42.43/10.3 186s 186s RuboCop::Formatter::WorstOffendersFormatter 186s #finished 186s when there are many offenses 186s sorts by offense count first and then by cop name 186s 186s RuboCop::Cop::Lint::BigDecimalNew 186s registers an offense and corrects using `BigDecimal.new()` 186s registers an offense and corrects using `::BigDecimal.new()` 186s does not register an offense when using `BigDecimal()` 186s 186s RuboCop::Cop::Lint::InterpolationCheck 186s does not crash for \xff 186s does not register offense for strings in %w() 186s registers an offense and corrects when including interpolation and double quoted string in single quoted string 186s does not register an offense for properly interpolation strings 186s does not register an offense for interpolation in nested strings 186s does not register an offense for interpolation in a regexp 186s registers an offense and corrects for interpolation in single quoted string 186s does not register an offense for an escaped interpolation 186s does not register an offense for escaped crab claws in dstr 186s registers an offense for interpolation in double + single quoted split string 186s registers an offense for interpolation in single quoted split string 186s 186s RuboCop::Cop::Style::DoubleNegation 186s when `EnforcedStyle: allowed_in_returns` 186s registers an offense and corrects for `!!` with complex array at return location 186s does not register an offense for `!!` when return location and using `rescue` and `ensure` 186s registers an offense and corrects for `!!` with single-line hash at return location 186s does not register an offense for `!!` with hash when return location and using `if`, `elsif`, and `else` 186s does not register an offense for `!!` when using `return` keyword 186s does not register an offense for `!!` when return location and using `if`, `elsif`, and `else` 186s does not register an offense for `!!` with array when return location and using `case`, `when`, and `else` 186s registers an offense and corrects for `!!` with array when not return locationand using `case`, `when`, and `else` 186s registers an offense and corrects for `!!` with multi-line array at return location 186s does not register an offense for `!!` when return location and using `ensure` 186s does not register an offense for `!!` when return location and using `unless` 186s registers an offense and corrects for `!!` when not return locationand using `if`, `elsif`, and `else` 186s does not register an offense for ! 186s does not register an offense for `!!` when return location and using `case`, `when`, and `else` 186s registers an offense and corrects for `!!` when not return location and using `unless` 186s does not register an offense for `!!` when return location by `define_method` 186s registers an offense and corrects for `!!` with single-line array at return location 186s does not register an offense for `!!` with array when return location and using `if`, `elsif`, and `else` 186s registers an offense and corrects for `!!` with array when not return locationand using `if`, `elsif`, and `else` 186s registers an offense and corrects for `!!` when not a return location 186s registers an offense and corrects for `!!` 186s does not register an offense for `!!` when return location and using `rescue` 186s does not register an offense for `not not` 186s does not register an offense for `!!` when return location 186s does not register an offense for `!!` when return location by `define_singleton_method` 186s registers an offense and corrects for `!!` when not return locationand using `case`, `when`, and `else` 186s registers an offense and corrects for `!!` with hash when not return locationand using `if`, `elsif`, and `else` 186s registers an offense and corrects for `!!` with multi-line hash at return location 186s registers an offense and corrects for `!!` with hash when not return locationand using `case`, `when`, and `else` 186s does not register an offense for `!!` with hash when return location and using `case`, `when`, and `else` 186s registers an offense and corrects for `!!` with nested hash at return location 186s registers an offense and corrects for `!!` with nested array at return location 186s does not register an offense for `!!` when return location and using `rescue`, `else`, and `ensure` 186s Ruby >= 2.7 186s registers an offense and corrects for `!!` when not return locationand using `case`, `in`, and `else` 186s Ruby >= 2.7 186s does not register an offense for `!!` when return location and using `case`, `in`, and `else` 186s when `EnforcedStyle: forbidden` 186s registers an offense and corrects for `!!` when using `return` keyword 186s does not register an offense for `not not` 186s registers an offense for `!!` when return location and using `rescue` 186s registers an offense for `!!` when return location and using `rescue`, `else`, and `ensure` 186s registers an offense for `!!` when return location and using `rescue` and `ensure` 186s registers an offense and corrects for `!!` when not a return location 186s registers an offense for `!!` when return location and using `ensure` 186s does not register an offense for ! 186s registers an offense and corrects for `!!` when return location 186s registers an offense and corrects for `!!` 186s 186s RuboCop::Cop::Security::IoMethods 186s when using no receiver 186s behaves like accepts 186s does not register an offense when using `binwrite("command", "hi")` 186s behaves like accepts 186s does not register an offense when using `foreach("command") { |x| puts x }` 186s behaves like accepts 186s does not register an offense when using `read("command")` 186s behaves like accepts 186s does not register an offense when using `write("command", "hi")` 186s behaves like accepts 186s does not register an offense when using `readlines("command")` 186s when using `IO` receiver and variable argument 186s registers and corrects an offense when using `foreach` 186s behaves like offense 186s registers and corrects an offense when using `write` 186s behaves like offense 186s registers and corrects an offense when using `binwrite` 186s behaves like offense 186s registers and corrects an offense when using `binread` 186s behaves like offense 186s registers and corrects an offense when using `readlines` 186s behaves like offense 186s registers and corrects an offense when using `read` 186s when using `IO` receiver and string argument that starts with a pipe character (`"| command"`) 186s behaves like accepts 186s does not register an offense when using `IO.readlines("| command")` 186s behaves like accepts 186s does not register an offense when using `IO.foreach("| command") { |x| puts x }` 186s behaves like accepts 186s does not register an offense when using `IO.write("| command", "hi")` 186s behaves like accepts 186s does not register an offense when using `IO.read("| command")` 186s behaves like accepts 186s does not register an offense when using `IO.binwrite("| command", "hi")` 186s when using `IO` receiver and string argument that starts with a pipe character (`" | command"`) 186s behaves like accepts 186s does not register an offense when using `IO.write(" | command", "hi")` 186s behaves like accepts 186s does not register an offense when using `IO.read(" | command")` 186s behaves like accepts 186s does not register an offense when using `IO.binwrite(" | command", "hi")` 186s behaves like accepts 186s does not register an offense when using `IO.readlines(" | command")` 186s behaves like accepts 186s does not register an offense when using `IO.foreach(" | command") { |x| puts x }` 186s when using `IO` receiver and string argument 186s registers and corrects an offense when using `foreach` 186s behaves like offense 186s registers and corrects an offense when using `write` 186s behaves like offense 186s registers and corrects an offense when using `read` 186s behaves like offense 186s registers and corrects an offense when using `binwrite` 186s behaves like offense 186s registers and corrects an offense when using `binwrite` 186s behaves like offense 186s registers and corrects an offense when using `readlines` 186s when using `File` receiver 186s behaves like accepts 186s does not register an offense when using `File.binread(path)` 186s behaves like accepts 186s does not register an offense when using `File.foreach(path) { |x| puts x }` 186s behaves like accepts 186s does not register an offense when using `File.read(path)` 186s behaves like accepts 186s does not register an offense when using `File.readlines(path)` 186s behaves like accepts 186s does not register an offense when using `File.binwrite(path, "hi")` 186s 186s RuboCop::Cop::Style::EmptyLiteral 186s Empty Array 186s does not register an offense for ::Array.new with block 186s registers an offense for Array.new 186s registers an offense for ::Array.new 186s does not register an offense Array.new with block 186s autocorrects Array.new in block in block 186s does not register Array.new with block in other block 186s does not register an offense for Array.new(3) 186s registers an offense for Array.new() 186s Empty Hash 186s autocorrects Hash.new to {} and wraps all arguments in parentheses when it is the first argument to super 186s does not register an offense for Hash.new { block } 186s does not register an offense for Hash.new(3) 186s autocorrects Hash.new to {} as the only parameter to a method 186s registers an offense for Hash.new 186s does not register an offense for ::Hash.new(3) 186s registers an offense for Hash.new() 186s autocorrects Hash.new in block 186s autocorrects Hash.new to {} in various contexts 186s does not register an offense for ::Hash.new { block } 186s autocorrects Hash.new to {} as the first parameter to a method 186s autocorrects Hash.new to {} and wraps it in parentheses when it is the only argument to super 186s registers an offense for ::Hash.new 186s Ruby 2.7 186s does not register an offense for Hash.new { _1[_2] = [] } 186s does not register an offense for ::Hash.new { _1[_2] = [] } 186s Empty String 186s registers an offense for String.new 186s registers an offense for String.new() 186s does not register an offense for ::String.new("top") 186s does not register an offense for String.new("top") 186s registers an offense for ::String.new 186s when Style/FrozenStringLiteral is enabled 186s and there is no magic comment 186s does not register an offense 186s and there is a frozen_string_literal: false comment 186s registers an offense and corrects 186s when double-quoted string literals are preferred 186s registers an offense for ::String.new 186s registers an offense for String.new 186s when frozen string literals is enabled 186s does not register an offense for String.new 186s 186s RuboCop::Cop::Style::Strip 186s registers an offense for str.rstrip.lstrip 186s registers an offense for str.lstrip.rstrip 186s 186s RuboCop::Cop::Offense 186s does not blow up if a message contains % 186s overrides #to_s 186s redefines == to compare offenses based on their contents 186s is frozen 186s has a few required attributes 186s #location 186s is frozen 186s #severity_level 186s when severity is :fatal 186s is 6 186s when severity is :info 186s is 1 186s when severity is :refactor 186s is 2 186s offenses that span part of a line 186s highlights the first line 186s #severity 186s is frozen 186s when unknown severity is passed 186s raises error 186s offenses that span multiple lines 186s highlights the first line 186s #<=> 186s when receiver has {:line=>5, :col=>6} and other has {:line=>5, :col=>5} 186s returns 1 186s when receiver has {} and other has {} 186s returns 0 186s when receiver has {:line=>6} and other has {:line=>5} 186s returns 1 186s when receiver has {:line=>6, :col=>4} and other has {:line=>5, :col=>5} 186s returns 1 186s when receiver has {:line=>6, :cop=>"A"} and other has {:line=>5, :cop=>"B"} 186s returns 1 186s when receiver has {:col=>6, :cop=>"A"} and other has {:col=>5, :cop=>"B"} 186s returns 1 186s when receiver has {:cop=>"B"} and other has {:cop=>"A"} 186s returns 1 186s #cop_name 186s is frozen 186s when the location is pseudo 186s returns a line 186s returns a location with valid size and length 186s returns a source line 186s returns a column 186s returns a column length 186s returns a real column 186s returns the last column 186s returns the first line 186s returns a column range 186s returns the last line 186s #message 186s is frozen 186s 186s RuboCop::Cop::Lint::LiteralAsCondition 186s registers an offense for literal [1] in && 186s registers an offense for literal [1] in complex ! 186s registers an offense for literal 1 in a when of a case without anything after case keyword 186s registers an offense for literal :sym in until 186s accepts literal [1] in a when of a case with something after case keyword 186s registers an offense for literal 1 in case 186s registers an offense for case with a primitive array condition 186s registers an offense for literal {} in ! 186s accepts literal :"#{a}" in non-toplevel and/or 186s accepts literal 2.0 if it's not an and/or operand 186s registers an offense for literal 2.0 in && 186s registers an offense for literal 1 in && 186s registers an offense for literal :sym in post-loop until 186s registers an offense for literal :sym in if 186s registers an offense for literal 1 in complex cond 186s registers an offense for literal :"#{a}" in case 186s registers an offense for literal 2.0 in case 186s registers an offense for literal :sym in a when of a case without anything after case keyword 186s registers an offense for literal 2.0 in if 186s accepts literal [1] in non-toplevel and/or 186s accepts `true` literal in post-loop `while` 186s registers an offense for literal [1] in while 186s registers an offense for literal {} in if 186s accepts literal 1 in non-toplevel and/or 186s registers an offense for `not 2.0` 186s registers an offense for literal {} in post-loop while 186s registers an offense for literal 1 in if 186s accepts `false` literal in `until` 186s accepts literal 1 in a when of a case with something after case keyword 186s accepts dstr literal in case 186s accepts literal :"#{a}" if it's not an and/or operand 186s accepts literal {} in non-toplevel and/or 186s registers an offense for `!1` 186s accepts literal :"#{a}" in a when of a case with something after case keyword 186s registers an offense for literal {} in a when of a case without anything after case keyword 186s registers an offense for literal 2.0 in post-loop while 186s registers an offense for literal [1] in post-loop while 186s registers an offense for `!2.0` 186s registers an offense for literal {} in && 186s registers an offense for literal :sym in && 186s registers an offense for literal {} in complex cond 186s registers an offense for literal :sym in while 186s registers an offense for literal :"#{a}" in ! 186s accepts `true` literal in `while` 186s registers an offense for `not {}` 186s registers an offense for `not [1]` 186s registers an offense for literal :sym in post-loop while 186s registers an offense for `not :"#{a}"` 186s registers an offense for literal 1 in ! 186s registers an offense for literal :"#{a}" in post-loop while 186s registers an offense for `not 1` 186s accepts literal 2.0 in a when of a case with something after case keyword 186s registers an offense for literal 1 in post-loop until 186s accepts `false` literal in post-loop `until` 186s registers an offense for literal 2.0 in post-loop until 186s registers an offense for literal [1] in if 186s registers an offense for literal 2.0 in until 186s registers an offense for literal :"#{a}" in a when of a case without anything after case keyword 186s registers an offense for literal {} in post-loop until 186s registers an offense for literal :"#{a}" in if 186s registers an offense for literal :"#{a}" in complex ! 186s registers an offense for `!:"#{a}"` 186s accepts array literal in case, if it has nested non-literal element 186s registers an offense for `![1]` 186s registers an offense for literal [1] in case 186s accepts array literal in case, if it has non-literal elements 186s registers an offense for literal :"#{a}" in && 186s accepts literal :sym in non-toplevel and/or 186s registers an offense for literal :sym in ! 186s registers an offense for literal 1 in while 186s registers an offense for literal 2.0 in while 186s accepts literal [1] if it's not an and/or operand 186s registers an offense for literal 2.0 in ! 186s registers an offense for `not :sym` 186s registers an offense for literal :sym in complex ! 186s registers an offense for literal 2.0 in complex ! 186s registers an offense for literal :sym in complex cond 186s registers an offense for literal [1] in ! 186s registers an offense for `!{}` 186s registers an offense for `!:sym` 186s accepts literal 2.0 in non-toplevel and/or 186s registers an offense for literal {} in complex ! 186s registers an offense for literal [1] in complex cond 186s registers an offense for literal 2.0 in a when of a case without anything after case keyword 186s accepts literal :sym in a when of a case with something after case keyword 186s registers an offense for literal 2.0 in complex cond 186s accepts literal {} in a when of a case with something after case keyword 186s registers an offense for literal :"#{a}" in post-loop until 186s registers an offense for literal 1 in complex ! 186s registers an offense for literal {} in case 186s registers an offense for literal [1] in until 186s registers an offense for literal :"#{a}" in complex cond 186s registers an offense for literal [1] in post-loop until 186s registers an offense for literal :sym in case 186s registers an offense for literal :"#{a}" in until 186s registers an offense for literal 1 in post-loop while 186s accepts literal {} if it's not an and/or operand 186s accepts literal 1 if it's not an and/or operand 186s registers an offense for literal :"#{a}" in while 186s registers an offense for literal [1] in a when of a case without anything after case keyword 186s registers an offense for literal 1 in until 186s accepts literal :sym if it's not an and/or operand 186s registers an offense for literal {} in while 186s registers an offense for literal {} in until 186s >= Ruby 2.7 187s registers an offense for literal :"#{a}" in case match without a match var 187s accepts an offense for literal :"#{a}" in case match with a match var 187s accepts literal :"#{a}" in a when of a case match 187s >= Ruby 2.7 187s accepts dstr literal in case match 187s accepts array literal in case match, if it has nested non-literal element 187s accepts an offense for case match with a match var 187s registers an offense for case match with a primitive array condition 187s accepts array literal in case match, if it has non-literal elements 187s >= Ruby 2.7 187s accepts literal :sym in a when of a case match 187s accepts an offense for literal :sym in case match with a match var 187s registers an offense for literal :sym in case match without a match var 187s >= Ruby 2.7 187s registers an offense for literal 2.0 in case match without a match var 187s accepts an offense for literal 2.0 in case match with a match var 187s accepts literal 2.0 in a when of a case match 187s >= Ruby 2.7 187s accepts literal [1] in a when of a case match 187s registers an offense for literal [1] in case match without a match var 187s accepts an offense for literal [1] in case match with a match var 187s >= Ruby 2.7 187s accepts literal 1 in a when of a case match 187s accepts an offense for literal 1 in case match with a match var 187s registers an offense for literal 1 in case match without a match var 187s >= Ruby 2.7 187s accepts an offense for literal {} in case match with a match var 187s accepts literal {} in a when of a case match 187s registers an offense for literal {} in case match without a match var 187s 187s RuboCop::CLI 187s can process a file with an invalid UTF-8 byte sequence 187s registers an offense for Parser warnings 187s registers an offense for a syntax error 187s checks a given file with faults and returns 1 187s does not register any offenses for an empty file 187s finds a file with no .rb extension but has a shebang line 187s when parallel static by default 187s when setting `UseCache: true` 187s fails with an error message 187s when setting `UseCache: false` 187s fails with an error message 187s when specifying `--debug` and `-a` options` 188s uses parallel inspection when correcting the file 188s when specifying `--debug` option only` 188s fails with an error message 188s rubocop:disable comment 188s can disable all cops in a code section 188s can disable selected cops in a code section 188s can disable all cops on a single line 188s can disable selected cops on a single line 188s Specify `--init` option to `rubocop` command 188s when .rubocop.yml does not exist 188s generate a .rubocop.yml file 188s when .rubocop.yml already exists 188s fails with an error message 188s without using namespace 189s can disable selected cops on a single line but prints a warning 189s when --autocorrect-all is given 189s does not trigger RedundantCopDisableDirective due to lines moving around 189s when not necessary 189s causes an offense to be reported 189s and RedundantCopDisableDirective is individually excluded 189s does not report RedundantCopDisableDirective offenses 189s when using `rubocop:disable` line comment for `Style/RedundantInitialize` 189s does not register an offense for `Lint/RedundantCopDisableDirective` 189s and RedundantCopDisableDirective is individually disabled 189s does not report RedundantCopDisableDirective offenses 189s when using `rubocop:disable` line comment for `Lint/EmptyBlock` 189s does not register an offense for `Lint/RedundantCopDisableDirective` 189s and RedundantCopDisableDirective is disabled through department 190s does not report RedundantCopDisableDirective offenses 190s and there are no other offenses 190s exits with error code 190s obsolete cops 190s when configuration for TrailingComma is given 190s fails with an error message 190s configuration of `AutoCorrect` 190s when setting `AutoCorrect: false` for `Style/StringLiterals` 190s does not suggest `1 offense autocorrectable` for `Style/StringLiterals` 190s for a disabled cop 190s reports no offense when enabled on part of a file 190s when checking a correct file 190s returns 0 190s when super is used with a block 190s still returns 0 190s when lines end with CR+LF 190s reports an offense 190s cops can exclude files based on config 191s ignores excluded files 191s style guide only usage 191s via the cli option 191s --only-guide-cops 191s skips cops that have no link to a style guide 191s runs cops for rules that link to a style guide 191s overrides configuration of AllCops/StyleGuideCopsOnly 191s via the config 191s AllCops/DisabledByDefault 191s when it is true 191s runs only the cop configured in .rubocop.yml 191s when it is false 191s runs all cops that are enabled in default configuration 191s AllCops/StyleGuideCopsOnly 191s when it is false 191s runs cops for rules regardless of any link to the style guide 191s when it is true 191s skips cops that have no link to a style guide 191s configuration from file 192s only reads configuration in explicitly included hidden directories 192s works when a configuration file specifies Severity for Metrics/ParameterLists and Layout/LineLength 192s can exclude a vendor directory indirectly 192s displays cop names if DisplayCopNames is false 192s ignores excluded files 192s prefers a config file in ancestor directory to another in home 192s works when a configuration file specifies Severity for Metrics/ParameterLists and Layout 192s can disable parser-derived offenses with warning severity 193s allows the default configuration file as the -c argument 193s prints an error message for an unrecognized EnforcedStyle 193s finds included files 193s does not consider Include parameters in subdirectories 193s works when a configuration file passed by -c specifies Exclude with regexp 193s displays style guide URLs if DisplayStyleGuide is true 193s fails when a configuration file specifies an invalid Severity 193s prints an error for an unrecognized cop name in .rubocop.yml 193s can be configured to merge a parameter that is a hash 194s matches included/excluded files correctly when . argument is given 194s can be configured with option to disable a certain error 194s can have different config files in different directories 194s can be configured with project config to disable a certain error 194s shows an error if the input file cannot be found 194s works when a configuration file passed by -c specifies Exclude with strings 194s fails when a configuration file has invalid YAML syntax 194s does not read files in excluded list 194s can exclude a vendor directory with an erroneous config file 194s can be configured to override a parameter that is a hash in a special case 195s works when a cop that others depend on is disabled 195s can use an alternative max line length from a config file 195s can exclude directories relative to .rubocop.yml 195s runs without errors for an unrecognized cop name in .rubocop.yml and `--ignore-unrecognized-cops` option is given 195s uses the DefaultFormatter if another formatter is not specified 195s prints a warning for an unrecognized configuration parameter 195s excludes the vendor directory by default 195s can exclude a typical vendor directory 195s cannot disable Syntax offenses 195s when a value in a hash is overridden with nil 196s acts as if the key/value pair was removed 196s when configured for indented_internal_methods style indentation 196s accepts indented_internal_methods style indentation 196s registers offense for normal indentation in class 196s registers offense for normal indentation in module 196s when obsolete MultiSpaceAllowedForOperators param is used 196s displays a warning 196s when a file inherits from a higher level 196s inherits relative excludes correctly 196s when MultilineMethodCallIndentation is used with aligned style and IndentationWidth parameter 196s fails with an error message 196s without using namespace 196s can be configured with option to disable a certain error 196s when MultilineOperationIndentation is used with aligned style and IndentationWidth parameter 197s fails with an error message 197s when configuration is taken from $HOME/.rubocop.yml 197s handles relative excludes correctly when run from project root 197s when --force-default-config option is specified 197s when no config file specified 197s ignores config file 197s when config file specified with -c 197s ignores config file 197s when a directory is named `*` 197s does not crash 197s when interrupted 197s returns 130 197s when given a file/directory that is not under the current dir 197s and the directory is relative 197s checks a Rakefile but Style/FileName does not report 197s and the directory is absolute 197s checks a Rakefile but Style/FileName does not report 197s and the Rakefile path is relative 198s checks a Rakefile but Style/FileName does not report 198s and the Rakefile path is absolute 198s checks a Rakefile but Style/FileName does not report 198s info severity 198s when there are not only info offenses 198s returns a 1 code 198s when given `--fail-level info` 198s returns a 1 code 198s when given `--display-only-fail-level-offenses` 198s returns a 0 code but does not list offenses 198s when `Lint/Syntax` is given `Severity: info` 198s is an invalid configuration 198s when there are only info offenses 198s returns a 0 code 198s configuration of `require` 198s unknown library is specified 198s exits with 2 198s unknown cop 198s in configuration file is given 198s prints the error and exists with code 2 198s when errors are raised while processing files due to bugs 198s displays an error message to stderr 198s configuration of target Ruby versions 198s when configured with an unsupported ruby 198s fails with an error message 198s when configured with an unknown version 199s fails with an error message 199s 199s RuboCop::Cop::Layout::FirstArrayElementIndentation 199s when array is method argument 199s and argument are not surrounded by parentheses 199s accepts single line array with brackets 199s registers an offense and corrects incorrectly indented multi-line array with brackets 199s accepts a correctly indented multi-line array with brackets 199s accepts bracketless array 199s registers an offense for incorrectly indented multi-line array that is the value of a single pair hash 199s 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 199s accepts indent based on the left bracket when the outer hash key and the left bracket is not on the same line 199s 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 199s and arguments are surrounded by parentheses 199s and EnforcedStyle is special_inside_parentheses 199s 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 199s registers an offense and corrects 'align_brackets' indentation 199s accepts indent based on the preceding left parenthesis when the right bracket and its following pair is on the same line 199s accepts special indentation for first argument 199s accepts special indentation for second argument 199s registers an offense for incorrectly indented multi-line array that is the value of a single pair hash 199s accepts indent based on the left brace when the outer hash key and the left bracket is not on the same line 199s registers an offense and corrects 'consistent' indentation 199s accepts normal indentation for array within array 199s when using safe navigation operator 199s registers an offense and corrects 'consistent' indentation 199s and EnforcedStyle is consistent 199s 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 199s 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 199s accepts normal indentation for second argument 199s accepts indent based on the left brace when the outer hash key and the left bracket is not on the same line 199s accepts normal indentation for first argument 199s registers an offense for incorrectly indented multi-line array that is the value of a single pair hash 199s registers an offense and corrects incorrect indentation 199s when array is operand 199s registers an offense and corrects incorrectly indented ] 199s registers an offense and corrects incorrectly indented first element 199s accepts correctly indented first element 199s when indentation width is overridden for this cop 199s registers an offense and corrects incorrectly indented 1st element 199s accepts correctly indented first element 199s when array is right hand side in assignment 199s accepts an empty array 199s accepts a first element on the same line as the left bracket 199s accepts several elements per line 199s accepts multi-assignments with brackets 199s accepts single line array 199s registers an offense and corrects incorrectly indented first element 199s accepts correctly indented first element 199s accepts multi-assignments with no brackets 199s when array is argument to setter 199s registers an offense and corrects incorrectly indented first element 199s accepts correctly indented first element 199s when EnforcedStyle is align_brackets 199s accepts multi-assignments with brackets 199s registers an offense and corrects incorrectly indented ] 199s accepts several elements per line 199s accepts single line array 199s accepts multi-assignments with no brackets 199s accepts an empty array 199s accepts a first element on the same line as the left bracket 199s accepts correctly indented first element 199s when 'consistent' style is used 199s registers an offense and corrects incorrect indentation 199s registers an offense and corrects incorrectly indented 1st element 199s when indentation width is overridden for this cop 199s accepts correctly indented first element 199s registers an offense and corrects indentation that does not match IndentationWidth 199s when 'special_inside_parentheses' style is used 199s registers an offense and corrects incorrect indentation 199s 199s RuboCop::Cop::Style::RedundantBegin 199s does not register an offense when using `begin` for or assignment and method call 199s does not register an offense when using `begin` with multiple statement for or assignment 199s reports an offense for single line def with redundant begin block 199s reports an offense when assigning nested `begin` blocks 199s registers and corrects an offense when using `begin` with single statement for or assignment 199s registers and corrects an offense when using multi-line `if` in `begin` block 199s registers and corrects an offense when using `begin` with single statement that called a block for or assignment 199s does not register an offense when using `begin` for logical operator conditions 199s registers and corrects an offense when using modifier `if` single statement in `begin` block 199s reports an offense when multi-line `begin` block has single statement and it is inside condition 199s reports an offense for defs with redundant begin block 199s autocorrects when there are trailing comments 199s registers an offense and corrects when using `begin` without `rescue` or `ensure` 199s does not register an offense when using `begin` for semantic operator conditions 199s does not register an offense when using `begin` for assignment 199s reports an offense for def with redundant begin block 199s reports an offense when one-liner `begin` block has single statement with modifier condition 199s does not register an offense when using `begin` for method argument 199s does not register an offense when using `begin` with `while` 199s does not register an offense when using `begin` with `until` 199s accepts when one-liner `begin` block has multiple statements with modifier condition 199s reports an offense when multi-line `begin` block has single statement with modifier condition 199s accepts a def with a begin block after a statement 199s doesn't modify spacing when autocorrecting 199s accepts when multi-line `begin` block has multiple statements with modifier condition 199s does not register an offense when using `begin` with `rescue` 199s does not register an offense when using `begin` with `ensure` 199s reports an offense when assigning nested blocks which contain `begin` blocks 199s accepts a def with required begin block 199s does not register an offense when using `begin` with no statements for or assignment 199s does not register an offense when using body of `begin` is empty 199s accepts a defs with required begin block 199s Ruby 2.7 199s reports an offense when assigning nested blocks which contain `begin` blocks 199s < Ruby 2.5 199s accepts a do-end block with a begin-end 199s >= ruby 2.5 199s accepts a block with a begin block after a statement 199s registers an offense for a do-end block with redundant begin-end 199s accepts a {} block with a begin-end 199s accepts a stabby lambda with a begin-end 199s accepts super with block 199s when using endless method definition 199s accepts when `begin` block has multiple statements 199s registers when `begin` block has a single statement 199s accepts when `begin` block has no statements 199s 199s RuboCop::Cop::Lint::RedundantWithIndex 199s registers an offense when using `ary.each_with_object([]).with_index { |v| v }` and corrects to `ary.each_with_object([]) { |v| v }` 199s accepts an index is used as a block argument 199s registers an offense for `ary.each_with_index { |v| v }` and corrects to `ary.each` 199s registers an offense when using `ary.each.with_index { |v| v }` and corrects to `ary.each` 199s registers an offense when using `ary.each.with_index(1) { |v| v }` and correct to `ary.each { |v| v }` 199s Ruby 2.7 199s accepts an index is used as a numblock argument 199s registers an offense when using `ary.each.with_index { _1 }` and corrects to `ary.each` 199s registers an offense for `ary.each_with_index { _1 }` and corrects to `ary.each` 199s 199s RuboCop::Formatter::HTMLFormatter 199s outputs the result in HTML 199s outputs the cached result in HTML 199s 199s RuboCop::Cop::Layout::BeginEndAlignment 199s accepts matching puts 1; begin ... end 199s registers an offense for mismatched begin end and autocorrects 199s accepts matching begin ... end 199s when EnforcedStyleAlignWith is start_of_line 199s accepts matching puts 1; begin ... end 199s accepts matching var = begin ... end 199s registers an offense for mismatched begin end and autocorrects 199s registers an offense for mismatched var << begin end and autocorrects 199s 199s RuboCop::Cop::Style::InlineComment 199s does not register an offense for a standalone comment 199s registers an offense for a trailing inline comment 199s does not register an offense for special rubocop inline comments 199s 199s RuboCop::Cop::Metrics::BlockLength 199s rejects a block with more than 5 lines 199s accepts a block with less than 3 lines 199s reports the correct beginning and end lines 199s does not count blank lines 199s properly counts nested blocks 199s rejects brace blocks too 199s does not count commented lines by default 199s accepts a block with multiline receiver and less than 3 lines of body 199s accepts empty blocks 199s when `CountAsOne` is not empty 199s folds array into one line 199s when defining a module 199s does not register an offense 199s when defining a class 199s does not register an offense 199s when defining a Struct 199s does not register an offense 199s when methods to allow are defined 199s when AllowedPatterns is enabled 199s does not report an offense 199s that does not match 199s reports an offense 199s when AllowedMethods is enabled 199s behaves like allow an offense on an allowed method 199s accepts the foo method with a long block 199s still rejects other methods with long blocks 199s when a method is allowed, but receiver is a module 199s does not report an offense 199s when receiver contains whitespaces 199s allows whitespaces 199s behaves like allow an offense on an allowed method 199s still rejects other methods with long blocks 199s accepts the foo method with a long block 199s when ExcludedMethods is enabled 199s does not report an offense 199s that does not match 199s reports an offense 199s when IgnoredMethods is enabled 199s when string 199s does not report an offense 199s that does not match 199s reports an offense 199s when regex 199s does not report an offense 199s that does not match 199s reports an offense 199s when using numbered parameter 199s reports the correct beginning and end lines 199s does not count blank lines 199s rejects a block with more than 5 lines 199s accepts a block with less than 3 lines 199s when CountComments is enabled 199s also counts commented lines 199s 199s RuboCop::Cop::Lint::RedundantCopEnableDirective 199s registers correct offense when combined with necessary enable 199s registers offense and corrects unnecessary enable 199s registers offense and corrects redundant enabling of same cop 199s registers an offense and corrects when the first cop is unnecessarily enabled 199s registers multiple offenses and corrects the same comment 199s registers correct offense when combined with necessary enable, no white-space after comma 199s all switch 199s registers offense and corrects unnecessary enable all 199s when at least one cop was disabled 199s does not register offense 199s when middle cop is unnecessarily enabled 199s registers an offense and corrects 199s registers an offense and corrects when there is extra white space 199s when cop is disabled in the configuration 199s registers an offense if enabling it twice 199s registers no offense when enabling the cop 199s when last cop is unnecessarily enabled 199s registers an offense and corrects when there is no space between the cops and the comma 199s registers an offense and corrects 199s when all department enabled 199s registers offense and corrects unnecessary enable 199s registers offense and corrects redundant enabling of cop of same department 199s registers offense and corrects redundant enabling of same department 199s registers offense and corrects redundant enabling of department of same cop 199s registers an offense and corrects when the first department is unnecessarily enabled 199s registers multiple offenses and corrects the same comment 199s registers correct offense when combined with necessary enable 199s when all cops are unnecessarily enabled 199s on the same line 199s registers an offense and corrects 199s on separate lines 199s registers an offense and corrects when there is extra white space 199s 199s RuboCop::Cop::Style::SignalException 199s when enforced style is `raise` 199s registers an offense for fail in def body 199s accepts `fail` if a custom `fail` instance method is defined 199s accepts `fail` with explicit receiver 199s registers an offense for fail in begin section 199s accepts `fail` if a custom `fail` singleton method is defined 199s registers an offense for `fail` with `Kernel` as explicit receiver 199s registers an offense for fail in rescue section 199s when enforced style is `semantic` 199s accepts raise in rescue section 199s registers only offense for one raise that should be fail 200s accepts `raise` and `fail` with explicit receiver 200s registers an offense for raise not in a begin/rescue/end 200s is not confused by nested begin/rescue 200s registers an offense for raise in def body 200s registers one offense for each raise 200s registers an offense for fail in def rescue section 200s registers an offense for fail in second rescue 200s registers an offense for `raise` and `fail` with `::Kernel` as explicit receiver 200s registers an offense for `raise` and `fail` with `Kernel` as explicit receiver 200s registers an offense for raise in begin section 200s accepts raise in def rescue section 200s accepts raise in def with multiple rescues 200s registers an offense for fail in rescue section 200s when enforced style is `fail` 200s accepts `raise` with explicit receiver 200s registers an offense for `raise` with `Kernel` as explicit receiver 200s registers an offense for raise in def body 200s registers an offense for raise in begin section 200s registers an offense for raise in rescue section 200s 200s RuboCop::Cop::Lint::UselessTimes 200s registers an offense and corrects with 0.times 200s registers an offense and corrects with 1.times with method chain 200s registers an offense and corrects with 1.times with block arg 200s registers an offense and corrects with 1.times 200s registers an offense and corrects when there is a blank line in the method definition 200s registers an offense and corrects with 0.times with block arg 200s does not register an offense for an integer > 1 200s registers an offense and corrects with negative times with block arg 200s registers an offense and corrects when 1.times with empty block argument 200s registers an offense and corrects with negative times 200s multiline block 200s does not try to correct a block if the block arg is changed in parallel assignment 200s correctly handles a multiline block with 1.times 200s does not try to correct a block if the block arg is changed 200s corrects a block that changes another lvar 200s within indentation 200s corrects properly when removing single line 200s corrects properly when removing multiline 200s corrects properly when replacing 200s inline `Integer#times` calls 200s does not try to correct `1.times` 200s does not try to correct `0.times` 200s short-form method 200s registers an offense and corrects with 1.times 200s does not register an offense for an integer > 1 200s registers an offense and corrects with negative times 200s does not adjust surrounding space 200s registers an offense and corrects with 0.times 200s 200s RuboCop::Cop::Style::ConditionalAssignment 200s counts array assignment when determining multiple assignment 200s allows modifier if inside of if else 200s registers an offense for assignment in ternary operation using strings 200s allows if elsif else with the same assignment only in elsif else 200s registers an offense for assignment in if then elsif then else 200s allows assignment in multiple branches when it is wrapped in a modifier 200s registers an offense for assignment in case with when else 200s allows modifier if 200s allows if elsif else with the same assignment only in if elsif 200s registers an offense for assignment in unless else 200s allows assignment using different operators in if else 200s allows assignment of different variables in case when else 200s allows if elsif else with the same assignment only in if else 200s allows method calls in conditionals 200s registers an offense for assignment in case when then else 200s allows assignment of different variables in if else 200s allows aref assignment with different indices in if..else 200s allows assignment using different operators in if elsif else 200s registers an offense for assignment in if elsif else 200s allows assignment to the result of a ternary operation 200s allows if else without variable assignment 200s registers an offense for assignment in if elsif elsif else 200s autocorrects assignment in if else when the assignment spans multiple lines 200s doesn't crash when assignment statement uses chars which have special meaning in a regex 200s allows method calls in if else 200s registers an offense in an if else if the assignment is already at the line length limit 200s doesn't crash with empty braces 200s allows different assignment types in case with when else 200s allows assignment using different (method) operators in if..else 200s EndAlignment configured to start_of_line 200s autocorrect 200s uses proper end alignment in unless 200s uses proper end alignment in case 200s uses proper end alignment in if 200s empty branch 200s allows if elsif without else 200s allows an empty if statement 200s allows case with an empty else 200s allows an empty when branch with an else 200s allows assignment in case when without an else 200s allows assignment in unless without an else 200s allows assignment in if without an else 200s allows an empty elsif statement 200s behaves like all variable types 200s allows assignment to the return of if else 200s registers an offense assigning any variable type in case when 200s allows assignment to the return of case when 200s allows assignment to the return of a ternary 200s registers an offense assigning any variable type in if else 200s registers an offense assigning any variable type in ternary 200s behaves like all assignment types 200s for a constant lval 200s registers an offense for assignment using *= in ternary 200s for a instance variable lval 200s registers an offense for assignment using *= in ternary 200s for a local variable lval 200s registers an offense for assignment using *= in ternary 200s with end alignment to start_of_line 200s for a global variable lval 200s registers an offense for assignment using *= in if else 200s registers an offense for assignment using *= in case when 200s for a instance variable lval 200s registers an offense for assignment using *= in if else 200s registers an offense for assignment using *= in case when 200s for a class variable lval 200s registers an offense for assignment using *= in if else 200s registers an offense for assignment using *= in case when 200s for a constant lval 200s registers an offense for assignment using *= in case when 200s registers an offense for assignment using *= in if else 200s for a local variable lval 200s registers an offense for assignment using *= in case when 200s registers an offense for assignment using *= in if else 200s for a class variable lval 200s registers an offense for assignment using *= in ternary 200s with end alignment to keyword 200s for a constant lval 200s registers an offense for assignment using *= in case when 200s registers an offense for assignment using *= in if else 200s for a instance variable lval 200s registers an offense for assignment using *= in case when 200s registers an offense for assignment using *= in if else 200s for a class variable lval 200s registers an offense for assignment using *= in case when 200s registers an offense for assignment using *= in if else 200s for a local variable lval 200s registers an offense for assignment using *= in if else 200s registers an offense for assignment using *= in case when 200s for a global variable lval 200s registers an offense for assignment using *= in if else 200s registers an offense for assignment using *= in case when 200s for a global variable lval 200s registers an offense for assignment using *= in ternary 200s configured to check conditions with multiple statements 200s registers an offense for multiple assignment when an earlier assignment is is protected by a modifier 200s allows assignment in multiple branches when it is wrapped in a modifier 200s autocorrect 200s corrects multiple assignment in case when 200s corrects multiple assignment in if elsif else with multiple elsifs 200s corrects assignment in an if statement that is nested in unless else 200s corrects multiple assignment in case when with multiple whens 200s corrects multiple assignment in unless else 200s corrects multiple assignment in if else 200s corrects multiple assignment in if elsif else 200s assignment as the last statement 200s registers an offense in if else with more than variable assignment 200s registers offense for multiple assignments in case when with only one when 200s registers offense for multiple assignment in if elsif elsif else 200s registers an offense for multiple assignment in if elsif else 200s registers offense for multiple assignments in case when with multiple whens 200s registers an offense in case when else with more than variable assignment 200s register an offense for multiple assignment in if else 200s registers an offense in if elsif else with more than variable assignment 200s registers an offense in unless else with more than variable assignment 200s registers an offense in if elsif else with some branches only containing variable assignment and others containing more than variable assignment 200s registers offense for multiple assignment in unless else 200s multiple assignment in only one branch 200s registers an offense when multiple assignment is in elsif 200s registers an offense when multiple assignment is in if 200s registers an offense when multiple assignment is in else 200s behaves like allows out of order multiple assignment in if elsif else 200s allows out of order multiple assignment in if elsif else 200s behaves like comparison methods 200s registers an offense for comparison methods in ternary operations 200s with end alignment to start_of_line 200s corrects comparison methods in case when 200s corrects comparison methods in if elsif else 200s corrects comparison methods in unless else 200s >= Ruby 2.7 200s corrects comparison methods in case in 200s with end alignment to keyword 200s corrects comparison methods in if elsif else 200s corrects comparison methods in case when 200s corrects comparison methods in unless else 200s >= Ruby 2.7 200s corrects comparison methods in case in 200s behaves like all variable types 200s registers an offense assigning any variable type in ternary 200s allows assignment to the return of if else 200s allows assignment to the return of case when 200s allows assignment to the return of a ternary 200s registers an offense assigning any variable type in if else 200s registers an offense assigning any variable type in case when 200s autocorrect 200s corrects =~ in ternary operations 200s preserves comments during correction in if else 200s preserves comments during correction in case when else 200s corrects assignment to unbracketed array in if else 200s aref assignment 200s corrects if..else 200s with different indices 200s doesn't register an offense 200s multiple assignment 200s does not register an offense in if else 200s does not register an offense in case when 200s self.attribute= assignment 200s corrects if..else 200s with different receivers 200s doesn't register an offense 200s constant assignment 200s corrects if..else with namespaced constant 200s corrects if..else with top-level constant 200s assignment from a method 200s corrects case when 200s corrects unless else 200s corrects if else 200s behaves like all variable types 200s allows assignment to the return of a ternary 200s registers an offense assigning any variable type in ternary 200s registers an offense assigning any variable type in if else 200s allows assignment to the return of if else 200s registers an offense assigning any variable type in case when 200s allows assignment to the return of case when 200s behaves like all variable types 200s allows assignment to the return of a ternary 200s registers an offense assigning any variable type in ternary 200s allows assignment to the return of case when 200s allows assignment to the return of if else 200s registers an offense assigning any variable type in case when 200s registers an offense assigning any variable type in if else 200s behaves like all assignment types 200s for a global variable lval 200s registers an offense for assignment using <<= in ternary 200s with end alignment to start_of_line 200s for a local variable lval 200s registers an offense for assignment using <<= in if else 200s registers an offense for assignment using <<= in case when 200s for a instance variable lval 200s registers an offense for assignment using <<= in case when 200s registers an offense for assignment using <<= in if else 200s for a constant lval 200s registers an offense for assignment using <<= in case when 200s registers an offense for assignment using <<= in if else 200s for a class variable lval 200s registers an offense for assignment using <<= in if else 200s registers an offense for assignment using <<= in case when 200s for a global variable lval 200s registers an offense for assignment using <<= in if else 200s registers an offense for assignment using <<= in case when 200s for a local variable lval 200s registers an offense for assignment using <<= in ternary 200s with end alignment to keyword 200s for a local variable lval 200s registers an offense for assignment using <<= in if else 200s registers an offense for assignment using <<= in case when 200s for a global variable lval 200s registers an offense for assignment using <<= in if else 200s registers an offense for assignment using <<= in case when 200s for a instance variable lval 200s registers an offense for assignment using <<= in if else 200s registers an offense for assignment using <<= in case when 200s for a constant lval 200s registers an offense for assignment using <<= in if else 200s registers an offense for assignment using <<= in case when 200s for a class variable lval 200s registers an offense for assignment using <<= in if else 200s registers an offense for assignment using <<= in case when 200s for a instance variable lval 200s registers an offense for assignment using <<= in ternary 200s for a class variable lval 200s registers an offense for assignment using <<= in ternary 200s for a constant lval 200s registers an offense for assignment using <<= in ternary 200s with nested conditionals 200s does not consider branches of nested ifs 200s eventually autocorrects all branches 200s behaves like all assignment types 200s with end alignment to keyword 200s for a class variable lval 200s registers an offense for assignment using |= in case when 200s registers an offense for assignment using |= in if else 200s for a global variable lval 200s registers an offense for assignment using |= in if else 200s registers an offense for assignment using |= in case when 200s for a constant lval 200s registers an offense for assignment using |= in if else 200s registers an offense for assignment using |= in case when 200s for a local variable lval 200s registers an offense for assignment using |= in case when 200s registers an offense for assignment using |= in if else 200s for a instance variable lval 200s registers an offense for assignment using |= in if else 200s registers an offense for assignment using |= in case when 200s for a class variable lval 200s registers an offense for assignment using |= in ternary 200s for a constant lval 200s registers an offense for assignment using |= in ternary 200s for a local variable lval 200s registers an offense for assignment using |= in ternary 200s with end alignment to start_of_line 200s for a local variable lval 200s registers an offense for assignment using |= in case when 200s registers an offense for assignment using |= in if else 200s for a instance variable lval 200s registers an offense for assignment using |= in case when 200s registers an offense for assignment using |= in if else 200s for a class variable lval 200s registers an offense for assignment using |= in if else 200s registers an offense for assignment using |= in case when 200s for a global variable lval 200s registers an offense for assignment using |= in case when 200s registers an offense for assignment using |= in if else 200s for a constant lval 200s registers an offense for assignment using |= in case when 200s registers an offense for assignment using |= in if else 200s for a instance variable lval 200s registers an offense for assignment using |= in ternary 200s for a global variable lval 200s registers an offense for assignment using |= in ternary 200s behaves like else followed by new conditional without else 200s allows if elsif else unless 200s behaves like all assignment types 200s for a constant lval 200s registers an offense for assignment using ||= in ternary 200s for a local variable lval 200s registers an offense for assignment using ||= in ternary 200s for a global variable lval 200s registers an offense for assignment using ||= in ternary 200s with end alignment to keyword 200s for a local variable lval 200s registers an offense for assignment using ||= in case when 200s registers an offense for assignment using ||= in if else 200s for a instance variable lval 200s registers an offense for assignment using ||= in if else 200s registers an offense for assignment using ||= in case when 200s for a global variable lval 200s registers an offense for assignment using ||= in if else 200s registers an offense for assignment using ||= in case when 200s for a constant lval 200s registers an offense for assignment using ||= in case when 200s registers an offense for assignment using ||= in if else 200s for a class variable lval 200s registers an offense for assignment using ||= in case when 200s registers an offense for assignment using ||= in if else 200s for a instance variable lval 200s registers an offense for assignment using ||= in ternary 200s with end alignment to start_of_line 200s for a class variable lval 200s registers an offense for assignment using ||= in case when 200s registers an offense for assignment using ||= in if else 200s for a local variable lval 200s registers an offense for assignment using ||= in case when 200s registers an offense for assignment using ||= in if else 200s for a instance variable lval 200s registers an offense for assignment using ||= in case when 200s registers an offense for assignment using ||= in if else 200s for a constant lval 200s registers an offense for assignment using ||= in if else 200s registers an offense for assignment using ||= in case when 200s for a global variable lval 200s registers an offense for assignment using ||= in if else 200s registers an offense for assignment using ||= in case when 200s for a class variable lval 200s registers an offense for assignment using ||= in ternary 200s behaves like comparison methods 200s registers an offense for comparison methods in ternary operations 200s with end alignment to start_of_line 200s corrects comparison methods in if elsif else 200s corrects comparison methods in unless else 200s corrects comparison methods in case when 200s >= Ruby 2.7 200s corrects comparison methods in case in 200s with end alignment to keyword 200s corrects comparison methods in unless else 200s corrects comparison methods in case when 200s corrects comparison methods in if elsif else 200s >= Ruby 2.7 200s corrects comparison methods in case in 200s behaves like comparison methods 200s registers an offense for comparison methods in ternary operations 200s with end alignment to start_of_line 200s corrects comparison methods in case when 201s corrects comparison methods in if elsif else 201s corrects comparison methods in unless else 201s >= Ruby 2.7 201s corrects comparison methods in case in 201s with end alignment to keyword 201s corrects comparison methods in unless else 201s corrects comparison methods in if elsif else 201s corrects comparison methods in case when 201s >= Ruby 2.7 201s corrects comparison methods in case in 201s assignment as the last statement 201s allows more than variable assignment in if elsif else 201s allows multiple assignment in case when else when the last assignment is the same and the earlier assignments do not appear in all branches 201s allows more than variable assignment in if else 201s allows variable assignment in case when else with more than variable assignment 201s allows multiple assignment in case statements when the last assignment is the same and the earlier assignments do not appear in all branches 201s allows assignment in if elsif else with some branches only containing variable assignment and others containing more than variable assignment 201s allows multiple assignment in if elsif elsif else 201s allows multiple assignment in if else 201s allows multiple assignment in if elsif else when the last assignment is the same and the earlier assignments do not appear in all branches 201s allows multiple assignment in if elsif else 201s allows multiple assignments in case when if there are uniq variables in the when branches 201s allows variable assignment in unless else with more than variable assignment 201s allows multiple assignment in unless else 201s allows multiple assignments in case when with only one when 201s allows multiple assignments in case when with multiple whens 201s behaves like allows out of order multiple assignment in if elsif else 201s allows out of order multiple assignment in if elsif else 201s multiple assignment in only one branch 201s allows multiple assignment is in elsif 201s does not register an offense when multiple assignment is in else 201s allows multiple assignment is in if 201s behaves like comparison methods 201s registers an offense for comparison methods in ternary operations 201s with end alignment to keyword 201s corrects comparison methods in case when 201s corrects comparison methods in unless else 201s corrects comparison methods in if elsif else 201s >= Ruby 2.7 201s corrects comparison methods in case in 201s with end alignment to start_of_line 201s corrects comparison methods in unless else 201s corrects comparison methods in case when 201s corrects comparison methods in if elsif else 201s >= Ruby 2.7 201s corrects comparison methods in case in 201s behaves like all assignment types 201s for a instance variable lval 201s registers an offense for assignment using %= in ternary 201s for a constant lval 201s registers an offense for assignment using %= in ternary 201s with end alignment to start_of_line 201s for a constant lval 201s registers an offense for assignment using %= in if else 201s registers an offense for assignment using %= in case when 201s for a global variable lval 201s registers an offense for assignment using %= in case when 201s registers an offense for assignment using %= in if else 201s for a local variable lval 201s registers an offense for assignment using %= in case when 201s registers an offense for assignment using %= in if else 201s for a instance variable lval 201s registers an offense for assignment using %= in if else 201s registers an offense for assignment using %= in case when 201s for a class variable lval 201s registers an offense for assignment using %= in case when 201s registers an offense for assignment using %= in if else 201s with end alignment to keyword 201s for a local variable lval 201s registers an offense for assignment using %= in if else 201s registers an offense for assignment using %= in case when 201s for a global variable lval 201s registers an offense for assignment using %= in if else 201s registers an offense for assignment using %= in case when 201s for a instance variable lval 201s registers an offense for assignment using %= in case when 201s registers an offense for assignment using %= in if else 201s for a class variable lval 201s registers an offense for assignment using %= in case when 201s registers an offense for assignment using %= in if else 201s for a constant lval 201s registers an offense for assignment using %= in case when 201s registers an offense for assignment using %= in if else 201s for a local variable lval 201s registers an offense for assignment using %= in ternary 201s for a class variable lval 201s registers an offense for assignment using %= in ternary 201s for a global variable lval 201s registers an offense for assignment using %= in ternary 201s behaves like comparison methods 201s registers an offense for comparison methods in ternary operations 201s with end alignment to keyword 201s corrects comparison methods in if elsif else 201s corrects comparison methods in case when 201s corrects comparison methods in unless else 201s >= Ruby 2.7 201s corrects comparison methods in case in 201s with end alignment to start_of_line 201s corrects comparison methods in case when 201s corrects comparison methods in if elsif else 201s corrects comparison methods in unless else 201s >= Ruby 2.7 201s corrects comparison methods in case in 201s behaves like comparison methods 201s registers an offense for comparison methods in ternary operations 201s with end alignment to keyword 201s corrects comparison methods in unless else 201s corrects comparison methods in if elsif else 201s corrects comparison methods in case when 201s >= Ruby 2.7 201s corrects comparison methods in case in 201s with end alignment to start_of_line 201s corrects comparison methods in case when 201s corrects comparison methods in unless else 201s corrects comparison methods in if elsif else 201s >= Ruby 2.7 201s corrects comparison methods in case in 201s behaves like all assignment types 201s for a instance variable lval 201s registers an offense for assignment using &= in ternary 201s for a constant lval 201s registers an offense for assignment using &= in ternary 201s with end alignment to start_of_line 201s for a class variable lval 201s registers an offense for assignment using &= in if else 201s registers an offense for assignment using &= in case when 201s for a instance variable lval 201s registers an offense for assignment using &= in case when 201s registers an offense for assignment using &= in if else 201s for a local variable lval 201s registers an offense for assignment using &= in case when 201s registers an offense for assignment using &= in if else 201s for a global variable lval 201s registers an offense for assignment using &= in if else 201s registers an offense for assignment using &= in case when 201s for a constant lval 201s registers an offense for assignment using &= in if else 201s registers an offense for assignment using &= in case when 201s for a local variable lval 201s registers an offense for assignment using &= in ternary 201s for a class variable lval 201s registers an offense for assignment using &= in ternary 201s for a global variable lval 201s registers an offense for assignment using &= in ternary 201s with end alignment to keyword 201s for a class variable lval 201s registers an offense for assignment using &= in case when 201s registers an offense for assignment using &= in if else 201s for a instance variable lval 201s registers an offense for assignment using &= in if else 201s registers an offense for assignment using &= in case when 201s for a constant lval 201s registers an offense for assignment using &= in if else 201s registers an offense for assignment using &= in case when 201s for a global variable lval 201s registers an offense for assignment using &= in if else 201s registers an offense for assignment using &= in case when 201s for a local variable lval 201s registers an offense for assignment using &= in if else 201s registers an offense for assignment using &= in case when 201s behaves like all assignment types 201s for a constant lval 201s registers an offense for assignment using ^= in ternary 201s with end alignment to keyword 201s for a local variable lval 201s registers an offense for assignment using ^= in if else 201s registers an offense for assignment using ^= in case when 201s for a global variable lval 201s registers an offense for assignment using ^= in case when 201s registers an offense for assignment using ^= in if else 201s for a instance variable lval 201s registers an offense for assignment using ^= in case when 201s registers an offense for assignment using ^= in if else 201s for a class variable lval 201s registers an offense for assignment using ^= in if else 201s registers an offense for assignment using ^= in case when 201s for a constant lval 201s registers an offense for assignment using ^= in if else 201s registers an offense for assignment using ^= in case when 201s with end alignment to start_of_line 201s for a class variable lval 201s registers an offense for assignment using ^= in case when 201s registers an offense for assignment using ^= in if else 201s for a global variable lval 201s registers an offense for assignment using ^= in case when 201s registers an offense for assignment using ^= in if else 201s for a local variable lval 201s registers an offense for assignment using ^= in case when 201s registers an offense for assignment using ^= in if else 201s for a constant lval 201s registers an offense for assignment using ^= in case when 201s registers an offense for assignment using ^= in if else 201s for a instance variable lval 201s registers an offense for assignment using ^= in if else 201s registers an offense for assignment using ^= in case when 201s for a global variable lval 201s registers an offense for assignment using ^= in ternary 201s for a local variable lval 201s registers an offense for assignment using ^= in ternary 201s for a class variable lval 201s registers an offense for assignment using ^= in ternary 201s for a instance variable lval 201s registers an offense for assignment using ^= in ternary 201s behaves like all assignment types 201s for a global variable lval 201s registers an offense for assignment using **= in ternary 201s for a local variable lval 201s registers an offense for assignment using **= in ternary 201s for a instance variable lval 201s registers an offense for assignment using **= in ternary 201s for a constant lval 201s registers an offense for assignment using **= in ternary 201s with end alignment to start_of_line 201s for a constant lval 201s registers an offense for assignment using **= in if else 201s registers an offense for assignment using **= in case when 201s for a local variable lval 201s registers an offense for assignment using **= in case when 201s registers an offense for assignment using **= in if else 201s for a class variable lval 201s registers an offense for assignment using **= in if else 201s registers an offense for assignment using **= in case when 201s for a instance variable lval 201s registers an offense for assignment using **= in if else 201s registers an offense for assignment using **= in case when 201s for a global variable lval 201s registers an offense for assignment using **= in case when 201s registers an offense for assignment using **= in if else 201s for a class variable lval 201s registers an offense for assignment using **= in ternary 201s with end alignment to keyword 201s for a class variable lval 201s registers an offense for assignment using **= in if else 201s registers an offense for assignment using **= in case when 201s for a constant lval 201s registers an offense for assignment using **= in if else 201s registers an offense for assignment using **= in case when 201s for a instance variable lval 201s registers an offense for assignment using **= in case when 201s registers an offense for assignment using **= in if else 201s for a local variable lval 201s registers an offense for assignment using **= in case when 201s registers an offense for assignment using **= in if else 201s for a global variable lval 201s registers an offense for assignment using **= in case when 201s registers an offense for assignment using **= in if else 201s behaves like all assignment types 201s for a instance variable lval 201s registers an offense for assignment using >>= in ternary 201s with end alignment to start_of_line 201s for a class variable lval 201s registers an offense for assignment using >>= in case when 201s registers an offense for assignment using >>= in if else 201s for a global variable lval 201s registers an offense for assignment using >>= in case when 201s registers an offense for assignment using >>= in if else 201s for a local variable lval 201s registers an offense for assignment using >>= in case when 201s registers an offense for assignment using >>= in if else 201s for a constant lval 201s registers an offense for assignment using >>= in case when 201s registers an offense for assignment using >>= in if else 201s for a instance variable lval 201s registers an offense for assignment using >>= in case when 201s registers an offense for assignment using >>= in if else 201s for a global variable lval 201s registers an offense for assignment using >>= in ternary 201s with end alignment to keyword 201s for a constant lval 201s registers an offense for assignment using >>= in case when 201s registers an offense for assignment using >>= in if else 201s for a local variable lval 201s registers an offense for assignment using >>= in if else 201s registers an offense for assignment using >>= in case when 201s for a global variable lval 201s registers an offense for assignment using >>= in if else 201s registers an offense for assignment using >>= in case when 201s for a instance variable lval 201s registers an offense for assignment using >>= in if else 201s registers an offense for assignment using >>= in case when 201s for a class variable lval 201s registers an offense for assignment using >>= in if else 201s registers an offense for assignment using >>= in case when 201s for a constant lval 201s registers an offense for assignment using >>= in ternary 201s for a class variable lval 201s registers an offense for assignment using >>= in ternary 201s for a local variable lval 201s registers an offense for assignment using >>= in ternary 201s behaves like all assignment types 201s for a global variable lval 201s registers an offense for assignment using /= in ternary 201s for a instance variable lval 201s registers an offense for assignment using /= in ternary 201s for a class variable lval 201s registers an offense for assignment using /= in ternary 201s for a constant lval 201s registers an offense for assignment using /= in ternary 201s with end alignment to start_of_line 201s for a local variable lval 201s registers an offense for assignment using /= in if else 201s registers an offense for assignment using /= in case when 201s for a constant lval 201s registers an offense for assignment using /= in if else 201s registers an offense for assignment using /= in case when 201s for a class variable lval 201s registers an offense for assignment using /= in if else 201s registers an offense for assignment using /= in case when 201s for a instance variable lval 201s registers an offense for assignment using /= in if else 201s registers an offense for assignment using /= in case when 201s for a global variable lval 201s registers an offense for assignment using /= in case when 201s registers an offense for assignment using /= in if else 201s for a local variable lval 201s registers an offense for assignment using /= in ternary 201s with end alignment to keyword 201s for a class variable lval 201s registers an offense for assignment using /= in if else 201s registers an offense for assignment using /= in case when 201s for a instance variable lval 201s registers an offense for assignment using /= in case when 201s registers an offense for assignment using /= in if else 201s for a global variable lval 201s registers an offense for assignment using /= in case when 201s registers an offense for assignment using /= in if else 201s for a constant lval 201s registers an offense for assignment using /= in if else 201s registers an offense for assignment using /= in case when 201s for a local variable lval 201s registers an offense for assignment using /= in if else 201s registers an offense for assignment using /= in case when 201s behaves like all variable types 201s registers an offense assigning any variable type in if else 201s allows assignment to the return of case when 201s registers an offense assigning any variable type in case when 201s registers an offense assigning any variable type in ternary 201s allows assignment to the return of if else 201s allows assignment to the return of a ternary 201s behaves like comparison methods 201s registers an offense for comparison methods in ternary operations 201s with end alignment to keyword 201s corrects comparison methods in case when 201s corrects comparison methods in if elsif else 201s corrects comparison methods in unless else 201s >= Ruby 2.7 201s corrects comparison methods in case in 201s with end alignment to start_of_line 201s corrects comparison methods in case when 201s corrects comparison methods in if elsif else 201s corrects comparison methods in unless else 201s >= Ruby 2.7 201s corrects comparison methods in case in 201s behaves like comparison methods 201s registers an offense for comparison methods in ternary operations 201s with end alignment to start_of_line 201s corrects comparison methods in case when 201s corrects comparison methods in if elsif else 201s corrects comparison methods in unless else 201s >= Ruby 2.7 201s corrects comparison methods in case in 201s with end alignment to keyword 201s corrects comparison methods in if elsif else 201s corrects comparison methods in unless else 201s corrects comparison methods in case when 201s >= Ruby 2.7 201s corrects comparison methods in case in 201s behaves like comparison methods 201s registers an offense for comparison methods in ternary operations 201s with end alignment to start_of_line 201s corrects comparison methods in unless else 201s corrects comparison methods in case when 201s corrects comparison methods in if elsif else 201s >= Ruby 2.7 201s corrects comparison methods in case in 201s with end alignment to keyword 201s corrects comparison methods in if elsif else 201s corrects comparison methods in unless else 201s corrects comparison methods in case when 201s >= Ruby 2.7 201s corrects comparison methods in case in 201s behaves like all assignment types 201s for a local variable lval 201s registers an offense for assignment using -= in ternary 201s for a global variable lval 201s registers an offense for assignment using -= in ternary 201s with end alignment to keyword 201s for a constant lval 201s registers an offense for assignment using -= in case when 201s registers an offense for assignment using -= in if else 201s for a global variable lval 201s registers an offense for assignment using -= in case when 201s registers an offense for assignment using -= in if else 201s for a class variable lval 201s registers an offense for assignment using -= in if else 201s registers an offense for assignment using -= in case when 201s for a local variable lval 201s registers an offense for assignment using -= in if else 201s registers an offense for assignment using -= in case when 201s for a instance variable lval 201s registers an offense for assignment using -= in if else 201s registers an offense for assignment using -= in case when 201s for a class variable lval 201s registers an offense for assignment using -= in ternary 201s for a constant lval 201s registers an offense for assignment using -= in ternary 201s for a instance variable lval 201s registers an offense for assignment using -= in ternary 201s with end alignment to start_of_line 201s for a instance variable lval 201s registers an offense for assignment using -= in if else 201s registers an offense for assignment using -= in case when 201s for a class variable lval 201s registers an offense for assignment using -= in if else 201s registers an offense for assignment using -= in case when 201s for a local variable lval 201s registers an offense for assignment using -= in if else 201s registers an offense for assignment using -= in case when 201s for a constant lval 201s registers an offense for assignment using -= in case when 201s registers an offense for assignment using -= in if else 201s for a global variable lval 201s registers an offense for assignment using -= in if else 201s registers an offense for assignment using -= in case when 201s IncludeTernaryExpressions false 201s allows assignment in ternary operation 201s behaves like else followed by new conditional without else 201s allows if elsif else if 201s behaves like comparison methods 201s registers an offense for comparison methods in ternary operations 201s with end alignment to keyword 201s corrects comparison methods in case when 201s corrects comparison methods in unless else 201s corrects comparison methods in if elsif else 201s >= Ruby 2.7 201s corrects comparison methods in case in 201s with end alignment to start_of_line 201s corrects comparison methods in if elsif else 201s corrects comparison methods in unless else 201s corrects comparison methods in case when 201s >= Ruby 2.7 201s corrects comparison methods in case in 201s behaves like all assignment types 201s with end alignment to keyword 201s for a global variable lval 201s registers an offense for assignment using << in if else 201s registers an offense for assignment using << in case when 201s for a constant lval 201s registers an offense for assignment using << in if else 201s registers an offense for assignment using << in case when 201s for a instance variable lval 201s registers an offense for assignment using << in if else 201s registers an offense for assignment using << in case when 201s for a local variable lval 201s registers an offense for assignment using << in case when 201s registers an offense for assignment using << in if else 201s for a class variable lval 201s registers an offense for assignment using << in if else 201s registers an offense for assignment using << in case when 201s for a local variable lval 201s registers an offense for assignment using << in ternary 201s for a instance variable lval 201s registers an offense for assignment using << in ternary 201s for a global variable lval 201s registers an offense for assignment using << in ternary 201s for a class variable lval 201s registers an offense for assignment using << in ternary 201s for a constant lval 201s registers an offense for assignment using << in ternary 201s with end alignment to start_of_line 201s for a global variable lval 202s registers an offense for assignment using << in case when 202s registers an offense for assignment using << in if else 202s for a constant lval 202s registers an offense for assignment using << in if else 202s registers an offense for assignment using << in case when 202s for a instance variable lval 202s registers an offense for assignment using << in case when 202s registers an offense for assignment using << in if else 202s for a local variable lval 202s registers an offense for assignment using << in if else 202s registers an offense for assignment using << in case when 202s for a class variable lval 202s registers an offense for assignment using << in case when 202s registers an offense for assignment using << in if else 202s behaves like all assignment types 202s for a global variable lval 202s registers an offense for assignment using = in ternary 202s for a instance variable lval 202s registers an offense for assignment using = in ternary 202s for a local variable lval 202s registers an offense for assignment using = in ternary 202s with end alignment to start_of_line 202s for a local variable lval 202s registers an offense for assignment using = in if else 202s registers an offense for assignment using = in case when 202s for a instance variable lval 202s registers an offense for assignment using = in case when 202s registers an offense for assignment using = in if else 202s for a class variable lval 202s registers an offense for assignment using = in case when 202s registers an offense for assignment using = in if else 202s for a global variable lval 202s registers an offense for assignment using = in case when 202s registers an offense for assignment using = in if else 202s for a constant lval 202s registers an offense for assignment using = in case when 202s registers an offense for assignment using = in if else 202s with end alignment to keyword 202s for a class variable lval 202s registers an offense for assignment using = in if else 202s registers an offense for assignment using = in case when 202s for a constant lval 202s registers an offense for assignment using = in if else 202s registers an offense for assignment using = in case when 202s for a global variable lval 202s registers an offense for assignment using = in if else 202s registers an offense for assignment using = in case when 202s for a local variable lval 202s registers an offense for assignment using = in case when 202s registers an offense for assignment using = in if else 202s for a instance variable lval 202s registers an offense for assignment using = in case when 202s registers an offense for assignment using = in if else 202s for a constant lval 202s registers an offense for assignment using = in ternary 202s for a class variable lval 202s registers an offense for assignment using = in ternary 202s behaves like all variable types 202s registers an offense assigning any variable type in ternary 202s registers an offense assigning any variable type in if else 202s allows assignment to the return of a ternary 202s allows assignment to the return of case when 202s allows assignment to the return of if else 202s registers an offense assigning any variable type in case when 202s correction would exceed max line length 202s allows assignment to the same variable in if else if the correction would create a line longer than the configured LineLength 202s allows assignment to the same variable in if else if the correction would cause the condition to exceed the configured LineLength 202s allows assignment to the same variable in case when else if the correction would create a line longer than the configured LineLength 202s behaves like all variable types 202s registers an offense assigning any variable type in if else 202s allows assignment to the return of case when 202s allows assignment to the return of a ternary 202s registers an offense assigning any variable type in ternary 202s registers an offense assigning any variable type in case when 202s allows assignment to the return of if else 202s behaves like all assignment types 202s for a global variable lval 202s registers an offense for assignment using += in ternary 202s with end alignment to keyword 202s for a global variable lval 202s registers an offense for assignment using += in case when 202s registers an offense for assignment using += in if else 202s for a local variable lval 202s registers an offense for assignment using += in case when 202s registers an offense for assignment using += in if else 202s for a instance variable lval 202s registers an offense for assignment using += in case when 202s registers an offense for assignment using += in if else 202s for a constant lval 202s registers an offense for assignment using += in case when 202s registers an offense for assignment using += in if else 202s for a class variable lval 202s registers an offense for assignment using += in if else 202s registers an offense for assignment using += in case when 202s for a local variable lval 202s registers an offense for assignment using += in ternary 202s with end alignment to start_of_line 202s for a global variable lval 202s registers an offense for assignment using += in case when 202s registers an offense for assignment using += in if else 202s for a instance variable lval 202s registers an offense for assignment using += in case when 202s registers an offense for assignment using += in if else 202s for a local variable lval 202s registers an offense for assignment using += in case when 202s registers an offense for assignment using += in if else 202s for a class variable lval 202s registers an offense for assignment using += in if else 202s registers an offense for assignment using += in case when 202s for a constant lval 202s registers an offense for assignment using += in case when 202s registers an offense for assignment using += in if else 202s for a constant lval 202s registers an offense for assignment using += in ternary 202s for a instance variable lval 202s registers an offense for assignment using += in ternary 202s for a class variable lval 202s registers an offense for assignment using += in ternary 202s behaves like all assignment types 202s with end alignment to start_of_line 202s for a class variable lval 202s registers an offense for assignment using &&= in case when 202s registers an offense for assignment using &&= in if else 202s for a constant lval 202s registers an offense for assignment using &&= in if else 202s registers an offense for assignment using &&= in case when 202s for a instance variable lval 202s registers an offense for assignment using &&= in case when 202s registers an offense for assignment using &&= in if else 202s for a global variable lval 202s registers an offense for assignment using &&= in case when 202s registers an offense for assignment using &&= in if else 202s for a local variable lval 202s registers an offense for assignment using &&= in case when 202s registers an offense for assignment using &&= in if else 202s for a instance variable lval 202s registers an offense for assignment using &&= in ternary 202s for a global variable lval 202s registers an offense for assignment using &&= in ternary 202s with end alignment to keyword 202s for a constant lval 202s registers an offense for assignment using &&= in case when 202s registers an offense for assignment using &&= in if else 202s for a class variable lval 202s registers an offense for assignment using &&= in if else 202s registers an offense for assignment using &&= in case when 202s for a instance variable lval 202s registers an offense for assignment using &&= in if else 202s registers an offense for assignment using &&= in case when 202s for a local variable lval 202s registers an offense for assignment using &&= in if else 202s registers an offense for assignment using &&= in case when 202s for a global variable lval 202s registers an offense for assignment using &&= in if else 202s registers an offense for assignment using &&= in case when 202s for a local variable lval 202s registers an offense for assignment using &&= in ternary 202s for a constant lval 202s registers an offense for assignment using &&= in ternary 202s for a class variable lval 202s registers an offense for assignment using &&= in ternary 202s for if elsif else if else 202s autocorrects the inner offense first 202s autocorrects the outer offense later 202s 202s RuboCop::Runner 202s #run 202s if -s/--stdin is used with an offense 202s sends the offense to a formatter 202s returns false 202s if there are no offenses in inspected files 202s returns true 202s if a cop crashes 202s does not call ResultCache#save 202s if there is an offense in an inspected file 202s returns false 202s sends the offense to a formatter 202s #run with cops autocorrecting each-other 202s with two pairs of conflicting cops 202s with display options 202s --display-only-safe-correctable 202s ommits unsafe correctable `Style/FrozenStringLiteral` 202s returns false 202s --display-only-correctable 202s returns false 202s ommits uncorrectable `Layout/LineLength` 202s if there is an offense in an inspected file 202s aborts because of an infinite loop 202s with three cop cycle 202s if there is an offense in an inspected file 202s aborts because of an infinite loop 202s with two conflicting cops 202s if there is an offense in an inspected file 202s aborts because of an infinite loop 202s if there are multiple offenses in an inspected file 202s aborts because of an infinite loop 202s #run when interrupted 202s with SIGINT 202s returns false 202s 202s RuboCop::Cop::Style::ArrayCoercion 203s registers an offense and corrects when splatting variable into array 203s does not register an offense when splatting multiple variables into array 203s does not register an offense when converting variable into other named array variable with check 203s registers an offense and corrects when converting variable into array with check 203s does not register an offense when splat is not in array 203s 203s RuboCop::Cop::Layout::SpaceAroundMethodCallOperator 203s does not register an offense when using `__ENCODING__` 203s does not register an offense when no method call operator 203s dot operator 203s does not register an offense when no space around any `.` operators 203s registers an offense and corrects when spaces after `Proc#call` shorthand call 203s registers an offense and corrects when space before first method call operator 203s registers an offense and corrects when space around intermediate method call operator 203s registers an offense and corrects when spaces after method call 203s registers an offense and corrects when spaces before method call 203s registers an offense and corrects when space before last method call operator 203s registers an offense and corrects when spaces around method call 203s registers an offense and corrects when space after method call 203s does not register an offense when no space around method call 203s registers an offense and corrects when space around multiple method call operator 203s registers an offense and corrects when space before method call 203s registers an offense and corrects when space after last method call operator 203s registers an offense and corrects when space after first method call operator 203s when multi line method call 203s does not register an offense when no space after the `.` 203s registers an offense and corrects when space before method call in suffix chaining 203s registers an offense and corrects when space before method call 203s when there is a space between `.` operator and a comment 203s registers an offense when there is a space before `.` 203s does not register an offense when there is not a space before `.` 203s safe navigation operator 203s registers an offense and corrects when space after method call 203s does not register an offense when no space around method call 203s registers an offense and corrects when space around intermediate method call operator 203s registers an offense and corrects when space around multiple method call operator 203s does not register an offense when no space around any `.` operators 203s registers an offense and corrects when spaces before method call 203s registers an offense and corrects when space before method call 203s registers an offense and corrects when space before last method call operator 203s registers an offense and corrects when spaces after method call 203s registers an offense and corrects when space before first method call operator 203s registers an offense and corrects when space after first method call operator 203s registers an offense and corrects when space after last method call operator 203s registers an offense and corrects when spaces around method call 203s when multi line method call 203s does not register an offense when no space after the `&.` 203s registers an offense and corrects when space before method call in suffix chaining 203s registers an offense and corrects when space before method call 203s :: operator 203s does not register an offense when no space around any `.` operators 203s registers an offense and corrects when space after method call 203s does not register an offense when no space around method call 203s does not register an offense if no space before `::` operator with inheritance 203s registers an offense and corrects when spaces after method call 203s registers an offense and corrects when multiple spaces with assignment 203s does not register an offense if no space with conditionals 203s registers an offense and corrects when space around multiple method call operator 203s does not register an offense if no space before `::` operator with assignment 203s registers an offense and corrects when space around intermediate method call operator 203s registers an offense and corrects when space after first operator with assignment 203s registers an offense and corrects when space after last method call operator 203s when multi line method call 203s does not register an offense when no space after the `::` 203s registers an offense and corrects when space before method call 203s 203s RuboCop::Cop::Style::FetchEnvVar 203s registers an offense when using `ENV || x` that is different from `if` condition in the body 203s registers an offense with using an `ENV` at multiple `if` condition in the body 203s registers an offense when using `ENV && x` that is different from `if` condition in the body 203s registers an offense when using an `ENV` at `if` condition in the body 203s when `ENV[]` is the LHS of `||` 203s registers no offenses 203s when the env val is excluded from the inspection by the config 203s registers no offenses 203s when it receives a message 203s registers no offenses 203s when it receives a message with safe navigation 203s registers no offenses 203s when it is a hash value 203s registers an offense 203s when it is assigned to a variable 203s registers an offense when using single assignment 203s registers an offense when using multiple assignment 203s when it is used in an interpolation 203s registers an offense 203s when using `fetch` instead of `[]` 203s registers no offenses 203s when `ENV[]` is the right end of `||` chains 203s registers an offense 203s when it is evaluated with no default values 203s registers an offense 203s when it is a hash key 203s registers an offense 203s when it is an array element 203s registers an offense 203s when the node is a assigned by `||=` 203s registers an offense 203s when it is compared `!=` with other object 203s does not register an offense 203s when the node is a receiver of `&&=` 203s does not register an offense 203s with negation 203s registers no offenses 203s when it is an argument of a method 203s registers an offense 203s when it is compared `==` with other object 203s does not register an offense 203s when the node is a receiver of `||=` 203s does not register an offense 203s when the node is a assigned by `&&=` 203s registers an offense 203s when it is used in a conditional expression 203s registers no offenses when using the same `ENV` var as `if` condition in the body with other conditions 203s registers no offenses with `if` 203s registers an offense with `case` 203s registers no offenses when using the same `ENV` var as `if` condition in the body 203s registers no offenses when using the same `ENV` var as `if` condition in the body with predicate method 203s registers no offenses with `unless` 203s registers no offenses when using the same `ENV` var as `if` condition in the body with operator 203s registers no offenses with ternary operator 203s registers an offense with using an `ENV` var as `if` condition in the body with assignment method 203s registers an offense when using an `ENV` var that is different from `if` condition in the body 203s registers no offenses when using the same `ENV` var as `if` condition in the body with assignment method 203s 203s RuboCop::Cop::Style::RandomWithOffset 203s registers an offense when using rand(int).next 203s registers an offense when using rand(irange) + offset 203s does not register an offense when using offset - rand(erange) with a non-integer range value 203s registers an offense when using rand(erange) + offset 203s registers an offense when using offset - rand(irange) 203s registers an offense when using offset + Random.rand(int) 203s registers an offense when using rand(int) - offset 203s does not register an offense when using rand(irange).succ with a non-integer range value 203s does not register an offense when using range with triple dots 203s registers an offense when using Random.rand(int).succ 203s registers an offense when using ::Kernel.rand 203s registers an offense when using rand(erange) - offset 203s registers an offense when using rand(int).pred 203s registers an offense when using Random.rand 203s registers an offense when using rand(irange).succ 203s registers an offense when using offset + rand(int) 203s registers an offense when using Kernel.rand 203s registers an offense when using rand(int) + offset 203s registers an offense when using rand(erange).succ 203s registers an offense when using offset - rand(erange) 203s registers an offense when using ::Random.rand(int).pred 203s registers an offense when using rand(int).succ 203s registers an offense when using offset - ::Random.rand(int) 203s registers an offense when using rand(irange) - offset 203s registers an offense when using offset - rand(int) 203s registers an offense when using ::Random.rand 203s does not register an offense when using rand(erange).pred with a non-integer range value 203s does not register an offense when using rand(irange) + offset with a non-integer range value 203s does not register an offense when using range with double dots 203s 203s RuboCop::Cop::Layout::MultilineHashKeyLineBreaks 203s with line break after opening bracket 203s registers an offense and corrects when key starts on same line as another 203s when on all keys on one line different than brackets 203s does not add any offenses 203s when key starts on same line as another with rockets 203s adds an offense 203s when on different lines than brackets but keys on one 203s does not add any offenses 203s without line break after opening bracket 203s registers an offense and corrects nested hashes 203s registers an offense and corrects when key starts on same line as another 203s when on same line 203s does not add any offenses 203s 203s RuboCop::Cop::InternalAffairs::MethodNameEqual 203s registers an offense when using `#method == :do_something` 203s registers an offense when using `#method == other_node.do_something` 203s does not register an offense when using `#method?` 203s 203s RuboCop::Cop::Style::AccessModifierDeclarations 203s when `inline` is configured 203s offends when private is not inlined 203s offends when module_function is not inlined and has a comment 203s registers an offense for correct + multiple opposite styles of #{access_modifier} usage 203s does not offend when public is inlined with a method 203s registers an offense for correct + multiple opposite styles of #{access_modifier} usage 203s registers an offense for correct + multiple opposite styles of #{access_modifier} usage 203s does not offend when private is inlined with a symbol 203s does not offend when protected is inlined with a symbol 203s offends when module_function is not inlined 203s offends when private is not inlined and has a comment 203s offends when public is not inlined 203s registers an offense for correct + multiple opposite styles of #{access_modifier} usage 203s does not offend when module_function is inlined with a method 203s accepts when #{access_modifier} is a hash literal value 203s does not offend when private is inlined with a method 203s offends when public is not inlined and has a comment 203s accepts when #{access_modifier} is a hash literal value 203s does not offend when public is inlined with a symbol 203s does not offend when protected is inlined with a method 203s offends when protected is not inlined and has a comment 203s accepts when #{access_modifier} is a hash literal value 203s accepts when #{access_modifier} is a hash literal value 203s does not offend when module_function is inlined with a symbol 203s offends when protected is not inlined 203s allow access modifiers on symbols 203s accepts when argument to #{access_modifier} is a symbol 203s do not allow access modifiers on symbols 203s accepts when argument to #{access_modifier} is a symbol 203s allow access modifiers on symbols 203s accepts when argument to #{access_modifier} is a symbol 203s do not allow access modifiers on symbols 203s accepts when argument to #{access_modifier} is a symbol 203s when methods are modified by group modifier 203s registers and autocorrects an offense 203s do not allow access modifiers on symbols 203s accepts when argument to #{access_modifier} is a symbol 203s when methods are modified by group modifier 203s registers and autocorrects an offense 203s when methods are modified by group modifier 203s registers and autocorrects an offense 203s when methods are modified by group modifier 203s registers and autocorrects an offense 203s do not allow access modifiers on symbols 203s accepts when argument to #{access_modifier} is a symbol 203s allow access modifiers on symbols 203s accepts when argument to #{access_modifier} is a symbol 203s allow access modifiers on symbols 203s accepts when argument to #{access_modifier} is a symbol 203s when `group` is configured 203s does not registers an offense when using #{access_modifier} in a block 203s registers an offense for correct + multiple opposite styles of #{access_modifier} usage 203s offends when module_function is inlined with a method 203s does not registers an offense when using #{access_modifier} in a block 203s does not offend when private is not inlined and has a comment 203s accepts when #{access_modifier} is a hash literal value 203s accepts when using only #{access_modifier} 203s registers an offense for correct + multiple opposite styles of #{access_modifier} usage 203s accepts when #{access_modifier} is a hash literal value 203s accepts when #{access_modifier} is a hash literal value 203s accepts when using only #{access_modifier} 203s accepts when using only #{access_modifier} 203s does not offend when protected is not inlined and has a comment 203s does not offend when protected is not inlined 203s offends when private is inlined with a method 203s accepts when using only #{access_modifier} 203s offends when protected is inlined with a method 203s does not offend when module_function is not inlined 203s does not registers an offense when using #{access_modifier} in a block 203s accepts when #{access_modifier} is a hash literal value 203s offends when public is inlined with a method 203s does not offend when public is not inlined and has a comment 203s registers an offense for correct + multiple opposite styles of #{access_modifier} usage 203s does not offend when private is not inlined 203s does not offend when module_function is not inlined and has a comment 203s registers an offense for correct + multiple opposite styles of #{access_modifier} usage 203s does not offend when public is not inlined 203s does not registers an offense when using #{access_modifier} in a block 203s when method has comments 203s registers and autocorrects an offense 203s when non-existent method is modified by inline modifier with disallowed symbol 203s registers an offense but does not autocorrect it 203s when non-existent method is modified by inline modifier with disallowed symbol 203s registers an offense but does not autocorrect it 203s do not allow access modifiers on symbols 203s accepts when argument to #{access_modifier} is a symbol 203s do not allow access modifiers on symbols 203s accepts when argument to #{access_modifier} is a symbol 203s when non-existent method is modified by inline modifier with disallowed symbol 203s registers an offense but does not autocorrect it 203s allow access modifiers on symbols 203s accepts when argument to #{access_modifier} is a symbol 203s allow access modifiers on symbols 203s accepts when argument to #{access_modifier} is a symbol 203s when method is modified by inline modifier 203s registers and autocorrects an offense 203s when method is modified by inline modifier 203s registers and autocorrects an offense 203s when method is modified by inline modifier where group modifier already exists 203s registers and autocorrects an offense 203s do not allow access modifiers on symbols 203s accepts when argument to #{access_modifier} is a symbol 203s when non-existent method is modified by inline modifier with disallowed symbol 203s registers an offense but does not autocorrect it 203s when method has comments 203s registers and autocorrects an offense 203s when method is modified by inline modifier where group modifier already exists 203s registers and autocorrects an offense 203s do not allow access modifiers on symbols 203s accepts when argument to #{access_modifier} is a symbol 203s when method is modified by inline modifier where group modifier already exists 203s registers and autocorrects an offense 203s when method is modified by inline modifier 203s registers and autocorrects an offense 203s allow access modifiers on symbols 203s accepts when argument to #{access_modifier} is a symbol 203s allow access modifiers on symbols 203s accepts when argument to #{access_modifier} is a symbol 203s when method is modified by inline modifier with disallowed symbol 203s registers and autocorrects an offense 203s when method is modified by inline modifier with disallowed symbol 203s registers and autocorrects an offense 203s when method is modified by inline modifier 203s registers and autocorrects an offense 203s when method is modified by inline modifier where group modifier already exists 203s registers and autocorrects an offense 203s when method is modified by inline modifier with disallowed symbol 203s registers and autocorrects an offense 203s when method has comments 203s registers and autocorrects an offense 203s when method has comments 203s registers and autocorrects an offense 203s when method is modified by inline modifier with disallowed symbol 203s registers and autocorrects an offense 203s 203s RuboCop::Cop::Registry 203s exposes cop departments 203s can be cloned 203s can filter down to all but one type 203s exposes a list of cop names 203s exposes the number of stored cops 203s exposes a mapping of cop names to cop classes 203s can filter down to one type 203s names_for_department 203s returns array of cops for specified department 203s #department? 203s returns true for department name 203s returns false for other names 203s #qualified_cop_name 203s raises an error when a cop name is ambiguous 203s emits a warning when namespace is incorrect 203s qualifies names without a namespace 203s qualifies names with the correct namespace 203s gives back already properly qualified names 203s returns the provided name if no namespace is found 203s when dismissing a cop class 203s allows re-listing 203s allows it if done rapidly 203s disallows it if done too late 203s #contains_cop_matching? 203s can find cops matching a given name 203s returns false for cops not included in the store 203s #enabled 203s selects only safe cops if :safe passed 203s selects cops which are enabled in the config 203s overrides config if :only includes the cop 203s when new cops are introduced 203s overrides config if :only includes the cop 203s does not include them 203s when specifying `--enable-pending-cops` command-line option 203s includes them 203s when specifying `NewCops: disable` option in .rubocop.yml 203s includes them because command-line option takes precedence over .rubocop.yml 203s when specifying `--disable-pending-cops` command-line option 203s does not include them 203s when specifying `NewCops: enable` option in .rubocop.yml 203s does not include them because command-line option takes precedence over .rubocop.yml 203s when specifying `NewCops: enable` option in .rubocop.yml 204s includes them 204s when specifying `NewCops: pending` option in .rubocop.yml 204s does not include them 204s when specifying `NewCops: disable` option in .rubocop.yml 204s does not include them 204s #cops 204s exposes a list of cops 204s with cops having the same inner-most module 204s exposes both cops 204s 204s RuboCop::Cop::Force 204s #run_hook 204s invokes a hook in all cops 204s .force_name 204s returns the class name without namespace 204s 204s RuboCop::Cop::Lint::AmbiguousOperatorPrecedence 204s registers an offense for expressions containing booleans and operators 204s does not register an offense when boolean expressions are wrapped in parens 204s registers an offense when the entire expression is wrapped in parentheses 204s does not register an offense when expressions are wrapped in parentheses by precedence 204s allows an operator with `and` 204s allows an operator with `or` 204s registers an offense when an expression with mixed precedence has no parens 204s does not register an offense when all operators in the expression have the same precedence 204s registers an offense when an expression with mixed boolean operators has no parens 204s corrects a super long expression in reverse precedence order 204s does not register an offense when there is only one operator in the expression 204s does not register an offense when expressions are wrapped in parentheses by reverse precedence 204s corrects a super long expression in precedence order 204s 204s RuboCop::Cop::Style::MethodDefParentheses 204s require_no_parentheses 204s behaves like no parentheses 204s reports an offense for opposite + correct 204s reports an offense for class def with parameters with parens 204s accepts a class def with parameters with parens 204s auto-removes the parens for defs 204s requires parens for anonymous block forwarding 204s accepts a def with parameters but no parens 204s accepts def with no args and no parens 204s requires parens for forwarding 204s reports an offense for def with parameters with parens 204s reports an offense for def with no args and parens 204s behaves like endless methods 204s endless methods 204s accepts parens for method calls inside an endless method 204s accepts parens with args 204s accepts parens with `forward-arg` 204s accepts parens without args 204s require_no_parentheses_except_multiline 204s behaves like endless methods 204s endless methods 204s accepts parens with `forward-arg` 204s accepts parens without args 204s accepts parens for method calls inside an endless method 204s accepts parens with args 204s when args span multiple lines 204s reports an offense for correct + opposite 204s auto-adds required parens to argument lists on multiple lines 204s when args are all on a single line 204s behaves like no parentheses 204s reports an offense for def with parameters with parens 204s requires parens for anonymous block forwarding 204s reports an offense for opposite + correct 204s accepts def with no args and no parens 204s reports an offense for def with no args and parens 204s accepts a def with parameters but no parens 204s reports an offense for class def with parameters with parens 204s accepts a class def with parameters with parens 204s auto-removes the parens for defs 204s requires parens for forwarding 204s require_parentheses 204s reports an offense for def with parameters but no parens 204s auto-adds required parens for a defs 204s reports an offense for correct + opposite 204s auto-adds required parens to argument lists on multiple lines 204s reports an offense for class def with parameters but no parens 204s accepts def with no args and no parens 204s auto-adds required parens for a defs after a passing method 204s behaves like endless methods 204s endless methods 204s accepts parens with args 204s accepts parens without args 204s accepts parens for method calls inside an endless method 204s accepts parens with `forward-arg` 204s 204s RuboCop::Cop::Lint::ShadowingOuterLocalVariable 204s when the same variable name as a block variable is used in return value assignment of `if` 204s does not register an offense 204s 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 204s registers an offense 204s when a block local variable has same name as an outer scope variablewith different branches of same `if` condition node 204s does not register an offense 204s when a block argument has same name as an outer scope variable 204s registers an offense 204s when a block local variable has same name as an outer scope variablewith same branches of same `if` condition node 204s registers an offense 204s when a block argument has same name "_" as outer scope variable "_" 204s does not register an offense 204s when a block argument has a same name starts with "_" as an outer scope variable 204s does not register an offense 204s when multiple block arguments have same name "_" 204s does not register an offense 204s with Ractor.new 204s does not register an offense 204s when multiple block arguments have a same name starts with "_" 204s does not register an offense 204s when a block argument has different name with outer scope variables 204s does not register an offense 204s when an outer scope variable is reassigned in a block 204s does not register an offense 204s when a block block argument has same name as an outer scope variable 204s registers an offense 204s when a block local variable has same name as an outer scope variablewith same branches of same `unless` condition node 204s registers an offense 204s when a method argument has same name as an outer scope variable 204s does not register an offense 204s when a splat block argument has same name as an outer scope variable 204s registers an offense 204s when an outer scope variable is referenced in a block 204s does not register an offense 204s when a block local variable has same name as an outer scope variablewith different branches of same `case` condition node 204s does not register an offense 204s when a block local variable has same name as an outer scope variablewith same branches of same `case` condition node 204s registers an offense 204s when a block local variable has same name as an outer scope variable 204s registers an offense 204s when a block local variable has same name as an outer scope variablewith different branches of same `unless` condition node 204s does not register an offense 204s when a block local variable has same name as an outer scope variablewith same branches of same nested `if` condition node 204s registers an offense 204s 204s RuboCop::Cop::Style::NumberedParameters 204s >= Ruby 2.7 204s EnforcedStyle: allow_single_line 204s does not register an offense when using numbered parameters with single-line blocks 204s registers an offense when using numbered parameters with multi-line blocks 204s EnforcedStyle: disallow 204s does an offense when using numbered parameters even with single-line blocks 204s 204s RuboCop::Cop::Style::RedundantCapitalW 204s does not register an offense for array of non-words 204s registers no offense for %w without interpolation 204s registers no offense for %W with special characters 204s registers no offense for normal arrays of strings with interpolation 204s registers no offense for arrays with character constants 204s registers no offense for %w with interpolation-like syntax 204s registers no offense for normal arrays of strings 204s registers an offense for misused %W with different bracket 204s does not register an offense for array containing non-string 204s does not register an offense for array with empty strings 204s registers an offense for misused %W 204s registers no offense for %W with interpolation 204s does not register an offense for array with one element 204s 204s RuboCop::Cop::Layout::SpaceInsideStringInterpolation 204s when EnforcedStyle is space 204s accepts empty interpolation 204s for well-formatted string interpolations 204s does not register an offense for excess literal spacing 204s for "no_space" style formatted string interpolations 204s registers offenses and autocorrects 204s for ill-formatted string interpolations 204s registers offenses and autocorrects 204s when EnforcedStyle is no_space 204s does not touch spaces inside the interpolated expression 204s accepts empty interpolation 204s for "space" style formatted string interpolations 204s registers offenses and autocorrects 204s for ill-formatted string interpolations 204s registers offenses and autocorrects 204s finds interpolations in string-like contexts 204s when interpolation starts or ends with a line break 204s ignores comments and whitespace when looking for line breaks 204s does not register an offense 204s for well-formatted string interpolations 204s accepts excess literal spacing 204s 204s RuboCop::Cop::Lint::UselessMethodDefinition 204s does not register an offense when non-constructor contains only comments 204s does not register an offense for empty class level `initialize` method 204s does not register an offense when method definition contains optional keyword argument 204s registers an offense and corrects for method containing only `super` call 204s does not register an offense for method containing additional code to `super` 204s does not register an offense for constructor with only comments 204s does not register an offense when method definition contains optional argument 204s does not register an offense for constructor containing additional code to `super` 204s does not register an offense for empty constructor 204s does not register an offense when `super` arguments differ from method arguments 204s 204s RuboCop::Cop::Layout::ConditionPosition 204s accepts condition on a different line for modifiers 204s accepts ternary ops 204s registers an offense and corrects for condition on the next line 204s registers an offense and corrects for condition on the next line 204s accepts condition on a different line for modifiers 204s accepts condition on the same line 204s registers an offense and corrects for condition on the next line 204s accepts condition on a different line for modifiers 204s registers an offense and corrects for elsif condition on the next line 204s accepts condition on a different line for modifiers 204s registers an offense and corrects for condition on the next line 204s accepts condition on the same line 204s accepts condition on the same line 204s accepts condition on the same line 204s 204s RuboCop::Cop::Style::HashTransformKeys 204s when using Ruby 2.6 or newer 204s does not flag `_.to_h{...}` when its receiver is an array literal 204s flags _.to_h{...} when transform_keys could be used 204s does not flag `_.to_h{...}` when its receiver is `each_with_index` 204s does not flag `_.to_h{...}` when its receiver is `zip` 204s does not flag `_.to_h{...}` when its receiver is `with_index` 204s does not flag `_.to_h{...}` when both key & value are transformed 204s does not flag _.to_h {...} when key block argument is unused 204s below Ruby 2.6 204s does not flag _.to_h{...} 204s when using Ruby 2.5 or newer 204s does not flag `_.map{...}.to_h` when its receiver is `zip` 204s does not flag `_.map{...}.to_h` when its receiver is `each_with_index` 204s flags _.map {...}.to_h when transform_keys could be used when wrapped in another block 204s does not flag `each_with_object` when its receiver is `zip` 204s flags _.map{...}.to_h when transform_keys could be used when line break before `to_h` 204s does not flag `Hash[_.map{...}]` when its receiver is `zip` 204s does not flag key transformation in the absence of to_h 204s correctly autocorrects _.map{...}.to_h with block 204s flags _.map{...}.to_h when transform_keys could be used 204s does not flag `each_with_object` when its receiver is `each_with_index` 204s correctly autocorrects _.map{...}.to_h without block 204s does not flag each_with_object when key transformation uses value 204s does not flag each_with_object when no transformation occurs 204s does not flag `each_with_object` when its argument is used in the key 204s does not flag each_with_object when its argument is not modified 204s does not flag each_with_object when its receiver is array literal 204s does not flag _.map {...}.to_h when key block argument is unused 204s does not flag _.map{...}.to_h when both key & value are transformed 204s does not flag `Hash[_.map{...}]` when its receiver is `with_index` 204s does not flag key transformation when receiver is array literal 204s does not flag `each_with_object` when its receiver is `with_index` 204s does not flag `_.map{...}.to_h` when its receiver is `with_index` 204s does not flag `Hash[_.map{...}]` when its receiver is `each_with_index` 204s flags Hash[_.map{...}] when transform_keys could be used 204s does not flag each_with_object when both key & value are transformed 204s does not flag Hash[_.map{...}] when both key & value are transformed 204s does not flag `Hash[_.map{...}]` when its receiver is an array literal 204s correctly autocorrects Hash[_.map{...}] 204s with inline block 204s flags each_with_object when transform_keys could be used 204s with multiline block 204s flags each_with_object when transform_keys could be used 204s with safe navigation operator 204s flags each_with_object when transform_keys could be used 204s below Ruby 2.5 204s does not flag even if transform_keys could be used 204s 204s RuboCop::DirectiveComment 204s #line_number 204s returns line number for directive 204s #match? 204s when cop names are superset of names 204s is expected to equal false 204s when there are no cop names 204s is expected to equal false 204s when cop names are subset of names 204s is expected to equal false 204s when cop names are same but have duplicated names 204s is expected to equal true 204s when cop names are same as in the comment 204s is expected to equal true 204s when disabled all cops 204s is expected to equal true 204s when cop names are same but in a different order 204s is expected to equal true 204s #disabled? 204s when enable 204s is expected to equal false 204s when disable 204s is expected to equal true 204s when todo 204s is expected to equal true 204s #in_directive_department? 204s when another department disabled 204s is expected to equal false 204s when cop disabled 204s is expected to equal false 204s when cop department disabled 204s is expected to equal true 204s #match_captures 204s when enable 204s is expected to eq ["enable", "Foo/Bar", nil, "Foo/"] 204s when disable 204s is expected to eq ["disable", "all", nil, nil] 204s when todo 204s is expected to eq ["todo", "all", nil, nil] 204s when typo 204s is expected to be nil 204s #single_line? 204s when relates to single line 204s is expected to equal true 204s when does NOT relate to single line 204s is expected to equal false 204s #disabled_all? 204s when disabled specific cops 204s is expected to equal false 204s when disabled all cops 204s is expected to equal true 204s when enabled all cops 204s is expected to equal false 204s when enabled specific cops 204s is expected to equal false 204s #cop_names 204s when all cops mentioned 204s is expected to eq ["all_names"] 204s when only department specified 204s is expected to eq ["Foo/Bar", "Foo/Baz"] 204s when department and cops specified 204s is expected to eq ["Foo/Bar", "Foo/Baz", "Baz/Cop"] 204s when redundant directive cop department specified 204s is expected to eq ["Lint/One", "Lint/Two"] 204s when only cop specified 204s is expected to eq ["Foo/Bar"] 204s when couple departments specified 204s is expected to eq ["Foo/Bar", "Foo/Baz", "Baz/Bar"] 204s #directive_count 204s when few department used 204s is expected to eq 3 204s when few cops used 204s is expected to eq 2 204s when cops and departments used 204s is expected to eq 4 204s #overridden_by_department? 204s when there are no departments 204s is expected to equal false 204s when there are no cops 204s is expected to equal false 204s when cop is not overridden by it's department 204s is expected to equal false 204s when cop is overridden by it's department 204s is expected to equal true 204s #department_names 204s when department and cops specified 204s is expected to eq ["Foo"] 204s when all cops mentioned 204s is expected to eq [] 204s when couple departments specified 204s is expected to eq ["Foo", "Baz"] 204s when only cop specified 204s is expected to eq [] 204s when only department specified 204s is expected to eq ["Foo"] 204s #all_cops? 204s when mentioned all 204s is expected to equal true 204s when mentioned specific cops 204s is expected to equal false 204s #enabled? 204s when todo 204s is expected to equal false 204s when disable 204s is expected to equal false 204s when enable 204s is expected to equal true 204s #enabled_all? 204s when enabled all cops 204s is expected to equal true 204s when enabled specific cops 204s is expected to equal false 204s when disabled specific cops 204s is expected to equal false 204s when disabled all cops 204s is expected to equal false 204s .before_comment 204s when line has NO code 204s is expected to eq "" 204s when line has code 204s is expected to eq "def foo " 204s 204s RuboCop::Cop::Layout::MultilineOperationIndentation 204s when EnforcedStyle is indented 204s accepts indented operands in if condition 204s accepts indented operands in for body 204s accepts special indentation of for expression 204s accepts two spaces indentation of second line 204s accepts any indentation of parameters to #[] 204s registers an offense and corrects three space indentation of second line 204s registers an offense and corrects extra indentation of third line 204s accepts indented operands in while body 204s accepts the indentation of a broken string 204s accepts indentation of assignment 204s registers an offense and corrects wrong indentation of for expression 204s accepts indented operands in unless body 204s registers an offense and corrects no indentation of second line 204s accepts indentation of next unless condition 204s accepts an expression where the first operand spans multiple lines 204s accepts normal indentation of method parameters 204s accepts two spaces indentation in assignment of array element 204s accepts indentation of return if condition 204s accepts two spaces indentation in assignment of local variable 204s accepts indented operands inside and outside a block 204s registers an offense and corrects aligned operands in if conditions 204s accepts alignment inside a grouped expression 204s registers an offense and corrects one space indentation of second line 204s registers an offense for a 2 space indentation of until condition 204s accepts no extra indentation of third line 204s registers an offense for a 2 space indentation of while condition 204s accepts indentation of return unless condition 204s registers an offense and corrects emacs ruby-mode 1.1 indentation of an expression in an array 204s accepts indented operands in ordinary statement 204s accepts normal indentation inside grouped expression 204s registers an offense and corrects aligned code on LHS of equality operator 204s accepts double indentation of until condition 204s registers an offense for a 2 space indentation of if condition 204s accepts any indentation of method parameters 204s accepts double indentation of if condition 204s accepts indented operands in until body 204s registers an offense for a 2 space indentation of unless condition 204s accepts double indentation of unless condition 204s accepts indented operands in an array 204s accepts double indentation of while condition 204s does not check method calls 204s registers an offense and corrects correct + unrecognized style 204s accepts indented operands in if body 204s registers an offense and corrects aligned operators in assignment 204s registers an offense and corrects an unindented multiline operation that is the left operand in another operation 204s accepts indentation of next if condition 204s accepts unary operations 204s when indentation width is overridden for this cop 204s accepts indented operands in while body 204s accepts indentation of while condition which is offset by a single normal indentation step 204s registers an offense for a 4 space indentation of if condition 204s accepts indented operands in until body 204s registers an offense and corrects 204s registers an offense for a 4 space indentation of until condition 204s accepts indented operands in if body 204s accepts indentation of if condition which is offset by a single normal indentation step 204s registers an offense for a 4 space indentation of unless condition 204s accepts indented operands in unless body 204s accepts indentation of until condition which is offset by a single normal indentation step 204s accepts indentation of unless condition which is offset by a single normal indentation step 204s accepts indented operands in if condition 204s registers an offense for a 4 space indentation of while condition 204s when EnforcedStyle is aligned 204s registers an offense and corrects one space indentation of second line 204s registers an offense and corrects unaligned operands in op-assignment 204s accepts aligned operands in assignment 204s accepts alignment inside a grouped expression 204s accepts indented operands inside block + assignment 204s registers an offense and corrects indented operands in if condition 204s registers an offense and corrects no indentation of second line 204s registers an offense and corrects misaligned string operand when plus is used 204s registers an offense and corrects indented operand in second argument 204s registers an offense for misaligned operands in until condition 204s accepts indented operands in for body 204s accepts indented operands in an array 204s registers an offense and corrects three space indentation of second line 204s accepts indented code on LHS of equality operator 204s accepts two spaces indentation of second line 204s does not check method calls 204s accepts indented operands inside and outside a block 204s registers an offense and corrects misaligned string operand when the first operand has backslash continuation 204s accepts no extra indentation of third line 204s registers an offense and corrects misaligned operands in unless condition 204s accepts indented operands in ordinary statement 204s registers an offense and corrects indented second part of string 204s registers an offense and corrects extra indentation of third line 204s registers an offense for misaligned operands in unless condition 204s registers an offense for misaligned operands in while condition 204s accepts an expression where the first operand spans multiple lines 204s registers an offense and corrects emacs ruby-mode 1.1 indentation of an expression in an array 204s accepts indented operands with ternary operators 204s registers an offense for misaligned operands in if condition 204s accepts two spaces indentation in assignment of array element 204s accepts any indentation of parameters to #[] 204s accepts aligned operands in if condition 204s registers an offense and corrects an unindented multiline operation that is the left operand in another operation 204s accepts two spaces indentation in assignment of local variable 204s accepts unary operations 204s accepts aligned or:ed operands in assignment 204s 204s RuboCop::Cop::Lint::DeprecatedOpenSSLConstant 204s registers an offense with cipher constant and no arguments and corrects 204s does not register an offense with cipher constant and send argument is a method 204s registers an offense with cipher constant and no arguments and corrects 204s registers an offense with cipher constant and one argument and corrects 204s registers an offense with cipher constant and `cbc` argument and corrects 204s registers an offense with AES + blocksize constant and corrects 204s registers an offense with AES + blocksize constant and mode argument and corrects 204s does not register an offense when building digest using an algorithm string and nested digest constants 204s does not register an offense with cipher constant and argument is a constant 204s registers an offense when building an instance using an digest constant and corrects 204s registers an offense when using an digest constant with chained methods and corrects 204s does not register an offense with cipher constant and argument is a variable 204s does not register an offense when using cipher with a string 204s registers an offense with cipher constant and double quoted string argument and corrects 204s does not register an offense when building digest using an algorithm string 204s does not register an offense when using ::Digest class methods with an algorithm string and value 204s registers an offense when using ::Digest class methods on an algorithm constant and corrects 204s registers an offense with cipher constant and no arguments and corrects 204s registers an offense with cipher constant and no arguments and corrects 204s registers an offense with cipher constant and two arguments and corrects 204s when used in a block 204s registers an offense when using ::Digest class methods on an algorithm constant and corrects 204s 204s RuboCop::Cop::Lint::MissingCopEnableDirective 204s when the maximum range size is infinite 204s does not register an offense when the disable cop is re-enabled 204s registers an offense when a department is disabled and never re-enabled 204s registers an offense when a cop is disabled and never re-enabled 204s does not register an offense when the disable department is re-enabled 204s when the cop is disabled in the config 204s reports no offense when re-disabling it until EOF 204s when the maximum range size is finite 204s does not register an offense when the disable department is re-enabled within the limit 204s registers an offense when a department is disabled for too many lines 205s registers an offense when a cop is disabled for too many lines 205s registers an offense when a cop is disabled and never re-enabled 205s registers an offense when a department is disabled and never re-enabled 205s does not register an offense when the disable cop is re-enabled within the limit 205s 205s RuboCop::Cop::InternalAffairs::CopDescription 205s The description starts with `This cop ...` 205s registers an offense if using an auxiliary verb 205s registers an offense and corrects if using just a verb 205s registers an offense if the description like `This cop is ...` 205s There is no description comment 205s does not register offense 205s The description starts with a word such as verb 205s does not register if the description like `Checks` 205s does not register if the description starts with non-verb word 205s 205s RuboCop::Cop::Bundler::OrderedGems 205s When gems are not alphabetically sorted 205s registers an offense 205s When gem groups is separated by multiline comment 205s with TreatCommentsAsGroupSeparators: false 205s registers an offense 205s with TreatCommentsAsGroupSeparators: true 205s accepts 205s When there are duplicated gems in group 205s registers an offense 205s When gems have an inline comment, and not sorted 205s registers an offense 205s When gems are asciibetically sorted irrespective of _ 205s does not register an offense 205s when a gem is referenced from a variable 205s resets the sorting to a new block 205s ignores the line 205s When gems are alphabetically sorted 205s does not register any offenses 205s When a gem is sorted but not so when disregarding _- 205s by default 205s registers an offense 205s when ConsiderPunctuation is true 205s does not register an offense 205s When a gem that starts with a capital letter is not sorted 205s registers an offense 205s When each individual group of line is not sorted 205s registers some offenses 205s When the gemfile is empty 205s does not register any offenses 205s When a gem that starts with a capital letter is sorted 205s does not register an offense 205s When each individual group of line is sorted 205s does not register any offenses 205s When a gem declaration takes several lines 205s registers an offense 205s 205s RuboCop::Cop::Style::WhileUntilModifier 205s behaves like condition modifier cop 205s for a multiline 'until' 205s corrects it when assignment is in body 205s accepts it when condition has local variable assignment 205s doesn't break when used as RHS of local var assignment 205s accepts it if body spans more than one line 205s doesn't break when used as RHS of binary arithmetic 205s accepts it if single line would not fit on one line 205s doesn't break when used as RHS of class var assignment 205s handles one-line usage 205s accepts an empty body 205s corrects it if result fits in one line 205s handles inline comments during autocorrection 205s doesn't break when used as RHS of constant assignment 205s doesn't break when used as RHS of instance var assignment 205s accepts multiline condition in modifier form 205s registers an offense 205s when Layout/LineLength is disabled 205s registers an offense even for a long modifier statement 205s when there is a comment on the first line and some code after the end keyword 205s does not register an offense 205s behaves like condition modifier cop 205s for a multiline 'while' 205s accepts it if single line would not fit on one line 205s doesn't break when used as RHS of class var assignment 205s corrects it when assignment is in body 205s doesn't break when used as RHS of instance var assignment 205s accepts it if body spans more than one line 205s doesn't break when used as RHS of local var assignment 205s accepts an empty body 205s doesn't break when used as RHS of binary arithmetic 205s corrects it if result fits in one line 205s handles one-line usage 205s handles inline comments during autocorrection 205s doesn't break when used as RHS of constant assignment 205s accepts it when condition has local variable assignment 205s when there is a comment on the first line and some code after the end keyword 205s does not register an offense 205s when Layout/LineLength is disabled 205s registers an offense even for a long modifier statement 205s accepts multiline condition in modifier form 205s registers an offense 205s 205s RuboCop::Cop::Style::MapCompactWithConditionalBlock 205s With single line block 205s does not register offenses if `compact` is not chained to `map` 205s registers an offense and corrects to `reject` with ternary expression 205s registers an offense and corrects to `select` with ternary expression 205s registers an offense and corrects to `select` with modifier form of `if` condition 205s registers an offense and corrects to `reject` with modifier form of `unless` condition 205s With multiline block 205s registers an offense and corrects to `select` with modifier form of `if` condition 205s registers an offense and corrects to `reject` with guard clause of `unless` and `next` has a value and return nil 205s registers an offense and corrects to `select` if condition has not else branch 205s registers an offense and corrects to `select` if `next value` in if_branch and `nil` in else_branch 205s registers an offense and corrects to `select` with multi-line `if` condition 205s registers an offense and corrects to `reject` if `next value` in else_branch and `nil` in if_branch 205s registers an offense and corrects to `select` with guard clause of `if` and `next` has a value 205s registers an offense and corrects to `select` with guard clause of `if` 205s registers an offense and corrects to `reject` with `unless` condition 205s registers an offense and corrects to `reject` with guard clause of `unless` and `next` has a value 205s registers an offense and corrects to `reject` with `if` condition 205s registers an offense and corrects to `reject` with guard clause of `unless` and `next` explicitly nil 205s does not register offenses if condition has elsif branch 205s does not register offenses if return value is not same as block argument 205s registers an offense and corrects to `reject` with ternary expression 205s registers an offense and corrects to `select` with ternary expression 205s registers an offense and corrects to `select` with `if` condition 205s registers an offense and corrects to `select` with guard clause of `if` and next explicitly nil 205s does not register offenses if there are multiple guard clauses 205s registers an offense and corrects to `select` with guard clause of `if` and `next` has a value and return nil 205s does not register offenses if `compact` is not chained to `map` 205s registers an offense and corrects to `reject` with guard clause of `unless` 205s registers an offense and corrects to `reject` with modifier form of `unless` condition 205s 205s RuboCop::Cop::Style::Sample 205s behaves like accepts 205s accepts shuffle[-4..-3] 205s behaves like offense 205s registers an offense for shuffle[0...3] 205s behaves like accepts 205s accepts shuffle.at(foo) 205s behaves like accepts 205s accepts shuffle.slice(3, 3) 205s behaves like offense 205s registers an offense for shuffle.at(0) 205s behaves like accepts 205s accepts shuffle.slice(foo, bar) 205s behaves like accepts 205s accepts shuffle.map { |e| e } 205s behaves like accepts 205s accepts shuffle.slice(foo..3) 205s behaves like offense 205s registers an offense for shuffle(random: foo).last(bar) 205s behaves like offense 205s registers an offense for shuffle[0] 205s behaves like accepts 205s accepts shuffle(random: Random.new) 205s Ruby >= 2.7 205s behaves like offense 205s registers an offense for shuffle[...3] 205s behaves like offense 205s registers an offense for shuffle(random: Random.new)[0..3] 205s behaves like accepts 205s accepts shuffle[foo] 205s behaves like offense 205s registers an offense for shuffle(random: Random.new).first(2) 205s behaves like offense 205s registers an offense for shuffle.slice(0, 3) 205s behaves like accepts 205s accepts shuffle.at(2) 205s behaves like accepts 205s accepts shuffle[2] 205s behaves like accepts 205s accepts shuffle[2..-3] 205s behaves like accepts 205s accepts shuffle.slice(foo) 205s behaves like accepts 205s accepts shuffle.slice(foo, 3) 205s behaves like accepts 205s accepts shuffle(random: Random.new).find(&:odd?) 205s behaves like accepts 205s accepts shuffle.join([5, 6, 7]) 205s behaves like accepts 205s accepts shuffle.slice(2..3) 205s behaves like accepts 205s accepts shuffle[foo..3] 205s behaves like offense 205s registers an offense for shuffle[0..3] 205s behaves like accepts 205s accepts shuffle.slice(-4..-3) 205s Ruby >= 2.6 205s behaves like accepts 205s accepts shuffle[3...] 205s behaves like accepts 205s accepts shuffle[3..] 205s behaves like offense 205s registers an offense for shuffle.first(foo) 205s behaves like accepts 205s accepts shuffle.slice(2) 205s behaves like accepts 205s accepts shuffle[2..3] 205s behaves like offense 205s registers an offense for shuffle.slice(0) 205s behaves like offense 205s registers an offense for shuffle(random: Random.new).first 205s behaves like offense 205s registers an offense for shuffle.first(2) 205s behaves like accepts 205s accepts shuffle[foo..bar] 205s behaves like offense 205s registers an offense for shuffle.slice(0...3) 205s behaves like offense 205s registers an offense for shuffle[-1] 205s behaves like accepts 205s accepts shuffle[3, 3] 205s behaves like accepts 205s accepts sample 205s behaves like accepts 205s accepts shuffle[foo, bar] 205s behaves like accepts 205s accepts shuffle(random: Random.new)[2] 205s behaves like offense 205s registers an offense for shuffle.first 205s behaves like offense 205s registers an offense for shuffle.last(bar) 205s behaves like offense 205s registers an offense for shuffle.last(3) 205s behaves like accepts 205s accepts shuffle(random: Random.new)[2, 3] 205s behaves like accepts 205s accepts shuffle[foo, 3] 205s behaves like offense 205s registers an offense for shuffle.slice(-1) 205s behaves like offense 205s registers an offense for shuffle[0, 3] 205s behaves like accepts 205s accepts shuffle.slice(foo..bar) 205s behaves like accepts 205s accepts shuffle.slice(2..-3) 205s behaves like offense 205s registers an offense for shuffle.slice(0..3) 205s behaves like accepts 205s accepts shuffle 205s behaves like offense 205s registers an offense for shuffle.last 205s behaves like offense 205s registers an offense for shuffle.at(-1) 205s 205s RuboCop::Cop::Lint::HeredocMethodCallPosition 205s incorrect cases 205s with trailing comma in method call 205s detects 205s simple incorrect case with paren 205s detects 205s chained case with parens 205s detects 205s chained case no parens 205s detects 205s chained case without args 205s detects 205s chained case with multiple line args 205s detects 205s simple incorrect case 205s detects 205s correct cases 205s accepts chained correct case 205s accepts simple correct case 205s ignores if no call 205s 205s RuboCop::Cop::Style::ReturnNil 205s when enforced style is `return` 205s registers an offense for return nil 205s does not register an offense for return nil from iterators 205s does not register an offense for returning others 205s when enforced style is `return_nil` 205s does not register an offense for returning others 205s registers an offense for return 205s 205s RuboCop::Cop::Style::BarePercentLiterals 205s when EnforcedStyle is bare_percent 205s and strings are static 205s accepts '' 205s accepts "" 205s accepts heredoc 205s accepts "" string with interpolation 205s registers an offense for %Q() 205s accepts regular expressions 205s accepts %() 205s accepts __FILE__ 205s accepts %q 205s and strings are dynamic 205s accepts %q 205s accepts '' 205s accepts "" string with interpolation 205s accepts %() 205s registers an offense for %Q() 205s accepts heredoc 205s accepts "" 205s accepts __FILE__ 205s accepts regular expressions 205s when EnforcedStyle is percent_q 205s and strings are static 205s accepts '' 205s accepts __FILE__ 205s registers an offense for %() 205s accepts %q 205s accepts heredoc 205s accepts %Q() 205s accepts "" 205s accepts regular expressions 205s accepts "" string with interpolation 205s and strings are dynamic 205s accepts __FILE__ 205s accepts heredoc 205s accepts '' 205s registers an offense for %() 205s accepts "" string with interpolation 205s accepts "" 205s accepts %Q() 205s accepts %q 205s accepts regular expressions 205s 205s RuboCop::Cop::Style::UnlessElse 205s unless without else 205s does not register an offense 205s unless with nested if-else 205s registers an offense 205s unless with else 205s registers an offense 205s and nested unless with else 205s registers offenses for both but corrects only the outer unless/else 205s 205s RuboCop::Cop::Lint::DuplicateBranch 205s registers an offense when `case` has multiple duplicate branches 205s does not register an offense when `case` has no duplicate branches 205s does not register an offense when `unless` has no duplicate branches 205s registers an offense when `rescue` has duplicate `else` branch 205s registers an offense when `rescue` has multiple duplicate `resbody` branches 205s registers an offense when `if` has multiple duplicate branches 205s does not register an offense when `rescue` has no duplicate branches 205s registers an offense when `if` has duplicate `else` branch 205s does not register an offense for simple `if` without other branches 205s registers an offense when `rescue` has duplicate `resbody` branch 205s does not register an offense for modifier `if` 205s does not register an offense for empty `if` 205s registers an offense when `if` has duplicate `elsif` branch 205s does not register an offense when ternary has no duplicate branches 205s does not register an offense for empty `unless` 205s registers an offense when `unless` has duplicate `else` branch 205s registers an offense when ternary has duplicate branches 205s does not register an offense when `if` has no duplicate branches 205s does not register an offense for modifier `unless` 205s does not register an offense for simple `unless` without other branches 205s registers an offense when `case` has duplicate `else` branch 205s registers an offense when `case` has duplicate `when` branch 205s with IgnoreConstantBranches: true 205s with `case-match` 205s behaves like literal case-match disallowed 205s when returning a object in multiple branches 205s registers an offense 205s behaves like literal case-match allowed 205s when returning a constant in multiple branches 205s allows branches to be duplicated 205s with `if` 205s behaves like literal if allowed 205s when returning a constant in multiple branches 205s allows branches to be duplicated 205s behaves like literal if disallowed 205s when returning a object in multiple branches 205s registers an offense 205s with `case` 205s behaves like literal case allowed 205s when returning a constant in multiple branches 205s allows branches to be duplicated 205s behaves like literal case disallowed 205s when returning a object in multiple branches 205s registers an offense 205s with `rescue` 205s behaves like literal rescue disallowed 205s when returning a object in multiple branches 205s registers an offense 205s behaves like literal rescue allowed 205s when returning a constant in multiple branches 205s allows branches to be duplicated 205s with IgnoreLiteralBranches: true 205s with `case` 205s behaves like literal case allowed 205s when returning a rational in multiple branches 205s allows branches to be duplicated 205s behaves like literal case allowed 205s when returning a symbol in multiple branches 205s allows branches to be duplicated 205s behaves like literal case allowed 205s when returning a integer in multiple branches 205s allows branches to be duplicated 205s behaves like literal case disallowed 205s when returning a complex erange in multiple branches 205s registers an offense 205s behaves like literal case allowed 205s when returning a complex in multiple branches 205s allows branches to be duplicated 205s behaves like literal case allowed 205s when returning a float in multiple branches 205s allows branches to be duplicated 205s behaves like literal case disallowed 205s when returning a xstr in multiple branches 205s registers an offense 205s behaves like literal case allowed 205s when returning a false in multiple branches 205s allows branches to be duplicated 205s behaves like literal case disallowed 205s when returning a dsym in multiple branches 205s registers an offense 205s behaves like literal case allowed 205s when returning a nil in multiple branches 205s allows branches to be duplicated 205s behaves like literal case allowed 205s when returning a simple erange in multiple branches 205s allows branches to be duplicated 205s behaves like literal case disallowed 205s when returning a complex regexp in multiple branches 205s registers an offense 205s behaves like literal case disallowed 205s when returning a complex irange in multiple branches 205s registers an offense 205s behaves like literal case allowed 205s when returning a array of literals in multiple branches 205s allows branches to be duplicated 205s behaves like literal case allowed 205s when returning a regexp with modifier in multiple branches 205s allows branches to be duplicated 205s behaves like literal case allowed 205s when returning a regexp in multiple branches 205s allows branches to be duplicated 205s behaves like literal case disallowed 205s when returning a dstr in multiple branches 205s registers an offense 205s behaves like literal case allowed 205s when returning a empty array in multiple branches 205s allows branches to be duplicated 205s behaves like literal case disallowed 205s when returning a complex array in multiple branches 205s registers an offense 205s behaves like literal case allowed 205s when returning a simple irange in multiple branches 205s allows branches to be duplicated 205s behaves like literal case allowed 205s when returning a hash of literals in multiple branches 205s allows branches to be duplicated 205s behaves like literal case allowed 205s when returning a true in multiple branches 205s allows branches to be duplicated 205s and IgnoreConstBranches: true 205s behaves like literal case allowed 205s when returning a array of constants in multiple branches 205s allows branches to be duplicated 205s behaves like literal case allowed 205s when returning a hash of constants in multiple branches 205s allows branches to be duplicated 205s behaves like literal case disallowed 205s when returning a complex hash in multiple branches 205s registers an offense 205s behaves like literal case allowed 205s when returning a empty hash in multiple branches 205s allows branches to be duplicated 205s behaves like literal case disallowed 205s when returning a method call in multiple branches 205s registers an offense 205s behaves like literal case disallowed 205s when returning a variable in multiple branches 205s registers an offense 205s behaves like literal case allowed 205s when returning a string in multiple branches 205s allows branches to be duplicated 205s and IgnoreConstBranches: false 205s behaves like literal case disallowed 205s when returning a hash of constants in multiple branches 205s registers an offense 205s behaves like literal case disallowed 205s when returning a array of constants in multiple branches 205s registers an offense 205s with `rescue` 205s behaves like literal rescue disallowed 205s when returning a complex hash in multiple branches 205s registers an offense 205s and IgnoreConstBranches: true 205s behaves like literal rescue allowed 205s when returning a array of constants in multiple branches 205s allows branches to be duplicated 205s behaves like literal rescue allowed 205s when returning a hash of constants in multiple branches 205s allows branches to be duplicated 205s behaves like literal rescue disallowed 205s when returning a method call in multiple branches 205s registers an offense 205s behaves like literal rescue allowed 205s when returning a true in multiple branches 205s allows branches to be duplicated 205s behaves like literal rescue disallowed 205s when returning a variable in multiple branches 205s registers an offense 205s behaves like literal rescue allowed 205s when returning a integer in multiple branches 205s allows branches to be duplicated 205s behaves like literal rescue disallowed 205s when returning a complex array in multiple branches 205s registers an offense 205s behaves like literal rescue disallowed 205s when returning a complex regexp in multiple branches 205s registers an offense 205s behaves like literal rescue disallowed 205s when returning a dsym in multiple branches 205s registers an offense 205s behaves like literal rescue allowed 205s when returning a regexp with modifier in multiple branches 205s allows branches to be duplicated 205s behaves like literal rescue disallowed 205s when returning a xstr in multiple branches 205s registers an offense 205s behaves like literal rescue allowed 205s when returning a false in multiple branches 205s allows branches to be duplicated 205s behaves like literal rescue allowed 205s when returning a symbol in multiple branches 205s allows branches to be duplicated 205s behaves like literal rescue allowed 205s when returning a simple irange in multiple branches 205s allows branches to be duplicated 205s behaves like literal rescue allowed 205s when returning a array of literals in multiple branches 205s allows branches to be duplicated 205s behaves like literal rescue allowed 205s when returning a regexp in multiple branches 205s allows branches to be duplicated 205s behaves like literal rescue allowed 205s when returning a string in multiple branches 205s allows branches to be duplicated 205s behaves like literal rescue allowed 205s when returning a empty array in multiple branches 205s allows branches to be duplicated 205s behaves like literal rescue allowed 205s when returning a simple erange in multiple branches 205s allows branches to be duplicated 205s behaves like literal rescue disallowed 205s when returning a complex irange in multiple branches 205s registers an offense 205s behaves like literal rescue allowed 205s when returning a nil in multiple branches 205s allows branches to be duplicated 205s behaves like literal rescue disallowed 205s when returning a dstr in multiple branches 205s registers an offense 205s behaves like literal rescue disallowed 205s when returning a complex erange in multiple branches 205s registers an offense 205s behaves like literal rescue allowed 205s when returning a complex in multiple branches 205s allows branches to be duplicated 205s and IgnoreConstBranches: false 205s behaves like literal rescue disallowed 205s when returning a array of constants in multiple branches 205s registers an offense 205s behaves like literal rescue disallowed 205s when returning a hash of constants in multiple branches 205s registers an offense 205s behaves like literal rescue allowed 205s when returning a hash of literals in multiple branches 205s allows branches to be duplicated 205s behaves like literal rescue allowed 205s when returning a rational in multiple branches 205s allows branches to be duplicated 205s behaves like literal rescue allowed 205s when returning a empty hash in multiple branches 205s allows branches to be duplicated 205s behaves like literal rescue allowed 205s when returning a float in multiple branches 205s allows branches to be duplicated 205s with `if` 205s behaves like literal if allowed 205s when returning a complex in multiple branches 205s allows branches to be duplicated 205s behaves like literal if allowed 205s when returning a empty hash in multiple branches 205s allows branches to be duplicated 205s behaves like literal if allowed 205s when returning a simple erange in multiple branches 205s allows branches to be duplicated 205s behaves like literal if disallowed 205s when returning a complex irange in multiple branches 205s registers an offense 205s behaves like literal if allowed 205s when returning a integer in multiple branches 205s allows branches to be duplicated 205s behaves like literal if disallowed 205s when returning a xstr in multiple branches 205s registers an offense 205s behaves like literal if allowed 205s when returning a rational in multiple branches 205s allows branches to be duplicated 205s behaves like literal if allowed 205s when returning a string in multiple branches 205s allows branches to be duplicated 205s behaves like literal if disallowed 205s when returning a dstr in multiple branches 205s registers an offense 205s and IgnoreConstBranches: true 205s behaves like literal if allowed 205s when returning a array of constants in multiple branches 205s allows branches to be duplicated 205s behaves like literal if allowed 205s when returning a hash of constants in multiple branches 205s allows branches to be duplicated 205s behaves like literal if disallowed 205s when returning a complex array in multiple branches 205s registers an offense 205s behaves like literal if disallowed 205s when returning a complex hash in multiple branches 205s registers an offense 205s behaves like literal if disallowed 205s when returning a dsym in multiple branches 205s registers an offense 205s behaves like literal if allowed 205s when returning a true in multiple branches 205s allows branches to be duplicated 205s behaves like literal if disallowed 205s when returning a complex regexp in multiple branches 205s registers an offense 205s behaves like literal if disallowed 205s when returning a variable in multiple branches 205s registers an offense 205s behaves like literal if allowed 205s when returning a false in multiple branches 205s allows branches to be duplicated 205s behaves like literal if allowed 205s when returning a symbol in multiple branches 205s allows branches to be duplicated 205s behaves like literal if allowed 205s when returning a float in multiple branches 205s allows branches to be duplicated 205s behaves like literal if allowed 205s when returning a nil in multiple branches 205s allows branches to be duplicated 205s and IgnoreConstBranches: false 205s behaves like literal if disallowed 205s when returning a hash of constants in multiple branches 205s registers an offense 205s behaves like literal if disallowed 205s when returning a array of constants in multiple branches 205s registers an offense 205s behaves like literal if allowed 205s when returning a hash of literals in multiple branches 205s allows branches to be duplicated 205s behaves like literal if allowed 205s when returning a empty array in multiple branches 205s allows branches to be duplicated 205s behaves like literal if allowed 205s when returning a simple irange in multiple branches 205s allows branches to be duplicated 205s behaves like literal if disallowed 205s when returning a method call in multiple branches 205s registers an offense 205s behaves like literal if disallowed 205s when returning a complex erange in multiple branches 205s registers an offense 205s behaves like literal if allowed 205s when returning a regexp in multiple branches 205s allows branches to be duplicated 205s behaves like literal if allowed 205s when returning a array of literals in multiple branches 205s allows branches to be duplicated 205s behaves like literal if allowed 205s when returning a regexp with modifier in multiple branches 205s allows branches to be duplicated 205s 205s RuboCop::Cop::Style::MultilineMethodSignature 205s when arguments span multiple lines 205s when correction would not exceed maximum line length 205s registers an offense and corrects 205s when correction would exceed maximum line length 205s does not register an offense 205s when defining an class method 205s registers an offense and corrects when `end` is on the following line 205s registers an offense and corrects when `end` is on the same line with only closing parentheses 205s registers an offense and corrects when `end` is on the same line 205s when defining an instance method 205s registers an offense and corrects when `end` is on the same line with last argument 206s registers an offense and corrects when `end` is on the following line 206s registers an offense and corrects when `end` is on the same line with only closing parentheses 206s when arguments span a single line 206s when defining an instance method 206s registers an offense and corrects when line break after opening parenthesis 206s registers an offense and corrects when closing paren is on the following line 206s when method signature is on a single line 206s does not register an offense for parameterized method 206s does not register an offense for unparameterized method 206s when defining an class method 206s when arguments span a single line 206s registers an offense and corrects when closing paren is on the following line 206s when method signature is on a single line 206s does not register an offense for unparameterized method 206s does not register an offense for parameterized method 206s 206s RuboCop::Cop::Lint::RescueType 206s accepts rescuing nothing 206s accepts rescuing a single exception 206s accepts rescue modifier 206s accepts rescuing nothing within a method definition 206s behaves like offenses 206s begin rescue ensure 206s rescuing from :symbol 206s registers an offense and autocorrects 206s begin rescue 206s rescuing from :symbol before another exception 206s registers an offense and autocorrects 206s rescuing from :symbol 206s registers an offense and autocorrects 206s rescuing from :symbol after another exception 206s registers an offense and autocorrects 206s def rescue 206s rescuing from :symbol 206s registers an offense and autocorrects 206s def rescue ensure 206s rescuing from :symbol 206s registers an offense and autocorrects 206s behaves like offenses 206s def rescue ensure 206s rescuing from [] 206s registers an offense and autocorrects 206s def rescue 206s rescuing from [] 206s registers an offense and autocorrects 206s begin rescue ensure 206s rescuing from [] 206s registers an offense and autocorrects 206s begin rescue 206s rescuing from [] after another exception 206s registers an offense and autocorrects 206s rescuing from [] 206s registers an offense and autocorrects 206s rescuing from [] before another exception 206s registers an offense and autocorrects 206s behaves like offenses 206s def rescue ensure 206s rescuing from 0 206s registers an offense and autocorrects 206s def rescue 206s rescuing from 0 206s registers an offense and autocorrects 206s begin rescue ensure 206s rescuing from 0 206s registers an offense and autocorrects 206s begin rescue 206s rescuing from 0 after another exception 206s registers an offense and autocorrects 206s rescuing from 0 before another exception 206s registers an offense and autocorrects 206s rescuing from 0 206s registers an offense and autocorrects 206s behaves like offenses 206s def rescue 206s rescuing from 0.0 206s registers an offense and autocorrects 206s begin rescue ensure 206s rescuing from 0.0 206s registers an offense and autocorrects 206s def rescue ensure 206s rescuing from 0.0 206s registers an offense and autocorrects 206s begin rescue 206s rescuing from 0.0 206s registers an offense and autocorrects 206s rescuing from 0.0 before another exception 206s registers an offense and autocorrects 206s rescuing from 0.0 after another exception 206s registers an offense and autocorrects 206s behaves like offenses 206s begin rescue ensure 206s rescuing from 'string' 206s registers an offense and autocorrects 206s def rescue ensure 206s rescuing from 'string' 206s registers an offense and autocorrects 206s def rescue 206s rescuing from 'string' 206s registers an offense and autocorrects 206s begin rescue 206s rescuing from 'string' after another exception 206s registers an offense and autocorrects 206s rescuing from 'string' 206s registers an offense and autocorrects 206s rescuing from 'string' before another exception 206s registers an offense and autocorrects 206s behaves like offenses 206s begin rescue ensure 206s rescuing from {} 206s registers an offense and autocorrects 206s def rescue 206s rescuing from {} 206s registers an offense and autocorrects 206s def rescue ensure 206s rescuing from {} 206s registers an offense and autocorrects 206s begin rescue 206s rescuing from {} 206s registers an offense and autocorrects 206s rescuing from {} after another exception 206s registers an offense and autocorrects 206s rescuing from {} before another exception 206s registers an offense and autocorrects 206s behaves like offenses 206s def rescue 206s rescuing from "#{string}" 206s registers an offense and autocorrects 206s begin rescue 206s rescuing from "#{string}" after another exception 206s registers an offense and autocorrects 206s rescuing from "#{string}" 206s registers an offense and autocorrects 206s rescuing from "#{string}" before another exception 206s registers an offense and autocorrects 206s def rescue ensure 206s rescuing from "#{string}" 206s registers an offense and autocorrects 206s begin rescue ensure 206s rescuing from "#{string}" 206s registers an offense and autocorrects 206s behaves like offenses 206s begin rescue ensure 206s rescuing from nil 206s registers an offense and autocorrects 206s def rescue 206s rescuing from nil 206s registers an offense and autocorrects 206s def rescue ensure 206s rescuing from nil 206s registers an offense and autocorrects 206s begin rescue 206s rescuing from nil after another exception 206s registers an offense and autocorrects 206s rescuing from nil 206s registers an offense and autocorrects 206s rescuing from nil before another exception 206s registers an offense and autocorrects 206s 206s RuboCop::Cop::Lint::DeprecatedConstants 206s registers and corrects an offense when using `::TRUE` 206s registers and corrects an offense when using `::NIL` 206s registers and corrects an offense when using `FALSE` 206s registers and corrects an offense when using deprecated methods that have no deprecated version 206s registers and corrects an offense when using `TRUE` 206s registers and corrects an offense when using deprecated methods that have no alternative 206s does not register an offense when using `__ENCODING__ 206s registers and corrects an offense when using `::FALSE` 206s does not register an offense when not using deprecated constant 206s registers and corrects an offense when using `NIL` 206s registers and corrects an offense when using `::Triple::Nested::Constant` 206s Ruby >= 2.6 206s registers and corrects an offense when using `Net::HTTPServerException` 206s Ruby <= 2.7 206s does not register an offense when using `Random::DEFAULT` 206s Ruby <= 2.5 206s does not register an offense when using `Net::HTTPServerException` 206s Ruby >= 3.0 206s registers and corrects an offense when using `::Random::DEFAULT` 206s registers and corrects an offense when using `Random::DEFAULT` 206s 206s RuboCop::Cop::Layout::MultilineMethodDefinitionBraceLayout 206s ignores implicit defs 206s ignores defs without params 206s ignores single-line defs 206s symmetrical style 206s opening brace on separate line from first element 206s detects closing brace on same line as last element 206s allows closing brace on separate line from last multiline element 206s allows closing brace on separate line from last element 206s opening brace on same line as first element 206s detects closing brace on different line from last element 206s allows closing brace on same line as last multiline element 206s autocorrects closing brace on different line from last element 206s allows closing brace on same line as last element 206s heredoc 206s ignores heredocs that could share a last line 206s detects heredoc structures that are safe to add to 206s new_line style 206s opening brace on same line as first element 206s allows closing brace on different line from last element 206s autocorrects closing brace on same line as last element 206s allows closing brace on different line from multi-line element 206s detects closing brace on same line as last multiline element 206s opening brace on separate line from first element 206s allows closing brace on separate line from last element 206s detects closing brace on same line as last element 206s allows closing brace on separate line from last multiline element 206s same_line style 206s opening brace on separate line from first element 206s allows closing brace on same line as last multiline element 206s allows closing brace on same line as last element 206s detects closing brace on different line from last element 206s opening brace on same line as first element 206s allows closing brace on same line from last element 206s autocorrects closing brace on different line as last element 206s detects closing brace on different line from multiline element 206s allows closing brace on same line as multi-line element 206s 206s RuboCop::Cop::Style::OneLineConditional 206s when AlwaysCorrectToMultiline is true 206s does not register an offense for if/then/else/end with empty else 206s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 206s registers and corrects an offense with multi-line construct for if-then-elsif-then-elsif-then-else-end 206s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 206s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 206s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end that contains method calls with parenthesized arguments 206s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end that contains method calls with unparenthesized arguments 206s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 206s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 206s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 206s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 206s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 206s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 206s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 206s does not register an offense for unless/then/end 206s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 206s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end that contains unparenthesized operator method calls 206s registers and corrects an offense with multi-line construct for unless/then/else/end 206s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 206s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 206s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 206s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 206s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 206s registers and corrects an offense with multi-line construct for if/then/else/end 206s registers and corrects an offense with multi-line construct when one of the branches of if/then/else/end contains `next` keyword 206s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 206s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 206s does not register an offense for unless/then/else/end with empty else 206s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 206s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 206s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 206s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 206s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 206s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 206s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 206s registers and corrects an offense with multi-line construct for if/then/else/end when `then` without body 206s registers and corrects an offense with multi-line construct for if-then-elsif-then-else-end 206s does not register an offense for if/then/end 206s behaves like if/then/else/end with keyword 206s registers and corrects an offense with multi-line construct when one of the branches of if/then/else/end contains `self` keyword 206s behaves like if/then/else/end with constructs changing precedence 206s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end with `defined? :A` constructs inside inner branches 206s behaves like if/then/else/end with constructs changing precedence 206s 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 206s behaves like if/then/else/end with constructs changing precedence 206s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end with `super b` constructs inside inner branches 206s behaves like if/then/else/end with constructs changing precedence 206s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end with `yield a` constructs inside inner branches 206s behaves like if/then/else/end with keyword 206s registers and corrects an offense with multi-line construct when one of the branches of if/then/else/end contains `raise` keyword 206s behaves like if/then/else/end with constructs changing precedence 206s 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 206s behaves like if/then/else/end with constructs changing precedence 206s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end with `a = b` constructs inside inner branches 206s behaves like if/then/else/end with constructs changing precedence 206s 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 206s behaves like if/then/else/end with keyword 206s registers and corrects an offense with multi-line construct when one of the branches of if/then/else/end contains `break` keyword 206s behaves like if/then/else/end with constructs changing precedence 206s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end with `not a` constructs inside inner branches 206s behaves like if/then/else/end with constructs changing precedence 206s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end with `puts 1` constructs inside inner branches 206s behaves like if/then/else/end with keyword 206s registers and corrects an offense with multi-line construct when one of the branches of if/then/else/end contains `retry` keyword 206s when IndentationWidth differs from default 206s registers and corrects an offense with multi-line construct for if/then/else/end 206s when AlwaysCorrectToMultiline is false 207s does not register an offense for unless/then/else/end with empty else 207s registers and corrects an offense with ternary operator and adding parentheses for if/then/else/end that contains method calls with unparenthesized arguments 207s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 207s registers and corrects an offense with ternary operator for unless/then/else/end 207s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 207s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 207s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 207s registers and corrects an offense with ternary operator when one of the branches of if/then/else/end contains `next` keyword 207s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 207s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 207s does not register an offense for if/then/end 207s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 207s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 207s registers and corrects an offense with multi-line construct for if-then-elsif-then-else-end 207s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 207s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 207s registers and corrects an offense with ternary operator without adding parentheses for if/then/else/end that contains method calls with parenthesized arguments 207s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 207s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 207s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 207s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 207s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 207s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 207s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 207s does not register an offense for if/then/else/end with empty else 207s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 207s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 207s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 207s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 207s does not register an offense for unless/then/end 207s registers and corrects an offense with ternary operator without adding parentheses for if/then/else/end that contains unparenthesized operator method calls 207s registers and corrects an offense with multi-line construct for if-then-elsif-then-end 207s registers and corrects an offense with ternary operator for if/then/else/end when `then` without body 207s registers and corrects an offense with ternary operator for if/then/else/end 207s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 207s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 207s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 207s registers and corrects an offense with multi-line construct for if-then-elsif-then-elsif-then-else-end 207s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 207s behaves like if/then/else/end with constructs changing precedence 207s 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 207s behaves like if/then/else/end with constructs changing precedence 207s registers and corrects an offense with ternary operator and adding parentheses inside for if/then/else/end with `puts 1` constructs inside inner branches 207s behaves like if/then/else/end with keyword 207s registers and corrects an offense with ternary operator when one of the branches of if/then/else/end contains `break` keyword 207s behaves like if/then/else/end with constructs changing precedence 207s registers and corrects an offense with ternary operator and adding parentheses inside for if/then/else/end with `super b` constructs inside inner branches 207s behaves like if/then/else/end with keyword 207s registers and corrects an offense with ternary operator when one of the branches of if/then/else/end contains `retry` keyword 207s behaves like if/then/else/end with constructs changing precedence 207s registers and corrects an offense with ternary operator and adding parentheses inside for if/then/else/end with `yield a` constructs inside inner branches 207s behaves like if/then/else/end with constructs changing precedence 207s registers and corrects an offense with ternary operator and adding parentheses inside for if/then/else/end with `a = b` constructs inside inner branches 207s behaves like if/then/else/end with keyword 207s registers and corrects an offense with ternary operator when one of the branches of if/then/else/end contains `raise` keyword 207s behaves like if/then/else/end with constructs changing precedence 207s registers and corrects an offense with ternary operator and adding parentheses inside for if/then/else/end with `defined? :A` constructs inside inner branches 207s behaves like if/then/else/end with constructs changing precedence 207s 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 207s behaves like if/then/else/end with keyword 207s registers and corrects an offense with ternary operator when one of the branches of if/then/else/end contains `self` keyword 207s behaves like if/then/else/end with constructs changing precedence 207s registers and corrects an offense with ternary operator and adding parentheses inside for if/then/else/end with `not a` constructs inside inner branches 207s behaves like if/then/else/end with constructs changing precedence 207s 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 207s 207s RuboCop::Cop::Style::MultipleComparison 207s registers an offense and corrects when `a` is compared twice 207s registers an offense and corrects when `a` is compared twice in `if` and `elsif` conditions 207s registers an offense and corrects when `a` is compared three times on the right hand side 207s does not register an offense for comparing lvars when a string is on the lefthand side 207s does not register an offense for Array#include? 207s does not register an offense for comparing lvars 207s registers an offense and corrects when multiple comparison is not part of a conditional 207s does not register an offense for a == b || b == a 207s does not register an offense when comparing two sides of the disjunction is unrelated 207s does not register an offense for comparing multiple literal strings 207s does not register an offense for comparing multiple int literals 207s does not register an offense for a duplicated condition 207s registers an offense and corrects when `a` is compared three times 207s does not register an offense for comparing an lvar 207s registers an offense and corrects when `a` is compared three times, once on the righthand side 207s when `AllowMethodComparison: false` 207s registers an offense and corrects when using multiple method calls 207s when `AllowMethodComparison: true` 207s does not register an offense when using multiple method calls 207s 207s RuboCop::Cop::Style::ClassCheck 207s when enforced style is kind_of? 207s registers an offense for is_a? and corrects to kind_of? 207s when enforced style is is_a? 207s registers an offense for kind_of? and corrects to is_a? 207s 207s RuboCop::Cop::Style::BisectedAttrAccessor 207s registers and corrects in a module 207s registers an offense and corrects properly when attr_writer is before attr_reader 207s registers an offense for accessors with the same visibility in different scopes 207s does not register an offense when only one accessor of the name exists 207s registers an offense and corrects when within eigenclass 207s registers an offense and corrects when both accessors are in the same visibility scope 207s does not register an offense when using `attr_accessor` 207s registers an offense and corrects when both accessors of the name exists and accessor contains multiple names 207s does not register an offense when accessors are within different visibility scopes 207s registers an offense and corrects when both accessors of the name exists 207s registers an offense and corrects when both accessors of the splat exists 207s registers an offense and corrects when attr and attr_writer exists 207s multiple bisected accessors 207s when some attr names are bisected 207s registers and retains non-bisected attrs 207s when all attr names are bisected 207s registers and replaces with attr_accessor 207s 207s RuboCop::Cop::Style::DefWithParentheses 207s reports an offense for class def with empty parens 207s reports an offense for def with empty parens 207s accepts empty parentheses in one liners 207s accepts def without arguments 207s accepts def with arg and parens 207s Ruby >= 3.0 207s reports an offense for endless method definition with empty parens 207s 207s RuboCop::Cop::Layout::IndentationWidth 207s with Width set to 4 207s registers and corrects offense for bad indentation 207s with ignored patterns set 207s accepts unindented lines for those keywords 207s with if statement 207s registers an offense for bad indentation of an if body 207s for a file with byte order mark 207s accepts correctly indented method definition 207s with Width set to 2 207s with if statement 207s does not raise any error with empty braces 207s accepts a correctly aligned if/elsif/else/end 207s accepts `ensure` after an empty body 207s accepts an if/else branches with rescue clauses 207s accepts indentation after if on new line after assignment 207s registers an offense for bad indentation of an else body when if body contains no code 207s accepts `rescue`/`ensure` after an empty def 207s registers an offense for bad indentation of an else body 207s accepts `rescue`/`ensure` after an empty body 207s registers an offense for bad indentation of an elsif body 207s does not correct in scopes that contain block comments 207s leaves block unchanged if block end is not on its own line 207s accepts a correctly aligned if/elsif/else/end as a method argument 207s registers an offense for bad indentation of an else body when if and elsif body contains no code 207s accepts `rescue` after an empty def 207s registers offense for bad indentation of ternary inside else 207s accepts a one line if statement 207s does not indent heredoc strings 207s leaves rescue ; end unchanged 207s accepts `rescue` after an empty body 207s accepts `ensure` after an empty def 207s accepts if/elsif/else/end laid out as a table 207s handles lines with only whitespace 207s accepts an empty if 207s accepts if/then/else/end laid out as another table 207s registers and corrects on offense for bad indentation 207s indents parenthesized expressions 207s registers offense for bad indentation of modifier if in else 207s registers an offense for bad indentation of an if body 207s with assignment 207s when alignment style is keyword 207s and end is aligned with variable 207s registers an offense for an if 207s registers and corrects bad indentation 207s registers an offense for a while 207s and end is aligned with keyword 207s accepts an if/else in assignment 207s accepts an if in assignment 207s accepts an until in assignment 207s accepts an if/else in assignment on next line 207s accepts a while in assignment 207s when alignment style is start_of_line 207s and end is aligned randomly 207s registers an offense for an until 207s registers an offense for a while 207s registers an offense for an if 207s and end is aligned with keyword 207s accepts an if/else in assignment on next line 207s registers an offense for an if with element assignment 207s registers an offense for a while 207s registers an offense for an if with setter 207s registers an offense for an until 207s registers an offense for an if 207s and end is aligned with variable 207s accepts an if/else with chaining with a block after the end 207s accepts an if/else 207s accepts an if/else with chaining after the end 207s accepts an if with end aligned with element assignment 207s accepts an if with end aligned with variable 207s accepts an if with end aligned with setter 207s when alignment style is variable 207s and end is aligned with keyword 207s registers an offense for an until 207s accepts an if/else in assignment on next line 207s registers an offense for a while 207s registers an offense for an if with element assignment 207s registers an offense for an if with setter 207s registers an offense for an if 207s and end is aligned with variable 207s accepts an if/else with chaining with a block after the end 207s accepts an if with end aligned with variable 207s accepts an if with end aligned with setter 207s accepts an if with end aligned with element assignment 207s accepts an if/else with chaining after the end 207s accepts an if/else 207s and end is aligned randomly 207s registers an offense for a while 207s registers an offense for an if 207s registers an offense for an until 207s with class 207s leaves body unchanged if the first body line is on the same line with an opening of singleton class 207s accepts an empty class body 207s registers an offense for bad indentation of a class body 207s leaves body unchanged if the first body line is on the same line with class keyword 207s when consistency style is indented_internal_methods 207s registers an offense for normal non-indented internal methods indentation 207s registers an offense for normal non-indented internal methods indentation when defined in a singleton class 207s when consistency style is outdent 207s accepts access modifier is outdent 207s when consistency style is normal 207s registers offenses for indented_internal_methods indentation 207s accepts indented public, protected, and private 207s with access modifier 207s registers an offense and corrects for bad modifier indentation before good method definition 207s registers an offense for bad indentation of sections 207s with def/rescue/end 207s registers an offense for bad indentation of bodies 207s registers an offense for bad indent of defs bodies with a modifier 207s with def/defs 207s when end is aligned with def 207s with an assignment 207s registers an offense for bad indentation of a def body 207s accepts an empty def body 207s registers an offense for bad indentation of a defs body 207s accepts an empty defs body 207s when modifier and def are on the same line 207s accepts a correctly aligned body 207s registers an offense for bad indentation of a def body 207s registers an offense for bad indentation of a defs body 207s when end is aligned with start of line 207s registers an offense for bad indentation of a defs body 207s accepts an empty def body 207s registers an offense for bad indentation of a def body 207s with an assignment 207s accepts an empty defs body 207s when modifier and def are on the same line 207s registers an offense for bad indentation of a def body 207s accepts a correctly aligned body 207s registers an offense for bad indentation of a defs body 207s when multiple modifiers and def are on the same line 207s registers an offense for bad indentation of a defs body 207s registers an offense for bad indentation of a def body 207s accepts a correctly aligned body 207s when multiple modifiers are used in a block anda method call is made at end of the block 207s registers an offense for bad indentation of a def body 207s registers an offense for bad indentation of a def 207s accepts a correctly aligned body 207s with begin/rescue/else/ensure/end 207s registers an offense for bad indentation of bodies 207s with case 207s accepts correctly indented case/when/else 207s registers an offense for bad indentation in a case/when body 207s accepts aligned values in when clause 207s accepts indented when/else plus indented body 207s accepts case/when/else laid out as a table 207s accepts case/when/else with then beginning a line 207s registers an offense for bad indentation in a case/else body 207s with while/until 207s registers an offense for bad indentation of a while body 207s registers an offense for bad indentation of begin/end/while 207s registers an offense for bad indentation of an until body 207s accepts an empty while 207s with module 207s leaves body unchanged if the first body line is on the same line with module keyword 207s when consistency style is indented_internal_methods 207s registers an offense for bad indentation of a module body 207s accepts normal non-indented internal methods of module functions 207s when consistency style is normal 207s registers an offense for bad indentation of a module body 207s accepts an empty module body 207s with block 207s registers an offense for bad indentation of a do/end body 207s accepts a correctly indented block body 207s registers an offense for bad indentation of `do` ... `ensure` ... `end` block 207s registers an offense for bad indentation of a {} body 207s does not register an offense for good indentation of `do` ... `ensure` ... `end` block 207s accepts badly indented code if block end is not on separate line 207s accepts an empty block body 207s when consistency style is indented_internal_methods 207s registers an offense for bad indentation in a do/end body 207s when using safe navigation operator 207s registers an offense for bad indentation of a {} body 207s registers an offense for an if with setter 207s Ruby 2.7 207s registers an offense for bad indentation of a do-end body 207s registers an offense for bad indentation of a {} body 207s with case match 207s registers an offense for bad indentation in a case/else body 207s accepts aligned values in `in` clause 207s accepts correctly indented case/in/else 207s accepts case/in/else with then beginning a line 207s accepts indented in/else plus indented body 207s accepts aligned value in `in` clause and `else` is empty 207s accepts case/in/else laid out as a table 207s registers an offense for bad indentation in a case/in body 207s with unless 207s registers an offense for bad indentation of an unless body 207s accepts an empty unless 207s with for 207s registers an offense for bad indentation of a for body 207s accepts an empty for 207s 207s RuboCop::Cop::InternalAffairs::RedundantMessageArgument 207s does not register an offense when `#message` with another node is passed 207s does not register an offense when formatted `MSG` is passed 207s when `#message` is passed 207s registers an offense 207s when `#message` with offending node is passed 207s when message is the only keyword argument 207s registers an offense 207s when there are others keyword arguments 207s registers an offense 207s when `MSG` is passed 207s registers an offense 207s 207s RuboCop::Cop::Style::TrivialAccessors 207s accepts writer nested within a module 207s accepts expressions within reader 207s registers an offense on one-liner writer 207s registers an offense on class reader 207s accepts non-trivial reader 207s accepts splats 207s accepts blocks 207s flags a reader inside a class, inside an instance_eval call 207s accepts non-trivial writer 207s accepts writer nested within an instance_eval call 207s registers an offense on class writer 207s accepts writer in a module 207s accepts reader nested within an instance_eval call 207s does not register an offense on DSL-style writer 207s registers an offense on instance reader 207s registers an offense on reader with `private` 207s registers an offense on writer without braces 207s registers an offense on one-liner reader 207s accepts writer using top level 207s accepts reader nested within a module 207s registers an offense on reader with braces 207s registers an offense on instance writer 207s accepts an initialize method looking like a writer 207s accepts expressions within writer 207s accepts writer with different ivar name 207s accepts reader using top level 207s accepts reader with different ivar name 207s ignore class methods 207s accepts class reader 207s accepts class writer 207s with DSL denied 207s registers an offense on DSL-style writer 207s allow predicates 207s accepts predicate-like reader 207s exact name match disabled 207s registers an offense when names mismatch in writer 207s registers an offense when names mismatch in reader 207s with allowed methods 207s accepts allowed reader 207s accepts allowed writer 207s with AllowPredicates: false 207s accepts allowed predicate 207s disallow predicates 207s does not accept predicate-like reader 207s 207s RuboCop::Cop::Layout::SpaceAroundOperators 207s accepts operator surrounded by tabs 207s accepts operators with spaces 207s accepts unary operators without space 207s accepts the result of the ExtraSpacing Cop 207s registers an offense and corrects singleton class operator` 207s accepts ranges 207s accepts argument default values without space 207s accepts some operators that are exceptions & don't need spaces 207s accepts []= without space 207s accepts [arg] without space 207s accepts a unary 207s accepts an assignment followed by newline 207s accepts exclamation point definition 207s accepts exponent operator without spaces 207s accepts operator symbols 207s accepts an assignment with the same alignment margins 207s accepts an assignment with a blank line 207s accepts [] without space 207s accepts ::Kernel::raise 207s registers an offenses for exponent operator with spaces 207s registers an offense and corrects exclamation point negation 207s accepts rational 207s accepts splat operator 207s accepts an assignment with spaces 207s accepts an operator called with method syntax 207s accepts def of operator 207s accepts an operator at the end of a line 207s accepts an operator at the beginning of a line 207s accepts scope operator 207s accepts an assignment by `for` statement 207s missing space around operators 207s registers an offense and corrects string concatenation without messing up new lines 207s registers an offense and corrects equality operators without space 207s registers an offense and corrects various assignments without space 207s registers an offense and corrects match operators without space 207s registers an offense and corrects hash rocket without space at rescue 207s registers an offense for operators without spaces 207s registers an offense and corrects a setter call without spaces 207s doesn't register an offense for operators with newline on right 207s registers an offense and corrects arguments to a method 207s registers an offense for binary operators that could be unary 207s registers an offense for assignment without space on both sides 207s registers an offense and corrects `-` without space with a negative lhs operand 207s registers an offense and corrects inheritance < without space 207s behaves like modifier with missing space 207s registers an offense in presence of modifier until statement 207s behaves like modifier with missing space 207s registers an offense in presence of modifier unless statement 207s when a hash literal is on a single line 207s and Layout/HashAlignment:EnforcedHashRocketStyle is key 207s registers an offense and corrects a hash rocket without spaces 207s and Layout/HashAlignment:EnforcedHashRocketStyle is table 208s registers an offense and corrects a hash rocket without spaces 208s behaves like modifier with missing space 208s registers an offense in presence of modifier while statement 208s when a hash literal is on multiple lines 208s and Layout/HashAlignment:EnforcedHashRocketStyle is table 208s doesn't register an offense for a hash rocket without spaces 208s and Layout/HashAlignment:EnforcedHashRocketStyle is key 208s registers an offense and corrects a hash rocket without spaces 208s ternary operators 208s registers an offense and corrects operators with no spaces 208s registers an offense and corrects operators with just a leading space 208s registers an offense and corrects operators with just a trailing space 208s behaves like modifier with missing space 208s registers an offense in presence of modifier if statement 208s when Layout/ExtraSpacing has `ForceEqualSignAlignment` configured to true 208s allows constants to be aligned 208s allows variables to be aligned 208s extra space around operators 208s registers an offense and corrects operators with too many spaces 208s registers an offense and corrects equality operators with too many spaces 208s registers an offense and corrects `-` with too many spaces with negative lhs operand 208s registers an offense and corrects arguments to a method 208s registers an offense and corrects a setter call with too many spaces 208s registers an offense and corrects various assignments with too many spaces 208s registers an offense and corrects match operators with too many spaces 208s registers an offense and corrects hash rocket with too many spaces at rescue 208s does not register an offenses match operators between `<<` and `+=` 208s does not register an offenses match operators between `+=` and `<<` 208s registers an offense and corrects operators with too many spaces on the same line 208s registers an offense and corrects ternary operator with too many spaces 208s registers an offense and corrects assignment with too many spaces on either side 208s accepts for a hash rocket with an extra space for alignment on multiple line 208s registers an offense and corrects inheritance < with too many spaces 208s registers an offense and corrects a hash rocket with an extra spaceon multiple line 208s registers an offense and corrects a hash rocket with too many spaces 208s registers an offense and corrects binary operators that could be unary 208s behaves like modifier with extra space 208s registers an offense in presence of modifier unless statement 208s behaves like modifier with extra space 208s registers an offense in presence of modifier if statement 208s behaves like modifier with extra space 208s registers an offense in presence of modifier until statement 208s behaves like modifier with extra space 208s registers an offense in presence of modifier while statement 208s when does not allowed for alignment 208s registers an offense and corrects an extra space 208s when EnforcedStyleForExponentOperator is space 208s registers an offenses for exponent operator without spaces 208s >= Ruby 2.7 208s does not register an offenses for one-line pattern matching syntax (`in`) 208s >= Ruby 3.0 208s registers an offenses for one-line pattern matching syntax (`=>`) 208s 208s RuboCop::Cop::Lint::RaiseException 208s registers an offense and corrects for `raise` with `Exception` 208s registers an offense and corrects for `raise` with `::Exception.new` 208s registers an offense and corrects for `raise` with `::Exception` and message 208s registers an offense and corrects for `fail` with `Exception.new` and message 208s registers an offense and corrects for `fail` with `Exception` 208s registers an offense and corrects for `raise` with `Exception.new(args*)` 208s registers an offense and corrects for `raise` with `Exception` and message 208s registers an offense and corrects for `fail` with `Exception` and message 208s does not register an offense for `fail` without arguments 208s registers an offense and corrects for `raise` with `::Exception` 208s does not register an offense when raising Exception with explicit namespace 208s registers an offense and corrects for `raise` with `Exception.new` and message 208s does not register an offense for `raise` without arguments 208s when under namespace 208s registers an offense and corrects when Exception with cbase specified 208s does not register an offense when Exception without cbase specified 208s 208s RuboCop::Formatter::MarkdownFormatter 208s outputs the cached result in Markdown 208s outputs the result in Markdown 208s 208s RuboCop::Cop::Lint::EmptyInterpolation 208s finds interpolations in string-like contexts 208s registers an offense and corrects #{ } in interpolation 208s registers an offense and corrects #{} in interpolation 208s accepts non-empty interpolation 208s 208s RuboCop::Cop::Team 208s #cops 208s returns cop instances 208s when some classes are disabled with config 208s does not return instances of the classes 208s when only some cop classes are passed to .new 208s returns only instances of the classes 208s when incompatible cops are correcting together 208s autocorrects without SyntaxError 208s #forces 208s returns force instances 208s when multiple cops joined a same force 208s returns only one force instance 208s when no cops joined force 209s returns nothing 209s when a cop joined a force 209s returns the force 209s #external_dependency_checksum 209s does not error with no cops 209s when cop with different checksum joins 209s has a different checksum for the whole team 209s when multiple cops join 209s returns string 209s when a cop joins 209s returns string 209s .new 209s calls mobilize when passed classes 209s accepts cops directly classes 209s #debug? 209s when the option argument of .new is omitted 209s is expected to be falsey 209s when { debug: true } is passed to .new 209s is expected to be truthy 209s #inspect_file 209s returns offenses 209s when Parser reports non-fatal warning for the file 210s returns Parser warning offenses 210s returns offenses from cops 210s when a cop has no interest in the file 210s returns all offenses except the ones of the cop 210s when a correction raises an error 210s records Team#errors 210s when autocorrection is enabled 210s does autocorrection 210s still returns offenses 210s when Cop#on_* raises an error 210s records Team#errors 210s when autocorrection is enabled and file encoding is mismatch 210s no error occurs 210s when done twice 210s allows cops to get ready 210s #autocorrect? 210s when the option argument of .new is omitted 210s is expected to be falsey 210s when { autocorrect: true } is passed to .new 211s is expected to be truthy 211s 211s RuboCop::Cop::Layout::TrailingEmptyLines 211s when EnforcedStyle is final_newline 211s autocorrects even if some lines have space 211s accepts final blank lines if they come after __END__ in empty file 211s accepts final blank lines if they come after __END__ 211s accepts an empty file 211s accepts final newline 211s registers an offense for multiple trailing blank lines 211s registers an offense for no final newline after block comment 211s registers an offense for multiple blank lines in an empty file 211s registers an offense for no final newline after assignment 211s when EnforcedStyle is final_blank_line 211s registers an offense for final newline 211s registers an offense for multiple blank lines in an empty file 211s accepts final blank line 211s registers an offense for no final newline 211s autocorrects missing blank line 211s registers an offense for multiple trailing blank lines 211s autocorrects missing newline 211s 211s RuboCop::Cop::Style::YodaCondition 211s enforce not yoda 211s accepts accessor and variable on left in boolean expression 211s accepts string literal on right 211s accepts __FILE__ on left in program name check 211s accepts global variable on left 211s accepts interpolated string on left 211s accepts __FILE__ on left in negated program name check 211s accepts method call on receiver on left 211s accepts interpolated regex on left 211s registers an offense for nil on left 211s accepts subtraction expression on left of comparison 211s registers an offense for boolean literal on left 211s accepts safe navigation on left 211s accepts assignment 211s registers an offense for string literal on left 211s accepts number on both sides 211s accepts string literal on left of case equality check 211s registers an offense number on left 211s registers an offense number on left of comparison 211s accepts array of numbers on both sides 211s accepts variable on left after assign 211s accepts class variable on left 211s accepts instance variable on left 211s accepts number on left of <=> 211s accepts negation 211s within an if or ternary statement 211s registers an offense for number on left in modifier if 211s registers an offense for number on left of >= in ternary condition 211s registers an offense for nil on left in ternary condition 211s registers an offense for number on left in if condition 211s registers an offense for number on left of <= in ternary condition 211s registers an offense for number on left of comparison in if condition 211s with EnforcedStyle: forbid_for_equality_operators_only 211s accepts mixed order in comparisons 211s registers an offense for negated equality check 211s registers an offense for equality check 211s accepts number on left of comparison 211s accepts nil on left of comparison 211s enforce yoda 211s accepts string literal on left 211s accepts instance variable on right 211s accepts number on left of <=> 211s accepts class variable on right 211s accepts safe navigation on right 211s registers an offense for number on right of comparison 211s accepts negation 211s registers an offense for number on right 211s accepts accessor and variable on right in boolean expression 211s accepts subtraction on right of comparison 211s registers an offense for nil on right 211s registers an offense for boolean literal on right 211s accepts assignment 211s registers an offense for string literal on right 211s accepts method call on receiver on right 211s accepts global variable on right 211s accepts variable on right after assignment 211s accepts numbers on both sides 211s accepts arrays of numbers on both sides 211s accepts string literal on right of case equality check 211s within an if or ternary statement 211s registers an offense for number on right in modifier if 211s registers an offense for number on right of <= in ternary condition 211s registers an offense for number on right of >= in ternary condition 211s registers an offense number on right of comparison in if condition 211s registers an offense for nil on right in ternary condition 211s registers an offense number on right in if condition 211s with EnforcedStyle: require_for_equality_operators_only 211s registers an offense for negated equality check 211s accepts nil on right of comparison 211s accepts number on right of comparison 211s registers an offense for equality check 211s accepts mixed order in comparisons 211s 211s RuboCop::Cop::Layout::EmptyLineAfterMultilineCondition 211s registers an offense when no new line after `when` with multiline condition 211s does not register an offense when new line after modifier `while` with multiline condition 211s does not register an offense for `rescue` with singleline exceptions 211s does not register an offense when `if` at the top level 211s registers an offense when no new line after `rescue` with multiline exceptions 211s does not register an offense when new line after modifier `if` with multiline condition 211s registers an offense when no new line after `elsif` with multiline condition 211s does not register an offense when new line after `when` with multiline condition 211s does not register an offense for `when` with singleline condition 211s registers an offense when no new line after modifier `if` with multiline condition 211s does not register an offense when new line after `if` with multiline condition 211s does not register an offense when new line after `elsif` with multiline condition 211s does not register an offense when new line after `while` with multiline condition 211s does not register an offense when modifier `while` with multiline conditionis the last child of its parent 211s does not register an offense for `while` with single line condition 211s does not register an offense when modifier `if` with multiline conditionis the last child of its parent 211s registers an offense when no new line after `if` with multiline condition 211s does not register an offense for `if` with single line condition 211s registers an offense when no new line after `while` with multiline condition 211s registers an offense when no new line after `until` with multiline condition 211s does not register an offense when new line after `rescue` with multiline exceptions 211s registers an offense when no new line after modifier `while` with multiline condition 211s 211s RuboCop::Cop::Naming::InclusiveLanguage 211s strings 211s does not register offenses and not raise `ArgumentError` for invalid byte sequence in UTF-8 211s registers an offense for an interpolated string 211s registers an offense in a heredoc 211s registers an offense for a multiline string 211s when CheckStrings config is false 211s does not register offenses for strings 211s suggestions 211s flagged term with two suggestions 211s includes both suggestions in the offense message 211s flagged term with three or more suggestions 211s includes all suggestions in the message 211s flagged term with one suggestion 211s includes the suggestion in the offense message 211s filepath 211s CheckFilepaths is false 211s does not register an offense 211s offense in directory name 211s registers an offense for a director 211s multiple offenses in filename 211s registers an offense with all problematic words 211s one offense in filename 211s registers an offense 211s variables 211s when CheckVariables config is true 211s registers offenses for class variables 211s registers offenses for instance variables 211s registers offenses for global variables 211s when CheckVariables config is false 211s does not register offenses for variables 211s symbols 211s when CheckSymbols is false 211s does not register an offense 211s when CheckSymbols is true 211s registers an offense 211s allowed use 211s does not register an offense for an allowed use 211s offense after an allowed use 211s registers an offense at the correct location 211s constants 211s when CheckConstants config is false 211s does not register offenses for constants 211s when CheckConstants config is true 211s registers offenses for constants 211s comments 211s registers an offense in a block comment 211s registers an offense in a single line comment 211s when CheckComments is false 211s does not register an offense 211s identifiers 211s when CheckIdentifiers config is false 211s does not register offenses for identifiers 211s when CheckIdentifiers config is true 211s registers an offense 211s flagged term matching 211s registers an offense when using a flagged term with mixed case 211s registers an offense for a partial word match 211s registers an offense when using a flagged term 211s regex 211s registers an offense for a flagged term matched with a regexp 211s WholeWord: true 211s only flags when the term is a whole word 211s multiple offenses on a line 211s registers an offense for each word 211s disable default flagged term 211s ignores flagged terms that are set to nil 211s 211s RuboCop::Cop::Layout::LineEndStringConcatenationIndentation 211s when EnforcedStyle is indented 211s registers an offense for aligned strings in hash literal values 211s accepts indented strings in ordinary statement 211s accepts an empty heredoc string with interpolation 211s registers an offense for aligned strings in an if/elsif/else statement 211s registers an offense for aligned string 211s accepts indented strings in implicit return statement of a block 211s accepts indented strings in implicit return statement of a method definition 211s registers an offense for unaligned third part of string 211s accepts a multiline string literal 211s accepts indented strings in implicit return statement of a method definition after other statement 211s accepts indented strings 211s accepts single line string literal concatenation 211s accepts a heredoc string ... 211s accepts a heredoc string with interpolation 211s accepts indented strings in implicit return statement of a singleton method definition 211s accepts string literal with line break concatenated with other string 211s for assignment with @x = 211s registers an offense for aligned strings 211s accepts indented strings 211s when IndentationWidth is 1 211s accepts indented strings 211s for assignment with x = 211s accepts indented strings 211s registers an offense for aligned strings 211s for assignment with x ||= 211s accepts indented strings 211s registers an offense for aligned strings 211s for assignment with x += 211s registers an offense for aligned strings 211s accepts indented strings 211s for assignment with $x = 211s registers an offense for aligned strings 211s accepts indented strings 211s for assignment with X = 211s accepts indented strings 211s registers an offense for aligned strings 211s when EnforcedStyle is aligned 211s accepts a heredoc string ... 211s accepts an empty heredoc string with interpolation 211s accepts indented strings in ordinary statement 211s accepts single line string literal concatenation 211s registers an offense for indented string 211s accepts indented strings in implicit return statement of a block 211s registers an offense for unaligned strings in hash literal values 211s accepts aligned strings in method call 211s accepts a heredoc string with interpolation 211s registers an offense for third part of a string if it is aligned only with the first 211s registers an offense for aligned strings in an if/elsif/else statement 211s accepts a multiline string literal 211s accepts indented strings in implicit return statement of a method definition 211s accepts indented strings in implicit return statement of a singleton method definition 211s accepts indented strings in implicit return statement of a method definition after other statement 211s accepts string literal with line break concatenated with other string 211s for assignment with x = 211s accepts aligned strings 211s registers an offense for indented strings 211s for assignment with @x = 211s accepts aligned strings 211s registers an offense for indented strings 211s for assignment with x += 211s registers an offense for indented strings 211s accepts aligned strings 211s for assignment with x ||= 211s accepts aligned strings 211s registers an offense for indented strings 211s for assignment with X = 211s registers an offense for indented strings 211s accepts aligned strings 211s for assignment with $x = 211s registers an offense for indented strings 211s accepts aligned strings 211s 211s RuboCop::Cop::Style::NestedModifier 211s autocorrects unless with a comparison operator + if 211s autocorrects unless + unless 211s adds parentheses when needed in autocorrection 211s autocorrects unless + if 211s does not add redundant parentheses in autocorrection 211s autocorrects if + if 211s autocorrects if + unless 211s adds parentheses to method arguments when needed in autocorrection 211s registers one offense for more than two modifiers 211s until 211s behaves like not correctable 211s does not autocorrect when until is the inner modifier 211s does not autocorrect when until is the outer modifier 211s while 211s behaves like not correctable 211s does not autocorrect when while is the outer modifier 211s does not autocorrect when while is the inner modifier 211s 211s RuboCop::Cop::Style::CollectionMethods 211s registers an offense for inject with proc param 211s registers an offense for find_all with proc param 211s accepts member? without a block 211s accepts find_all without a block 211s registers an offense for member? with block 211s registers an offense for member? with proc param 211s registers an offense for detect with block 211s registers an offense for inject with an argument and proc param 211s accepts detect without a block 211s registers an offense for find_all with an argument and proc param 211s registers an offense for find_all with block 211s registers an offense for detect with proc param 211s registers an offense for collect with proc param 211s registers an offense for collect with an argument and proc param 211s registers an offense for detect with an argument and proc param 211s registers an offense for collect with block 211s accepts inject without a block 211s accepts collect without a block 211s registers an offense for inject with block 211s registers an offense for member? with an argument and proc param 211s Ruby 2.7 211s registers an offense for inject with numblock 211s Ruby 2.7 211s registers an offense for member? with numblock 211s Ruby 2.7 211s registers an offense for detect with numblock 211s for methods that do not accept a symbol as implicit block 211s does not register an offense for a final symbol param with extra args 211s does not register an offense for a final symbol param 211s Ruby 2.7 211s registers an offense for find_all with numblock 211s Ruby 2.7 211s registers an offense for collect with numblock 211s for methods that accept a symbol as implicit block 211s registers an offense with an argument and final symbol param 211s registers an offense with a final symbol param 211s 211s RuboCop::Cop::Lint::NestedPercentLiteral 211s registers no offense for array 211s registers offense for repeated nested percent literals 211s registers offense for nested percent literals 211s registers no offense for percents in the middle of literals 211s registers no offense for nestings under percent 211s registers no offense for empty array 211s registers no offense for percent modifier character in isolation 211s registers offense for multiply nested percent literals 211s when handling invalid UTF8 byte sequence 211s registers offense for nested percent literal 211s registers no offense for array 211s 211s RuboCop::Cop::Style::PercentQLiterals 211s when EnforcedStyle is lower_case_q 211s with interpolation 211s accepts double quotes 211s accepts %q 211s accepts %Q 211s accepts single quotes 211s without interpolation 211s accepts %q 211s accepts single quotes 211s registers offense for %Q 211s accepts double quotes 211s with special characters 211s accepts %q 211s accepts %Q 211s when EnforcedStyle is upper_case_q 211s with interpolation 211s accepts double quotes 211s accepts %q 211s accepts %Q 211s accepts single quotes 211s without interpolation 211s accepts double quotes 211s registers offense for %q 211s accepts %Q 211s accepts single quotes 211s with special characters 211s accepts %q 211s accepts %Q 211s 211s RuboCop::Cop::Style::QuotedSymbols 211s configured with `double_quotes` 211s behaves like enforce double quotes 211s registers an offense and corrects escape characters properly 211s registers an offense and corrects for an escaped quote within single quotes 211s accepts double quotes with escape sequences 211s accepts unquoted symbols 211s accepts double quotes when interpolating an instance variable 211s accepts double quotes when interpolating a global variable 211s accepts double quotes with single quotes 211s accepts double quotes with line breaks 211s accepts double quotes when interpolating a class variable 211s registers an offense for single quotes 211s accepts single quotes with line breaks 211s accepts single quotes with double quotes 211s accepts double quotes 211s accepts double quotes with interpolation 211s accepts double quoted symbol with an escaped quote 211s hash with hashrocket style 211s accepts properly quoted symbols 211s corrects wrong quotes 211s configured with `single_quotes` 211s behaves like enforce single quotes 211s registers an offense and corrects for an escaped quote within double quotes 211s registers an offense and corrects escape characters properly 211s accepts single quotes with line breaks 211s accepts single quoted symbol with an escaped quote 211s accepts double quotes with some other special symbols 211s registers an offense and corrects for double quotes without interpolation 211s accepts double quotes with escape sequences 211s accepts double quotes when control characters are used 211s accepts double quotes with single quotes 211s accepts double quotes when interpolating an instance variable 211s accepts single quotes 211s accepts unquoted symbols 211s accepts double quotes when unicode control sequence is used 211s accepts double quotes with line breaks 211s accepts single quotes with double quotes 211s registers an offense and corrects for double quotes in hash keys 211s accepts double quotes when interpolating a class variable 211s accepts double quotes with interpolation 211s accepts double quotes when interpolating a global variable 211s hash with hashrocket style 211s corrects wrong quotes 211s accepts properly quoted symbols 211s configured with `same_as_string_literals` 211s when Style/StringLiterals is disabled 211s behaves like enforce single quotes 211s registers an offense and corrects escape characters properly 211s accepts single quoted symbol with an escaped quote 211s accepts single quotes with double quotes 211s registers an offense and corrects for double quotes in hash keys 211s accepts double quotes with escape sequences 211s accepts double quotes with interpolation 211s registers an offense and corrects for an escaped quote within double quotes 211s accepts double quotes when control characters are used 211s accepts double quotes with some other special symbols 211s accepts double quotes when interpolating an instance variable 211s accepts double quotes with single quotes 211s registers an offense and corrects for double quotes without interpolation 211s accepts single quotes 211s accepts single quotes with line breaks 211s accepts double quotes when interpolating a class variable 211s accepts unquoted symbols 211s accepts double quotes when unicode control sequence is used 211s accepts double quotes when interpolating a global variable 211s accepts double quotes with line breaks 211s hash with hashrocket style 211s accepts properly quoted symbols 211s corrects wrong quotes 211s when Style/StringLiterals is configured with single_quotes 211s behaves like enforce single quotes 211s registers an offense and corrects for an escaped quote within double quotes 211s accepts double quotes when interpolating a class variable 211s accepts single quotes with line breaks 211s accepts double quotes when interpolating an instance variable 211s accepts double quotes with escape sequences 211s accepts single quotes 211s accepts double quotes when control characters are used 211s registers an offense and corrects for double quotes without interpolation 211s accepts double quotes with some other special symbols 211s accepts double quotes with line breaks 211s accepts double quotes with single quotes 211s registers an offense and corrects for double quotes in hash keys 211s accepts single quotes with double quotes 211s accepts unquoted symbols 211s accepts double quotes when interpolating a global variable 211s accepts double quotes when unicode control sequence is used 211s accepts single quoted symbol with an escaped quote 211s registers an offense and corrects escape characters properly 211s accepts double quotes with interpolation 211s hash with hashrocket style 211s corrects wrong quotes 211s accepts properly quoted symbols 211s when Style/StringLiterals is configured with double_quotes 211s behaves like enforce double quotes 211s accepts single quotes with double quotes 211s accepts double quotes 211s accepts double quotes with single quotes 211s accepts double quoted symbol with an escaped quote 211s accepts double quotes when interpolating a global variable 211s accepts unquoted symbols 211s accepts double quotes with interpolation 211s registers an offense and corrects escape characters properly 211s registers an offense and corrects for an escaped quote within single quotes 211s accepts single quotes with line breaks 211s registers an offense for single quotes 211s accepts double quotes when interpolating an instance variable 211s accepts double quotes with line breaks 211s accepts double quotes when interpolating a class variable 211s accepts double quotes with escape sequences 211s hash with hashrocket style 211s corrects wrong quotes 211s accepts properly quoted symbols 211s 211s RuboCop::Cop::Style::ZeroLengthPredicate 211s with strings 211s registers an offense for `string.size == 0` 211s registers an offense for `0 == string.size` 211s registers an offense for `string.size != 0` 211s registers an offense for `0 != string.size` 211s when inspecting a File::Stat object 211s does not register an offense 211s does not register an offense with ::File 211s when name of the variable is `size` or `length` 211s accepts inequality check 211s accepts comparison 211s accepts equality check 211s with arrays 211s registers an offense for `array.size == 0` 211s registers an offense for `array.size != 0` 211s registers an offense for `0 == array.size` 211s registers an offense for `0 != array.size` 211s registers an offense for `array.length < 1` 211s registers an offense for `array.size > 0` 212s registers an offense for `0 < array.size` 212s registers an offense for `array.length > 0` 212s registers an offense for `array.length != 0` 212s registers an offense for `array.length == 0` 212s registers an offense for `1 > array.size` 212s registers an offense for `0 < array.length 212s registers an offense for `array.size < 1` 212s registers an offense for `0 == array.length` 212s registers an offense for `1 > array.length` 212s registers an offense for `0 != array.length` 212s when inspecting a Tempfile object 212s does not register an offense with top-level ::Tempfile 212s does not register an offense 212s with hashes 212s registers an offense for `hash.size == 0` 212s registers an offense for `hash.size != 0` 212s registers an offense for `0 != hash.size` 212s registers an offense for `0 == hash.size 212s when inspecting a StringIO object 212s when initialized without arguments 212s does not register an offense 212s does not register an offense with top-level ::StringIO 212s when initialized with a string 212s does not register an offense with top-level ::StringIO 212s does not register an offense 212s with collection variables 212s registers an offense for `collection.size != 0` 212s registers an offense for `0 != collection.size` 212s registers an offense for `collection.size == 0` 212s registers an offense for `0 == collection.size` 212s 212s RuboCop::CLI --disable-uncorrectable 212s --disable-uncorrectable 212s does not disable anything for cops that support autocorrect 212s if a one-line disable statement doesn't fit 212s adds before-and-after disable statement 212s and the offense is inside a heredoc 212s adds before-and-after disable statement around the heredoc 212s when exist offense for Layout/SpaceInsideArrayLiteralBrackets 212s when `EnforcedStyle: no_space` 212s does not disable anything for cops that support autocorrect 212s when `EnforcedStyle: space` 212s does not disable anything for cops that support autocorrect 212s if one one-line disable statement fits 212s adds it when the cop supports autocorrect but does not correct the offense 213s adds it 213s and there are two offenses of the same kind on one line 213s adds a single one-line disable statement 213s but there are more offenses on the line and they don't all fit 213s adds both one-line and before-and-after disable statements 213s 213s RuboCop::Cop::Lint::EachWithObjectArgument 213s accepts a string argument 213s registers an offense for bignum argument 213s accepts a variable argument 213s registers an offense for float argument 213s registers an offense for fixnum argument 213s accepts two arguments 213s when using safe navigation operator 213s registers an offense for fixnum argument 213s 213s RuboCop::Cop::Style::NegatedIfElseCondition 213s does not register an offense when `if` with negated condition has no `else` branch 213s does not register an offense when only part of the condition is negated 213s does not register an offense when both branches are empty 213s registers an offense and corrects when negating condition with `not` for `if-else` 213s works with comments when one branch is a begin and the other is not 213s registers an offense and corrects when negating condition with `not` for ternary 213s correctly moves comments at the end of branches 213s registers an offense and corrects nested `if-else` with negated condition 213s works with comments and multiple statements 213s registers an offense and corrects a multiline ternary 213s does not register an offense when negating condition for `if-elsif` 213s moves comments to correct branches during autocorrect 213s does not register an offense when `if` with `!!` condition 213s registers an offense when using negated condition and `if` branch body is empty 213s works with duplicate nodes 213s registers an offense and corrects when negating condition with `!` for `if-else` 213s does not register an offense when the `else` branch is empty 213s works with comments when neither branch is a begin node 213s behaves like negation method 213s registers an offense and corrects when negating condition with `!~` in begin-end for ternary 213s registers an offense and corrects when negating condition with `!~` in parentheses for ternary 213s registers an offense and corrects when negating condition with `!~` for ternary 213s registers an offense and corrects when negating condition with `!~` for `if-else` 213s registers an offense and corrects when negating condition with `!~` in begin-end for `if-else` 213s registers an offense and corrects when negating condition with `!~` in parentheses for `if-else` 213s behaves like negation method 213s registers an offense and corrects when negating condition with `!=` for ternary 213s registers an offense and corrects when negating condition with `!=` in parentheses for ternary 213s registers an offense and corrects when negating condition with `!=` for `if-else` 213s registers an offense and corrects when negating condition with `!=` in begin-end for ternary 213s registers an offense and corrects when negating condition with `!=` in parentheses for `if-else` 213s registers an offense and corrects when negating condition with `!=` in begin-end for `if-else` 213s 213s RuboCop::Cop::Style::StderrPuts 213s registers no offense when using `STDERR.puts` with no arguments 213s registers no offense when using `$stderr.puts` with no arguments 213s registers an offense when using `$stderr.puts('hello')` 213s registers an offense when using `STDERR.puts('hello')` 213s registers an offense when using `::STDERR.puts('hello')` 213s 213s RuboCop::Cop::Lint::IdentityComparison 213s does not register an offense when lhs is `object_id` without receiver 213s registers an offense and corrects when using `==` for comparison between `object_id`s 213s does not register an offense when using `==` for comparison between `object_id` and other 213s does not register an offense when rhs is `object_id` without receiver 213s does not register an offense when using `==` 213s does not register an offense when a receiver that is not `object_id` uses `==` 213s 213s RuboCop::Cop::Style::ArrayJoin 213s autocorrects '*' to 'join' when there are no spaces 213s does not register an offense for numbers 213s registers an offense for an array followed by string 213s does not register an offense for ambiguous cases 213s autocorrects '*' to 'join' when setting to a variable 213s 213s RuboCop::Cop::Style::RedundantEach 213s does not register an offense when using `each.with_object` 213s does not register an offense when using `each_foo {}.each_with_object([]) {}` 213s does not register an offense when using `each_with_object` 213s registers an offense when using `each.each` 213s does not register an offense when using `each_with_index` 213s does not register an offense when using `each {}.reverse_each {}` 213s registers an offense when using `reverse_each.each_with_object` 213s does not register an offense when using `each` as enumerator 213s does not register an offense when using `each_with_index.reverse_each` 213s does not register an offense when using only single `each` 213s does not register an offense when using `each` with a symbol proc for last argument 213s does not register an offense when using `each {}.each_with_object([]) {}` 213s does not register an offense when using `reverse_each {}.each {}` 213s registers an offense when using `each.each_with_index` 213s does not register an offense when not chaining `each_` calls 213s does not register an offense when using `each.with_index` 213s registers an offense when using a method starting with `each_` with `each_with_index` 213s registers an offense when using `each.reverse_each` 213s does not register an offense when using `each_ancestor.each` 213s registers an offense when using a method starting with `each_` with `each_with_object` 213s registers an offense when using `each.each_with_object` 213s does not register an offense when any method is used between methods with `each` in the method name 213s registers an offense when using `reverse_each.each` 213s does not register an offense when using `reverse_each(&:foo).each {...}` 213s does not register an offense when using `each {}.each_with_index {}` 213s registers an offense when using `each.each(&:foo)` 213s does not register an offense when using `each` with a symbol proc argument 213s registers an offense when using `reverse_each.each_with_index` 213s 213s RuboCop::Cop::Lint::RescueException 213s does not crash when the namespace of a rescued class is in a local variable 213s registers an offense for rescue from Exception 213s does not register an offense for rescue with no class 213s does not register an offense for rescue with other class 213s registers an offense for rescue with StandardError, Exception 213s does not crash when the splat operator is used in a rescue 213s does not register an offense for rescue with no class and => e 213s does not register an offense for rescue with other classes 213s does not register an offense for rescue with a module prefix 213s registers an offense for rescue with ::Exception 213s registers an offense for rescue with Exception => e 213s 213s RuboCop::Cop::Style::MixinUsage 213s does not register an offense when using inside nested module 213s extend 213s registers an offense when using outside class 213s does not register an offense when using inside class 213s prepend 213s does not register an offense when using inside class 213s registers an offense when using outside class 213s include 213s registers an offense when using outside class (used below) 213s does not register an offense when using `include` in method definition inside class 213s doesn't register an offense when `include` call is a method argument 213s registers an offense when using `include` in method definition outside class or module 213s registers an offense when using only `include` statement 213s registers an offense when using outside class (used above) 213s does not register an offense when using inside class 213s does not register an offense when using `include` in method definition inside module 213s does not register an offense when using inside block 213s does not register an offense when using outside class 213s does not register an offense when using inside block and `if` condition is after `include` 213s Nested module 213s registers an offense when using outside class 213s Multiple definition classes in one 213s does not register an offense when using inside class 213s 213s RuboCop::Cop::Style::FrozenStringLiteralComment 213s always_true 213s accepts a source with no tokens 213s accepts a frozen string literal comment below shebang above an encoding comments 213s registers an offense for a disabled frozen string literal on the top line 213s accepts a frozen string literal on the top line 213s registers an offense for a disabled frozen string literal above an empty line 213s registers an offense for arbitrary tokens under shebang with no other code 213s registers an offense for a disabled frozen string literal below a shebang comment 213s registers an offense for a disabled frozen string literal comment below an encoding comment and extra space 213s accepts a frozen string literal comment below an encoding comment and extra space 213s registers an offense for a disabled frozen string literal below an encoding comment 213s registers an offense for arbitrary tokens below shebang above an encoding comments 213s accepts an empty source 213s accepts a frozen string literal comment after other comments 213s registers an offense for arbitrary tokens below shebang, an encoding comment, and extra space 213s registers an offense for not having a frozen string literal comment on the top line 213s registers an offense for having a frozen string literal comment under ruby code 213s accepts a frozen string literal below an encoding comment 213s registers an offense for arbitrary tokens below an encoding comment 213s registers an offense for a disabled frozen string literal comment below shebang above an encoding comments 213s registers an offense for arbitrary tokens below shebang and encoding comments 213s registers an offense for a disabled frozen string literal comment below shebang and encoding comments 213s registers an offense for arbitrary tokens below a shebang comment 213s registers an offense for a disabled frozen string literal comment under shebang with no other code 213s accepts a frozen string literal comment below shebang and encoding comments 213s registers an offense for not having a frozen string literal comment under shebang with no other code 213s registers an offense for not having a frozen string literal comment under a shebang and an encoding comment 213s registers an offense for a disabled frozen string literal comment after other comments 213s registers an offense for arbitrary tokens 213s registers an offense for not having a frozen string literal comment under a shebang, an encoding comment, and extra space 213s registers an offense for not having a frozen string literal comment under an encoding comment 213s registers an offense for a disabled frozen string literal 213s registers an offense for a disabled frozen string literal comment below shebang, an encoding comment, and extra space 213s registers an offense for arbitrary tokens above an empty line 213s accepts an emacs style combined magic comment 213s registers an offense for not having a frozen string literal comment under an encoding comment and extra space 213s registers an offense for arbitrary tokens below an encoding comment and extra space 213s accepts a frozen string literal below a shebang comment 213s registers an offense for an extra first empty line 213s accepts a frozen string literal comment below shebang, an encoding comment, and extra space 213s accepts a frozen string literal comment under shebang with no other code 213s always 213s accepts an emacs style combined magic comment 213s accepts a disabled frozen string literal on the top line 213s accepts a frozen string literal comment after other comments 213s accepts a disabled frozen string literal comment below shebang above an encoding comments 213s accepts a source with no tokens 213s accepts a disabled frozen string literal comment below shebang and encoding comments 213s registers an offense for not having a frozen string literal comment when there is only a shebang 213s registers an offense for having a frozen string literal comment under ruby code 213s accepts an empty source 213s accepts a disabled frozen string literal below a shebang comment 213s registers an offense for arbitrary tokens 213s registers an offense for not having a frozen string literal comment under an encoding comment 213s accepts a frozen string literal on the top line 213s registers an offense for not having a frozen string literal comment under an encoding comment separated by a newline 213s accepts a frozen string literal comment below shebang and encoding comments 213s registers an offense for not having a frozen string literal comment under a shebang 213s accepts a frozen string literal below a shebang comment 213s registers an offense with an empty line between magic comments and the code 213s accepts a frozen string literal comment below newline-separated magic comments 213s registers an offense for an extra first empty line 213s accepts a frozen string literal comment below shebang above an encoding comments 213s accepts a disabled frozen string literal below an encoding comment 213s accepts a frozen string literal below an encoding comment 213s registers an offense for not having a frozen string literal comment on the top line 213s registers an offense for not having a frozen string literal comment under a shebang and an encoding comment 213s never 213s registers an offense for a disabled frozen string literal comment on the top line 213s accepts not having not having a frozen string literal comment under a shebang 213s registers an offense for a disabled frozen string literal comment below shebang and encoding comments 213s registers an offense for a frozen string literal comment below an encoding comment 213s accepts a frozen string literal comment under ruby code 213s accepts not having a frozen string literal comment on the top line 213s allows not having a frozen string literal comment under a shebang and an encoding comment 213s registers an offense for a disabled frozen string literal comment below shebang above an encoding comments 213s registers an offense for a disabled frozen string literal below a shebang comment 213s accepts a source with no tokens 213s registers an offense for a frozen string literal comment below shebang above an encoding comments 213s allows not having a frozen string literal comment under an encoding comment 213s registers an offense for a frozen string literal comment on the top line 213s registers an offense for a frozen string literal comment below shebang and encoding comments 213s accepts an empty source 213s registers an offense for a disabled frozen string literal below an encoding comment 213s registers an offense for having a frozen string literal comment after other comments 213s registers an offense for a frozen string literal comment below a shebang comment 213s target_ruby_version < 2.3 213s accepts freezing a string with interpolation 213s accepts calling << on a string with interpolation 213s accepts freezing a string 213s accepts calling << on a string 213s 213s RuboCop::Cop::Style::MapToHash 213s >= Ruby 2.6 213s when the receiver is an array 214s registers an offense and corrects 214s when the receiver is an hash 214s registers an offense and corrects 214s when the receiver is an hash 214s registers an offense and corrects 214s `map` and `map.to_h` with newlines 214s registers an offense and corrects with newline removal 214s when chained further 214s registers an offense and corrects 214s `collect` without `to_h` 214s does not register an offense 214s `map.to_h` with a block on `to_h` 214s registers an offense but does not correct 214s `collect.to_h` with a block on `to_h` 214s registers an offense but does not correct 214s for `map.to_h` with block arity 1 214s registers an offense and corrects 214s `map` without `to_h` 214s does not register an offense 214s when chained further 214s registers an offense and corrects 214s for `collect.to_h` with block arity 1 214s registers an offense and corrects 214s for `map.to_h` with block arity 2 214s registers an offense and corrects 214s `map` and `collect.to_h` with newlines 214s registers an offense and corrects with newline removal 214s for `collect.to_h` with block arity 2 214s registers an offense and corrects 214s when the receiver is an array 214s registers an offense and corrects 214s 214s RuboCop::Cop::Lint::EmptyConditionalBody 214s registers an offense for missing `if` body with `elsif` 214s does not register an offense for missing `elsif` body with a comment 214s does not register an offense for missing `unless` body with a comment 214s registers an offense for missing `if` and `elsif` body 214s does not register an offense for missing `elsif` body with an inline comment 214s registers an offense for missing `if` body with present `else` body 214s registers an offense for missing `if` body 214s registers an offense for missing `elsif` body 214s registers an offense for missing all branches of `if` and multiple `elsif` body 214s registers an offense for missing all branches of `if` and `elsif` body 214s registers an offense for missing `if` body with `else` 214s registers an offense for missing `elsif` body that is not the one with a comment 214s registers an offense for missing `unless` body with `else` 214s registers an offense for missing `if` and `else` body 214s registers an offense for missing `unless` body 214s does not register an offense for missing `if` body with a comment 214s registers an offense for missing second `elsif` body without an inline comment 214s registers an offense for missing `if` and `else` body with some indentation 214s autocorrects properly when the if is assigned to a variable 214s registers an offense for missing `unless` and `else` body 214s when AllowComments is false 214s registers an offense for missing `if` body with a comment 214s registers an offense for missing `unless` body with a comment 214s registers an offense for missing `elsif` body with a comment 214s 214s RuboCop::Cop::Style::RedundantFetchBlock 214s with SafeForConstants: false 214s does not register an offense when using `#fetch` with constant in the block 214s with SafeForConstants: true 214s registers an offense and corrects when using `#fetch` with String in the block and strings are frozen 214s registers an offense and corrects when using `#fetch` with empty block 214s does not register an offense when using `#fetch` with an argument in the block 214s does not register an offense when using `#fetch` with argument fallback 214s registers an offense and corrects when using `#fetch` with Rational in the block 214s registers an offense and corrects when using `#fetch` with Float in the block 214s does not register an offense when using `#fetch` with interpolated Symbol in the block 214s registers an offense and corrects when using `#fetch` with Integer in the block 214s registers an offense and corrects when using `#fetch` with constant in the block 214s registers an offense and corrects when using `#fetch` with Symbol in the block 214s does not register an offense when using `#fetch` with `Rails.cache` 214s registers an offense and corrects when using `#fetch` with Complex in the block 214s does not register an offense when using `#fetch` with String in the block and strings are not frozen 214s 214s RuboCop::Cop::Layout::AccessModifierIndentation 214s when EnforcedStyle is set to outdent 214s accepts private with argument indented to method depth in module defined with Module.new 214s accepts protected indented to the containing class indent level 214s accepts private def indented to method depth in class defined with Class.new 214s registers an offense and corrects private indented to method depth in class defined with Class.new 214s registers an offense and corrects module_function indented to method depth in a module 214s registers an offense and corrects private indented to method depth in singleton class 214s registers an offense and corrects private indented to method depth in module defined with Module.new 214s accepts private def indented to method depth in module defined with Module.new 214s accepts private with argument indented to method depth in a class 214s accepts private with argument indented to method depth in singleton class 214s accepts private def indented to method depth in a module 214s accepts module fn def indented to method depth in a module 214s accepts private with argument indented to method depth in a module 214s accepts module fn with argument indented to method depth in a module 214s registers an offense and corrects misaligned access modifiers in nested classes 214s registers an offense and corrects private indented to method depth in a module 214s registers offense and corrects private indented to method depth in a class 214s accepts private def indented to method depth in a class 214s accepts private with argument indented to method depth in class defined with Class.new 214s accepts private def indented to method depth in singleton class 214s accepts private indented to the containing class indent level 214s when EnforcedStyle is set to indent 214s registers an offense and corrects access modifiers in arbitrary blocks 214s registers an offense and corrects correct + opposite alignment 214s accepts an empty class 214s registers an offense and corrects misaligned private in module defined with Module.new 214s registers an offense and corrects misaligned private 214s registers an offense and corrects misaligned protected 214s registers an offense and corrects misaligned module_function in module 214s accepts indented access modifiers with arguments in nested classes 214s accepts properly indented private in module defined with Module.new 214s registers an offense and corrects misaligned access modifiers in nested classes 214s accepts methods with a body 214s accepts properly indented protected 214s registers an offense and corrects misaligned private in a singleton class 214s accepts properly indented private 214s registers an offense and corrects misaligned private in module 214s registers an offense and corrects opposite + correct alignment 214s registers an offense and corrects misaligned private in class defined with Class.new 214s when indentation width is overridden for this cop only 214s accepts properly indented private 214s when 4 spaces per indent level are used 214s accepts properly indented private 214s 214s RuboCop::Cop::InternalAffairs::NumblockHandler 214s registers an offense for cops with forgotten numblock handlers 214s does not register an offense for cops with on_numblock alias 214s does not register an offense for cops with on_numblock alias_method 214s does not register an offense for cops with on_numblock method 214s 214s RuboCop::Cop::Style::StringLiterals 214s when ConsistentQuotesInMultiline is true 214s and EnforcedStyle is single_quotes 214s registers an offense for unneeded double quotes in continuation 214s doesn't choke on heredocs with inconsistent indentation 214s accepts for double quotes with an escaped special character 214s doesn't register offense for double quotes with embedded single 214s accepts continued strings using all single quotes 214s registers an offense for mixed quote styles in a continued string 214s registers an offense for strings with line breaks in them 214s accepts for double quotes with an escaped normal character 214s doesn't register offense for double quotes with interpolation 214s and EnforcedStyle is double_quotes 214s registers an offense for unneeded single quotes in continuation 214s doesn't register offense for single quotes with embedded double 214s accepts continued strings using all double quotes 214s registers an offense for mixed quote styles in a continued string 214s configured with double quotes preferred 214s accepts single quotes when they are needed 214s accepts double quotes 214s accepts single quoted string with backslash 214s registers offense for opposite + correct 214s registers offense for escaped single quote in single quotes 214s accepts escaped single quote in string with escaped non-' character 214s accepts % quotes 214s accepts single quotes at the start of regexp literals 214s accepts heredocs 214s accepts single quotes in string with escaped non-' character 214s accepts ' in a %w 214s registers offense for single quotes when double quotes would be equivalent 214s accepts %q and %Q quotes 214s flags single quotes with plain # (not #@var or #{interpolation} or #$global 214s can handle a built-in constant parsed as string 214s does not accept multiple escaped single quotes in single quotes 214s accepts single quotes in interpolation 214s when configured with a bad value 214s fails 214s configured with single quotes preferred 214s registers offense for double quotes when single quotes suffice 214s accepts " in a %w 214s accepts \\\n in a string 214s accepts double quotes when interpolating a class variable 214s accepts double quotes when interpolating & quotes in multiple lines 214s accepts single quotes 214s accepts heredocs 214s accepts double quotes when single quotes are used 214s registers an offense for "\"" 214s accepts double quotes when new line is used 214s accepts double quotes when unicode control sequence is used 214s accepts double quotes with some other special symbols 214s accepts double quotes when control characters are used 214s accepts %q and %Q quotes 214s accepts % quotes 214s accepts double quotes when interpolating a global variable 214s registers an offense for words with non-ascii chars 214s accepts double quotes at the start of regexp literals 214s accepts double quotes when interpolating an instance variable 214s can handle character literals 214s registers offense for correct + opposite 214s registers an offense for "\" 214s does not register an offense for words with non-ascii chars and other control sequences 214s accepts double quotes in interpolation 214s can handle a built-in constant parsed as string 214s accepts single quotes in interpolation 214s detects unneeded double quotes within concatenated string 214s 214s RuboCop::Cop::Style::OrAssignment 214s when using var = something unless var 214s registers an offense for class variables 214s registers an offense for instance variables 214s does not register an offense if any of the variables are different 214s registers an offense for global variables 214s registers an offense for normal variables 214s when using `elsif` statement 214s does not register an offense 214s when using var = if var; var; else; something; end 214s registers an offense with instance variables 214s registers an offense with normal variables 214s registers an offense with class variables 214s registers an offense with global variables 214s does not register an offense if any of the variables are different 214s when using unless var; var = something; end 214s registers an offense for instance variables 214s registers an offense for normal variables 214s registers an offense for global variables 214s registers an offense for class variables 214s does not register an offense if any of the variables are different 214s when `then` branch body is empty 214s registers an offense 214s when using var = var ? var : something 214s does not register an offense if any of the variables are different 214s registers an offense with global variables 214s registers an offense with class variables 214s registers an offense with normal variables 214s registers an offense with instance variables 214s 214s RuboCop::Cop::Layout::SpaceBeforeComment 214s accepts a doc comment 214s accepts a comment that begins a line 214s registers an offense and corrects after a heredoc 214s registers an offense and corrects missing space before an EOL comment 214s accepts an EOL comment with a preceding space 214s 214s RuboCop::Cop::Style::TrailingCommaInHashLiteral 214s with single line list of values 214s when EnforcedStyleForMultiline is no_comma 214s accepts single element literal without trailing comma 214s accepts literal without trailing comma 214s accepts empty literal 214s registers an offense for trailing comma in a literal 214s when EnforcedStyleForMultiline is comma 214s accepts literal without trailing comma 214s registers an offense for trailing comma in a literal 214s accepts single element literal without trailing comma 214s accepts empty literal 214s when EnforcedStyleForMultiline is consistent_comma 214s registers an offense for trailing comma in a literal 214s accepts literal without trailing comma 214s accepts single element literal without trailing comma 214s accepts empty literal 214s with multi-line list of values 214s when EnforcedStyleForMultiline is no_comma 214s accepts comma inside a heredoc parameters at the end 214s accepts comma in comment after last value item 214s registers an offense for trailing comma in literal 214s accepts literal with no trailing comma 214s when EnforcedStyleForMultiline is comma 214s accepts a multiline hash with a single pair and trailing comma 214s registers an offense for no trailing comma 214s accepts trailing comma 214s accepts trailing comma after a heredoc 214s registers an offense for trailing comma in a comment 214s when closing bracket is on same line as last value 214s accepts literal with no trailing comma 214s when EnforcedStyleForMultiline is consistent_comma 214s accepts a multiline hash with pairs on a single line andtrailing comma 214s accepts a multiline hash with a single pair and trailing comma 214s accepts trailing comma 214s registers an offense for no trailing comma 214s accepts trailing comma after a heredoc 214s when closing bracket is on same line as last value 214s registers an offense for literal with no trailing comma 214s 214s RuboCop::Cop::Layout::SpaceBeforeBlockBraces 214s when EnforcedStyle is no_space 214s registers an offense and corrects braces surrounded by spaces 214s registers an offense and corrects correct + opposite style 214s accepts left brace without outer space 214s Ruby 2.7 214s registers an offense and corrects correct + opposite style 214s with `EnforcedStyle` of `Style/BlockDelimiters` 214s accepts left brace without outer space 214s with invalid value for EnforcedStyleForEmptyBraces 214s fails with an error 214s when EnforcedStyle is space 214s registers an offense and corrects opposite + correct style 214s registers an offense and corrects left brace without outer space 214s registers an offense and corrects multiline block where the left brace has no outer space 214s accepts braces surrounded by spaces 214s Ruby 2.7 214s registers an offense and corrects opposite + correct style 214s registers an offense and corrects multiline block where the left brace has no outer space 214s with space before empty braces not allowed 214s registers an offense and corrects empty braces 214s accepts empty braces without outer space 214s with space before empty braces allowed 214s registers an offense and corrects empty braces 214s accepts empty braces with outer space 214s 214s RuboCop::Cop::Lint::UselessRuby2Keywords 214s when `ruby2_keywords` is given a symbol 214s registers an offense for an unnecessary `ruby2_keywords` 214s does not register an offense when the `def` is at a different depth 214s does not register an offense for an allowed def 214s does not register an offense when there is no `def` 214s with a dynamically defined method 214s registers an offense for a numblock 214s registers an offense for an unnecessary `ruby2_keywords` 214s does not register an offense for an allowed `ruby2_keywords` 214s does not register an offense when the method has a `restarg` and a `shadowarg` 214s registers an offense when the method has a `shadowarg` 214s when `ruby2_keywords` is given a `def` node 214s does not register an offense for a method with a `restarg` and `blockarg` 214s registers an offense for a method with only keyword args 214s does not register an offense for a method with a `restarg` other positional args 214s does not register an offense for a method with a `restarg` other optional args 214s registers an offense for a method with a `restarg` and keyword args 214s registers an offense for a method without arguments 214s registers an offense for a method with a `restarg` and `kwrestarg` 214s registers an offense for a method with only `kwrestarg` 214s registers an offense for a method with a `restarg` and `kwoptarg` 214s does not register an offense for a method with a `restarg` and no `kwrestarg` 214s registers an offense for a method with only positional args 214s 214s RuboCop::Options 214s options precedence 214s .rubocop directory 214s is ignored and command line options are used 214s .rubocop file 214s has lower precedence then options from RUBOCOP_OPTS env variable 214s has lower precedence then command line options 214s RUBOCOP_OPTS environment variable 214s has lower precedence then command line options 214s has higher precedence then options from .rubocop file 214s option 214s --disable-uncorrectable 214s accepts together with a safe autocorrect argument 214s accepts together with an unsafe autocorrect argument 214s fails if given without an autocorrect argument 214s --autocorrect-all 214s sets some autocorrect options 214s --cache 214s accepts true as argument 214s accepts false as argument 214s fails if no argument is given 214s fails if unrecognized argument is given 214s --raise-cop-error 214s raises cop errors 214s --autocorrect 214s Specify --autocorrect and --autocorrect-all 214s emits a warning and sets some autocorrect options 214s Specify only --autocorrect 214s sets some autocorrect options 214s --display-only-failed 214s fails if given without --format junit 214s works if given with --format junit 214s --fix-layout 214s sets some autocorrect options 214s deprecated options 214s --safe-auto-correct 214s emits a warning and sets the correct options instead 214s --auto-correct 214s emits a warning and sets the correct options instead 214s --auto-correct-all 214s emits a warning and sets the correct options instead 214s --fail-level 214s accepts full severity names 214s accepts severity initial letters 214s accepts the "fake" severities A/autocorrect 214s --cache-root 214s accepts a path as argument 214s fails if also `--cache false` is given 214s fails if no argument is given 214s --regenerate-todo 214s when todo options are overridden before --regenerate-todo 214s is expected to eq {:auto_gen_config=>true, :exclude_limit=>"50", :offense_counts=>false, :regenerate_todo=>true} 214s when todo options are overridden after --regenerate-todo 214s is expected to eq {:auto_gen_config=>true, :exclude_limit=>"50", :offense_counts=>false, :regenerate_todo=>true} 214s when no other options are given 214s is expected to eq {:auto_gen_config=>true, :exclude_limit=>"100", :offense_counts=>false, :regenerate_todo=>true} 214s when disabled options are overridden to be enabled 214s is expected to eq {:auto_gen_config=>true, :exclude_limit=>"100", :offense_counts=>true, :regenerate_todo=>true} 214s --auto-gen-config 214s accepts other options 214s --exclude-limit 214s fails if given without --auto-gen-config 214s fails if given first without argument 214s fails if given alone without argument 214s fails if given last without argument 214s incompatible cli options 214s rejects using -v with -V 214s mentions all incompatible options when more than two are used 214s rejects using -V with --show-cops 214s rejects using -v with --show-cops 214s --display-only-fail-level-offenses 214s fails if given with an autocorrect argument 214s -h/--help 214s lists all builtin formatters 214s shows help text 214s exits cleanly 214s --no-parallel 214s disables parallel from file 214s --auto-gen-only-exclude 214s fails if given without --auto-gen-config 214s --require 214s requires the passed path 214s --parallel 214s combined with an autocorrect argument 214s combined with --fix-layout 214s allows --parallel 214s combined with --autocorrect-all 215s allows --parallel 215s combined with --autocorrect 215s allows --parallel 215s combined with two incompatible arguments 215s ignores --parallel and lists both incompatible arguments 215s combined with --auto-gen-config 215s ignores --parallel 215s combined with --fail-fast 215s ignores --parallel 215s combined with --cache false 215s ignores --parallel 215s --display-only-correctable 215s fails if given with --display-only-failed 215s fails if given with an autocorrect argument 215s -s/--stdin 215s succeeds with exactly one path 215s fails if no paths are given 215s fails if more than one path is given 215s 215s RuboCop::Cop::Style::TrailingUnderscoreVariable 215s configured to allow named underscore variables 215s does not register an offense for a named splat underscore as the last variable 215s registers an offense for nested assignments with trailing underscores 215s does not register an offense for a named variable preceded by a names splat underscore variable 215s does not register an offense for complex nested assignments without trailing underscores 215s does not register an offense for a named underscore variable preceded by a splat variable 215s registers an offense when underscore is the only variable in parallel assignment 215s does not register an offense for an underscore preceded by a splat variable anywhere in the argument chain 215s registers an offense when the last variable of parallel assignment is an underscore 215s registers an offense when underscore is the second to last variable and blank is the last variable 215s registers an offense for an underscore as the last param when there is also an underscore as the first param 215s registers an offense for splat underscore as the last variable 215s does not register an offense for multiple named underscores preceded by a splat variable 215s registers an offense for multiple underscore variables preceded by a splat underscore variable 215s registers an offense when multiple underscores are used as the last variables of parallel assignment 215s does not register an offense when there are no underscores 215s does not register an offense for an underscore preceded by a splat variable 215s does not register an offense for an underscore preceded by a splat variable and another underscore 215s registers an offense for complex nested assignments with trailing underscores 215s does not register an offense for multiple underscore variables preceded by a named splat underscore variable 215s does not register an offense for underscores at the beginning 215s does not register an offense for an underscore variable preceded by a named splat underscore variable 215s does not register an offense for named variables that start with an underscore 215s does not register an offense for nested assignments without trailing underscores 215s does not register an offense for multiple underscores preceded by a splat variable 215s autocorrect 215s with parentheses 215s removes assignment part when every assignment is to `_` 215s leaves parentheses but removes trailing underscores 215s removes assignment part when it is the only variable 215s leaves parentheses but removes trailing underscores and commas 215s configured to not allow named underscore variables 215s registers an offense when multiple underscores are used as the last variables of parallel assignment 215s does not register an offense for multiple named underscores preceded by a splat variable 215s registers an offense for an underscore preceded by a named splat underscore 215s registers an offense for a named splat underscore as the last variable 215s registers an offense for splat underscore as the last variable 215s registers an offense when underscore is the second to last variable and blank is the last variable 215s registers an offense when the last variable of parallel assignment is an underscore 215s registers an offense for nested assignments with trailing underscores 215s does not register an offense for nested assignments without trailing underscores 215s does not register an offense for a named underscore preceded by a splat variable 215s does not register an offense for an underscore preceded by a splat variable and another underscore 215s registers an offense for multiple underscore variables preceded by a splat underscore variable 215s does not register an offense for complex nested assignments without trailing underscores 215s does not register an offense when there are no underscores 215s registers an offense for an underscore variable preceded by a named splat underscore variable 215s registers an offense when underscore is the only variable in parallel assignment 215s does not register an offense for multiple underscores preceded by a splat variable 215s does not register an offense for an underscore preceded by a splat variable 215s does not register an offense for an underscore preceded by a splat variable anywhere in the argument chain 215s does not register an offense for a named underscore variable preceded by a splat variable 215s registers an offense for multiple underscore variables preceded by a named splat underscore variable 215s does not register an offense for a named variable preceded by a names splat underscore variable 215s does not register an offense for underscores at the beginning 215s registers an offense for named variables that start with an underscore 215s registers an offense for complex nested assignments with trailing underscores 215s registers an offense for an underscore as the last param when there is also an underscore as the first param 215s autocorrect 215s with parentheses 215s leaves parentheses but removes trailing underscores 215s removes assignment part when every assignment is to `_` 215s removes assignment part when it is the only variable 215s leaves parentheses but removes trailing underscores and commas 215s 215s RuboCop::Cop::Style::StringConcatenation 215s correctly handles nested concatenable parts 215s registers an offense and corrects for string concatenation 215s correctly handles strings with special characters 215s does not register an offense when using `+` with all non string arguments 215s registers an offense and corrects for string concatenation as part of other expression 215s double quotes inside string 215s registers an offense and corrects with double quotes 215s registers an offense and corrects with percentage quotes 215s Mode = conservative 215s when first operand is string literal 215s registers offense 215s when first operand is not string literal 215s does not register offense 215s heredoc 215s registers an offense but does not correct when string concatenation with multiline heredoc text 215s registers an offense but does not correct 215s multiline 215s multiline block 215s registers an offense but does not correct 215s simple expressions 215s registers an offense and corrects 215s string continuation 215s does not register an offense 215s if condition 215s registers an offense but does not correct 215s double quotes inside string surrounded single quotes 215s registers an offense and corrects with double quotes 215s nested interpolation 215s registers an offense and corrects 215s empty quotes 215s registers offense and corrects 215s inline block 215s registers an offense but does not correct 215s 215s RuboCop::FileFinder 215s #find_file_upwards 215s returns nil when file is not found 215s returns a file to be found upwards 215s #find_last_file_upwards 215s returns the last file found upwards 215s returns nil when file is not found 215s 215s RuboCop::Cop::Lint::NonDeterministicRequireOrder 215s when requiring files 215s with sorted index 215s does not register an offense 215s with sorted glob 215s does not register an offense 215s when Ruby 2.7 or lower 215s with direct block glob 215s registers an offense and autocorrects to add .sort.each 215s with top-level ::Dir 215s registers an offense and corrects to add .sort.each 215s with require block passed as parameter 215s registers an offense and autocorrects to add sort 215s with require_relative block passed as parameter 215s registers an offense and autocorrects to add sort 215s with unsorted index 215s registers an offense and autocorrects to add .sort when the block has `require` 215s registers an offense with extra logic 215s registers an offense and autocorrects to add .sort when the block has `require_relative` 215s registers an offense and autocorrects to add .sort when the numblock has `require` 215s with require_relative block passed as parameter 215s registers an offense an autocorrects to add sort 215s with top-level ::Dir 215s registers an offense and corrects to add .sort 215s with require block passed as parameter 215s registers an offense an autocorrects to add sort 215s with unsorted glob 215s registers an offense and autocorrects to add .sort 215s with top-level ::Dir 215s registers an offense and corrects to add .sort 215s with require block passed as parameter 215s registers an offense an autocorrects to add sort 215s when Ruby 3.0 or higher 215s with direct block glob 215s does not register an offense 215s with require block passed as parameter 215s does not register an offense 215s with top-level ::Dir 215s does not register an offense 215s with `Dir.glob` 215s does not register an offense 215s with top-level ::Dir 215s does not register an offense 215s with `sort: false` keyword option 215s does not register an offense 215s with require block passed as parameter 215s does not register an offense 215s with `Dir[]` 215s does not register an offense 215s with top-level ::Dir 215s does not register an offense 215s with extra logic 215s does not register an offense 215s with require block passed as parameter 215s does not register an offense 215s when not requiring files 215s does not register an offense 215s 215s RuboCop::Cop::Layout::SpaceInsideArrayPercentLiteral 215s accepts non array percent literals 215s for w type and ["[", "]"] delimiters 215s accepts literals with escaped spaces 215s accepts literals without additional spaces 215s registers an offense for unnecessary spaces 215s accepts newlines and additional following alignment spaces 215s accepts multi-line literals 215s accepts literals with escaped and additional spaces 215s registers an offense for multiple spaces between items 215s accepts multi-line literals within a method 215s for w type and ["!", "!"] delimiters 215s accepts newlines and additional following alignment spaces 215s registers an offense for unnecessary spaces 215s accepts literals with escaped and additional spaces 215s registers an offense for multiple spaces between items 215s accepts literals with escaped spaces 215s accepts literals without additional spaces 215s accepts multi-line literals 215s accepts multi-line literals within a method 215s for W type and ["!", "!"] delimiters 215s registers an offense for multiple spaces between items 215s accepts literals with escaped and additional spaces 215s accepts literals with escaped spaces 215s accepts newlines and additional following alignment spaces 215s accepts multi-line literals 215s registers an offense for unnecessary spaces 215s accepts literals without additional spaces 215s accepts multi-line literals within a method 215s for i type and ["!", "!"] delimiters 215s registers an offense for multiple spaces between items 215s accepts multi-line literals 215s accepts literals with escaped spaces 215s registers an offense for unnecessary spaces 215s accepts literals without additional spaces 215s accepts newlines and additional following alignment spaces 215s accepts literals with escaped and additional spaces 215s accepts multi-line literals within a method 215s for I type and ["(", ")"] delimiters 215s accepts multi-line literals within a method 215s accepts multi-line literals 215s accepts literals with escaped and additional spaces 215s accepts literals without additional spaces 215s accepts newlines and additional following alignment spaces 215s registers an offense for unnecessary spaces 215s registers an offense for multiple spaces between items 215s accepts literals with escaped spaces 215s for w type and ["(", ")"] delimiters 215s accepts multi-line literals 215s registers an offense for unnecessary spaces 215s accepts multi-line literals within a method 215s accepts literals without additional spaces 215s accepts literals with escaped spaces 215s accepts newlines and additional following alignment spaces 215s registers an offense for multiple spaces between items 215s accepts literals with escaped and additional spaces 215s for i type and ["(", ")"] delimiters 215s registers an offense for multiple spaces between items 215s accepts multi-line literals 215s accepts multi-line literals within a method 215s accepts newlines and additional following alignment spaces 215s registers an offense for unnecessary spaces 215s accepts literals with escaped and additional spaces 215s accepts literals without additional spaces 215s accepts literals with escaped spaces 215s for I type and ["[", "]"] delimiters 215s accepts literals with escaped spaces 215s accepts multi-line literals 215s accepts literals without additional spaces 215s accepts multi-line literals within a method 215s registers an offense for unnecessary spaces 215s accepts newlines and additional following alignment spaces 215s accepts literals with escaped and additional spaces 215s registers an offense for multiple spaces between items 215s for W type and ["[", "]"] delimiters 215s accepts multi-line literals within a method 215s registers an offense for unnecessary spaces 215s accepts literals without additional spaces 215s accepts multi-line literals 215s accepts literals with escaped spaces 215s registers an offense for multiple spaces between items 215s accepts newlines and additional following alignment spaces 215s accepts literals with escaped and additional spaces 215s for W type and ["{", "}"] delimiters 215s accepts literals without additional spaces 215s accepts newlines and additional following alignment spaces 215s registers an offense for multiple spaces between items 215s accepts multi-line literals within a method 215s registers an offense for unnecessary spaces 215s accepts multi-line literals 215s accepts literals with escaped and additional spaces 215s accepts literals with escaped spaces 215s for I type and ["{", "}"] delimiters 215s accepts multi-line literals within a method 215s accepts newlines and additional following alignment spaces 215s registers an offense for unnecessary spaces 215s accepts multi-line literals 215s accepts literals with escaped spaces 215s accepts literals with escaped and additional spaces 215s registers an offense for multiple spaces between items 215s accepts literals without additional spaces 215s for i type and ["{", "}"] delimiters 215s accepts literals with escaped spaces 215s accepts multi-line literals 215s accepts literals with escaped and additional spaces 215s accepts newlines and additional following alignment spaces 215s registers an offense for unnecessary spaces 215s accepts multi-line literals within a method 215s accepts literals without additional spaces 215s registers an offense for multiple spaces between items 215s for W type and ["(", ")"] delimiters 215s registers an offense for multiple spaces between items 215s accepts multi-line literals 215s accepts newlines and additional following alignment spaces 215s accepts literals without additional spaces 215s accepts literals with escaped and additional spaces 215s accepts multi-line literals within a method 215s registers an offense for unnecessary spaces 215s accepts literals with escaped spaces 215s for w type and ["{", "}"] delimiters 215s accepts newlines and additional following alignment spaces 215s accepts literals with escaped spaces 215s accepts literals without additional spaces 215s accepts multi-line literals 215s registers an offense for unnecessary spaces 215s accepts literals with escaped and additional spaces 215s accepts multi-line literals within a method 215s registers an offense for multiple spaces between items 215s for I type and ["!", "!"] delimiters 215s accepts newlines and additional following alignment spaces 215s accepts multi-line literals within a method 215s registers an offense for unnecessary spaces 215s accepts literals with escaped spaces 215s registers an offense for multiple spaces between items 215s accepts multi-line literals 215s accepts literals without additional spaces 215s accepts literals with escaped and additional spaces 215s for i type and ["[", "]"] delimiters 215s accepts multi-line literals 215s accepts multi-line literals within a method 215s accepts literals without additional spaces 215s accepts newlines and additional following alignment spaces 215s registers an offense for multiple spaces between items 215s registers an offense for unnecessary spaces 215s accepts literals with escaped spaces 215s accepts literals with escaped and additional spaces 215s 215s RuboCop::Cop::Layout::BlockEndNewline 215s accepts multiline blocks with newlines before the end 215s registers an offense and corrects when multiline block end is not on its own line 215s registers an offense and corrects when multiline block `}` is not on its own line and using multiple heredoc argument method chain 215s registers an offense and corrects when a multiline block ends with a hash 215s registers an offense and corrects when multiline block `}` is not on its own line and using heredoc argument 215s accepts a one-liner 215s registers an offense and corrects when multiline block `}` is not on its own line and using method chain 215s registers an offense and corrects when `}` of multiline block without processing is not on its own line 215s registers an offense and corrects when multiline block `}` is not on its own line and using multiple heredoc arguments 215s registers an offense and corrects when a multiline block ends with a method call with hash arguments 215s registers an offense and corrects when multiline block `}` is not on its own line 215s registers an offense and corrects when multiline block `}` is not on its own line and using heredoc argument with method chain 215s Ruby 2.7 215s registers an offense and corrects when multiline block `}` is not on its own line and using heredoc argument 215s registers an offense and corrects when multiline block `}` is not on its own line and using method chain 215s 215s RuboCop::Cop::Naming::AccessorMethodName 215s accepts singleton method get_something with args 215s accepts method set_something with two args 215s accepts method set_something with kwoptarg 215s accepts singleton method set_something with two args 215s registers an offense for method get_something with no args 215s accepts method set_something with no args 215s accepts singleton method set_something with no args 215s registers an offense for singleton method set_something with one args 215s accepts method set_something with kwrestarg 215s accepts method set_something with optarg 215s registers an offense for singleton method get_something with no args 215s accepts method get_something with args 215s accepts method set_something with restarg 215s accepts method set_something with blockarg 215s accepts method set_something with kwarg 215s registers an offense for method set_something with one arg 215s >= Ruby 2.7 215s accepts method set_something with arguments forwarding 215s 215s RuboCop::Cop::VariableForce::Reference 215s .new 215s when non variable reference node is passed 215s raises error 215s 215s RuboCop::Cop::Lint::DuplicateRequire 215s registers and corrects an offense when duplicate `require` through `Kernel` is detected 215s registers and corrects an offense for multiple duplicate requires 215s registers and corrects an offense for duplicate non top-level requires 215s does not register an offense when there are no duplicate `require`s 215s registers and corrects an offense when duplicate `require` is detected 215s registers and corrects an offense when duplicate requires are interleaved with some other code 215s registers and corrects an offense when duplicate `require_relative` is detected 215s does not register an offense when using single `require` 215s does not register an offense when calling user-defined `require` method 215s does not register an offense when same feature argument but different require method 215s 215s RuboCop::Cop::Style::NumericLiterals 215s handles numeric literal with exponent 215s accepts long numbers with underscore 215s registers an offense for an integer with misplaced underscore 215s does not count a leading minus sign as a digit 215s ignores non-decimal literals 215s autocorrects negative floating-point numbers 215s autocorrects numeric literal with exponent and dot 215s autocorrects numbers with spaces between leading minus and numbers 215s registers an offense for a long undelimited integer 215s autocorrects negative numbers 215s accepts integers with less than three places at the end 215s accepts a short integer without underscore 215s accepts short numbers without underscore 215s registers an offense for a float with a long undelimited integer part 215s autocorrects numeric literal with exponent (large E) and dot 215s strict 215s registers an offense for an integer with misplaced underscore 215s when `3000` is specified for `AllowedNumbers` 215s does not register an offense 215s registers an offense 215s when `'3000'` is specified for `AllowedNumbers` 215s does not register an offense 215s registers an offense 215s for --auto-gen-config 215s with separators 215s disables the cop 215s does not disable the cop if the line is disabled 215s when the number is only digits 215s sets the right value if one is disabled inline 215s detects right value of MinDigits based on the longest number 215s AllowedPatterns 215s corrects by inserting underscores every 3 digits 215s registers an offense for numbers that do not exactly match the pattern 215s does not register an offense for numbers that exactly match the pattern 215s AllowedPatterns with repetition 215s does not register an offense for numbers that match the pattern 215s 215s RuboCop::Ext::RegexpNode 215s #each_capture 215s when called with a `named: true` 215s is expected to match [(be an instance of Regexp::Expression::Group::Named)] 215s when called with a `named: false` 215s is expected to match [(be an instance of Regexp::Expression::Group::Capture)] 215s when called without argument 215s is expected to match [(be an instance of Regexp::Expression::Group::Capture), (be an instance of Regexp::Expression::Group::Named)] 215s #parsed_tree 215s with a regexp containing a multi-line interpolation 215s returns the expected blanked tree 215s with a regexp with subexpressions 215s has location information 215s with a regexp not containing interpolation 215s returns the expected tree 215s with an extended mode regexp with comment 215s returns the expected tree 215s with a regexp containing interpolation 215s returns the expected blanked tree 215s 215s RuboCop::Cop::Lint::ElseLayout 215s registers and corrects an offense when using multiple `elsif`s 215s registers an offense and corrects for elsifs 215s accepts empty braces 215s accepts modifier forms 215s registers an offense and corrects for the entire else body being on the same line 215s does not register an offense if the entire if is on a single line 215s accepts proper else 215s accepts ternary ops 215s registers an offense and corrects for expr on same line as else 215s does not register an offense for an elsif with no body 215s 215s RuboCop::Cop::Naming::MethodName 215s accepts for non-ascii characters 215s when configured for camelCase 215s registers an offense for singleton upper case method without corresponding class 215s accepts class emitter method in a class, even when it is defined inside another method 215s registers an offense for mixed snake case and camel case 215s accepts unary operator definitions 215s accepts operator definitions 215s registers an offense for correct + opposite 215s registers an offense for capitalized camel case name in attr. 215s accepts class emitter method in a module, even when it is defined inside another method 215s accepts camel case in singleton method name 215s registers an offense for singleton snake_case method within class 215s registers an offense for mixed snake case and camel case in attr. 215s registers an offense for capitalized camel case 215s registers an offense for camel case methods names in attr. 215s accepts camel case in instance method name 215s accepts one line methods 215s registers an offense for snake case in names 215s accepts camel case names in attr. 215s accepts class emitter method in a module 215s accepts class emitter method in a class 215s registers an offense for snake case name in attr. 215s registers an offense for mixed snake case and camel case in attr. 215s when specifying `AllowedPatterns` 215s does not register an offense for camel case method name in attr. 215s does not register an offense for camel case method name matching `AllowedPatterns` 215s does not register an offense for snake case method name in attr. 215s does not register an offense for snake case method name matching `AllowedPatterns` 215s when configured for snake_case 215s accepts class emitter method in a class 215s accepts operator definitions 215s registers an offense for mixed snake case and camel case 215s accepts snake case in attr. 215s registers an offense for camel case method names in attr. 215s accepts unary operator definitions 215s accepts one line methods 215s registers an offense for mixed snake case and camel case in attr. 215s accepts class emitter method in a module 215s registers an offense for singleton camelCase method within class 215s accepts class emitter method in a module, even when it is defined inside another method 215s registers an offense for camel case methods names in attr. 215s accepts snake case in names 215s registers an offense for capitalized camel case 215s registers an offense for mixed snake case and camel case in attr. 215s registers an offense for singleton upper case method without corresponding class 216s registers an offense for capitalized camel case name in attr. 216s registers an offense for opposite + correct 216s accepts class emitter method in a class, even when it is defined inside another method 216s registers an offense for camel case in instance method name 216s registers an offense for camel case in singleton method name 216s when specifying `AllowedPatterns` 216s does not register an offense for snake case method name matching `AllowedPatterns` 216s does not register an offense for camel case method name matching `AllowedPatterns` 216s does not register an offense for snake case method name in attr. 216s does not register an offense for camel case method name in attr. 216s 216s RuboCop::Cop::Gemspec::DuplicatedAssignment 216s does not register an offense when `name=` method call is not block value 216s registers an offense when using `name=` twice 216s registers an offense when using `version=` twice 216s registers an offense when using `name=` twice with `cbase` 216s registers an offense when using `required_ruby_version=` twice 216s does not register an offense when using `spec.add_dependency` twice 216s does not register an offense when using `<<` twice 216s 216s RuboCop::Cop::Lint::EnsureReturn 216s does not check when ensure block has no body 216s does not register an offense for return outside ensure 216s registers an offense and corrects for return with argument in ensure 216s registers an offense when returning multiple values in `ensure` 216s registers an offense and corrects for return in ensure 216s 216s RuboCop::Cop::InternalAffairs::RedundantDescribedClassAsSubject 216s registers an offense when using `subject(:cop)` with no argument `described_class.new` and `:config` is specified 216s registers an offense when using `subject(:cop)` and `:config` is already specified in `describe` 216s does not register an offense when using `subject(:cop)` with multiple arguments to `described_class.new` 216s registers an offense when using `subject(:cop)` and `:config` is not specified in `describe` 216s 216s RuboCop::Formatter::ClangStyleFormatter 216s #report_file 216s displays text containing the offending source line 216s when the source contains multibyte characters 216s displays text containing the offending source line 216s when the offense is automatically corrected 216s prints [Corrected] along with message 216s when the source line is blank 216s does not display offending source line 216s when the offense is correctable 216s prints message as-is 216s when the offense is not corrected 216s prints message as-is 216s when the offending source spans multiple lines 216s displays the first line with ellipses 216s 216s RuboCop::Cop::Layout::LeadingEmptyLines 216s registers an offense and corrects a new line before a comment 216s registers an offense and corrects multiple new lines before a class 216s registers an offense and corrects a new line before code 216s allows an empty input 216s accepts not having a blank line before code 216s allows blank lines without any comments or code 216s accepts not having a blank line before a class 216s accepts not having a blank line before a comment 216s registers an offense and corrects a new line before a class 216s autocorrect 216s in collaboration 216s does not invoke conflicts with other cops 216s 216s RuboCop::Cop::Naming::AsciiIdentifiers 216s when AsciiConstants is false 216s registers an offense for a variable name with non-ascii chars 216s registers an offense for a variable name with mixed chars 216s accepts constants with only ascii chars 216s does not get confused by an empty file 216s does not get confused by a byte order mark 216s accepts identifiers with only ascii chars 216s when AsciiConstants is true 216s registers an offense for a variable name with non-ascii chars 216s registers an offense for a constant name with non-ascii chars 216s registers an offense for a variable name with mixed chars 216s does not get confused by an empty file 216s accepts identifiers with only ascii chars 216s does not get confused by a byte order mark 216s 216s RuboCop::Cop::Lint::BooleanSymbol 216s registers an offense when using `:false` 216s does not register an offense when using `true` 216s does not register an offense when using regular symbol 216s does not register an offense when used inside percent-literal symbol array 216s does not register an offense when using `false` 216s registers an offense when using `:true` 216s when using the new hash syntax 216s registers an offense when using `true:` 216s registers an offense when using `key: :false` 216s registers an offense when using `false:` 216s 216s RuboCop::Cop::Style::VariableInterpolation 216s registers an offense for interpolated global variables in backticks 216s registers an offense for interpolated global variables in regexp 216s registers an offense for interpolated global variables in string 216s registers an offense for interpolated global variables in symbol 216s registers an offense for interpolated class variables 216s registers an offense for interpolated instance variables 216s does not register an offense for variables in expressions 216s registers an offense for interpolated regexp nth back references 216s registers an offense for interpolated regexp back references 216s 216s RuboCop::Server::Cache 216s .cache_path 216s when `RUBOCOP_CACHE_ROOT` environment variable is set 216s when cache root path is specified path 216s contains the root from cache root path 216s when cache root path is not specified path 216s contains the root from `RUBOCOP_CACHE_ROOT` 216s when cache root path is not specified path and `XDG_CACHE_HOME` environment variable is specified 216s contains the root from `RUBOCOP_CACHE_ROOT` 216s when `CacheRootDirectory` configure value is set 216s when cache root path is not specified path and `XDG_CACHE_HOME` environment variable is spacified 216s contains the root from `CacheRootDirectory` configure value 216s when cache root path is not specified path 216s contains the root from `CacheRootDirectory` configure value 216s when cache root path is specified path 216s contains the root from cache root path 216s when .rubocop.yml is empty 216s when cache root path is not specified path 216s does not raise an error 216s when ERB pre-processing of the configuration file 216s when cache root path is not specified path 216s does not raise an error 216s when cache root path is specified path 216s is the specified path 216s when `XDG_CACHE_HOME` environment variable is set 216s when cache root path is specified path 216s contains the root from cache root path 216s when cache root path is not specified path 216s contains the root from `XDG_CACHE_HOME` 216s when cache root path is not specified as default 216s is the default path 216s .pid_running? 216s works properly when concurrency with server stopping and cleaning cache dir 216s 216s RuboCop::Cop::Style::IpAddresses 216s does not register an offense on an empty string 216s with allowed addresses 216s does not register an offense if the case differs 216s does not register an offense for a allowed addresses 216s IPv6 216s registers an offense for a valid address 216s registers an offense for the loopback address 216s registers an offense for a shortened address 216s does not register an offense for an invalid address 216s registers an offense for an address with 0s collapsed 216s registers an offense for a very short address 216s the unspecified address :: (shortform of 0:0:0:0:0:0:0:0) 216s does not register an offense 216s when it is removed from the allowed addresses 216s registers an offense 216s IPv4 216s does not register an offense for an address inside larger text 216s does not register an offense for an invalid address 216s registers an offense for a valid address 216s 216s RuboCop::Cop::InternalAffairs::RedundantMethodDispatchNode 216s registers an offense when using `node.send_node.receiver` 216s registers an offense when using `node.send_node.method_name` 216s does not register an offense when using `send_node.method_name` 216s does not register an offense when using `node.method_name` 216s does not register an offense when using `node.receiver` 216s does not register an offense when using `node.send_node.arguments?` 216s 216s RuboCop::Cop::Lint::RequireRelativeSelfPath 216s does not register an offense when using a variable as an argument of `require_relative` 216s does not register an offense when the filename is the same but the extension does not match 216s does not register an offense when using `require_relative` without argument 216s does not register an offense when using `require_relative` without self file path argument 216s registers an offense when using `require_relative` with self file path argument (with ext) 216s registers an offense when using `require_relative` with self file path argument 216s 216s RuboCop::Cop::Lint::DuplicateCaseCondition 216s registers an offense for repeated case conditionals 216s accepts similar but not equivalent && expressions 216s registers multiple offenses for repeated multi-value conditionals 216s accepts non-redundant case expressions with an else expression 216s accepts non-redundant case expressions 216s registers an offense for subsequent repeated case conditionals 216s accepts trivial case expressions 216s registers an offense for repeated logical operator when expressions 216s registers multiple offenses for multiple repeated case conditionals 216s 216s RuboCop::Cop::Layout::IndentationConsistency 216s with if statement 216s registers an offense and corrects bad indentation in an else body 216s accepts a one line if statement 216s accepts if/elsif/else/end laid out as a table 216s accepts if/elsif/else/end with fullwidth characters 216s accepts an if in assignment with end aligned with if 216s registers an offense and corrects bad indentation in an if body 216s accepts an if/else in assignment with end aligned with variable 216s accepts an if in assignment with end aligned with variable 216s accepts an if/else in assignment with end aligned with variable and chaining after the end 216s accepts an empty if 216s accepts an if/else in assignment with end aligned with if 216s accepts an if/else in assignment with end aligned with variable and chaining with a block after the end 216s registers an offense and corrects bad indentation in an elsif body 216s accepts an if/else branches with rescue clauses 216s accepts if/then/else/end laid out as another table 216s accepts a correctly aligned if/elsif/else/end 216s accepts an if/else in assignment on next line with end aligned with if 216s with top-level code 216s registers and corrects an offense when using access modifier and indented method definition at the top level 216s accepts an empty expression string interpolation 216s accepts when using access modifier at the top level 216s with block 216s does not autocorrect an offense within another offense 216s accepts an empty block body 216s registers an offense and corrects bad indentation in a {} body 216s registers an offense and correct bad indentation in a do/end body 216s accepts a correctly indented block body 216s with def/defs 216s registers an offense and corrects bad indentation in a defs body 216s registers an offense and corrects bad indentation in a def body 216s accepts an empty def body 216s accepts an empty defs body 216s with for 216s registers an offense and corrects bad indentation in a for body 216s accepts an empty for 216s with class 216s with normal style configured 216s accepts an empty class body 216s registers an offense and corrects bad indentation in a class body 216s registers an offense and corrects bad indentation in def but not for outdented public, protected, and private 216s accepts indented public, protected, and private 216s with indented_internal_methods style configured 216s accepts different indentation in different visibility sections when using `Struct.new` 216s accepts different indentation in different visibility sections 216s with while/until 216s registers an offense and corrects bad indentation in a while body 216s registers an offense and corrects bad indentation in begin/end/while 216s registers an offense and corrects bad indentation in an until body 216s accepts an empty while 216s with module 216s registers an offense and corrects bad indentation of private methods 216s accepts an empty module body 216s registers an offense and corrects bad indentation in a module body 216s even when there are no public methods 216s registers an offense and corrects bad indentation of private methods 216s with case 216s registers an offense and corrects bad indentation in a case/when body 216s registers an offense and corrects bad indentation in a case/else body 216s accepts case/when/else with then beginning a line 216s accepts correctly indented case/when/else 216s accepts indented when/else plus indented body 216s accepts case/when/else laid out as a table 216s with unless 216s accepts an empty unless 216s registers an offense and corrects bad indentation in an unless body 216s 216s RuboCop::Cop::Style::ObjectThen 216s EnforcedStyle: yield_self 216s registers an offense for then with proc param 216s accepts then without a block 216s registers an offense for then with block 216s accepts then with more than 1 param 216s EnforcedStyle: then 216s accepts yield_self with more than 1 param 216s accepts yield_self without a block 216s registers an offense for yield_self with proc param 216s Ruby 2.6 216s registers an offense for yield_self with block 216s Ruby 2.7 216s registers an offense for yield_self with block 216s Ruby 2.5 216s accepts yield_self with block 216s 216s RuboCop::Cop::Layout::DefEndAlignment 216s when EnforcedStyleAlignWith is start_of_line 216s accepts matching def ... end 216s registers an offense for mismatched foo def test end and autocorrects 216s accepts matching defs ... end 216s accepts matching def ... end 216s accepts matching foo bar def ... end 216s registers an offense for mismatched def Test.test end and autocorrects 216s registers an offense for mismatched def test end and autocorrects 216s accepts matching foo def ... end 216s when including an anonymous module containing `private def` 216s does not register an offense 216s when using refinements and `private def` 216s does not register an offense 216s correct + opposite 216s registers an offense 216s when EnforcedStyleAlignWith is def 216s accepts matching foo def ... end 216s registers an offense for mismatched def Test.test end and autocorrects 216s accepts matching def ... end 216s registers an offense for mismatched foo def test end and autocorrects 216s accepts matching defs ... end 216s registers an offense for mismatched def test end and autocorrects 216s correct + opposite 216s registers an offense 216s 216s RuboCop::Cop::Style::Lambda 216s with enforced `lambda` style 216s with a multiline lambda literal 216s with arguments 216s registers an offense 216s without arguments 216s registers an offense 216s with a single line lambda literal 216s without argument parens and spaces 216s registers an offense 216s without arguments 216s registers an offense 216s with arguments 216s registers an offense 216s with enforced `literal` style 216s with a multiline lambda method call 216s with arguments 216s registers an offense 216s without arguments 216s registers an offense 216s with a single line lambda method call 216s without arguments 216s registers an offense 216s with arguments 216s registers an offense 216s with default `line_count_dependent` style 216s with a single line lambda literal 216s does not register an offense 216s with a multiline do-end lambda literal as a keyword argument 216s registers an offense 216s with a multiline lambda literal 216s without arguments 216s registers an offense 216s with arguments 216s registers an offense 216s with a single line lambda method call 216s without arguments 216s registers an offense 216s with arguments 216s registers an offense 216s with a multiline lambda method call 216s does not register an offense 216s with a multiline braces lambda literal as a keyword argument 216s registers an offense 216s with a multiline do-end lambda as a parenthesized kwarg 216s registers an offense 216s unusual lack of spacing 216s without spacing after arguments 216s registers an offense 216s without any spacing 216s registers an offense 216s with a multiline lambda literal 216s without parentheses 216s registers an offense 216s with no parentheses and many args 216s registers an offense 216s with no arguments and bad spacing 216s registers an offense 216s with no parentheses and bad spacing 216s registers an offense 216s with no arguments and no spacing 216s registers an offense 216s with empty arguments 216s registers an offense 216s without spacing before arguments 216s registers an offense 216s with a multiline lambda literal as an argument 216s registers an offense 216s when calling a lambda method without a block 216s does not register an offense 216s >= Ruby 2.7 216s when using numbered parameter 216s with a single line lambda literal 216s does not register an offense 216s with a multiline lambda method call 216s does not register an offense 216s with a single line lambda method call 216s registers an offense 216s when using safe navigation operator 216s does not break 216s 216s RuboCop::Cop::Style::CommandLiteral 216s heredoc commands 216s is ignored 216s when PercentLiteralDelimiters is configured and a default exists 216s ignores the default when autocorrecting 216s when EnforcedStyle is set to mixed 216s a single-line %x string with backticks 216s is accepted 216s when configured to allow inner backticks 216s registers an offense without autocorrection 216s a single-line ` string with backticks 216s registers an offense without autocorrection 216s when configured to allow inner backticks 216s is accepted 216s a multi-line ` string without backticks 216s registers an offense and corrects to %x 216s a multi-line %x string with backticks 216s is accepted 216s a single-line %x string without backticks 216s registers an offense and corrects to backticks 216s a multi-line ` string with backticks 216s registers an offense without autocorrection 216s a single-line ` string without backticks 216s is accepted 216s a multi-line %x string without backticks 216s is accepted 216s when EnforcedStyle is set to backticks 216s a single-line %x string with backticks 216s is accepted 216s when configured to allow inner backticks 216s registers an offense without autocorrection 216s a single-line %x string without backticks 216s registers an offense and corrects to backticks 216s a single-line ` string without backticks 216s is accepted 216s a single-line ` string with backticks 216s registers an offense without autocorrection 216s when configured to allow inner backticks 216s is accepted 216s a multi-line %x string with backticks 216s is accepted 216s when configured to allow inner backticks 216s registers an offense without autocorrection 216s a multi-line %x string without backticks 216s registers an offense and corrects to backticks 216s a multi-line ` string with backticks 216s registers an offense without autocorrection 216s when configured to allow inner backticks 216s is accepted 216s a multi-line ` string without backticks 216s is accepted 216s when PercentLiteralDelimiters only has a default 216s respects the configuration when autocorrecting 216s when PercentLiteralDelimiters is configured with curly braces 216s respects the configuration when autocorrecting 216s when EnforcedStyle is set to percent_x 216s a multi-line %x string with backticks 216s is accepted 216s a single-line ` string without backticks 216s registers an offense and corrects to %x 216s a multi-line %x string without backticks 216s is accepted 216s a single-line ` string with backticks 216s registers an offense without autocorrection 216s a multi-line ` string with backticks 216s registers an offense without autocorrection 216s a multi-line ` string without backticks 216s registers an offense and corrects to %x 216s a single-line %x string without backticks 216s is accepted 216s a single-line %x string with backticks 216s is accepted 216s %x commands with other delimiters than parentheses 216s registers an offense 216s 216s RuboCop::Cop::Style::MethodCalledOnDoEndBlock 216s with a {} block 216s accepts a multi-line block with a chained call 216s accepts a single-line block with a chained call 216s with a single-line do..end block 216s registers an offense for a chained call 216s accepts a single-line do..end block with a chained block 216s Ruby 2.7 216s registers an offense for a chained call 216s with a multi-line do..end block 216s registers an offense for a chained call 216s accepts a chained block 216s accepts it if there is no chained call 216s when using safe navigation operator 216s registers an offense for a chained call 216s 216s RuboCop::Cop::Style::MultilineBlockChain 216s accepts a multi-line block chained with calls on one line 216s accepts a chain of calls followed by a multi-line block 216s accepts a chain of blocks spanning one line 216s with multi-line block chaining 216s registers an offense for a simple case 216s registers an offense for a chain where the second block is single-line 216s registers an offense for a slightly more complicated case 216s registers two offenses for a chain of three blocks 216s accepts a chain where the first block is single-line 216s Ruby 2.7 216s registers an offense for a slightly more complicated case 216s 216s RuboCop::RemoteConfig 216s .file 216s downloads the file if the file does not exist 216s does not download the file if cache lifetime has not been reached 216s downloads the file if cache lifetime has been reached 216s when remote URL is configured with token auth 216s does not download the file if cache lifetime has not been reached 216s downloads the file if cache lifetime has been reached 216s downloads the file if the file does not exist 216s when the remote URL responds with 404 216s raises error 216s when the remote URL responds with redirect 216s follows the redirect and downloads the file 216s when the remote URL responds with not modified 216s reuses the existing cached file 216s when the network is inaccessible 216s reuses the existing cached file 216s when the remote URL responds with 500 216s raises error 216s when remote URL is configured with basic auth 216s does not download the file if cache lifetime has not been reached 216s downloads the file if cache lifetime has been reached 216s downloads the file if the file does not exist 216s when the remote URL responds with 404 216s raises error 216s when the remote URL responds with 500 216s raises error 216s .inherit_from_remote 216s when the remote includes file starting with `./` 216s returns remote includes URI 216s 216s RuboCop::Cop::Style::RegexpLiteral 216s when regex contains slashes in interpolation 216s ignores the slashes that do not belong // regex 216s when EnforcedStyle is set to mixed 216s a multi-line %r regex without slashes 216s is accepted 216s a multi-line %r regex with slashes 216s is accepted 216s a multi-line `//` regex without slashes 216s registers an offense 216s a single-line %r regex without slashes 216s registers an offense 216s a single-line %r regex with slashes 216s is accepted 216s when configured to allow inner slashes 216s registers an offense 216s a single-line `//` regex with slashes 216s registers an offense 216s when configured to allow inner slashes 216s is accepted 216s a multi-line `//` regex with slashes 216s registers an offense 216s a single-line `//` regex without slashes 216s is accepted 216s when `EnforcedStyle: omit_parentheses` of `Style/MethodCallWithArgsParentheses` cop 216s when using `%r` regexp with `EnforcedStyle: mixed` 216s does not register an offense when used as a safe navigation method argument 216s registers an offense when not used as a method argument 216s does not register an offense when used as a method argument 216s when using `%r` regexp with `EnforcedStyle: slashes` 216s registers an offense when not used as a method argument 216s does not register an offense when used as a method argument 216s does not register an offense when used as a safe navigation method argument 216s when EnforcedStyle is set to percent_r 216s a multi-line `//` regex with slashes 216s registers an offense 216s a multi-line `//` regex without slashes 216s registers an offense 216s a multi-line %r regex with slashes 216s is accepted 216s a single-line %r regex without slashes 216s is accepted 216s a multi-line %r regex without slashes 216s is accepted 216s a single-line `//` regex without slashes 216s registers an offense 216s a single-line %r regex with slashes 216s is accepted 216s a single-line `//` regex with slashes 216s registers an offense 216s %r regex with other delimiters than curly braces 216s registers an offense 216s when PercentLiteralDelimiters is configured with slashes 216s respects the configuration when autocorrecting 216s when EnforcedStyle is set to slashes 216s a multi-line `//` regex without slashes 216s is accepted 216s a multi-line %r regex with slashes 216s is accepted 216s when configured to allow inner slashes 216s registers an offense 216s a multi-line `//` regex with slashes 216s registers an offense 216s when configured to allow inner slashes 217s is accepted 217s a single-line `//` regex without slashes 217s is accepted 217s a single-line `//` regex with slashes 217s registers an offense 217s when configured to allow inner slashes 217s is accepted 217s a single-line %r regex with slashes 217s is accepted 217s when configured to allow inner slashes 217s registers an offense 217s a single-line `%r//` regex with slashes 217s is accepted 217s when configured to allow inner slashes 217s preserves slashes after autocorrection 217s a multi-line %r regex without slashes 217s registers an offense 217s a single-line `//` regex with slashes and interpolation 217s registers an offense 217s when configured to allow inner slashes 217s is accepted 217s a single-line %r regex without slashes 217s registers an offense 217s when PercentLiteralDelimiters is configured with brackets 217s respects the configuration when autocorrecting 217s when `EnforcedStyle: require_parentheses` of `Style/MethodCallWithArgsParentheses` cop 217s when using `%r` regexp with `EnforcedStyle: slashes` 217s registers an offense when using a regexp starts with a blank 217s registers an offense when not used as a method argument 217s registers an offense when used as a safe navigation method argument 217s does not register an offense when using a regexp starts with a blank as a method argument 217s does not register an offense when using a regexp starts with a blank as a safe navigation method argument 217s registers an offense when used as a method argument 217s when using `%r` regexp with `EnforcedStyle: mixed` 217s registers an offense when using a regexp starts with a blank 217s registers an offense when not used as a method argument 217s does not register an offense when using a regexp starts with a blank as a safe navigation method argument 217s does not register an offense when using a regexp starts with a blank as a method argument 217s registers an offense when used as a safe navigation method argument 217s registers an offense when used as a method argument 217s 217s RuboCop::Formatter::ProgressFormatter 217s #file_finished 217s when no offenses are detected 217s calls #report_as_with_mark 217s when any offenses are detected 217s calls #report_as_with_mark 217s #report_file_as_mark 217s when different severity offenses are detected 217s prints highest level mark 217s when a refactor convention offense is detected 217s prints "C" 217s when no offenses are detected 217s prints "." 217s when a refactor severity offense is detected 217s prints "R" 217s #finished 217s calls #report_summary 217s when any offenses are detected 217s reports all detected offenses for all failed files 217s when no offenses are detected 217s does not report offenses 217s 217s RuboCop::Cop::Lint::IncompatibleIoSelectWithFiberScheduler 217s registers and corrects an offense when using `IO.select` with single write argument 217s registers and corrects an offense when using `IO.select` with single read and timeout arguments 217s registers and corrects an offense when using `IO.select` with single write as `self` and timeout arguments 217s does not register an offense when using `IO.select` with multiple write arguments 217s registers and corrects an offense when using `::IO.select` with single read argument 217s registers and corrects an offense when using `IO.select` with single read, `nil`, and timeout arguments 217s does not register an offense when using `IO.select` with read and write arguments 217s does not register an offense when using `Enumerable#select` 217s does not register an offense when using `IO.select` with multiple read arguments 217s registers and corrects an offense when using `IO.select` with multiple read argument and specify the first argument only 217s registers and corrects an offense when using `IO.select` with single write and timeout arguments 217s registers and corrects an offense when using `IO.select` with single read as `self` and timeout arguments 217s registers and corrects an offense when using `IO.select` with single read argument 217s registers and corrects an offense when using `IO.select` with single write, `nil`, and timeout arguments 217s registers and corrects an offense when using `IO.select` with single read argument and specify the first argument only 217s registers an offense when using `IO.select` with write argument and using return value but does not autocorrect 217s registers an offense when using `IO.select` with read argument and using return value but does not autocorrect 217s registers and corrects an offense when using `::IO.select` with single read and timeout arguments 217s 217s RuboCop::Formatter::JUnitFormatter 217s #file_finished 217s displays end of parsable text 217s displays a non-offense element in parsable text 217s displays an offense for `classname='test_2` in parsable text 217s displays an offense for `classname='test_1` in parsable text 217s displays start of parsable text 217s 217s RuboCop::Cop::Style::BeginBlock 217s reports an offense for a BEGIN block 217s 217s RuboCop::Cop::Lint::DuplicateMagicComment 217s does not register an offense when frozen magic comments are not duplicated 217s registers an offense when frozen magic comments are duplicated 217s does not register an offense when encoding and frozen magic comments are not duplicated 217s does not register an offense when encoding magic comments are not duplicated 217s registers an offense when same encoding magic comments are duplicated 217s registers an offense when different encoding magic comments are duplicated 217s registers an offense when encoding and frozen magic comments are duplicated 217s 217s RuboCop::Cop::Layout::EmptyLinesAroundBeginBody 217s registers an offense for rescue body ending 217s registers an offense for begin body starting with a blank 217s registers an offense for else body ending 217s registers many offenses with complex begin-end 217s registers an offense for ensure body ending 217s registers an offense for begin body starting in method 217s accepts begin block without empty line in a method 217s registers an offense for begin body ending in method 217s registers an offense for begin body ending with a blank 217s registers an offense for begin body starting with rescue 217s accepts begin block without empty line 217s 217s RuboCop::Cop::Style::EachWithObject 217s correctly autocorrects with return value only 217s ignores inject and reduce passed in symbol 217s finds inject and reduce with passed in and returned hash 217s ignores inject and reduce with empty body 217s ignores inject and reduce with passed in, but not returned hash 217s ignores inject/reduce with assignment to accumulator param in block 217s correctly autocorrects 217s does not blow up for reduce with no arguments 217s ignores inject and reduce with condition as body 217s when a simple literal is passed as initial value 217s ignores inject/reduce 217s Ruby 2.7 217s finds inject and reduce with passed in and returned hash and numblock 217s 217s RuboCop::Cop::Cop 217s keeps track of offenses 217s will set custom severity if present 217s will set default severity 217s will warn if custom severity is invalid 217s initially has 0 offenses 217s will report registered offenses 217s #autocorrect? 217s when the option is not given 217s is expected to equal false 217s when the option is given 217s is expected to equal true 217s when the cop is set to not autocorrect 217s is expected to equal false 217s when cop does not support autocorrection 217s is expected to equal false 217s when disable_uncorrectable is enabled 217s is expected to equal true 217s with lint cops 217s has right department 217s has right name 217s #safe_autocorrect? 217s when safety is undeclared 217s is expected to equal true 217s when autocorrection of the cop is declared unsafe 217s is expected to equal false 217s when cop is declared unsafe 217s is expected to equal false 217s with no submodule 217s has right department 217s has right name 217s Registry 217s #departments 217s contains every value only once 217s is expected to include :Lint 217s has departments 217s is expected to include :Style 217s #with_department 217s has each cop in exactly one type 217s has at least one cop per department 217s returns 0 for an invalid type 217s with style cops 217s has right name 217s has right department 217s .qualified_cop_name 217s returns the given cop name if it already has a namespace 217s raises an error if the cop name is in more than one namespace 217s returns the cop name in a different namespace if the provided namespace is incorrect 217s adds namespace if the cop name is found in exactly one namespace 217s returns the given cop name if it already has a namespace even when the cop exists in multiple namespaces 217s returns the given cop name if it is not found in any namespace 217s .documentation_url 217s for a builtin cop class 217s is expected to eq "https://docs.rubocop.org/rubocop/cops_layout.html#layoutblockendnewline" 217s for a custom cop class 217s is expected to be nil 217s when disabled by a comment 217s ignore_disable_comments is true 217s will not set offense as disabled 217s ignore_disable_comments is false 217s will set offense as disabled 217s #relevant_file? 217s when the file is an anonymous source 217s is expected to equal true 217s when the file doesn't match the Include configuration 217s is expected to equal false 217s when the file matches the Include configuration 217s is expected to equal true 217s setting of Offense#corrected attribute 217s when cop supports autocorrection 217s when autocorrection is not needed 217s is set to false 217s when offense was corrected 217s is set to true 217s when offense was not corrected because of an error 217s is set to false 217s when cop does not support autocorrection 217s is not specified (set to nil) 217s when autocorrect is requested 217s is not specified (set to nil) 217s when disable_uncorrectable is enabled 217s is set to true 217s for a cop with a name 217s registers offense with its name 217s 217s RuboCop::Cop::Layout::EmptyLineAfterMagicComment 217s registers an offense for code that immediately follows comment 217s registers an offense when multiple magic comments without empty line 217s accepts an empty source file 217s accepts a source file with only a magic comment 217s accepts magic comment with shareable_constant_value 217s accepts magic comment followed by encoding 217s registers an offense when code that immediately follows typed comment 217s accepts code that separates the comment from the code with a newline 217s registers offense when frozen_string_literal used with shareable_constant_value without empty line 217s accepts magic comment with typed 217s registers an offense for documentation immediately following comment 217s 217s RuboCop::Cop::Style::HashEachMethods 217s when node matches a keys#each or values#each 217s when receiver is a hash literal 217s does not register an offense for {}#each_key 217s registers offense, autocorrects {}#keys.each with {}#each_key 217s registers offense, autocorrects {}#keys.each to {}#each_key with a symbol proc argument 217s registers offense, autocorrects {}#values.each with {}#each_value 217s does not register an offense for {}#each_value 217s registers offense, autocorrects {}#values.each to {}#each_value with a symbol proc argument 217s when receiver is a send 217s registers offense, autocorrects foo#keys.each to foo#each_key with a symbol proc argument 217s registers offense, autocorrects foo#values.each to foo#each_value with a symbol proc argument 217s does not register an offense for foo#each_key 217s registers offense, autocorrects foo#keys.each to foo#each_key 217s does not register an offense for Hash#each_value 217s registers offense, autocorrects foo#values.each to foo#each_value 217s Ruby 2.7 217s registers offense, autocorrects foo#keys.each to foo#each_key with numblock 217s when receiver is implicit 217s does not register an offense for `keys.each` with a symbol proc argument 217s does not register an offense for each_key 217s does not register an offense for `keys.each` 217s does not register an offense for `values.each` 217s does not register an offense for each_value 217s does not register an offense for `values.each` with a symbol proc argument 217s when `AllowedReceivers: ['execute']` 217s registers an offense when receiver is not allowed name 217s does not register an offense when receiver is `execute` method 217s does not register an offense when receiver is `execute` variable 217s does not register an offense when receiver is `execute` method with a symbol proc argument 217s 217s RuboCop::Cop::Style::RedundantException 217s reports an offense for a raise with ::RuntimeError.new 217s reports an offense for a fail with ::RuntimeError.new 217s reports an offense for a fail with ::RuntimeError and () 217s accepts rescue w/ non redundant error 217s accepts rescue w/ non redundant error 217s reports an offense for a fail with RuntimeError.new 217s reports an offense for a raise with RuntimeError.new 217s reports an offense for a fail with ::RuntimeError.new 217s reports an offense for a raise with ::RuntimeError.new 217s reports an offense for a fail with ::RuntimeError 217s reports an offense for a raise with ::RuntimeError and () 217s reports an offense for a fail with RuntimeError 217s accepts a raise with ::RuntimeError if it does not have 2 args 217s reports an offense for a raise with RuntimeError and () 217s reports an offense for a fail with RuntimeError and () 217s accepts a raise with RuntimeError if it does not have 2 args 217s accepts rescue w/ non redundant error 217s accepts a fail with ::RuntimeError if it does not have 2 args 217s accepts rescue w/ non redundant error 217s accepts a fail with RuntimeError if it does not have 2 args 217s reports an offense for a raise with ::RuntimeError 217s reports an offense for a fail with RuntimeError.new 217s reports an offense for a raise with RuntimeError 217s reports an offense for a raise with RuntimeError.new 217s 217s RuboCop::Cop::Style::ConstantVisibility 217s does not register an offense when passing a string to the visibility declaration 217s does not register an offense in the top level scope 217s registers an offense for module definitions 217s IgnoreModules 217s registers an offense for constants 217s does not register an offense for class definitions 217s when defining a constant in a module 217s registers an offense when not using a visibility declaration 217s does not register an offense when using a visibility declaration 217s when defining a constant in a class 217s with a multi-statement body 217s registers an offense when not using a visibility declaration 217s does not register an offense when using a visibility declaration 217s registers an offense when there is no matching visibility declaration 217s with a single-statement body 217s registers an offense when not using a visibility declaration 217s 217s RuboCop::Cop::Style::ParallelAssignment 217s registers an offense when assignments must be reordered to preserve meaning 217s corrects parallel assignment in rescue statements within begin ... rescue 217s allows more left variables than right variables 217s corrects when the number of left hand variables matches the number of right hand variables 217s registers an offense when the right side has mixed expressions 217s corrects when assigning to method returns 217s registers an offense when assigning to namespaced constants 217s corrects when the expression uses a modifier if statement inside a method 217s corrects parallel assignment inside rescue statements within method definitions 217s corrects parallel assignment in until statements 217s corrects parallel assignment in if statements 217s corrects when the expression uses a modifier rescue statement inside of a method 217s registers an offense when left hand side ends with an implicit variable 217s corrects when the right variable is a word array 217s corrects when using parallel assignment in singleton method 217s corrects when the expression uses a modifier if statement 217s registers an offense when the right side has mulitiple arrays 217s corrects parallel assignment in while statements 217s registers an offense when the right side has multiple hashes 217s corrects when the expression uses a modifier rescue statement 217s corrects when the right variable is an array 217s registers an offense when right hand side has maps with blocks 217s corrects parallel assignment in unless statements 217s corrects when using single indentation 217s corrects when the right variable is a symbol array 217s allows more right variables than left variables 217s corrects when assignments must be reordered to avoid changing meaning 217s registers an offense with indices of different variables 217s registers an offense when assigning to same variables in same order 217s registers an offense with indices and attributes when assignments must be reordered to preserve meaning 217s corrects when the expression uses a modifier until statement 217s registers an offense when right hand side has namespaced constants 217s corrects when the expression is missing spaces 217s corrects when the expression uses a modifier while statement 217s allows expanding an assigned var 217s registers an offense when the right side has methods with/without blocks 217s registers an offense when the right side has constants 217s corrects when using constants 217s corrects when assigning from multiple methods with blocks 217s corrects when the expression uses a modifier unless statement 217s corrects when using nested indentation 217s registers an offense with attributes when assignments must be reordered to preserve meaning 217s registers an offense with indices 217s corrects when the expression uses a modifier rescue statement as the only thing inside of a method 217s behaves like allowed 217s allows assignment of: a, b, c = 1, 2, *node 217s behaves like allowed 217s allows assignment of: a, b = foo.map { |e| e.id } 217s behaves like allowed 218s allows assignment of: a, = 1 218s behaves like allowed 218s allows assignment of: self.a, self.b = b, a 218s behaves like allowed 218s allows assignment of: a = 1; b = 2; 218s behaves like allowed 218s allows assignment of: a, = *'foo' 218s using custom indentation width 218s works with standard correction 218s works with rescue 218s works with nesting 218s works with guard clauses 218s behaves like allowed 218s allows assignment of: *a, b = [1, 2, 3] 218s behaves like allowed 218s allows assignment of: a = a 218s behaves like allowed 218s allows assignment of: a, b = *foo 218s behaves like allowed 218s allows assignment of: ary[0], ary[1], ary[2] = ary[1], ary[2], ary[0] 218s behaves like allowed 218s allows assignment of: self.a, self.b = self.b, self.a 218s behaves like allowed 218s allows assignment of: obj.attr1, ary[0] = ary[0], obj.attr1 218s behaves like allowed 218s allows assignment of: CONSTANT, = 1, 2 218s behaves like allowed 218s allows assignment of: a, b = (a + b), (a - b) 218s behaves like allowed 218s allows assignment of: a = *'foo' 218s behaves like allowed 218s allows assignment of: begin_token, end_token = CONSTANT 218s behaves like allowed 218s allows assignment of: a, b = Float::INFINITY 218s behaves like allowed 218s allows assignment of: a, b, c = *node, 1, 2 218s behaves like allowed 218s allows assignment of: a, = 1, 2, 3 218s behaves like allowed 218s allows assignment of: a, = *foo 218s behaves like allowed 218s allows assignment of: foo = [1, 2, 3]; a, b, c = foo; 218s behaves like allowed 218s allows assignment of: a = 1 218s behaves like allowed 218s allows assignment of: a, b, c = b, c, a 218s behaves like allowed 218s allows assignment of: a, = a 218s behaves like allowed 218s allows assignment of: a[0], a[1] = a[1], a[0] 218s behaves like allowed 218s allows assignment of: array = [1, 2, 3]; a, = array; 218s behaves like allowed 218s allows assignment of: obj.attr1, obj.attr2 = obj.attr2, obj.attr1 218s behaves like allowed 218s allows assignment of: a, b = b, a 218s behaves like allowed 218s allows assignment of: a, b = foo() 218s behaves like allowed 218s allows assignment of: a, *b = [1, 2, 3] 218s 218s RuboCop::Cop::Style::HashAsLastArrayItem 218s when EnforcedStyle is braces 218s registers an offense and corrects when hash without braces 218s does not register an offense when the hash is empty 218s does not register an offense when the array is all hashes 218s does not register an offense when using double splat operator 218s does not register an offense when hash with braces 218s does not register an offense when hash is not inside array 218s when EnforcedStyle is no_braces 218s does not register an offense when the array is all hashes 218s does not register an offense when hash without braces 218s does not register an offense when hash is not inside array 218s registers an offense and corrects when hash with braces and trailing comma and new line 218s registers an offense and corrects when hash with braces and trailing comma 218s does not register an offense when hash is not the last element 218s does not register an offense when the hash is empty 218s does not register an offense when passing an implicit array to a setter 218s registers an offense and corrects when hash with braces 218s 218s RuboCop::Cop::Naming::HeredocDelimiterCase 218s when enforced style is uppercase 218s with an interpolated heredoc 218s registers an offense and corrects with a lowercase delimiter 218s does not register an offense with an uppercase delimiter 218s registers an offense with a camel case delimiter 218s with a non-interpolated heredoc 218s when using back tick delimiters 218s registers an offense and corrects with a lowercase delimiter 218s does not register an offense with an uppercase delimiter 218s registers an offense and corrects with a camel case delimiter 218s when using non-word delimiters 218s does not register an offense 218s when using double quoted delimiters 218s does not register an offense with an uppercase delimiter 218s registers an offense and corrects with a camel case delimiter 218s registers an offense and corrects with a lowercase delimiter 218s when using single quoted delimiters 218s registers an offense and corrects with a lowercase delimiter 218s does not register an offense with an uppercase delimiter 218s registers an offense and corrects with a camel case delimiter 218s with a squiggly heredoc 218s registers an offense and corrects with a camel case delimiter 218s does not register an offense with an uppercase delimiter 218s registers an offense and corrects with a lowercase delimiter 218s when enforced style is lowercase 218s with an interpolated heredoc 218s registers an offense and corrects with a camel case delimiter 218s does not register an offense with a lowercase delimiter 218s registers an offense and corrects with an uppercase delimiter 218s with a non-interpolated heredoc 218s registers an offense and corrects with a camel case delimiter 218s does not register an offense with a lowercase delimiter 218s registers an offense and corrects with an uppercase delimiter 218s with a squiggly heredoc 218s does not register an offense with a lowercase delimiter 218s registers an offense and corrects with an uppercase delimiter 218s registers an offense and corrects with a camel case delimiter 218s 218s RuboCop::Cop::Layout::ClosingParenthesisIndentation 218s accepts begin nodes that are not grouped expressions 218s for method calls 218s without arguments 218s accepts a correctly aligned ) against ( 218s accepts empty () 218s can handle indentation up against the left edge 218s with first multiline arg on new line 218s accepts ) on the same level as ( with args on same line 218s accepts ) on the same level as ( with second arg on new line 218s with line break before 1st parameter 218s accepts a correctly aligned ) 218s registers an offense for misaligned ) 218s with no line break before 1st parameter 218s accepts a correctly aligned ) 218s accepts a correctly indented ) inside a block 218s registers an offense and corrects misindented ) when ) is aligned with the params 218s accepts a correctly indented ) 218s registers an offense for misaligned ) 218s does not register an offense when using keyword arguments 218s for method definitions 218s with no line break before 1st parameter 218s registers an offense for misaligned ) 218s accepts empty () 218s accepts a correctly aligned ) 218s with line break before 1st parameter 218s registers an offense for misaligned ) 218s accepts a correctly aligned ) 218s for method chains 218s registers an offense and corrects method chains 218s can handle multiple chains with differing breaks 218s when using safe navigation operator 218s registers an offense and corrects misaligned ) 218s for method assignments with indented parameters 218s with line break before 1st parameter 218s accepts a correctly aligned ) 218s registers an offense for misaligned ) 218s with no line break before 1st parameter 218s can handle individual arguments that are broken over lines 218s can handle inner method calls 218s can handle hash arguments that are not broken over lines 218s accepts a correctly indented ) 218s can handle indentation up against the left edge 218s registers an offense for misaligned ) 218s accepts a correctly aligned ) 218s without arguments 218s accepts a correctly aligned ) against ( 218s registers an offense for misaligned ) 218s accepts empty () 218s can handle indentation up against the method 218s can handle indentation up against the left edge 218s for grouped expressions 218s with line break before 1st operand 218s registers an offense for misaligned ) 218s accepts a correctly aligned ) 218s with no line break before 1st operand 218s registers an offense for misaligned ) 218s accepts ) that does not begin its line 218s accepts a correctly aligned ) 218s 218s RuboCop::Cop::Lint::AmbiguousAssignment 218s registers an offense when using `-` with `x` 218s does not register an offense when no mistype assignments 218s registers an offense when using `*` with `@@x` 218s registers an offense when using `!` with `@x` 218s does not register an offense when no mistype assignments 218s registers an offense when using `!` with `$x` 218s registers an offense when using `!` with `x` 218s does not register an offense when no mistype assignments 218s registers an offense when using `+` with `X` 218s does not register an offense when no mistype assignments 218s registers an offense when using `!` with `X` 218s registers an offense when using `+` with `x` 218s does not register an offense when no mistype assignments 218s does not register an offense when no mistype assignments 218s does not register an offense when no mistype assignments 218s registers an offense when using `+` with `$x` 218s does not register an offense when no mistype assignments 218s does not register an offense when no mistype assignments 218s registers an offense when using `+` with `@x` 218s registers an offense when using `*` with `X` 218s does not register an offense when no mistype assignments 218s does not register an offense when no mistype assignments 218s registers an offense when using `-` with `$x` 218s registers an offense when using `*` with `@x` 218s does not register an offense when no mistype assignments 218s registers an offense when using `*` with `$x` 218s does not register an offense when no mistype assignments 218s does not register an offense when no mistype assignments 218s does not register an offense when no mistype assignments 218s does not register an offense when no mistype assignments 218s does not register an offense when no mistype assignments 218s registers an offense when using `+` with `@@x` 218s registers an offense when using `-` with `@x` 218s registers an offense when using `-` with `@@x` 218s does not register an offense when no mistype assignments 218s registers an offense when using `*` with `x` 218s registers an offense when using `!` with `@@x` 218s does not register an offense when no mistype assignments 218s does not register an offense when no mistype assignments 218s registers an offense when using `-` with `X` 218s 218s RuboCop::Cop::InternalAffairs::CreateEmptyFile 218s does not register an offense when using `create_file(path)` 218s does not register an offense when using `create_file(path, 'hello')` 218s registers an offense when using `create_file(path, '') 218s registers an offense when using `create_file(path, "") 218s does not register an offense when using `create_file(path, ['foo', 'bar'])` 218s does not register an offense when using `receiver.create_file(path, '')` 218s 218s RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier 218s EnforcedStyle is `only_before` 218s does not register an offense when `end` immediately after protected 218s accepts blank line after module_function 218s registers an offense for missing blank line before private 218s accepts missing blank line after private 218s registers an offense for missing blank line before module_function 218s accepts blank line after public 218s registers an offense for missing blank line before public 218s registers an offense for missing blank line before protected 218s does not register an offense when `end` immediately after private 218s registers an offense for blank line after private 218s registers an offense for blank line after protected 218s accepts missing blank line after protected 218s Ruby 2.7 218s registers an offense for missing around line before protected 218s ignores protected with numblock argument 218s registers an offense for missing around line before module_function 218s ignores module_function with numblock argument 218s registers an offense for missing around line before private 218s ignores private with numblock argument 218s registers an offense for missing around line before public 218s ignores public with numblock argument 218s EnforcedStyle is `around` 218s requires blank line before public 218s accepts missing blank line when at the beginning of sclass 218s accepts missing blank line when specifying a superclass that breaks the line 218s ignores module_function with a right-hand-side condition 218s ignores private with block argument 218s accepts missing blank line when specifying `self` that breaks the line 218s accepts missing blank line when at the beginning of file and preceded by a comment 218s ignores public with a right-hand-side condition 218s accepts missing blank line when at the beginning of class 218s accepts missing blank line when at the beginning of filewhen specifying a superclass that breaks the line 218s ignores private deep inside a method call 218s ignores an accessor with the same name as public above a method definition 218s requires blank line when next line started with end 218s accepts missing blank line when at the beginning of class 218s ignores module_function inside a method call 218s ignores an accessor with the same name as module_function above a method definition 218s ignores an accessor with the same name as private above a method definition 218s requires blank line before protected 218s requires blank line when next line started with end 218s accepts missing blank line when at the end of specifying a superclass 218s accepts missing blank line when at the beginning of module 218s accepts missing blank line when at the end of specifying a superclass 218s ignores comment line before module_function 218s accepts missing blank line when at the beginning of file and preceded by a comment 218s accepts missing blank line when specifying `self` that breaks the line 218s accepts missing blank line when specifying `self` that breaks the line 218s ignores an accessor with the same name as protected above a method definition 218s accepts missing blank line when at the beginning of module 218s requires blank line after module_function 218s accepts missing blank line when at the end of block 218s ignores protected with block argument 218s accepts missing blank line when at the beginning of sclass 218s accepts missing blank line when at the beginning of filewhen specifying a superclass that breaks the line 218s recognizes blank lines with DOS style line endings 218s accepts missing blank line when at the beginning of module 218s ignores protected with a right-hand-side condition 218s accepts missing blank line when at the beginning of filewhen specifying a superclass that breaks the line 218s ignores comment line before public 218s requires blank line after public 218s requires blank line after, but not before, protected when at the beginning of class/module 218s accepts missing blank line when specifying a superclass that breaks the line 218s autocorrects blank line after #{access_modifier} with comment 218s requires blank line when next line started with end 218s ignores public with block argument 218s requires blank line when next line started with end 218s accepts missing blank line when at the end of specifying `self` 218s accepts missing blank line when at the end of block 218s autocorrects blank line after #{access_modifier} with comment 218s accepts missing blank line when at the end of specifying a superclass 218s ignores public deep inside a method call 218s requires blank line before module_function 218s accepts missing blank line when at the beginning of file and preceded by a comment 218s accepts missing blank line when at the beginning of class 218s accepts only using access modifier 218s accepts only using access modifier 218s accepts missing blank line when at the end of specifying a superclass 218s accepts missing blank line when specifying a superclass that breaks the line 218s requires blank line after protected 218s accepts missing blank line when at the end of specifying `self` 218s ignores module_function deep inside a method call 218s requires blank line before private 218s accepts only using access modifier 218s accepts missing blank line when at the end of specifying `self` 218s accepts missing blank line when at the end of specifying `self` 218s accepts missing blank line when at the beginning of module 218s accepts missing blank line when at the beginning of sclass 218s ignores protected deep inside a method call 218s ignores protected inside a method call 218s ignores comment line before private 218s ignores public inside a method call 218s accepts missing blank line when at the beginning of sclass 218s accepts missing blank line when at the beginning of filewhen specifying a superclass that breaks the line 218s requires blank line after, but not before, module_function when at the beginning of class/module 218s autocorrects blank line after #{access_modifier} with comment 218s ignores comment line before protected 218s ignores private inside a method call 218s accepts missing blank line when at the beginning of file and preceded by a comment 218s accepts only using access modifier 218s requires blank line after private 218s recognizes blank lines with DOS style line endings 218s recognizes blank lines with DOS style line endings 218s requires blank line after, but not before, private when at the beginning of class/module 218s requires blank line after, but not before, public when at the beginning of class/module 218s accepts missing blank line when specifying `self` that breaks the line 218s autocorrects blank line after #{access_modifier} with comment 218s accepts missing blank line when at the end of block 218s ignores module_function with block argument 218s ignores private with a right-hand-side condition 218s accepts missing blank line when at the end of block 218s accepts missing blank line when specifying a superclass that breaks the line 218s accepts missing blank line when at the beginning of class 218s recognizes blank lines with DOS style line endings 218s at the beginning of block 218s for blocks defined with do 218s accepts missing blank line with arguments 218s requires blank line after, but not before, private 218s accepts missing blank line 218s for blocks defined with {} 218s accepts missing blank line 218s accepts missing blank line with arguments 218s at the beginning of block 218s for blocks defined with {} 218s accepts missing blank line with arguments 218s accepts missing blank line 218s for blocks defined with do 218s requires blank line after, but not before, module_function 218s accepts missing blank line with arguments 218s accepts missing blank line 218s at the beginning of block 218s for blocks defined with do 218s requires blank line after, but not before, public 218s accepts missing blank line 218s accepts missing blank line with arguments 218s for blocks defined with {} 218s accepts missing blank line 218s accepts missing blank line with arguments 218s at the beginning of block 218s for blocks defined with do 218s accepts missing blank line 218s accepts missing blank line with arguments 218s requires blank line after, but not before, protected 218s for blocks defined with {} 218s accepts missing blank line 218s accepts missing blank line with arguments 218s 218s RuboCop::Cop::Style::InverseMethods 218s registers an offense for calling !.any? inside parens 218s registers an offense for !foo.any? 218s registers an offense for !foo.present? 218s registers an offense for !(foo == bar) 218s registers an offense for !(foo > bar) 218s registers an offense for not (foo =~ bar) 218s registers an offense for calling !.none? with a symbol proc 218s registers an offense for not (foo == bar) 218s allows an inverse method in a block with next 218s registers an offense for !foo.include? 218s registers an offense for not (foo != bar) 218s registers an offense for !foo.blank? 218s registers an offense for comparing snake case constants on the left 218s registers an offense for !(foo =~ bar) 218s allows comparing camel case constants on the left 218s registers an offense for !foo.exclude? 218s registers an offense for not (foo !~ bar) 218s registers an offense for not (foo < bar) 218s registers an offense for !foo.none? 218s allows an inverse method when double negation is used 218s registers an offense for !foo.odd? 218s allows a method call without a not 218s registers an offense for comparing snake case constants on the right 218s registers an offense for !foo.even? 218s allows comparing camel case constants on the right 218s registers an offense for calling !.none? with a block 218s registers an offense for not (foo > bar) 218s registers an offense for !(foo !~ bar) 218s registers an offense for !(foo < bar) 218s registers an offense for !(foo != bar) 218s allows an inverse method with a block when double negation is used 218s behaves like all variable types 218s registers an offense for calling not foo["bar"].none? 218s registers an offense for calling !foo["bar"].none? 218s behaves like all variable types 218s registers an offense for calling !$foo.none? 218s registers an offense for calling not $foo.none? 218s behaves like all variable types 218s registers an offense for calling !foo.bar.none? 218s registers an offense for calling not foo.bar.none? 218s behaves like all variable types 218s registers an offense for calling !FOO::BAR.none? 218s registers an offense for calling not FOO::BAR.none? 218s Ruby 2.7 218s registers an offense for calling !.none? with a numblock 218s behaves like all variable types 218s registers an offense for calling !foo.none? 218s registers an offense for calling not foo.none? 218s inverse blocks 218s registers an offense for a multiline method call where the last method is inverted 218s corrects a complex inverted method call 218s registers an offense for foo.reject! { |e| !e } 218s corrects an inverted method call when using `BasicObject#!` 218s registers an offense for an inverted equality block 218s corrects an inverted do end method call 218s registers an offense for a multiline method call where the last method is inverted 218s corrects an inverted method call when using `BasicObject#!` with spaces before the method call 218s registers an offense for foo.select { |e| !e } 218s corrects an inverted method call when using `BasicObject#!` with spaces before the method call 218s corrects a complex inverted method call 218s corrects an inverted method call 218s corrects a complex inverted method call 218s registers a single offense for nested inverse method calls 218s registers an offense for an inverted equality block 218s corrects an inverted method call when using `BasicObject#!` with spaces before the method call 218s corrects an inverted method call 218s corrects a complex inverted method call 218s registers a single offense for nested inverse method calls 218s corrects an inverted do end method call 218s corrects an inverted do end method call 218s registers an offense for a multiline inverted equality block 218s registers an offense for a multiline method call where the last method is inverted 218s registers a single offense for nested inverse method calls 218s registers a single offense for nested inverse method calls 218s registers an offense for a multiline inverted equality block 218s registers an offense for an inverted equality block 218s registers an offense for a multiline method call where the last method is inverted 218s registers an offense for foo.reject { |e| !e } 218s corrects an inverted method call when using `BasicObject#!` with spaces before the method call 218s registers an offense for an inverted equality block 218s corrects an inverted method call 218s registers an offense for a multiline inverted equality block 218s corrects an inverted method call when using `BasicObject#!` 218s corrects an inverted method call when using `BasicObject#!` 218s registers an offense for foo.select! { |e| !e } 218s corrects an inverted do end method call 218s corrects an inverted method call 218s corrects an inverted method call when using `BasicObject#!` 219s registers an offense for a multiline inverted equality block 219s behaves like all variable types 219s registers an offense for calling !@foo.none? 219s registers an offense for calling not @foo.none? 219s behaves like all variable types 219s registers an offense for calling not FOO.none? 219s registers an offense for calling !FOO.none? 219s behaves like all variable types 219s registers an offense for calling not @@foo.none? 219s registers an offense for calling !@@foo.none? 219s 219s RuboCop::Cop::Style::ClassMethods 219s does not register an offense outside class/module bodies 219s registers an offense for methods using a module name 219s does not register an offense for methods using self 219s registers an offense for methods using a class name 219s does not register an offense for other top-level singleton methods 219s 219s RuboCop::Cop::Lint::UnusedBlockArgument 219s when IgnoreEmptyBlocks config parameter is set 219s registers an offense for a non-empty block with multiple unused args 219s accepts an empty block with multiple unused parameters 219s accepts an empty block with a single unused parameter 219s registers an offense for a non-empty block with an unused parameter 219s inspection 219s when a lambda block takes arguments 219s and an argument is unused 219s registers an offense 219s and all the arguments are unused 219s registers offenses and suggests using a proc 219s when an optional keyword argument is unused 219s when the method call is not `define_method` 219s registers an offense 219s when AllowUnusedKeywordArguments set 219s does not care 219s when the method call is `define_method` 219s registers an offense 219s when AllowUnusedKeywordArguments set 219s does not care 219s when a method argument is not used 219s does not care 219s when a block takes multiple arguments 219s and arguments are swap-assigned 219s accepts 219s and all the arguments are unused 219s registers offenses and suggests omitting them 219s and unused arguments span multiple lines 219s registers offenses and suggests omitting them 219s and a splat argument is unused 219s registers an offense and preserves splat 219s and one argument is assigned to another, whilst other's value is not used 219s registers an offense 219s and all arguments are used 219s accepts 219s and an argument with default value is unused 219s registers an offense and preserves default value 219s and an argument is unused 219s registers an offense 219s when a variable is not used 219s does not care 219s when a block have a block local variable 219s and the variable is used 219s does not register offense 219s and the variable is unused 219s registers an offense 219s when a block takes single argument 219s and the method call is `define_method` 219s registers an offense 219s and the argument is unused 219s registers an offense and suggests omitting that 219s when an underscore-prefixed block argument is not used 219s accepts 219s with an empty block 219s when not configured to ignore empty blocks 219s registers an offense 219s when configured to ignore empty blocks 219s does not register an offense 219s in a method calling `binding` with arguments 219s when a method argument is unused 219s registers an offense 219s in a method calling `binding` without arguments 219s accepts all arguments 219s inside a method definition 219s registers offenses 219s 219s RuboCop::Cop::Lint::ImplicitStringConcatenation 219s on adjacent string literals on different lines 219s does not register an offense 219s on a string with interpolations 219s does register an offense 219s on a single string literal 219s does not register an offense 219s on adjacent string literals on the same line 219s registers an offense 219s when in a method call's argument list 219s notes that the strings could be separated by a comma instead 219s when the string literals contain newlines 219s does not register an offense for a single string 219s registers an offense 219s when inside an array 219s notes that the strings could be separated by a comma instead 219s 219s RuboCop::Cop::Style::TrailingCommaInArrayLiteral 219s with multi-line list of values 219s when EnforcedStyleForMultiline is no_comma 219s autocorrects unwanted comma where HEREDOC has commas 219s accepts a literal with no trailing comma 219s accepts HEREDOC with commas 219s registers an offense for trailing comma 219s when EnforcedStyleForMultiline is comma 219s accepts literal with two of the values on the same line 219s accepts trailing comma 219s accepts a multiline array with a single item and trailing comma 219s accepts a multiline word array 219s registers an offense for a literal with two of the values on the same line and a trailing comma 219s accepts an empty array being passed as a method argument 219s when closing bracket is on same line as last value 219s accepts literal with no trailing comma 219s when EnforcedStyleForMultiline is consistent_comma 219s accepts a multiline word array 219s registers an offense for literal with two of the values on the same line and no trailing comma 219s accepts a multiline array with items on a single line andtrailing comma 219s accepts trailing comma 219s accepts two values on the same line 219s accepts a multiline array with a single item and trailing comma 219s when closing bracket is on same line as last value 219s registers an offense for no trailing comma 219s with single line list of values 219s when EnforcedStyleForMultiline is comma 219s accepts empty literal 219s accepts single element literal without trailing comma 219s accepts literal without trailing comma 219s registers an offense for trailing comma 219s accepts rescue clause 219s when EnforcedStyleForMultiline is consistent_comma 219s accepts empty literal 219s accepts single element literal without trailing comma 219s registers an offense for trailing comma 219s accepts rescue clause 219s accepts literal without trailing comma 219s when EnforcedStyleForMultiline is no_comma 219s registers an offense for trailing comma 219s accepts literal without trailing comma 219s accepts rescue clause 219s accepts empty literal 219s accepts single element literal without trailing comma 219s 219s RuboCop::Cop::Lint::StructNewOverride 219s registers an offense using `::Struct.new(symbol)` 219s registers an offense using `Struct.new(string, ...symbols)` 219s registers an offense using `Struct.new(...)` with multiple overrides 219s does not register an offense with an override within a given block 219s registers an offense using `Struct.new(symbol, string)` 219s does not register an offense with no overrides 219s registers an offense using `Struct.new(...symbols)` 219s registers an offense using `Struct.new(symbol)` 219s registers an offense using `Struct.new(...)` with an option argument 219s registers an offense using `Struct.new(...)` with a block 219s 219s RuboCop::Cop::Style::OptionalArguments 219s allows methods with multiple optional arguments at the end 219s allows methods with only one required argument 219s allows methods without arguments 219s allows methods with only required arguments 219s registers an offense when an optional argument is followed by a required argument 219s allows methods with only one optional argument 219s allows methods with only optional arguments 219s registers an offense for each optional argument when multiple optional arguments are followed by a required argument 219s named params 219s with default values 219s allows optional arguments before an optional named argument 219s required params 219s registers an offense for optional arguments that come before required arguments where there are name arguments 219s allows optional arguments before required named arguments 219s allows optional arguments to come before a mix of required and optional named argument 219s 219s RuboCop::Cop::Layout::HeredocArgumentClosingParenthesis 219s incorrect cases 219s nested incorrect case 219s detects 219s complex incorrect case with multiple calls 219s detects and fixes the second 219s detects and fixes the first 219s simple incorrect case squiggles 219s detects 219s incorrect case with other param before constructor and raise call 219s detects 219s simple incorrect case with call after trailing comma 219s detects 219s incorrect case with other param before constructor 219s detects 219s simple incorrect case 219s detects 219s simple incorrect case comma 219s detects 219s simple incorrect case comma with spaces and comma in heredoc 219s detects 219s incorrect case in array with double heredoc and spaced out comma 219s detects 219s incorrect case in array with spaced out comma 219s detects 219s incorrect case in array with nested calls and double heredoc and spaced out comma 219s detects 219s incorrect case nested method call with comma 219s detects 219s double case new line 219s detects and fixes 219s simple incorrect case comma with spaces 219s detects 219s simple incorrect case with call after 219s detects 219s incorrect case with other param after 219s detects 219s simple incorrect case hash 219s detects 219s complex chained incorrect case with multiple calls 219s detects and fixes the first 219s double incorrect case 219s detects 219s double incorrect case new line chained calls 219s detects 219s incorrect case with other param before 219s detects 219s correct cases 219s accepts when there is an argument between a heredoc argument and the closing paretheses 219s accepts double correct case 219s accepts double correct case new line 219s accepts correct case with other param before 219s accepts correct case with other param after 219s accepts method chain with heredoc argument correct case 219s accepts double correct case nested 219s accepts method with heredoc argument of proc correct case 219s accepts hash correct case 219s accepts simple correct case 219s invocation after the HEREDOC 219s ignores random call 219s ignores tr 219s ignores random call after 219s 219s RuboCop::Cop::Style::LineEndConcatenation 219s accepts string concat on the same line 219s registers an offense for string concat with << and \ at line ends 219s registers offenses only for the appropriate lines in chained concats 219s autocorrects a + with \ to just \ 219s accepts string concat at line end when followed by a comment line 219s accepts string concat at line end for special strings like __FILE__ 219s registers multiple offenses when there are chained concatenations 219s registers an offense for string concat with << at line end 219s accepts string concat with a return value of method on an interpolated string 219s accepts string concat at line end when followed by comment 219s registers an offense for dynamic string concat with << at line end 219s registers multiple offenses when there are chained << methods 219s accepts string concat with a return value of method on a string 219s accepts string concat at line end when % literals are involved 219s registers an offense for string concat at line end 219s autocorrects only the lines that should be autocorrected 219s registers multiple offenses when there are chained concatenationscombined with << calls 219s registers an offense for dynamic string concat at line end 219s autocorrects a + with trailing whitespace to \ 219s 219s RuboCop::Cop::Gemspec::OrderedDependencies 219s When using a local variable in an argument of dependent gem 219s does not register any offenses 219s behaves like ordered dependency 219s when add_runtime_dependency 219s when each individual group of line is sorted 219s does not register any offenses 219s when dependency is separated by multiline comment 219s with TreatCommentsAsGroupSeparators: false 219s registers an offense 219s with TreatCommentsAsGroupSeparators: true 219s accepts 219s When gems are alphabetically sorted 219s does not register any offenses 219s when gems are not alphabetically sorted 219s registers an offense 219s When using method call to gem names 219s does not register any offenses 219s when different dependencies are consecutive 219s does not register any offenses 219s behaves like ordered dependency 219s when add_dependency 219s When gems are alphabetically sorted 219s does not register any offenses 219s when gems are not alphabetically sorted 219s registers an offense 219s when dependency is separated by multiline comment 219s with TreatCommentsAsGroupSeparators: true 219s accepts 219s with TreatCommentsAsGroupSeparators: false 219s registers an offense 219s when each individual group of line is sorted 219s does not register any offenses 219s behaves like ordered dependency 219s when add_development_dependency 219s when dependency is separated by multiline comment 219s with TreatCommentsAsGroupSeparators: false 219s registers an offense 219s with TreatCommentsAsGroupSeparators: true 219s accepts 219s when gems are not alphabetically sorted 219s registers an offense 219s When gems are alphabetically sorted 219s does not register any offenses 219s when each individual group of line is sorted 219s does not register any offenses 219s 219s RuboCop::Cop::Lint::UselessAssignment 219s when a variable is reassigned with multiple assignment while referencing itself in rhs and referenced 219s accepts 219s when a variable is assigned in main body of begin, rescue and else then referenced after the begin 219s accepts 219s when a referenced variable is reassigned but not re-referenced in a method defined in loop 219s registers an offense 219s when a variable is not used and the name starts with _ 219s accepts 219s when a variable is reassigned with binary operator assignment while assigning to itself in rhs then referenced 219s registers an offense for the assignment in rhs 219s when an unreferenced variable is reassigned in a block 219s accepts 219s when a variable is assigned and unreferenced in a singleton method defined with variable name 219s registers an offense 219s when a setter is invoked with operator assignment in loop body 219s accepts 219s when a variable is assigned in 2 identical if branches 219s doesn't think 1 of the 2 assignments is useless 219s when a variable is reassigned in a loop 219s post while loop 219s accepts 219s until loop 219s accepts 219s post until loop 219s accepts 219s for loop 219s accepts 219s while loop 219s accepts 219s when a variable is assigned in main body of begin, rescue and else and reassigned in ensure then referenced after the begin 219s registers offenses for each assignment before ensure 219s when a variable is reassigned multiple times in rescue and referenced after the begin 219s registers an offense 219s when a block local variable is declared but not assigned 219s accepts 219s when an unreferenced variable is reassigned and re-referenced 219s registers an offense for the unreferenced assignment 219s when a method argument is reassigned but not passed to super 219s registers an offense 219s when a block local variable is assigned and unreferenced 219s registers offenses for the assignment 219s when a variable is reassigned with logical operator assignment and referenced 219s accepts 219s when there's an unreferenced reassignment in a if branch while the variable is referenced in a case branch in the paired else branch 219s registers an offense for the reassignment in the if branch 219s when a variable is assigned in branch of modifier if that references the variable in its conditional clauseand unreferenced 219s registers an offense 219s when a variable is assigned while being passed to a method taking block 219s and the variable is used 219s accepts 219s and the variable is not used 219s registers an offense 219s when a referenced variable is reassigned but not re-referenced 219s registers an offense for the non-re-referenced assignment 219s when a referenced variable is reassigned in a block 219s accepts 219s when a variable is assigned and unreferenced in a class 219s registers an offense 219s when a variable is assigned in begin and referenced outside 219s accepts 219s when there is only one AST node and it is unused variable 219s registers an offense 219s when a variable is assigned in loop body and unreferenced 219s registers an offense 219s when a variable is assigned with multiple assignment and unreferenced 219s registers an offense 219s when an optional method argument is not used 219s accepts 219s when a variable is reassigned multiple times in ensure with rescue then referenced after the begin 219s registers an offense 219s when a variable is assigned on each side of && and referenced after the && 219s accepts 219s when a variable is assigned and referenced when defining a module 219s does not register an offense 219s when a variable is reassigned in loop body but won't be referenced either next iteration or loop condition 219s registers an offense (PENDING: Requires an advanced logic that checks whether the return value of an operator assignment is used or not.) 219s when a block argument is not used 219s accepts 219s when a variable is assigned in branch of modifier if that references the variable in its conditional clauseand referenced after the branching 219s accepts 219s when a keyword splat method argument is used 219s accepts 219s when a variable is assigned with operator assignment in top level 219s registers an offense 219s when a variable is assigned multiple times but unreferenced 219s registers offenses for each assignment 219s when a variable is assigned first with ||= and referenced 219s accepts 219s when there's an unreferenced reassignment in a if branch while the variable is referenced in the paired elsif branch 219s registers an offense for the reassignment in the if branch 219s inside a `case-match` node 219s does not register an offense when the variable is used 219s when a variable is assigned and unreferenced in a class subclassing another class stored in local variable 219s registers an offense 219s when a variable is assigned and unreferenced in top level 219s registers an offense 219s when a variable is reassigned and unreferenced in a if branch while the variable is referenced in the paired else branch 219s registers an offense for the reassignment in the if branch 219s when a method argument is not used 219s accepts 219s when a variable is assigned and unreferenced in a module 219s registers an offense 219s when a variable is assigned with operator assignment in rescue and would be referenced with retry 219s accepts 219s when a variable is reassigned at the end of loop body and would be referenced in loop condition 219s accepts 219s when an assignment in a if branch is referenced in another if branch 219s accepts 219s when there's an unreferenced assignment in top level if branch while the variable is referenced in the paired else branch 219s registers an offense for the assignment in the if branch 219s when a variable is assigned in main body of begin with rescue but unreferenced 219s registers an offense 219s when a unreferenced variable is reassigned in same branch and referenced after the branching 219s registers an offense for the unreferenced assignment 219s when a named capture is referenced 219s accepts 219s when a variable that has same name as outer scope variable is not referenced in a method defined in loop 219s registers an offense 219s when a variable is assigned and unreferenced in a method 219s registers an offense 219s when a variable is referenced in rhs of named capture expression 219s accepts 219s when a method argument is reassigned and zero arity super is called 219s accepts 219s when a variable is assigned and unreferenced in a singleton method defined with self keyword 219s registers an offense 219s when a named capture is unreferenced in top level 219s registers an offense 219s when a variable is assigned at the end of rescue and would be referenced with retry 219s accepts 219s when a variable is assigned in single branch if and unreferenced 219s registers an offense 219s when a variable is assigned in loop body and referenced in post while condition 219s accepts 219s when a variable is assigned and assigned again in a modifier condition 219s accepts without parentheses 219s accepts with parentheses 219s when a variable is reassigned multiple times in main body of begin then referenced after the begin 219s accepts 219s when a variable is reassigned while referencing itself in rhs and referenced 219s accepts 219s when a local variable is unreferenced and zero arity super is called 219s registers an offense 219s when a variable is assigned and unreferenced in a singleton class 219s registers an offense 219s when a keyword splat method argument is not used 219s accepts 219s when an anonymous keyword splat method argument is defined 219s accepts 219s when a variable is assigned in each branch of if and referenced in the else branch 219s registers an offense for the assignment in the if branch 219s when a optional keyword method argument is not used 219s accepts 219s when a variable is reassigned with binary operator assignment and referenced 219s accepts 219s when a variable is assigned in each branch of if and referenced after the branching 219s accepts 219s when a block method argument is not used 219s accepts 219s when a variable is reassigned multiple times in main body of begin then referenced in ensure 219s accepts 219s when a variable is assigned with ||= at the last expression of the scope 219s registers an offense 219s when a splat method argument is not used 219s accepts 219s when a variable is reassigned multiple times in main body of begin then referenced in rescue 219s accepts 219s when a rescued error variable is wrongly tried to be referenced in another rescue body 219s registers an offense 219s when a variable is reassigned in single branch if and referenced in the branch 219s registers an offense for the unreferenced assignment 219s when a variable is reassigned multiple times in rescue with ensure then referenced after the begin 219s registers an offense 219s when a variable is shadowed by a block argument and unreferenced 219s registers an offense 219s similar name suggestion 219s when there's a similar variable-like method invocation 219s suggests the method name 219s when there's a similar name but it's in inner scope 219s does not suggest any name 219s when there's a similar method invocation with explicit receiver 219s does not suggest any name 219s when there's a similar variable 219s suggests the variable name 219s when there's a similar method invocation with arguments 219s does not suggest any name 219s when there are only less similar names 219s does not suggest any name 219s when a variable is reassigned at the end of loop body and would be referenced in next iteration 219s accepts 219s when a unreferenced variable is reassigned on the left side of && and referenced after the && 219s registers an offense for the unreferenced assignment 219s when a variable is assigned in loop body and referenced in post until condition 219s accepts 219s when a variable is assigned and passed to a method followed by method taking block 219s accepts 219s when a variable is reassigned in single branch if and referenced after the branching 219s accepts 219s when a variable is assigned with ||= before the last expression of the scope 219s registers an offense 219s when a named capture is unreferenced in other than top level 219s registers an offense 219s when a unreferenced variable is reassigned on the right side of && and referenced after the && 219s accepts 219s 219s RuboCop::Cop::Style::PercentLiteralDelimiters 219s `%` interpolated string 220s registers an offense for a string with no content 220s registers an offense for other delimiters when containing preferred delimiter characters in interpolation 220s registers an offense for other delimiters 220s does not register an offense for preferred delimiters 220s does not register an offense for other delimiters when containing preferred delimiter characters 220s registers an offense when the source contains invalid characters 220s `%s` symbol 220s registers an offense for other delimiters 220s does not register an offense for preferred delimiters 220s invalid cop config 220s raises an error when invalid configuration is specified 220s `%x` interpolated system call 220s does not register an offense for preferred delimiters 220s registers an offense for other delimiters when containing preferred delimiter characters in interpolation 220s registers an offense for other delimiters 220s does not register an offense for other delimiters when containing preferred delimiter characters 220s `%q` string 220s does not register an offense for other delimiters when containing preferred delimiter characters 220s registers an offense for other delimiters 220s does not register an offense for preferred delimiters 220s `%w` string array 220s does not register an offense for preferred delimiters 220s does not register an offense for preferred delimiters with a pairing delimiters 220s registers an offense for other delimiters 220s does not register an offense for preferred delimiters with not a pairing delimiter 220s does not register an offense for preferred delimiters with only a closing delimiter 220s does not register an offense for other delimiters when containing preferred delimiter characters 220s `%i` symbol array 220s registers an offense for other delimiters 220s does not register an offense for non-preferred delimiters enclosing escaped delimiters 220s does not register an offense for preferred delimiters 220s `%r` interpolated regular expression 220s registers an offense for other delimiters when containing preferred delimiter characters in interpolation 220s registers an offense for other delimiters 220s does not register an offense for other delimiters when containing preferred delimiter characters 220s does not register an offense for preferred delimiters 220s registers an offense for a regular expression with option 220s `%W` interpolated string array 220s does not register an offense for preferred delimiters 220s registers an offense for other delimiters when containing preferred delimiter characters in interpolation 220s registers an offense for other delimiters 220s does not register an offense for other delimiters when containing preferred delimiter characters 220s autocorrect 220s fixes a string array in a scope 220s preserves irregular indentation when correcting a multiline array 220s preserves line breaks when fixing a multiline array 220s preserves indentation when correcting a multiline array 220s behaves like escape characters 220s corrects %W with \n in it 220s corrects %W with \t in it 220s behaves like escape characters 220s corrects %q with \n in it 220s corrects %q with \t in it 220s behaves like escape characters 220s corrects % with \n in it 220s corrects % with \t in it 220s behaves like escape characters 220s corrects %r with \n in it 220s corrects %r with \t in it 220s behaves like escape characters 220s corrects %i with \n in it 220s corrects %i with \t in it 220s behaves like escape characters 220s corrects %s with \t in it 220s corrects %s with \n in it 220s behaves like escape characters 220s corrects %x with \t in it 220s corrects %x with \n in it 220s behaves like escape characters 220s corrects %Q with \t in it 220s corrects %Q with \n in it 220s behaves like escape characters 220s corrects %w with \n in it 220s corrects %w with \t in it 220s `%Q` interpolated string 220s registers an offense for other delimiters 220s does not register an offense for other delimiters when containing preferred delimiter characters 220s does not register an offense for preferred delimiters 220s registers an offense for other delimiters when containing preferred delimiter characters in interpolation 220s `default` override 220s allows all preferred delimiters to be set with one key 220s allows individual preferred delimiters to override `default` 220s `%I` interpolated symbol array 220s registers an offense for other delimiters 220s registers an offense for other delimiters when containing preferred delimiter characters in interpolation 220s does not register an offense for preferred delimiters 220s 220s RuboCop::Cop::Lint::ConstantResolution 220s registers an offense not qualifying a const 220s registers an offense not qualifying a namespace const 220s registers no offense when qualifying a const 220s registers no offense qualifying a namespace const 220s with Ignore set 220s registers no offense when an unqualified namespace const 220s registers no offense with an unqualified const 220s registers no offense qualifying a namespace const 220s registers no offense when qualifying a const 220s registers an with a namespace const 220s registers an offense not qualifying another const 220s module & class definitions 220s does not register offense 220s with Only set 220s registers no offense not qualifying another const 220s registers no with a namespace const 220s registers an offense when an unqualified namespace const 220s registers an offense with an unqualified const 220s registers no offense qualifying a namespace const 220s registers no offense when qualifying a const 220s 220s RuboCop::Cop::Style::AndOr 220s when style is always 220s warns on short-circuit (and) 220s autocorrects "and" with an Enumerable accessor on either side 220s autocorrects "and" with && and adds parentheses to expr 220s autocorrects "or" with an assignment on the left 220s autocorrects "and" with && in method calls (3) 220s also warns on non short-circuit (and) (unless) 220s autocorrects "or" with an assignment on the right 220s also warns on non short-circuit (and) 220s also warns on non short-circuit (or) (unless) 220s autocorrects "and" with && in method calls (4) 220s autocorrects "or" with || and adds parentheses to expr 220s autocorrects "and" with && in method calls (2) 220s autocorrects "or" with || and doesn't add extra parentheses 220s autocorrects "or" with || in method calls (2) 220s also warns on until (or) 220s registers an offense for "or" 220s autocorrects "or" inside def 220s autocorrects "and" inside def 220s autocorrects "and" with && in method calls 220s autocorrects "and" with && and doesn't add extra parentheses 220s also warns on until (and) 220s also warns on while (or) 220s autocorrects "or" with || in method calls 220s autocorrects "or" with || in method calls (3) 220s autocorrects "or" with || in method calls (4) 220s also warns on non short-circuit (or) 220s warns on short-circuit (or) 220s registers an offense for "and" 220s also warns on while (and) 220s within a nested begin node with one child only 220s autocorrects "and" with && and adds parens 220s within a nested begin node 220s autocorrects "and" with && and adds parens 220s with !obj.method arg on left 220s autocorrects "and" with && and adds parens 220s with two predicate methods with args without spaces on right 220s autocorrects "and" with && and adds parens 220s autocorrects "or" with || and adds parens 220s with `not` expression on right 220s autocorrects "and" with && and adds parens 220s with a file which contains __FILE__ 220s autocorrects "or" with || 220s with `not` expression on left 220s autocorrects "and" with && and adds parens 220s with obj.method= arg on left 220s autocorrects "and" with && and adds parens 220s with !obj.method arg on right 220s autocorrects "and" with && and adds parens 220s when `or` precedes `and` 220s registers an offense and corrects 220s when left hand side is a comparison method 220s autocorrects "and" with && and adds parens 220s with one predicate method without space on right and another method 220s autocorrects "or" with || and adds parens 220s autocorrects "and" with && and adds parens 220s with obj.method = arg on left 220s autocorrects "and" with && and adds parens 220s with predicate method with arg without space on right 220s autocorrects "and" with && and adds parens 220s autocorrects "or" with || and adds parens 220s when `and` precedes `or` 220s registers an offense and corrects 220s when `or` precedes `&&` 220s registers an offense and corrects 220s with !variable on left 220s doesn't crash and burn 220s when `and` precedes `||` 220s registers an offense and corrects 220s when style is conditionals 220s registers an offense for "or" in post-until condition 220s registers an offense for "or" in if condition 220s accepts && inside of conditional 220s accepts || inside of conditional 220s accepts "and" in until body 220s accepts "or" in if body 220s registers an offense for "or" in until condition 220s accepts "and" outside of conditional 220s accepts "and" in while body 220s accepts && outside of conditional 220s registers an offense for "and" in until condition 220s accepts "or" in post-while body 220s accepts "or" in while body 220s accepts "or" in until body 220s registers an offense for "or" in while condition 220s accepts "and" in post-until body 220s registers an offense for "and" in post-until condition 220s registers an offense for "and" in while condition 220s registers an offense for "and" in post-while condition 220s accepts "and" in if body 220s registers an offense for "and" in if condition 220s accepts || outside of conditional 220s accepts "or" outside of conditional 220s registers an offense for "or" in post-while condition 220s accepts "and" in post-while body 220s accepts "or" in post-until body 220s 220s RuboCop::Cop::Layout::MultilineMethodParameterLineBreaks 220s when many parameters including hash are on multiple lines, three on same line 220s registers an offense and corrects 220s when one parameter on same line 220s does not add any offenses 220s when parameter's default value starts on same line but ends on different line 220s registers an offense and corrects 220s when many parameter are on multiple lines, two on same line 220s registers an offense and corrects 220s when there are multiple parameters on the first line 220s registers an offense and corrects starting from the 2nd argument 220s when two parameters are on next line 220s does not add any offenses 220s when there are no parameters 220s does not add any offenses 220s when many parameters are on multiple lines, three on same line 220s registers an offense and corrects 220s when second parameter starts on same line as end of first 220s registers an offense and corrects 220s 220s RuboCop::Cop::Style::CollectionCompact 220s registers an offense and corrects when using `reject` on array to reject nils 220s registers an offense and corrects when using `reject` with block pass arg and no parentheses 220s registers an offense and corrects when using `reject` and receiver is a variable 220s registers an offense and corrects when using `select/select!` to reject nils 220s registers an offense and corrects when using `reject` on hash to reject nils 220s registers an offense and corrects when using `reject` with block pass arg on array to reject nils 220s does not register an offense when using `reject` to not to rejecting nils 220s does not register an offense when using `compact/compact!` 220s Ruby <= 3.0 220s does not register an offense and corrects when using `to_enum.reject` on array to reject nils 220s does not register an offense and corrects when using `lazy.reject` on array to reject nils 220s Ruby >= 3.1 220s registers an offense and corrects when using `to_enum.reject` on array to reject nils 220s registers an offense and corrects when using `lazy.reject` on array to reject nils 220s when without receiver 220s does not register an offense and corrects when using `select/select!` to reject nils 220s does not register an offense and corrects when using `reject` on array to reject nils 220s 220s RuboCop::Cop::Style::NumericLiteralPrefix 220s octal literals 220s when config is zero_only 220s registers an offense for prefix `0O` and `0o` 220s does not register offense for prefix `0` 220s when config is zero_with_o 220s does not register offense for lowercase prefix 220s registers an offense for prefixes `0` and `0O` 220s decimal literals 220s registers an offense for prefixes 220s does not register offense for no prefix 220s hex literals 220s does not register offense for lowercase prefix 220s registers an offense for uppercase prefix 220s binary literals 220s does not register offense for lowercase prefix 220s registers an offense for uppercase prefix 220s 220s RuboCop::Cop::Style::RedundantPercentQ 220s accepts %q at the beginning of a double quoted string with interpolation 220s accepts %q at the beginning of a section of a double quoted string with interpolation 220s accepts %q containing string interpolation 220s accepts %Q at the beginning of a section of a double quoted string with interpolation 220s accepts a heredoc string that contains %q 220s accepts %Q at the beginning of a double quoted string with interpolation 220s with %q strings 220s accepts a string with escaped non-backslash characters 220s registers an offense for a string containing escaped backslashes 220s registers an offense for only single quotes 220s autocorrects for strings that are concatenated with backslash 220s accepts a string with single quotes and double quotes 220s registers an offense for no quotes 220s accepts a string with escaped backslash and non-backslash characters 220s accepts regular expressions starting with %q 220s registers an offense for only double quotes 220s with %Q strings 220s registers an offense for static string without quotes 220s registers an offense for static string with only double quotes 220s accepts a string with double quotes and an escaped normal character 220s accepts a string with single quotes and double quotes 220s accepts a dynamic %Q string with double quotes 220s registers an offense for dynamic string without quotes 220s accepts regular expressions starting with %Q 220s autocorrects for strings that are concatenated with backslash 220s accepts a string with double quotes and an escaped special character 220s 220s RuboCop::Cop::InternalAffairs::ExampleHeredocDelimiter 220s when unexpected heredoc delimiter is used in single-line heredoc 220s registers an offense 220s when unexpected heredoc delimiter is used in multi-line heredoc 220s registers an offense 220s when unexpected heredoc delimiter is used but heredoc body contains an expected delimiter line 220s does not register an offense 220s when expected heredoc delimiter is used at RuboCop specific expectation 220s does not register an offense 220s when unexpected heredoc delimiter is used at non RuboCop specific expectation 220s does not register an offense 220s 220s RuboCop::Cop::Lint::UriEscapeUnescape 220s registers an offense when using `URI.encode('http://example.com')` 220s registers an offense when using `::URI.decode(enc_uri)` 220s registers an offense when using `::URI.unescape(enc_uri)` 220s registers an offense when using `::URI.escape('http://example.com')` 220s registers an offense when using `URI.decode(enc_uri)` 220s registers an offense when using `URI.unescape(enc_uri)` 220s registers an offense when using `URI.escape('http://example.com')` 220s registers an offense when using `URI.escape('@?@!', '!?')` 220s registers an offense when using `::URI.encode('http://example.com)` 220s 220s RuboCop::Cop::Style::EmptyHeredoc 220s registers an offense when using empty heredoc argument with other argument 220s does not register an offense when using not empty heredoc 220s registers an offense when using empty `< bar` 220s does not register an offense when using `foo % bar` 220s registers an offense when chaining `foo.bar.>>(baz).round(2)` 220s registers an offense when using `foo.!~(bar)` 220s registers an offense when using `foo.<=>(bar)` 220s registers an offense when using `foo.~ bar` 220s registers an offense when chaining `foo.bar.&(baz).round(2)` 220s registers an offense when chaining `foo.bar.|(baz).round(2)` 220s registers an offense when using `foo.<= bar` 220s registers an offense when using `foo.===(bar)` 220s registers an offense when using `foo.>>(bar)` 220s registers an offense when chaining `foo.bar.^(baz).round(2)` 220s does not register an offense when using `foo === bar` 220s does not register an offense when using `foo.+@bar.to_s` 220s registers an offense when chaining `foo.bar.<=(baz).round(2)` 220s registers an offense when chaining `foo.bar.!=(baz).round(2)` 220s does not register an offense when using `foo & bar` 220s registers an offense when using `foo.=== bar` 220s registers an offense when chaining `foo.bar.=~(baz).round(2)` 220s registers an offense when using `foo.- bar` 220s registers an offense when using `foo.<=> bar` 220s does not register an offense when using `foo ~ bar` 220s does not register an offense when using `foo <=> bar` 220s registers an offense when using `foo.>=(bar)` 220s registers an offense when chaining `foo.bar.<(baz).round(2)` 220s registers an offense when chaining `foo.bar.<=>(baz).round(2)` 220s registers an offense when chaining `foo.bar.-(baz).round(2)` 220s does not register an offense when using `foo >> bar` 220s does not register an offense when using `foo == bar` 220s does not register an offense when using `foo.+@bar` 220s registers an offense when chaining `foo.bar.===(baz).round(2)` 220s registers an offense when chaining `foo.bar.>=(baz).round(2)` 220s registers an offense when chaining `foo.bar./(baz).round(2)` 220s does not register an offense when using `foo <= bar` 220s registers an offense when using `foo.>(bar)` 220s registers an offense when chaining `foo.bar.~(baz).round(2)` 220s registers an offense when using `foo./ bar` 220s does not register an offense when using `foo << bar` 220s registers an offense when using `foo.>= bar` 220s does not register an offense when using `foo !~ bar` 220s registers an offense when using `foo.* bar` 220s registers an offense when using `foo.+ bar` 220s registers an offense when using `foo.^ bar` 220s registers an offense when chaining `foo.bar.!~(baz).round(2)` 220s does not register an offense when using `foo / bar` 220s does not register an offense when using `foo.!@bar` 220s registers an offense when chaining `foo.bar.<<(baz).round(2)` 220s registers an offense when chaining `foo.bar.>(baz).round(2)` 220s does not register an offense when using `foo != bar` 220s registers an offense when chaining `foo.bar.!(baz).round(2)` 220s registers an offense when using `foo.== bar` 220s registers an offense when using `foo.*(bar)` 220s registers an offense when using `foo.!=(bar)` 220s does not register an offense when using `foo.~@bar` 220s does not register an offense when using `foo | bar` 220s registers an offense when using `foo.& bar` 220s does not register an offense when using `foo + bar` 220s does not register an offense when using `foo >= bar` 220s registers an offense when using `foo.<=(bar)` 220s does not register an offense when using `foo * bar` 220s registers an offense when using `foo.< bar` 220s registers an offense when using `foo.!~ bar` 220s registers an offense when using `foo.!(bar)` 220s registers an offense when using `foo.|(bar)` 220s registers an offense when using `foo.** bar` 220s registers an offense when using `foo.%(bar)` 220s registers an offense when chaining `foo.bar.%(baz).round(2)` 220s does not register an offense when using `Foo.+(bar)` 220s registers an offense when using `foo.<<(bar)` 220s does not register an offense when using `foo ! bar` 220s registers an offense when using `foo./(bar)` 220s registers an offense when using `foo.!= bar` 220s registers an offense when using `foo.<(bar)` 220s registers an offense when chaining `foo.bar.+(baz).round(2)` 220s registers an offense when using `foo.~(bar)` 220s does not register an offense when using `foo - bar` 220s does not register an offense when using `obj.!` 220s registers an offense when using `foo.<< bar` 220s does not register an offense when using `foo < bar` 220s registers an offense when using `foo.&(bar)` 220s registers an offense when using `foo.=~ bar` 220s registers an offense when using `foo.% bar` 220s does not register an offense when using `foo ^ bar` 220s registers an offense when chaining `foo.bar.**(baz).round(2)` 220s registers an offense when using `foo.+(bar)` 220s registers an offense when using `foo.>> bar` 220s does not register an offense when using `foo =~ bar` 220s does not register an offense when using `foo.-@bar` 221s does not register an offense when using `foo ** bar` 221s registers an offense when using `foo.-(bar)` 221s does not register an offense when using `foo.`bar` 221s does not register an offense when using `foo > bar` 221s registers an offense when chaining `foo.bar.*(baz).round(2)` 221s registers an offense when using `foo.=~(bar)` 221s registers an offense when using `foo.==(bar)` 221s registers an offense when using `foo.**(bar)` 221s 221s RuboCop::Cop::Lint::EmptyBlock 221s does not register an offense on an empty stabby lambda 221s registers an offense for an empty block given to a non-Kernel `proc` method 221s does not register an offense when block is not empty 221s registers an offense for empty block within method call 221s does not register an offense on an empty lambda 221s does not register an offense on an empty Proc.new 221s does not register an offense on an empty proc 221s does not register an offense for empty block with inline comments 221s does not register an offense for empty block with inner comments 221s does not register an offense on an empty ::Proc.new 221s when AllowEmptyLambdas is false 221s registers an offense on an empty proc 221s registers an offense on an empty ::Proc.new 221s registers an offense on an empty Proc.new 221s registers an offense for an empty lambda 221s registers an offense for an empty stabby lambda 221s when AllowComments is false 221s registers an offense for empty block with inner comments 221s registers an offense for empty block with inline comments 221s 221s RuboCop::Cop::Style::RedundantSort 221s registers an offense when last is called on sort_by no block 221s registers an offense when last is called with sort 221s registers an offense when slice(0) is called on sort_by 221s registers an offense when at(0) is called on sort_by 221s registers an offense when first is called on sort_by no block 221s registers an offense when first is called on sort_by 221s does not register an offense for sort!.first 221s does not register an offense when sort_by is used without first 221s registers an offense when [](-1) is called on sort_by 221s does not register an offense for sort_by!(&:something).last 221s does not register an offense when first is used without sort_by 221s registers an offense when at(-1) is called with sort 221s registers an offense when [-1] is called on sort_by 221s registers an offense when last is called on sort_by 221s does not register an offense when sort has an argument 221s registers an offense when [](0) is called on sort 221s registers an offense when first is called on sort_by with line breaks and `or` operator 221s registers an offense when [-1] is called on sort 221s registers an offense when first is called on sort_by with line breaks and `and` operator 221s registers an offense when [0] is called on sort 221s does not register an offense when first has an argument 221s registers an offense when last is called on sort with comparator 221s does not register an offense when first is used before sort 221s registers an offense when first is called with sort 221s registers an offense when first is called on sort_by with line breaks and `&&` operator 221s registers an offense when first is called on sort_by with line breaks and `||` operator 221s does not register an offense when sort_by is not given a block 221s registers an offense with `sort_by { a || b }` 221s registers an offense when slice(-1) is called on sort_by 221s registers an offense when [0] is called on sort_by 221s registers an offense when first is called on sort_by with line breaks 221s registers an offense when slice(0) is called on sort 221s >= Ruby 2.7 221s when using numbered parameter 221s registers an offense and corrects when first is called on sort_by 221s registers an offense and corrects when last is called on sort with comparator 221s registers an offense and corrects when at(0) is called on sort_by 221s when not taking first or last element 221s does not register an offense when at(-2) is called on sort_by 221s does not register an offense when [-1] is called on sort with an argument 221s does not register an offense when [1] is called on sort 221s 221s RuboCop::Cop::Lint::ShadowedArgument 221s block argument shadowing 221s when a block local variable is assigned but no argument is shadowed 221s accepts 221s when multiple arguments are shadowed 221s and one of them shadowed within a lambda while another is shadowed outside 221s registers an offense 221s when a single argument is shadowed 221s registers an offense 221s and the argument is not used 221s accepts 221s when zsuper is used 221s accepts 221s and shadowed within a conditional 221s registers an offense without specifying where the reassignment took place 221s and was used before shadowing 221s accepts 221s and the conditional is nested within a lambda 221s registers an offense without specifying where the reassignment took place 221s and the argument was used before shadowing 221s accepts 221s and the conditional is nested within a conditional 221s registers an offense without specifying where the reassignment took place 221s and the argument was used before shadowing 221s accepts 221s and the argument was not shadowed outside the conditional 221s accepts 221s and the conditional occurs after the reassignment 221s registers an offense 221s when binding is used 221s registers an offense 221s when IgnoreImplicitReferences config option is set to true 221s accepts 221s and shadowed within a block 221s registers an offense without specifying where the reassignment took place 221s and was used before shadowing 221s accepts 221s and the argument was not shadowed outside the block 221s accepts 221s and the block is nested within a conditional 221s registers an offense without specifying where the reassignment took place 221s and the argument was used before shadowing 221s accepts 221s and the block occurs after the reassignment 221s registers an offense 221s and the block is nested within a block 221s registers an offense without specifying where the reassignment took place 221s and the argument was used before shadowing 221s accepts 221s method argument shadowing 221s when multiple arguments are shadowed 221s and one of them shadowed within a lambda while another is shadowed outside 221s registers an offense 221s when a single argument is shadowed 221s registers an offense 221s when argument was used in shorthand assignment 221s does not register an offense 221s when reassigning to splat variable 221s does not register an offense 221s when a splat argument is shadowed 221s registers an offense 221s when binding is used 221s registers an offense 221s when IgnoreImplicitReferences config option is set to true 221s accepts 221s and shadowed within a block 221s registers an offense without specifying where the reassignment took place 221s and the block is nested within a block 221s registers an offense without specifying where the reassignment took place 221s and the argument was used before shadowing 221s accepts 221s and the argument was not shadowed outside the block 221s accepts 221s and the block is nested within a conditional 221s registers an offense without specifying where the reassignment took place 221s and the argument was used before shadowing 221s accepts 221s and was used before shadowing 221s accepts 221s and the block occurs after the reassignment 221s registers an offense 221s when zsuper is used 221s registers an offense 221s when argument was shadowed by zsuper 221s registers an offense 221s when IgnoreImplicitReferences config option is set to true 221s accepts 221s when argument was shadowed by zsuper 221s does not register an offense 221s and shadowed within a conditional 221s registers an offense without specifying where the reassignment took place 221s and the conditional is nested within a lambda 221s registers an offense without specifying where the reassignment took place 221s and the argument was used before shadowing 221s accepts 221s and was used before shadowing 221s accepts 221s and the conditional occurs after the reassignment 221s registers an offense 221s and the argument was not shadowed outside the conditional 221s accepts 221s and the conditional is nested within a conditional 221s registers an offense without specifying where the reassignment took place 221s and the argument was used before shadowing 221s accepts 221s and the argument is not used 221s accepts 221s 221s RuboCop::Cop::Style::RedundantSelfAssignment 221s does not register an offense when lhs and receiver are different 221s does not register an offense when there is no a receiver 221s registers an offense and corrects when assigning to attribute of non `self` 221s registers an offense and corrects when assigning to attribute of `self` 221s does not register an offense when assigning to attribute of `self` the result from other object 221s when lhs and receiver are the same 221s registers an offense and corrects when assigning to local variable 221s registers an offense and corrects when assigning to instance variable 221s registers an offense and corrects when assigning to global variable 221s registers an offense and corrects when assigning to class variable 221s 221s RuboCop::Cop::Style::TrailingCommaInArguments 221s with a single argument of anonymous function spanning multiple lines 221s when EnforcedStyleForMultiline is consistent_comma 221s accepts a single argument with no trailing comma 221s with single line list of values 221s when EnforcedStyleForMultiline is consistent_comma 221s accepts chained single-line method calls 221s accepts method call without parameters 221s accepts method call without trailing comma 221s registers an offense for trailing comma in a method call with hash parameters at the end 221s accepts method call without trailing comma with single element hash parameters at the end 221s registers an offense for trailing comma in a method call 221s accepts method call without trailing comma when a line break before a method call 221s registers an offense for trailing comma preceded by whitespace in a method call 221s accepts heredoc without trailing comma 221s when using safe navigation operator 221s registers an offense for trailing comma in a method call with hash parameters at the end 221s registers an offense for trailing comma in a method call 221s when EnforcedStyleForMultiline is comma 221s registers an offense for trailing comma preceded by whitespace in a method call 221s registers an offense for trailing comma in a method call 221s accepts method call without trailing comma when a line break before a method call 221s accepts method call without trailing comma 221s accepts method call without trailing comma with single element hash parameters at the end 221s accepts method call without parameters 221s accepts heredoc without trailing comma 221s registers an offense for trailing comma in a method call with hash parameters at the end 221s accepts chained single-line method calls 221s when using safe navigation operator 221s registers an offense for trailing comma in a method call 221s registers an offense for trailing comma in a method call with hash parameters at the end 221s when EnforcedStyleForMultiline is no_comma 221s accepts method call without trailing comma with single element hash parameters at the end 221s registers an offense for trailing comma in a method call with hash parameters at the end 221s registers an offense for trailing comma preceded by whitespace in a method call 221s accepts method call without trailing comma 221s accepts heredoc without trailing comma 221s accepts method call without trailing comma when a line break before a method call 221s accepts method call without parameters 221s registers an offense for trailing comma in a method call 221s accepts chained single-line method calls 221s when using safe navigation operator 221s registers an offense for trailing comma in a method call with hash parameters at the end 221s registers an offense for trailing comma in a method call 221s with multi-line list of values 221s when EnforcedStyleForMultiline is comma 221s accepts a trailing comma in a method call with single line hashes 221s accepts a method call with two parameters on the same line 221s does not break when a safe method call is chained on the offending more complex one 221s does not break when a safe method call is chained on the offending simple one 221s registers an offense for no trailing comma in a method call with hash parameters at the end 221s accepts trailing comma in a method call with hash parameters at the end 221s does not break when a method call is chained on the offending one 221s accepts no trailing comma in a method call with a multiline braceless hash at the end with more than one parameter on a line 221s accepts a multiline call with a single argument and trailing comma 221s accepts an empty hash being passed as a method argument 221s accepts missing comma after heredoc with comments 221s when closing bracket is on same line as last value 221s accepts a method call with Hash as last parameter split on multiple lines 221s when EnforcedStyleForMultiline is no_comma 221s registers an offense for trailing comma in a method call with hash parameters at the end 221s accepts comma inside a heredoc parameter at the end 221s accepts comma inside a heredoc with comments inside 221s accepts a method call with hash parameters at the end and no trailing comma 221s accepts comma inside a modified heredoc parameter 221s accepts comma inside a heredoc with method and comments inside 221s autocorrects unwanted comma after modified heredoc parameter 221s accepts comma inside a heredoc in brackets 221s when there is string interpolation inside heredoc parameter 221s accepts comma inside a heredoc parameter when on a single line 221s autocorrects unwanted comma inside string interpolation 221s accepts comma inside a heredoc parameter 221s when EnforcedStyleForMultiline is consistent_comma 221s accepts trailing comma in a method call with hash parameters at the end 221s accepts a trailing comma in a method call with a single hash parameter to a receiver object 221s registers an offense for no trailing comma in a method call withtwo parameters on the same line 221s autocorrects missing comma after a heredoc 221s accepts a multiline call with a single argument and trailing comma 221s accepts no trailing comma in a method call with a block parameter at the end 221s accepts a trailing comma in a method call with single line hashes 221s accepts a trailing comma in a method call with a single hash parameter 221s accepts a multiline call with single argument on multiple lines 221s accepts a multiline call with arguments on a single line and trailing comma 221s registers an offense for no trailing comma in a method call with hash parameters at the end 221s when closing bracket is on same line as last value 221s registers an offense for a method call, with a Hash as the last parameter, split on multiple lines 221s with a single argument spanning multiple lines 221s when EnforcedStyleForMultiline is consistent_comma 221s accepts a single argument with no trailing comma 221s 221s RuboCop::Cop::Style::BlockDelimiters 221s EnforcedStyle: semantic 221s allows {} if it is a known functional method 221s accepts a single line block with {} if used in an array 221s accepts a multi-line block with braces if it is the return value of its scope 221s accepts a multi-line functional block with do-end if it is an ignored method by regex 221s accepts a single line block with {} if used in a logical or 221s accepts a multi-line block with braces when passed to a known functional method 221s registers an offense for a multi-line block with braces if the return value is not used 221s autocorrects do-end with `rescue` to {} if it is a functional block 221s autocorrects do-end to {} if it is a functional block and does not change the meaning 221s accepts a multi-line block with braces when chained 221s accepts a multi-line block with braces if the return value is assigned 221s autocorrects do-end to {} if it is a functional block 221s accepts a single line block with {} if used in an if statement 221s accepts a single line block with {} if used in an irange 221s allows {} if it is a known procedural method 221s accepts a multi-line block with braces when passed to a method 221s accepts a single line block with {} followed by a safe navigation method call 221s autocorrects do-end to {} with appropriate spacing 221s registers an offense for a multi-line block with do-end if the return value is passed to a method 221s autocorrects do-end with `ensure` to {} if it is a functional block 221s accepts a multi-line functional block with do-end if it is an ignored method 221s registers an offense for a multi-line block with do-end if the return value is attribute-assigned 221s accepts a multi-line functional block with do-end if it is a known procedural method 221s accepts a single line block with {} if used in an erange 221s accepts a multi-line block with do-end if it is the return value of its scope 221s accepts a single line block with {} if used in a logical and 221s registers an offense for a multi-line block with do-end if the return value is assigned 221s with a procedural multi-line block 221s autocorrects { and } to do and end with appropriate spacing 221s autocorrects { and } to do and end 221s with a procedural one-line block 221s with AllowBracesOnProceduralOneLiners true 221s accepts a single line procedural block with braces 221s accepts a single line procedural do-end block 221s with AllowBracesOnProceduralOneLiners false or unset 221s accepts a single line block with do-end if it is procedural 221s registers an offense for a single line procedural block 221s EnforcedStyle: braces_for_chaining 221s allows do/end inside Hash[] 221s accepts a single line block with braces 221s accepts a multi-line block with do-end 221s accepts a multi-line block that needs braces to be valid ruby 221s disallows {} with no chain inside of Hash[] 221s autocorrects do-end with `ensure` to {} if it is a functional block 221s allows when :[] is chained 221s allows chaining to } inside of Hash[] 221s autocorrects do-end with `rescue` to {} if it is a functional block 221s registers an offense for a single line block with do-end 221s accepts a multi-line functional block with {} if it is an ignored method by regex 221s accepts a multi-line functional block with {} if it is an ignored method 221s registers an offense for multi-line chained do-end blocks 221s when there are braces around a multi-line block 221s registers an offense when combined with attribute assignment 221s allows when the block is being chained 221s allows when the block is being chained with attribute assignment 221s registers an offense in the simple case 221s Ruby >= 2.7 221s accepts a multi-line numblock with do-end 221s registers an offense for a single line numblock with do-end 221s accepts a single line numblock with braces 221s accepts a multi-line numblock that needs braces to be valid ruby 221s with safe navigation 221s registers an offense for multi-line chained do-end blocks 221s BracesRequiredMethods 221s other methods 221s allows braces 221s autocorrects { and } to do and end 221s BracesRequiredMethods methods 221s registers an offense with do 221s allows braces 221s EnforcedStyle: line_count_based 221s does not autocorrect do-end if {} would change the meaning 221s accepts a multi-line block that needs braces to be valid ruby 221s autocorrects do-end for single line blocks to { and } 221s registers an offense for a single line block with do-end 221s does not autocorrect {} if do-end would change the meaning 221s accepts a multi-line block with do-end 221s accepts a single line block with braces 221s when there are braces around a multi-line block 221s accepts a multi-line functional block with {} if it is an ignored method by regex 221s autocorrects adjacent curly braces correctly 221s does not autocorrect {} if do-end would introduce a syntax error 221s accepts braces if do-end would change the meaning 221s registers an offense and keep chained block when there is a comment after the closing brace and block body is not empty 221s registers an offense when there is a comment after the closing brace and block body is not empty 221s registers an offense when combined with attribute assignment 221s can handle special method names such as []= and done? 221s registers an offense in the simple case 221s accepts a multi-line functional block with {} if it is an ignored method 221s autocorrects { and } to do and end 221s registers an offense when there is a comment after the closing brace and block body is empty 221s registers an offense when there is a comment after the closing brace and using method chain 221s registers an offense for braces if do-end would not change the meaning 221s with a single line do-end block with an inline `rescue` 221s autocorrects properly 221s Ruby >= 2.7 221s accepts a multi-line numblock with do-end 221s accepts a multi-line numblock that needs braces to be valid ruby 221s accepts a single line numblock with braces 221s registers an offense for a single line numblock with do-end 221s EnforcedStyle: always_braces 221s accepts a multi-line functional block with do-end if it is an ignored method 221s does not autocorrect do-end if {} would change the meaning 221s registers an offense for a multi-line block with do-end 221s registers an offense for multi-line chained do-end blocks 221s accepts a single line block with braces 221s registers an offense for a single line block with do-end 221s autocorrects do-end with `ensure` to {} if it is a functional block 221s autocorrects do-end with `rescue` to {} if it is a functional block 221s registers an offense for multi-lined do-end blocks when combined with attribute assignment 221s accepts a multi-line functional block with do-end if it is an ignored method by regex 221s accepts a multi-line block that needs braces to be valid ruby 221s when there are braces around a multi-line block 221s allows when the block is being chained 221s allows when combined with attribute assignment 221s allows in the simple case 221s 221s RuboCop::Cop::Style::MethodCallWithArgsParentheses 221s when EnforcedStyle is omit_parentheses 221s register an offense in assignments 221s accepts parens in yield argument method calls 221s accepts parens in default keyword argument value calls 221s accepts parens in splat calls 221s accepts special lambda call syntax 221s accepts no parens in method call without args 221s autocorrects single-line calls 221s accepts parens in calls with hash as arg 221s accepts no parens in method call with args 221s accepts parens in slash regexp literal as argument 221s accepts parens in ternary condition calls 221s accepts parens in args with ternary conditions 221s register an offense for parens in do-end blocks 221s register an offense for parens in string interpolation 221s register an offense for parens in the last chain 221s accepts parens in args splat 221s accepts parens in camel case method without args 221s accepts parens in block passing calls 221s register an offense for camel-case methods with arguments 221s accepts parens in super method calls as arguments 221s register an offense for superclass call with parens 221s accepts parens in default argument value calls 222s accepts parens in nested method args 222s accepts parens in range literals 222s register an offense in complex conditionals 222s register an offense in multi-line inheritance 222s accepts parens in calls with args with logical operators 222s accepts parens in single-line inheritance 222s accepts parens in super calls with braced blocks 222s accepts parens in super without args 222s autocorrects complex multi-line calls 222s register an offense for hashes in keyword values 222s register an offense for %r regex literal as arguments 222s accepts parens in chaining with operators 222s accepts parens in calls with logical operators 222s autocorrects multi-line calls with trailing whitespace 222s accepts parens in method args 222s accepts parens in chaining with safe operators 222s accepts parens in literals with unary operators as first argument 222s accepts parens in assignment in conditions 222s accepts parens in implicit #to_proc 222s accepts parens in operator method calls 222s accepts parens in argument calls with braced blocks 222s register an offense for multi-line method calls 222s accepts parens in blocks with braces 222s register an offense for yield call with parens 222s register an offense for parens in method call without args 222s accepts parens in chained method calls 222s forwarded arguments in 3.0 222s accepts parens for forwarded arguments 222s forwarded arguments in 2.7 222s accepts parens for forwarded arguments 222s allowing parenthesis in chaining 222s register offense for multi-line chaining without previous parens 222s accepts parens in the last call if any previous calls with parentheses 222s accepts no parens in the last call if previous calls with parens 222s register offense for single-line chaining without previous parens 222s behaves like endless methods 222s endless methods 222s without arguments 222s does not register an offense when there are arguments 222s registers an offense for `defs` when there are parens 222s registers an offense when there are parens 222s does not register an offense for `defs` when there are arguments 222s does not register an offense when there are no parens 222s with arguments 222s requires method calls to have parens 222s numbered parameters in 2.7 222s accepts parens for braced numeric block calls 222s hash value omission in 3.1 222s registers an offense when with parentheses call expr follows 222s registers and corrects an offense when explicit hash value with parentheses and using modifier form 222s does not register an offense when hash value omission with parentheses and using modifier form 222s registers an offense using assignment with parentheses call expr follows 222s registers an offense when last argument is a hash value omission 222s does not register an offense when without parentheses call expr follows 222s allowing parens in camel-case methods 222s accepts parens for camel-case method names 222s allowing parens in multi-line calls 222s accepts parens for multi-line calls 222s allowing parens in string interpolation 222s accepts parens for camel-case method names 222s when EnforcedStyle is require_parentheses (default) 222s register no offense for yield without args 222s accepts parens in method call with do-end blocks 222s register an offense for superclass call without parens 222s autocorrects call with multiple args by adding braces 222s register no offense for superclass call with parens 222s autocorrects calls where the argument node is a number 222s accepts parens in method call with args 222s autocorrects calls with multiple args by adding needed braces 222s accepts no parens for setter methods 222s autocorrects calls where arg is method call 222s register an offense for methods starting with capital without parens 222s accepts no parens for operators 222s autocorrects parenthesized args for local methods by removing space 222s register no offense for superclass call without args 222s accepts no parens for unary operators 222s autocorrects calls where multiple args are method calls 222s autocorrects calls where the argument node is a constant 222s autocorrects partially parenthesized args by adding needed braces 222s register an offense for non-receiver method call without parens 222s register an offense for method call without parens 222s register an offense for yield without parens 222s autocorrects fully parenthesized args by removing space 222s accepts no parens in method call without args 222s AllowedPatterns 222s ignored methods listed in AllowedPatterns 222s behaves like endless methods 222s endless methods 222s without arguments 222s does not register an offense for `defs` when there are arguments 222s does not register an offense when there are parens 222s does not register an offense when there are arguments 222s does not register an offense for `defs` when there are parens 222s does not register an offense when there are no parens 222s with arguments 222s requires method calls to have parens 222s when inspecting macro methods 222s in a module body 222s does not register an offense 222s in a class body 222s does not register an offense 222s with AllowedMethods 222s allow method listed in AllowedMethods 222s when using safe navigation operator 222s register an offense for method call without parens 222s when inspecting macro methods with IncludedMacros 222s for a macro in both IncludedMacros and AllowedMethods 222s allows 222s in a class body 222s finds offense 222s behaves like endless methods 222s endless methods 222s with arguments 222s requires method calls to have parens 222s without arguments 222s does not register an offense when there are parens 222s does not register an offense for `defs` when there are arguments 222s does not register an offense when there are no parens 222s does not register an offense for `defs` when there are parens 222s does not register an offense when there are arguments 222s in a module body 222s finds offense 222s for a macro not on the included list 222s allows 222s 222s RuboCop::Cop::Layout::MultilineMethodCallIndentation 222s when EnforcedStyle is indented 222s accepts indented methods in if condition 222s registers an offense and corrects aligned operators in assignment 222s registers an offense for a 2 space indentation of until condition 222s accepts any indentation of method parameters 222s accepts indented methods in unless body 222s accepts indentation of assignment to obj.a[:key] with newline after = 222s accepts indented methods in if body 222s accepts double indentation of while condition 222s registers an offense and corrects aligned methods in if condition 222s registers an offense and corrects 1 space indentation of 3rd line 222s registers an offense and corrects the emacs ruby-mode 1.1 indentation of an expression in an array 222s registers an offense for a 2 space indentation of unless condition 222s accepts double indentation of if condition 222s registers an offense and corrects proc call without a selector 222s accepts alignment inside a grouped expression 222s accepts indentation of assignment to a[:key] with rhs on same line 222s registers an offense for a 2 space indentation of if condition 222s accepts correctly indented methods in operation 222s registers an offense and corrects wrong indentation of for expression 222s registers an offense and corrects 0 space indentation inside square brackets 222s registers an offense and corrects correct + unrecognized style 222s accepts indentation of assignment to a with newline after = 222s accepts alignment of method with assignment and operator-like method 222s accepts any indentation of parameters to #[] 222s doesn't crash on unaligned multiline lambdas 222s registers an offense and corrects extra indentation of third line 222s accepts indented methods in until body 222s accepts indentation of assignment to obj.a with newline after = 222s accepts indented methods in ordinary statement 222s registers an offense and corrects no indentation of second line 222s accepts an expression where the first method spans multiple lines 222s accepts indented methods inside and outside a block 222s accepts special indentation of for expression 222s accepts normal indentation of method parameters 222s registers an offense for a 2 space indentation of while condition 222s registers an offense and corrects 3 spaces indentation of 2nd line 222s registers an offense and corrects one space indentation of 2nd line 222s accepts indentation of assignment to a[:key] with newline after = 222s accepts special indentation of return if condition 222s accepts special indentation of return unless condition 222s accepts indented methods in for body 222s accepts indented methods in LHS of []= assignment 222s accepts double indentation of unless condition 222s accepts indented methods in while body 222s accepts no extra indentation of third line 222s accepts even indentation of consecutive lines in typical RSpec code 222s accepts double indentation of until condition 222s accepts indentation of assignment to a with rhs on same line 222s doesn't fail on unary operators 222s accepts normal indentation inside grouped expression 222s registers an offense and corrects extra indentation of 3rd line in typical RSpec code 222s accepts indentation relative to first receiver 222s when indentation width is overridden for this cop 222s accepts indented methods 222s accepts correctly indented methods in operation 222s registers an offense for a 4 space indentation of while condition 222s accepts indentation of if condition which is offset by a single normal indentation step 222s registers an offense for a 4 space indentation of if condition 222s registers an offense for a 4 space indentation of until condition 222s accepts indentation of until condition which is offset by a single normal indentation step 222s accepts indentation of while condition which is offset by a single normal indentation step 222s registers an offense for a 4 space indentation of unless condition 222s accepts indented methods in unless body 222s accepts indented methods in if body 222s accepts indentation of assignment 222s accepts indented methods in if condition 222s accepts indented methods in until body 222s accepts indentation of unless condition which is offset by a single normal indentation step 222s accepts indented methods in while body 222s for possible semantic alignment 222s accepts indented methods 222s when EnforcedStyle is indented_relative_to_receiver 222s registers an offense and corrects no indentation of second line 222s accepts correctly indented methods in operation 222s does not register an offense when multiline method chain has expected indent width and the method is preceded by splat 222s accepts alignment inside a grouped expression 222s accepts no extra indentation of third line 222s registers an offense and corrects 3 spaces indentation of second line 222s accepts indented methods in for body 222s accepts alignment of method with assignment and operator-like method 222s accepts indentation of consecutive lines in typical RSpec code 222s accepts an expression where the first method spans multiple lines 222s doesn't fail on unary operators 222s registers an offense and corrects one space indentation of 2nd line 222s registers an offense and corrects extra indentation of 3rd line in typical RSpec code 222s does not register an offense when multiline method chain has expected indent width and the method is preceded by double splat 222s accepts indented methods in ordinary statement 222s registers an offense and corrects the emacs ruby-mode 1.1 indentation of an expression in an array 222s registers an offense and corrects extra indentation of 3rd line 222s accepts indentation relative to first receiver 222s doesn't crash on unaligned multiline lambdas 222s registers an offense and corrects proc call without a selector 222s accepts any indentation of parameters to #[] 222s accepts indented methods in LHS of []= assignment 222s accepts indented methods inside and outside a block 222s for possible semantic alignment 222s accepts indented methods 222s when EnforcedStyle is aligned 222s accepts aligned methods in assignment 222s accepts indented methods inside and outside a block 222s registers an offense and corrects one space indentation of 3rd line 222s registers an offense and corrects misaligned methods in unless condition 222s accepts aligned methods in if condition 222s registers an offense and corrects the emacs ruby-mode 1.1 indentation of an expression in an array 222s accepts aligned method in return 222s accepts indentation relative to first receiver 222s registers an offense and corrects one space indentation of 2nd line 222s accepts any indentation of parameters to #[] 222s registers an offense and corrects unaligned methods in assignment 222s accepts an expression where the first method spans multiple lines 222s registers an offense and corrects no indentation of second line 222s doesn't crash on unaligned multiline lambdas 222s registers an offense and corrects 3 spaces indentation of 2nd line 222s accepts no extra indentation of third line 222s does not check binary operations when string wrapped with backslash 222s accepts indented methods in ordinary statement 222s accepts aligned method in assignment + block + assignment 222s accepts correctly aligned methods in operands 222s accepts aligned methods in constant assignment 222s accepts indented methods in for body 222s registers an offense and corrects misaligned methods in local variable assignment 222s accepts indented and aligned methods in binary operation 222s registers an offense and corrects proc call without a selector 222s registers an offense and corrects extra indentation of third line 222s accepts alignment of method with assignment and operator-like method 222s accepts indented methods in LHS of []= assignment 222s accepts aligned methods in a begin..end block 222s accepts even indentation of consecutive lines in typical RSpec code 222s registers an offense and corrects misaligned methods in if condition 222s registers an offense and corrects misaligned methods in while condition 222s registers an offense and corrects misaligned method in []= call 222s accepts alignment inside a grouped expression 222s accepts aligned methods in if + assignment 222s accepts aligned methods in operator assignment 222s accepts correctly aligned methods in assignment 222s accepts indented method when there is nothing to align with 222s registers an offense and corrects extra indentation of 3rd line in typical RSpec code 222s registers an offense and corrects misaligned methods in until condition 222s doesn't fail on unary operators 222s does not check binary operations when string wrapped with + 222s for semantic alignment 222s accepts method being aligned with method 222s accepts aligned method even when an aref is in the chain 222s accepts method being aligned with method in assignment 222s accepts methods being aligned with method that is an argument in assignment 222s doesn't fail on a chain of aref calls 222s accepts key access to hash 222s accepts methods being aligned with method that is an argument 222s accepts aligned method even when an aref is first in the chain 222s accepts aligned method with blocks in operation assignment 222s registers an offense and corrects unaligned method in block body 222s accepts 3 aligned methods 222s accepts nested method calls 222s registers an offense and corrects unaligned methods 222s >= Ruby 2.7 222s accepts methods being aligned with method that is an argumentwhen using numbered parameter 222s 222s RuboCop::Cop::Layout::MultilineArrayLineBreaks 222s when on same line, separate line from brackets 222s does not add any offenses 222s when on same line 222s does not add any offenses 222s when two elements on same line 222s registers an offense and corrects 222s when nested arrays 222s registers an offense and corrects 222s 222s RuboCop::Cop::Lint::SendWithMixinArgument 222s does not register an offense when using `include` 222s does not register an offense when not using a mixin method 222s registers an offense when using `public_send` method 222s does not register an offense when using `extend` 222s registers an offense when using `send` with `extend` 222s registers an offense when using `send` with `prepend` 222s registers an offense when using `__send__` method 222s registers an offense when using `send` with `include` 222s does not register an offense when using `prepend` 222s when using namespace for module 222s registers an offense when using `send` with `include` 222s when specifying a mixin method as a string 222s registers an offense when using `send` with `extend` 222s registers an offense when using `send` with `prepend` 222s registers an offense when using `send` with `include` 222s 222s RuboCop::Cop::MessageAnnotator 222s #annotate 222s with options on 222s returns an annotated message 222s when the output format is JSON 222s returns the message unannotated 222s with default options 222s returns the message 222s with style guide url 222s when a base URL is specified 222s allows absolute URLs in the cop config 222s can accept relative paths if base has a full path 222s can use a path-based setting 222s does not specify a URL if a cop does not have one 222s combines correctly with a target-based setting 222s when a department other than AllCops is specified 222s returns style guide url when it is specified 222s when a nested department is specified 222s returns style guide url when it is specified 222s when StyleGuide is set in the config 222s adds style guide url 222s when StyleGuide is not set in the config 222s does not add style guide url 222s #urls 222s returns multiple reference urls 222s returns style guide url when it is specified 222s returns an empty array without StyleGuide URL 222s returns style guide and reference url when they are specified 222s returns an empty array if the reference url is blank 222s returns reference url when it is specified 222s 222s RuboCop::Cop::Style::PerlBackrefs 222s autocorrects $POSTMATCH to Regexp.last_match.post_match 222s autocorrects `#$1` to `#{Regexp.last_match(1)}` 222s autocorrects $9 to Regexp.last_match(9) 222s autocorrects /#$1/ to /#{Regexp.last_match(1)}/ 222s autocorrects $` to Regexp.last_match.pre_match 222s autocorrects $PREMATCH to Regexp.last_match.pre_match 222s autocorrects "#$1" to "#{Regexp.last_match(1)}" 222s autocorrects $& to Regexp.last_match(0) 222s autocorrects puts $1 to puts Regexp.last_match(1) 222s autocorrects $LAST_PAREN_MATCH to Regexp.last_match(-1) 222s autocorrects $+ to Regexp.last_match(-1) 222s autocorrects $1 to ::Regexp.last_match(1) in namespace 222s autocorrects $' to Regexp.last_match.post_match 222s autocorrects $MATCH to Regexp.last_match(0) 222s 222s RuboCop::Cop::Style::OpenStructUse 222s when using OpenStruct 222s for OpenStruct 222s when inheriting from it via Class.new 222s registers an offense 222s when used in assignments 222s registers an offense 222s when inheriting from it via < 222s registers an offense 222s for ::OpenStruct 222s when used in assignments 222s registers an offense 222s when inheriting from it via Class.new 222s registers an offense 222s when inheriting from it via < 222s registers an offense 222s when not using OpenStruct 222s registers no offense 222s when using custom namespaced OpenStruct 222s when used in assignments 222s registers no offense 222s when inheriting from it 222s is expected to eq "class A < SomeNamespace::OpenStruct; end" 222s when defined in custom namespace 222s when class 222s is expected to eq "module SomeNamespace\n class OpenStruct\n end\nend\n" 222s when module 222s is expected to eq "module SomeNamespace\n module OpenStruct\n end\nend\n" 222s 222s RuboCop::Config 222s whether the cop is enabled 222s when a cop has configuration but no explicit Enabled setting 222s enables the cop by default 222s when an nested cop department is disabled 222s and an individual cop is not specified 222s the cop setting overrides the department 222s but an individual cop is enabled 222s the cop setting overrides the department 222s when an entire cop department is enabled 222s but an individual cop is disabled 222s still disables the cop 222s when an entire cop department is disabled 222s but an individual cop is enabled 222s the cop setting overrides the department 222s when configuration has no mention of a cop 222s enables the cop that is not mentioned 222s when all cops are explicitly enabled by default 222s enables the cop that is not mentioned 222s when all cops are disabled by default 222s disables the cop that is not mentioned 222s #deprecation_check 222s when there is AllCops configuration 222s if there are is an Excludes key 222s yields 222s if there are is an Includes key 222s yields 222s if there are no Excludes or Includes keys 222s does not yield 222s when there is no AllCops configuration 222s does not yield 222s #patterns_to_exclude 222s when config file has AllCops => Exclude key 222s returns the Exclude value 222s #for_badge 222s works if department has no config 222s takes into account the department 222s #check 222s when a deprecated configuration is detected 222s prints a warning message for the loaded path 222s #make_excludes_absolute 222s when config is in root directory 222s generates valid absolute directory 222s when config is in subdirectory 222s generates valid absolute directory 222s #for_department 222s always returns the department's config 222s accepts a Symbol 222s #patterns_to_include 222s when config file has AllCops => Include key 222s returns the Include value 222s #validate 222s when the configuration includes an invalid enforced style 222s raises validation error 222s conflicting Safe settings 222s when the configuration includes an unsafe cop without a declaration of its autocorrection 222s does not raise validation error 222s when the configuration includes an unsafe cop that is explicitly declared to have a safe autocorrection 222s raises validation error 222s when the configuration is in the base RuboCop config folder 222s is not validated 222s when the configuration includes the obsolete Style/IfUnlessModifier: MaxLineLength parameter 222s raises validation error 222s when the configuration includes multiple invalid enforced styles 222s raises validation error 222s when the configuration includes a valid enforced style 222s does not raise validation error 222s when the configuration includes multiple but config does not allow 222s raises validation error 222s when the configuration includes any unrecognized cop name 223s raises an validation error 223s when the configuration includes obsolete parameters and cops 223s raises validation error 223s when the configuration includes an empty section 223s raises validation error 223s when the configuration includes an obsolete parameter 223s raises validation error 223s when the configuration includes a valid EnforcedStyle 223s does not raise validation error 223s when the empty section is AllCops 223s raises validation error 223s when the configuration includes any unrecognized cop name and given `--ignore-unrecognized-cops` option 223s there is unrecognized cop 223s prints a warning about the cop 223s there are no unrecognized cops 223s does not print any warnings 223s when the configuration includes any unrecognized parameter 223s prints a warning message 223s when the configuration includes an obsolete EnforcedStyle parameter 223s raises validation error 223s when all cops are both Enabled and Disabled by default 223s raises validation error 223s when the configuration includes Lint/Syntax cop 223s when the configuration matches the default 223s does not raise validation error 223s when the configuration does not match the default 223s raises validation error 223s when the configuration includes the obsolete Style/WhileUntilModifier: MaxLineLength parameter 223s raises validation error 223s when the configuration includes multiple valid enforced styles and one invalid style 223s raises validation error 223s when the configuration includes an invalid EnforcedStyle 223s raises validation error 223s when the configuration includes an obsolete cop 223s raises validation error 223s when the configuration includes any common parameter 223s does not raise validation error 223s when the configuration includes multiple valid enforced styles 223s does not raise validation error 223s #file_to_include? 223s when the passed path matches any of patterns to include 223s returns true 223s when the passed path does not match any of patterns to include 223s returns false 223s #file_to_exclude? 223s when the passed path matches any of patterns to exclude 223s returns true 223s when the passed path does not match any of patterns to exclude 223s returns false 223s #possibly_include_hidden? 223s returns true when Include config includes a dotfile in a path 223s returns true when Include config only includes regular paths 223s returns true when Include config includes a regex 223s returns true when Include config includes a toplevel dotfile 223s #allowed_camel_case_file? 223s when the passed path matches allowed camel case patterns to include 223s is expected to equal true 223s when the passed path does not match allowed camel case patterns to include 223s is expected to equal false 223s when the passed path is a gemspec 223s is expected to equal true 223s 223s RuboCop::Cop::Style::EmptyElse 223s configured to warn on empty else and nil in else 223s given a case statement 223s with no else-clause 223s doesn't register an offense 223s with an else-clause containing only the literal nil 223s behaves like autocorrect 223s MissingElse is if 223s does autocorrection 223s MissingElse is both 223s does not autocorrect 223s MissingElse is case 223s does not autocorrect 223s MissingElse is disabled 223s does autocorrection 223s with an else-clause with side-effects 223s doesn't register an offense 223s with a completely empty else-clause 223s behaves like autocorrect 223s MissingElse is both 223s does not autocorrect 223s MissingElse is disabled 223s does autocorrection 223s MissingElse is case 223s does not autocorrect 223s MissingElse is if 223s does autocorrection 223s given an if-statement 223s with an else-clause with side-effects 223s doesn't register an offense 223s with an else-clause containing only the literal nil 223s with multiple elsifs 223s behaves like autocorrect 223s MissingElse is case 223s does autocorrection 223s MissingElse is both 223s does not autocorrect 223s MissingElse is if 223s does not autocorrect 223s MissingElse is disabled 223s does autocorrection 223s with one elsif 223s behaves like autocorrect 223s MissingElse is disabled 223s does autocorrection 223s MissingElse is if 223s does not autocorrect 223s MissingElse is both 223s does not autocorrect 223s MissingElse is case 223s does autocorrection 223s with no else-clause 223s doesn't register an offense 223s with a completely empty else-clause 223s behaves like autocorrect 223s MissingElse is disabled 223s does autocorrection 223s MissingElse is case 223s does autocorrection 223s MissingElse is both 223s does not autocorrect 223s MissingElse is if 223s does not autocorrect 223s given an unless-statement 223s with an else-clause with side-effects 223s doesn't register an offense 223s with a completely empty else-clause 223s behaves like autocorrect 223s MissingElse is both 223s does not autocorrect 223s MissingElse is case 223s does autocorrection 223s MissingElse is if 223s does not autocorrect 223s MissingElse is disabled 223s does autocorrection 223s with an else-clause containing only the literal nil 223s behaves like autocorrect 223s MissingElse is case 223s does autocorrection 223s MissingElse is both 223s does not autocorrect 223s MissingElse is disabled 223s does autocorrection 223s MissingElse is if 223s does not autocorrect 223s with no else-clause 223s doesn't register an offense 223s configured to warn on empty else 223s given an unless-statement 223s with an else-clause containing only the literal nil 223s doesn't register an offense 223s with a completely empty else-clause 223s behaves like autocorrect 223s MissingElse is case 223s does autocorrection 223s MissingElse is both 223s does not autocorrect 223s MissingElse is if 223s does not autocorrect 223s MissingElse is disabled 223s does autocorrection 223s with no else-clause 223s doesn't register an offense 223s with an else-clause with side-effects 223s doesn't register an offense 223s given an if-statement 223s with an empty comment 223s does not autocorrect 223s with a completely empty else-clause 223s not using semicolons 223s behaves like autocorrect 223s MissingElse is if 223s does not autocorrect 223s MissingElse is both 223s does not autocorrect 223s MissingElse is disabled 223s does autocorrection 223s MissingElse is case 223s does autocorrection 223s using semicolons 223s behaves like autocorrect 223s MissingElse is both 223s does not autocorrect 223s MissingElse is if 223s does not autocorrect 223s MissingElse is case 223s does autocorrection 223s MissingElse is disabled 223s does autocorrection 223s with an else-clause containing only the literal nil 223s doesn't register an offense 223s with no else-clause 223s doesn't register an offense 223s with an else-clause with side-effects 223s doesn't register an offense 223s in an if-statement 223s behaves like autocorrect 223s MissingElse is if 223s does not autocorrect 223s MissingElse is disabled 223s does autocorrection 223s MissingElse is case 223s does autocorrection 223s MissingElse is both 223s does not autocorrect 223s given a case statement 223s with a completely empty else-clause 223s behaves like autocorrect 223s MissingElse is both 223s does not autocorrect 223s MissingElse is if 223s does autocorrection 223s MissingElse is case 223s does not autocorrect 223s MissingElse is disabled 223s does autocorrection 223s with an else-clause containing only the literal nil 223s doesn't register an offense 223s with an else-clause with side-effects 223s doesn't register an offense 223s with no else-clause 223s doesn't register an offense 223s when `AllowComments: true` 223s given an if-statement 223s with not comment and nil else-clause 223s registers an offense 223s with comment and empty else-clause 223s doesn't register an offense 223s with not comment and empty else-clause 223s registers an offense 223s with comment and nil else-clause 223s doesn't register an offense 223s given a case statement 223s with not comment and empty else-clause 223s registers an offense 223s with not comment and nil else-clause 223s registers an offense 223s with comment and empty else-clause 223s doesn't register an offense 223s with comment and nil else-clause 223s doesn't register an offense 223s given an unless-statement 223s with comment and nil else-clause 223s doesn't register an offense 223s with not comment and empty else-clause 223s registers an offense 223s with not comment and nil else-clause 223s registers an offense 223s with comment and empty else-clause 223s doesn't register an offense 223s with nested if and case statement 223s behaves like autocorrect 223s MissingElse is both 223s does not autocorrect 223s MissingElse is if 223s does autocorrection 223s MissingElse is disabled 223s does autocorrection 223s MissingElse is case 223s does not autocorrect 223s configured to warn on nil in else 223s given a case statement 223s with an else-clause with side-effects 223s doesn't register an offense 223s with an else-clause containing only the literal nil 223s using semicolons 223s behaves like autocorrect 223s MissingElse is if 223s does autocorrection 223s MissingElse is both 223s does not autocorrect 223s MissingElse is case 223s does not autocorrect 223s MissingElse is disabled 223s does autocorrection 223s when the result is assigned to a variable 223s behaves like autocorrect 223s MissingElse is both 223s does not autocorrect 223s MissingElse is case 223s does not autocorrect 223s MissingElse is if 223s does autocorrection 223s MissingElse is disabled 223s does autocorrection 223s with a completely empty else-clause 223s doesn't register an offense 223s with no else-clause 223s doesn't register an offense 223s given an if-statement 223s with an else-clause containing only the literal nil using semicolons 223s with one elsif 223s behaves like autocorrect 223s MissingElse is case 223s does autocorrection 223s MissingElse is both 223s does not autocorrect 223s MissingElse is if 223s does not autocorrect 223s MissingElse is disabled 223s does autocorrection 223s with multiple elsifs 223s behaves like autocorrect 223s MissingElse is disabled 223s does autocorrection 223s MissingElse is if 223s does not autocorrect 223s MissingElse is case 223s does autocorrection 223s MissingElse is both 223s does not autocorrect 223s with a completely empty else-clause 223s doesn't register an offense 223s with an else-clause containing only the literal nil 223s when standalone 223s behaves like autocorrect 223s MissingElse is if 223s does not autocorrect 223s MissingElse is both 223s does not autocorrect 223s MissingElse is case 223s does autocorrection 223s MissingElse is disabled 223s does autocorrection 223s when the result is assigned to a variable 223s behaves like autocorrect 223s MissingElse is if 223s does not autocorrect 223s MissingElse is both 223s does not autocorrect 223s MissingElse is disabled 223s does autocorrection 223s MissingElse is case 223s does autocorrection 223s with no else-clause 223s doesn't register an offense 223s with an else-clause with side-effects 223s doesn't register an offense 223s given an unless-statement 223s with an else-clause containing only the literal nil 223s behaves like autocorrect 223s MissingElse is both 223s does not autocorrect 223s MissingElse is case 223s does autocorrection 223s MissingElse is if 223s does not autocorrect 223s MissingElse is disabled 223s does autocorrection 223s with no else-clause 223s doesn't register an offense 223s with a completely empty else-clause 223s doesn't register an offense 223s with an else-clause with side-effects 223s doesn't register an offense 223s 223s RuboCop::Cop::Style::For 223s when for is the enforced style 223s registers an offense for a tuple of items 223s registers multiple offenses 223s accepts for 223s accepts single line each 223s registers an offense for each without an item and uses _ as the item 223s registers an offense for multiline each 223s registers an offense for correct + opposite style 223s when using safe navigation operator 223s does not break 223s Ruby 2.7 223s registers an offense for each without an item and uses _ as the item 223s when each is the enforced style 223s accepts :for 223s accepts multiline each 223s registers an offense for for 223s accepts def for 223s registers multiple offenses 223s registers an offense for opposite + correct style 223s autocorrect 223s corrects an array with `&` operator 223s corrects to `each` without parenthesize collection if non-operator method called 223s corrects an array with `|` operator 223s corrects an array with `+` operator 223s corrects a tuple of items 223s corrects an array with `||` operator 223s corrects an array with `&&` operator 223s changes for that does not have do or semicolon to each 223s corrects an array with `-` operator 223s corrects an array with `*` operator 223s with range 223s changes for that does not have do or semicolon to each 223s changes for to each 223s without parentheses 223s changes for to each 223s changes for that does not have do or semicolon to each 223s 223s RuboCop::Cop::Style::GlobalStdStream 223s does not register an offense when assigning std stream const to std stream gvar 223s does not register an offense when using non std stream const 223s does not register an offense when assigning other const to std stream gvar 223s registers an offense and corrects when using std stream as const 223s 223s RuboCop::Cop::Metrics::Utils::AbcSizeCalculator 223s #calculate 223s with .foo = 223s is expected to eq "<1, 2, 0>" 223s when counting repeated calls 223s is expected to eq "<1, 4, 0>" 223s with unused assignments 223s is expected to eq "<2, 1, 0>" 223s equivalent to multiple assignment with method setters 223s is expected to eq "<3, 5, 0>" 223s assignment with ternary operator 223s is expected to eq "<2, 6, 2>" 223s with []= 223s is expected to eq "<2, 1, 0>" 223s if and arithmetic operations 223s is expected to eq "<2, 8, 4>" 223s elsif vs else if 223s else if 223s is expected to eq "<0, 5, 4>" 223s elsif 223s is expected to eq "<0, 5, 3>" 223s same but with 7 arguments 223s is expected to eq "<9, 3, 0>" 223s with a known iterating block 223s is expected to eq "<2, 4, 2>" 223s with a yield 223s is expected to eq "<0, 1, 0>" 223s method with arguments 223s is expected to eq "<4, 0, 0>" 223s when discounting repeated calls 223s when root receiver is a var 223s is expected to eq "<3, 9, 0>" 223s when some calls have arguments 223s is expected to eq "<1, 7, 0>" 223s when root receiver is self/nil 223s is expected to eq "<2, 9, 1>" 223s multiple assignment 223s is expected to eq "<3, 1, 0>" 223s same with extra condition 223s is expected to eq "<2, 9, 5>" 223s with a block 223s is expected to eq "<2, 3, 0>" 223s with += for setters 223s is expected to eq "<1, 2, 0>" 223s with &&= 223s is expected to eq "<2, 0, 1>" 223s multiple assignment with method setters 223s is expected to eq "<3, 5, 0>" 223s with a for 223s is expected to eq "<2, 1, 1>" 223s with &.foo 223s is expected to eq "<0, 4, 2>" 223s with repeated lvar receivers 223s is expected to eq "<3, 5, 3>" 223s with ||= on a constant 223s is expected to eq "<1, 0, 1>" 223s multiple calls with return 223s is expected to eq "<0, 3, 0>" 223s with ||= 223s is expected to eq "<2, 0, 1>" 223s with += 223s is expected to eq "<2, 0, 0>" 223s 223s RuboCop::Cop::Style::FormatStringToken 223s ignores time format and unrelated `format` method using 223s ignores xstr 223s ignores time format (when used as argument to strftime) 223s works inside hashes 223s ignores time format when it is stored in a variable 223s ignores placeholder arguments 223s ignores `%r` regexp 223s ignores regexp 223s ignores time format (when used as argument to strptime) 223s ignores percent escapes 223s ignores http links 223s ignores __FILE__ 223s handles dstrs 223s supports flags and modifiers 223s behaves like enforced styles for format string tokens 223s when enforced style is annotated 223s supports dynamic string with interpolation 223s sets the enforced style to annotated after inspecting "%s" 223s detects when the cop must be disabled to avoid offenses 223s registers offenses for template style 223s #correctable_sequence? 223s behaves like maximum allowed unannotated 223s when MaxUnannotatedPlaceholdersAllowed is 2 223s does not register offenses for dual unannotated 223s does not register offenses for single unannotated 223s when MaxUnannotatedPlaceholdersAllowed is 1 223s does not register offenses for single unannotated 223s registers offense for dual unannotated 223s when enforced style is template 223s #correctable_sequence? 223s configures the enforced style to template after inspecting "%{a}" 223s does not register offenses for annotated style 223s supports dynamic string with interpolation 223s detects when the cop must be disabled to avoid offenses 223s behaves like maximum allowed unannotated 223s when MaxUnannotatedPlaceholdersAllowed is 2 223s does not register offenses for dual unannotated 223s does not register offenses for single unannotated 223s when MaxUnannotatedPlaceholdersAllowed is 1 223s does not register offenses for single unannotated 223s does not register offenses for dual unannotated 223s when enforced style is unannotated 223s #correctable_sequence? 223s behaves like enforced styles for format string tokens 223s when enforced style is unannotated 223s #correctable_sequence? 223s when enforced style is template 223s does not register offenses for annotated style 223s configures the enforced style to template after inspecting "%{a}" 223s #correctable_sequence? 223s supports dynamic string with interpolation 223s detects when the cop must be disabled to avoid offenses 223s behaves like maximum allowed unannotated 223s when MaxUnannotatedPlaceholdersAllowed is 2 223s does not register offenses for dual unannotated 223s does not register offenses for single unannotated 223s when MaxUnannotatedPlaceholdersAllowed is 1 223s does not register offenses for single unannotated 223s does not register offenses for dual unannotated 223s when enforced style is annotated 223s supports dynamic string with interpolation 223s #correctable_sequence? 223s sets the enforced style to annotated after inspecting "%s" 223s registers offenses for template style 223s detects when the cop must be disabled to avoid offenses 223s behaves like maximum allowed unannotated 223s when MaxUnannotatedPlaceholdersAllowed is 2 223s does not register offenses for dual unannotated 223s does not register offenses for single unannotated 223s when MaxUnannotatedPlaceholdersAllowed is 1 223s registers offense for dual unannotated 223s does not register offenses for single unannotated 223s behaves like enforced styles for format string tokens 223s when enforced style is annotated 223s #correctable_sequence? 223s sets the enforced style to annotated after inspecting "%s" 223s supports dynamic string with interpolation 223s detects when the cop must be disabled to avoid offenses 223s registers offenses for template style 223s behaves like maximum allowed unannotated 223s when MaxUnannotatedPlaceholdersAllowed is 1 223s does not register offenses for single unannotated 223s registers offense for dual unannotated 223s when MaxUnannotatedPlaceholdersAllowed is 2 223s does not register offenses for single unannotated 223s does not register offenses for dual unannotated 223s when enforced style is template 223s does not register offenses for annotated style 223s detects when the cop must be disabled to avoid offenses 223s supports dynamic string with interpolation 223s #correctable_sequence? 223s configures the enforced style to template after inspecting "%{a}" 223s behaves like maximum allowed unannotated 223s when MaxUnannotatedPlaceholdersAllowed is 2 223s does not register offenses for single unannotated 223s does not register offenses for dual unannotated 223s when MaxUnannotatedPlaceholdersAllowed is 1 223s does not register offenses for dual unannotated 223s does not register offenses for single unannotated 223s when enforced style is unannotated 223s #correctable_sequence? 223s behaves like enforced styles for format string tokens 223s when enforced style is unannotated 224s #correctable_sequence? 224s when enforced style is annotated 224s supports dynamic string with interpolation 224s registers offenses for template style 224s detects when the cop must be disabled to avoid offenses 224s sets the enforced style to annotated after inspecting "%s" 224s #correctable_sequence? 224s behaves like maximum allowed unannotated 224s when MaxUnannotatedPlaceholdersAllowed is 1 224s registers offense for dual unannotated 224s does not register offenses for single unannotated 224s when MaxUnannotatedPlaceholdersAllowed is 2 224s does not register offenses for single unannotated 224s does not register offenses for dual unannotated 224s when enforced style is template 224s supports dynamic string with interpolation 224s #correctable_sequence? 224s configures the enforced style to template after inspecting "%{a}" 224s detects when the cop must be disabled to avoid offenses 224s does not register offenses for annotated style 224s behaves like maximum allowed unannotated 224s when MaxUnannotatedPlaceholdersAllowed is 2 224s does not register offenses for dual unannotated 224s does not register offenses for single unannotated 224s when MaxUnannotatedPlaceholdersAllowed is 1 224s does not register offenses for single unannotated 224s does not register offenses for dual unannotated 224s behaves like enforced styles for format string tokens 224s when enforced style is template 224s detects when the cop must be disabled to avoid offenses 224s does not register offenses for annotated style 224s #correctable_sequence? 224s configures the enforced style to template after inspecting "%{a}" 224s supports dynamic string with interpolation 224s behaves like maximum allowed unannotated 224s when MaxUnannotatedPlaceholdersAllowed is 2 224s does not register offenses for single unannotated 224s does not register offenses for dual unannotated 224s when MaxUnannotatedPlaceholdersAllowed is 1 224s does not register offenses for single unannotated 224s does not register offenses for dual unannotated 224s when enforced style is annotated 224s #correctable_sequence? 224s sets the enforced style to annotated after inspecting "%s" 224s registers offenses for template style 224s detects when the cop must be disabled to avoid offenses 224s supports dynamic string with interpolation 224s behaves like maximum allowed unannotated 224s when MaxUnannotatedPlaceholdersAllowed is 1 224s registers offense for dual unannotated 224s does not register offenses for single unannotated 224s when MaxUnannotatedPlaceholdersAllowed is 2 224s does not register offenses for dual unannotated 224s does not register offenses for single unannotated 224s when enforced style is unannotated 224s #correctable_sequence? 224s behaves like enforced styles for format string tokens 224s when enforced style is unannotated 224s #correctable_sequence? 224s when enforced style is template 224s #correctable_sequence? 224s supports dynamic string with interpolation 224s detects when the cop must be disabled to avoid offenses 224s configures the enforced style to template after inspecting "%{a}" 224s does not register offenses for annotated style 224s behaves like maximum allowed unannotated 224s when MaxUnannotatedPlaceholdersAllowed is 1 224s does not register offenses for dual unannotated 224s does not register offenses for single unannotated 224s when MaxUnannotatedPlaceholdersAllowed is 2 224s does not register offenses for single unannotated 224s does not register offenses for dual unannotated 224s when enforced style is annotated 224s sets the enforced style to annotated after inspecting "%s" 224s supports dynamic string with interpolation 224s detects when the cop must be disabled to avoid offenses 224s #correctable_sequence? 224s registers offenses for template style 224s behaves like maximum allowed unannotated 224s when MaxUnannotatedPlaceholdersAllowed is 1 224s does not register offenses for single unannotated 224s registers offense for dual unannotated 224s when MaxUnannotatedPlaceholdersAllowed is 2 224s does not register offenses for single unannotated 224s does not register offenses for dual unannotated 224s behaves like enforced styles for format string tokens 224s when enforced style is template 224s configures the enforced style to template after inspecting "%{a}" 224s detects when the cop must be disabled to avoid offenses 224s supports dynamic string with interpolation 224s does not register offenses for annotated style 224s #correctable_sequence? 224s behaves like maximum allowed unannotated 224s when MaxUnannotatedPlaceholdersAllowed is 2 224s does not register offenses for dual unannotated 224s does not register offenses for single unannotated 224s when MaxUnannotatedPlaceholdersAllowed is 1 224s does not register offenses for single unannotated 224s does not register offenses for dual unannotated 224s when enforced style is unannotated 224s #correctable_sequence? 224s when enforced style is annotated 224s registers offenses for template style 224s detects when the cop must be disabled to avoid offenses 224s supports dynamic string with interpolation 224s sets the enforced style to annotated after inspecting "%s" 224s #correctable_sequence? 224s behaves like maximum allowed unannotated 224s when MaxUnannotatedPlaceholdersAllowed is 2 224s does not register offenses for single unannotated 224s does not register offenses for dual unannotated 224s when MaxUnannotatedPlaceholdersAllowed is 1 224s does not register offenses for single unannotated 224s registers offense for dual unannotated 224s behaves like enforced styles for format string tokens 224s when enforced style is annotated 224s sets the enforced style to annotated after inspecting "%s" 224s #correctable_sequence? 224s registers offenses for template style 224s supports dynamic string with interpolation 224s detects when the cop must be disabled to avoid offenses 224s behaves like maximum allowed unannotated 224s when MaxUnannotatedPlaceholdersAllowed is 1 224s does not register offenses for single unannotated 224s registers offense for dual unannotated 224s when MaxUnannotatedPlaceholdersAllowed is 2 224s does not register offenses for dual unannotated 224s does not register offenses for single unannotated 224s when enforced style is unannotated 224s #correctable_sequence? 224s when enforced style is template 224s supports dynamic string with interpolation 224s #correctable_sequence? 224s does not register offenses for annotated style 224s configures the enforced style to template after inspecting "%{a}" 224s detects when the cop must be disabled to avoid offenses 224s behaves like maximum allowed unannotated 224s when MaxUnannotatedPlaceholdersAllowed is 2 224s does not register offenses for single unannotated 224s does not register offenses for dual unannotated 224s when MaxUnannotatedPlaceholdersAllowed is 1 224s does not register offenses for single unannotated 224s does not register offenses for dual unannotated 224s behaves like enforced styles for format string tokens 224s when enforced style is template 224s #correctable_sequence? 224s configures the enforced style to template after inspecting "%{a}" 224s detects when the cop must be disabled to avoid offenses 224s does not register offenses for annotated style 224s supports dynamic string with interpolation 224s behaves like maximum allowed unannotated 224s when MaxUnannotatedPlaceholdersAllowed is 1 224s does not register offenses for single unannotated 224s does not register offenses for dual unannotated 224s when MaxUnannotatedPlaceholdersAllowed is 2 224s does not register offenses for dual unannotated 224s does not register offenses for single unannotated 224s when enforced style is unannotated 224s #correctable_sequence? 224s when enforced style is annotated 224s registers offenses for template style 224s supports dynamic string with interpolation 224s #correctable_sequence? 224s detects when the cop must be disabled to avoid offenses 224s sets the enforced style to annotated after inspecting "%s" 224s behaves like maximum allowed unannotated 224s when MaxUnannotatedPlaceholdersAllowed is 2 224s does not register offenses for single unannotated 224s does not register offenses for dual unannotated 224s when MaxUnannotatedPlaceholdersAllowed is 1 224s does not register offenses for single unannotated 224s registers offense for dual unannotated 224s behaves like enforced styles for format string tokens 224s when enforced style is unannotated 224s #correctable_sequence? 224s when enforced style is annotated 224s supports dynamic string with interpolation 224s registers offenses for template style 224s #correctable_sequence? 224s sets the enforced style to annotated after inspecting "%s" 224s detects when the cop must be disabled to avoid offenses 224s behaves like maximum allowed unannotated 224s when MaxUnannotatedPlaceholdersAllowed is 2 224s does not register offenses for single unannotated 224s does not register offenses for dual unannotated 224s when MaxUnannotatedPlaceholdersAllowed is 1 224s does not register offenses for single unannotated 224s registers offense for dual unannotated 224s when enforced style is template 224s supports dynamic string with interpolation 224s configures the enforced style to template after inspecting "%{a}" 224s #correctable_sequence? 224s detects when the cop must be disabled to avoid offenses 224s does not register offenses for annotated style 224s behaves like maximum allowed unannotated 224s when MaxUnannotatedPlaceholdersAllowed is 1 224s does not register offenses for single unannotated 224s does not register offenses for dual unannotated 224s when MaxUnannotatedPlaceholdersAllowed is 2 224s does not register offenses for dual unannotated 224s does not register offenses for single unannotated 224s when enforced style is unannotated 224s gives a helpful error message 224s behaves like enforced styles for format string tokens 224s when enforced style is template 224s #correctable_sequence? 224s detects when the cop must be disabled to avoid offenses 224s supports dynamic string with interpolation 224s configures the enforced style to template after inspecting "%{a}" 224s does not register offenses for annotated style 224s behaves like maximum allowed unannotated 224s when MaxUnannotatedPlaceholdersAllowed is 2 224s does not register offenses for dual unannotated 224s does not register offenses for single unannotated 224s when MaxUnannotatedPlaceholdersAllowed is 1 224s does not register offenses for single unannotated 224s does not register offenses for dual unannotated 224s when enforced style is unannotated 224s #correctable_sequence? 224s when enforced style is annotated 224s registers offenses for template style 224s sets the enforced style to annotated after inspecting "%s" 224s supports dynamic string with interpolation 224s #correctable_sequence? 224s detects when the cop must be disabled to avoid offenses 224s behaves like maximum allowed unannotated 224s when MaxUnannotatedPlaceholdersAllowed is 2 224s does not register offenses for single unannotated 224s does not register offenses for dual unannotated 224s when MaxUnannotatedPlaceholdersAllowed is 1 224s registers offense for dual unannotated 224s does not register offenses for single unannotated 224s behaves like enforced styles for format string tokens 224s when enforced style is unannotated 224s #correctable_sequence? 224s when enforced style is annotated 224s supports dynamic string with interpolation 224s detects when the cop must be disabled to avoid offenses 224s registers offenses for template style 224s #correctable_sequence? 224s sets the enforced style to annotated after inspecting "%s" 224s behaves like maximum allowed unannotated 224s when MaxUnannotatedPlaceholdersAllowed is 1 224s does not register offenses for single unannotated 224s registers offense for dual unannotated 224s when MaxUnannotatedPlaceholdersAllowed is 2 224s does not register offenses for single unannotated 224s does not register offenses for dual unannotated 224s when enforced style is template 224s supports dynamic string with interpolation 224s #correctable_sequence? 224s configures the enforced style to template after inspecting "%{a}" 224s registers offenses for annotated style 224s detects when the cop must be disabled to avoid offenses 224s behaves like maximum allowed unannotated 224s when MaxUnannotatedPlaceholdersAllowed is 1 224s does not register offenses for single unannotated 224s registers offense for dual unannotated 224s when MaxUnannotatedPlaceholdersAllowed is 2 224s does not register offenses for single unannotated 224s does not register offenses for dual unannotated 224s behaves like enforced styles for format string tokens 224s when enforced style is template 224s supports dynamic string with interpolation 224s #correctable_sequence? 224s configures the enforced style to template after inspecting "%{a}" 224s does not register offenses for annotated style 224s detects when the cop must be disabled to avoid offenses 224s behaves like maximum allowed unannotated 224s when MaxUnannotatedPlaceholdersAllowed is 2 224s does not register offenses for dual unannotated 224s does not register offenses for single unannotated 224s when MaxUnannotatedPlaceholdersAllowed is 1 224s does not register offenses for single unannotated 224s does not register offenses for dual unannotated 224s when enforced style is annotated 224s sets the enforced style to annotated after inspecting "%s" 224s #correctable_sequence? 224s supports dynamic string with interpolation 224s detects when the cop must be disabled to avoid offenses 224s registers offenses for template style 224s behaves like maximum allowed unannotated 224s when MaxUnannotatedPlaceholdersAllowed is 2 224s does not register offenses for dual unannotated 224s does not register offenses for single unannotated 224s when MaxUnannotatedPlaceholdersAllowed is 1 224s does not register offenses for single unannotated 224s registers offense for dual unannotated 224s when enforced style is unannotated 224s #correctable_sequence? 224s behaves like enforced styles for format string tokens 224s when enforced style is annotated 224s sets the enforced style to annotated after inspecting "%s" 224s detects when the cop must be disabled to avoid offenses 224s #correctable_sequence? 224s registers offenses for template style 224s supports dynamic string with interpolation 224s behaves like maximum allowed unannotated 224s when MaxUnannotatedPlaceholdersAllowed is 1 224s registers offense for dual unannotated 224s does not register offenses for single unannotated 224s when MaxUnannotatedPlaceholdersAllowed is 2 224s does not register offenses for dual unannotated 224s does not register offenses for single unannotated 224s when enforced style is template 224s configures the enforced style to template after inspecting "%{a}" 224s #correctable_sequence? 224s does not register offenses for annotated style 224s detects when the cop must be disabled to avoid offenses 224s supports dynamic string with interpolation 224s behaves like maximum allowed unannotated 224s when MaxUnannotatedPlaceholdersAllowed is 2 224s does not register offenses for single unannotated 224s does not register offenses for dual unannotated 224s when MaxUnannotatedPlaceholdersAllowed is 1 224s does not register offenses for single unannotated 224s does not register offenses for dual unannotated 224s when enforced style is unannotated 224s #correctable_sequence? 224s behaves like enforced styles for format string tokens 224s when enforced style is template 224s configures the enforced style to template after inspecting "%{a}" 224s #correctable_sequence? 224s does not register offenses for annotated style 224s detects when the cop must be disabled to avoid offenses 224s supports dynamic string with interpolation 224s behaves like maximum allowed unannotated 224s when MaxUnannotatedPlaceholdersAllowed is 1 224s does not register offenses for dual unannotated 224s does not register offenses for single unannotated 224s when MaxUnannotatedPlaceholdersAllowed is 2 224s does not register offenses for single unannotated 224s does not register offenses for dual unannotated 224s when enforced style is unannotated 224s #correctable_sequence? 224s when enforced style is annotated 224s registers offenses for template style 224s sets the enforced style to annotated after inspecting "%s" 224s supports dynamic string with interpolation 224s detects when the cop must be disabled to avoid offenses 224s #correctable_sequence? 224s behaves like maximum allowed unannotated 224s when MaxUnannotatedPlaceholdersAllowed is 2 224s does not register offenses for single unannotated 224s does not register offenses for dual unannotated 224s when MaxUnannotatedPlaceholdersAllowed is 1 224s does not register offenses for single unannotated 224s registers offense for dual unannotated 224s behaves like enforced styles for format string tokens 224s when enforced style is annotated 224s registers offenses for template style 224s sets the enforced style to annotated after inspecting "%s" 224s supports dynamic string with interpolation 224s detects when the cop must be disabled to avoid offenses 224s #correctable_sequence? 224s behaves like maximum allowed unannotated 224s when MaxUnannotatedPlaceholdersAllowed is 1 224s registers offense for dual unannotated 224s does not register offenses for single unannotated 224s when MaxUnannotatedPlaceholdersAllowed is 2 224s does not register offenses for dual unannotated 224s does not register offenses for single unannotated 224s when enforced style is template 224s #correctable_sequence? 224s supports dynamic string with interpolation 224s does not register offenses for annotated style 224s configures the enforced style to template after inspecting "%{a}" 224s detects when the cop must be disabled to avoid offenses 224s behaves like maximum allowed unannotated 224s when MaxUnannotatedPlaceholdersAllowed is 1 224s does not register offenses for dual unannotated 224s does not register offenses for single unannotated 224s when MaxUnannotatedPlaceholdersAllowed is 2 224s does not register offenses for single unannotated 224s does not register offenses for dual unannotated 224s when enforced style is unannotated 224s #correctable_sequence? 224s when enforced style is annotated 224s gives a helpful error message 224s when AllowedPatterns is enabled 224s registers an offense for different method call within ignored method 224s does not register an offense 224s does not register an offense for value in nested structure 224s when AllowedPatterns is disabled 224s registers an offense 224s when AllowedMethods is disabled 224s registers an offense 224s when AllowedMethods is enabled 224s does not register an offense for value in nested structure 224s registers an offense for different method call within ignored method 224s does not register an offense 224s when enforced style is template 224s gives a helpful error message 224s behaves like enforced styles for format string tokens 224s when enforced style is template 224s detects when the cop must be disabled to avoid offenses 224s supports dynamic string with interpolation 224s #correctable_sequence? 224s does not register offenses for annotated style 224s configures the enforced style to template after inspecting "%{a}" 224s behaves like maximum allowed unannotated 224s when MaxUnannotatedPlaceholdersAllowed is 1 224s does not register offenses for dual unannotated 224s does not register offenses for single unannotated 224s when MaxUnannotatedPlaceholdersAllowed is 2 224s does not register offenses for single unannotated 224s does not register offenses for dual unannotated 224s when enforced style is annotated 224s sets the enforced style to annotated after inspecting "%s" 224s #correctable_sequence? 224s registers offenses for template style 224s detects when the cop must be disabled to avoid offenses 224s supports dynamic string with interpolation 224s behaves like maximum allowed unannotated 224s when MaxUnannotatedPlaceholdersAllowed is 2 224s does not register offenses for single unannotated 224s does not register offenses for dual unannotated 224s when MaxUnannotatedPlaceholdersAllowed is 1 224s registers offense for dual unannotated 224s does not register offenses for single unannotated 224s when enforced style is unannotated 224s #correctable_sequence? 224s behaves like enforced styles for format string tokens 224s when enforced style is unannotated 224s #correctable_sequence? 224s when enforced style is annotated 224s #correctable_sequence? 224s detects when the cop must be disabled to avoid offenses 224s sets the enforced style to annotated after inspecting "%s" 224s registers offenses for template style 224s supports dynamic string with interpolation 224s behaves like maximum allowed unannotated 224s when MaxUnannotatedPlaceholdersAllowed is 1 224s registers offense for dual unannotated 224s does not register offenses for single unannotated 224s when MaxUnannotatedPlaceholdersAllowed is 2 224s does not register offenses for single unannotated 224s does not register offenses for dual unannotated 224s when enforced style is template 224s supports dynamic string with interpolation 224s configures the enforced style to template after inspecting "%{a}" 224s #correctable_sequence? 224s detects when the cop must be disabled to avoid offenses 224s does not register offenses for annotated style 224s behaves like maximum allowed unannotated 224s when MaxUnannotatedPlaceholdersAllowed is 1 224s does not register offenses for single unannotated 224s does not register offenses for dual unannotated 224s when MaxUnannotatedPlaceholdersAllowed is 2 224s does not register offenses for dual unannotated 224s does not register offenses for single unannotated 224s 224s RuboCop::Cop::Style::RedundantSelfAssignmentBranch 224s registers and corrects an offense when self-assigning redundant if branch 224s does not register an offense when self-assigning redundant else branch and multiline if branch 224s does not register an offense when self-assigning redundant else ternary branch for ivar 224s does not register an offense when multi assignment 224s registers and corrects an offense when self-assigning redundant else branch and empty else branch 224s does not register an offense when lhs is not variable 224s registers and corrects an offense when self-assigning redundant else ternary branch 224s registers and corrects an offense when self-assigning redundant else branch 224s does not register an offense when using only if branch 224s does not register an offense when self-assigning redundant else ternary branch for gvar 224s does not register an offense when using `elsif` and self-assigning the value of `else` branch 224s registers and corrects an offense when self-assigning redundant else branch and empty if branch 224s does not register an offense when self-assigning redundant else branch and multiline else branch 224s does not register an offense when using `elsif` and self-assigning the value of `elsif` branch 224s does not register an offense when not self-assigning redundant branches 224s does not register an offense when using `elsif` and self-assigning the value of `then` branch 224s does not register an offense when self-assigning redundant else ternary branch for cvar 224s registers and corrects an offense when self-assigning redundant if ternary branch 224s 224s RuboCop::Cop::Style::RescueStandardError 224s implicit 224s accepts rescue modifier 224s when rescuing in a method definition 224s accepts rescuing a single error other than StandardError, assigned to a variable 224s accepts rescuing StandardError with other errors 224s accepts rescuing no error class, assigned to a variable 224s accepts rescuing a single error other than StandardError 224s accepts rescuing no error class 224s accepts rescuing StandardError with other errors, assigned to a variable 224s when rescuing StandardError by itself 224s registers an offense 224s when the error is assigned to a variable 224s registers an offense 224s when rescuing in a begin block 224s accepts rescuing a single error class other than StandardError 224s accepts rescuing no error class, assigned to a variable 224s accepts rescuing StandardError with other errors 224s accepts rescuing a single error class other than StandardError, assigned to a variable 224s accepts rescuing no error class 224s accepts rescuing StandardError with other errors, assigned to a variable 224s accepts rescuing ::StandardError with other errors 224s when rescuing StandardError by itself 224s registers an offense 224s when the error is assigned to a variable 224s registers an offense 224s with ::StandardError 224s registers an offense 224s with ::StandardError 224s registers an offense 224s explicit 224s accepts rescue modifier 224s when rescuing in a method definition 224s accepts rescuing StandardError by itself 224s accepts rescuing StandardError with other errors, assigned to a variable 224s accepts rescuing a single error other than StandardError, assigned to a variable 224s accepts rescuing StandardError by itself, assigned to a variable 224s accepts rescuing a single error other than StandardError 224s accepts rescuing StandardError with other errors 224s when the error is assigned to a variable 224s registers an offense 224s when rescue is called without an error class 224s registers an offense 224s when rescuing in a begin block 224s accepts rescuing StandardError by itself, assigned to a variable 224s accepts rescuing a single error other than StandardError 224s accepts rescuing a single error other than StandardErrorassigned to a variable 224s accepts rescuing StandardError with other errors, assigned to a variable 224s accepts rescuing StandardError with other errors 224s accepts rescuing StandardError by itself 224s when calling rescue without an error class 224s registers an offense 224s when the error is assigned to a variable 224s registers an offense 224s 224s RuboCop::Cop::Style::EndlessMethod 224s Ruby >= 3.0 224s EnforcedStyle: allow_single_line 224s registers an offense and corrects for a multiline endless method with begin 224s does not register an offense for an endless method 224s registers an offense and corrects for a multiline endless method with arguments 224s registers an offense and corrects for a multiline endless method 224s does not register an offense for an endless method with arguments 224s EnforcedStyle: allow_always 224s does not register an offense for a multiline endless method 224s does not register an offense for a multiline endless method with arguments 224s does not register an offense for an endless method with arguments 224s does not register an offense for a multiline endless method with begin 224s does not register an offense for an endless method 224s EnforcedStyle: disallow 224s registers an offense for an endless method 224s registers an offense for an endless method with arguments 224s 224s RuboCop::Cop::Layout::EmptyLinesAroundAttributeAccessor 224s accepts code that separates an attribute accessor from the code with a newline 224s accepts code when used in class definition 224s accepts code that separates attribute accessors from the code with a newline 224s registers an offense and corrects for code that immediately follows accessor 225s registers an offense and corrects for code that immediately follows accessor with comment 225s registers an offense and corrects for some attribute accessors and comment line 225s accepts code that separates attribute accessors from the code and comment line with a newline 225s registers an offense and corrects for an attribute accessor and some comment line 225s accepts code when attribute method is method chained 225s accepts code that where the attr_accessor is the last line 225s registers an offense and corrects for an attribute accessor and `rubocop:disable` comment line 225s registers an offense and corrects for an attribute accessor and `rubocop:enable` comment line 225s accepts code that separates an attribute accessor from the code and `rubocop:enable` comment line with a newline 225s registers an offense and corrects for an attribute accessor and comment line 225s registers an offense and corrects for an attribute accessor and `rubocop:enable` comment line and other comment 225s does not register an offense and corrects when using `if` ... `else` branches 225s when `AllowedMethods: []` 225s registers an offense for code that immediately ignored methods after accessor 225s when `AllowAliasSyntax: false` 225s registers an offense for code that immediately `alias` syntax after accessor 225s when `AllowedMethods: private` 225s does not register an offense for code that immediately ignored methods after accessor 225s when `AllowAliasSyntax: true` 225s does not register an offense for code that immediately `alias` syntax after accessor 225s 225s RuboCop::Cop::Lint::UnexpectedBlockArity 225s registers multiple offenses 225s with a numblock 225s when given three parameters 225s does not register an offense 225s with no receiver 225s does not register an offense 225s when given no parameters 225s registers an offense 225s when given two parameters 225s does not register an offense 225s when using enough parameters, but not all explicitly 225s does not register an offense 225s when given one parameter 225s registers an offense 225s with a block 225s with no receiver 225s does not register an offense 225s when given two parameters 225s does not register an offense 225s with a keyword splat 225s registers an offense 225s when given no parameters 225s registers an offense 225s with keyword args 225s registers an offense 225s with shadow args 225s registers an offense 225s with optargs 225s with arity 2 225s does not register an offense 225s with arity 1 225s registers an offense 225s when destructuring 225s with arity 2 225s does not register an offense 225s with arity 1 225s registers an offense 225s when given one parameter 225s registers an offense 225s when given a splat parameter 225s does not register an offense 225s when given three parameters 225s does not register an offense 225s 225s RuboCop::Cop::Lint::RedundantWithObject 225s registers an offense and corrects when using ary.each_with_object([]) do-end block 225s registers an offense and corrects when using `ary.each.with_object([]) { |v| v }` 225s registers an offense and corrects when using ary.each_with_object do-end block without parentheses 225s registers an offense and corrects when using `ary.each_with_object { |v| v }` 225s an object is used as a block argument 225s Ruby 2.7 225s registers an offense and corrects when using `ary.each_with_object { _1 }` 225s registers an offense and corrects when using `ary.each.with_object([]) { _1 }` 225s when missing argument to `each_with_object` 225s does not register an offense when block has 1 argument 225s does not register an offense when block has 2 arguments 225s 225s RuboCop::Cop::Layout::SpaceInsideBlockBraces 225s registers an offense and corrects both left and right brace without inner space after success 225s accepts left brace without outer space 225s register offenses and correct both braces without inner space 225s accepts braces surrounded by spaces 225s registers an offense and corrects left brace without inner space 225s registers an offense and corrects right brace without inner space 225s with passed in parameters 225s accepts new lambda syntax 225s for multi-line blocks 225s registers an offense and corrects left brace without inner space 225s accepts left brace with inner space 225s and BlockDelimiters cop enabled 225s registers an offense and corrects multi-line blocks 225s registers an offense and corrects for single-line blocks 225s for single-line blocks 225s accepts left brace with inner space 225s registers an offense and corrects left brace without inner space 225s and space before block parameters not allowed 225s registers an offense and corrects left brace with inner space 225s accepts left brace without inner space 225s accepts new lambda syntax 225s with space inside empty braces allowed 225s registers an offense and corrects empty braces with no space inside 225s accepts empty braces with space inside 225s with space inside empty braces not allowed 225s accepts empty braces with line break inside 225s accepts empty braces with no space inside 225s accepts empty braces with comment and line break inside 225s registers an offense and corrects empty braces with space inside 225s accepts multiline braces with content 225s accepts braces with something inside 225s accepts braces that are not empty 225s with invalid value for EnforcedStyleForEmptyBraces 225s fails with an error 225s Ruby >= 2.7 225s registers an offense for numblocks without inner space 225s configured with no_space 225s registers an offense and corrects both left and right brace with inner space after success 225s accepts braces without spaces inside 225s registers an offense and corrects left brace with inner space 225s registers an offense and corrects right brace with inner space 225s accepts left brace without outer space 225s with passed in parameters 225s and space before block parameters allowed 225s accepts new lambda syntax 225s registers an offense and corrects left brace without inner space 225s accepts left brace with inner space 225s and space before block parameters not allowed 225s registers an offense when braces are not aligned in multiline block 225s registers an offense when braces are not aligned in multiline block with bracket 225s accepts when braces are aligned in multiline block 225s accepts new lambda syntax 225s accepts when braces are aligned in multiline block with bracket 225s registers an offense and corrects left brace with inner space 225s 225s RuboCop::Cop::Layout::SpaceInsideReferenceBrackets 225s when EnforcedStyle is space 225s accepts an array as a reference object 225s registers an offense and corrects when a reference bracket is assigned by another reference bracket with no trailing whitespace 225s registers an offense and correct third ref brackets with no trailing whitespace 225s registers an offense and corrects third ref brackets with no leading whitespace 225s registers an offense and corrects ref brackets with no leading whitespace 225s registers an offense and corrects when a reference bracket with no trailing whitespace is assigned by another reference bracket 225s accepts square brackets called with method call syntax 225s accepts spaces in array brackets 225s registers and corrects multiple offenses in one set of ref brackets 225s accepts square brackets as method name 225s registers an offense and corrects ref brackets with no trailing whitespace 225s registers an offense and corrects second ref brackets with no leading whitespace 225s does not register offense for array literals 225s does not register offense for ref bcts with spaces that assign 225s registers an offense and corrects second ref brackets with no trailing whitespace 225s registers an offense and corrects when a reference bracket with no leading whitespace is assigned by another reference bracket 225s registers and corrects multiple offenses for multiple sets of ref brackets 225s does not register offense for reference brackets with spaces 225s with space inside empty braces allowed 225s registers offense and corrects empty brackets with more than one space inside 225s accepts empty brackets with space inside 225s registers offense and corrects empty brackets with no space inside 225s registers offense and corrects empty brackets with newline inside 225s with space inside empty brackets not allowed 225s registers an offense and corrects empty brackets with 1 space inside 225s registers an offense and corrects empty brackets with multiple spaces inside 225s registers an offense and corrects empty brackets with newline inside 225s accepts empty brackets with no space inside 225s when EnforcedStyle is no_space 225s registers multiple offenses and corrects one set of ref brackets 225s registers multiple offenses and corrects multiple sets of ref brackets 225s registers an offense and corrects second ref brackets with trailing whitespace 225s does not register offense for non-empty brackets with newline inside 225s registers an offense and corrects second ref brackets with leading whitespace 225s does not register offense for array literals 225s registers an offense and corrects ref brackets with leading whitespace 225s registers an offense and corrects ref brackets with trailing whitespace 225s accepts an array as a reference object 225s accepts extra spacing in array brackets 225s accepts square brackets called with method call syntax 225s does not register offense for ref bcts with no spaces that assign 225s register and correct multiple offenses for multiple sets of ref brackets 225s registers an offense and corrects third ref brackets with trailing whitespace 225s registers an offense and corrects when a reference bracket with a trailing whitespace is assigned by another reference bracket 225s registers an offense and corrects when a reference bracket is assigned by another reference bracket with trailing whitespace 225s registers an offense and corrects when a reference bracket with a leading whitespace is assigned by another reference bracket 225s registers an offense and corrects third ref brackets with leading whitespace 225s does not register offense for reference brackets with no spaces 225s accepts square brackets as method name 225s registers an offense and corrects outer ref brackets 225s 225s RuboCop::Cop::Security::Open 225s registers an offense for open with string that starts with a pipe 225s accepts File.open as method 225s accepts open with prefix string literal plus something 225s registers an offense for `URI.open` with string that starts with a pipe 225s accepts open with no arguments 225s accepts open with string that has a prefixed interpolation 225s registers an offense for open 225s registers an offense for `::URI.open` with string that starts with a pipe 225s accepts open with a literal string starting with a pipe 225s accepts open on a literal string 225s registers an offense for open with dynamic string that is not prefixed 225s registers an offense for open with a block 225s accepts open with a string that interpolates a literal 225s accepts open as variable 225s registers an offense for open with mode argument 225s registers an offense for `URI.open` with a block 225s 225s RuboCop::Cop::Style::RedundantInterpolation 225s registers an offense for "#@var" 225s registers an offense for "#{1 + 1; 2 + 2}" 225s registers an offense for "#$+" 225s accepts strings implicitly concatenated with a later string 225s registers an offense for "#{1 + 1}" 225s registers an offense for "#{@var}" 225s accepts strings that are part of a %W() 225s registers an offense for "#{@@var}" 225s registers an offense for "#{$1}" 225s registers an offense for "#{number}" 225s registers an offense for ["#{@var}"] 225s accepts strings with characters after the interpolation 225s accepts strings implicitly concatenated with an earlier string 225s registers an offense for "#$1" 225s registers an offense for "#@@var" 225s registers an offense for "#{$+}" 225s accepts strings with characters before the interpolation 225s registers an offense for "#{var}" 225s registers an offense for "#{do_something 42}" 225s registers an offense for "%Q(#{1 + 1})" 225s registers an offense for "#{do_something(42)}" 225s registers an offense for "#{$var}" 225s registers an offense for "#$var" 225s registers an offense for "%|#{1 + 1}|" 225s registers an offense for "#{foo.do_something 42}" 225s 225s RuboCop::Cop::Naming::BlockForwarding 225s when `EnforcedStyle: explicit 225s Ruby >= 3.1 225s registers and corrects an offense when using anonymous block forwarding 225s registers and corrects an offense when using anonymous block forwarding in singleton method 225s registers and corrects an offense when using `yield` in method body 225s does not register an offense when assigning the block arg 225s does not register an offense when using explicit block forwarding 225s registers and corrects an offense when using symbol proc argument in method body 225s registers and corrects and corrects an offense when using anonymous block forwarding without method body 225s does not register an offense when defining without block argument method 225s does not register an offense when using explicit block forwarding without method body 225s when `BlockForwardingName: proc 225s registers and corrects an offense when using anonymous block forwarding 225s when `BlockForwardingName: block` is already in use 225s registers and no corrects an offense when using anonymous block forwarding 225s when `EnforcedStyle: anonymous 225s Ruby >= 3.1 225s does not register an offense when assigning the block arg 225s does not register an offense when defining without block argument method 225s does not register an offense when using block argument as a variable 225s registers and corrects an offense when using explicit block forwarding 225s does not register an offense when defining kwarg with block args method 225s does not register an offense when defining kwoptarg with block args method 225s does not register an offense when using anonymous block forwarding 225s registers and corrects an offense when using explicit block forwarding without method definition parentheses 225s registers and corrects an offense when using `yield` in method body 225s registers and corrects an offense when using explicit block forwarding without method body 225s registers and corrects an offense when using symbol proc argument in method body 225s does not register an offense when defining no arguments method 225s registers and corrects an only explicit block forwarding when using multiple proc arguments 225s registers and corrects an offense when using explicit block forwarding in singleton method 225s does not register an offense when using anonymous block forwarding without method body 225s Ruby < 3.0 225s does not register an offense when not using anonymous block forwarding 225s 225s RuboCop::Cop::Style::HashExcept 225s does not register an offense when using `select` and comparing with `:key == lvar` 225s does not register an offense when using `reject` and `include?` 225s does not register an offense when not using key block argument` 225s does not register an offense when using `reject` and comparing with `:key != lvar` 225s does not register an offense when using `select` and comparing with `lvar == :key` 225s does not register an offense when not using block` 225s does not register an offense when using `Hash#except` 225s does not register an offense when using `reject` and comparing with `lvar != :key` 225s Ruby 3.0 or higher 225s does not register an offense when comparing with hash value 225s registers and corrects an offense when using `select` and comparing with `:sym != lvar` 225s does not register an offense when using `keep_if` and comparing with `lvar != :sym` 225s registers and corrects an offense when using `reject` and comparing with `:sym == lvar` 225s does not register an offense when using `delete_if` and comparing with `lvar == :sym` 225s does not register an offense when using `reject` and other than comparison by string and symbol using `==` 225s registers and corrects an offense when using `select` and comparing with `lvar != :sym` 225s registers and corrects an offense when using `reject` and comparing with `lvar == :sym` 225s registers and corrects an offense when using `filter` and comparing with `lvar != :sym` 225s registers and corrects an offense when using `reject` and other than comparison by string and symbol using `eql?` 225s registers and corrects an offense when using `reject` and comparing with `lvar == 'str'` 225s using `in?` 225s does not register offenses when using `reject` and calling `key.in?` method with symbol array 225s using `exclude?` 225s does not register offenses when using `reject` and calling `!exclude?` method with symbol array 225s using `include?` 225s registers and corrects an offense when using `reject` and calling `include?` method with dynamic string array 225s registers and corrects an offense when using `reject` and calling `include?` method with method call 225s does not register an offense when using `reject` and calling `include?` method with symbol array and second block value 225s registers and corrects an offense when using `reject` and calling `include?` method with variable 225s registers and corrects an offense when using `reject` and calling `include?` method with dynamic symbol array 225s registers and corrects an offense when using `select` and calling `!include?` method with symbol array 225s registers and corrects an offense when using `filter` and calling `!include?` method with symbol array 225s registers and corrects an offense when using `reject` and calling `include?` method with symbol array 225s when `AllCops/ActiveSupportExtensionsEnabled: true` 225s registers and corrects an offense when using `reject` and comparing with `lvar == :sym` 225s does not register an offense when comparing with hash value 225s registers and corrects an offense when using `reject` and comparing with `lvar == 'str'` 225s does not register an offense when using `delete_if` and comparing with `lvar == :sym` 225s registers and corrects an offense when using `select` and comparing with `lvar != :sym` 225s registers and corrects an offense when using `reject` and other than comparison by string and symbol using `eql?` 225s does not register an offense when using `keep_if` and comparing with `lvar != :sym` 225s does not register an offense when using `reject` and other than comparison by string and symbol using `==` 225s registers and corrects an offense when using `filter` and comparing with `lvar != :sym` 225s registers and corrects an offense when using `select` and comparing with `:sym != lvar` 225s registers and corrects an offense when using `reject` and comparing with `:sym == lvar` 225s using `include?` 225s registers and corrects an offense when using `reject` and calling `include?` method with symbol array 225s registers and corrects an offense when using `reject` and calling `include?` method with dynamic symbol array 225s registers and corrects an offense when using `reject` and calling `include?` method with variable 225s registers and corrects an offense when using `select` and calling `!include?` method with symbol array 225s registers and corrects an offense when using `filter` and calling `!include?` method with symbol array 225s registers and corrects an offense when using `reject` and calling `include?` method with dynamic string array 225s registers and corrects an offense when using `reject` and calling `include?` method with method call 225s using `exclude?` 225s does not register an offense when using `reject` and calling `exclude?` method with symbol array and second block value 225s registers and corrects an offense when using `reject` and calling `!exclude?` method with method call 225s registers and corrects an offense when using `reject` and calling `!exclude?` method with dynamic string array 225s registers and corrects an offense when using `select` and calling `exclude?` method with symbol array 225s registers and corrects an offense when using `reject` and calling `!exclude?` method with symbol array 225s registers and corrects an offense when using `reject` and calling `!exclude?` method with variable 225s registers and corrects an offense when using `reject` and calling `!exclude?` method with dynamic symbol array 225s registers and corrects an offense when using `filter` and calling `exclude?` method with symbol array 225s using `in?` 225s registers and corrects an offense when using `reject` and calling `key.in?` method with method call 225s does not register an offense when using `reject` and calling `in?` method with symbol array and second block value 225s registers and corrects an offense when using `select` and calling `!key.in?` method with symbol array 225s registers and corrects an offense when using `reject` and calling `key.in?` method with symbol array 225s registers and corrects an offense when using `reject` and calling `key.in?` method with variable 225s registers and corrects an offense when using `filter` and calling `!key.in?` method with symbol array 225s registers and corrects an offense when using `reject` and calling `key.in?` method with dynamic string array 225s registers and corrects an offense when using `reject` and calling `key.in?` method with dynamic symbol array 225s Ruby 2.7 or lower 225s does not register an offense when using `reject` and comparing with `:key == lvar` 225s does not register an offense when using `reject` and comparing with `lvar == :key` 225s does not register an offense when using `select` and comparing with `lvar != :key` 225s does not register an offense when using `select` and comparing with `:key != lvar` 225s 225s RuboCop::Formatter::OffenseCountFormatter 225s #file_finished 225s when no offenses are detected 225s does not add to offense_counts 225s when any offenses are detected 225s increments the count for the cop in offense_counts 225s #report_summary 225s when an offense is detected 225s shows the cop and the offense count 225s #finished 225s when there are many offenses 225s when --display-style-guide was given 225s shows links and sorts by offense count first and then by cop name 225s when --display-style-guide was not given 225s sorts by offense count first and then by cop name 225s when output tty is true 225s has a progress bar 225s 225s RuboCop::Cop::Naming::BinaryOperatorParameterName 225s does not register an offense for arg named other 225s registers an offense and corrects for `#+` when argument is not named other 225s registers an offense and corrects when argument is referenced in method body 225s does not register an offense for arg named _other 225s registers an offense and corrects for `#eql?` when argument is not named other 225s registers an offense and corrects for `#equal?` when argument is not named other 225s does not register an offense for non binary operators 225s does not register an offense for []= 225s does not register an offense for multibyte character method name 225s works properly even if the argument not surrounded with braces 225s does not register an offense for [] 225s does not register an offense for the match operator 225s does not register an offense for << 225s does not register an offense for === 225s registers an offense and corrects when assigned to argument in method body 225s 225s RuboCop::Cop::Style::MissingRespondToMissing 225s registers an offense when respond_to_missing? is not implemented 225s registers an offense respond_to_missing? is implemented as an instance method and method_missing is implemented as a class method 225s registers an offense respond_to_missing? is implemented as a class method and method_missing is implemented as an instance method 225s registers an offense when method_missing is implemented as a class methods 225s allows method_missing and respond_to_missing? implemented as instance methods 225s allows method_missing and respond_to_missing? when defined with inline access modifier and method_missing is not qualified by inline access modifier 225s allows method_missing and respond_to_missing? implemented as class methods 225s allows method_missing and respond_to_missing? when defined with inline access modifier 225s 225s RuboCop::Cop::InternalAffairs::RedundantContextConfigParameter 225s does not register an offense when not using `:config` 225s registers an offense when using `:config` parameter 225s does not register an offense when using `:ruby30` only 225s registers an offense when using `:config` parameter with other parameters 225s does not register an offense when using `:config` in other than `context` 225s 225s RuboCop::Cop::Layout::ClosingHeredocIndentation 225s accepts correctly indented closing heredoc when heredoc contents is after closing heredoc 225s does not register an offense for a << heredoc 225s accepts correctly indented closing heredoc when heredoc contents is before closing heredoc 225s accepts correctly indented closing heredoc 225s accepts correctly indented closing heredoc when aligned at the beginning of method definition and using `strip_indent` 225s registers an offense for incorrectly indented empty heredocs 225s does not register an offense for correctly indented empty heredocs 225s accepts correctly indented closing heredoc when aligned at the beginning of method definition and content is empty 225s accepts correctly indented closing heredoc when heredoc contents with blank line 225s registers an offense for bad indentation of a closing heredoc 225s accepts correctly indented closing heredoc when aligned at the beginning of method definition 225s 225s RuboCop::Cop::Lint::SelfAssignment 226s does not register an offense when using shorthand-or var assignment 226s does not register an offense when using local var assignment 226s registers an offense when using local var self-assignment 226s registers an offense when using multiple var self-assignment through array 226s registers an offense when using multiple var self-assignment 226s does not register an offense when using multiple var assignment through splat 226s registers an offense when using constant var self-assignment 226s does not register an offense when using multiple var assignment through method call 226s registers an offense when using shorthand-or var self-assignment 226s does not register an offense when using constant var assignment for constant from another scope 226s does not register an offense when using instance var assignment 226s registers an offense when using instance var self-assignment 226s registers an offense when using class var self-assignment 226s does not register an offense when using class var assignment 226s registers an offense when using shorthand-and var self-assignment 226s does not register an offense when using shorthand-and var assignment 226s registers an offense when using global var self-assignment 226s does not register an offense when using constant var or-assignment for constant from another scope 226s does not register an offense when using global var assignment 226s does not register an offense when using multiple var assignment 226s 226s RuboCop::Cop::Style::RedundantAssignment 226s accepts empty when nodes 226s does not register an offense when ensure block present 226s accepts empty method body 226s reports an offense for def ending with assignment and returning 226s accepts empty if body 226s when inside begin-end body 226s registers an offense and autocorrects 226s when rescue blocks present 226s registers an offense and autocorrects when inside function or rescue block 226s when inside a when-branch 226s registers an offense and autocorrects 226s when inside an if-branch 226s registers an offense and autocorrects 226s 226s RuboCop::Cop::Lint::UriRegexp 226s registers an offense and corrects using `URI.regexp` with argument 226s registers an offense and corrects using `::URI.regexp` with argument 226s does not register an offense when using `regexp` without receiver 226s does not register an offense when using `regexp` with variable receiver 226s registers an offense and corrects using `::URI.regexp` without argument 226s registers an offense and corrects using `URI.regexp` without argument 226s array argument 226s registers an offense and corrects using `URI.regexp` with %w arrays 226s registers an offense and corrects using `URI.regexp` with %i arrays 226s registers an offense and corrects using `URI.regexp` with literal arrays 226s 226s RuboCop::Formatter::EmacsStyleFormatter 226s #file_finished 226s displays parsable text 226s when the offense is marked as todo 226s prints [Todo] along with message 226s when the offense is automatically corrected 226s prints [Corrected] along with message 226s when the offense message contains a newline 226s strips newlines out of the error message 226s #finished 226s does not report summary 226s 226s RuboCop::Cop::Lint::PercentSymbolArray 226s detecting colons or commas in a %i/%I string 226s registers an offense and corrects when symbols contain colons and are comma separated 226s accepts likely false positive $, 226s registers an offense and corrects when there are no colons but one comma 226s registers an offense and corrects when one symbol has a colon but there are no commas 226s registers an offense and corrects when one symbol has a colon but there are no commas 226s registers an offense and corrects when symbols contain colons and are comma separated 226s accepts likely false positive $, 226s registers an offense and corrects when there are no colons but one comma 226s accepts tokens without colons or commas 226s accepts tokens without colons or commas 226s with binary encoded source 226s registers an offense and corrects when tokens contain quotes 226s accepts if tokens contain no quotes 226s 226s RuboCop::Cop::Style::IfWithSemicolon 226s can handle modifier conditionals 226s accepts without `else` branch 226s registers an offense and corrects for one line if/;/end 226s when elsif is present 226s accepts with `else` branch 226s accepts second elsif block 226s accepts without `else` branch 226s 226s RuboCop::Cop::Style::CommentedKeyword 226s does not register an offense for certain comments 226s registers an offense and corrects when commenting on the same line as `def` 226s registers an offense and corrects when commenting on the same line as `end` 226s accepts keyword letter sequences that are not keywords 226s does not register an offense if there are no comments after keywords 226s checks a long comment in less than one second 226s registers an offense and corrects for one-line cases 226s does not register an offense if AST contains # symbol 226s registers an offense and corrects when commenting after keyword with spaces 226s registers an offense and corrects when commenting on the same line as `begin` 226s registers an offense and corrects when commenting on indented keywords 226s registers an offense and corrects when commenting on the same line as `module` 226s registers an offense and corrects when commenting on the same line as `class` 226s 226s RuboCop::Cop::Migration::DepartmentName 226s when a disable comment contains an unexpected character for department name 226s accepts 226s when only department name has given 226s does not register an offense 226s when a disable comment has cop names with departments 226s accepts 226s when an unexpected disable comment format 226s does not register an offense 226s when a disable comment contains a plain comment 226s accepts 226s when todo/enable comments have cop names without departments 226s registers offenses and corrects 226s registers offenses and corrects when there is space around `:` 226s registers offenses and corrects when using a legacy cop name 226s 226s RuboCop::Cop::InternalAffairs::LocationLineEqualityComparison 226s registers an offense and corrects when using `source_range.first_line` 226s registers an offense and corrects when using `first_line` 226s registers and corrects an offense when comparing `#loc.line` with LHS and RHS 226s registers and corrects an offense when comparing `#loc.source_range` with LHS and RHS 226s registers an offense and corrects when using `loc.first_line` 226s does not register an offense when using `same_line?` 226s 226s RuboCop::Cop::Bundler::GemFilename 226s with EnforcedStyle set to `gems.rb` 226s with non-root Gemfile.lock file path 226s registers an offense 226s with Gemfile.lock file path 226s registers an offense 226s with non-root Gemfile file path 226s registers an offense 226s with Gemfile file path 226s registers an offense 226s with non-root gems.rb file path 226s does not register an offense 226s with non-root gems.locked file path 226s does not register an offense 226s with gems.rb file path 226s does not register an offense 226s with default configuration (EnforcedStyle => `Gemfile`) 226s with Gemfile file path 226s does not register an offense 226s with Gemfile.lock file path 226s does not register an offense 226s with gems.rb file path 226s registers an offense 226s with non-root Gemfile.lock file path 226s does not register an offense 226s with non-root gems.locked file path 226s registers an offense 226s with non-root gems.rb file path 226s registers an offense 226s with non-root Gemfile file path 226s does not register an offense 226s with gems.locked file path 226s registers an offense 226s 226s RuboCop::Cop::Layout::SpaceAroundBlockParameters 226s when EnforcedStyleInsidePipes is no_space 226s registers an offense and corrects a lambda for space before first parameter 226s registers an offense and corrects a lambda for space after the last parameter 226s accepts line break after closing pipe 226s registers an offense and corrects for space with parens 226s accepts a block with spaces in the right places 226s accepts a block with parameters but no body 226s registers an offense and corrects no space after closing pipe 226s registers an offense and corrects multiple spaces before parameter 226s registers an offense and corrects space after last parameter 226s skips lambda without args 226s skips lambda without parens 226s registers an offense and corrects all types of spacing issues 226s accepts a lambda with spaces in the right places 226s registers an offense and corrects space before first parameter 226s accepts a block parameter without preceding space 226s accepts block parameters with surrounding space that includes line breaks 226s registers an offense and corrects all types of spacing issues for a lambda 226s accepts an empty block 226s trailing comma 226s registers an offense for space after the last comma 226s registers an offense for space before and after the last comma 226s when EnforcedStyleInsidePipes is space 226s accepts a block with spaces in the right places 226s accepts line break after closing pipe 226s registers an offense and corrects extra space before first parameter 226s registers an offense and corrects multiple spaces after last parameter 226s registers an offense and corrects spacing in lambda args 226s registers an offense for no space before first parameter 226s accepts an empty block 226s registers an offense and corrects no space after closing pipe 226s registers an offense and corrects a lambda for multiple spacesafter last parameter 226s accepts a block parameter without preceding space 226s registers an offense and corrects block arguments inside Hash#each 226s registers an offense and corrects a lambda for extra spacebefore first parameter 226s skips lambda without args 226s accepts a block with parameters but no body 226s registers an offense and corrects missing space before first argument and after last argument 226s accepts a lambda with spaces in the right places 226s registers an offense and corrects multiple spaces before parameter 226s registers an offense and corrects no space after last parameter 226s registers an offense and corrects space with parens at middle 226s registers an offense and corrects a lambda for no space after last parameter 226s skips lambda without parens 226s registers an offense and corrects a lambda for no space before first parameter 226s trailing comma 226s registers an offense and corrects no space after the last comma 226s accepts space both before and after the last comma 226s accepts space after the last comma 226s 226s RuboCop::Cop::Layout::ElseAlignment 226s accepts a ternary if 226s with case 226s registers an offense for misaligned else 226s accepts correctly aligned case/when/else 226s accepts case without else 226s accepts else aligned with when but not with case 226s >= Ruby 2.7 226s with case match 226s accepts correctly aligned case/when/else 226s accepts correctly aligned empty else 226s registers an offense for misaligned else 226s accepts case match without else 226s with def/rescue/else/ensure/end 226s accepts a correctly aligned else 226s registers an offense for misaligned else 226s with if statement 226s registers an offense for misaligned else 226s accepts a correctly aligned if/elsif/else/end 226s accepts an if/else branches with rescue clauses 226s accepts indentation after else when if is on new line after assignment 226s accepts a one line if statement 226s registers an offense for misaligned elsif 226s for a file with byte order mark 226s accepts a correctly aligned if/elsif/else/end 226s with assignment 226s when alignment style is keyword by choice 226s and end is aligned with variable 226s registers an offense for an if 226s and end is aligned with keyword 226s accepts an if/else in assignment 226s accepts a while in assignment 226s accepts an if in assignment 226s accepts an until in assignment 226s accepts an if/else in assignment on next line 226s when alignment style is variable 226s and end is aligned with variable 226s accepts an if-else with end aligned with setter 226s accepts an if/else with chaining with a block after the end 226s accepts an if with end aligned with element assignment 226s accepts an if/else 226s accepts an if/else with chaining after the end 226s accepts an if-elsif-else with end aligned with setter 226s and end is aligned with keyword 226s registers an offense for an if 226s registers offenses for an if with setter 226s registers an offense for an if with element assignment 226s ensure/rescue/else in Block Argument 226s accepts a correctly aligned else 226s accepts a correctly aligned else with assignment 226s registers an offense for misaligned else 226s with begin/rescue/else/ensure/end 226s accepts a correctly aligned else 226s registers an offense for misaligned else 226s with def/rescue/else/end 226s registers an offense for misaligned else 226s accepts a correctly aligned else 226s with unless 226s registers an offense for misaligned else 226s accepts an empty unless 226s accepts a correctly aligned else in an otherwise empty unless 226s with def/defs 226s accepts an empty def body 226s accepts an empty defs body 226s when modifier and def are on the same line 226s accepts a correctly aligned body 226s registers an offense for else not aligned with private 226s 226s RuboCop::Cop::Naming::HeredocDelimiterNaming 226s when the delimiter contains non-letter characters 226s does not register an offense when delimiter contains an underscore 226s does not register an offense when delimiter contains a number 226s with a naked heredoc 226s registers an offense with a non-meaningful delimiter 226s does not register an offense with a meaningful delimiter 226s with a non-interpolated heredoc 226s when using single quoted delimiters 226s does not register an offense with a meaningful delimiter 226s registers an offense with a non-meaningful delimiter 226s when using non-word delimiters 226s registers an offense 226s when using back tick delimiters 226s registers an offense with a non-meaningful delimiter 226s does not register an offense with a meaningful delimiter 226s when using double quoted delimiters 226s does not register an offense with a meaningful delimiter 226s registers an offense with a non-meaningful delimiter 226s with multiple heredocs starting on the same line 226s registers an offense with a leading non-meaningful delimiter 226s registers an offense with a trailing non-meaningful delimiter 226s does not register an offense with meaningful delimiters 226s with a squiggly heredoc 226s registers an offense with a non-meaningful delimiter 226s does not register an offense with a meaningful delimiter 226s with an interpolated heredoc 226s registers an offense with a non-meaningful delimiter 226s does not register an offense with a meaningful delimiter 226s 226s RuboCop::Cop::Style::Attr 226s accepts attr when it does not take arguments 226s accepts attr when it has a receiver 226s registers offense for attr within module_eval 226s registers an offense attr 226s does not register offense for custom `attr` method 226s registers offense for attr within class_eval 226s autocorrects 226s attr to attr_reader 226s attr with multiple names to attr_reader 226s attr, false to attr_reader 226s attr :name, true to attr_accessor :name 226s 226s RuboCop::Cop::Style::InPatternThen 226s >= Ruby 2.7 226s accepts `;` separating statements in the body of `in` 226s registers an offense for `in b | c | d;` (alternative pattern) 226s registers an offense for `in b;` 226s registers an offense for `in b, c | d;` 226s registers an offense for `in b, c, d;` (array pattern) 226s when inspecting a case statement with an empty branch 226s does not register an offense 226s 226s RuboCop::Cop::Style::WordArray 226s when EnforcedStyle is percent 226s registers an offense for an array with comments outside of it 226s does not register an offense for array of non-words 226s autocorrects an array of words in multiple lines 226s does not register an offense for array starting with %w 226s doesn't fail in wacky ways when multiple cop instances are used 226s detects when the cop must be disabled to avoid offenses 226s autocorrects an array of words using partial newlines 226s does not register an offense for a %w() array containing non word characters 226s detects right value of MinSize to use for --auto-gen-config 226s does not register an offense for an array with comments in it 226s autocorrects an array with one element 226s registers an offense for arrays of double quoted strings 226s registers an offense for strings with newline and tab escapes 226s registers an offense for arrays of strings containing hyphens 226s uses %W when autocorrecting strings with embedded newlines and tabs 226s does not register an offense on non-word strings 226s does not register offense for array with allowed number of strings 226s does not register an offense for array containing non-string 226s autocorrects an array of words 226s registers an offense for arrays of single quoted strings 226s autocorrects an array of words and character constants 226s does not register an offense for array with empty strings 226s registers an offense in a non-ambiguous block context 226s keeps the line breaks in place after autocorrect 226s registers an offense for a %w() array containing spaces 226s registers an offense for arrays with character constants 226s corrects properly when there is an extra trailing comma 226s when the default external encoding is US-ASCII 226s registers an offense for arrays of unicode word characters 226s when the default external encoding is UTF-8 226s registers an offense for arrays of unicode word characters 226s with non-default MinSize 226s does not autocorrect arrays of one symbol if MinSize > 1 226s when the WordRegex configuration is not a Regexp 226s still parses the code without raising an error 226s with a WordRegex configuration which accepts almost anything 226s uses %w for strings which only appear to have an escape 226s uses %W when autocorrecting strings with non-printable chars 226s when EnforcedStyle is array 226s autocorrects a %W() array which uses string interpolation 226s autocorrects a %W() array which uses escapes 226s does not register an offense for arrays of single quoted strings 226s does not register an offense for arrays of double quoted strings 226s autocorrects a %w() array which uses string with hyphen 226s does not register an offense for arrays of strings with spaces 226s does not register an offense for arrays of strings with hyphens 226s registers an offense for a %w() array 226s autocorrects a %w() array which uses single quotes 226s registers an offense for an empty %w() array 226s doesn't fail on strings which are not valid UTF-8 226s doesn't fail with `encoding: binary 226s autocorrects a %W() array which uses string with hyphen 226s autocorrects multiline %w() array 226s with a treacherous WordRegex configuration 226s doesn't break when words contain delimiters 226s doesn't break when words contain whitespace 226s when PreferredDelimiters is specified 226s autocorrects an array with delimiters 226s with a custom WordRegex configuration 226s registers an offense for arrays of email addresses 226s 226s RuboCop::Cop::Lint::AmbiguousRegexpLiteral 226s Ruby <= 2.7 226s with `match_with_lvasgn` node 226s without parentheses 226s registers an offense and corrects 226s with different parentheses 226s does not register an offense 226s with parentheses 226s does not register an offense 226s without parentheses 226s registers an offense and corrects when single argument 226s registers an offense and corrects when using nested method arguments without parentheses 226s registers an offense and corrects when sending method to regexp with argument 226s registers an offense and corrects when sending method chain to regexp 226s registers an offense and corrects when sending method without receiver takes a regexp argument 226s registers an offense and corrects when sending method inside parens without receiver takes a regexp argument 226s registers an offense and corrects when using regexp without method call in a nested structure 226s registers an offense and corrects when multiple arguments 226s registers an offense and corrects when using block argument 226s registers an offense and corrects when sending method to regexp without argument 226s registers an offense and corrects when nesting 226s with parentheses 226s accepts 226s Ruby >= 3.0 226s with `match_with_lvasgn` node 226s with parentheses 226s does not register an offense 226s without parentheses 226s registers an offense and corrects 226s with different parentheses 226s does not register an offense 226s with parentheses 226s accepts 226s without parentheses 226s registers an offense and corrects when single argument 226s registers an offense and corrects when sending method chain to regexp 226s registers an offense and corrects when sending method without receiver takes a regexp argument 226s registers an offense and corrects when sending method to regexp without argument 226s registers an offense and corrects when using block argument 226s registers an offense and corrects when multiple arguments 226s registers an offense and corrects when sending method to regexp with argument 226s registers an offense and corrects when nesting 226s registers an offense and corrects when sending method inside parens without receiver takes a regexp argument 226s registers an offense and corrects when using regexp without method call in a nested structure 226s registers an offense and corrects when using nested method arguments without parentheses 226s 226s RuboCop::Runner 226s how formatter is invoked 226s #finished 226s when RuboCop is interrupted by user 227s sends only processed file paths 227s when RuboCop finished inspecting all files normally 227s sends all file paths 227s the passed files paths 227s is frozen 227s #file_started 227s sends file specific information hash 227s sends a file path 227s the passed path 227s is frozen 227s #file_finished 227s sends a file path 228s sends an array of detected offenses for the file 228s the passed path 228s is frozen 228s #started 228s sends all file paths 228s the passed files paths 228s is frozen 228s invocation order 228s is called in the proper sequence 228s 228s RuboCop::Cop::Gemspec::RequireMFA 228s when the specification is blank 228s registers an offense and corrects 228s when the specification has a metadata hash but no rubygems_mfa_required key 228s registers an offense and corrects 228s with rubygems_mfa_required: false 228s registers an offense and corrects 228s when metadata is set by key assignment 228s and `rubygems_mfa_required` is not included 228s registers an offense 228s and `rubygems_mfa_required` is included 228s does not register an offense 228s when the gemspec is blank 228s does not register an offense 228s when there are other metadata keys 228s and `rubygems_mfa_required` is not included 228s registers an offense and corrects 228s and `rubygems_mfa_required` is included 228s does not register an offense 228s with rubygems_mfa_required: false by key access 228s registers an offense and corrects 228s when the specification has an non-hash metadata 228s registers an offense but does not correct 228s with rubygems_mfa_required: true 228s does not register an offense 228s 228s RuboCop::Cop::Style::ClassEqualityComparison 228s registers an offense and corrects when comparing `Module#name` for equality 228s registers an offense and corrects when comparing double quoted class name for equality 228s registers an offense and corrects when comparing class using `eql?` for equality 228s registers an offense and corrects when comparing class using `equal?` for equality 228s registers an offense and corrects when comparing class using `==` for equality 228s registers an offense and corrects when comparing single quoted class name for equality 228s does not register an offense when using `instance_of?` 228s with String comparison in module 228s registers and corrects an offense 228s with instance variable comparison in module 228s registers and corrects an offense 228s when AllowedPatterns is enabled 228s does not register an offense when comparing class for equality 228s when AllowedMethods is enabled 228s does not register an offense when comparing class for equality 228s 228s RuboCop::Cop::Lint::NonLocalExitFromIterator 228s allows return in define_method 228s allows return in define_singleton_method 228s allows return with value 228s when block is followed by method chain 228s and has single argument 228s registers an offense 228s and has multiple arguments 228s registers an offense 228s and has no argument 228s allows 228s when block is lambda 228s allows 228s when block in middle of nest is followed by method chain 228s registers offenses 228s when block is not followed by method chain 228s allows 228s when lambda is inside of block followed by method chain 228s allows 228s when the return is within a nested method definition 228s allows return in an instance method definition 228s allows return in a class method definition 228s 228s RuboCop::Cop::Layout::CommentIndentation 228s when allow_for_alignment is true 228s accepts comments with extra indentation if aligned with comment on previous line 228s registers offenses and corrects before __END__ but not after 228s registers an offense and corrects 228s on outer level 228s accepts a correctly indented comment 228s registers an offense and corrects a documentation comment 228s registers an offense and corrects an incorrectly indented (2) comment 228s registers an offense and corrects an incorrectly indented (1) comment 228s accepts a comment that follows code 228s registers an offense for each incorrectly indented comment 228s around program structure keywords 228s accepts correctly indented comments 228s with a blank line following the comment 228s accepts a correctly indented comment 228s near various kinds of brackets 228s accepts correctly indented comments 228s is unaffected by closing bracket that does not begin a line 228s when allow_for_alignment is false 228s registers an offense and corrects 228s registers an offense for comments with extra indentation 228s registers offenses and corrects before __END__ but not after 228s near various kinds of brackets 228s is unaffected by closing bracket that does not begin a line 228s accepts correctly indented comments 228s on outer level 228s registers an offense and corrects a documentation comment 228s registers an offense and corrects an incorrectly indented (2) comment 228s accepts a comment that follows code 228s registers an offense for each incorrectly indented comment 228s registers an offense and corrects an incorrectly indented (1) comment 228s accepts a correctly indented comment 228s around program structure keywords 228s accepts correctly indented comments 228s with a blank line following the comment 228s accepts a correctly indented comment 228s 228s RuboCop::Cop::Style::EvalWithLocation 228s registers an offense when using `#eval` without lineno 228s registers an offense when using `#class_eval` without any arguments 228s accepts `eval` with a heredoc, a filename and `__LINE__ + 1` 228s registers an offense when using `#instance_eval` without any arguments 228s registers an offense when using `Kernel.eval` without any arguments 228s accepts `eval` with a string, a filename and `__LINE__` 228s registers an offense when using `#eval` with a string on a new line 228s registers an offense when using `#eval` with `binding` only 228s registers an offense when using `module_eval` with improper arguments 228s accepts `eval` with a code that is a variable 228s registers an offense when using `#eval` without any arguments 228s registers an offense when using `eval` with improper arguments 228s registers an offense when using `class_eval` with improper arguments 228s accepts `eval` with a string, a filename and `__LINE__` on a new line 228s registers an offense when using `#eval` with an incorrect line number 228s registers an offense when using `#class_eval` with an incorrect lineno 228s does not register an offense if `eval` is called on another object 228s registers an offense when using `#eval` with a heredoc and an incorrect line number 228s registers an offense when using `#instance_eval` with a string argument in parentheses 228s registers an offense when using `instance_eval` with improper arguments 228s registers an offense when using `#module_eval` without any arguments 228s registers an offense when using `::Kernel.eval` without any arguments 228s registers an offense when using correct file argument but incorrect line 228s does not register an offense when using eval with block argument 228s 228s RuboCop::Cop::Style::SymbolLiteral 228s accepts string syntax when symbols have whitespaces in them 228s accepts string syntax when symbols have special chars in them 228s accepts string syntax when symbol start with a digit 228s registers an offense for word-line symbols using string syntax 228s 228s RuboCop::Formatter::Colorizable 228s #white 228s invokes #colorize(string, white 228s #cyan 228s invokes #colorize(string, cyan 228s #yellow 228s invokes #colorize(string, yellow 228s #colorize 228s when the global Rainbow.enabled is false 228s and the formatter's output is not a tty 228s does nothing 228s and the formatter's output is a tty 228s does nothing 228s when the global Rainbow.enabled is true 228s and the formatter's output is not a tty 228s does nothing 228s and output is not a tty, but --color option was provided 228s colorizes the passed string 228s and the formatter's output is a tty 228s colorizes the passed string 228s #green 228s invokes #colorize(string, green 228s #red 228s invokes #colorize(string, red 228s #black 228s invokes #colorize(string, black 228s #magenta 229s invokes #colorize(string, magenta 229s #blue 229s invokes #colorize(string, blue 229s 229s RuboCop::Cop::Lint::EmptyExpression 229s when used as an assignment 229s registers an offense for the assigned value 229s when used as a standalone expression 229s registers an offense 229s with nested empty expressions 229s registers an offense 229s when used in a condition 229s registers an offense inside `case` 229s registers an offense inside `elsif` 229s registers an offense inside `when` 229s registers an offense inside `if` 229s registers an offense in the return value of a ternary operator 229s registers an offense in the condition of a ternary operator 229s when used as a return value 229s registers an offense in the return value of a condition 229s registers an offense in the return value of a case statement 229s registers an offense in the return value of a method 229s 229s RuboCop::Cop::Style::BlockComments 229s autocorrects an empty block comment by removing it 229s registers an offense for block comments 229s autocorrects a block comment into a regular comment 229s accepts regular comments 229s autocorrects a block comment into a regular comment (without trailingnewline) 229s 229s RuboCop::Cop::Util 229s #line_range 229s returns line range of the expression 229s #same_line? 229s can use ranges 229s returns false when two nodes are not on the same line 229s returns true when two nodes are on the same line 229s returns false if an argument is not a node or range 229s #to_supported_styles 229s when EnforcedStyle 229s is expected to eq "SupportedStyles" 229s when EnforcedStyleInsidePipes 229s is expected to eq "SupportedStylesInsidePipes" 229s 229s RuboCop::Cop::Layout::LineContinuationLeadingSpace 229s EnforcedStyle: leading 229s registers offenses when 1st and 2nd line has trailing spaces 229s marks the correct range when string is a positional method argument 229s marks the correct range when string is a block method argument 229s registers offense in the right location when 1st line is not the string 229s registers an offense when 1st line has multiple trailing spaces 229s puts the offense message in correct position also on indented line 229s registers an offense when 1st line has one trailing space 229s interpolated strings 229s registers no offense for correctly formatted multiline interpolation 229s registers an offense for incorrectly formatted multiline interpolated string 229s registers no offense on interpolated string alone 229s registers no offense for correctly formatted multiline interpolated string 229s registers no offense on doubly interpolated string alone 229s registers offenses when 1st line has trailing spaces and 2nd line is interpolated 229s registers offenses when 1st line has leading spaces and 1st line is interpolated 229s EnforcedStyle: trailing 229s registers an offense when 2nd line has one leading space 229s registers an offense when 2nd line has multiple leading spaces 229s registers offense in the right location when 1st line is not the string 229s marks the correct range when string is a positional method argument 229s registers offenses when 2nd and 3rd line has leading spaces 229s marks the correct range when string is a block method argument 229s puts the offense message in correct position also on indented line 229s interpolated strings 229s registers no offense on interpolated string alone 229s registers no offense on doubly interpolated string alone 229s registers no offense for correctly formatted multiline interpolated string 229s registers an offense for incorrectly formatted multiline interpolated string 229s registers offenses when 2nd line has leading spaces and 1st line is interpolated 229s registers no offense for correctly formatted multiline interpolation 229s registers offenses when 2nd line has leading spaces and 2nd line is interpolated 229s 229s RuboCop::Cop::Lint::UselessAccessModifier 229s behaves like repeated visibility modifiers 229s registers an offense when `protected` is repeated 229s when a def is an argument to a method call 229s does not register an offense 229s behaves like at the end of the body 229s registers an offense for trailing `private` 229s when using ActiveSupport behavior when Rails is not eabled 229s reports offenses and corrects 229s behaves like methods defined in an iteration 229s doesn't register an offense for map 229s doesn't register an offense for each 229s behaves like nested in a begin..end block 229s doesn't flag an access modifier from surrounding scope 229s still flags repeated `private` 229s behaves like at the top of the body 229s doesn't register an offense for `private` 229s registers an offense and corrects for `public` 229s doesn't register an offense for `protected` 229s when private_class_method is used without arguments 229s registers an offense and corrects 229s behaves like def in new block 229s doesn't register an offense if a method is defined in Struct.new 229s registers an offense if no method is defined in Struct.new 229s behaves like method named by access modifier name 229s does not register an offense for `public` 229s behaves like nested modules 229s doesn't register an offense for nested classs 229s unused modifiers 229s registers an offense when outside a nested class 229s registers an offense with a nested class 229s registers an offense when inside a nested class 229s behaves like nested in a begin..end block 229s still flags repeated `protected` 229s doesn't flag an access modifier from surrounding scope 229s behaves like method defined on a singleton class 229s inside a class 229s registers an offense even if a non-singleton-class method is defined 229s doesn't register an offense if a method is defined 229s doesn't register an offense if the modifier is the same as outside the meta-class 229s registers an offense if no method is defined after the modifier 229s registers an offense if no method is defined 229s outside a class 229s registers an offense if no method is defined 229s doesn't register an offense if a method is defined 229s registers an offense if no method is defined after the modifier 229s behaves like method defined with define_method 229s doesn't register an offense if a lambda is passed 229s doesn't register an offense if a -> is passed 229s doesn't register an offense if a block is passed 229s doesn't register an offense if a proc is passed 229s behaves like at the end of the body 229s registers an offense for trailing `protected` 229s behaves like def in new block 229s doesn't register an offense if a method is defined in ::Struct.new 229s registers an offense if no method is defined in ::Struct.new 229s behaves like nested in a begin..end block 229s doesn't flag an access modifier from surrounding scope 229s still flags repeated `private` 229s when an access modifier is followed by attr_* 229s does not register an offense 229s when an access modifier has no effect 229s registers an offense and corrects 229s when class is empty save modifier 229s registers an offense and corrects 229s behaves like method defined with define_method 229s doesn't register an offense if a proc is passed 229s doesn't register an offense if a -> is passed 229s doesn't register an offense if a lambda is passed 229s doesn't register an offense if a block is passed 229s behaves like def in new block 229s registers an offense if no method is defined in ::Class.new 229s doesn't register an offense if a method is defined in ::Class.new 229s behaves like method named by access modifier name 229s does not register an offense for `protected` 229s behaves like methods defined in an iteration 229s doesn't register an offense for map 229s doesn't register an offense for each 229s behaves like conditionally defined method 229s doesn't register an offense for if 229s doesn't register an offense for unless 229s when using inline modifiers 229s does not register an offense 229s behaves like at the top of the body 229s registers an offense and corrects for `public` 229s doesn't register an offense for `protected` 229s doesn't register an offense for `private` 229s behaves like method named by access modifier name 229s does not register an offense for `private` 229s behaves like nested in a begin..end block 229s still flags repeated `public` 229s behaves like method defined using instance_eval 229s registers an offense if no method is defined 229s doesn't register an offense if a method is defined 229s inside a class 229s registers two offenses when a modifier is inside and outside the and no method is defined 229s registers an offense when a modifier is outside the block and a method is defined only inside the block 229s behaves like method defined using class_eval 229s registers an offense if no method is defined 229s doesn't register an offense if a method is defined 229s inside a class 229s registers an offense when a modifier is outside the block and a method is defined only inside the block 229s registers two offenses when a modifier is inside and outside the block and no method is defined 229s behaves like methods defined in an iteration 229s doesn't register an offense for map 229s doesn't register an offense for each 229s behaves like nested in a begin..end block 229s still flags repeated `public` 229s when using a known method-creating method 229s is aware that this creates a new method 229s still points out redundant uses within the module 229s behaves like method named by access modifier name 229s does not register an offense for `public` 229s behaves like method defined with define_method 229s doesn't register an offense if a proc is passed 229s doesn't register an offense if a lambda is passed 229s doesn't register an offense if a -> is passed 229s doesn't register an offense if a block is passed 229s behaves like def in new block 229s doesn't register an offense if a method is defined in Module.new 229s registers an offense if no method is defined in Module.new 229s behaves like methods defined in an iteration 229s doesn't register an offense for map 229s doesn't register an offense for each 229s behaves like method defined using instance_eval 229s doesn't register an offense if a method is defined 229s registers an offense if no method is defined 229s inside a class 229s registers an offense when a modifier is outside the block and a method is defined only inside the block 229s registers two offenses when a modifier is inside and outside the and no method is defined 229s when an access modifier has no methods 229s registers an offense and corrects 229s when multiple class definitions in file but only one has offense 229s registers an offense and corrects 229s behaves like nested modules 229s doesn't register an offense for nested modules 229s unused modifiers 229s registers an offense when outside a nested module 229s registers an offense with a nested module 229s registers an offense when inside a nested module 229s behaves like method named by access modifier name 229s does not register an offense for `protected` 229s behaves like def in new block 229s registers an offense if no method is defined in Module.new 229s doesn't register an offense if a method is defined in Module.new 229s behaves like repeated visibility modifiers 229s registers an offense when `private` is repeated 229s behaves like def in new block 229s registers an offense if no method is defined in ::Class.new 229s doesn't register an offense if a method is defined in ::Class.new 229s behaves like method defined using class_eval 229s registers an offense if no method is defined 229s doesn't register an offense if a method is defined 229s inside a class 229s registers two offenses when a modifier is inside and outside the block and no method is defined 229s registers an offense when a modifier is outside the block and a method is defined only inside the block 229s behaves like non-repeated visibility modifiers 229s doesn't register an offense when `protected` is not repeated 229s doesn't register an offense when `private` is not repeated 229s registers an offense and corrects even when `public` is not repeated 229s behaves like repeated visibility modifiers 229s registers an offense when `protected` is repeated 229s behaves like nested in a begin..end block 229s still flags repeated `protected` 229s doesn't flag an access modifier from surrounding scope 229s behaves like at the end of the body 229s registers an offense for trailing `public` 229s behaves like at the end of the body 229s registers an offense for trailing `private` 229s behaves like def in new block 229s doesn't register an offense if a method is defined in ::Module.new 229s registers an offense if no method is defined in ::Module.new 229s behaves like nested modules 229s doesn't register an offense for nested classs 229s unused modifiers 229s registers an offense when outside a nested class 229s registers an offense with a nested class 229s registers an offense when inside a nested class 229s behaves like at the end of the body 229s registers an offense for trailing `public` 229s when an access modifier is followed by a class method defined on constant 229s registers an offense and corrects 229s behaves like at the end of the body 229s registers an offense for trailing `protected` 229s behaves like non-repeated visibility modifiers 229s doesn't register an offense when `private` is not repeated 229s doesn't register an offense when `protected` is not repeated 229s registers an offense and corrects even when `public` is not repeated 229s behaves like repeated visibility modifiers 229s registers an offense when `private` is repeated 229s behaves like repeated visibility modifiers 229s registers an offense when `public` is repeated 229s behaves like def in new block 229s doesn't register an offense if a method is defined in Class.new 229s registers an offense if no method is defined in Class.new 229s when there are consecutive access modifiers 229s registers an offense and corrects 229s when using the class_methods method from ActiveSupport::Concern 229s is aware that this creates a new scope 229s behaves like def in new block 229s registers an offense if no method is defined in Class.new 229s doesn't register an offense if a method is defined in Class.new 229s behaves like method defined on a singleton class 229s outside a class 229s registers an offense if no method is defined after the modifier 229s registers an offense if no method is defined 229s doesn't register an offense if a method is defined 229s inside a class 229s registers an offense if no method is defined 229s registers an offense if no method is defined after the modifier 229s registers an offense even if a non-singleton-class method is defined 229s doesn't register an offense if a method is defined 229s doesn't register an offense if the modifier is the same as outside the meta-class 229s behaves like conditionally defined method 229s doesn't register an offense for if 229s doesn't register an offense for unless 229s behaves like def in new block 229s doesn't register an offense if a method is defined in ::Struct.new 229s registers an offense if no method is defined in ::Struct.new 229s when using ActiveSupport's `concerning` method 229s is aware that this creates a new scope 229s still points out redundant uses within the block 229s Ruby 2.7 229s still points out redundant uses within the block 229s behaves like def in new block 229s registers an offense if no method is defined in ::Module.new 229s doesn't register an offense if a method is defined in ::Module.new 229s behaves like repeated visibility modifiers 229s registers an offense when `public` is repeated 229s when passing method as symbol 229s does not register an offense 229s behaves like def in new block 229s registers an offense if no method is defined in Struct.new 229s doesn't register an offense if a method is defined in Struct.new 229s behaves like conditionally defined method 229s doesn't register an offense for unless 229s doesn't register an offense for if 229s behaves like method defined on a singleton class 229s outside a class 229s doesn't register an offense if a method is defined 229s registers an offense if no method is defined after the modifier 229s registers an offense if no method is defined 229s inside a class 229s doesn't register an offense if the modifier is the same as outside the meta-class 229s registers an offense if no method is defined 229s registers an offense even if a non-singleton-class method is defined 229s registers an offense if no method is defined after the modifier 229s doesn't register an offense if a method is defined 229s behaves like method defined with define_method 229s doesn't register an offense if a lambda is passed 229s doesn't register an offense if a block is passed 229s doesn't register an offense if a proc is passed 229s doesn't register an offense if a -> is passed 229s behaves like method defined on a singleton class 229s outside a class 229s registers an offense if no method is defined 229s doesn't register an offense if a method is defined 229s registers an offense if no method is defined after the modifier 229s inside a class 229s registers an offense if no method is defined after the modifier 229s registers an offense if no method is defined 229s doesn't register an offense if a method is defined 229s registers an offense even if a non-singleton-class method is defined 229s doesn't register an offense if the modifier is the same as outside the meta-class 229s behaves like nested modules 229s doesn't register an offense for nested modules 229s unused modifiers 229s registers an offense when outside a nested module 229s registers an offense when inside a nested module 229s registers an offense with a nested module 229s behaves like method named by access modifier name 229s does not register an offense for `private` 229s behaves like unused visibility modifiers 229s registers an offense and corrects when visibility is immediately changed without any intervening defs 229s when private_class_method is used with arguments 229s does not register an offense 229s behaves like unused visibility modifiers 229s registers an offense and corrects when visibility is immediately changed without any intervening defs 229s when only a constant or local variable is defined after the modifier 229s registers an offense and corrects 229s registers an offense and corrects 229s behaves like conditionally defined method 229s doesn't register an offense for if 229s doesn't register an offense for unless 229s 229s RuboCop::Cop::Style::EachForSimpleLoop 229s does not register offense for character range 229s does not register offense if range endpoint is not constant 229s does not register offense if range startpoint is not constant 229s when using an inclusive end range 229s does not register offense for range not starting with zero and using param 229s autocorrects the source with multiline block 229s autocorrects the source with inline block 229s autocorrects the range not starting with zero 229s with multiline block with parameters 229s autocorrects an offense 229s with inline block with parameters 229s autocorrects an offense 229s when using an exclusive end range 229s autocorrects the range not starting with zero 229s autocorrects the source with inline block 229s autocorrects the source with multiline block 229s does not register offense for range not starting with zero and using param 229s 229s RuboCop::Cop::Style::RedundantFileExtensionInRequire 229s registers an offense and corrects when requiring filename ending with `.rb` 229s does not register an offense when requiring filename without an extension 229s does not register an offense when requiring variable as a filename 229s does not register an offense when requiring filename ending with `.so` 229s 229s RuboCop::Cop::Layout::SpaceAfterColon 229s accepts required keyword arguments 229s accepts colons denoting required keyword argument 229s accepts colons in strings 229s accepts if 229s registers an offense and corrects a keyword optional argument without a space 229s accepts colons in symbols 229s accepts hashes with a space after colons 229s accepts colon in ternary followed by space 229s accepts hash rockets 229s registers an offense and corrects colon without space after it 229s Ruby >= 3.1 229s accepts colons denoting hash value omission argument 229s does not register an offense colon without space after it when using hash value omission 229s 229s RuboCop::Cop::Lint::FloatOutOfRange 229s does not register an offense for respectably sized floats 229s does not register an offense for 0.0 229s does not register an offense for tiny little itty bitty floats 229s on floats so close to zero that nobody can tell the difference 229s registers an offense 229s on whopping big floats which tip the scales 229s registers an offense 229s 229s RuboCop::Cop::Style::HashLikeCase 229s MinBranchesCount: 2 229s registers an offense when using `case-when` with symbol conditions and literal bodies of the same type 229s does not register an offense when using `case-when` with literal bodies of different types 229s does not register an offense when using `case-when` with non-literal bodies 229s registers an offense when using `case-when` with string conditions and literal bodies of the same type 229s does not register an offense when `case` has an `else` branch 229s does not register an offense when using `case-when` with non-literals in conditions 229s does not register an offense when using `case-when` with literals of different types as conditions 229s MinBranchesCount: 3 229s does not register an offense when branches count is less than required 229s 229s RuboCop::Cop::Lint::EmptyInPattern 229s when a `in` body is missing 229s registers an offense for missing `in` ... `then` body 229s registers an offense for a missing `in` body 229s registers an offense for missing `in` body with a comment followed by `else` 229s registers an offense for missing `in` body with a comment 229s registers an offense for missing `in` ... then `body` followed by `else` 229s registers an offense for missing `in` body followed by `else` 229s when a `in` body is present 229s accepts `case` with `in` ... `then` statements and else clause 229s accepts `case` with `in` bodies and `else` clause 229s accepts `case` with `in` ... `then` statements 229s accepts `case` with `in` bodies 229s when `AllowComments: true` 229s accepts an empty `in` body with a comment 229s registers an offense for empty `in` when comment is in another branch 229s when `AllowComments: false` 229s registers an offense for empty `in` body with a comment 229s 229s RuboCop::Formatter::PacmanFormatter 229s #next_step 229s when no offenses are detected 229s calls the step function with a dot 229s when a offense is detected in a file 229s calls the step function with a dot 229s #update_progress_line 229s when total_files less than columns in the terminal 229s updates the progress_line properly 229s when total_files is greater than columns in the terminal 229s updates the progress_line properly 229s when need to change the line 229s updates the progress_line properly 229s #step 229s character is ghost 229s removes the first • and puts a ghosts 229s character is Pacman 229s removes the first • and puts a ᗧ 229s character is normal dot 229s removes the first • and puts a . 229s character is a Pacdot 229s leaves the progress_line as it is 229s 229s RuboCop::Cop::Style::StaticClass 229s does not register an offense when class is empty 229s does not register an offense when class has instance method 229s does not register an offense when class includes/prepends a module 229s registers an offense when class has assignments along with class methods 229s does not register an offense when class has macro-like method 229s does not register an offense when class has a parent 229s registers an offense when class has only class method 229s registers an offense when class has `class << self` with class methods 229s does not register an offense for modules 229s registers an offense when class extends a module 229s does not register an offense when class has `class << self` with macro calls 229s 229s RuboCop::Cop::Layout::HashAlignment 229s register no offense for superclass call without args 229s accepts single line hash 229s accepts pairs that don't start a line 229s register no offense for yield without args 229s accepts several pairs per line 229s with separator alignment configuration 229s accepts aligned hash keys 229s registers an offense and corrects misaligned hash rockets 229s accepts an empty hash 229s accepts hashes with different separators 229s accepts pairs that don't start a line 229s accepts several pairs per line 229s accepts single line hash 229s doesn't break code by moving long keys too far left 229s registers an offense and corrects mixed indentation and spacing 229s registers an offense and corrects misaligned hash values 229s when using hash value omission 229s accepts several pairs per line 229s accepts single line hash 229s accepts pairs that don't start a line 229s when using hash value omission 229s registers an offense and corrects mixed indentation and spacing 229s accepts aligned hash keys 229s with multiple preferred(key and table) alignment configuration 229s accepts aligned hash keys, by keys 229s registers an offense and corrects misaligned hash values, works separate for each hash 229s registers an offense and corrects misaligned hash values 229s accepts aligned hash keys with mixed hash style 229s registers an offense and corrects misaligned hash values, prefer key when least offenses 229s registers an offense and corrects misaligned hash keys with mixed hash style 229s accepts an empty hash 229s accepts aligned hash keys, by both 229s registers an offense and corrects misaligned hash values, prefer table when least offenses 229s accepts aligned hash keys, by table 229s table and key config 229s registers an offense and corrects misaligned hash values, prefer table because it is specified first 229s with `EnforcedColonStyle`: `table` 229s when using hash value omission 229s and aligned keys 229s does not register an offense and corrects 229s and a double splat argument after a hash key 229s registers an offense on the misaligned key and corrects 229s when the only item is a kwsplat 229s does not register an offense 229s and aligned keys but a double splat argument after 229s does not register an offense on the `kwsplat` 229s and misaligned keys 229s registers an offense and corrects 229s and a misaligned double splat argument 229s registers an offense and corrects 229s with default configuration 230s registers an offense and corrects mixed hash styles 230s registers an offense and corrects separator alignment 230s does not register an offense when value starts on next line 230s registers an offense and corrects misaligned mixed multiline hash keys 230s registers an offense and corrects alignment when using double splat in an explicit hash 230s registers an offense and corrects misaligned hash keys 230s accepts left-aligned hash keys with single spaces 230s registers an offense and corrects zero or multiple spaces 230s registers an offense and corrects alignment when using double splat in braces 230s registers an offense and corrects table alignment 230s registers an offense and corrects multiline value starts in wrong place 230s with implicit hash as last argument 230s accepts an empty hash 230s registers an offense and corrects misaligned hash keys 230s accepts aligned hash keys 230s registers an offense and corrects right alignment of keys 230s always inspect last argument hash 230s registers offense and corrects misaligned keys in implicit hash 230s registers offense and corrects misaligned keys in explicit hash 230s registers an offense and corrects misaligned keys in implicit hash for yield 230s registers an offense and corrects misaligned keys in explicit hash for yield 230s registers an offense and corrects misaligned keys in implicit hash for super 230s registers an offense and corrects misaligned keys in explicit hash for super 230s when using hash value omission 230s registers offense and corrects misaligned keys in implicit hash 230s registers offense and corrects misaligned keys in explicit hash 230s when `EnforcedStyle: with_fixed_indentation` of `ArgumentAlignment` 230s does not register an offense for an empty hash literal 230s registers and corrects an offense when using misaligned keyword arguments 230s register and corrects an offense 230s does not register an offense using aligned hash argument for `proc.()` 230s does not register an offense using aligned hash literal 230s when using hash value omission 230s register and corrects an offense 230s does not register and corrects an offense when using aligned keyword arguments 230s ignore explicit last argument hash 230s accepts misaligned keys in explicit hash for super 230s registers an offense and corrects misaligned keys in implicit hash for super 230s accepts misaligned keys in explicit hash for yield 230s registers an offense and corrects misaligned keys in implicit hash 230s accepts misaligned keys in explicit hash 230s registers an offense and corrects misaligned keys in implicit hash for yield 230s when using hash value omission 230s accepts misaligned keys in explicit hash 230s registers an offense and corrects misaligned keys in implicit hash 230s always ignore last argument hash 230s accepts misaligned keys in implicit hash for yield 230s accepts misaligned keys in implicit hash for super 230s accepts misaligned keys in explicit hash for yield 230s accepts misaligned keys in explicit hash for super 230s accepts misaligned keys in implicit hash 230s accepts misaligned keys in explicit hash 230s with different settings for => and : 230s accepts aligned entries 230s registers offenses and correct misaligned entries 230s with `EnforcedHashRocketStyle`: `table` 230s when the only item is a kwsplat 230s does not register an offense 230s and a misaligned double splat argument 230s registers an offense and corrects 230s and misaligned keys 230s registers an offense and corrects 230s and aligned keys but a double splat argument after 230s does not register an offense on the `kwsplat` 230s and a double splat argument after a hash key 230s registers an offense on the misaligned key and corrects 230s ignore implicit last argument hash 230s registers an offense and corrects misaligned keys in explicit hash for yield 230s accepts misaligned keys in implicit hash 230s accepts misaligned keys in implicit hash for yield 230s registers an offense and corrects misaligned keys in explicit hash 230s registers an offense and corrects misaligned keys in explicit hash for super 230s accepts misaligned keys in implicit hash for super 230s with table alignment configuration 230s accepts aligned hash keys and values 230s accepts several pairs per line 230s accepts a keyword splat only hash 230s registers an offense and corrects for misaligned hash keys 230s accepts hashes that use different separators 230s accepts single line hash 230s accepts an empty hash 230s accepts hashes that use different separators and double splats 230s registers an offense and corrects misaligned hash rockets 230s accepts a symbol only hash followed by a keyword splat 230s accepts pairs that don't start a line 230s registers an offense for misaligned hash values 230s accepts a multiline array of single line hashes 230s when using hash value omission 230s accepts several pairs per line 230s accepts single line hash 230s accepts pairs that don't start a line 230s when using hash value omission 230s accepts aligned hash keys and values 230s with invalid configuration 230s fails 230s when using hash value omission 230s accepts pairs that don't start a line 230s accepts several pairs per line 230s accepts single line hash 230s with table+separator alignment configuration 230s accepts a single method argument entry with colon 230s 230s RuboCop::Cop::Style::IfUnlessModifierOfIfUnless 230s provides a good error message 230s conditional with modifier in body 230s accepts 230s ternary with modifier 230s registers an offense and corrects 230s conditional with modifier 230s registers an offense and corrects 230s `unless` / `else` with modifier 230s registers an offense and corrects 230s nested conditionals 230s accepts 230s 230s RuboCop::Cop::RangeHelp 230s source indicated by #range_by_whole_lines 230s with parts of two lines 230s without include_final_newline 230s is expected to eq "puts 'example'\nputs 'another example'" 230s with include_final_newline 230s is expected to eq "puts 'example'\nputs 'another example'\n" 230s with a whole line plus beginning of next line 230s with include_final_newline 230s is expected to eq "puts 'example'\nputs 'another example'\n" 230s without include_final_newline 230s is expected to eq "puts 'example'\nputs 'another example'" 230s when part of a single line is selected 230s with include_final_newline 230s is expected to eq "puts 'example'\n" 230s without include_final_newline 230s is expected to eq "puts 'example'" 230s with beginning of one line 230s without include_final_newline 230s is expected to eq "puts 'another example'" 230s with include_final_newline 230s is expected to eq "puts 'another example'\n" 230s with parts of four lines 230s without include_final_newline 230s is expected to eq "puts 'example'\nputs 'another example'\n\nsomething_else" 230s with include_final_newline 230s is expected to eq "puts 'example'\nputs 'another example'\n\nsomething_else\n" 230s with end of one line 230s with include_final_newline 230s is expected to eq "puts 'example'\n" 230s without include_final_newline 230s is expected to eq "puts 'example'" 230s when source doesn't end with a newline 230s with include_final_newline 230s is expected to eq 30 230s is expected to eq "newline_at_end" 230s without include_final_newline 230s is expected to eq "newline_at_end" 230s with a whole line except newline selected 230s without include_final_newline 230s is expected to eq "puts 'example'" 230s with include_final_newline 230s is expected to eq "puts 'example'\n" 230s source indicated by #range_with_surrounding_space 230s when passing range as a positional argument 230s behaves like works with various `side`s 230s when side is :left 230s is expected to eq " a(2)" 230s when side is :both 230s is expected to eq " a(2) " 230s when side is :right 230s is expected to eq "a(2) " 230s when passing range as a kwarg 230s behaves like works with various `side`s 230s when side is :right 230s is expected to eq "a(2) " 230s when side is :left 230s is expected to eq " a(2)" 230s when side is :both 230s is expected to eq " a(2) " 230s #range_with_comments_and_lines 230s returns a range that includes related comments and whole lines 230s source indicated by #range_with_surrounding_comma 230s when side is :left 230s is expected to eq ",Error" 230s when side is :right 230s is expected to eq "Error," 230s when side is :both 230s is expected to eq ",Error," 230s 230s RuboCop::Cop::Layout::SpaceInLambdaLiteral 230s when configured to enforce spaces 230s does not register an offense for no space between -> and { 230s registers an offense and corrects no space between -> and ( 230s does not register an offense for a space between -> and ( 230s registers an offense and corrects no space in the outer nested lambda 230s does not register an offense for multi-line lambdas 230s registers an offense and corrects no space in both lambdas when nested 230s registers an offense and corrects no space in the inner nested lambda 230s when configured to enforce no space 230s does not register an offense for a space between -> and { 230s registers an offense and corrects spaces between -> and ( 230s registers an offense and corrects a space between -> and ( 230s registers an offense and corrects a space in the outer nested lambda 230s does not register an offense for multi-line lambdas 230s does not register an offense for no space between -> and ( 230s registers an offense and corrects a space in the inner nested lambda 230s register offenses and correct spaces in both lambdas when nested 230s 230s RuboCop::Cop::Style::EndBlock 230s does not report offenses for other blocks 230s reports an offense and corrects END block 230s 230s RuboCop::Cop::Lint::LambdaWithoutLiteralBlock 230s does not register an offense when using `lambda.call` 230s does not register an offense when using lambda with a literal block 230s registers and corrects an offense when using lambda with `&Proc.new {}` block argument 230s registers and corrects an offense when using lambda with a proc variable block argument 230s registers and corrects an offense when using lambda with `&proc {}` block argument 230s does not register an offense when using lambda with a symbol proc 230s 230s RuboCop::Cop::Style::GuardClause 230s registers an error with break in the else branch 230s accepts a method which body is if / unless with else 230s registers an error with next in the if branch 230s does not report an offense if break is inside elsif 230s registers an error if non-control-flow branch has multiple lines 230s does not report an offense if return is inside elsif 230s doesn't report an offense if condition has multiple lines 230s registers an offense when using `|| raise` in `else` branch 230s registers an error if non-control-flow branch has multiple lines 230s does not report an offense if return is inside if..elsif..else..end 230s doesn't register an error if control flow expr has multiple lines 230s registers an offense when using `|| raise` in `then` branch 230s does not report an offense if raise "error" is inside if..elsif..else..end 230s registers an offense when using `and return` in `else` branch 230s doesn't register an error if condition has multiple lines 230s registers an error with next in the else branch 230s doesn't register an error if condition has multiple lines 230s doesn't register an error if control flow expr has multiple lines 230s registers an error with break in the if branch 230s does not register an offense when assigning the result of a guard condition with `else` 230s accepts a method which body does not end with if / unless 230s registers an error with return in the if branch 230s registers an error if non-control-flow branch has multiple lines 230s registers an error with return in the else branch 230s does not report an offense if raise "error" is inside elsif 230s registers an error if non-control-flow branch has multiple lines 230s registers an error with raise "error" in the else branch 230s doesn't register an error if control flow expr has multiple lines 230s does not report an offense if break is inside if..elsif..else..end 230s does not report an offense if next is inside elsif 230s accepts a method with empty parentheses as its body 230s registers an error with raise "error" in the if branch 230s does not report an offense if next is inside if..elsif..else..end 230s accepts a method whose body is a modifier if / unless 230s doesn't register an error if condition has multiple lines 230s doesn't register an error if control flow expr has multiple lines 230s does not report an offense if body is if..elsif..end 230s doesn't register an error if condition has multiple lines 230s registers an offense when using `and return` in `then` branch 230s MinBodyLength: 1 230s reports an offense for if whose body has 1 line 230s with Metrics/MaxLineLength disabled 230s registers an offense with modifier example code regardless of length 230s AllowConsecutiveConditionals: true 230s does not register an offense when allowed same depth multiple if statement andpreceding expression is not a conditional at the same depth 230s reports an offense when allowed same depth multiple if statement andpreceding expression is not a conditional at the same depth 230s with Metrics/MaxLineLength enabled 230s when the correction is too long for a single line 230s with a trivial body 231s does not register an offense 231s with a nested `if` node 231s does registers an offense 231s with a nested `begin` node 231s does registers an offense 231s method in module 231s registers an offense for instance method 231s registers an offense for singleton methods 231s Invalid MinBodyLength 231s fails with an error 231s behaves like reports offense 231s reports an offense if method body ends with if / unless without else 231s reports an offense if method body is if / unless without else 231s AllowConsecutiveConditionals: false 231s reports an offense when not allowed same depth multiple if statement andpreceding expression is a conditional at the same depth 231s behaves like reports offense 231s reports an offense if method body ends with if / unless without else 231s reports an offense if method body is if / unless without else 231s MinBodyLength: 4 231s accepts a method whose body has 3 lines 231s 231s RuboCop::Cop::Style::IdenticalConditionalBranches 231s on case without else 231s doesn't register an offense 231s on if..else with identical leading lines 231s registers and corrects an offense 231s on case with identical bodies 231s registers an offense and corrects 231s on case with identical trailing lines 231s registers and corrects an offense 231s on if..else with identical bodies and assigning to a variable used in `if` condition 231s doesn't register an offense 231s on if..elsif with no else 231s doesn't register an offense 231s on if..else with identical trailing lines 231s registers and corrects an offense 231s on case..when with identical bodies and assigning to a variable used in `case` condition 231s doesn't register an offense 231s on case with identical leading lines 231s registers and corrects an offense 231s on case with empty when 231s doesn't register an offense 231s with empty brace 231s does not raise any error 231s on if..else with slightly different trailing lines 231s doesn't register an offense 231s when using pattern matching 231s on case-match without else 231s doesn't register an offense 231s on case-match with identical trailing lines 231s registers and corrects an offense 231s on case-match with identical leading lines 231s registers and corrects an offense 231s when one of the case-match branches is empty 231s does not register an offense 231s on case-match with identical bodies 231s registers an offense and corrects 231s on case..in with identical bodies and assigning to a variable used in `case` condition 231s doesn't register an offense 231s on case-match with empty when 231s doesn't register an offense 231s with a ternary 231s registers an offense 231s when one of the case branches is empty 231s does not register an offense 231s on if..else with identical bodies 231s registers and corrects an offense 231s 231s RuboCop::Cop::Lint::ReturnInVoidContext 231s with a setter method containing a return with a value 231s registers an offense 231s with a non initialize method containing a return 231s accepts 231s with an initialize method containing a return without a value 231s accepts 231s with a class method called initialize containing a return 231s accepts 231s when return is in top scope 231s accepts 231s with an initialize method containing a return with a value 231s registers an offense 231s with a setter method containing a return without a value 231s accepts 231s 231s RuboCop::Cop::Lint::RedundantSplatExpansion 231s registers an offense and corrects an array literal being expanded in a rescue 231s allows expansions of an array that is assigned to a variable in rescue 231s accepts expanding a variable as a method parameter 231s allows assigning to an expanded range 231s allows assigning to a splat variable 231s allows an array using a constructor 231s allows assigning to a splat 231s allows assigning a variable to a splat expansion of a variable 231s allows expanding a method call on an array literal 231s allows splat expansion inside of an array 231s splat expansion inside of an array 231s registers an offense and corrects the expansion of an array literalinside of an array literal 231s registers an offense and corrects expansion of %W to a list of words 231s registers an offense and corrects expansion of %w to a list of words 231s expanding an array literal in a when condition 231s allows an array that is assigned to a variable 231s allows an array using a constructor 231s registers an offense and corrects an array using [] 231s registers an offense and corrects an array using %w 231s registers an offense and corrects %i to a list of symbols 231s registers an offense and corrects an array using %W 231s registers an offense and corrects %I to a list of symbols 231s when `AllowPercentLiteralArrayArgument: false` 231s registers an offense when using percent symbol literal array 231s registers an offense when using percent literal array 231s behaves like array splat expansion 231s method parameters 231s registers an offense and converts to a list of arguments 231s behaves like splat literal assignment 231s registers an offense and removes the splat from array 231s behaves like array splat expansion 231s method parameters 231s registers an offense and converts to a list of arguments 231s behaves like splat literal assignment 231s registers an offense and removes the splat from array 231s behaves like array splat expansion 231s method parameters 231s registers an offense and converts to a list of arguments 231s behaves like splat literal assignment 231s registers an offense and removes the splat from array 231s splat expansion of method parameters 231s registers an offense and corrects an array literal %I 231s registers an offense and corrects an array literal %i 231s behaves like array splat expansion 231s behaves like splat literal assignment 231s registers an offense and removes the splat from array 231s method parameters 231s registers an offense and converts to a list of arguments 231s behaves like splat expansion 231s behaves like splat literal assignment 231s registers an offense and converts to an array 231s method parameters 231s registers an offense and converts to an array 231s behaves like splat expansion 231s behaves like splat literal assignment 231s registers an offense and converts to an array 231s method parameters 231s registers an offense and converts to an array 231s when `AllowPercentLiteralArrayArgument: true` 231s does not register an offense when using percent symbol literal array 231s does not register an offense when using percent string literal array 231s behaves like splat expansion 231s behaves like splat literal assignment 231s registers an offense and converts to an array 231s method parameters 231s registers an offense and converts to an array 231s expanding Array.new call on array literal 231s with ::Array.new 231s when the array literal contains exactly one element 231s registers an offense and corrects 231s when the array literal contains exactly one element 231s registers an offense and corrects 231s when the array literal contains more than one element 231s accepts 231s assignment to splat expansion 231s registers and corrects an array using top-level const 231s registers an offense and corrects an array using a constructor 231s behaves like splat expansion 231s behaves like splat literal assignment 231s registers an offense and converts to an array 231s method parameters 231s registers an offense and converts to an array 231s behaves like array splat expansion 231s behaves like splat literal assignment 231s registers an offense and removes the splat from array 231s method parameters 231s registers an offense and converts to a list of arguments 231s arrays being expanded with %i variants using splat expansion 231s splat expansion inside of an array 231s registers an offense and changes %I to a list of symbols 231s registers an offense and corrects %i to a list of symbols 231s expanding Array.new call on method argument 231s registers an offense and corrects 231s 231s RuboCop::Cop::Lint::TripleQuotes 231s does not register an offense for implicit concatenation 231s quintuple quotes 231s registers an offense and corrects 231s heredocs 231s does not register an offense 231s triple quotes 231s on multiple lines 231s registers an offense and corrects 231s when only quotes 231s registers an offense and corrects to a single empty quote 231s on one line 231s registers an offense and corrects 231s with only whitespace 231s does not register 231s string interpolation 231s does not register an offense 231s with nested extra quotes 231s registers an offense and corrects 231s 231s RuboCop::Cop::Style::RedundantCondition 231s when inverted condition (unless) 231s registers no offense 231s when condition and else branch are same 231s accepts complex unless branches 231s registers an offense 231s ternary expression (?:) 231s accepts expressions when the condition and if branch do not match 231s when condition and if_branch are same 231s registers an offense and corrects with ternary expression and the branches contains chained parenthesized method call 231s registers an offense and corrects class vars 231s registers an offense and corrects nested vars 231s registers an offense and corrects when the else branch contains an irange 231s registers an offense and corrects functions 231s registers an offense and corrects 231s registers an offense and corrects brackets accesses 231s registers an offense and corrects when the else branch contains an erange 231s registers an offense and corrects when the else branch contains `and` 231s registers an offense and corrects when the else branch contains `rescue` 231s registers an offense and corrects with ternary expression and the branches contains parenthesized method call 231s when regular condition (if) 231s accepts different when the condition does not match the branch 231s accepts elsif 231s when condition and if_branch are same 231s registers an offense and corrects when the branches contains assignment 231s registers an offense and corrects multiline nodes 231s accepts when using ternary if in `else` branch 231s registers an offense and corrects when the branches contains method call with non-braced hash 231s registers an offense and corrects when the branches contains arithmetic operation 231s registers an offense and corrects when `if` condition and `then` branch are the same and it has no `else` branch 231s does not register offenses when using `nil?` and the branches contains method which has multiple arguments 231s does not register offenses when the branches contains hash key access 231s registers an offense and corrects when defined inside method and the branches contains assignment 231s registers an offense and corrects when using operator method in `else` 231s registers an offense and corrects when the branches contains method call with braced hash 231s registers an offense and correct when the branches are the same with the same receivers 231s registers an offense and corrects when a method without argument parentheses in `else` 231s registers an offense and corrects when the branches contains assignment method 231s registers an offense and corrects complex one liners 231s registers an offense and corrects when the branches contains method call 231s does not register offenses when the branches contains assignment but target not matched 231s accepts an elsif branch 231s does not register offenses when using `nil?` and the branches contains assignment 231s accepts complex else branches 231s registers an offense and corrects when using modifier if 231s registers an offense and corrects modifier nodes offense 231s registers an offense and corrects 231s registers an offense and corrects when `raise` without argument parentheses in `else` 231s registers an offense and corrects when the branches contains parenthesized method call 231s registers an offense and corrects when the else branch contains an irange 231s autocorrects when using `<<` method higher precedence than `||` operator 231s does not register an offense when using assignment by hash key access 231s does not register an offense when the branches are the same with different receivers 231s 231s RuboCop::Cop::InternalAffairs::NodeDestructuring 231s registers an offense when destructuring using a splat 231s does not register an offense when receiver is named `array` 231s when destructuring using `node.children` 231s registers an offense when receiver is named `send_node` 231s registers an offense when receiver is named `node` 231s 231s RuboCop::Cop::Lint::MultipleComparison 231s registers an offense for x <= y < z 231s registers an offense for x <= y >= z 231s registers an offense for x <= y > z 231s registers an offense for x > y < z 231s registers an offense for x < y < z 231s registers an offense for x < y <= z 231s registers an offense for x <= y <= z 231s registers an offense for x >= y > z 231s accepts to use `|` operator 231s registers an offense for x < y > z 231s registers an offense for x < y >= z 231s accepts to use `&` operator 231s registers an offense for x > y >= z 231s registers an offense for x >= y < z 231s accepts to use one compare operator 231s registers an offense for x >= y <= z 231s accepts to use `^` operator 231s registers an offense for x > y > z 231s registers an offense for x > y <= z 231s registers an offense for x >= y >= z 231s 231s RuboCop::Cop::Severity 231s has a few required attributes 231s redefines == to compare severities 231s is frozen 231s overrides #to_s 231s constructs from code 231s I 231s is expected to eq # 231s E 231s is expected to eq # 231s W 231s is expected to eq # 231s F 231s is expected to eq # 231s R 231s is expected to eq # 231s C 231s is expected to eq # 231s Comparable 231s info 231s is expected to be < refactor 231s refactor 231s is expected to be < convention 231s convention 231s is expected to be < warning 231s warning 231s is expected to be < error 231s error 231s is expected to be < fatal 231s #level 231s error 231s is expected to eq 5 231s info 231s is expected to eq 1 231s warning 231s is expected to eq 4 231s refactor 231s is expected to eq 2 231s fatal 231s is expected to eq 6 231s convention 231s is expected to eq 3 231s #code 231s convention 231s is expected to eq "C" 231s error 231s is expected to eq "E" 231s warning 231s is expected to eq "W" 231s refactor 231s is expected to eq "R" 231s info 231s is expected to eq "I" 231s fatal 231s is expected to eq "F" 231s 231s Changelog 231s parses correctly 231s merges correctly 231s Changelog::Entry 231s #content 231s when there is an issue referenced 231s generates correct content 231s when there is no issue referenced 231s generates correct content 231s #body 231s when there is no body 231s is expected to eq "" 231s when there is an issue referenced with [Fix #x] the body 231s is expected to eq "Fix something" 231s when there is an issue referenced with [Fixes #x] the body 231s is expected to eq "Fix something" 231s when there is no issue referenced in the body 231s is expected to eq "Fix something" 231s #ref_id 231s when there is an issue referenced with [Fix #x] the body 231s is expected to eq "123" 231s when there is an issue referenced with [Fixes #x] the body 231s is expected to eq "123" 231s when there is no body 231s is expected to eq "x" 231s when there is no issue referenced in the body 231s is expected to eq "x" 231s 231s RuboCop::Cop::Style::TrailingBodyOnMethodDefinition 231s accepts a method with multiple lines of body 231s accepts a method with one line of body 231s registers when body starts on def line & continues many more lines 231s autocorrects with comment after body 231s does not register offense with trailing body on method end 231s autocorrects body with method definition with args not in parens 231s registers when body starts on def line & continues one more line 231s registers an offense when body trails after method definition 231s removes semicolon from method definition but not body when autocorrecting 231s Ruby 3.0 or higher 231s does not register offense when endless method definition body is after newline in opening parenthesis 231s when method is not on first line of processed_source 231s autocorrects offense 231s 231s RuboCop::Cop::Lint::ShadowedException 231s multiple rescues 231s accepts many (>= 7) rescue groups 231s accepts rescuing a known exception after an unknown exceptions 231s registers an offense rescuing Exception before an unknown exceptions 231s accepts rescuing exceptions in order of level with multiple exceptions in a group 231s registers an offense rescuing out of order exceptions when there is an ensure 231s accepts rescuing a known exception before an unknown exceptions 231s registers an offense for two exceptions when there are multiple levels of exceptions in the same rescue 231s registers an offense when a higher level exception is rescued before a lower level exception 231s ignores expressions of non-const 231s accepts rescuing custom exceptions in multiple rescue groups 231s accepts rescuing exceptions in order of level 231s accepts rescuing exceptions in order of level with multiple exceptions in a group with custom exceptions 231s registers an offense when a higher level exception is rescued before a lower level exception when there are multiple exceptions rescued in a group 231s accepts rescuing a known exception between unknown exceptions 231s last rescue does not specify exception class 231s highlights range ending at rescue keyword 231s exceptions from different ancestry chains 231s accepts rescuing exceptions in one order 231s accepts rescuing exceptions in another order 231s splat arguments 231s accepts splat arguments passed to multiple rescues 231s registers an offense for splat arguments rescued after rescuing Exception 231s does not register an offense for splat arguments rescued after rescuing a known exception 231s single rescue 231s accepts rescuing a multiple exceptions that are not ancestors that have an else 231s accepts rescuing a single exception 231s accepts rescuing a single exception that has an else 231s accepts rescue containing multiple same error code exceptions 231s accepts rescuing a custom exception and a standard exception 231s accepts rescuing a single custom exception 231s accepts an empty rescue 231s accepts rescuing a single exception that has an ensure 231s rescue a exception without causing constant name deprecation warning 231s accepts rescuing a single exception that is assigned to a variable 231s accepts rescuing multiple custom exceptions 231s registers an offense for the same exception multiple times 231s accepts splat arguments passed to rescue 231s registers an offense rescuing Exception with any other error or exception 231s registers an offense rescuing exceptions that are ancestors of each other 231s when there are multiple levels of exceptions in the same rescue 231s registers an offense for more than two exceptions 231s registers an offense for two exceptions 231s modifier rescue 231s accepts rescue in its modifier form 231s 231s RuboCop::Cop::Gemspec::RequiredRubyVersion 231s registers an offense when `required_ruby_version` is an empty array 231s registers an offense when `required_ruby_version` is blank 231s registers an offense when `required_ruby_version` is not specified 231s target ruby version > 2.7 231s registers an offense when `required_ruby_version` is specified with ~> without a minor version and is lower than `TargetRubyVersion` 231s does not register an offense when `required_ruby_version` is specified with ~> without a patch version and equals `TargetRubyVersion` 231s does not register an offense when `required_ruby_version` is specified with >= without a patch version and equals `TargetRubyVersion` 231s does not register an offense when `required_ruby_version` is specified with >= and equals `TargetRubyVersion` 231s does not register an offense when `required_ruby_version` is specified with ~> and equals `TargetRubyVersion` 231s registers an offense when `required_ruby_version` is specified with >= without a minor version and is lower than `TargetRubyVersion` 231s does not register an offense when lowest version of `required_ruby_version` equals `TargetRubyVersion` 231s target ruby version > 2.6 231s registers an offense when `required_ruby_version` is specified with ~> and is higher than `TargetRubyVersion` 231s registers an offense when `required_ruby_version` is specified with >= and is higher than `TargetRubyVersion` 231s target ruby version > 2.7 231s recognizes Gem::Requirement and registers offense 231s registers an offense when `required_ruby_version` is specified with >= and is lower than `TargetRubyVersion` 231s registers an offense when `required_ruby_version` is specified with ~> and is lower than `TargetRubyVersion` 231s recognizes a Gem::Requirement with multiple requirements and does not register an offense 231s registers an offense when `required_ruby_version` is specified in array and is lower than `TargetRubyVersion` 231s false negatives 231s does not register an offense when `required_ruby_version` is assigned as a variable (an array of string literal) 231s does not register an offense when `required_ruby_version` is assigned as a variable (string literal) 231s 231s RuboCop::Cop::Metrics::MethodLength 231s does not count blank lines 231s accepts empty methods 231s properly counts lines when method ends with block 231s accepts a method with multiline arguments and less than 5 lines of body 231s does not count commented lines by default 231s is not fooled by one-liner methods, syntax #2 231s is not fooled by one-liner methods, syntax #1 231s accepts a method with less than 5 lines 231s when using numbered parameter 231s when method is defined with `define_method` 231s registers an offense 231s when CountComments is enabled 231s also counts commented lines 231s when method is an instance method 231s registers an offense 231s when method is defined on a singleton class 231s registers an offense 231s when method is a class method 231s registers an offense 231s when method is defined with `define_method` 231s registers an offense 231s when methods to allow are defined 231s AllowedMethods is enabled 231s accepts the foo method with more than 5 lines 231s still rejects other methods with more than 5 lines 231s AllowedPatterns is enabled 231s raises offense for firstname 231s accepts the user_name method 231s when `CountAsOne` is not empty 231s folds array into one line 231s 231s RuboCop::Cop::Style::MissingElse 231s EmptyElse enabled and set to warn on nil 231s given an unless-statement 231s with an else-clause containing only the literal nil 231s doesn't register an offense 231s with no else-clause 231s registers an offense 231s with an else-clause with side-effects 231s doesn't register an offense 231s with a completely empty else-clause 231s doesn't register an offense 231s given a case statement 231s with an else-clause containing only the literal nil 231s doesn't register an offense 231s with no else-clause 231s registers an offense 231s with an else-clause with side-effects 231s doesn't register an offense 231s with a completely empty else-clause 231s doesn't register an offense 231s given an if-statement 231s with a completely empty else-clause 231s doesn't register an offense 231s with an else-clause with side-effects 231s doesn't register an offense 231s with no else-clause 231s registers an offense 231s with an else-clause containing only the literal nil 231s doesn't register an offense 231s >= Ruby 2.7 231s does not register an offense 231s EmptyElse enabled and set to warn on empty 231s given an unless-statement 231s with an else-clause containing only the literal nil 231s doesn't register an offense 231s with a completely empty else-clause 231s doesn't register an offense 231s with no else-clause 231s registers an offense 231s with an else-clause with side-effects 231s doesn't register an offense 231s >= Ruby 2.7 231s does not register an offense 231s given a case statement 231s with no else-clause 231s registers an offense 231s with an else-clause containing only the literal nil 231s doesn't register an offense 231s with an else-clause with side-effects 231s doesn't register an offense 231s with a completely empty else-clause 231s doesn't register an offense 231s given an if-statement 231s with an else-clause containing only the literal nil 231s doesn't register an offense 231s with no else-clause 231s registers an offense 231s with a completely empty else-clause 231s doesn't register an offense 231s with an else-clause with side-effects 231s doesn't register an offense 231s configured to warn only on empty case 231s >= Ruby 2.7 231s does not register an offense 231s given an if-statement 231s with a completely empty else-clause 231s doesn't register an offense 231s with no else-clause 231s doesn't register an offense 231s with an else-clause with side-effects 231s doesn't register an offense 231s with an else-clause containing only the literal nil 231s doesn't register an offense 231s given an unless-statement 231s with an else-clause with side-effects 231s doesn't register an offense 231s with an else-clause containing only the literal nil 231s doesn't register an offense 231s with a completely empty else-clause 231s doesn't register an offense 231s with no else-clause 231s doesn't register an offense 231s given a case statement 231s with no else-clause 231s registers an offense 231s with an else-clause containing only the literal nil 231s doesn't register an offense 231s with an else-clause with side-effects 231s doesn't register an offense 231s with a completely empty else-clause 231s doesn't register an offense 231s UnlessElse enabled 231s >= Ruby 2.7 231s does not register an offense 231s given an unless-statement 231s with a completely empty else-clause 231s doesn't register an offense 231s with an else-clause containing only the literal nil 231s doesn't register an offense 231s with no else-clause 231s doesn't register an offense 231s with an else-clause with side-effects 231s doesn't register an offense 231s given a case statement 231s with an else-clause containing only the literal nil 231s doesn't register an offense 231s with a completely empty else-clause 231s doesn't register an offense 231s with an else-clause with side-effects 231s doesn't register an offense 231s with no else-clause 231s registers an offense 231s given an if-statement 231s with a completely empty else-clause 231s doesn't register an offense 231s with no else-clause 231s registers an offense 231s with an else-clause with side-effects 231s doesn't register an offense 231s with an else-clause containing only the literal nil 231s doesn't register an offense 231s configured to warn only on empty if 231s given an unless-statement 231s with no else-clause 231s registers an offense 231s with an else-clause with side-effects 231s doesn't register an offense 231s with an else-clause containing only the literal nil 231s doesn't register an offense 231s with a completely empty else-clause 231s doesn't register an offense 231s given an if-statement 231s with no else-clause 231s registers an offense 231s with an else-clause with side-effects 231s doesn't register an offense 231s with a completely empty else-clause 231s doesn't register an offense 232s with an else-clause containing only the literal nil 232s doesn't register an offense 232s given a case statement 232s with no else-clause 232s doesn't register an offense 232s with an else-clause containing only the literal nil 232s doesn't register an offense 232s with a completely empty else-clause 232s doesn't register an offense 232s with an else-clause with side-effects 232s doesn't register an offense 232s >= Ruby 2.7 232s does not register an offense 232s UnlessElse disabled 232s given an if-statement 232s with an else-clause containing only the literal nil 232s doesn't register an offense 232s with an else-clause with side-effects 232s doesn't register an offense 232s with a completely empty else-clause 232s doesn't register an offense 232s with no else-clause 232s registers an offense 232s given an unless-statement 232s with a completely empty else-clause 232s doesn't register an offense 232s with an else-clause with side-effects 232s doesn't register an offense 232s with no else-clause 232s registers an offense 232s with an else-clause containing only the literal nil 232s doesn't register an offense 232s >= Ruby 2.7 232s does not register an offense 232s given a case statement 232s with a completely empty else-clause 232s doesn't register an offense 232s with an else-clause containing only the literal nil 232s doesn't register an offense 232s with no else-clause 232s registers an offense 232s with an else-clause with side-effects 232s doesn't register an offense 232s 232s RuboCop::Cop::Layout::FirstMethodParameterLineBreak 232s accepts methods without params 232s registers an offense and corrects params listed on the first line 232s accepts params listed on a single line 232s registers an offense and corrects params on first line of singleton method 232s accepts params without parens 232s registers an offense and corrects params with default values 232s accepts single-line methods 232s 232s RuboCop::Cop::Commissioner 232s #investigate 232s traverses the AST and invoke cops specific callbacks 232s stores all errors raised by the cops 232s when given a source with parsing errors 232s only calls on_other_file 232s when given a force 232s passes the input params to all cops/forces that implement their own #investigate method 232s when passed :raise_error option 232s re-raises the exception received while processing 232s traverses the AST with on_send / on_csend 232s for unrestricted cops 232s calls on_send all method calls 232s for a restricted cop 232s calls on_send for the right method calls 232s on both csend and send 232s calls on_send for the right method calls 232s when passed :raise_cop_error option 232s re-raises the exception received while processing 232s when a cop reports offenses 232s returns all offenses found by the cops 232s 232s RuboCop::Cop::Style::UnlessLogicalOperators 232s EnforcedStyle is `forbid_logical_operators` 232s registers an offense when using only `and` 232s does not register an offense when not used in unless 232s does not register an offense when using if 232s registers an offense when using only `or` 232s does not register an offense when not using logical operator 232s registers an offense when using only `||` 232s registers an offense when using `&&` followed by || 232s registers an offense when using only `&&` 232s EnforcedStyle is `forbid_mixed_logical_operators` 232s does not register an offense when using `&&` operator and invoked method name includes "and" in the conditional branch 232s registers an offense when using `&&` and `and` 232s does not register an offense when using only `||`s 232s registers an offense when using `||` and `or` 232s registers an offense when using `||` and `and` 232s does not register an offense when using `||` operator and invoked method name includes "or" in the conditional branch 232s does not register an offense when using if 232s does not register an offense when using only `or`s 232s registers an offense when using `&&` and `or` 232s does not register an offense when not using logical operator 232s registers an offense when using `&&` and `||` 232s does not register an offense when using only `&&`s 232s does not register an offense when not used in unless 232s registers an offense when using parentheses 232s does not register an offense when using only `and`s 232s 232s RuboCop::Cop::Style::GlobalVars 232s does not register an offense for built-in variable $stdout 232s does not register an offense for built-in variable $< 232s does not register an offense for built-in variable $OFS 232s does not register an offense for built-in variable $PREMATCH 232s does not register an offense for backrefs like $1 232s does not register an offense for built-in variable $ERROR_INFO 232s does not register an offense for built-in variable $' 232s does not register an offense for built-in variable $ORS 232s does not register an offense for built-in variable $= 232s does not register an offense for built-in variable $stdin 232s does not register an offense for built-in variable $-a 232s does not register an offense for built-in variable $OUTPUT_RECORD_SEPARATOR 232s does not register an offense for built-in variable $DEBUG 232s does not register an offense for built-in variable $DEFAULT_INPUT 232s does not register an offense for built-in variable $INPUT_LINE_NUMBER 232s does not register an offense for built-in variable $LAST_MATCH_INFO 232s does not register an offense for built-in variable $FILENAME 232s does not register an offense for built-in variable $-d 232s does not register an offense for built-in variable $_ 232s does not register an offense for built-in variable $` 232s does not register an offense for built-in variable $@ 232s does not register an offense for built-in variable $LOAD_PATH 232s does not register an offense for built-in variable $? 232s does not register an offense for built-in variable $-F 232s does not register an offense for built-in variable $-v 232s does not register an offense for built-in variable $& 232s does not register an offense for built-in variable $ARGV 232s does not register an offense for built-in variable $" 232s does not register an offense for built-in variable $stderr 232s does not register an offense for built-in variable $NR 232s does not register an offense for built-in variable $PROGRAM_NAME 232s does not register an offense for built-in variable $ENV_JAVA 232s does not register an offense for built-in variable $INPUT_RECORD_SEPARATOR 232s does not register an offense for built-in variable $FS 232s does not register an offense for built-in variable $IGNORECASE 232s does not register an offense for built-in variable $-w 232s does not register an offense for built-in variable $PROCESS_ID 232s does not register an offense for built-in variable $VERBOSE 232s does not register an offense for built-in variable $RS 232s does not register an offense for built-in variable $CHILD_STATUS 232s does not register an offense for built-in variable $JRUBY_REVISION 232s does not register an offense for built-in variable $OUTPUT_FIELD_SEPARATOR 232s does not register an offense for built-in variable $LAST_PAREN_MATCH 232s does not register an offense for built-in variable $-l 232s does not register an offense for built-in variable $! 232s does not register an offense for built-in variable $-0 232s does not register an offense for built-in variable $-I 232s does not register an offense for built-in variable $ERROR_POSITION 232s does not register an offense for built-in variable $DEFAULT_OUTPUT 232s does not register an offense for built-in variable $LAST_READ_LINE 232s does not register an offense for built-in variable $POSTMATCH 232s does not register an offense for built-in variable $-i 232s does not register an offense for built-in variable $+ 232s does not register an offense for built-in variable $LOADED_FEATURES 232s does not register an offense for built-in variable $JRUBY_VERSION 232s does not register an offense for built-in variable $PID 232s registers an offense for $custom 232s does not register an offense for built-in variable $* 232s does not register an offense for built-in variable $FIELD_SEPARATOR 232s allows user permitted variables 232s does not register an offense for built-in variable $, 232s does not register an offense for built-in variable $SAFE 232s does not register an offense for built-in variable $$ 232s does not register an offense for built-in variable $CLASSPATH 232s does not register an offense for built-in variable $\ 232s does not register an offense for built-in variable $-p 232s does not register an offense for built-in variable $; 232s does not register an offense for built-in variable $/ 232s does not register an offense for built-in variable $~ 232s does not register an offense for built-in variable $: 232s does not register an offense for built-in variable $> 232s does not register an offense for built-in variable $0 232s does not register an offense for built-in variable $. 232s does not register an offense for built-in variable $MATCH 232s 232s RuboCop::Cop::Layout::EmptyLines 232s does not register an offense when there are no tokens 232s does not register an offense for heredocs with empty lines inside 232s does not register an offense for empty lines in a string 232s registers an offense for consecutive empty lines 232s does not register an offense for comments 232s 232s RuboCop::Cop::Style::RedundantRegexpEscape 232s with a single-line %r~~ regexp 232s without escapes 232s does not register an offense 232s with escaped delimiters and regexp options 232s does not register an offense 232s with escaped delimiters outside a character-class 232s does not register an offense 232s with escaped delimiters inside a character-class 232s does not register an offense 232s with a single-line %r!! regexp 232s with escaped delimiters outside a character-class 232s does not register an offense 232s with escaped delimiters inside a character-class 232s does not register an offense 232s with escaped delimiters and regexp options 232s does not register an offense 232s without escapes 232s does not register an offense 232s with a single-line `//` regexp 232s with an escaped 'I' inside a character class 232s does not register an offense 232s with an escaped 'x41' inside a character class 232s does not register an offense 232s with an escaped '^' inside a character class 232s does not register an offense 232s with an escaped 'p{alpha}' outside a character class 232s does not register an offense 232s with an escaped 'T' outside a character class 232s does not register an offense 232s with an escaped 'B' inside a character class 232s does not register an offense 232s with an escaped ')' inside a character class 232s registers an offense and corrects 232s with an escaped '-' character being the first character inside a character class 232s registers an offense and corrects 232s with an escaped 'N' inside a character class 232s does not register an offense 232s with an escaped 'f' outside a character class 232s does not register an offense 232s with an escaped 'O' inside a character class 232s does not register an offense 232s with multiple escaped metachars inside a character class 232s registers offenses and corrects 232s with an escaped 'P{alpha}' outside a character class 232s does not register an offense 232s with an escaped 'Q' outside a character class 232s does not register an offense 232s with an escaped 'l' outside a character class 232s does not register an offense 232s with an escaped 'A' inside a character class 232s does not register an offense 232s with an escaped '}' inside a character class 232s registers an offense and corrects 232s with an escaped 'a' inside a character class 232s does not register an offense 232s with an escaped 'u0041' outside a character class 232s does not register an offense 232s with a nested character class containing redundant escape 232s registers an offense and corrects 232s with an uppercase metacharacter outside a character class 232s does not register an offense 232s with an escaped '-' character being the last character inside a character class 232s registers an offense and corrects 232s with an escaped 'A' outside a character class 232s does not register an offense 232s with an escaped 'O' outside a character class 232s does not register an offense 232s with an escaped . inside a character class beginning with : 232s registers an offense and corrects 232s with an escaped 'v' outside a character class 232s does not register an offense 232s with an escaped '?' outside a character class 232s does not register an offense 232s with an escaped 'Y' inside a character class 232s does not register an offense 232s with an escaped 'X' inside a character class 232s does not register an offense 232s with an escaped 'I' outside a character class 232s does not register an offense 232s with an escaped 'R' outside a character class 232s does not register an offense 232s with an escaped '|' inside a character class 232s registers an offense and corrects 232s with an escaped '\' inside a character class 232s does not register an offense 232s with an escaped 'P{alpha}' inside a character class 232s does not register an offense 232s with an escaped '$' inside a character class 232s registers an offense and corrects 232s with an escaped 'n101' inside a character class 232s does not register an offense 232s with an escaped interpolation outside a character class 232s does not register an offense 232s with an escaped ']' outside a character class 232s does not register an offense 232s with an escaped 'q' inside a character class 232s does not register an offense 232s with an escaped 'R' inside a character class 232s does not register an offense 232s with an escaped 'J' inside a character class 232s does not register an offense 232s with an escaped 's' outside a character class 232s does not register an offense 232s with a backreference 232s does not register an offense 232s with an escaped 'u0041' inside a character class 232s does not register an offense 232s with an escaped 'K' inside a character class 232s does not register an offense 232s with an escaped 'H' inside a character class 232s does not register an offense 232s without escapes 232s does not register an offense 232s with an escaped 'M-a' outside a character class 232s does not register an offense 232s with escaped slashes 232s does not register an offense 232s with an escaped interpolation inside a character class 232s does not register an offense 232s with an escaped 't' inside a character class 232s does not register an offense 232s with an escaped 'X' outside a character class 232s does not register an offense 232s with regexp options and a redundant escape 232s registers offenses and corrects 232s with an escaped 'Z' outside a character class 232s does not register an offense 232s with a line continuation 232s does not register an offense 232s with an escaped 't' outside a character class 232s does not register an offense 232s with an escaped 'M-a' inside a character class 232s does not register an offense 232s with an escaped 'N' outside a character class 232s does not register an offense 232s with an escaped 'V' outside a character class 232s does not register an offense 232s with an escaped 'o' outside a character class 232s does not register an offense 232s with a line continuation within a character class 232s does not register an offense 232s with an escaped 'x41' outside a character class 232s does not register an offense 232s with an escaped ']' inside a character class 232s does not register an offense 232s with an escaped 'K' outside a character class 232s does not register an offense 232s with an escaped 'i' inside a character class 232s does not register an offense 232s with an escaped '-' outside a character class 232s registers an offense and corrects 232s with a character class and following escaped char 232s does not register an offense 232s with an escaped 'u{0041}' outside a character class 232s does not register an offense 232s with an escaped ' 232s ' outside a character class 232s does not register an offense 232s with an escaped 'Q' inside a character class 232s does not register an offense 232s with an escaped 'w' inside a character class 232s does not register an offense 232s with an escaped '?' inside a character class 232s registers an offense and corrects 232s with an escaped 'C-c' outside a character class 232s does not register an offense 232s with an escaped '+' outside a character class 232s does not register an offense 232s with an escaped ')' outside a character class 232s does not register an offense 232s with an escaped '*' outside a character class 232s does not register an offense 232s with an escaped 'o' inside a character class 232s does not register an offense 232s with an escaped character class and following escaped char 232s does not register an offense 232s with an escaped 'S' inside a character class 232s does not register an offense 232s with an escaped 'F' inside a character class 232s does not register an offense 232s with an escaped 'u{0041}' inside a character class 232s does not register an offense 232s with an escaped 'r' outside a character class 232s does not register an offense 232s with an escaped 'L' outside a character class 232s does not register an offense 232s with an escaped '{' outside a character class 232s does not register an offense 232s with a nested character class then allowed escape 232s does not register an offense 232s with a POSIX character class then disallowed escape inside a character class 232s registers an offense and corrects 232s with an escaped 'G' inside a character class 232s does not register an offense 232s with an escaped 'n101' outside a character class 232s does not register an offense 232s with an escaped 'E' inside a character class 232s does not register an offense 232s with an escaped 'e' inside a character class 232s does not register an offense 232s with an escaped '[' outside a character class 232s does not register an offense 232s with an escaped 'T' inside a character class 232s does not register an offense 232s with an escaped ' ' inside a character class 232s does not register an offense 232s with an escaped 'm' inside a character class 232s does not register an offense 232s with an escaped '#' outside a character class 232s does not register an offense 232s with an escaped '(' inside a character class 232s registers an offense and corrects 232s with a free-spaced mode regex 232s with a commented redundant escape on a single line 232s does not register an offense 232s with redundant escape preceded by an escaped comment 232s registers offenses and corrects 232s with a commented [ and ] 232s does not register an offense 232s with a commented redundant escape 232s does not register an offense 232s with an escaped '(' outside a character class 232s does not register an offense 232s with an escaped 'a' outside a character class 232s does not register an offense 232s with an escaped 'V' inside a character class 232s does not register an offense 232s with an escaped '#' inside a character class 232s does not register an offense 232s with an escaped '\' outside a character class 232s does not register an offense 232s with an escaped 'C-c' inside a character class 232s does not register an offense 232s with an escaped 'f' inside a character class 232s does not register an offense 232s with an escaped 'F' outside a character class 232s does not register an offense 232s with an escaped 'd' inside a character class 232s does not register an offense 232s with an escaped 'z' outside a character class 232s does not register an offense 232s with an escaped 'D' outside a character class 232s does not register an offense 232s with an escaped 'J' outside a character class 232s does not register an offense 232s with an escaped 'e' outside a character class 232s does not register an offense 232s with an escaped 'h' outside a character class 232s does not register an offense 232s with an escaped '.' inside a character class 232s registers an offense and corrects 232s with an escaped 'r' inside a character class 232s does not register an offense 232s with an escaped 'G' outside a character class 232s does not register an offense 232s with an escaped '*' inside a character class 232s registers an offense and corrects 232s with an escaped 'b' inside a character class 232s does not register an offense 232s with an escaped 'd' outside a character class 232s does not register an offense 232s with an escaped 'W' inside a character class 232s does not register an offense 232s with an escaped 'z' inside a character class 232s does not register an offense 232s with an escaped 'q' outside a character class 232s does not register an offense 232s with an escaped 'L' inside a character class 232s does not register an offense 232s with a POSIX character class then allowed escape inside a character class 232s does not register an offense 232s with an escaped 'v' inside a character class 232s does not register an offense 232s with an escaped 'B' outside a character class 232s does not register an offense 232s with an escaped '+' inside a character class inside a group 232s registers an offense and corrects 232s with an escaped 'Z' inside a character class 232s does not register an offense 232s with an escaped 'S' outside a character class 232s does not register an offense 232s with an escaped 'cc' inside a character class 232s does not register an offense 232s with an escaped 'D' inside a character class 232s does not register an offense 232s with an escaped 'y' inside a character class 232s does not register an offense 232s with an interpolated unnecessary-escape regexp 232s registers an offense and corrects 232s with an escaped 'E' outside a character class 232s does not register an offense 232s with an escaped 'W' outside a character class 232s does not register an offense 232s with an escaped 'U' outside a character class 232s does not register an offense 232s with an escaped '|' outside a character class 232s does not register an offense 232s with an escape inside an interpolated string 232s does not register an offense 232s with an escaped 'l' inside a character class 232s does not register an offense 232s with an escaped 'U' inside a character class 232s does not register an offense 232s with an escaped 'i' outside a character class 232s does not register an offense 232s with an escaped 'H' outside a character class 232s does not register an offense 232s with an escaped 'Y' outside a character class 232s does not register an offense 232s with an escaped '^' outside a character class 232s does not register an offense 232s with an escaped 'j' outside a character class 232s does not register an offense 232s with an interpolation followed by redundant escapes 232s registers offenses and corrects 232s with an escaped ' ' outside a character class 232s does not register an offense 232s with an escaped '$' outside a character class 232s does not register an offense 232s with an escaped 'm' outside a character class 232s does not register an offense 232s with an escaped '{' inside a character class 232s registers an offense and corrects 232s with an uppercase metacharacter inside a character class 232s does not register an offense 232s with an escaped 's' inside a character class 232s does not register an offense 232s with an escaped 'b' outside a character class 232s does not register an offense 232s with an escaped 'w' outside a character class 232s does not register an offense 232s with an escaped '.' outside a character class 232s does not register an offense 232s with an escaped '-' inside a character class 232s registers an offense and corrects 232s with an escaped 'cc' outside a character class 232s does not register an offense 232s with an escaped 'p{alpha}' inside a character class 232s does not register an offense 232s with an escaped 'h' inside a character class 232s does not register an offense 232s with an invalid g escape 232s does not register an offense 232s with an escaped '[' inside a character class 232s does not register an offense 232s with an escaped 'j' inside a character class 232s does not register an offense 232s with an escaped '}' outside a character class 232s does not register an offense 232s with an escaped '+' inside a character class 232s registers an offense and corrects 232s with an escaped 'y' outside a character class 232s does not register an offense 232s with a multi-line %r// regexp 232s without escapes 232s does not register an offense 232s with escaped slashes 232s does not register an offense 232s with a single-line %r// regexp 232s without escapes 232s does not register an offense 232s with escaped slashes 232s does not register an offense 232s with a multi-line %r{} regexp 232s without escapes 232s does not register an offense 232s with a redundant escape after a line with comment 232s registers an offense and corrects 232s with redundantly-escaped slashes 232s registers an offense and corrects 232s with a # inside a character class 232s does not register an offense 232s with a single-line %r^^ regexp 232s without escapes 232s does not register an offense 232s with escaped delimiters outside a character-class 232s does not register an offense 232s with escaped delimiters and regexp options 232s does not register an offense 232s with escaped delimiters inside a character-class 232s does not register an offense 232s with a single-line %r@@ regexp 232s with escaped delimiters and regexp options 232s does not register an offense 232s with escaped delimiters inside a character-class 232s does not register an offense 232s with escaped delimiters outside a character-class 232s does not register an offense 232s without escapes 232s does not register an offense 232s with multibyte characters 232s removes the escape character at the right position 232s with a single-line %r{} regexp 232s without escapes 232s does not register an offense 232s with redundantly-escaped slashes 232s registers an offense and corrects 232s with an escaped { or } inside a character class 232s does not register an offense 232s with an escaped { or } outside a character class 232s does not register an offense 232s with a single-line %r<> regexp 232s with escaped delimiters and regexp options 232s does not register an offense 232s with escaped delimiters outside a character-class 232s does not register an offense 232s with escaped delimiters inside a character-class 232s does not register an offense 232s without escapes 232s does not register an offense 232s with a single-line %r() regexp 232s with escaped delimiters outside a character-class 232s does not register an offense 232s with escaped delimiters inside a character-class 232s does not register an offense 232s without escapes 232s does not register an offense 232s with escaped delimiters and regexp options 232s does not register an offense 232s with a single-line %r__ regexp 232s with escaped delimiters inside a character-class 232s does not register an offense 232s without escapes 232s does not register an offense 232s with escaped delimiters outside a character-class 232s does not register an offense 232s with escaped delimiters and regexp options 232s does not register an offense 232s 232s RuboCop::Cop::Layout::MultilineBlockLayout 232s considers the extra space required to join the lines together 232s does not remove a trailing comma when only one argument is present 232s registers an offense and corrects line-break before arguments with empty block 232s registers an offense and corrects a do/end block with a mult-line body 232s does not register an offense for one-line {} blocks 232s registers an offense for missing newline in do/end block w/o params 232s registers offenses when there are not too many parameters to fit on one line 232s registers an offense and corrects for missing newline in {} block w/o params 232s autocorrects nested parens correctly 232s registers an offense and corrects for missing newline in do/end block with params 232s does not register offenses when there is a newline for do/end block 232s registers an offense and corrects a line-break within arguments 232s does not error out when the block is empty 232s autocorrects in more complex case with lambda and assignment, and aligns the next line two spaces out from the start of the block 232s registers an offense and corrects for missing newline before opening parenthesis `(` for block body 232s doesn't move end keyword in a way which causes infinite loop in combination with Style/BlockEndNewLine 232s registers an offense and corrects a line break within destructured arguments 232s does not register an offense for one-line do/end blocks 232s registers offenses and corrects for new lambda literal syntax 232s registers offenses and corrects for lambdas 232s registers an offense and corrects for missing newline in {} block with params 233s does not register offenses when there are too many parameters to fit on one line 233s does not register offenses when there is a newline for {} block 233s registers an offense and corrects line-break before arguments 233s registers an offense and corrects line-break within arguments 233s Ruby 2.7 233s registers an offense and corrects for missing newline in {} block w/o params 233s registers an offense and corrects for missing newline in do/end block with params 233s 233s RuboCop::Cop::Style::NumericPredicate 233s when configured to enforce numeric comparison methods 233s allows checking if a number is not zero 233s registers an offense for checking if a number is negative 233s registers an offense for checking if a number is positive 233s registers an offense for checking if a number is zero 233s when configured to enforce numeric predicate methods 233s when checking if a number is zero 233s registers an offense 233s registers an offense with a complex expression 233s allows comparing against a global variable 233s when comparing against a method argument variable 233s registers an offense with complex expression 233s registers an offense 233s with checking if a number is not zero 233s allows comparing against a complex expression 233s allows comparing against a global variable 233s allows comparing against a variable 233s when checking if a number is negative 233s when target ruby version is 2.2 or lower 233s does not register an offense 233s when target ruby version is 2.3 or higher 233s registers an offense 233s registers an offense in yoda condition 233s with a complex expression 233s registers an offense in yoda condition 233s registers an offense 233s when checking if a number is positive 233s when target ruby version is 2.2 or lower 233s does not register an offense 233s when target ruby version is 2.3 or higher 233s registers an offense 233s registers an offense in yoda condition 233s with a complex expression 233s registers an offense in yoda condition 233s registers an offense 233s when there are allowed methods 233s simple method call 233s `EnforcedStyle` is `comparison` 233s allows checking if a number is zero 233s `EnforcedStyle` is `predicate` 233s allows checking if a number is zero 233s in block 233s not ignored method 233s registers an offense for checking if a number is positive 233s registers an offense for checking if a number is negative 233s ignored method 233s with a string 233s allows checking if a number is positive 233s allows checking if a number is negative 233s with a regex 233s allows checking if a number is positive 233s allows checking if a number is negative 233s in argument 233s not ignored method 233s when checking if a number is positive 233s when target ruby version is 2.3 or higher 233s registers an offense 233s when target ruby version is 2.2 or lower 233s does not register an offense 233s when checking if a number is negative 233s when target ruby version is 2.3 or higher 233s registers an offense 233s when target ruby version is 2.2 or lower 233s does not register an offense 233s ignored method 233s with a regex 233s allows checking if a number is positive 233s allows checking if a number is negative 233s with a string 233s allows checking if a number is positive 233s allows checking if a number is negative 233s 233s RuboCop::PathUtil 233s #absolute? 233s returns a falsey value for a path beginning with a directory name 233s returns a truthy value for a path beginning with slash 233s #relative_path 233s builds paths relative to PWD by default as a stop-gap 233s supports custom base paths 233s #match_path? 233s matches glob expressions 233s matches strings to the full path 233s does not match file in a subdirectory 233s does not match invalid UTF-8 paths 233s does not match dir/** for file in hidden dir 233s matches regexps 233s matches dir/** for hidden file 233s 233s RuboCop::Cop::Lint::UselessSetterCall 233s is not confused by operators ending with = 233s accepts exception assignments without exploding 233s when a lvar contains an object passed as argument by multiple-assignment at the end of the method 233s accepts the setter call on the lvar 233s when a lvar possibly contains an object passed as argument by logical-operator-assignment at the end of the method 233s accepts the setter call on the lvar 233s with method ending with setter call on local object 233s registers an offense and corrects 233s with method ending with square bracket setter on local object 233s registers an offense and corrects 233s with method ending with setter call on ivar 233s accepts 233s when a lvar does not contain any object passed as argument with multiple-assignment at the end of the method 233s registers an offense and corrects 233s with method ending with ivar assignment 233s accepts 233s with method ending with setter call on argument 233s accepts 233s when a lvar contains an object passed as argument at the end of the method 233s accepts the setter call on the lvar 233s when a lvar contains a local object instantiated with literal 233s registers an offense and corrects for the setter call on the lvar 233s when a lvar does not contain any object passed as argument by binary-operator-assignment at the end of the method 233s registers an offense and corrects 233s when a lvar contains a non-local object returned by a method 233s accepts 233s when a lvar declared as an argument is no longer the passed object at the end of the method 233s registers an offense and corrects for the setter call on the lvar 233s with singleton method ending with setter call on local object 233s registers an offense and corrects 233s 233s RuboCop::Cop::Lint::ToJSON 233s registers an offense and corrects using `#to_json` without arguments 233s does not register an offense when using `#to_json` with arguments 233s 233s RuboCop::ConfigStore 233s .for 233s always uses config specified in command line 233s when no config specified in command line 233s searches for config path if not available in cache 233s gets config path and config from cache if available 233s when --force-default-config option is specified 233s uses default config without searching for config path 233s 233s RuboCop::Cop::Style::InfiniteLoop 233s accepts Kernel#loop 233s registers an offense for a while loop with [1] as condition 233s registers an offense for until false if loop {} would work because of previous assignment in a while loop 233s registers an offense for modifier until false if loop {} would not change semantics 233s registers an offense for a until loop with nil as condition 233s registers an offense for a while loop with 2.0 as condition 233s registers an offense for a while loop with {} as condition 233s registers an offense for until false if loop {} would work because the assigned variable is not used afterwards 233s registers an offense for a until loop with false as condition 233s registers an offense for a while loop with 1 as condition 233s accepts while true if loop {} would change semantics 233s registers an offense for while true if loop {} would work because it is an instance variable being assigned 233s registers an offense for while true or until false if loop {} would work because of an earlier assignment 233s accepts modifier while true if loop {} would change semantics 233s behaves like autocorrector 233s autocorrects the usage of while with do 233s autocorrects begin-end-while with two statements 233s autocorrects the usage of while without do 233s autocorrects single line modifier while with and 233s autocorrects begin-end-while with one statement 233s autocorrects single line modifier while 233s with non-default indentation width 233s autocorrects multi-line modifier while and indents correctly 233s behaves like autocorrector 233s autocorrects begin-end-until with two statements 233s autocorrects begin-end-until with one statement 233s autocorrects the usage of until with do 233s autocorrects single line modifier until 233s autocorrects the usage of until without do 233s autocorrects single line modifier until with and 233s with non-default indentation width 233s autocorrects multi-line modifier until and indents correctly 233s 233s RuboCop::Cop::Metrics::CyclomaticComplexity 233s when Max is 2 233s counts stupid nested if and else blocks 233s when AllowedPatterns is enabled 233s does not register an offense when defining a class method 233s does not register an offense when defining an instance method 233s does not register an offense when using `define_method` 233s when AllowedMethods is enabled 233s does not register an offense when using `define_method` 233s does not register an offense when defining a class method 233s does not register an offense when defining an instance method 233s when Max is 1 233s registers an offense for a ternary operator 233s registers an offense for and 233s registers an offense for &. 233s registers an offense for || 233s registers an offense for a rescue block 233s accepts an empty `define_method` 233s registers an offense for ||= 233s registers an offense for && 233s registers an offense for an elsif block 233s registers an offense for an until block 233s registers an offense for an unless modifier 233s accepts an empty method 233s counts enumerating methods with blocks as +1 233s registers an offense for an if modifier 233s registers an offense for &&= 233s registers an offense for a case/when block 233s registers an offense for or 233s accepts a method with no decision points 233s registers an offense for a while block 233s deals with nested if blocks containing && and || 233s counts repeated &. on same untouched local variable as 1 233s registers an offense for a for block 233s counts enumerating methods with block-pass as +1 233s does not count blocks in general 233s registers an offense for a `define_method` 233s counts only a single method 233s accepts complex code outside of methods 233s Ruby 2.7 233s counts enumerating methods with numblocks as +1 233s 233s RuboCop::RakeTask 233s defining tasks 233s creates a named task and a named autocorrect task 233s creates a named task and a named auto_correct task 233s creates a rubocop task and a rubocop autocorrect task 233s creates a rubocop task and a rubocop auto_correct task 233s running tasks 233s allows nested arrays inside formatters, options, and requires 233s runs with specified options if a block is given 233s runs with default options 233s uses the default formatter from .rubocop.yml if no formatter option is given 233s will not error when result is not 0 and fail_on_error is false 233s exits when result is not 0 and fail_on_error is true 233s autocorrect 233s runs with --autocorrect 233s runs with with the options that were passed to its parent task 233s runs with --autocorrect-all 233s 233s RuboCop::Cop::Style::ModuleFunction 233s when enforced style is `module_function` 233s accepts for `extend self` in a module with private methods 233s registers an offense for `extend self` in a module 233s accepts `extend self` in a class 233s accepts for `extend self` in a module with declarative private 233s when enforced style is `extend_self` 233s accepts module_function with an argument 233s registers an offense for `module_function` without an argument 233s when enforced style is `forbidden` 233s registers an offense for `module_function` without an argument 233s accepts `extend self` in a class 233s registers an offense for `extend self` 233s in a module with private methods 233s in a module 233s in a module with declarative private 233s 233s RuboCop::Cop::Lint::OrderedMagicComments 233s registers an offense and corrects when `-*- encoding : ascii-8bit -*-` magic comment does not precede all other magic comments 233s registers an offense and corrects when `coding` magic comment does not precede all other magic comments 233s does not register an offense when using `encoding: Encoding::SJIS` Hash notation after`frozen_string_literal` magic comment 233s does not register an offense when using `frozen_string_literal` magic comment only 233s registers an offense and corrects when using `frozen_string_literal` magic comment is next of shebang 233s does not register an offense when using `encoding` magic comment only 233s registers an offense and corrects when an `encoding` magic comment does not precede all other magic comments 233s does not register an offense when using `encoding` magic comment is first line 233s does not register an offense when using `encoding` magic comment is next of shebang 233s 233s RuboCop::Cop::Layout::EmptyComment 233s registers an offense and corrects an empty comment without space next to code 233s register offenses and correct multiple aligned empty comments next to code 233s does not register an offense when using comment text 233s registers an offense and corrects using an empty comment next to code 233s register offenses and correct multiple empty comments next to code 233s registers an offense and corrects using single line empty comment 233s does not register an offense when using comment text with leading and trailing blank lines 233s registers an offense and corrects using multiline empty comments 233s disallow margin comment 233s registers an offense and corrects using margin comment 233s allow margin comment (default) 233s does not register an offense when using margin comment 233s disallow border comment 233s registers an offense and corrects using single line empty comment 233s registers an offense and corrects using border comment 233s allow border comment (default) 233s does not register an offense when using border comment 233s 233s RuboCop::Cop::Style::TernaryParentheses 233s configured for parentheses on complex and there are parens 233s accepts condition including a range 233s with an assignment condition 233s accepts accepts safe multiple assignment 233s accepts safe assignment as part of multiple assignment 233s accepts safe assignment 233s accepts equality check 233s behaves like safe assignment disabled 233s registers an offense for parens around outer assignment 233s registers an offense for parens around inner assignment 233s registers an offense for parens around assignment 233s with a complex condition 233s registers an offense when calling method on a receiver 233s registers an offense for defined with class method in condition 233s registers an offense for defined with nested constant in condition 233s accepts boolean expression 233s registers an offense for defined with variable in condition 233s accepts boolean expression using keywords 233s registers an offense for defined with method chain in condition 233s with method call condition 233s registers an offense when calling method with a parameter 233s registers an offense when calling method on a receiver 233s registers an offense for defined check 233s with accessor in method call parameters 233s registers an offense for array include? with multiple parameters with parens 233s registers an offense for array include? without parens 233s registers an offense for array include? with multiple parameters without parens 233s without accessor in method call parameters 233s registers an offense for array include? with parens 233s registers an offense for array include? without parens 233s with a simple condition 233s registers an offense with preceding boolean keyword expression 233s registers an offense for query method in condition 233s registers an offense for yield in condition 233s registers an offense for save navigation 233s registers an offense for accessor in condition 233s when configured to enforce parentheses omission 233s accepts condition including a range 233s with a complex condition 233s registers an offense for boolean expression 233s registers an offense for defined with method chain in condition 233s registers an offense for boolean expression using keyword 233s registers an offense for defined with variable in condition 233s registers an offense for negated condition 233s accepts parens around inner boolean expression 233s registers an offense for equality check 233s registers an offense for query method on object 233s registers an offense for defined with nested constant in condition 233s registers an offense for defined with class method in condition 233s registers an offense for arithmetic expression 233s with an unparenthesized method call condition 233s registers an offense for defined check 233s registers an offense when calling method with a parameter 233s when calling method on a receiver 233s registers an offense 233s when calling method on a literal receiver 233s registers an offense 233s when calling method on a constant receiver 233s registers an offense 233s when calling method with multiple arguments 233s registers an offense 233s with no space between the parentheses and question mark 233s registers an offense 233s with one line pattern matching 233s does not register an offense 233s with a simple condition 233s registers an offense for query method in condition 233s registers an offense for accessor in condition 233s registers an offense for multi-line boolean expression 233s registers an offense for yield in condition 233s accepts multi-line boolean expression starting on following line 233s with an assignment condition 233s registers an offense for equality check 233s accepts double safe assignment 233s accepts safe assignment as part of multiple assignment 233s accepts safe assignment 233s behaves like safe assignment disabled 233s registers an offense for parens around inner assignment 233s registers an offense for parens around assignment 233s registers an offense for parens around outer assignment 233s with one line pattern matching 233s does not register an offense 233s when configured to enforce parentheses inclusion 233s with an assignment condition 233s registers an offense for triple assignment 233s registers an offense for double assignment 233s registers an offense for double assignment with equality check in condition 233s accepts safe assignment in condition 233s with a simple condition 233s registers an offense for query method in condition 233s registers an offense for yield in condition 233s registers an offense for accessor in condition 233s with a complex condition 233s registers an offense for boolean expression containing parens 233s registers an offense for boolean expression using keyword 233s registers an offense for defined? with method chain in condition 233s registers an offense for defined? with nested constant in condition 233s registers an offense for defined? with variable in condition 233s registers an offense for negated condition 233s registers an offense for equality check 233s registers an offense for defined? with class method in condition 233s registers an offense when calling method on a receiver 233s registers an offense for boolean expression 233s registers an offense for arithmetic condition 233s configured for parentheses on complex and there are no parens 233s with complex condition 233s registers an offense for boolean expression 233s registers an offense for comparison with multiplication 233s registers an offense for comparison 233s registers an offense for compound boolean expression 233s registers an offense for subtraction expression 233s registers an offense for comparison with method call on receiver 233s registers an offense for arithmetic and equality check 233s registers an offense for boolean expression with inner parens 233s registers an offense comparison with exponentiation 233s registers an offense for addition expression 233s with an assignment condition 233s registers an offense for equality check 233s accepts safe assignment 233s 233s RuboCop::Cop::Layout::MultilineMethodArgumentLineBreaks 233s when many arguments including hash are on multiple lines, three on same line 233s registers an offense and corrects 233s when one argument on same line 233s does not add any offenses 233s when there are multiple arguments on the first line 233s registers an offense and corrects starting from the 2nd argument 233s when argument starts on same line but ends on different line 233s registers an offense and corrects 233s when second argument starts on same line as end of first 233s registers an offense and corrects 233s when many arguments are on multiple lines, three on same line 233s registers an offense and corrects 233s when many arguments are on multiple lines, two on same line 233s registers an offense and corrects 233s when two arguments are on next line 233s does not add any offenses 233s when bracket hash assignment on multiple lines 233s does not add any offenses 233s when bracket hash assignment key on multiple lines 233s does not add any offenses 233s 233s RuboCop::Cop::Lint::DuplicateHashKey 233s target ruby version >= 2.6 233s behaves like duplicated literal key 233s registers an offense for duplicated `(42..)` hash keys 233s behaves like duplicated non literal key 233s does not register an offense for duplicated `(x && false)` hash keys 233s behaves like duplicated literal key 233s registers an offense for duplicated `{ :a => 1, :b => 2 }` hash keys 233s behaves like duplicated literal key 233s registers an offense for duplicated `nil` hash keys 233s behaves like duplicated non literal key 233s does not register an offense for duplicated `%r{abx#{foo}}ixo` hash keys 233s behaves like duplicated non literal key 233s does not register an offense for duplicated `"#{some_method_call}"` hash keys 233s behaves like duplicated literal key 233s registers an offense for duplicated `"#{2}"` hash keys 233s behaves like duplicated literal key 233s registers an offense for duplicated `%r{abx}ixo` hash keys 233s behaves like duplicated literal key 233s registers an offense for duplicated `(1)` hash keys 233s behaves like duplicated literal key 233s registers an offense for duplicated `1.0` hash keys 233s behaves like duplicated non literal key 233s does not register an offense for duplicated `some_method_call(x, y)` hash keys 233s behaves like duplicated non literal key 233s does not register an offense for duplicated `{ :sym => some_method_call }` hash keys 233s When a key is duplicated three times in a hash literal 233s registers two offenses 233s when there are two duplicated keys in a hash 233s registers two offenses 233s behaves like duplicated non literal key 233s does not register an offense for duplicated `(x == false)` hash keys 233s behaves like duplicated literal key 233s registers an offense for duplicated `(false or true)` hash keys 233s behaves like duplicated literal key 233s registers an offense for duplicated `1` hash keys 233s behaves like duplicated non literal key 233s does not register an offense for duplicated `{ some_method_call => :sym }` hash keys 233s behaves like duplicated literal key 233s registers an offense for duplicated `!true` hash keys 233s behaves like duplicated literal key 233s registers an offense for duplicated `{ a: 1, b: 2 }` hash keys 233s behaves like duplicated literal key 233s registers an offense for duplicated `[1, 2, 3]` hash keys 233s behaves like duplicated non literal key 233s does not register an offense for duplicated `[some_method_call]` hash keys 233s When there is no duplicated key in the hash 233s does not register an offense 233s behaves like duplicated literal key 233s registers an offense for duplicated `(false <=> true)` hash keys 233s behaves like duplicated non literal key 233s does not register an offense for duplicated `(x or false)` hash keys 233s behaves like duplicated literal key 233s registers an offense for duplicated `(false && true)` hash keys 233s when there is a duplicated key in the hash literal 233s registers an offense 233s behaves like duplicated non literal key 233s does not register an offense for duplicated `/.#{some_method_call}/` hash keys 233s behaves like duplicated non literal key 233s does not register an offense for duplicated `some_method_call` hash keys 233s behaves like duplicated literal key 233s registers an offense for duplicated `false` hash keys 233s behaves like duplicated literal key 233s registers an offense for duplicated `/./` hash keys 233s behaves like duplicated literal key 233s registers an offense for duplicated `'str'` hash keys 233s 233s RuboCop::Cop::Lint::RedundantSafeNavigation 233s registers an offense and corrects when `&.` is used inside `unless` condition 234s does not register an offense when using `&.` outside of conditions 234s does not register an offense when using `&.` with non-allowed method in condition 234s does not register an offense when using `&.respond_to?` with `nil` specific method as argument in condition 234s registers an offense and corrects when `&.` is used inside complex condition 234s registers an offense and corrects when `&.` is used inside `#{loop_type}` condition 234s registers an offense and corrects when `&.` is used inside `if` condition 234s registers an offense and corrects when `&.` is used inside `#{loop_type}` condition 234s 234s RuboCop::Cop::Style::IfUnlessModifier 234s adds parens in autocorrect when if-end used with `&&` operator 234s accepts if-end when used as LHS of binary arithmetic 234s accepts if-end followed by a chained call using `&.` 234s accepts code with EOL comment since user might want to keep it 234s accepts if-end followed by a chained call using `.` 234s accepts if/elsif 234s adds parens in autocorrect when if-end used with `||` operator 234s accepts if-else-end 234s behaves like condition modifier cop 234s for a multiline 'unless' 234s doesn't break when used as RHS of constant assignment 234s handles one-line usage 234s accepts it when condition has local variable assignment 234s accepts an empty body 234s accepts it if body spans more than one line 234s doesn't break when used as RHS of binary arithmetic 234s corrects it if result fits in one line 234s corrects it when assignment is in body 234s doesn't break when used as RHS of instance var assignment 234s doesn't break when used as RHS of class var assignment 234s handles inline comments during autocorrection 234s doesn't break when used as RHS of local var assignment 234s accepts it if single line would not fit on one line 234s accepts multiline condition in modifier form 234s registers an offense 234s when Layout/LineLength is disabled 234s registers an offense even for a long modifier statement 234s when there is a comment on the first line and some code after the end keyword 234s does not register an offense 234s if-end is argument to a non-parenthesized method call 234s adds parentheses so as not to change meaning 234s multiline if that fits on one line with comment on first line 234s registers an offense and preserves comment 234s multiline unless that fits on one line 234s registers an offense 234s with tabs used for indentation 234s with Layout/IndentationWidth: Width config 234s behaves like with tabs indentation 234s it doesn't fit on one line 234s doesn't register an offense 234s it fits on one line 234s registers an offense 234s with Layout/IndentationStyle: IndentationWidth config 234s behaves like with tabs indentation 234s it fits on one line 234s registers an offense 234s it doesn't fit on one line 234s doesn't register an offense 234s modifier if that does not fit on one line 234s when Layout/LineLength is disabled with enable/disable comments 234s accepts 234s when Layout/LineLength is enabled 234s corrects it to normal form 234s IgnoreCopDirectives 234s and the long line is allowed because IgnoreCopDirectives is true 234s accepts 234s and the long line is too long because IgnoreCopDirectives is false 234s registers an offense 234s and the long line is too long because AllowURI is false 234s registers an offense 234s when variable assignment is used in the branch body of if modifier 234s registers an offense 234s when using a method with heredoc argument 234s accepts 234s and the long line is allowed because AllowURI is true 234s accepts 234s when Layout/LineLength is disabled in configuration 234s accepts 234s when Layout/LineLength is disabled with an EOL comment 234s accepts 234s multiline if that fits on one line with comment near end 234s accepts 234s behaves like condition modifier cop 234s for a multiline 'if' 234s accepts an empty body 234s accepts it when condition has local variable assignment 234s accepts it if body spans more than one line 234s corrects it if result fits in one line 234s doesn't break when used as RHS of class var assignment 234s handles inline comments during autocorrection 234s doesn't break when used as RHS of local var assignment 234s handles one-line usage 234s corrects it when assignment is in body 234s doesn't break when used as RHS of binary arithmetic 234s doesn't break when used as RHS of constant assignment 234s accepts it if single line would not fit on one line 234s doesn't break when used as RHS of instance var assignment 234s accepts multiline condition in modifier form 234s registers an offense 234s when Layout/LineLength is disabled 234s registers an offense even for a long modifier statement 234s when there is a comment on the first line and some code after the end keyword 234s does not register an offense 234s when if-end condition is a value in a hash 234s when it is short enough to fit on a single line 234s corrects it to the single-line form 234s when it is not short enough to fit on a single line 234s accepts it in the multiline form 234s if-end is argument to a parenthesized method call 234s adds parentheses because otherwise it would cause SyntaxError 234s with implicit match conditional 234s when a multiline if doesn't fit on one line 234s accepts 234s when a multiline if fits on one line 234s registers an offense 234s with a named regexp capture on the LHS 234s does not register an offense 234s short multiline if near an else etc 234s registers an offense 234s unless-end with conditional as body 234s accepts 234s if-end with conditional as body 234s accepts 234s when if-end condition is assigned to a variable 234s with variable being on the same line 234s when it is not short enough to fit on a single line 234s accepts it in the multiline form 234s when it is short enough to fit on a single line 234s corrects it to the single-line form 234s with variable being on the previous line 234s when it is not short enough to fit on a single line 234s accepts it in the multiline form 234s when it is short enough to fit on a single line 234s corrects it to the single-line form 234s modifier if that does not fit on one line, but is not the only statement on the line 234s accepts 234s multiline if that fits on one line 234s registers an offense 234s and has two statements separated by semicolon 234s accepts 234s when if-end condition has some code after the end keyword 234s when it is not short enough to fit on a single line 234s accepts it in the multiline form 234s when it is short enough to fit on a single line 234s corrects it to the single-line form 234s when if-end condition has a first line comment 234s when it is not short enough to fit on a single line 234s accepts it in the multiline form 234s when it is short enough to fit on a single line 234s corrects it to the single-line form 234s when if-end condition is an element of an array 234s when not short enough to fit on a single line 234s accepts it in the multiline form 234s when short enough to fit on a single line 234s corrects it to the single-line form 234s when Layout/LineLength is disabled 234s registers an offense even for a long modifier statement 234s 234s RuboCop::Cop::Style::FileWrite 234s registers an offense for and corrects the `File.open` with multiline write block (mode 'w+b') 234s registers an offense for and corrects `File.open(filename, 'w+b').write(content)` 234s registers an offense for and corrects `::File.open(filename, 'wb').write(content)` 234s registers an offense for and corrects the `File.open` with multiline write block (mode 'wt') with heredoc 234s registers an offense for and corrects `::File.open(filename, 'w+t').write(content)` 234s registers an offense for and corrects the `File.open` with inline write block (mode 'w+t') 234s registers an offense for and corrects `File.open(filename, 'wt').write(content)` 234s registers an offense for and corrects the `File.open` with inline write block (mode 'w+') 234s registers an offense for and corrects `File.open(filename, 'wb').write(content)` 234s registers an offense for and corrects the `File.open` with multiline write block (mode 'w+t') with heredoc 234s registers an offense for and corrects the `File.open` with multiline write block (mode 'w') with heredoc 234s registers an offense for and corrects `File.open(filename, 'w').write(content)` 234s registers an offense for and corrects the `File.open` with multiline write block (mode 'w+') with heredoc 234s registers an offense for and corrects the `File.open` with multiline write block (mode 'wb') with heredoc 234s registers an offense for and corrects the `File.open` with inline write block (mode 'w+b') 234s registers an offense for and corrects `::File.open(filename, 'wt').write(content)` 234s registers an offense for and corrects the `File.open` with multiline write block (mode 'w+t') 234s does not register an offense when a splat argument is passed to `f.write` 234s registers an offense for and corrects the `File.open` with multiline write block (mode 'wb') 234s registers an offense for and corrects the `File.open` with inline write block (mode 'w') 234s registers an offense for and corrects the `File.open` with multiline write block (mode 'wt') 234s registers an offense for and corrects `::File.open(filename, 'w').write(content)` 234s registers an offense for and corrects the `File.open` with multiline write block (mode 'w+') 234s does not register an offense for the `File.open` with multiline write block when not writing to the block variable 234s registers an offense for and corrects `::File.open(filename, 'w+').write(content)` 234s registers an offense for and corrects `File.open(filename, 'w+').write(content)` 234s registers an offense for and corrects `File.open(filename, 'w+t').write(content)` 234s registers an offense for and corrects the `File.open` with multiline write block (mode 'w') 234s registers an offense for and corrects `::File.open(filename, 'w+b').write(content)` 234s registers an offense for and corrects the `File.open` with inline write block (mode 'wb') 234s registers an offense for and corrects the `File.open` with multiline write block (mode 'w+b') with heredoc 234s registers an offense for and corrects the `File.open` with inline write block (mode 'wt') 234s 234s RuboCop::Cop::Style::MultilineIfThen 234s does not get confused by a then in a when 234s does not raise an error for an implicit match unless 234s does not raise an error for an implicit match if 234s does not get confused by a postfix unless 234s does not get confused by a commented-out then 234s registers an offense for then in multiline elsif 234s does not get confused by empty elsif branch 234s registers an offense for then in multiline if 234s does not get confused by a nested postfix unless 234s accepts table style if/then/elsif/ends 234s registers an offense for then in multiline unless 234s 234s RuboCop::Cop::VariableForce::Assignment 234s #name 234s returns the variable name 234s #meta_assignment_node 234s when it is &&= operator assignment 234s returns and_asgn node 234s when it is += operator assignment 234s returns op_asgn node 234s when it is ||= operator assignment 234s returns or_asgn node 234s when it is multiple assignment 234s returns masgn node 234s #operator 234s when it is += operator assignment 234s returns += 234s when it is multiple assignment 234s returns = 234s when it is &&= operator assignment 234s returns &&= 234s when it is ||= operator assignment 234s returns ||= 234s when it is normal assignment 234s returns = 234s .new 234s when any other type node is passed 234s raises error 234s when an argument declaration node is passed 234s raises error 234s when an assignment node is passed 234s does not raise error 234s 234s RuboCop::Cop::Naming::ClassAndModuleCamelCase 234s accepts CamelCase names 234s is not fooled by qualified names 234s registers an offense for underscore in class and module name 234s allows module_parent method 234s custom allowed names 234s does not register offense for multiple allowed names 234s 234s RuboCop::Cop::Style::Proc 234s accepts the Proc.new call without block 234s accepts the ::Proc.new call without block 234s registers an offense for a Proc.new call 234s registers an offense for ::Proc.new 234s Ruby 2.7 234s registers an offense for a Proc.new call 234s 234s RuboCop::Cop::Style::DoubleCopDisableDirective 234s does not register an offense for cops with single cop directive 234s registers an offense for duplicate disable directives 234s registers an offense for duplicate todo directives 234s 234s RuboCop::Cop::InternalAffairs::UselessMessageAssertion 234s registers an offense for specs that expect offense using the MSG 234s registers an offense for described_class::MSG in let 234s does not register an offense for an assertion about the message 234s registers an offense for specs that assert using the MSG 234s 234s RuboCop::Cop::Naming::ConstantName 234s checks qualified const names 234s allows screaming snake case in multiple const assignment 234s does not check names if rhs is a `Class.new` with conditional assign 234s registers an offense for camel case in const name 234s does not check names if rhs is a `Struct.new` 234s registers 1 offense if rhs is offending const assignment 234s does not check names if rhs is a method call 234s does not check if rhs is another constant 234s registers an offense for camel case in const namewhen using frozen object assignment 234s allows screaming snake case with POSIX upper case characters 234s registers an offense for snake case in const name 234s allows screaming snake case in const name 234s does not check names if rhs is a `Class.new` 234s registers an offense for camel case in const namewhen using frozen range assignment 234s registers offenses for camel case in multiple const assignment 234s does not check if rhs is a non-offensive const assignment 234s registers an offense for non-POSIX upper case in const name 234s does not check names if rhs is a `Struct.new` with conditional assign 234s does not check names if rhs is a method call with conditional assign 234s does not check names if rhs is a method call with block 234s when a rhs is a conditional expression 234s when conditional branches contain only string values 234s registers an offense 234s when conditional branches contain a value other than a constant 234s does not check names 234s when conditional branches contain only constants 234s does not check names 234s 234s RuboCop::Cop::Lint::RegexpAsCondition 234s does not register an offense for a regexp literal with `=~` operator 234s does not register an offense for a regexp literal outside conditions 234s registers an offense and corrects for a regexp literal in `if` condition 234s 234s RuboCop::Cop::VariableForce::VariableTable 234s #current_scope_level 234s increases by pushing scope 234s decreases by popping scope 234s #declare_variable 234s adds variable to current scope with its name as key 234s returns the added variable 234s #find_variable with an empty scope stack 234s returns nil 234s #pop_scope 234s returns popped scope object 234s #push_scope 234s returns pushed scope object 234s #find_variable 234s when current scope is block 234s when a variable with the target name does not exist in current scope 234s but exists in the direct outer scope 234s returns the direct outer scope variable 234s but exists in a indirect outer scope 234s when the direct outer scope is not block 234s returns nil 234s when the direct outer scope is block 234s returns the indirect outer scope variable 234s and does not exist in all outer scopes 234s returns nil 234s when a variable with the target name exists in current scope 234s and also exists in outer scope 234s returns the current scope variable 234s and does not exist in outer scope 234s returns the current scope variable 234s when current scope is not block 234s when a variable with the target name does not exist in current scope 234s but exists in the direct outer scope 234s returns nil 234s and does not exist in all outer scopes 234s returns nil 234s when a variable with the target name exists in current scope 234s and does not exist in outer scope 234s returns the current scope variable 234s and also exists in outer scope 234s returns the current scope variable 234s #accessible_variables 234s when there are no variables 234s returns empty array 234s when the current scope has some variables 234s returns all the variables 234s when the direct outer scope has some variables 234s and the current scope is block 234s returns the current and direct outer scope variables 234s and the current scope is not block 234s returns only the current scope variables 234s 234s RuboCop::Cop::Layout::MultilineArrayBraceLayout 234s ignores empty arrays 234s ignores implicit arrays 234s ignores single-line arrays 234s when comment present before closing brace 234s corrects closing brace without crashing 234s behaves like multiline literal brace layout method argument 234s when arguments to a method 234s but no comment after the last element 234s autocorrects the closing brace 234s and a comment after the last element 234s detects closing brace on separate line from last element 234s behaves like multiline literal brace layout trailing comma 234s symmetrical style 234s opening brace on same line as first element 234s last element has a trailing comma 234s autocorrects closing brace on different line from last element 234s same_line style 234s opening brace on same line as first element 234s last element has a trailing comma 234s autocorrects closing brace on different line as last element 234s behaves like multiline literal brace layout 234s symmetrical style 234s opening brace on separate line from first element 234s allows closing brace on separate line from last element 234s allows closing brace on separate line from last multiline element 234s detects closing brace on same line as last element 234s opening brace on same line as first element 234s allows closing brace on same line as last element 234s detects closing brace on different line from last element 234s autocorrects closing brace on different line from last element 234s allows closing brace on same line as last multiline element 234s with a chained call on the closing brace 234s and a comment after the last element 234s detects closing brace on separate line from last elementbut does not autocorrect the closing brace 234s but no comment after the last element 234s autocorrects the closing brace 234s same_line style 234s opening brace on same line as first element 234s detects closing brace on different line from multiline element 234s allows closing brace on same line from last element 234s autocorrects closing brace on different line as last element 234s allows closing brace on same line as multi-line element 234s with a chained call on the closing brace 234s but no comment after the last element 234s autocorrects the closing brace 234s and a comment after the last element 234s detects closing brace on separate line from last elementbut does not autocorrect the closing brace 234s opening brace on separate line from first element 234s allows closing brace on same line as last multiline element 234s allows closing brace on same line as last element 234s detects closing brace on different line from last element 234s new_line style 234s opening brace on separate line from first element 234s detects closing brace on same line as last element 234s allows closing brace on separate line from last element 234s allows closing brace on separate line from last multiline element 234s opening brace on same line as first element 234s detects closing brace on same line as last multiline element 234s allows closing brace on different line from last element 234s allows closing brace on different line from multi-line element 234s autocorrects closing brace on same line as last element 234s heredoc 234s ignores heredocs that could share a last line 234s detects heredoc structures that are safe to add to 234s 234s RuboCop::Cop::Layout::EmptyLinesAroundMethodBody 234s registers an offense for class method body ending with a blank 234s registers an offense for method body ending with a blank 234s is not fooled by single line methods 234s registers an offense for method body starting with a blank 234s registers an offense for class method body starting with a blank 234s accepts method body starting with a line with spaces 234s 234s RuboCop::Cop::Layout::FirstArgumentIndentation 234s when EnforcedStyle is special_for_inner_method_call_in_parentheses 234s for method calls within method calls 234s with outer parentheses 234s accepts a correctly indented first argument with fullwidth characters 234s registers an offense and corrects an over-indented first argument 234s registers an offense and corrects an under-indented first argument 234s accepts a correctly indented first argument in interpolation 234s without outer parentheses 234s accepts a first argument with consistent style indentation 234s when IndentationWidth:Width is 2 234s registers an offense and corrects an over-indented first argument on a pipe method name 234s accepts a first argument that is not preceded by a line break 234s registers an offense and corrects an over-indented first argument on an alphanumeric method name 234s registers an offense and corrects an over-indented first argument of `super` 234s does not view []= as an outer method call 234s registers an offense and corrects an over-indented first argument 234s registers an offense and corrects an under-indented first argument 234s registers an offense and corrects an over-indented first argument on a plus sign method name 234s registers an offense and corrects lines affected by another offense 234s accepts method calls with no arguments 234s accepts operator calls 234s does not view chained call as an outer method call 234s for assignment 234s accepts a correctly indented first argument and does not care about the second argument 234s with line break 234s accepts a correctly indented first argument 234s registers an offense and corrects an under-indented first argument 234s for a setter call 234s accepts an unindented value 234s when the receiver contains a line break 234s accepts a correctly indented first argument 234s accepts a correctly indented first argument preceded by an empty line 234s registers an offense and corrects an over-indented first argument 234s when preceded by a comment line 234s registers an offense and corrects an under-indented first argument 234s accepts a correctly indented first argument 234s when using safe navigation operator 234s registers an offense and corrects an under-indented 1st argument 234s when indentation width is overridden for this cop only 234s registers an offense and corrects an over-indented first argument 234s accepts a correctly indented first argument 234s when IndentationWidth:Width is 4 234s registers an offense and corrects an over-indented first argument 234s when EnforcedStyle is consistent_relative_to_receiver 234s when IndentationWidth:Width is 4 234s registers an offense and corrects an over-indented first argument 234s for method calls within method calls 234s with outer parentheses 234s registers an offense and corrects an over-indented 1st argument 234s indents all relative to the receiver 234s without outer parentheses 234s indents all relative to the receiver 234s accepts a first argument with special indentation 234s when indentation width is overridden for this cop only 234s registers an offense and corrects an over-indented first argument 234s accepts a correctly indented first argument 234s when IndentationWidth:Width is 2 234s does not view []= as an outer method call 234s does not register an offense when argument has expected indent width and the method is preceded by splat 234s accepts method calls with no arguments 234s accepts a first argument that is not preceded by a line break 234s registers an offense and corrects an over-indented first argument 234s does not register an offense when argument has expected indent width and the method is preceded by double splat 234s does not view chained call as an outer method call 234s registers an offense and corrects lines affected by other offenses 234s accepts operator calls 234s registers an offense and corrects an under-indented first argument 234s for assignment 234s register an offense and corrects a correctly indented first argument and does not care about the second argument 234s with line break 234s registers an offense and corrects an under-indented first argument 234s accepts a correctly indented first argument 234s when the receiver contains a line break 234s accepts a correctly indented first argument 234s registers an offense and corrects an over-indented 1st argument 234s accepts a correctly indented first argument preceded by an empty line 234s when preceded by a comment line 234s registers an offense and corrects an under-indented first argument 234s accepts a correctly indented first argument 234s when EnforcedStyle is special_for_inner_method_call 234s for method calls within method calls 234s with outer parentheses 234s registers an offense and corrects an over-indented first argument 234s without outer parentheses 234s accepts a first argument with special indentation 234s when indentation width is overridden for this cop only 234s registers an offense and corrects an over-indented first argument 234s accepts a correctly indented first argument 234s when IndentationWidth:Width is 2 234s registers an offense and corrects lines affected by another offense 234s accepts method calls with no arguments 234s accepts a first argument that is not preceded by a line break 234s registers an offense and corrects an under-indented first argument 234s registers an offense and corrects an over-indented first argument 234s does not view chained call as an outer method call 234s registers an offense and corrects an over-indented first argument on an alphanumeric method name 234s does not view []= as an outer method call 234s registers an offense and corrects an over-indented first argument of `super` 234s registers an offense and corrects an over-indented first argument on a pipe method name 234s accepts operator calls 234s registers an offense and corrects an over-indented first argument on a plus sign method name 234s when the receiver contains a line break 234s registers an offense and corrects an over-indented first argument 234s accepts a correctly indented first argument 234s accepts a correctly indented first argument preceded by an empty line 234s when preceded by a comment line 234s accepts a correctly indented first argument 234s registers an offense and corrects an under-indented first argument 234s for assignment 234s accepts a correctly indented first argument and does not care about the second argument 234s with line break 234s accepts a correctly indented first argument 234s registers an offense and corrects an under-indented first argument 234s when using safe navigation operator 234s registers an offense and corrects an under-indented 1st argument 234s for a setter call 234s accepts an unindented value 234s when IndentationWidth:Width is 4 234s registers an offense and corrects an over-indented first argument 234s when EnforcedStyle is consistent 234s for method calls within method calls 234s registers an offense and corrects an over-indented first argument 234s accepts first argument indented relative to previous line 234s when IndentationWidth:Width is 4 234s registers an offense and corrects an over-indented first argument 234s when indentation width is overridden for this cop only 234s registers an offense and corrects an over-indented first argument 234s accepts a correctly indented first argument 234s when IndentationWidth:Width is 2 234s does not view chained call as an outer method call 234s registers an offense and corrects an over-indented first argument on a plus sign method name 234s accepts operator calls 234s registers an offense and corrects an over-indented first argument on a pipe method name 234s does not view []= as an outer method call 234s registers an offense and corrects an over-indented first argument of `super` 234s accepts method calls with no arguments 234s accepts a first argument that is not preceded by a line break 234s registers an offense and corrects lines affected by another offense 234s registers an offense and corrects an over-indented first argument on an alphanumeric method name 234s registers an offense and corrects an under-indented first argument 234s registers an offense and corrects an over-indented first argument 234s for a setter call 234s accepts an unindented value 234s when the receiver contains a line break 234s registers an offense and corrects an over-indented first argument 234s accepts a correctly indented first argument preceded by an empty line 234s accepts a correctly indented first argument 234s when preceded by a comment line 234s registers an offense and corrects an under-indented first argument 234s accepts a correctly indented first argument 234s for assignment 234s accepts a correctly indented first argument and does not care about the second argument 234s with line break 234s registers an offense and corrects an under-indented first argument 234s accepts a correctly indented first argument 234s when using safe navigation operator 235s registers an offense and corrects an under-indented 1st argument 235s 235s RuboCop::Cop::Style::OptionalBooleanParameter 235s does not register an offense when defining method without args 235s registers an offense when defining method with multiple optional boolean args 235s registers an offense when defining method with optional boolean arg 235s registers an offense when defining method with optional boolean arg that has no space 235s registers an offense when defining class method with optional boolean arg 235s does not register an offense when defining method with keyword boolean arg 235s does not register an offense when defining method with optional non-boolean arg 235s when AllowedMethods is not empty 235s does not register an offense 235s 235s RuboCop::Cop::Lint::EmptyEnsure 235s does not register an offense for non-empty ensure 235s registers an offense and corrects empty ensure 235s 235s RuboCop::Cop::AlignmentCorrector 235s #correct 235s within string literals 235s does not insert whitespace 235s with large column deltas 235s with heredoc in backticks (<<``) 235s behaves like heredoc indenter 235s does not change indentation of here doc bodies and end markers 235s with plain heredoc (<<) 235s behaves like heredoc indenter 235s does not change indentation of here doc bodies and end markers 235s with single-line here docs 235s does not indent body and end marker 235s simple indentation 235s with a positive column delta 235s indents 235s with a negative column delta 235s outdents 235s 235s RuboCop::Cop::Layout::SpaceBeforeFirstArg 235s for method calls without parentheses 235s accepts setter call 235s accepts multiple space containing line break 235s registers an offense and corrects method call with two spaces before the first arg 235s registers an offense for method call with no spaces before the first arg 235s accepts a method call with one space before the first arg 235s accepts + operator 235s when using safe navigation operator 235s registers an offense and corrects method call with two spaces before the first arg 235s when AllowForAlignment is false 235s registers an offense and corrects method calls with aligned first arguments 235s when AllowForAlignment is true 235s accepts method calls with aligned first arguments 235s when a vertical argument positions are aligned 235s registers an offense 235s for method calls with parentheses 235s accepts a method call without space 235s accepts a method call with space after the left parenthesis 235s 235s RuboCop::Cop::Lint::OutOfRangeRegexpRef 235s ignores `match` with no arguments 235s does not register offense to a regexp with encoding option and valid references for numbered captures 235s ignores calls to `match?` 235s does not register an offense regexp containing non literal 235s does not register offense to a regexp with valid references for numbered captures 235s registers an offense when references are used before any regexp 235s does not register offense to a regexp with valid references for a mix named and numbered captures 235s only registers an offense when the regexp is matched as a literal 235s registers an offense when out of range references are used for named captures 235s registers an offense when the regexp appears on the right hand side of `=~` 235s ignores regexp when clause conditions that contain interpolations 235s registers an offense when the regexp is matched with `===` 235s registers an offense when out of range references are used for non captures 235s registers an offense when out of range references are used inside a when clause 235s registers an offense when the regexp is matched with `match` 235s ignores `match` with no receiver 235s uses the maximum number of captures for when clauses with multiple conditions 235s does not register an offense when in range references are used inside a when clause 235s does not register offense to a regexp with valid references for named captures 235s only registers an offense for when clauses when the regexp is matched as a literal 235s registers an offense when out of range references are used for numbered captures 235s registers an offense when out of range references are used for mix of numbered and named captures 235s matching with sub 235s registers an offense when out of range references are used 235s does not register an offense when in range references are used 235s only registers an offense when the regexp is matched as a literal 235s matching with slice! 235s does not register an offense when in range references are used 235s registers an offense when out of range references are used 235s only registers an offense when the regexp is matched as a literal 235s matching with start_with? 235s does not register an offense when in range references are used 235s only registers an offense when the regexp is matched as a literal 235s registers an offense when out of range references are used 235s matching with `[]` 235s only registers an offense when the regexp is matched as a literal 235s registers an offense when out of range references are used 235s does not register an offense when in range references are used 235s when calling a regexp method on a nth-ref node 235s does not register an offense when calling gsub on a valid nth-ref 235s registers an offense when calling gsub on an invalid nth-ref 235s registers an offense if the capturing groups have changed 235s matching with rindex 235s registers an offense when out of range references are used 235s does not register an offense when in range references are used 235s only registers an offense when the regexp is matched as a literal 235s matching with scan 235s does not register an offense when in range references are used 235s registers an offense when out of range references are used 235s only registers an offense when the regexp is matched as a literal 235s matching with rpartition 235s only registers an offense when the regexp is matched as a literal 235s registers an offense when out of range references are used 235s does not register an offense when in range references are used 235s matching with sub! 235s registers an offense when out of range references are used 235s only registers an offense when the regexp is matched as a literal 235s does not register an offense when in range references are used 235s matching with index 235s does not register an offense when in range references are used 235s only registers an offense when the regexp is matched as a literal 235s registers an offense when out of range references are used 235s matching with gsub! 235s registers an offense when out of range references are used 235s does not register an offense when in range references are used 235s only registers an offense when the regexp is matched as a literal 235s matching with `grep` 235s only registers an offense when the regexp is matched as a literal 235s does not register an offense when in range references are used 235s registers an offense when out of range references are used 235s matching with end_with? 235s does not register an offense when in range references are used 235s only registers an offense when the regexp is matched as a literal 235s registers an offense when out of range references are used 235s when both the LHS and RHS use regexp 235s only considers the RHS regexp 235s matching with match 235s does not register an offense when in range references are used 235s registers an offense when out of range references are used 235s only registers an offense when the regexp is matched as a literal 235s matching with partition 235s does not register an offense when in range references are used 235s only registers an offense when the regexp is matched as a literal 235s registers an offense when out of range references are used 235s matching with slice 235s registers an offense when out of range references are used 235s only registers an offense when the regexp is matched as a literal 235s does not register an offense when in range references are used 235s matching with gsub 235s registers an offense when out of range references are used 235s only registers an offense when the regexp is matched as a literal 235s does not register an offense when in range references are used 235s 235s isolated environment 235s is not affected by a config file above the work directory 235s 235s RuboCop::Cop::Style::Not 235s parenthesizes when `not` is applied to or 235s autocorrects "not" followed by parens with ! 235s uses the reverse operator when `not` is applied to a comparison 235s parenthesizes when `not` is applied to a ternary op 235s parenthesizes when `not` would change the meaning of a binary exp 235s autocorrects "not" with ! 235s registers an offense for not 235s does not register an offense for ! 235s parenthesizes when `not` is applied to and 235s 235s RuboCop::Cop::Lint::SafeNavigationChain 235s >= Ruby 2.7 235s registers an offense for ordinary method chain exists after safe navigation method call with a block using numbered parameter 235s TargetRubyVersion >= 2.3 235s registers an offense for safe navigation with <= operator 235s registers an offense for safe navigation with + operator 235s registers an offense for ordinary method chain exists after safe navigation method call with a block 235s registers an offense for ordinary method chain exists after safe navigation method call with an argument 235s accepts usages of method chain with safe navigation only 235s accepts usages of method chain with safe navigation only with argument 235s accepts usages of safe navigation with self assignment method 235s accepts usages of safe navigation with `nil?` method 235s accepts usages of safe navigation with || operator 235s accepts usages of ordinary method chain 235s accepts usages of safe navigation with `-@` method 235s accepts usages of safe navigation with `+@` method 235s registers an offense for safe navigation with > operator 235s registers an offense for ordinary method call exists after safe navigation method call 235s accepts usages of safe navigation with `present?` method 235s accepts usages of safe navigation with `blank?` method 235s accepts usages of safe navigation with == operator 235s accepts usages of safe navigation with && operator 235s registers an offense for ordinary method chain exists after safe navigation method call 235s accepts usages of safe navigation with `to_d` method 235s accepts usages of safe navigation with | operator 235s registers an offense for safe navigation on the right-hand side of the `-` 235s accepts usages of safe navigation with === operator 235s registers an offense for safe navigation with < operator 235s registers an offense for safe navigation on the right-hand side of the `*` 235s registers an offense for safe navigation on the right-hand side of the `+` 235s accepts usages of safe navigation at last only 235s registers an offense for safe navigation with []= operator 235s accepts usages of safe navigation with `try` method 235s registers an offense for ordinary method call exists after safe navigation method call with an argument 235s accepts usages of safe navigation with assignment method 235s accepts usages of safe navigation with `in?` method 235s accepts usages of safe navigation at last only with argument 235s registers an offense for safe navigation with >= operator 235s registers an offense for safe navigation with [] operator 235s accepts usages of safe navigation with & operator 235s registers an offense for safe navigation on the right-hand side of the `/` 235s accepts usages of ordinary method chain with argument 235s registers an offense for ordinary method chain exists after safe navigation method call with a block-pass 235s proper highlighting 235s when there are methods before 235s when there are methods after 235s when in a begin 235s when used with a modifier if 235s when in a method 235s 235s RuboCop::Cop::Layout::SpaceAfterComma 235s array index commas without space 235s behaves like ends with an item 235s registers an offense and does autocorrection 235s behaves like trailing comma 235s accepts the last comma 235s method call arg commas without space 235s behaves like ends with an item 235s registers an offense and does autocorrection 235s inside hash braces 235s when EnforcedStyle for SpaceInsideBlockBraces is no_space 235s accepts no space between a comma and a closing brace 235s behaves like common behavior 235s accepts a space between a comma and a closing brace 235s when EnforcedStyle for SpaceInsideBlockBraces is space 235s registers an offense for no space between a comma and a closing brace 235s behaves like common behavior 235s accepts a space between a comma and a closing brace 235s block argument commas without space 235s behaves like trailing comma 235s accepts the last comma 235s behaves like ends with an item 235s registers an offense and does autocorrection 235s 235s RuboCop::Cop::Lint::NumberConversion 235s AllowedPatterns 235s does not register an offense for an allowed method 235s registers an offense for other methods 235s registers an offense 235s when using `#to_i` for number literals 235s when `#to_i` called on a variable on a array 235s when using `#to_r` 235s when `#to_i` called on a hash value 235s when using `#to_c` for number literals 235s when `#to_i` called on a variable 235s when using `#to_f` for number literals 235s when using `#to_c` 235s when `#to_i` called on a variable on a hash 235s when using `#to_i` 235s when using `#to_r` for number literals 235s when using `#to_f` 235s to_method in symbol form 235s registers an offense when using nested number conversion methods 235s registers offense with send 235s registers offense and autocorrects 235s does not register an offense when using `Float` constructor 235s does not register an offense when using `Integer` constructor 235s registers offense with try 235s registers offense and autocorrects without parentheses 235s does not register an offense when using `Complex` constructor 235s AllowedMethods 235s registers an offense for other methods 235s does not register an offense for an allowed method 235s IgnoredClasses 235s when using Time 235s when using Time/DateTime with multiple method calls 235s when using DateTime 235s does not register an offense 235s when using Float() 235s when using Integer() with integer 235s when using Complex() 235s when `:to_f` is one of multiple method arguments 235s when `#to_i` called without a receiver 235s 235s RuboCop::Cop::InternalAffairs::StyleDetectedApiUse 235s registers an offense when opposite_style_detected is used without a correct_style_detected follow up 235s does not register an offense when correct_style_detected and a opposite_style_detected are both used 235s registers an offense when no_acceptable_style! is used without a correct_style_detected follow up 235s registers an offense when unrecognized_style_detected is used without a correct_style_detected follow up 235s does not register an offense when correct_style_detected and a no_acceptable_style! are both used 235s registers an offense when conflicting_styles_detected is used without a correct_style_detected follow up 235s registers an offense when no_acceptable_style! is used in a conditional expression 235s registers an offense when conflicting_styles_detected is used in a conditional expression 235s does not register an offense when correct_style_detected and a conflicting_styles_detected are both used 235s does not register an offense when correct_style_detected and a unexpected_style_detected are both used 235s registers an offense when unexpected_style_detected is used without a correct_style_detected follow up 235s registers an offense when unrecognized_style_detected is used in a conditional expression 235s does not register an offense when correct_style_detected and a ambiguous_style_detected are both used 235s registers an offense when ambiguous_style_detected is used in a conditional expression 235s registers an offense when opposite_style_detected is used in a conditional expression 235s registers an offense when correct_style_detected is used without a negative *_style_detected follow up 235s registers an offense when unexpected_style_detected is used in a conditional expression 235s registers an offense when correct_style_detected is used in a conditional expression 235s registers an offense when ambiguous_style_detected is used without a correct_style_detected follow up 235s does not register an offense when correct_style_detected and a unrecognized_style_detected are both used 235s 235s RuboCop::Cop::Lint::FlipFlop 235s registers an offense for exclusive flip-flops 235s registers an offense for inclusive flip-flops 235s 235s RuboCop::Cop::Style::EmptyMethod 235s when configured with compact style 235s with an empty instance method definition 235s allows single line method 235s registers an offense for empty method 235s registers an offense for method with closing paren on following line 235s registers an offense for method with blank line 235s registers an offense for method with arguments 235s registers an offense for method with arguments without parens 235s with a non-empty class method definition 235s allows multi line method 235s allows multi line method with comment 235s allows single line method 235s relation with Layout/LineLength 235s when the correction would exceed the configured maximum 235s reports an offense but does not correct 235s when that cop is disabled 235s corrects to long lines 235s with an empty class method definition 235s registers an offense for empty method with arguments 235s registers an offense for empty method 235s allows single line method 235s registers an offense for method with blank line 235s with a non-empty instance method definition 235s allows multi line method with comment 235s allows single line method 235s allows multi line method 235s when configured with expanded style 235s with an empty instance method definition 235s allows multi line method 235s registers an offense for single line method 235s allows multi line method with blank line 235s relation with Layout/LineLength 235s still corrects even if the method is longer than the configured Max 235s with an empty class method definition 235s registers an offense for single line method 235s allows multi line method with a blank line 235s allows empty multi line method 235s with a non-empty class method definition 235s allows single line method 235s allows multi line method with comment 235s allows multi line method 235s with a non-empty instance method definition 235s allows multi line method 235s allows single line method 235s allows multi line method with a comment 235s when method is nested in class scope 235s registers an offense for single line method 235s 235s RuboCop::Cop::Style::NestedTernaryOperator 235s registers an offense and corrects for a nested ternary operator expression with block 235s accepts a non-nested ternary operator within an if 235s registers an offense and corrects for a nested ternary operator expression with no parentheses on the outside 235s can handle multiple nested ternaries 235s registers an offense and corrects for a nested ternary operator expression 235s 235s RuboCop::Cop::Layout::EmptyLinesAroundModuleBody 235s when EnforcedStyle is no_empty_lines 235s registers an offense for module body starting with a blank 235s autocorrects beginning and end 235s registers an offense for module body ending with a blank 235s when EnforcedStyle is empty_lines_special 235s module with only constants 235s registers and autocorrects the offenses 235s when first child is NOT a method 235s 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 235s source without blank lines 235s registers an offense for module not ending with a blank line 235s source with comment before method definition 235s registers an offense for module beginning with a blank line 235s source with blank lines 235s registers an offense for module beginning with a blank line 235s when module has a namespace 235s 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 235s source with blank lines 235s registers and autocorrects the offenses 235s source with constants 235s registers and autocorrects the offenses 235s source without blank lines 235s registers and autocorrects the offenses 235s when first child is an access modifier 235s with no blank lines at the beginning and ending of module body 235s registers and corrects an offense 235s with blank lines at the beginning and ending of module body 235s registers no offense 235s module with empty body 235s without empty line 235s does NOT register offenses 235s with empty line 235s does NOT register offenses 235s module with constant and child module 235s registers and autocorrects the offenses 235s when first child is a method 235s requires blank line at the beginning and ending of module body 235s when module has a namespace 235s requires no empty lines for namespace but requires blank line at the beginning and ending of module body 235s source without blank lines 235s registers and autocorrects the offenses 235s source with blank lines 235s autocorrects the offenses 235s source without blank lines 235s registers an offense for module not beginning and ending with a blank line 235s when namespace has multiple children 235s requires empty lines for namespace 235s when EnforcedStyle is empty_lines_except_namespace 235s when only child is module 235s registers offense for namespace body starting with a blank 235s registers offense for namespace body ending with a blank 235s autocorrects beginning and end 235s requires no empty lines for namespace 235s registers offenses for namespaced module body not ending with a blank 235s registers offenses for namespaced module body not starting with a blank 235s when has multiple child modules 235s registers offenses for namespace body starting and ending without a blank 235s requires empty lines for namespace 235s when only child is class 235s requires no empty lines for namespace 235s registers offense for namespace body starting with a blank 235s registers offense for namespace body ending with a blank 235s when EnforcedStyle is empty_lines 235s registers an offense for module body not starting or ending with a blank 235s registers an offense for module body not ending with a blank 235s autocorrects beginning and end 236s accepts modules with an empty body 236s 236s RuboCop::Cop::Style::DocumentationMethod 236s when declaring methods outside a class 236s when declaring methods in a module 236s with documentation comment 236s when method is module_function 236s does not register an offense for inline def 236s does not register an offense for separate def 236s when method is public 236s does not register an offense 236s does not register an offense with `end` on the same line 236s with both public and private methods 236s when required for non-public methods 236s registers an offense 236s when the public method has no documentation 236s registers an offense 236s when the public method has documentation 236s does not register an offense 236s without documentation comment 236s when method is module_function 236s registers an offense for separate def 236s registers an offense for inline def 236s when method is public 236s registers an offense with `end` on the same line 236s registers an offense 236s when method is private 236s does not register an offense with inline `private` and `end` 236s does not register an offense with `end` on the same line 236s does not register an offense 236s does not register an offense with inline `private` 236s when required for non-public methods 236s registers an offense with `end` on the same line 236s registers an offense with inline `private` 236s registers an offense 236s registers an offense with inline `private` and `end` 236s without documentation comment 236s when method is private 236s does not register an offense with `end` on the same line 236s does not register an offense 236s does not register an offense with inline `private` 236s does not register an offense with inline `private` and `end` 236s when required for non-public methods 236s registers an offense with inline `private` 236s registers an offense with `end` on the same line 236s registers an offense with inline `private` and `end` 236s registers an offense 236s when method is protected 236s does not register an offense 236s does not register an offense with inline `protected` 236s when required for non-public methods 236s registers an offense with inline `protected` 236s registers an offense 236s when method is public 236s registers an offense with `end` on the same line 236s registers an offense 236s registers an offense when method is public, but there were private methods before 236s with both public and private methods 236s when the public method has no documentation 236s registers an offense 236s when the public method has documentation 236s does not register an offense 236s when required for non-public methods 236s registers an offense 236s when declaring methods in a class 236s with annotation comment 236s registers an offense 236s with directive comment 236s registers an offense 236s with both public and private methods 236s when the public method has no documentation 236s registers an offense 236s when the public method has documentation 236s does not register an offense 236s when required for non-public methods 236s registers an offense 236s with documentation comment 236s when method is public 236s does not register an offense 236s does not register an offense with `end` on the same line 236s without documentation comment 236s when method is public 236s registers an offense 236s registers an offense with `end` on the same line 236s when method is private 236s does not register an offense with inline `private` and `end` 236s does not register an offense with inline `private` 236s does not register an offense 236s does not register an offense with `end` on the same line 236s when required for non-public methods 236s registers an offense with inline `private` 236s registers an offense with inline `private` and `end` 236s registers an offense with `end` on the same line 236s registers an offense 236s with documentation comment 236s does not register an offense 236s does not register an offense with `end` on the same line 236s when declaring methods for class instance 236s with documentation comment 236s does not register an offense with `end` on the same line 236s does not register an offense 236s with both public and private methods 236s when the public method has documentation 236s does not register an offense 236s when the public method has no documentation 236s registers an offense 236s when required for non-public methods 236s registers an offense 236s when method is private 236s does not register an offense with inline `private` 236s does not register an offense 236s does not register an offense with `end` on the same line 236s does not register an offense with inline `private` and `end` 236s when required for non-public methods 236s registers an offense with `end` on the same line 236s registers an offense with inline `private` and `end` 236s registers an offense 236s registers an offense with inline `private` 236s without documentation comment 236s registers an offense 236s registers an offense with `end` on the same line 236s 236s RuboCop::Cop::Lint::RequireRangeParentheses 236s does not register an offense when using `nil..42` 236s registers an offense when the end of the range (`...`) is line break 236s registers an offense when the end of the range (`..`) is line break 236s does not register an offense when using `42..nil` 236s does not register an offense when begin and end of the range are on the same line 236s does not register an offense when the end of the range (`..`) is line break and is enclosed in parentheses 236s Ruby >= 2.7 236s does not register an offense when using beginless range only 236s Ruby >= 2.6 236s does not register an offense when using endless range only 236s 236s RuboCop::Cop::Style::Copyright 236s does not register an offense when the notice is present 236s does not register an offense when the notice is in a block comment 236s does not register an offense when the notice is not the first comment 236s when the source code file is empty 236s adds an offense 236s when the copyright notice is missing and the source code file starts with an encoding comment 236s adds an offense 236s when the copyright notice is missing 236s fails to autocorrect if no AutocorrectNotice is given 236s fails to autocorrect when the AutocorrectNotice does not match the Notice pattern 236s adds an offense 236s when the copyright notice comes after any code 236s adds an offense 236s when the copyright notice is missing and the source code file starts with a shebang 236s adds an offense 236s when the copyright notice is missing and the source code file starts with shebang and an encoding comment 236s adds an offense 236s 236s RuboCop::Cop::Style::KeywordParametersOrder 236s registers an offense and corrects when `kwoptarg` is before `kwarg` 236s registers an offense and corrects when multiple `kwoptarg`s are interleaved with `kwarg`sand last argument is `blockarg` and argument parentheses omitted 236s registers an offense and corrects when `kwoptarg` is before `kwarg` and argument parentheses omitted 236s registers an offense and corrects when multiple `kwoptarg` are before `kwarg` and argument parentheses omitted 236s registers an offense and corrects when multiple `kwoptarg`s are interleaved with `kwarg`s 236s does not register an offense when there are no `kwoptarg`s before `kwarg`s 236s registers an offense and corrects when multiple `kwoptarg`s are interleaved with `kwarg`sand last argument is `kwrestarg` and argument parentheses omitted 236s when using block keyword parameters 236s registers an offense and corrects when `kwoptarg` is before `kwarg` 236s does not register an offense when there are no `kwoptarg`s before `kwarg`s 236s 236s RuboCop::Cop::Style::LambdaCall 236s when style is set to braces 236s registers an offense for correct + multiple opposite styles 236s registers an offense for opposite + correct 236s accepts a call without receiver 236s autocorrects x.call asdf, x123 to x.(asdf, x123) 236s registers an offense for x.call() 236s autocorrects x.call to x.() 236s when style is set to call 236s registers an offense for correct + opposite 236s registers an offense for x.() 236s registers an offense for correct + multiple opposite styles 236s 236s RuboCop::Cop::Style::RaiseArgs 236s when enforced style is exploded 236s ignores a raise with an exception argument 236s accepts a raise with 2 args 236s accepts exception constructor with more than 1 argument 236s accepts a raise with splatted arguments 236s accepts a raise with 3 args 236s accepts a raise with `new` method without receiver 236s accepts exception constructor with keyword arguments 236s accepts a raise when exception object is assigned to a local variable 236s accepts a raise with msg argument 236s with opposite + correct 236s reports multiple offenses 236s reports an offense for opposite + correct 236s when exception type is in AllowedCompactTypes 236s accepts exception constructor with no arguments 236s with one argument 236s accepts exception constructor 236s with more than one argument 236s accepts exception constructor 236s with a raise with exception object 236s when used in a logical or expression 236s registers an offense and autocorrects 236s when used in a ternary expression 236s registers an offense and autocorrects 236s when used in a logical and expression 236s registers an offense and autocorrects 236s with one argument 236s reports an offense 236s with no arguments 236s reports an offense 236s when an exception object is assigned to a local variable 236s autocorrects to exploded style 236s when enforced style is compact 236s accepts a raise with msg argument 236s accepts exception constructor with keyword arguments and message argument 236s accepts a raise with an exception argument 236s when used in a logical or expression 236s registers an offense and autocorrects 236s when used in a ternary expression 236s registers an offense and autocorrects 236s when used in a logical and expression 236s registers an offense and autocorrects 236s with correct + opposite 236s reports an offense 236s reports multiple offenses 236s with a raise with 3 args 236s reports an offense 236s with a raise with exception instantiation and message arguments 236s reports an offense 236s with a raise with 2 args 236s reports an offense 236s with a raise with 2 args and exception object is assigned to a local variable 236s reports an offense 236s 236s RuboCop::Cop::Layout::FirstMethodArgumentLineBreak 236s registers an offense and corrects hash arg spanning multiple lines 236s ignores arguments listed on a single line 236s registers an offense and corrects hash arg without a line break before the first pair 236s ignores arguments without parens 236s ignores methods without arguments 236s ignores kwargs listed on a single line when the arguments are used in `super` 236s args listed on the first line 236s registers an offense and corrects using safe navigation operator 236s registers an offense and corrects using `super` 236s registers an offense and corrects 236s 236s RuboCop::Cop::Style::ClassMethodsDefinitions 236s when EnforcedStyle is self_class 236s does not register an offense when defining class methods with `class << self` 236s registers an offense when defining class methods with `def self.method` 236s does not register an offense when defining singleton methods not on self 236s when EnforcedStyle is def_self 236s does not register an offense when `class << self` contains non public methods 236s removes empty class << self when correcting 236s registers an offense and corrects when defining class methods with `class << self` 236s does not register an offense when class << self contains only class methods 236s registers and corrects an offense when defining class methods with `class << self` with inline comment 236s does not register an offense when class << self does not contain methods 236s registers an offense and corrects when defining class methods with `class << self` and there is no blank line between method definition and attribute accessor 236s does not register an offense when defining singleton methods using `self << object` 236s correctly handles def self.x within class << self 236s does not register an offense when defining class methods with `def self.method` 236s correctly handles class << self containing multiple methods 236s registers and corrects an offense when defining class methods with `class << self` with comment only body 236s correctly handles methods with annotation comments 236s 236s RuboCop::Formatter::GitHubActionsFormatter 236s #finished 236s when message contains % 236s escapes message 236s when no offenses are detected 236s does not print anything 236s when file is relative to the current directory 236s reports offenses as error with the relative path 236s when offenses are detected 236s reports offenses as errors 236s when fail level is defined 236s reports offenses above or at fail level as errors 236s reports offenses below fail level as warnings 236s 236s RuboCop::Cop::Lint::NextWithoutAccumulator 236s behaves like reduce/inject 236s given a inject block 236s accepts next within a nested block 236s registers an offense for a bare next 236s accepts next with a value 236s Ruby 2.7 236s registers an offense for a bare next 236s behaves like reduce/inject 236s given a reduce block 236s accepts next within a nested block 236s accepts next with a value 236s registers an offense for a bare next 236s Ruby 2.7 236s registers an offense for a bare next 236s given an unrelated block 236s accepts next with a value 236s accepts a bare next 236s 236s RuboCop::Cop::VariableForce 236s #process_node 236s when processing a regex with regopt 236s does not raise an error 236s when processing lvar node 236s when the variable is not yet declared 236s does not raise error 236s when processing an empty regex 236s does not raise an error 236s when processing a regexp with a line break at the start of capture parenthesis 236s does not raise an error 236s 236s RuboCop::Cop::Lint::AssignmentInCondition 236s accepts = in a block followed by method call 236s does not blow up for empty if condition 236s registers an offense for = in condition inside a block 236s registers an offense for gvar assignment in condition 236s registers an offense for clvar assignment in condition 236s registers an offense for lvar assignment in while condition 236s accepts == in condition 236s registers an offense for collection element assignment in condition 236s accepts ||= in condition 236s registers an offense for assignment after == in condition 236s accepts = in a block that is called in a condition 236s registers an offense for lvar assignment in until condition 236s registers an offense for assignment methods 236s does not blow up for empty unless condition 236s registers an offense for lvar assignment in condition 236s accepts assignment in a block after || 236s registers an offense for constant assignment in condition 236s registers an offense for ivar assignment in condition 236s registers an offense for assignment after ||= in condition 236s safe assignment is allowed 236s accepts []= in condition surrounded with braces 236s accepts = in condition surrounded with braces 236s safe assignment is not allowed 236s does not accept = in condition surrounded with braces 236s does not accept []= in condition surrounded with braces 236s 236s RuboCop::Cop::Style::SelfAssignment 236s registers an offense for non-shorthand assignment && and @x 236s registers an offense for non-shorthand assignment && and x 236s registers an offense for non-shorthand assignment / and @@x 236s registers an offense for non-shorthand assignment || and x 236s registers an offense for non-shorthand assignment && and @@x 236s registers an offense for non-shorthand assignment & and x 236s registers an offense for non-shorthand assignment & and @x 236s registers an offense for non-shorthand assignment & and @@x 236s registers an offense for non-shorthand assignment ** and @x 236s registers an offense for non-shorthand assignment || and @x 236s registers an offense for non-shorthand assignment + and @x 236s registers an offense for non-shorthand assignment + and x 236s registers an offense for non-shorthand assignment / and x 236s registers an offense for non-shorthand assignment - and x 236s registers an offense for non-shorthand assignment - and @x 236s registers an offense for non-shorthand assignment - and @@x 236s registers an offense for non-shorthand assignment | and @@x 236s registers an offense for non-shorthand assignment ** and x 236s registers an offense for non-shorthand assignment * and @@x 236s registers an offense for non-shorthand assignment + and @@x 236s registers an offense for non-shorthand assignment / and @x 236s registers an offense for non-shorthand assignment | and x 236s registers an offense for non-shorthand assignment * and @x 236s registers an offense for non-shorthand assignment || and @@x 236s registers an offense for non-shorthand assignment ** and @@x 236s registers an offense for non-shorthand assignment | and @x 236s registers an offense for non-shorthand assignment * and x 236s 236s RuboCop::Cop::Lint::SafeNavigationWithEmpty 236s in a conditional 236s registers an offense and corrects on `&.empty?` 236s does not register an offense on `.empty?` 236s outside a conditional 236s registers no offense 236s 236s RuboCop::Cop::Lint::BinaryOperatorWithIdenticalOperands 236s registers an offense for `===` with duplicate operands 236s registers an offense for `>=` with duplicate operands 236s does not register an offense for `>>` with duplicate operands 236s does not crash on operator without any argument 236s does not register an offense for `+` with duplicate operands 236s registers an offense for `<` with duplicate operands 236s does not register an offense for `<<` with duplicate operands 236s does not register an offense for `**` with duplicate operands 236s registers an offense for `<=>` with duplicate operands 236s registers an offense for `/` with duplicate operands 236s does not register an offense when using arithmetic operator with numerics 236s registers an offense for `&&` with duplicate operands 236s registers an offense for `|` with duplicate operands 236s registers an offense for `!=` with duplicate operands 236s does not register an offense for `*` with duplicate operands 236s registers an offense for `>` with duplicate operands 236s registers an offense for `%` with duplicate operands 236s registers an offense for `==` with duplicate operands 236s registers an offense for `^` with duplicate operands 236s registers an offense for `||` with duplicate operands 236s registers an offense for `<=` with duplicate operands 236s registers an offense for `-` with duplicate operands 236s does not register an offense when using binary operator with different operands 236s registers an offense for `=~` with duplicate operands 236s 236s RuboCop::Cop::Lint::DuplicateRegexpCharacterClassElement 236s with no repeated character class elements when `"\0\07"` (means `"\u0000\a"`) 236s does not register an offense 236s with a repeated character class element and %r{} literal 236s registers an offense and corrects 236s with a repeated intersection character class 236s does not register an offense 236s with a repeated character class element with quantifier 236s registers an offense and corrects 236s with a repeated range element 236s registers an offense and corrects 236s with repeated elements in different character classes 236s does not register an offense 236s with a repeated character class element 236s registers an offense and corrects 236s with a range that covers a repeated element character class 236s does not register an offense 236s with multiple regexps with the same interpolation 236s does not register an offense 236s with a repeated character class element with interpolation 236s registers an offense and corrects 236s with repeated character class elements when `"\0\08"` (means `"\u0000\u00008"`) 236s registers an offense 236s with a repeated character posix character class inside a group 236s registers an offense and corrects 236s with no repeated character class elements 236s does not register an offense 236s with a repeated character class element inside a group 236s registers an offense and corrects 236s 236s RuboCop::ConfigObsoletion::RenamedCop 236s #message 236s when the cop has been moved to a new department 236s is expected to start with "The `Style/MyCop` cop has been moved to `Layout/MyCop`" 236s when the cop has changed names but in the same department 236s is expected to start with "The `Style/MyCop` cop has been renamed to `Style/NewCop`" 236s when the cop has changed names but in a new department 236s is expected to start with "The `Style/MyCop` cop has been renamed to `Layout/NewCop`" 236s 236s RuboCop::Cop::Lint::ConstantOverwrittenInRescue 236s registers an offense when overriding an exception with an exception result 236s does not register an offense when using `=>` but correctly assigning to variables 236s does not register an offense when not overriding an exception with an exception result 236s 236s RuboCop::Formatter::AutoGenConfigFormatter 236s #report_file_as_mark 236s when no offenses are detected 236s prints "." 236s when a refactor severity offense is detected 236s prints "R" 236s when different severity offenses are detected 236s prints highest level mark 236s when a refactor convention offense is detected 236s prints "C" 236s #finished 236s calls #report_summary 236s when any offenses are detected 236s outputs report summary 236s does not report offenses 236s when no offenses are detected 236s does not report offenses 236s 236s RuboCop::FeatureLoader 236s .load 236s with unexpected LoadError from require 236s raises LoadError 236s with normally loadable feature 236s loads it normally 236s with namespaced feature 236s loads it as namespaced feature 236s with dot-prefixed loadable feature 236s loads it as relative path 236s with unloadable namespaced feature 236s raises LoadError with preferred message 236s with dot-prefixed namespaced feature 236s loads it as namespaced feature 236s 236s RuboCop::Cop::Layout::SpaceInsideRangeLiteral 236s registers an offense for space inside .. literal 236s accepts complex range literal with space in it 236s registers an offense in multiline range literal with space in it 236s registers an offense for space inside ... literal 236s accepts no space inside .. literal 236s accepts no space inside ... literal 236s accepts multiline range literal with no space in it 236s 236s RuboCop::Cop::Lint::RedundantDirGlobSort 236s does not register an offense when not using `sort` for `Dir` 236s does not register an offense when using `sort` without a receiver 236s when Ruby 3.0 or higher 236s registers an offense and correction when using `Dir[].sort.each do` 236s does not register an offense when using `Dir.glob('./b/*.txt', './a/*.txt').sort` 236s registers an offense and correction when using `::Dir.glob.sort` 236s does not register an offense when using `Dir['./b/*.txt', './a/*.txt'].sort` 236s does not register an offense when not using `sort` with `sort: false` option for `Dir` 236s does not register an offense when using `Dir.glob(*path).sort` 236s registers an offense and correction when using `Dir[].sort.each(&do_something)` 236s registers an offense and correction when using `Dir.glob.sort` 236s does not register an offense when using `Dir[*path].sort` 236s does not register an offense when using `collection.sort` 236s when Ruby 2.7 or lower 236s does not register an offense and correction when using `::Dir.glob.sort` 236s does not register an offense and correction when using `Dir[].sort.each do` 236s does not register an offense and correction when using `Dir.glob.sort` 236s does not register an offense and correction when using `Dir[].sort.each(&do_something)` 236s 236s RuboCop::Cop::Layout::ArgumentAlignment 236s aligned with first argument 236s accepts correctly aligned arguments 236s can handle a call embedded in a string 236s doesn't get confused by a line break inside a parameter 236s can handle parentheses used with no arguments 236s accepts correctly aligned arguments with fullwidth characters 236s can handle a multiline hash as second parameter 236s doesn't get confused by symbols with embedded expressions 236s registers an offense and corrects when missed indentation kwargs 236s doesn't get confused by regexen with embedded expressions 236s can handle a correctly aligned string literal as first argument 236s can handle a call with a block inside another call 236s registers an offense and corrects multiline missed indentation 236s registers an offense and corrects arguments with single indent 236s can handle heredoc strings 236s can handle a string literal as other argument 236s does not crash in autocorrect on dynamic string in parameter value 236s registers an offense and correct multi-line parametersindented too far 236s can handle method calls without parentheses 236s can handle a method call within a method call 236s accepts calls that only span one line 236s doesn't crash and burn when there are nested issues 236s accepts multiline []= method call 236s doesn't get confused by a symbol argument 236s can handle other method calls without parentheses 236s accepts the first parameter being on a new row 236s can handle a ternary condition with a block reference 236s can handle do-end 236s accepts braceless hashes 237s registers an offense and corrects multi-line outdented parameters 237s doesn't get confused by extra comma at the end 237s registers an offense and corrects arguments with double indent 237s registers an offense and corrects splat operator 237s assigned methods 237s accepts the first parameter being on method row 237s accepts the first parameter being on a new row 237s when using safe navigation operator 237s registers an offense and corrects arguments with single indent 237s aligned with fixed indentation 237s autocorrects by indenting when not indented 237s corrects indentation for kwargs starting on same line as other args 237s registers an offense and corrects when missed indentation kwargs 237s autocorrects by outdenting when indented too far 237s does not register an offense when using aligned braced hash as a argument 237s autocorrects when first line is indented 237s multi-line method calls 237s autocorrects relative to position of relevant method call 237s can handle existing indentation from multi-line method calls 237s registers offenses and corrects double indentation from relevant method 237s does not err on method call without a method name 237s assigned methods 237s with ArgumentAlignment:IndentationWidth set to 4 237s accepts the first parameter being on a new row 237s accepts the first parameter being on method row 237s with IndentationWidth:Width set to 4 237s accepts the first parameter being on method row 237s autocorrects even when first argument is in wrong position 237s accepts the first parameter being on a new row 237s 237s RuboCop::Cop::Layout::SpaceBeforeBrackets 237s does not register an offense when using percent array literal argument without parentheses 237s does not register an offense when using array literal argument without parentheses 237s does not register an offense when assigning an array 237s when referencing 237s does not register an offense when using space between method call and left brackets 237s does not register an offense when using multiple arguments 237s registers an offense and corrects when using space between cvar receiver and left brackets 237s registers an offense and corrects when using space between gvar receiver and left brackets 237s does not register an offense when call desugared `Hash#[]` to ivar receiver 237s does not register an offense when array literal argument is enclosed in parentheses 237s registers an offense and corrects when using space between ivar receiver and left brackets 237s does not register an offense when call desugared `Hash#[]` to lvar receiver 237s registers an offense and corrects when using space between lvar receiver and left brackets 237s does not register an offense when without receiver 237s does not register an offense when not using space between variable receiver and left brackets 237s does not register an offense when call desugared `Hash#[]` to cvar receiver 237s does not register an offense when not using space between method call and left brackets 237s does not register an offense when it is used as a method argument 237s when assigning 237s does not register an offense when space is used in left bracket 237s registers an offense and corrects when using space between receiver and left brackets 237s does not register an offense when not using space between receiver and left brackets 237s does not register an offense when multiple spaces are inserted inside the left bracket 237s 237s RuboCop::Cop::Style::CaseEquality 237s when AllowOnConstant is true 237s registers an offense and corrects for === when the receiver is a regexp 237s does not fail when the receiver is implicit 237s does not register an offense for === when the receiver is not a camel cased constant 237s registers an offense and corrects for === when the receiver is a range 237s registers an offense and does not correct for === when receiver is of some other type 237s does not register an offense for === when the receiver is a constant 237s when AllowOnConstant is false 237s registers an offense and corrects for === when the receiver is a constant 237s does not register an offense for === when the receiver is not a camel cased constant 237s does not fail when the receiver is implicit 237s registers an offense and corrects for === when the receiver is a range 237s registers an offense and corrects for === when the receiver is a regexp 237s registers an offense and does not correct for === when receiver is of some other type 237s when AllowOnSelfClass is false 237s does not register an offense for === when the receiver is not a camel cased constant 237s registers an offense and corrects for === when the receiver is self.class 237s registers an offense and corrects for === when the receiver is a regexp 237s registers an offense and does not correct for === when receiver is of some other type 237s does not fail when the receiver is implicit 237s registers an offense and corrects for === when the receiver is a range 237s when AllowOnSelfClass is true 237s does not register an offense for === when the receiver is not a camel cased constant 237s does not fail when the receiver is implicit 237s registers an offense and corrects for === when the receiver is a regexp 237s registers an offense and does not correct for === when receiver is of some other type 237s registers an offense and corrects for === when the receiver is self.klass 237s does not register an offense for === when the receiver is self.class 237s registers an offense and corrects for === when the receiver is a range 237s 237s RuboCop::Cop::Style::ConditionalAssignment 237s IncludeTernaryExpressions false 237s allows assigning any variable type to ternary 237s SingleLineConditionsOnly false 237s corrects assignment to a multiline if elsif else condition 237s corrects assignment to an unless else condition 237s corrects assignment to an if elsif else with multiple elsifs 237s corrects assignment to a multiline if else condition 237s corrects assignment to a case when else with multiple whens 237s corrects assignment to a case when else condition 237s behaves like all variable types 237s registers an offense assigning any variable type to if elsewith multiple assignment 237s registers an offense assigning any variable type to if elsif else 237s registers an offense assigning any variable type to if else 237s does not crash for rescue assignment 237s registers an offense assigning any variable type to ternary 237s registers an offense for assigning any variable type to case when 237s registers an offense assigning any variable type to unless else 237s allows assignment to if without else 237s >= Ruby 2.7 237s registers an offense for assigning any variable type to case in 237s behaves like all variable types 237s registers an offense assigning any variable type to if else 237s allows assignment to if without else 237s registers an offense assigning any variable type to if elsif else 237s does not crash for rescue assignment 237s registers an offense assigning any variable type to if elsewith multiple assignment 237s registers an offense assigning any variable type to unless else 237s registers an offense assigning any variable type to ternary 237s registers an offense for assigning any variable type to case when 237s >= Ruby 2.7 237s registers an offense for assigning any variable type to case in 237s behaves like all assignment types 237s does not crash when used inside rescue 237s registers an offense for any assignment to unless else 237s registers an offense for any assignment to ternary 237s registers an offense any assignment to case when 237s registers an offense any assignment to if else 237s allows any assignment to if without else 237s behaves like multiline all assignment types offense 237s any assignment to a multiline if else 237s any assignment to a multiline unless else 237s any assignment to a multiline case when 237s behaves like all assignment types 237s registers an offense any assignment to case when 237s does not crash when used inside rescue 237s allows any assignment to if without else 237s registers an offense for any assignment to ternary 237s registers an offense any assignment to if else 237s registers an offense for any assignment to unless else 237s behaves like all assignment types 237s registers an offense for any assignment to unless else 237s registers an offense any assignment to case when 237s allows any assignment to if without else 237s registers an offense any assignment to if else 237s registers an offense for any assignment to ternary 237s does not crash when used inside rescue 237s behaves like multiline all assignment types offense 237s any assignment to a multiline unless else 237s any assignment to a multiline case when 237s any assignment to a multiline if else 237s behaves like all assignment types 237s does not crash when used inside rescue 237s registers an offense for any assignment to ternary 237s registers an offense for any assignment to unless else 237s allows any assignment to if without else 237s registers an offense any assignment to if else 237s registers an offense any assignment to case when 237s behaves like multiline all assignment types offense 237s any assignment to a multiline if else 237s any assignment to a multiline unless else 237s any assignment to a multiline case when 237s behaves like all assignment types 237s registers an offense any assignment to if else 237s does not crash when used inside rescue 237s registers an offense for any assignment to ternary 237s allows any assignment to if without else 237s registers an offense any assignment to case when 237s registers an offense for any assignment to unless else 237s behaves like multiline all assignment types offense 237s any assignment to a multiline case when 237s any assignment to a multiline if else 237s any assignment to a multiline unless else 237s behaves like all assignment types 237s does not crash when used inside rescue 237s registers an offense any assignment to case when 237s registers an offense for any assignment to unless else 237s registers an offense for any assignment to ternary 237s registers an offense any assignment to if else 237s allows any assignment to if without else 237s behaves like all assignment types 237s registers an offense any assignment to if else 237s registers an offense for any assignment to ternary 237s registers an offense for any assignment to unless else 237s registers an offense any assignment to case when 237s allows any assignment to if without else 237s does not crash when used inside rescue 237s behaves like multiline all assignment types offense 237s any assignment to a multiline case when 237s any assignment to a multiline if else 237s any assignment to a multiline unless else 237s behaves like all assignment types 237s registers an offense any assignment to if else 237s registers an offense for any assignment to unless else 237s does not crash when used inside rescue 237s registers an offense for any assignment to ternary 237s registers an offense any assignment to case when 237s allows any assignment to if without else 237s behaves like all assignment types 237s does not crash when used inside rescue 237s registers an offense for any assignment to ternary 237s registers an offense for any assignment to unless else 237s registers an offense any assignment to case when 237s registers an offense any assignment to if else 237s allows any assignment to if without else 237s behaves like multiline all assignment types offense 237s any assignment to a multiline unless else 237s any assignment to a multiline if else 237s any assignment to a multiline case when 237s behaves like multiline all assignment types offense 237s any assignment to a multiline unless else 237s any assignment to a multiline case when 237s any assignment to a multiline if else 237s behaves like all assignment types 237s allows any assignment to if without else 237s registers an offense for any assignment to unless else 237s does not crash when used inside rescue 237s registers an offense any assignment to case when 237s registers an offense any assignment to if else 237s registers an offense for any assignment to ternary 237s behaves like multiline all assignment types offense 237s any assignment to a multiline case when 237s any assignment to a multiline if else 237s any assignment to a multiline unless else 237s behaves like multiline all assignment types offense 237s any assignment to a multiline unless else 237s any assignment to a multiline if else 237s any assignment to a multiline case when 237s behaves like multiline all assignment types offense 237s any assignment to a multiline case when 237s any assignment to a multiline if else 237s any assignment to a multiline unless else 237s behaves like all assignment types 237s allows any assignment to if without else 237s does not crash when used inside rescue 237s registers an offense for any assignment to ternary 237s registers an offense any assignment to if else 237s registers an offense for any assignment to unless else 237s registers an offense any assignment to case when 237s behaves like multiline all assignment types offense 237s any assignment to a multiline if else 237s any assignment to a multiline case when 237s any assignment to a multiline unless else 237s behaves like all assignment types 237s registers an offense for any assignment to unless else 237s does not crash when used inside rescue 237s allows any assignment to if without else 237s registers an offense any assignment to if else 237s registers an offense any assignment to case when 237s registers an offense for any assignment to ternary 237s behaves like multiline all assignment types offense 237s any assignment to a multiline unless else 237s any assignment to a multiline case when 237s any assignment to a multiline if else 237s behaves like all variable types 237s registers an offense assigning any variable type to ternary 237s registers an offense for assigning any variable type to case when 237s registers an offense assigning any variable type to if elsewith multiple assignment 237s does not crash for rescue assignment 237s registers an offense assigning any variable type to if else 237s registers an offense assigning any variable type to unless else 237s registers an offense assigning any variable type to if elsif else 237s allows assignment to if without else 237s >= Ruby 2.7 237s registers an offense for assigning any variable type to case in 237s behaves like multiline all variable types offense 237s assigning any variable type to a multiline case when 237s assigning any variable type to a multiline unless else 237s assigning any variable type to a multiline if else 237s assigning any variable type to a multiline if elsif else 237s assigning any variable type to an if else with multiline in one branch 237s behaves like all variable types 237s allows assignment to if without else 237s registers an offense assigning any variable type to if else 237s registers an offense assigning any variable type to if elsif else 237s registers an offense assigning any variable type to if elsewith multiple assignment 237s does not crash for rescue assignment 237s registers an offense assigning any variable type to ternary 237s registers an offense assigning any variable type to unless else 237s registers an offense for assigning any variable type to case when 237s >= Ruby 2.7 237s registers an offense for assigning any variable type to case in 237s behaves like all variable types 237s registers an offense assigning any variable type to unless else 237s does not crash for rescue assignment 237s registers an offense assigning any variable type to if else 237s registers an offense assigning any variable type to if elsif else 237s allows assignment to if without else 237s registers an offense assigning any variable type to ternary 237s registers an offense for assigning any variable type to case when 237s registers an offense assigning any variable type to if elsewith multiple assignment 237s >= Ruby 2.7 237s registers an offense for assigning any variable type to case in 237s behaves like all variable types 237s registers an offense assigning any variable type to ternary 237s registers an offense for assigning any variable type to case when 237s allows assignment to if without else 237s registers an offense assigning any variable type to if elsif else 237s registers an offense assigning any variable type to if elsewith multiple assignment 237s registers an offense assigning any variable type to unless else 237s does not crash for rescue assignment 237s registers an offense assigning any variable type to if else 237s >= Ruby 2.7 237s registers an offense for assigning any variable type to case in 237s behaves like all variable types 237s registers an offense for assigning any variable type to case when 237s registers an offense assigning any variable type to if elsewith multiple assignment 237s allows assignment to if without else 237s registers an offense assigning any variable type to ternary 237s does not crash for rescue assignment 237s registers an offense assigning any variable type to if elsif else 237s registers an offense assigning any variable type to if else 237s registers an offense assigning any variable type to unless else 237s >= Ruby 2.7 237s registers an offense for assigning any variable type to case in 237s behaves like multiline all variable types offense 237s assigning any variable type to a multiline if elsif else 237s assigning any variable type to a multiline unless else 237s assigning any variable type to a multiline if else 237s assigning any variable type to an if else with multiline in one branch 237s assigning any variable type to a multiline case when 237s behaves like multiline all assignment types offense 237s any assignment to a multiline case when 237s any assignment to a multiline if else 237s any assignment to a multiline unless else 237s behaves like multiline all assignment types offense 237s any assignment to a multiline if else 237s any assignment to a multiline unless else 237s any assignment to a multiline case when 237s behaves like multiline all assignment types offense 237s any assignment to a multiline case when 237s any assignment to a multiline if else 237s any assignment to a multiline unless else 237s behaves like multiline all variable types offense 237s assigning any variable type to an if else with multiline in one branch 237s assigning any variable type to a multiline case when 237s assigning any variable type to a multiline if else 237s assigning any variable type to a multiline unless else 237s assigning any variable type to a multiline if elsif else 237s behaves like all assignment types 237s registers an offense any assignment to if else 237s registers an offense for any assignment to unless else 237s registers an offense any assignment to case when 238s does not crash when used inside rescue 238s registers an offense for any assignment to ternary 238s allows any assignment to if without else 238s behaves like multiline all variable types offense 238s assigning any variable type to a multiline if elsif else 238s assigning any variable type to a multiline case when 238s assigning any variable type to a multiline if else 238s assigning any variable type to a multiline unless else 238s assigning any variable type to an if else with multiline in one branch 238s behaves like multiline all variable types offense 238s assigning any variable type to a multiline case when 238s assigning any variable type to a multiline if elsif else 238s assigning any variable type to an if else with multiline in one branch 238s assigning any variable type to a multiline if else 238s assigning any variable type to a multiline unless else 238s behaves like multiline all variable types offense 238s assigning any variable type to a multiline if elsif else 238s assigning any variable type to a multiline unless else 238s assigning any variable type to an if else with multiline in one branch 238s assigning any variable type to a multiline case when 238s assigning any variable type to a multiline if else 238s behaves like all assignment types 238s registers an offense any assignment to if else 238s does not crash when used inside rescue 238s registers an offense any assignment to case when 238s allows any assignment to if without else 238s registers an offense for any assignment to ternary 238s registers an offense for any assignment to unless else 238s behaves like all assignment types 238s registers an offense any assignment to case when 238s registers an offense any assignment to if else 238s allows any assignment to if without else 238s registers an offense for any assignment to unless else 238s registers an offense for any assignment to ternary 238s does not crash when used inside rescue 238s behaves like multiline all variable types offense 238s assigning any variable type to an if else with multiline in one branch 238s assigning any variable type to a multiline if else 238s assigning any variable type to a multiline if elsif else 238s assigning any variable type to a multiline unless else 238s assigning any variable type to a multiline case when 238s behaves like multiline all assignment types offense 238s any assignment to a multiline unless else 238s any assignment to a multiline if else 238s any assignment to a multiline case when 238s behaves like multiline all assignment types offense 238s any assignment to a multiline if else 238s any assignment to a multiline unless else 238s any assignment to a multiline case when 238s behaves like multiline all assignment types offense 238s any assignment to a multiline case when 238s any assignment to a multiline if else 238s any assignment to a multiline unless else 238s behaves like all assignment types 238s registers an offense for any assignment to unless else 238s does not crash when used inside rescue 238s registers an offense for any assignment to ternary 238s registers an offense any assignment to case when 238s allows any assignment to if without else 238s registers an offense any assignment to if else 238s behaves like multiline all assignment types offense 238s any assignment to a multiline if else 238s any assignment to a multiline case when 238s any assignment to a multiline unless else 238s behaves like single line condition autocorrect 238s corrects assignment to a case when else with multiple whens 238s corrects assignment to a ternary operator 238s corrects assignment to an if elsif else condition 238s corrects assignment to an if elsif else with multiple elsifs 238s corrects assignment to an if else condition 238s corrects assignment to an unless else condition 238s corrects assignment to a case when else condition 238s behaves like all assignment types 238s registers an offense for any assignment to ternary 238s registers an offense any assignment to case when 238s allows any assignment to if without else 238s does not crash when used inside rescue 238s registers an offense any assignment to if else 238s registers an offense for any assignment to unless else 238s behaves like all assignment types 238s registers an offense any assignment to case when 238s registers an offense for any assignment to ternary 238s registers an offense any assignment to if else 238s registers an offense for any assignment to unless else 238s does not crash when used inside rescue 238s allows any assignment to if without else 238s behaves like all assignment types 238s registers an offense any assignment to if else 238s does not crash when used inside rescue 238s registers an offense any assignment to case when 238s registers an offense for any assignment to unless else 238s registers an offense for any assignment to ternary 238s allows any assignment to if without else 238s SingleLineConditionsOnly true 238s registers an offense for assignment using []= 238s registers an offense for assignment using a method that ends with an equal sign 238s registers an offense for assignment to an if then else 238s corrects assignment to a namespaced constant 238s corrects assignment when without `else` branch 238s registers an offense for assignment to case when then else 238s allows a method call in the subject of a ternary operator 238s behaves like multiline all assignment types allow 238s any assignment to a multiline case when 238s any assignment to a multiline if else 238s any assignment to a multiline unless else 238s behaves like all assignment types 238s does not crash when used inside rescue 238s allows any assignment to if without else 238s registers an offense any assignment to if else 238s registers an offense any assignment to case when 238s registers an offense for any assignment to unless else 238s registers an offense for any assignment to ternary 238s behaves like multiline all assignment types allow 238s any assignment to a multiline unless else 238s any assignment to a multiline if else 238s any assignment to a multiline case when 238s behaves like all assignment types 238s allows any assignment to if without else 238s registers an offense any assignment to if else 238s registers an offense for any assignment to unless else 238s does not crash when used inside rescue 238s registers an offense for any assignment to ternary 238s registers an offense any assignment to case when 238s behaves like all assignment types 238s allows any assignment to if without else 238s registers an offense any assignment to if else 238s registers an offense for any assignment to ternary 238s does not crash when used inside rescue 238s registers an offense for any assignment to unless else 238s registers an offense any assignment to case when 238s behaves like all assignment types 238s allows any assignment to if without else 238s registers an offense any assignment to if else 238s does not crash when used inside rescue 238s registers an offense for any assignment to unless else 238s registers an offense for any assignment to ternary 238s registers an offense any assignment to case when 238s behaves like all assignment types 238s registers an offense for any assignment to unless else 238s registers an offense for any assignment to ternary 238s registers an offense any assignment to case when 238s allows any assignment to if without else 238s does not crash when used inside rescue 238s registers an offense any assignment to if else 238s behaves like all assignment types 238s does not crash when used inside rescue 238s registers an offense for any assignment to ternary 238s registers an offense any assignment to if else 238s allows any assignment to if without else 238s registers an offense for any assignment to unless else 238s registers an offense any assignment to case when 238s behaves like multiline all assignment types allow 238s any assignment to a multiline case when 238s any assignment to a multiline if else 238s any assignment to a multiline unless else 238s behaves like multiline all assignment types allow 238s any assignment to a multiline unless else 238s any assignment to a multiline if else 238s any assignment to a multiline case when 238s behaves like all variable types 238s does not crash for rescue assignment 238s registers an offense assigning any variable type to unless else 238s registers an offense assigning any variable type to if else 238s registers an offense assigning any variable type to if elsewith multiple assignment 238s registers an offense assigning any variable type to ternary 238s registers an offense assigning any variable type to if elsif else 238s allows assignment to if without else 238s registers an offense for assigning any variable type to case when 238s >= Ruby 2.7 238s registers an offense for assigning any variable type to case in 238s behaves like all assignment types 238s registers an offense any assignment to case when 238s registers an offense for any assignment to ternary 238s registers an offense for any assignment to unless else 238s allows any assignment to if without else 238s does not crash when used inside rescue 238s registers an offense any assignment to if else 238s behaves like multiline all assignment types allow 238s any assignment to a multiline unless else 238s any assignment to a multiline case when 238s any assignment to a multiline if else 238s behaves like multiline all variable types allow 238s assigning any variable type to a multiline if else 238s assigning any variable type to a multiline if elsif else 238s assigning any variable type to a multiline case when 238s assigning any variable type to an if else with multiline in one branch 238s assigning any variable type to a multiline unless else 238s behaves like all variable types 238s registers an offense assigning any variable type to unless else 238s registers an offense assigning any variable type to if elsewith multiple assignment 238s registers an offense assigning any variable type to if else 238s does not crash for rescue assignment 238s allows assignment to if without else 238s registers an offense assigning any variable type to ternary 238s registers an offense assigning any variable type to if elsif else 238s registers an offense for assigning any variable type to case when 238s >= Ruby 2.7 238s registers an offense for assigning any variable type to case in 238s behaves like multiline all variable types allow 238s assigning any variable type to a multiline if else 238s assigning any variable type to a multiline case when 238s assigning any variable type to a multiline unless else 238s assigning any variable type to a multiline if elsif else 238s assigning any variable type to an if else with multiline in one branch 238s behaves like multiline all variable types allow 238s assigning any variable type to a multiline if elsif else 238s assigning any variable type to an if else with multiline in one branch 238s assigning any variable type to a multiline case when 238s assigning any variable type to a multiline unless else 238s assigning any variable type to a multiline if else 238s behaves like multiline all assignment types allow 238s any assignment to a multiline unless else 238s any assignment to a multiline case when 238s any assignment to a multiline if else 238s behaves like all assignment types 238s does not crash when used inside rescue 238s allows any assignment to if without else 238s registers an offense any assignment to if else 238s registers an offense for any assignment to unless else 238s registers an offense any assignment to case when 238s registers an offense for any assignment to ternary 238s behaves like multiline all assignment types allow 238s any assignment to a multiline if else 238s any assignment to a multiline case when 238s any assignment to a multiline unless else 238s behaves like multiline all assignment types allow 238s any assignment to a multiline case when 238s any assignment to a multiline unless else 238s any assignment to a multiline if else 238s behaves like multiline all assignment types allow 238s any assignment to a multiline if else 238s any assignment to a multiline case when 238s any assignment to a multiline unless else 238s behaves like all assignment types 238s registers an offense any assignment to if else 238s registers an offense any assignment to case when 238s allows any assignment to if without else 238s does not crash when used inside rescue 238s registers an offense for any assignment to unless else 238s registers an offense for any assignment to ternary 238s behaves like all assignment types 238s registers an offense any assignment to case when 238s does not crash when used inside rescue 238s registers an offense for any assignment to ternary 238s registers an offense any assignment to if else 238s registers an offense for any assignment to unless else 238s allows any assignment to if without else 238s behaves like all assignment types 238s registers an offense for any assignment to unless else 238s allows any assignment to if without else 238s registers an offense any assignment to case when 238s registers an offense any assignment to if else 238s does not crash when used inside rescue 238s registers an offense for any assignment to ternary 238s behaves like all variable types 238s registers an offense assigning any variable type to if elsewith multiple assignment 238s registers an offense assigning any variable type to if elsif else 238s registers an offense assigning any variable type to ternary 238s registers an offense assigning any variable type to if else 238s registers an offense for assigning any variable type to case when 238s does not crash for rescue assignment 238s registers an offense assigning any variable type to unless else 238s allows assignment to if without else 238s >= Ruby 2.7 238s registers an offense for assigning any variable type to case in 238s behaves like all variable types 238s registers an offense assigning any variable type to if elsif else 238s registers an offense assigning any variable type to if elsewith multiple assignment 238s allows assignment to if without else 238s registers an offense assigning any variable type to ternary 238s registers an offense for assigning any variable type to case when 238s does not crash for rescue assignment 238s registers an offense assigning any variable type to unless else 238s registers an offense assigning any variable type to if else 238s >= Ruby 2.7 238s registers an offense for assigning any variable type to case in 238s behaves like multiline all assignment types allow 238s any assignment to a multiline if else 238s any assignment to a multiline case when 238s any assignment to a multiline unless else 238s behaves like all assignment types 238s registers an offense any assignment to if else 238s registers an offense for any assignment to ternary 238s does not crash when used inside rescue 238s registers an offense for any assignment to unless else 238s registers an offense any assignment to case when 238s allows any assignment to if without else 238s behaves like multiline all assignment types allow 238s any assignment to a multiline unless else 238s any assignment to a multiline case when 238s any assignment to a multiline if else 238s behaves like multiline all variable types allow 238s assigning any variable type to a multiline if else 238s assigning any variable type to a multiline if elsif else 238s assigning any variable type to an if else with multiline in one branch 238s assigning any variable type to a multiline unless else 238s assigning any variable type to a multiline case when 238s behaves like multiline all assignment types allow 238s any assignment to a multiline if else 238s any assignment to a multiline case when 238s any assignment to a multiline unless else 238s for loop 238s ignores pseudo assignments in a for loop 238s behaves like multiline all assignment types allow 238s any assignment to a multiline case when 238s any assignment to a multiline unless else 238s any assignment to a multiline if else 238s behaves like single line condition autocorrect 238s corrects assignment to a ternary operator 238s corrects assignment to an if elsif else condition 238s corrects assignment to a case when else with multiple whens 238s corrects assignment to a case when else condition 238s corrects assignment to an unless else condition 238s corrects assignment to an if else condition 238s corrects assignment to an if elsif else with multiple elsifs 238s behaves like multiline all assignment types allow 238s any assignment to a multiline unless else 238s any assignment to a multiline if else 238s any assignment to a multiline case when 238s behaves like all assignment types 238s registers an offense for any assignment to ternary 238s registers an offense any assignment to if else 238s registers an offense any assignment to case when 238s allows any assignment to if without else 238s registers an offense for any assignment to unless else 238s does not crash when used inside rescue 238s behaves like multiline all assignment types allow 238s any assignment to a multiline if else 238s any assignment to a multiline case when 238s any assignment to a multiline unless else 238s behaves like all variable types 238s registers an offense assigning any variable type to ternary 238s does not crash for rescue assignment 238s registers an offense for assigning any variable type to case when 238s registers an offense assigning any variable type to if elsif else 238s registers an offense assigning any variable type to unless else 238s registers an offense assigning any variable type to if elsewith multiple assignment 238s allows assignment to if without else 238s registers an offense assigning any variable type to if else 238s >= Ruby 2.7 238s registers an offense for assigning any variable type to case in 238s behaves like multiline all variable types allow 238s assigning any variable type to a multiline if elsif else 238s assigning any variable type to a multiline if else 238s assigning any variable type to a multiline case when 238s assigning any variable type to an if else with multiline in one branch 238s assigning any variable type to a multiline unless else 238s behaves like all assignment types 238s does not crash when used inside rescue 238s registers an offense any assignment to case when 238s registers an offense for any assignment to ternary 238s registers an offense for any assignment to unless else 238s registers an offense any assignment to if else 238s allows any assignment to if without else 238s behaves like all assignment types 238s registers an offense for any assignment to unless else 238s does not crash when used inside rescue 238s registers an offense any assignment to if else 238s allows any assignment to if without else 238s registers an offense any assignment to case when 238s registers an offense for any assignment to ternary 238s behaves like multiline all variable types allow 238s assigning any variable type to a multiline if else 238s assigning any variable type to a multiline case when 238s assigning any variable type to a multiline if elsif else 239s assigning any variable type to a multiline unless else 239s assigning any variable type to an if else with multiline in one branch 239s behaves like all assignment types 239s allows any assignment to if without else 239s registers an offense for any assignment to unless else 239s registers an offense for any assignment to ternary 239s registers an offense any assignment to if else 239s registers an offense any assignment to case when 239s does not crash when used inside rescue 239s behaves like multiline all assignment types allow 239s any assignment to a multiline if else 239s any assignment to a multiline case when 239s any assignment to a multiline unless else 239s behaves like multiline all assignment types allow 239s any assignment to a multiline unless else 239s any assignment to a multiline if else 239s any assignment to a multiline case when 239s behaves like multiline all variable types allow 239s assigning any variable type to a multiline if else 239s assigning any variable type to an if else with multiline in one branch 239s assigning any variable type to a multiline case when 239s assigning any variable type to a multiline unless else 239s assigning any variable type to a multiline if elsif else 239s behaves like multiline all assignment types allow 239s any assignment to a multiline case when 239s any assignment to a multiline if else 239s any assignment to a multiline unless else 239s behaves like all variable types 239s registers an offense for assigning any variable type to case when 239s registers an offense assigning any variable type to if else 239s registers an offense assigning any variable type to unless else 239s registers an offense assigning any variable type to if elsif else 239s registers an offense assigning any variable type to ternary 239s registers an offense assigning any variable type to if elsewith multiple assignment 239s allows assignment to if without else 239s does not crash for rescue assignment 239s >= Ruby 2.7 239s registers an offense for assigning any variable type to case in 239s behaves like all variable types 239s registers an offense assigning any variable type to ternary 239s registers an offense assigning any variable type to unless else 239s does not crash for rescue assignment 239s registers an offense assigning any variable type to if elsewith multiple assignment 239s registers an offense for assigning any variable type to case when 239s registers an offense assigning any variable type to if else 239s registers an offense assigning any variable type to if elsif else 239s allows assignment to if without else 239s >= Ruby 2.7 239s registers an offense for assigning any variable type to case in 239s behaves like all assignment types 239s registers an offense for any assignment to ternary 239s does not crash when used inside rescue 239s registers an offense for any assignment to unless else 239s registers an offense any assignment to if else 239s allows any assignment to if without else 239s registers an offense any assignment to case when 239s behaves like all assignment types 239s registers an offense for any assignment to ternary 239s registers an offense any assignment to case when 239s registers an offense for any assignment to unless else 239s does not crash when used inside rescue 239s allows any assignment to if without else 239s registers an offense any assignment to if else 239s behaves like multiline all assignment types allow 239s any assignment to a multiline unless else 239s any assignment to a multiline case when 239s any assignment to a multiline if else 239s behaves like all assignment types 239s allows any assignment to if without else 239s registers an offense for any assignment to unless else 239s registers an offense for any assignment to ternary 239s registers an offense any assignment to case when 239s does not crash when used inside rescue 239s registers an offense any assignment to if else 239s 239s RuboCop::Cop::Layout::SpaceAroundKeyword 239s behaves like missing before 239s registers an offense for missing space before keyword in `begin "a"end` 239s behaves like accept after 239s accepts `rescue` after keyword in `begin; rescue(Error); end` 239s behaves like missing before 239s registers an offense for missing space before keyword in `if a; ""elsif b; end` 239s behaves like accept after 239s accepts `.` after keyword in `begin end.inspect` 239s behaves like accept after 239s accepts `(` after keyword in `next(1)` 239s behaves like missing before 239s registers an offense for missing space before keyword in `until 1 do "x"end` 239s behaves like accept before 239s accepts `+` before keyword in `a+begin; end.method` 239s behaves like accept after 239s accepts `+` after keyword in `+begin end` 239s behaves like accept after 239s accepts `[` after keyword in `yield[1]` 239s behaves like accept before 239s accepts `>` before keyword in `a>begin end` 239s behaves like missing before 239s registers an offense for missing space before keyword in `""rescue a` 239s behaves like missing before 239s registers an offense for missing space before keyword in `while 1do end` 239s behaves like missing after 239s registers an offense for missing space after keyword in `1 or(2)` and autocorrects 239s behaves like missing before 239s registers an offense for missing space before keyword in `if a; "b"end` 239s behaves like missing after 239s registers an offense for missing space after keyword in `yield""` and autocorrects 239s behaves like missing after 239s registers an offense for missing space after keyword in `for x in [] do"x" end` and autocorrects 239s behaves like accept after 239s accepts `(` after keyword in `break(1)` 239s behaves like accept before 239s accepts `!` before keyword in `!yield.method` 239s behaves like accept before 239s accepts `*` before keyword in `a*begin end` 239s behaves like missing after 239s registers an offense for missing space after keyword in `break""` and autocorrects 239s behaves like missing before 239s registers an offense for missing space before keyword in `1until ""` 239s behaves like accept after 239s accepts `(` after keyword in `defined?(1)` 239s behaves like missing before 239s registers an offense for missing space before keyword in `while 1 do "x"end` 239s behaves like missing before 239s registers an offense for missing space before keyword in `a do "a"end` 239s behaves like accept before 239s accepts `&&` before keyword in `a&&begin end` 239s behaves like missing after 239s registers an offense for missing space after keyword in `unless""; end` and autocorrects 239s behaves like accept before 239s accepts `=*` before keyword in `a=*begin end` 239s behaves like accept around 239s accepts `{}` around keyword in `loop {next}` 239s behaves like missing after 239s registers an offense for missing space after keyword in `begin"" end` and autocorrects 239s behaves like accept before 239s accepts `/` before keyword in `a/begin end` 239s behaves like accept after 239s accepts `{` after keyword in `loop{}` 239s behaves like accept after 239s accepts `(` after keyword in `not(1)` 239s >= Ruby 3.0 239s behaves like accept after 239s accepts `=>` after keyword in `a =>""` 239s behaves like accept before 239s accepts `=>` before keyword in `""=> a` 239s behaves like accept after 239s accepts `(` after keyword in `yield(1)` 239s behaves like missing after 239s registers an offense for missing space after keyword in `case a; when b; else"" end` and autocorrects 239s behaves like missing before 239s registers an offense for missing space before keyword in `if ""then a end` 239s behaves like missing before 239s registers an offense for missing space before keyword in `1and 2` 239s behaves like accept around 239s accepts `[]` around keyword in `a[begin end]` 239s behaves like missing after 239s registers an offense for missing space after keyword in `a do|x| end` and autocorrects 239s behaves like missing after 239s registers an offense for missing space after keyword in `END{}` and autocorrects 239s behaves like missing after 239s registers an offense for missing space after keyword in `1 until""` and autocorrects 239s behaves like missing before 239s registers an offense for missing space before keyword in `a "b"do end` 239s behaves like accept around 239s accepts `{}` around keyword in `"#{begin end}"` 239s behaves like accept before 239s accepts `|` before keyword in `loop { |x|break }` 239s behaves like missing after 239s registers an offense for missing space after keyword in `if a; elsif""; end` and autocorrects 239s behaves like missing after 239s registers an offense for missing space after keyword in `case a when""; end` and autocorrects 239s behaves like accept around 239s accepts `,` around keyword in `a 1,next,1` 239s behaves like accept around 239s accepts `()` around keyword in `(next)` 239s behaves like missing after 239s registers an offense for missing space after keyword in `return""` and autocorrects 239s behaves like accept around 239s accepts `[]` around keyword in `[begin end]` 239s behaves like accept before 239s accepts `**` before keyword in `a**begin end` 239s behaves like missing after 239s registers an offense for missing space after keyword in `until 1 do"x" end` and autocorrects 239s behaves like missing after 239s registers an offense for missing space after keyword in `defined?1` and autocorrects 239s behaves like missing before 239s registers an offense for missing space before keyword in `1while ""` 239s >= Ruby 2.7 239s behaves like missing after 239s registers an offense for missing space after keyword in `a in""` and autocorrects 239s behaves like missing after 239s registers an offense for missing space after keyword in `case a; in""; end` and autocorrects 239s behaves like missing before 239s registers an offense for missing space before keyword in `""in a` 239s behaves like missing before 239s registers an offense for missing space before keyword in `for x in []do end` 239s &. 239s behaves like accept after 239s accepts `&.` after keyword in `super&.foo` 239s behaves like accept after 239s accepts `&.` after keyword in `yield&.foo` 239s behaves like accept after 239s accepts `#` after keyword in `next#comment` 239s behaves like missing after 239s registers an offense for missing space after keyword in `if a then"" end` and autocorrects 239s behaves like missing after 239s registers an offense for missing space after keyword in `begin rescue; else"" end` and autocorrects 239s behaves like accept before 239s accepts `=` before keyword in `a=begin end` 239s behaves like missing before 239s registers an offense for missing space before keyword in `1or 2` 239s behaves like missing after 239s registers an offense for missing space after keyword in `1 and(2)` and autocorrects 239s behaves like accept after 239s accepts `(` after keyword in `super(1)` 239s behaves like missing before 239s registers an offense for missing space before keyword in `if a; ""else end` 239s behaves like missing before 239s registers an offense for missing space before keyword in `for x in [] do "x"end` 239s behaves like accept before 239s accepts `+` before keyword in `a+begin end` 239s >= Ruby 2.7 239s behaves like missing after 239s registers an offense for missing space after keyword in `case""; in 1; end` and autocorrects 239s behaves like missing before 239s registers an offense for missing space before keyword in `case a; when b; ""else end` 239s behaves like missing after 239s registers an offense for missing space after keyword in `case"" when 1; end` and autocorrects 239s behaves like accept after 239s accepts `.` after keyword in `yield.method` 239s behaves like missing after 239s registers an offense for missing space after keyword in `1 while""` and autocorrects 239s behaves like missing before 239s registers an offense for missing space before keyword in `begin ""ensure end` 239s behaves like missing before 239s registers an offense for missing space before keyword in `begin rescue; ""else end` 239s behaves like accept before 239s accepts `||` before keyword in `a||begin end` 239s behaves like accept after 239s accepts `(` after keyword in `return(1)` 239s behaves like missing after 239s registers an offense for missing space after keyword in `begin+1 end` and autocorrects 239s >= Ruby 2.7 239s behaves like missing before 239s registers an offense for missing space before keyword in `case a; in "pattern"unless "condition"; else "" end` 239s behaves like missing before 239s registers an offense for missing space before keyword in `case a; in b; ""else end` 239s behaves like missing after 239s registers an offense for missing space after keyword in `case a; in b; else"" end` and autocorrects 239s behaves like missing before 239s registers an offense for missing space before keyword in `case a; in "pattern"if "condition"; else "" end` 239s behaves like missing after 239s registers an offense for missing space after keyword in `case a; in "pattern" if"condition"; else "" end` and autocorrects 239s behaves like missing after 239s registers an offense for missing space after keyword in `case a; in "pattern" unless"condition"; else "" end` and autocorrects 239s behaves like missing after 239s registers an offense for missing space after keyword in `while 1 do"x" end` and autocorrects 239s behaves like missing after 239s registers an offense for missing space after keyword in `begin ensure"" end` and autocorrects 239s behaves like accept before 239s accepts `<` before keyword in `a interpolations 240s and 1 argument 240s does not register an offense 240s and multiple arguments 240s registers an offense 240s with wildcard 240s does not register an offense for width and precision 240s does not register an offense for precision 240s does not register an offense for width 240s does not register an offense for multiple wildcards 240s when using (digit)$ flag 240s registers an offense when mismatch between the maximum value specified by (digit)$ flag and the number of arguments 240s does not register an offense 240s does not register an offense when match between the maximum value specified by (digit)$ flag and the number of arguments 240s behaves like variables 240s does not register an offense for format called on a variable 240s does not register an offense for % called on a variable 240s does not register an offense for format called on a variable 240s when passed an empty array 240s does not register an offense 240s behaves like variables 240s does not register an offense for % called on a variable 240s does not register an offense for format called on a variable 240s does not register an offense for format called on a variable 240s behaves like variables 240s does not register an offense for % called on a variable 240s does not register an offense for format called on a variable 240s does not register an offense for format called on a variable 240s when splat argument is present 240s does not register an offense when args count is less than expected 240s when args count is more than expected 240s registers an offense for `#%` 240s does not register an offense for `#sprintf` 240s does not register an offense for `#format` 240s when argument itself contains format characters and formats in format string and argument are not equal 240s ignores argument formatting 240s when format is invalid 240s registers an offense 240s 240s RuboCop::Cop::Lint::InheritException 240s when class inherits from `Exception` 240s with enforced style set to `runtime_error` 240s registers an offense and corrects 240s when creating a subclass using Class.new 240s registers an offense and corrects 240s when inheriting a standard lib exception class that is not a subclass of `StandardError` 240s does not register an offense 240s with enforced style set to `standard_error` 240s registers an offense and corrects 240s when inheriting a standard lib exception class that is not a subclass of `StandardError` 240s does not register an offense 240s when creating a subclass using Class.new 240s registers an offense and corrects 240s 240s RuboCop::CLI --autocorrect 240s can correct MethodCallWithoutArgsParentheses and EmptyLiteral offenses 240s 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 240s corrects TrailingCommaIn(Array|Hash)Literal and Multiline(Array|Hash)BraceLayout offenses 240s avoids adding extra spaces when both `Style/Semicolon` and `Style/SingleLineMethods`both apply 240s corrects Style/BlockDelimiters offenses when specifyingLayout/SpaceBeforeBlockBraces with `EnforcedStyle: no_space` together 240s corrects Style/Next and Style/SafeNavigation offenses 241s breaks line at the beginning of trailing class/module body without removing a semicolon in the bodywhen using `Style/TrailingBodyOnClass` and `Style/TrailingBodyOnModule` 241s handles different SpaceInsideBlockBraces and SpaceInsideHashLiteralBraces 241s corrects `Naming/RescuedExceptionsVariableName` and `, `Style/RescueStandardError`and `Lint/OverwriteByRescue` offenses 241s can correct HashSyntax when --only is used 241s 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` 241s does not crash when using Lint/SafeNavigationWithEmpty and Layout/EmptyLinesAroundBlockBody 241s corrects `Style/RedundantBegin` with `Style/MultilineMemoization` 241s can correct single line methods 241s 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 241s does not crash when using `Layout/CaseIndentation` and `Layout/ElseAlignment` 242s 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` 242s can correct two problems with blocks 242s corrects only IndentationWidth without crashing 242s can correct TrailingEmptyLines and TrailingWhitespace offenses 242s 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` 242s does not crash Lint/SafeNavigationWithEmpty and offenses and accepts Style/SafeNavigation when checking `foo&.empty?` in a conditional 242s corrects Style/BlockDelimiters offenses when specifyingLayout/SpaceInsideBlockBraces together 242s consistently quotes symbol keys in a hash using `Lint/SymbolConversion` with `EnforcedStyle: consistent` and `Style/QuotedSymbols` 243s can correct two empty lines at end of class body 243s does not correct SpaceAroundOperators in a hash that would be changed back 244s corrects Tab and IndentationConsistency offenses 244s properly autocorrects when `Style/TernaryParentheses` requires parentheses that `Style/RedundantParentheses` would otherwise remove 244s plays nicely with default cops in complex ExtraSpacing scenarios 244s corrects `Style/InverseMethods` offenses when specifying `IncludeSemanticChanges: false` of `Style/NonNilCheck` and `EnforcedStyle: comparison` of `Style/NilComparison` 244s corrects RedundantBegin offenses and fixes indentation etc 244s corrects Layout/RedundantLineBreak and Layout/SingleLineBlockChain offenses 245s corrects `EnforcedStyle: hash_rockets` of `Style/HashSyntax` with `Layout/HashAlignment` 245s corrects IndentationWidth, RedundantBegin, and RescueEnsureAlignment offenses 245s corrects `Lint/Lambda` and `Lint/UnusedBlockArgument` offenses 245s 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` 245s properly corrects when `Style/SoleNestedConditional` and one of `Style/NegatedIf` or `Style/NegatedUnless` detect offenses 245s can correct empty line inside special form of nested modules 245s can correct MethodDefParentheses and other offense 245s does not hang SpaceAfterPunctuation and SpaceInsideParens 246s corrects IndentationWidth and IndentationConsistency offenses 246s corrects `EnforcedStyle: require_parentheses` of `Style/MethodCallWithArgsParentheses` with `Style/NestedParenthesizedCalls` 246s honors Exclude settings in individual cops 246s says [Correctable] if correction is unsafe 246s corrects indentation for a begin/rescue/else/ensure/end block properly 246s can correct two problems in the same place 246s can correct IndentHash offenses with separator style 246s corrects `Layout/DotPosition` and `Layout/SingleLineBlockChain` offenses 247s corrects when specifying `EnforcedStyle: with_first_argument` of `Layout/ArgumentAlignment` and `EnforcedColonStyle: separator` of `Layout/HashAlignment` 247s corrects RedundantCopDisableDirective offenses 247s corrects IndentationWidth and IndentationConsistency offenseswithout correcting `Style/TrailingBodyOnClass` 247s corrects code with indentation problems 247s does not correct ExtraSpacing in a hash that would be changed back 247s can be disabled for any cop in configuration 248s can change block comments and indent them 248s corrects when specifying `EnforcedStyle: with_first_argument` of `Layout/ArgumentAlignment` and `EnforcedHashRocketStyle: separator` of `Layout/HashAlignment` 248s corrects HeredocArgumentClosingParenthesis offenses and ignores TrailingCommaInArguments offense 248s does not hang SpaceAfterPunctuation and SpaceInsideArrayLiteralBrackets 248s corrects `Layout/SpaceAroundOperators` and `Layout/ExtraSpacing` offenses when using `ForceEqualSignAlignment: true` 249s corrects Style/InverseMethods and Style/Not offenses 249s can correct a problems and the problem it creates 249s corrects `EnforcedStyle: line_count_based` of `Style/BlockDelimiters` with `Style/CommentedKeyword` and `Layout/BlockEndNewline` 249s corrects when specifying `EnforcedStyle: with_fixed_indentation` of `Layout/ArgumentAlignment` and `Layout/HashAlignment` and `Layout/FirstHashElementIndentation` 249s corrects `Style/TernaryParentheses` offenses and accepts `Lint/ParenthesesAsGroupedExpression` 249s corrects `Style/IfUnlessModifier` with `Style/SoleNestedConditional` 249s corrects SymbolProc and SpaceBeforeBlockBraces offenses 250s corrects InitialIndentation offenses 250s can correct HashSyntax and SpaceAroundOperators offenses 250s does not say [Corrected] if correction is not possible 250s corrects `Style/SoleNestedConditional` with `Style/InverseMethods` and `Style/IfUnlessModifier` 250s corrects properly when both `Style/MapToHash` and `Style/HashTransformKeys`or `Style/HashTransformValues` registers 250s corrects `Lint/UnusedMethodArgument` with `Style/ExplicitBlockArgument` 250s corrects when specifying `EnforcedStyle: with_fixed_indentation` of `Layout/ArgumentAlignment` and `Layout/HashAlignment` 250s corrects `EnforcedStyle: require_parentheses` of `Style/MethodCallWithArgsParentheses` with `Style/RescueModifier` 250s corrects when specifying `EnforcedStyle: with_first_argument` of `Layout/ArgumentAlignment` and `EnforcedColonStyle: separator` of `Layout/HashAlignment` (`EnforcedColonStyle` is array) 251s can correct indentation and another thing 251s corrects Lint/ParenthesesAsGroupedExpression and offenses and accepts Style/RedundantParentheses 251s corrects `EnforcedStyle: require_parentheses` of `Style/MethodCallWithArgsParentheses` with `EnforcedStyle: conditionals` of `Style/AndOr` 251s can correct SpaceAfterComma and HashSyntax offenses 251s corrects when specifying `EnforcedStyle: with_fixed_indentation` of `Layout/ArgumentAlignment` and `EnforcedStyle: consistent` of `Layout/FirstArgumentIndentation` 251s corrects `Layout/DotPosition` and `Style/RedundantSelf` offenses 251s corrects IndentationWidth and IndentationConsistency offenseswhen using `EnforcedStyle: outdent` and `EnforcedStyle: indented_internal_methods` 251s corrects `EnforcedStyle: require_parentheses` of `Style/MethodCallWithArgsParentheses` with `Layout/SpaceBeforeFirstArg` 252s can correct WordArray and SpaceAfterComma offenses 252s corrects `EnforcedStyle: require_parentheses` of `Style/MethodCallWithArgsParentheses` with `Lint/AmbiguousOperator` 252s corrects LineEndConcatenation offenses leaving the RedundantInterpolation offense unchanged 252s caching 252s with no offenses in the cache 252s doesn't correct offenses 252s with an offense in the cache 252s corrects offenses 252s when BlockDelimiters has line_count_based style 252s corrects SpaceBeforeBlockBraces, SpaceInsideBlockBraces offenses 252s trailing comma cops 252s when the style is `comma` 253s corrects TrailingCommaInLiteral and TrailingCommaInArguments without producing a double comma 253s when the style is `consistent_comma` 253s corrects TrailingCommaInLiteral and TrailingCommaInArguments without producing a double comma 253s when BlockDelimiters has braces_for_chaining style 253s corrects SpaceBeforeBlockBraces, SpaceInsideBlockBraces offenses 253s when BlockDelimiters has semantic style 253s corrects SpaceBeforeBlockBraces, SpaceInsideBlockBraces offenses 253s space_inside_bracket cops 253s when array style is compact & reference style is space 253s corrects SpaceInsideArrayLiteralBrackets and SpaceInsideReferenceBrackets 253s when array style is space & reference style is no space 253s corrects SpaceInsideArrayLiteralBrackets and SpaceInsideReferenceBrackets 253s when array style is compact & reference style is no_space 254s corrects SpaceInsideArrayLiteralBrackets and SpaceInsideReferenceBrackets 254s when array style is no_space & reference style is space 254s corrects SpaceInsideArrayLiteralBrackets and SpaceInsideReferenceBrackets 254s 254s RuboCop::Cop::Layout::RedundantLineBreak 254s when InspectBlocks is false 254s when Layout/SingleLineBlockChain is disabled 254s reports an offense for a method call chained onto a single line block 254s when Layout/SingleLineBlockChain is enabled 254s accepts a method call chained onto a single line block 254s for an expression that fits on a single line 254s accepts an assignment containing an if expression 254s registers an offense for a method call as right hand side of an assignment 254s registers an offense for a method call with a double and single quoted split string 254s registers an offense for a method call with a double quoted split string without parentheses 254s registers an offense for a method call on multiple lines with backslash 254s registers an offense for a method call on multiple lines inside a block 254s accepts a method call on multiple lines if there are comments on them 254s registers an offense for a method call on multiple lines 254s accepts a binary expression containing an if expression 254s registers an offense for a method call with a single quoted split string 254s accepts an assignment containing a case expression 254s accepts an assignment containing a begin-end expression 254s registers an offense for a method call with a double quoted split string in parentheses 254s registers an offense for a method call with a split operation 254s accepts a method call with a block 254s accepts a method call on a single line 254s method chains 254s registers an offense and corrects with a arguments on multiple lines 254s registers an offense and corrects with a string argument on multiple lines 254s properly corrects a method chain on multiple lines 254s does not register an offense with a heredoc argument 254s with LineLength Max 100 254s registers an offense for a method without parentheses on multiple lines 254s for a block 254s accepts when the method call has no arguments 254s accepts when the method call has parentheses 254s when Layout/SingleLineBlockChain is enabled 254s accepts a multiline block without a chained method call 254s when Layout/SingleLineBlockChain is disabled 254s accepts a method call chained onto a multiline block 254s accepts a multiline block without a chained method call 254s for an expression that does not fit on a single line 254s accepts a method call on a multiple lines 254s with a longer max line length 254s accepts method call with a do keyword that would just surpass the max line length 254s accepts an assignment containing a heredoc 254s accepts a method call followed by binary operations that are too long taken together 254s accepts an assignment containing a method definition 254s registers an offense for a method call with a do keyword that is just under the max line length 254s accepts a complex method call on a multiple lines 254s for a block 254s accepts when it is difficult to convert to single line 254s when InspectBlocks is true 254s when Layout/SingleLineBlockChain is enabled 254s accepts a method call chained onto a single line block 254s for a block 254s registers an offense when the method call has no arguments 254s registers an offense when the method call has parentheses 254s when Layout/SingleLineBlockChain is disabled 254s reports an offense for a method call chained onto a multiline block 254s reports an offense for a multiline block without a chained method call 254s when Layout/SingleLineBlockChain is enabled 254s reports an offense for a multiline block without a chained method call 254s when Layout/SingleLineBlockChain is disabled 254s reports an offense for a method call chained onto a single line block 254s for an expression that does not fit on a single line 254s accepts a method call on a multiple lines 254s with a longer max line length 254s accepts a method call followed by binary operations that are too long taken together 254s accepts method call with a do keyword that would just surpass the max line length 254s registers an offense for a method call with a do keyword that is just under the max line length 254s accepts an assignment containing a heredoc 254s accepts a complex method call on a multiple lines 254s accepts an assignment containing a method definition 254s for a block 254s accepts when it is difficult to convert to single line 254s for an expression that fits on a single line 254s accepts a binary expression containing an if expression 254s registers an offense for a method call with a single quoted split string 254s accepts a method call with a block 254s registers an offense for a method call on multiple lines 254s registers an offense for a method call with a double quoted split string without parentheses 254s registers an offense for a method call with a double and single quoted split string 254s accepts a method call on multiple lines if there are comments on them 254s accepts an assignment containing a case expression 254s registers an offense for a method call with a double quoted split string in parentheses 254s accepts an assignment containing an if expression 254s registers an offense for a method call as right hand side of an assignment 254s registers an offense for a method call with a split operation 254s accepts an assignment containing a begin-end expression 254s accepts a method call on a single line 254s registers an offense for a method call on multiple lines inside a block 254s registers an offense for a method call on multiple lines with backslash 254s method chains 254s does not register an offense with a heredoc argument 254s properly corrects a method chain on multiple lines 254s registers an offense and corrects with a arguments on multiple lines 254s registers an offense and corrects with a string argument on multiple lines 254s with LineLength Max 100 254s registers an offense for a method without parentheses on multiple lines 254s 254s RuboCop::Cop::Lint::MixedRegexpCaptureTypes 254s does not register offense when using a Regexp cannot be processed by regexp_parser gem 254s registers an offense when both of named and numbered captures are used 254s does not register offense to a regexp with numbered capture only 254s does not register offense to a regexp with named capture and non-capturing group 254s does not register offense to a regexp with named capture only 254s when containing a non-regexp literal 254s does not register an offense when containing a cvar 254s does not register an offense when containing a method 254s does not register an offense when containing a ivar 254s does not register an offense when containing a lvar 254s does not register an offense when containing a gvar 254s does not register an offense when containing a constant 254s 254s RuboCop::Cop::Layout::MultilineMethodCallBraceLayout 254s ignores calls with an empty brace 254s ignores single-line calls 254s ignores calls without arguments 254s ignores calls with a multiline empty brace 254s ignores implicit calls 254s when comment present before closing brace 254s corrects closing brace without crashing 254s when EnforcedStyle is new_line 254s ignores single-line calls with multi-line receiver 254s still ignores single-line calls 254s ignores single-line calls with multi-line receiver with leading dot 254s behaves like multiline literal brace layout 254s new_line style 254s opening brace on separate line from first element 254s allows closing brace on separate line from last multiline element 254s allows closing brace on separate line from last element 254s detects closing brace on same line as last element 254s opening brace on same line as first element 254s allows closing brace on different line from last element 254s detects closing brace on same line as last multiline element 254s autocorrects closing brace on same line as last element 254s allows closing brace on different line from multi-line element 254s heredoc 254s ignores heredocs that could share a last line 254s detects heredoc structures that are safe to add to 254s same_line style 254s opening brace on same line as first element 254s detects closing brace on different line from multiline element 254s allows closing brace on same line from last element 254s autocorrects closing brace on different line as last element 254s allows closing brace on same line as multi-line element 254s with a chained call on the closing brace 254s but no comment after the last element 254s autocorrects the closing brace 254s and a comment after the last element 254s detects closing brace on separate line from last elementbut does not autocorrect the closing brace 254s opening brace on separate line from first element 254s allows closing brace on same line as last multiline element 254s allows closing brace on same line as last element 254s detects closing brace on different line from last element 254s symmetrical style 254s opening brace on same line as first element 254s detects closing brace on different line from last element 254s allows closing brace on same line as last multiline element 254s autocorrects closing brace on different line from last element 254s allows closing brace on same line as last element 254s with a chained call on the closing brace 254s but no comment after the last element 254s autocorrects the closing brace 254s and a comment after the last element 254s detects closing brace on separate line from last elementbut does not autocorrect the closing brace 254s opening brace on separate line from first element 254s allows closing brace on separate line from last element 254s allows closing brace on separate line from last multiline element 255s detects closing brace on same line as last element 255s behaves like multiline literal brace layout trailing comma 255s same_line style 255s opening brace on same line as first element 255s last element has a trailing comma 255s autocorrects closing brace on different line as last element 255s symmetrical style 255s opening brace on same line as first element 255s last element has a trailing comma 255s autocorrects closing brace on different line from last element 255s 255s RuboCop::Cop::InternalAffairs::EmptyLineBetweenExpectOffenseAndCorrection 255s does not register an offense when using only `expect_offense` 255s does not register an offense when using empty line between `expect_offense` and `expect_no_corrections` 255s does not register an offense when using empty line between `expect_offense` and `expect_correction`with variable argument 255s does not register an offense when using empty line between `expect_offense` and `expect_correction` with heredoc argument 255s registers and corrects an offense when using no empty line between `expect_offense` and `expect_correction` with heredoc argument 255s registers and corrects an offense when using no empty line between `expect_offense` and `expect_correction`with variable argument 255s registers and corrects an offense when using no empty line between `expect_offense` and `expect_no_corrections` 255s 255s RuboCop::Cop::Style::TrailingBodyOnModule 255s registers offense with multi-line module 255s accepts regular module 255s registers offense when module definition uses semicolon 255s autocorrects when there are multiple semicolons 255s registers an offense when body trails after module definition 255s autocorrects with comment after body 255s when module is not on first line of processed_source 255s autocorrects offense 255s 255s RuboCop::Cop::Lint::IneffectiveAccessModifier 255s when there is an intervening instance method 255s still registers an offense 255s when no access modifier is used 255s doesn't register an offense 255s when `protected` is applied to a class method 255s registers an offense 255s when there is `begin` before a method definition 255s does not register an offense 255s when `private` is applied to a class method 255s registers an offense 255s when `private_class_method` is used 255s when `private_class_method` does not contain the method 255s registers an offense 255s when `private_class_method` contains all private method names 255s doesn't register an offense 255s when a `class << self` block is used 255s doesn't register an offense 255s 255s RuboCop::Cop::Lint::FloatComparison 255s does not register an offense when comparing with float using epsilon 255s does not register an offense when comparing with float method that can return numeric and returns integer 255s registers an offense when comparing with method on float receiver 255s registers an offense when comparing with arightmetic operator on floats 255s registers an offense when comparing with float method that can return numeric and returns float 255s registers an offense when comparing with float returning method 255s registers an offense when comparing with float 255s 255s RuboCop::Cop::Style::StringHashKeys 255s does not register an offense when string key is used in gsub 255s does not register an offense when string key is used in Open3.pipeline 255s does not register an offense when not using strings as keys 255s does not register an offense when string key is used in IO.popen 255s autocorrects strings as keys into symbols with the correct syntax 255s does not register an offense when string key is used in Open3.capture3 255s registers an offense when using strings as keys mixed with other keys 255s registers an offense when using strings as keys 255s does not register an offense when string key is used in gsub! 255s 255s RuboCop::Formatter::FuubarStyleFormatter 255s #with_color 255s when color is enabled 255s outputs coloring sequence code at the beginning and the end 255s when color is disabled 255s outputs nothing 255s #progressbar_color 255s when a offense is detected in a file and autocorrected 255s is green 255s when a convention offense is detected in a file 255s is yellow 255s when an error offense is detected in a file 255s is red 255s and then a convention offense is detected in the next file 255s is still red 255s when convention and error offenses are detected in a file 255s is red 255s when no offenses are detected in a file 255s is still green 255s initially 255s is green 255s 255s RuboCop::Cop::Lint::UselessElseWithoutRescue 255s with `else` with `rescue` 255s accepts 255s with `else` without `rescue` 255s registers an offense 255s 255s RuboCop::Cop::Style::RedundantConditional 255s allows ternary with non-boolean results 255s registers an offense for if/elsif/else with negated boolean results 255s registers an offense for ternary with negated boolean results 255s registers an offense for if/else with negated boolean results 255s registers an offense for if/elsif/else with boolean results 255s registers an offense for ternary with boolean results 255s does not register an offense for if/else with non-boolean results 255s does not register an offense for if/elsif/else with non-boolean results 255s registers an offense for if/else with boolean results 255s 255s RuboCop::Cop::InternalAffairs::UndefinedConfig 255s works with deeper nested cop names 255s registers an offense when the cop is not within the `RuboCop::Cop` namespace 255s registers an offense when the cop has no configuration at all 255s ignores `cop_config` in non-cop classes 255s works when the base class is `Cop` instead of `Base` 255s ignores `cop_config` in non-cop subclasses 255s registers an offense when the cop inherits `::RuboCop::Cop::Base` 255s registers an offense when the cop inherits `Cop::Base` 255s registers an offense when the cop inherits `RuboCop::Cop::Base` 255s does not register an offense for implicit configuration keys 255s can handle an empty file 255s does not register an offense if using `cop_config` outside of a cop class 255s fetch 255s registers an offense for missing configuration keys 255s does not register an offense for defined configuration keys 255s with a default value 255s registers an offense for missing configuration keys 255s does not register an offense for defined configuration keys 255s element lookup 255s registers an offense for missing configuration keys 255s does not register an offense for defined configuration keys 255s 255s RuboCop::Formatter::TextUtil 255s pluralize 255s will change 0 to no when configured 255s will not pluralize 1 255s will pluralize quantities greater than 1 255s will pluralize negative quantities less than -1 255s will pluralize -1 255s will pluralize fractions 255s will not change 0 to no 255s 255s RuboCop::Cop::Layout::CaseIndentation 255s with EnforcedStyle: end 255s with IndentOneStep: false 255s `case` ... `when` 255s `else` and `end` same line 255s does not register an offense 255s `when` and `end` same line 255s does not register an offense 255s regarding assignment where the right hand side is a `case` 255s accepts a correctly indented assignment 255s registers an offense and corrects an assignment indented some other way 255s with everything on a single line 255s does not register an offense 255s `case` ... `in` 255s `in` and `end` same line 255s does not register an offense 255s regarding assignment where the right hand side is a `case` 255s accepts a correctly indented assignment 255s registers an offense and corrects an assignment indented some other way 255s with everything on a single line 255s does not register an offense 255s with IndentOneStep: true 255s `case` ... `when` 255s regarding assignment where the right hand side is a `case` 255s accepts a correctly indented assignment 255s registers an offense and corrects an assignment indented some other way 255s registers an offense and corrects an assignment indented as `case` 255s with everything on a single line 255s does not register an offense 255s `case` ... `in` 255s with everything on a single line 255s does not register an offense 255s regarding assignment where the right hand side is a `case` 255s registers an offense and corrects an assignment indented as `case` 255s registers an offense and corrects an assignment indented some other way 255s accepts a correctly indented assignment 255s when `when` is on the same line as `case` 255s registers an offense but does not autocorrect 255s with EnforcedStyle: case 255s with IndentOneStep: false 255s `case` ... `in` 255s registers an offense and corrects an `in` clause that is indented deeper than `case` 255s accepts correctly indented whens in complex combinations 255s doesn't get confused by strings with `case` in them 255s accepts an `in` clause that's equally indented with `case` 255s doesn't get confused by symbols named `case` or `in` 255s with everything on a single line 255s does not register an offense 255s regarding assignment where the right hand side is a `case` 255s registers an offense and corrects correct + opposite style 255s accepts a correctly indented assignment 255s registers an offense and corrects assignment indented some other way 255s registers an offense and corrects assignment indented as `end` 255s `case` ... `when` 255s doesn't get confused by symbols named `case` or `when` 255s accepts a `when` clause that's equally indented with `case` 255s registers an offense and corrects a `when` clause that is indented deeper than `case` 255s accepts correctly indented whens in complex combinations 255s doesn't get confused by strings with `case` in them 255s with everything on a single line 255s does not register an offense 255s regarding assignment where the right hand side is a `case` 255s registers an offense and corrects assignment indented some other way 255s registers an offense and corrects correct + opposite style 255s accepts a correctly indented assignment 255s registers an offense and corrects assignment indented as end 255s with IndentOneStep: true 255s `case` ... `when` 255s registers an offense and corrects a `when` clause that is equally indented with `case` 255s accepts a `when` clause that's 2 spaces deeper than `case` 255s regarding assignment where the right hand side is a `case` 255s accepts a correctly indented assignment 255s registers an offense and corrects an assignment indented some other way 255s with everything on a single line 255s does not register an offense 255s when indentation width is overridden for this cop only 255s respects cop-specific IndentationWidth 255s `case` ... `in` 255s accepts an `in` clause that's 2 spaces deeper than `case` 255s registers an offense and corrects an `in` clause that is equally indented with `case` 255s when indentation width is overridden for this cop only 255s respects cop-specific IndentationWidth 255s with everything on a single line 255s does not register an offense 255s regarding assignment where the right hand side is a `case` 255s registers an offense and corrects an assignment indented some other way 255s accepts a correctly indented assignment 255s 255s RuboCop::Cop::Lint::UnderscorePrefixedVariableName 255s in a method calling `binding` with arguments 255s when an underscore-prefixed argument is used explicitly 255s registers an offense 255s when an underscore-prefixed argument is not used 255s does not register an offense 255s when an underscore-prefixed variable is captured by a block 255s accepts 255s in a method calling `super` without arguments 255s when an underscore-prefixed argument is used explicitly 255s registers an offense 255s when an underscore-prefixed argument is not used explicitly 255s does not register an offense 255s when an underscore-prefixed variable in top-level scope is used 255s registers an offense 255s when an underscore-prefixed method argument is used 255s registers an offense 255s when an underscore-prefixed named capture variable is used 255s registers an offense 255s when non-underscore-prefixed variable is used 255s does not register an offense 255s when an underscore-prefixed variable is used 255s registers an offense 255s in a method calling `binding` without arguments 255s when an underscore-prefixed argument is not used explicitly 255s does not register an offense 255s when an underscore-prefixed argument is used explicitly 255s registers an offense 255s when an underscore-prefixed variable is reassigned 255s does not register an offense 255s in a method calling `super` with arguments 255s when an underscore-prefixed argument is not used 255s does not register an offense 255s when an underscore-prefixed argument is used explicitly 255s registers an offense 255s when an underscore-prefixed block argument is used 255s registers an offense 255s registers an offense 255s when an underscore-prefixed keyword block argument is used 255s registers an offense 255s when AllowKeywordBlockArguments is set 255s does not register an offense 255s 255s RuboCop::Cop::Style::WhileUntilDo 255s accepts multi-line until without do 255s accepts do in single-line until 255s registers an offense for do in multiline until 255s registers an offense for do in multiline while 255s accepts multi-line while without do 255s accepts do in single-line while 255s 255s RuboCop::Cop::Corrector 255s #rewrite 255s allows insertion after a source range 255s allows removal of characters from range beginning 255s raises a useful error if not given a node or a range 255s allows removal of a range 255s allows insertion before and after a source range 255s accepts a node instead of a range 255s allows replacement of a range 255s allows removal of characters preceding range 255s allows removal of characters from range ending 255s allows insertion before a source range 255s when range is from incorrect source 255s raises exception from remove_trailing 255s raises exception from replace 255s raises exception from remove_leading 255s raises exception from insert_after 255s raises exception from remove_preceding 255s raises exception from insert_before 255s raises exception from remove 255s 255s RuboCop::Cop::Lint::AmbiguousOperator 255s with a keyword splat operator in the first argument 255s without parentheses 255s with a whitespace on the right of the operator 255s does not register an offense 255s without whitespaces on the right of the operator 255s registers an offense and corrects 255s with parentheses around the keyword splat operator 255s does not register an offense 255s with a block ampersand in the first argument 255s without parentheses 255s with a whitespace on the right of the operator 255s does not register an offense 255s without whitespaces on the right of the operator 255s registers an offense and corrects 255s with parentheses around the block argument 255s does not register an offense 255s with `-` unary operator in the first argument 255s with parentheses around the operator 255s does not register an offense 255s without parentheses 255s with a whitespace on the right of the operator 255s does not register an offense 255s without whitespaces on the right of the operator 255s registers an offense and corrects 255s with a splat operator in the first argument 255s with parentheses around the splatted argument 255s does not register an offense 255s without parentheses 255s without whitespaces on the right of the operator 256s registers an offense and corrects 256s with a whitespace on the right of the operator 256s does not register an offense 256s with `+` unary operator in the first argument 256s with parentheses around the operator 256s does not register an offense 256s without parentheses 256s with a whitespace on the right of the operator 256s does not register an offense 256s without whitespaces on the right of the operator when a method with no arguments is used in advance 256s registers an offense and corrects 256s without whitespaces on the right of the operator 256s registers an offense and corrects 256s when using safe navigation operator with a unary operator 256s does not register an offense 256s 256s RuboCop::Formatter::TapFormatter 256s #finished 256s when any offenses are detected 256s reports all detected offenses for all failed files 256s when no offenses are detected 256s does not report offenses 256s #file_finished 256s when no offenses are detected 256s prints "ok" 256s when any offenses are detected 256s prints "not ok" 256s #report_file 256s when the source contains multibyte characters 256s displays text containing the offending source line 256s 256s RuboCop::Cop::Metrics::Utils::CodeLengthCalculator 256s #calculate 256s raises when unknown foldable type is passed 256s when method 256s counts comments if asked 256s folds hashes as method kwargs if asked 256s folds hashes with comment if asked 256s counts single line hash as the one of method args with safe navigation operator if asked folding 256s counts single line correctly if asked folding 256s folds multiline hashes with line break after it as method args if asked 256s folds hashes if asked 256s calculates method length 256s folds arrays if asked 256s does not count blank lines 256s counts single line hash with other args correctly if asked folding 256s folds hashes as method args if asked 256s folds multiline hashes with line break before it as method args if asked 256s folds heredocs if asked 256s folds multiline hashes without braces as method args if asked 256s counts single line hash with line breaks correctly if asked folding 256s counts single line without parentheses correctly if asked folding 256s counts single line hash as the one of method args if asked folding 256s folds hashes without braces as the one of method args if asked 256s when class 256s calculates class length 256s folds arrays if asked 256s folds hashes if asked 256s counts comments if asked 256s does not count blank lines 256s does not count lines of inner classes 256s folds heredocs if asked 256s 256s RuboCop::Cop::AnnotationComment 256s #correct? 256s when a colon is required 256s behaves like incorrect 256s is expected to be falsey 256s behaves like incorrect 256s is expected to be falsey 256s behaves like incorrect 256s is expected to be falsey 256s behaves like correct 256s is expected to be truthy 256s behaves like correct 256s is expected to be truthy 256s behaves like incorrect 256s is expected to be falsey 256s behaves like correct 256s is expected to be truthy 256s behaves like incorrect 256s is expected to be falsey 256s behaves like incorrect 256s is expected to be falsey 256s behaves like incorrect 256s is expected to be falsey 256s behaves like incorrect 256s is expected to be falsey 256s behaves like incorrect 256s is expected to be falsey 256s behaves like incorrect 256s is expected to be falsey 256s behaves like incorrect 256s is expected to be falsey 256s when no colon is required 256s behaves like correct 256s is expected to be truthy 256s behaves like incorrect 256s is expected to be falsey 256s behaves like incorrect 256s is expected to be falsey 256s behaves like incorrect 256s is expected to be falsey 256s behaves like incorrect 256s is expected to be falsey 256s behaves like incorrect 256s is expected to be falsey 256s behaves like incorrect 256s is expected to be falsey 256s behaves like incorrect 256s is expected to be falsey 256s behaves like incorrect 256s is expected to be falsey 256s behaves like incorrect 256s is expected to be falsey 256s behaves like correct 256s is expected to be truthy 256s behaves like incorrect 256s is expected to be falsey 256s behaves like correct 256s is expected to be truthy 256s behaves like incorrect 256s is expected to be falsey 256s when there is duplication in the keywords 256s when the shorter keyword is given first 256s behaves like incorrect 256s is expected to be falsey 256s behaves like correct 256s is expected to be truthy 256s behaves like correct 256s is expected to be truthy 256s behaves like incorrect 256s is expected to be falsey 256s when the longer keyword is given first 256s behaves like incorrect 256s is expected to be falsey 256s behaves like correct 256s is expected to be truthy 256s behaves like incorrect 256s is expected to be falsey 256s behaves like correct 256s is expected to be truthy 256s #annotation? 256s when the keyword is not capitalized properly 256s is expected to equal true 256s when given a keyword followed by a space 256s is expected to equal true 256s when given as the first word of a sentence 256s is expected to be falsey 256s when annotated with a non keyword 256s is expected to be falsey 256s when given a keyword followed by a colon 256s is expected to equal true 256s when it includes a keyword 256s is expected to be falsey 256s when the keyword is multiple words 256s is expected to equal true 256s 256s RuboCop::Cop::Naming::VariableName 256s when configured for camelCase 256s registers an offense for snake case in local variable name 256s accepts camel case in instance variable name 256s registers an offense for default method arguments 256s accepts local variables marked as unused 256s accepts camel case in class variable name 256s registers an offense for camel case when invoking method args 256s accepts screaming snake case constants 256s accepts screaming snake case globals 256s registers an offense for rest arguments 256s accepts assignment with indexing of self 256s accepts one symbol size local variables 256s accepts camel case in local variable name 256s registers an offense for block arguments 256s accepts camel case local variables marked as unused 256s registers an offense for snake case in method parameter 256s registers an offense for keyword arguments 256s registers an offense for keyword rest arguments 256s registers an offense for opposite + correct 256s accepts assigning to camel case constant 256s accepts with non-ascii characters 256s when AllowedPatterns is set 256s does not register an offense for a class variable name that matches the allowed pattern 256s does not register an offense for a instance variable name that matches the allowed pattern 256s does not register an offense for a symbol that matches the allowed pattern 256s does not register an offense for a method name that matches the allowed pattern 256s does not register an offense for a global variable name that matches the allowed pattern 256s does not register an offense for a local variable name that matches the allowed pattern 256s when AllowedIdentifiers is set 256s does not register an offense for a global variable name that is allowed 256s does not register an offense for a symbol that is allowed 256s does not register an offense for a local variable name that is allowed 256s does not register an offense for a class variable name that is allowed 256s does not register an offense for a method name that is allowed 256s does not register an offense for a instance variable name that is allowed 256s when configured for snake_case 256s accepts screaming snake case constants 256s registers an offense for rest arguments 256s registers an offense for default method arguments 256s accepts assigning to camel case constant 256s accepts screaming snake case globals 256s registers an offense for camel case when invoking method args 256s registers an offense for method arguments 256s registers an offense for block arguments 256s registers an offense for keyword rest arguments 256s registers an offense for camel case in class variable name 256s registers an offense for correct + opposite 256s registers an offense for keyword arguments 256s registers an offense for camel case local variables marked as unused 256s accepts local variables marked as unused 256s registers an offense for camel case in instance variable name 256s accepts assignment with indexing of self 256s accepts one symbol size local variables 256s registers an offense for camel case in local variable name 256s when AllowedIdentifiers is set 256s does not register an offense for a instance variable name that is allowed 256s does not register an offense for a local variable name that is allowed 256s does not register an offense for a method name that is allowed 256s does not register an offense for a class variable name that is allowed 256s does not register an offense for a symbol that is allowed 256s does not register an offense for a global variable name that is allowed 256s when AllowedPatterns is set 256s does not register an offense for a local variable name that matches the allowed pattern 256s does not register an offense for a instance variable name that matches the allowed pattern 256s does not register an offense for a symbol that matches the allowed pattern 256s does not register an offense for a method name that matches the allowed pattern 256s does not register an offense for a global variable name that matches the allowed pattern 256s does not register an offense for a class variable name that matches the allowed pattern 256s 256s RuboCop::Cop::Layout::SpaceAfterSemicolon 256s does not crash if semicolon is the last character of the file 256s registers an offense and corrects semicolon without space after it 256s inside block braces 256s when EnforcedStyle for SpaceInsideBlockBraces is no_space 256s accepts no space between a semicolon and a closing brace 256s behaves like common behavior 256s accepts a space between a semicolon and a closing brace 256s when EnforcedStyle for SpaceInsideBlockBraces is space 256s registers an offense and corrects no space between a semicolon and a closing brace 256s behaves like common behavior 256s accepts a space between a semicolon and a closing brace 256s 256s RuboCop::Cop::Style::AsciiComments 256s registers an offense for a comment with non-ascii chars 256s accepts comments with only ascii chars 256s registers an offense for comments with mixed chars 256s when certain non-ascii chars are allowed 256s accepts comment with allowed non-ascii chars 256s registers an offense for comments with non-allowed non-ascii chars 256s 256s RuboCop::Cop::Lint::CircularArgumentReference 256s circular argument references in keyword arguments 256s when there is one circular argument reference 256s registers an offense 256s when the keyword argument is not circular, and calls a method 256s does not register an offense 256s when the keyword argument is not circular, but calls a method of some other object with the same name 256s does not register an offense 256s when the keyword argument is not circular 256s does not register an offense 256s when the keyword argument is not circular, but calls a method of its own class with a self specification 256s does not register an offense 256s when there are multiple offensive keyword arguments 256s registers an offense 256s circular argument references in ordinal arguments 256s when the method contains a circular argument reference 256s registers an offense 256s when the seemingly-circular default value is a method call 256s does not register an offense 256s when the method does not contain a circular argument reference 256s does not register an offense 256s 256s RuboCop::Cop::Style::StringMethods 256s registers an offense 256s when using safe navigation operator 256s registers an offense 256s 256s RuboCop::Cop::Style::Encoding 256s registers an offense and corrects if there are multiple encoding magic comments 256s registers an offense and corrects the magic comment follows another magic comment 256s does not register an offense when encoding present but not UTF-8 256s does not register an offense when encoding is not at the top of the file 256s registers an offense when encoding present on 2nd line after shebang 256s does not register an offense when encoding is in the wrong place 256s does not register an offense on a different magic comment type 256s does not register an offense when no encoding present 256s registers an offense when encoding present and UTF-8 256s emacs comment 256s registers an offense for encoding 256s only removes encoding if there are other editor comments 256s vim comments 256s registers an offense and corrects 256s 256s RuboCop::Cop::Utils::FormatString 256s finds the correct number of fields 256s #valid? 256s returns false when there are numbered and named formats 256s returns false when there are unnumbered and named formats 256s returns true when there are only numbered formats 256s returns true when there are only unnumbered formats 256s returns true when there are only named formats 256s returns true when there are only named with escaped `%` formats 256s returns false when there are unnumbered and numbered formats 256s #named_interpolation? 256s behaves like named format sequence 256s does not detect escaped named format sequence 256s detects named format sequence 256s behaves like named format sequence 256s does not detect escaped named format sequence 256s detects named format sequence 256s behaves like named format sequence 256s detects named format sequence 256s does not detect escaped named format sequence 256s behaves like named format sequence 256s does not detect escaped named format sequence 256s detects named format sequence 256s 256s RuboCop::Cop::Style::RedundantArgument 256s does not register an offense when method called with different argument 256s registers an offense and corrects when method called on variable 256s does not register an offense when method called with more than one arguments 256s does not register an offense when method called with no receiver 256s registers an offense and corrects when method called without parenthesis on variable 256s registers an offense and corrects when method called on literals 256s registers an offense and corrects when method called without parenthesis on literals 256s works with double-quoted strings when configuration is single-quotes 256s does not register an offense when method called with no arguments 256s non-builtin method 256s registers an offense and corrects with configured argument 256s does not register an offense with other argument 256s 256s RuboCop::Cop::Style::Next 256s does not blow up on empty body for block 256s allows loops with conditions at the end with ternary op 256s handles nested autocorrections 256s does not blow up on empty body while block 256s does not crash with an empty body branch 256s doesn't reindent heredoc bodies when autocorrecting 256s handles `then` when autocorrecting 256s does not crash with empty brackets 256s allows super nodes 256s does not blow up on empty body until block 256s allows empty blocks 256s keeps comments when autocorrecting 256s behaves like iterators 256s reports an offense for if whose body has 3 lines 256s registers an offense for if inside of select 256s allows loops with conditional return 256s allows loops with if with else, nested in another condition 256s registers an offense for if inside of nested iterators 256s allows loops with if being the entire body with else 256s registers an offense for if inside of each_with_object 256s registers an offense for if inside of loop 256s registers an offense for if inside of times 256s registers an offense for if inside of nested iterators 256s registers an offense for if inside of downto 256s registers an offense for if inside of for 256s allows loops with if with else at the end 256s registers an offense for if inside of collect 256s allows loops with conditional break 256s registers an offense for a condition at the end of an iterator when there is more in the iterator than the condition 256s registers an offense when line break before condition 256s registers an offense for if inside of reject 256s autocorrects a misaligned end 256s registers an offense for if inside of map 256s registers an offense for if inside of reject! 256s registers an offense for if inside of select! 256s registers an offense for if inside of each 256s EnforcedStyle: always 256s registers an offense for modifier if 256s Ruby 2.7 256s registers an offense for if inside of downto numblock 256s EnforcedStyle: skip_modifier_ifs 256s allows modifier if 256s MinBodyLength: 3 256s accepts if whose body has 1 line 256s behaves like iterators 256s registers an offense for unless inside of select 256s registers an offense for unless inside of downto 256s registers an offense for unless inside of loop 256s registers an offense for unless inside of each 256s registers an offense for unless inside of each_with_object 256s allows loops with conditional break 256s autocorrects a misaligned end 256s registers an offense for unless inside of reject 256s registers an offense for unless inside of times 256s registers an offense for unless inside of map 256s registers an offense when line break before condition 256s allows loops with conditional return 256s registers an offense for unless inside of nested iterators 256s allows loops with unless being the entire body with else 256s registers an offense for a condition at the end of an iterator when there is more in the iterator than the condition 256s allows loops with unless with else, nested in another condition 256s registers an offense for unless inside of select! 256s allows loops with unless with else at the end 256s registers an offense for unless inside of collect 256s reports an offense for unless whose body has 3 lines 256s registers an offense for unless inside of nested iterators 256s registers an offense for unless inside of for 256s registers an offense for unless inside of reject! 256s EnforcedStyle: always 256s registers an offense for modifier unless 256s EnforcedStyle: skip_modifier_ifs 256s allows modifier unless 256s Ruby 2.7 256s registers an offense for unless inside of downto numblock 256s Invalid MinBodyLength 256s fails with an error 256s 256s RuboCop::Cop::Naming::FileName 256s with snake_case file names ending in .rb 256s does not register an offense 256s when the file is specified in AllCops/Include 256s with a non-snake_case file name 256s does not register an offense 256s with dotfiles 256s does not register an offense 256s with snake_case names which use ? and ! 256s does not register an offense 256s with non-ascii characters in filename 256s does not register an offense 256s when Regex is set 256s with a non-matching name 256s registers an offense 256s with a matching name 256s does not register an offense 256s with camelCase file names without file extension 256s registers an offense 256s with snake_case file names without file extension 256s does not register an offense 256s when CheckDefinitionPathHierarchy is false 256s on a file with a matching class 256s does not register an offense 256s with a non-matching module containing a matching struct 256s does not register an offense 256s in a non-matching directory, but with a matching class 256s does not register an offense 256s with a matching module containing a non-matching struct 256s does not register an offense 256s on a file with a non-matching struct 256s registers an offense 256s with a matching module containing a non-matching class 256s does not register an offense 256s with a non-matching module containing a matching class 256s does not register an offense 256s on a file with a non-matching class 256s registers an offense 256s on a file with a matching struct 256s does not register an offense 256s on an empty file 256s registers an offense 256s with snake_case names which use + 256s does not register an offense 256s when ExpectMatchingDefinition is true 256s on a file which defines a Struct without a block 256s in a non-matching directory under src 256s registers an offense 256s in a directory with multiple instances of test 256s does not register an offense 256s in a non-matching directory under spec 256s registers an offense 256s in a non-matching directory under lib 256s registers an offense 256s in a matching directory under lib 256s does not register an offense 256s in a directory with multiple instances of src 256s does not register an offense 256s in a matching directory under test 256s does not register an offense 256s in a directory with multiple instances of lib 256s does not register an offense 256s in a directory with multiple instances of spec 256s does not register an offense 256s in a matching directory under src 256s does not register an offense 256s in a matching directory under spec 256s does not register an offense 256s in a non-matching directory under test 256s registers an offense 256s in a directory elsewhere which only matches the module name 256s does not register an offense 256s in a directory elsewhere which does not match the module name 256s registers an offense 256s on a file which defines multiple classes 256s in a non-matching directory under spec 256s registers an offense 256s in a non-matching directory under lib 256s registers an offense 256s in a non-matching directory under src 256s registers an offense 256s in a directory with multiple instances of src 256s does not register an offense 256s in a matching directory under src 256s does not register an offense 256s in a matching directory under lib 256s does not register an offense 256s in a directory with multiple instances of lib 256s does not register an offense 256s in a directory with multiple instances of test 256s does not register an offense 256s in a directory elsewhere which only matches the module name 256s does not register an offense 256s in a directory with multiple instances of spec 256s does not register an offense 256s in a non-matching directory under test 256s registers an offense 256s in a directory elsewhere which does not match the module name 256s registers an offense 256s in a matching directory under test 256s does not register an offense 256s in a matching directory under spec 256s does not register an offense 256s on a file which uses Name::Spaced::Module syntax 256s in a matching directory under src 256s does not register an offense 256s in a non-matching directory under spec 256s registers an offense 256s in a non-matching directory under test 256s registers an offense 256s in a matching directory under spec 256s does not register an offense 256s in a directory elsewhere which only matches the module name 256s does not register an offense 256s in a non-matching directory under lib 256s registers an offense 256s in a matching directory under test 256s does not register an offense 256s in a directory with multiple instances of src 256s does not register an offense 256s in a directory with multiple instances of test 256s does not register an offense 256s in a directory with multiple instances of spec 256s does not register an offense 256s in a non-matching directory under src 256s registers an offense 256s in a directory elsewhere which does not match the module name 256s registers an offense 256s in a directory with multiple instances of lib 256s does not register an offense 256s in a matching directory under lib 256s does not register an offense 256s on a file which defines a Struct with a block 256s in a matching directory under src 256s does not register an offense 256s in a matching directory under test 256s does not register an offense 256s in a non-matching directory under test 256s registers an offense 256s in a directory with multiple instances of src 256s does not register an offense 256s in a matching directory under spec 256s does not register an offense 256s in a non-matching directory under src 256s registers an offense 256s in a directory with multiple instances of test 256s does not register an offense 256s in a non-matching directory under spec 256s registers an offense 256s in a directory with multiple instances of spec 256s does not register an offense 256s in a directory elsewhere which only matches the module name 256s does not register an offense 256s in a directory elsewhere which does not match the module name 256s registers an offense 256s in a matching directory under lib 256s does not register an offense 256s in a directory with multiple instances of lib 256s does not register an offense 256s in a non-matching directory under lib 256s registers an offense 256s on an empty file with a space in its filename 256s registers an offense 256s on a file which defines a nested class 256s in a directory with multiple instances of src 256s does not register an offense 256s in a matching directory under test 256s does not register an offense 256s in a matching directory under spec 256s does not register an offense 256s in a non-matching directory under src 256s registers an offense 256s in a non-matching directory under lib 256s registers an offense 256s in a directory elsewhere which only matches the module name 256s does not register an offense 256s in a matching directory under src 256s does not register an offense 256s in a matching directory under lib 256s does not register an offense 256s in a directory with multiple instances of test 256s does not register an offense 256s in a directory with multiple instances of spec 256s does not register an offense 256s in a directory elsewhere which does not match the module name 256s registers an offense 256s in a directory with multiple instances of lib 256s does not register an offense 256s in a non-matching directory under spec 257s registers an offense 257s in a non-matching directory under test 257s registers an offense 257s on an empty file 257s registers an offense 257s on a file which defines no class or module at all 257s under test 257s registers an offense 257s under some other random directory 257s registers an offense 257s under lib 257s registers an offense 257s under spec 257s registers an offense 257s under lib when not added to root 257s registers an offense 257s under src 257s registers an offense 257s on a file which defines a nested module 257s in a matching directory under src 257s does not register an offense 257s in a directory elsewhere which does not match the module name 257s registers an offense 257s in a matching directory under test 257s does not register an offense 257s in a directory with multiple instances of lib 257s does not register an offense 257s in a non-matching directory under spec 257s registers an offense 257s in a directory elsewhere which only matches the module name 257s does not register an offense 257s in a non-matching directory under src 257s registers an offense 257s in a directory with multiple instances of src 257s does not register an offense 257s in a matching directory under lib 257s does not register an offense 257s in a directory with multiple instances of spec 257s does not register an offense 257s in a non-matching directory under test 257s registers an offense 257s in a matching directory under spec 257s does not register an offense 257s in a directory with multiple instances of test 257s does not register an offense 257s in a non-matching directory under lib 257s registers an offense 257s with snake_case file names with multiple extensions 257s does not register an offense 257s with non-snake-case file names with a shebang 257s does not register an offense 257s when IgnoreExecutableScripts is disabled 257s registers an offense 257s with snake_case file names with non-rb extension 257s does not register an offense 257s with include acronym name 257s does not register an offense 257s with camelCase file names ending in .rb 257s registers an offense 257s with acronym class name 257s does not register an offense 257s with acronym namespace 257s does not register an offense 257s 257s RuboCop::Cop::Layout::IndentationStyle 257s when EnforcedStyle is tabs 257s registers offenses before __END__ but not after 257s registers and corrects an offense for a line indented with multiple spaces 257s accepts a line with tab in a string 257s registers and corrects an offense for a line indented with fractional number ofindentation groups by rounding down 257s accepts a line which begins with tab in a string 257s accepts a line which begins with tab in a multiline heredoc 257s accepts a line a tab other than indentation 257s registers and corrects an offense for a line indented with space 257s accepts a line which begins with tab in a heredoc 257s registers and corrects an offense for a line with tab in a string indented with space 257s registers an offense for a line indented with mixed whitespace 257s accepts a line with tabs between string literals 257s custom indentation width 257s uses the configured number of spaces to replace with a tab 257s when EnforcedStyle is spaces 257s registers offenses before __END__ but not after 257s registers and corrects an offense for a line indented with mixed whitespaces 257s accepts a line which begins with tab in a heredoc 257s accepts a line with tab in a string 257s accepts a line which begins with tab in a multiline heredoc 257s accepts a line which begins with tab in a string 257s accepts a line with a tab other than indentation 257s registers and corrects an offense for a line indented with tab 257s accepts a line with a tab between string literals 257s registers and corrects an offense for a line indented with multiple tabs 257s registers and corrects an offense for a line with tab in a string indented with tab 257s custom indentation width 257s uses the configured number of spaces to replace a tab 257s 257s RuboCop::Cop::Style::ParenthesesAroundCondition 257s allows parens if the condition node is a modifier rescue op 257s registers an offense for parentheses around condition 257s is not confused by leading parentheses in subexpression 257s does not blow up for empty unless condition 257s does not blow up for empty if condition 257s does not register an offense when parentheses in multiple expressions separated by semicolon 257s does not blow up when the condition is a ternary op 257s allows parens if the condition node is a modifier unless op 257s accepts parentheses around condition in a ternary 257s allows parens if the condition node is a modifier until op 257s accepts parentheses if there is no space between the keyword and (. 257s allows parens if the condition node is a modifier if op 257s is not confused by parentheses in subexpression 257s allows parens if the condition node is a modifier while op 257s safe assignment is not allowed 257s does not accept element assignment in condition surrounded with parentheses 257s does not accept variable assignment in condition surrounded with parentheses 257s parentheses in multiline conditions are allowed 257s registers an offense for parentheses in single line condition 257s accepts parentheses around multiline condition 257s safe assignment is allowed 257s accepts element assignment in condition surrounded with parentheses 257s accepts variable assignment in condition surrounded with parentheses 257s accepts setter in condition surrounded with parentheses 257s parentheses in multiline conditions are not allowed 257s registers an offense for parentheses around multiline condition 257s 257s RuboCop::Cop::Lint::ToEnumArguments 257s registers an offense when arguments are swapped 257s does not register an offense when not inside method definition 257s ignores the block argument 257s registers an offense when other values are passed for keyword arguments 257s registers an offense when enumerator is created for `__method__` with missing arguments 257s registers an offense when enumerator is created for another method 257s registers an offense when required keyword arg is missing 257s registers an offense when splat arg is missing 257s does not register an offense when enumerator is created with `:m` and the correct arguments 257s registers an offense when required arg is missing 257s registers an offense when splat keyword arg is missing 257s registers an offense when optional arg is missing 257s registers an offense when method is called on `self` 257s does not register an offense when enumerator is created with `__callee__` and the correct arguments 257s does not register an offense when method call has a receiver other than `self` 257s does not register an offense when enumerator is created with `__method__` and the correct arguments 257s registers an offense when optional keyword arg is missing 257s arguments forwarding 257s does not register an offense when enumerator is created with the correct arguments 257s registers an offense when enumerator is created with non matching arguments 257s 257s RuboCop::Cop::Style::MethodCallWithoutArgsParentheses 257s registers an offense for `obj.method += func()` 257s accepts parentheses for methods starting with an upcase letter 257s accepts parens after not 257s accepts special lambda call syntax 257s registers an offense for `obj.method &&= func()` 257s autocorrects calls that could be empty literals 257s accepts parens in method call with args 257s registers an offense for parens in method call without args 257s registers an offense for `obj.method ||= func()` 257s when AllowedPatterns is enabled 257s ignores method listed in AllowedMethods 257s when AllowedMethods is enabled 257s ignores method listed in AllowedMethods 257s assignment to a variable with the same name 257s accepts parens in default argument assignment 257s accepts parens in local variable assignment 257s accepts parens in shorthand assignment 257s accepts parens in parallel assignment 257s accepts parens in complex assignment 257s method call as argument 257s accepts without parens 257s registers an offense with empty parens 257s registers an empty parens offense for multiple assignment 257s 257s RuboCop::Cop::Style::Send 257s with public_send 257s and with a receiver 257s does not register an offense for an invocation without args 257s does not register an offense for an invocation with args 257s and without a receiver 257s does not register an offense for an invocation without args 257s does not register an offense for an invocation with args 257s with send 257s and with a receiver 257s registers an offense for an invocation with args 257s does not register an offense for an invocation without args 257s when using safe navigation operator 257s registers an offense for an invocation with args 257s and without a receiver 257s registers an offense for an invocation with args 257s does not register an offense for an invocation without args 257s with __send__ 257s and with a receiver 257s does not register an offense for an invocation without args 257s does not register an offense for an invocation with args 257s and without a receiver 257s does not register an offense for an invocation without args 257s does not register an offense for an invocation with args 257s 257s RuboCop::Cop::Style::RedundantReturn 257s reports an offense for def ending with return with splat argument 257s does not blow up on empty method body 257s reports an offense for def ending with return 257s reports an offense for def with only a return 257s does not blow up on empty if body 257s accepts return in a non-final position 257s autocorrects by removing redundant returns 257s reports an offense for defs ending with return 257s reports an offense for defs with only a return 257s when case nodes are empty 257s accepts empty when nodes 257s when multi-value returns are allowed 257s accepts defs with only a return 257s accepts def with only a return 257s accepts defs ending with return 257s accepts def ending with return 257s when return is inside begin-end body 257s registers an offense and autocorrects 257s when multi-value returns are not allowed 257s reports an offense for defs with only a return 257s reports an offense when multiple return values have a parenthesized return value 257s reports an offense for def ending with return 257s reports an offense for defs ending with return 257s autocorrects by removing return when using an explicit hash 257s reports an offense for def with only a return 257s autocorrects by making an implicit hash explicit 257s when rescue and return blocks present 257s registers an offense and autocorrects when inside function or rescue block 257s registers an offense and autocorrects when rescue has else clause 257s when return is inside an if-branch 257s registers an offense and autocorrects 257s when return has no arguments 257s behaves like common behavior 257s registers an offense for return() and autocorrects replacing return() with nil 257s behaves like common behavior 257s registers an offense for return and autocorrects replacing return with nil 257s when return is inside a when-branch 257s registers an offense and autocorrects 257s 257s RuboCop::Cop::Security::YAMLLoad 257s does not register an offense for YAML.load under a different namespace 257s registers an offense and corrects a fully qualified ::YAML.load 257s does not register an offense for YAML.dump 257s registers an offense and corrects load with a literal string 257s Ruby >= 3.1 257s does not register an offense and corrects load with a literal string 257s does not register an offense and corrects a fully qualified `::YAML.load` 257s 257s RuboCop::Cop::Layout::EmptyLinesAroundArguments 257s when extra lines 257s registers and autocorrects offense on correct lines for multi-offense example 257s registers autocorrects empty line whetn args start on definition line 257s registers and autocorrects offense when args start on definition line 257s registers and autocorrects offense for empty line after arg 257s registers and autocorrects offense for empty line between args 257s registers and autocorrects offense on correct line for single offense example 257s registers and autocorrects offenses when multiple empty lines are detected 257s registers and autocorrects offense for empty line before arg 257s registers and autocorrects offense when empty line between normal arg & block arg 257s when using safe navigation operator 257s registers and autocorrects offense for empty line before arg 257s when no extra lines 257s accepts method with argument that trails off heredoc 257s accepts method with argument that trails off block 257s accepts multiple listed mixed args 257s accepts method with no arguments that trails off block 257s accepts block argument with empty line 257s accepts one line methods 257s accepts when blank line is inserted between method with arguments and receiver 257s accepts multiline style argument for method call without selector 257s accepts listed args starting on definition line 257s with multiple arguments 257s ignores empty lines inside of method arguments 257s with one argument 257s ignores empty lines inside of method arguments 257s 257s RuboCop::Cop::Lint::EmptyFile 257s does not register an offense when the file contains comments 257s registers an offense when the file is empty 257s does not register an offense when the file contains code 257s when AllowComments is false 257s registers an offense when the file contains comments 257s 257s RuboCop::Cop::Lint::RedundantStringCoercion 257s registers an offense and corrects `to_s` in an interpolation with several expressions 257s registers an offense and corrects `to_s` in interpolation 257s does not explode on empty interpolation 257s registers an offense and corrects an implicit receiver 257s accepts interpolation without #to_s 257s accepts #to_s with arguments in an interpolation 257s 257s RuboCop::Cop::Badge 257s can be converted to a string with the Department/CopName format 257s exposes department name 257s exposes cop name 257s compares by value 257s #camel_case 257s converts "lint" to CamelCase 257s converts "foo_bar" to CamelCase 257s converts "rspec" to CamelCase 257s #qualified? 257s says `CopName` is not qualified 257s says `Deep/Department/CopName` is qualified 257s says `Department/CopName` is qualified 257s .new 257s assigns name 257s assigns department 257s assigns department 257s assigns name 257s assigns department 257s assigns name 257s assigns name 257s assigns department 257s .parse 257s parses identifier 257s parses identifier 257s parses identifier 257s parses identifier 257s parses identifier 257s parses identifier 257s .for 257s parses cop class name 257s parses cop class name 257s parses cop class name 257s parses cop class name 257s parses cop class name 257s 257s RuboCop::TargetFinder 257s #find(..., :only_recognized_file_types) 257s does not find hidden files 257s returns absolute paths 257s when a hidden directory path is passed 257s finds files under the specified directory 257s when some non-known Ruby files are specified in the configuration Include and they are explicitly passed as arguments 257s includes them 257s when a directory path is passed 257s finds files under the specified directory 257s when files with a ruby extension are passed 257s picks all the ruby files 257s when local AllCops/Include lists two patterns 257s picks two files 257s when a subdirectory AllCops/Include only lists one pattern 257s picks two files 257s when some non-known Ruby files are specified in the configuration Include and they are not explicitly passed as arguments 257s includes them 257s when input is passed on stdin 257s includes the file 257s when a non-ruby file is passed 257s doesn't pick the file 257s when no argument is passed 257s finds files under the current directory 257s when a pattern is passed 257s finds files which match the pattern 257s when files with ruby interpreters are passed 257s picks all the ruby files 257s when some paths are specified in the configuration Exclude and they are explicitly passed as arguments 257s when it's forced to adhere file exclusion configuration 257s excludes them 257s normally 257s does not exclude them 257s when same paths are passed 257s does not return duplicated file paths 257s when a file with a ruby filename is passed 257s picks all the ruby files 257s when a hidden directory path is passed 257s finds files under the specified directory 257s #target_files_in_dir 257s picks ruby executable files with no extension 257s does not pick files with no extension and no ruby shebang 257s picks files specified to be included in config 257s does not pick directories 257s does not pick files specified to be excluded in config 257s picks files with extension .rb 257s w/ --fail-fast option 257s works with the expected number of .rb files 257s when an exception is raised while reading file 257s and debug mode is enabled 257s outputs error message 257s and debug mode is disabled 257s outputs nothing 257s #find(..., :all_file_types) 257s returns absolute paths 257s does not find hidden files 257s when a file with a ruby filename is passed 257s picks all the ruby files 257s when same paths are passed 257s does not return duplicated file paths 257s when some non-known Ruby files are specified in the configuration Include and they are explicitly passed as arguments 257s includes them 257s when a directory path is passed 257s finds files under the specified directory 257s when some paths are specified in the configuration Exclude and they are explicitly passed as arguments 257s normally 257s does not exclude them 257s when it's forced to adhere file exclusion configuration 257s excludes them 257s when some non-known Ruby files are specified in the configuration Include and they are not explicitly passed as arguments 257s includes them 257s when a pattern is passed 257s finds files which match the pattern 257s when files with ruby interpreters are passed 257s picks all the ruby files 257s when files with a ruby extension are passed 257s picks all the ruby files 257s when local AllCops/Include lists two patterns 257s picks all the ruby files 257s when a subdirectory AllCops/Include only lists one pattern 257s picks all the ruby files 257s when a hidden directory path is passed 257s finds files under the specified directory 257s when no argument is passed 257s finds files under the current directory 257s when input is passed on stdin 257s includes the file 257s when a non-ruby file is passed 257s picks the file 257s #find_files 257s does not search excluded top level directories 257s works also if a folder is named "**" 257s can exclude symlinks as well as directories 257s works also if a folder is named "," 257s resolves symlinks when looking for excluded directories 257s prevents infinite loops when traversing symlinks 257s works also if a folder is named "{}" 257s 257s RuboCop::Cop::Layout::FirstArrayElementLineBreak 257s ignores elements listed on a single line 257s ignores properly formatted implicit arrays 257s elements listed on the first line 257s registers and corrects the offense 257s send implicit arrays 257s registers and corrects the offense 257s word arrays 257s registers and corrects the offense 257s array nested in a method call 257s registers an corrects the offense 257s masgn implicit arrays 257s registers and corrects the offense 257s 257s RuboCop::Cop::Style::RedundantStringEscape 257s does not register an offense for a x-str literal 257s does not register an offense for a __dir__ literal 257s does not register an offense for a __FILE__ literal 257s does not register an offense for a regexp literal 257s with a %q(...) literal 257s behaves like a literal without interpolation 257s does not register an offense for a unicode escape 257s does not register an offense for an escaped # followed { 257s does not register an offense for a meta character 257s does not register an offense with escaped double quote 257s does not register an offense for an escaped interpolation 257s does not register an offense with escaped single quote 257s does not register an offense for a technically-unnecessary escape 257s does not register an offense for control characters 257s does not register an offense with escaped # at end-of-string 257s does not register an offense for a hex escape 257s does not register an offense for a @-escaped ivar interpolation 257s does not register an offense for an escaped cvar interpolation 257s does not register an offense for meta control characters 257s does not register an offense for an allowed escape inside multi-line literal 257s does not register an offense for a @-escaped cvar interpolation 257s does not register an offense for an octal escape 257s does not register an offense for an ascii DEL 257s does not register an offense for an escaped delimiter 257s does not register an offense for an escaped gvar interpolation 257s does not register an offense for a newline 257s does not register an offense for a $-escaped gvar interpolation 257s does not register a bracket-escaped lvar interpolation 257s does not register an offense for an escaped backslash 257s does not register an offense for multiple unicode escapes 257s does not register an offense for an escaped ivar interpolation 257s does not register an offense with escaped # without following { 257s does not register an offense without escapes 257s does not register an offense for an escaped delimiter before interpolation 257s does not register an offense for a bracket-escaped interpolation 257s does not register an offense for an escaped newline 257s does not register an offense for an escaped # with following { 257s with an interpolation-enabled HEREDOC 257s does not register an offense for control characters 257s does not register an offense for a nested heredoc without interpolation 257s does not register an offense for an ascii DEL 257s registers an offense and corrects an escaped single quote 257s does not register an offense for a meta character 257s does not register an offense for a newline 257s does not register an offense for an escaped newline 257s does not register an offense for an escaped ivar interpolation 257s does not register an offense for a bracket-escaped interpolation 257s does not register an offense for an escaped interpolation 257s does not register an offense for meta control characters 257s does not register a bracket-escaped lvar interpolation 257s does not register an offense for a hex escape 257s does not register an offense for a @-escaped cvar interpolation 257s does not register an offense for a $-escaped gvar interpolation 257s does not register an offense for an octal escape 257s does not register an offense without escapes 257s registers an offense and corrects an escaped # without following { 257s does not register an offense for a technically-unnecessary escape 257s does not register an offense for an escaped # followed { 257s does not register an offense for an escaped gvar interpolation 257s does not register an offense for a heredoc interpolating a string with an allowed escape 257s registers an offense and corrects an escaped # at end-of-string 257s does not register an offense for an escaped cvar interpolation 257s does not register an offense for a unicode escape 257s registers an offense and corrects an escaped # before interpolation 257s does not register an offense for an escaped backslash 257s does not register an offense for a @-escaped ivar interpolation 257s does not register an offense for multiple unicode escapes 257s with an interpolation-disabled HEREDOC 257s behaves like a literal without interpolation 257s does not register an offense for an escaped ivar interpolation 257s does not register an offense for multiple unicode escapes 257s does not register an offense for an escaped interpolation 257s does not register an offense for a @-escaped ivar interpolation 257s does not register an offense with escaped single quote 257s does not register an offense for a newline 257s does not register an offense for an escaped backslash 257s does not register a bracket-escaped lvar interpolation 257s does not register an offense with escaped # at end-of-string 257s does not register an offense for a technically-unnecessary escape 257s does not register an offense for an octal escape 257s does not register an offense for meta control characters 257s does not register an offense for a bracket-escaped interpolation 257s does not register an offense for an escaped gvar interpolation 257s does not register an offense for an ascii DEL 257s does not register an offense for a unicode escape 257s does not register an offense with escaped double quote 257s does not register an offense without escapes 257s does not register an offense for an escaped # followed { 257s does not register an offense for a $-escaped gvar interpolation 257s does not register an offense for control characters 257s does not register an offense for an escaped # with following { 257s does not register an offense for a meta character 257s does not register an offense for an escaped cvar interpolation 257s does not register an offense for an escaped newline 257s does not register an offense with escaped # without following { 257s does not register an offense for an allowed escape inside multi-line literal 257s does not register an offense for a hex escape 257s does not register an offense for a @-escaped cvar interpolation 257s with a %w(...) literal 257s does not register an offense for escaped spaces 257s behaves like a literal without interpolation 257s does not register an offense for meta control characters 257s does not register an offense for an escaped # with following { 257s does not register an offense for an ascii DEL 257s does not register an offense with escaped # without following { 257s does not register an offense without escapes 257s does not register an offense for an escaped newline 257s does not register a bracket-escaped lvar interpolation 257s does not register an offense for an escaped ivar interpolation 258s does not register an offense for a technically-unnecessary escape 258s does not register an offense for a @-escaped cvar interpolation 258s does not register an offense for an escaped backslash 258s does not register an offense with escaped double quote 258s does not register an offense for a unicode escape 258s does not register an offense for an escaped interpolation 258s does not register an offense for a bracket-escaped interpolation 258s does not register an offense for a hex escape 258s does not register an offense for an escaped gvar interpolation 258s does not register an offense for an escaped cvar interpolation 258s does not register an offense with escaped # at end-of-string 258s does not register an offense for an octal escape 258s does not register an offense for a meta character 258s does not register an offense for control characters 258s does not register an offense for an escaped # followed { 258s does not register an offense for multiple unicode escapes 258s does not register an offense with escaped single quote 258s does not register an offense for an allowed escape inside multi-line literal 258s does not register an offense for an escaped delimiter 258s does not register an offense for an escaped delimiter before interpolation 258s does not register an offense for a @-escaped ivar interpolation 258s does not register an offense for a $-escaped gvar interpolation 258s does not register an offense for a newline 258s with a %Q!...! literal 258s behaves like a literal with interpolation 258s does not register an offense for a $-escaped gvar interpolation 258s registers an offense and corrects an escaped } when escaping both brackets to avoid interpolation 258s does not register an offense for an escaped newline 258s does not register an offense for an escaped delimiter before interpolation 258s does not register an offense for control characters 258s does not register an offense for a bracket-escaped interpolation 258s does not register an offense for an escaped gvar interpolation 258s does not register an offense for a meta character 258s does not register an offense for a @-escaped ivar interpolation 258s does not register a bracket-escaped lvar interpolation 258s does not register an offense for an escaped interpolation 258s does not register an offense for an escaped # followed { 258s does not register an offense for meta control characters 258s does not register an offense without escapes 258s does not register an offense for a hex escape 258s does not register an offense for an escaped ivar interpolation 258s does not register an offense for multiple unicode escapes 258s does not register an offense for a unicode escape 258s registers an offense and corrects a escaped nested delimiter in a double quoted string 258s does not register an offense for a newline 258s does not register an offense for an octal escape 258s does not register an offense for a technically-unnecessary escape 258s does not register an offense for an escaped cvar interpolation 258s registers an offense and corrects an escaped double quote 258s registers an offense and corrects an escaped # without following { 258s registers an offense and corrects an escaped # at end-of-string 258s does not register an offense for a @-escaped cvar interpolation 258s registers an offense and corrects an escaped # before interpolation 258s registers an offense and corrects an escaped single quote 258s does not register an offense for an escaped delimiter 258s does not register an offense for an escaped backslash 258s does not register an offense for an ascii DEL 258s when using character literals 258s does not register an offense for `?a` 258s does not register an offense for `?\n` 258s with a %W(...) literal 258s does not register an offense for escaped spaces 258s behaves like a literal with interpolation 258s does not register an offense for a @-escaped ivar interpolation 258s registers an offense and corrects an escaped # at end-of-string 258s does not register an offense for control characters 258s does not register an offense for an escaped ivar interpolation 258s registers an offense and corrects an escaped # before interpolation 258s does not register an offense for meta control characters 258s does not register an offense without escapes 258s does not register an offense for a $-escaped gvar interpolation 258s does not register an offense for a hex escape 258s registers an offense and corrects a escaped nested delimiter in a double quoted string 258s does not register an offense for a technically-unnecessary escape 258s does not register an offense for multiple unicode escapes 258s does not register an offense for an escaped backslash 258s does not register an offense for a meta character 258s registers an offense and corrects an escaped single quote 258s does not register an offense for an ascii DEL 258s does not register an offense for a newline 258s does not register an offense for an escaped delimiter before interpolation 258s does not register an offense for an escaped gvar interpolation 258s does not register an offense for an escaped interpolation 258s does not register an offense for an escaped newline 258s does not register an offense for an octal escape 258s does not register an offense for a bracket-escaped interpolation 258s registers an offense and corrects an escaped } when escaping both brackets to avoid interpolation 258s registers an offense and corrects an escaped # without following { 258s does not register a bracket-escaped lvar interpolation 258s does not register an offense for a unicode escape 258s does not register an offense for an escaped delimiter 258s does not register an offense for an escaped # followed { 258s does not register an offense for a @-escaped cvar interpolation 258s does not register an offense for an escaped cvar interpolation 258s registers an offense and corrects an escaped double quote 258s with a %Q(...) literal 258s behaves like a literal with interpolation 258s does not register an offense for an escaped backslash 258s does not register an offense for a technically-unnecessary escape 258s does not register an offense for an escaped ivar interpolation 258s does not register an offense for a newline 258s registers an offense and corrects an escaped # at end-of-string 258s does not register an offense for control characters 258s does not register an offense for a @-escaped cvar interpolation 258s does not register an offense for a hex escape 258s registers an offense and corrects an escaped } when escaping both brackets to avoid interpolation 258s does not register an offense for a @-escaped ivar interpolation 258s registers an offense and corrects an escaped # before interpolation 258s does not register an offense for an escaped cvar interpolation 258s does not register an offense for an escaped delimiter 258s does not register an offense for multiple unicode escapes 258s does not register an offense for an escaped delimiter before interpolation 258s registers an offense and corrects an escaped double quote 258s does not register an offense without escapes 258s does not register an offense for an escaped gvar interpolation 258s does not register a bracket-escaped lvar interpolation 258s does not register an offense for meta control characters 258s does not register an offense for an octal escape 258s does not register an offense for a meta character 258s does not register an offense for a bracket-escaped interpolation 258s does not register an offense for a unicode escape 258s does not register an offense for an escaped # followed { 258s registers an offense and corrects an escaped single quote 258s does not register an offense for an ascii DEL 258s registers an offense and corrects a escaped nested delimiter in a double quoted string 258s registers an offense and corrects an escaped # without following { 258s does not register an offense for an escaped newline 258s does not register an offense for an escaped interpolation 258s does not register an offense for a $-escaped gvar interpolation 258s with a single quoted string 258s behaves like a literal without interpolation 258s does not register an offense for control characters 258s does not register an offense for an escaped cvar interpolation 258s does not register an offense for an escaped newline 258s does not register an offense for an allowed escape inside multi-line literal 258s does not register an offense with escaped # at end-of-string 258s does not register an offense with escaped double quote 258s does not register an offense for an escaped # followed { 258s does not register an offense for an escaped backslash 258s does not register an offense without escapes 258s does not register an offense for an escaped delimiter 258s does not register an offense for an octal escape 258s does not register an offense with escaped # without following { 258s does not register an offense with escaped single quote 258s does not register an offense for a $-escaped gvar interpolation 258s does not register an offense for meta control characters 258s does not register an offense for a hex escape 258s does not register an offense for an escaped # with following { 258s does not register an offense for a unicode escape 258s does not register an offense for an escaped gvar interpolation 258s does not register an offense for an escaped ivar interpolation 258s does not register an offense for an escaped delimiter before interpolation 258s does not register an offense for a meta character 258s does not register a bracket-escaped lvar interpolation 258s does not register an offense for a bracket-escaped interpolation 258s does not register an offense for multiple unicode escapes 258s does not register an offense for a newline 258s does not register an offense for a @-escaped cvar interpolation 258s does not register an offense for a technically-unnecessary escape 258s does not register an offense for an ascii DEL 258s does not register an offense for an escaped interpolation 258s does not register an offense for a @-escaped ivar interpolation 258s with a %(...) literal 258s behaves like a literal with interpolation 258s registers an offense and corrects an escaped # at end-of-string 258s does not register an offense for an escaped gvar interpolation 258s does not register an offense for an escaped delimiter before interpolation 258s registers an offense and corrects an escaped single quote 258s registers an offense and corrects a escaped nested delimiter in a double quoted string 258s does not register an offense for an escaped backslash 258s does not register an offense for a meta character 258s does not register an offense for an octal escape 258s does not register an offense for a $-escaped gvar interpolation 258s registers an offense and corrects an escaped # before interpolation 258s does not register an offense for multiple unicode escapes 258s does not register an offense for control characters 258s does not register an offense for meta control characters 258s does not register an offense for a hex escape 258s does not register a bracket-escaped lvar interpolation 258s does not register an offense for an ascii DEL 258s does not register an offense for a @-escaped cvar interpolation 258s does not register an offense for an escaped cvar interpolation 258s does not register an offense for an escaped interpolation 258s does not register an offense for a unicode escape 258s does not register an offense for a @-escaped ivar interpolation 258s does not register an offense for an escaped newline 258s registers an offense and corrects an escaped double quote 258s does not register an offense for an escaped # followed { 258s registers an offense and corrects an escaped } when escaping both brackets to avoid interpolation 258s does not register an offense for a bracket-escaped interpolation 258s registers an offense and corrects an escaped # without following { 258s does not register an offense without escapes 258s does not register an offense for an escaped ivar interpolation 258s does not register an offense for a newline 258s does not register an offense for an escaped delimiter 258s does not register an offense for a technically-unnecessary escape 258s with a double quoted string 258s does not register an offense with escaped double quote 258s registers an offense and corrects an unnecessary escape in multi-line broken string 258s does not register an offense when escaping a quote in multi-line broken string 258s does not register an offense with multiple escaped backslashes 258s behaves like a literal with interpolation 258s does not register a bracket-escaped lvar interpolation 258s does not register an offense for an escaped cvar interpolation 258s does not register an offense for control characters 258s does not register an offense for an escaped interpolation 258s does not register an offense without escapes 258s registers an offense and corrects an escaped # at end-of-string 258s does not register an offense for a bracket-escaped interpolation 258s does not register an offense for a technically-unnecessary escape 258s does not register an offense for a meta character 258s does not register an offense for an escaped backslash 258s does not register an offense for an escaped gvar interpolation 258s does not register an offense for a $-escaped gvar interpolation 258s does not register an offense for a unicode escape 258s does not register an offense for meta control characters 258s registers an offense and corrects an escaped # without following { 258s does not register an offense for a hex escape 258s does not register an offense for an escaped delimiter before interpolation 258s does not register an offense for a @-escaped cvar interpolation 258s does not register an offense for an octal escape 258s does not register an offense for multiple unicode escapes 258s registers an offense and corrects an escaped # before interpolation 258s does not register an offense for an escaped newline 258s does not register an offense for a newline 258s does not register an offense for an ascii DEL 258s registers an offense and corrects an escaped single quote 258s does not register an offense for an escaped delimiter 258s does not register an offense for an escaped ivar interpolation 258s registers an offense and corrects an escaped } when escaping both brackets to avoid interpolation 258s does not register an offense for an escaped # followed { 258s does not register an offense for a @-escaped ivar interpolation 258s 258s RuboCop::Cop::EnforceSuperclass 258s registers an offense for Class.new definition 258s registers an offense for model defined using top-level 258s registers an offense for top-level constant ::Class.new definition 258s registers an offense for models that subclass ::ActiveRecord::Base 258s registers an offense for single-line definitions 258s registers an offense for models that subclass ActiveRecord::Base 258s when MyModel subclasses ApplicationRecord 258s behaves like no offense 258s registers no offenses for `class MyModel < ApplicationRecord; end` 258s behaves like no offense 258s registers no offenses for `class MyModel < ::ApplicationRecord; end` 258s behaves like no offense 258s registers no offenses for `MyModel = ::Class.new(::ApplicationRecord) do 258s end 258s MyModel = ::Class.new(::ApplicationRecord) 258s ` 258s behaves like no offense 258s registers no offenses for `MyModel = Class.new(ApplicationRecord) do 258s end 258s MyModel = Class.new(ApplicationRecord) 258s ` 258s when ApplicationRecord subclasses ActiveRecord::Base 258s behaves like no offense 258s registers no offenses for `ApplicationRecord = Class.new(ActiveRecord::Base) 258s ` 258s behaves like no offense 258s registers no offenses for `ApplicationRecord = Class.new(ActiveRecord::Base) do; end 258s ` 258s behaves like no offense 258s registers no offenses for `::ApplicationRecord = ::Class.new(::ActiveRecord::Base) do; end 258s ` 258s behaves like no offense 258s registers no offenses for `class ::ApplicationRecord < ActiveRecord::Base; end` 258s behaves like no offense 258s registers no offenses for `::ApplicationRecord = ::Class.new(::ActiveRecord::Base) 258s ` 258s behaves like no offense 258s registers no offenses for `class ApplicationRecord < ActiveRecord::Base; end` 258s behaves like no offense 258s registers no offenses for `ApplicationRecord = Class.new(::ActiveRecord::Base) do; end 258s ` 258s behaves like no offense 258s registers no offenses for `::ApplicationRecord = Class.new(ActiveRecord::Base) do; end 258s ` 258s 258s RuboCop::Cop::Layout::SpaceInsideArrayLiteralBrackets 258s does not register offense for any kind of reference brackets 258s when EnforcedStyle is space 258s does not register offense for valid 2-dimensional array 258s behaves like space inside arrays 258s does not register offense for arrays with spaces 258s does not register offense when bottom bracket gets its own line & has trailing method 258s accepts square brackets called with method call syntax 258s accepts square brackets as method name 258s does not register offense for arrays using ref brackets 258s accepts space inside array brackets with comment 258s register an offense and corrects when 2 arrays are on one line 258s registers an offense and corrects array brackets with no trailing whitespace 258s registers an offense and corrects an array missing whitespace when there is more than one array on a line 258s registers an offense and corrects array brackets with no leading whitespace 258s does not register offense for valid multiline array 258s registers an offense and corrects multiline array on end bracket with trailing method 258s does not register offense for array when brackets get their own line 258s registers an offense and corrects multiline array on end bracket 258s does not register offense when 2 arrays on one line 258s does not register offense for indented array when bottom bracket gets its own line & is misaligned 258s when EnforcedStyle is compact 258s registers an offense and corrects space between 2 opening brackets 258s registers an offense and corrects space between 2 closing brackets 258s does not register offense for valid 4-dimensional array 258s does not register offense for valid 2-dimensional array 258s does not register offense for valid 3-dimensional array 258s registers an offense and corrects 2-dimensional array with extra spaces 258s accepts multiline array 258s registers an offense and corrects 3-dimensional array with extra spaces 258s multiline, 2-dimensional array with spaces 258s registers an offense and corrects at the end of array 258s registers an offense and corrects at the beginning of array 258s multiline, 2-dimensional array with newlines 258s registers an offense and corrects at the end of array 258s registers an offense and corrects at the beginning of array 258s behaves like space inside arrays 258s registers an offense and corrects array brackets with no trailing whitespace 258s register an offense and corrects when 2 arrays are on one line 258s accepts space inside array brackets with comment 258s accepts square brackets as method name 258s registers an offense and corrects multiline array on end bracket with trailing method 258s registers an offense and corrects multiline array on end bracket 258s registers an offense and corrects array brackets with no leading whitespace 258s accepts square brackets called with method call syntax 258s registers an offense and corrects an array missing whitespace when there is more than one array on a line 258s does not register offense for arrays using ref brackets 258s does not register offense for array when brackets get their own line 258s does not register offense when 2 arrays on one line 258s does not register offense for arrays with spaces 258s does not register offense when bottom bracket gets its own line & has trailing method 258s does not register offense for indented array when bottom bracket gets its own line & is misaligned 258s does not register offense for valid multiline array 258s with space inside empty brackets not allowed 258s registers an offense and corrects empty brackets with multiple spaces inside 258s registers an offense and corrects empty brackets with 1 space inside 258s accepts empty brackets with no space inside 258s registers an offense and corrects multiline spaces 258s when EnforcedStyle is no_space 258s does not register offense for valid 2-dimensional array 258s registers an offense and corrects an array when two on one line 258s registers an offense and corrects 2 arrays on one line 258s does not register offense for arrays using ref brackets 258s accepts a multiline array with whitespace before end bracket 258s does not register offense when contains an array literal as an argument after a heredoc is started 258s registers an offense and corrects multiline array on end bracket 258s registers an offense and corrects an array literal as an argument with trailing whitespace after a heredoc is started 258s registers an offense and corrects array brackets with trailing whitespace 258s registers an offense and corrects array brackets with leading whitespace 258s does not register offense when bottom bracket gets its own line indented with tabs 258s does not register offense for array when brackets get own line 258s does not register offense when 2 arrays on one line 258s accepts space inside array brackets if with comment 258s registers an offense and corrects multiline array on end bracket with trailing method 258s accepts square brackets called with method call syntax 258s does not register offense for arrays with no spaces 258s does not register offense for indented array when bottom bracket gets its own line & is misaligned 258s does not register offense for valid multiline array 258s does not register offense when bottom bracket gets its own line & has trailing method 258s accepts square brackets as method name 258s with space inside empty braces allowed 258s registers an offense and corrects empty brackets with no space inside 258s registers an offense and corrects empty brackets with more than one space inside 258s accepts empty brackets with space inside 258s 258s RuboCop::Cop::Lint::RandOne 258s behaves like offenses 258s rand(-1.0) 258s registers an offense 258s behaves like no offense 258s rand(2) 258s does not register an offense 258s behaves like offenses 258s rand 1 258s registers an offense 258s behaves like offenses 258s Kernel.rand 1.0 258s registers an offense 258s behaves like no offense 258s Kernel.rand 258s does not register an offense 258s behaves like no offense 258s ::Kernel.rand 258s does not register an offense 258s behaves like offenses 258s Kernel.rand(-1.0) 258s registers an offense 258s behaves like offenses 258s rand(1.0) 258s registers an offense 258s behaves like no offense 258s rand(-1..1) 258s does not register an offense 258s behaves like offenses 258s Kernel.rand(1) 258s registers an offense 258s behaves like offenses 258s ::Kernel.rand(1) 258s registers an offense 258s behaves like no offense 258s rand 258s does not register an offense 258s behaves like no offense 258s Kernel.rand(-1..1) 258s does not register an offense 258s behaves like offenses 258s rand(-1) 258s registers an offense 258s behaves like no offense 258s Kernel.rand 2 258s does not register an offense 258s behaves like offenses 258s Kernel.rand(-1) 258s registers an offense 258s 258s RuboCop::Cop::Layout::ArrayAlignment 258s when aligned with first parameter 258s accepts several elements per line 258s does not register an offense or try to correct parallel assignment 258s registers an offense and corrects misaligned array elements 258s autocorrects array within array with too much indentation 258s accepts the first element being on a new row 258s autocorrects misaligned array with the first element on a new row 258s accepts single line array 258s autocorrects array within array with too little indentation 258s does not indent heredoc strings when autocorrecting 258s accepts aligned array with fullwidth characters 258s accepts aligned array keys 258s when aligned with fixed indentation 258s autocorrects array within array with too little indentation 258s accepts single line array 258s does not register an offense or try to correct parallel assignment 258s accepts aligned array keys 258s accepts the first element being on a new row 258s accepts several elements per line 258s accepts aligned array with fullwidth characters 258s does not indent heredoc strings when autocorrecting 258s autocorrects array within array with too much indentation 258s registers an offense and corrects misaligned array elements 258s autocorrects misaligned array with the first element on a new row 258s 258s RuboCop::Cop::Lint::TrailingCommaInAttributeDeclaration 258s does not register an offense when not using trailing comma 258s registers an offense when using trailing comma 258s 258s RuboCop::Cop::Layout::AssignmentIndentation 258s allows a properly indented rhs with fullwidth characters 258s registers an offense for multi-lhs 258s registers an offense for incorrectly indented rhs 258s allows a properly indented rhs 258s ignores comparison operators 258s registers an offense for incorrectly indented rhs whenmultiple assignment with line breaks on each line 258s registers an offense for incorrectly indented rhs when multiple assignment 258s allows assignments that do not start on a newline 258s when indentation width is overridden for this cop only 259s autocorrects indentation 259s allows a properly indented rhs 259s 259s RuboCop::Cop::Bundler::GemComment 259s when investigating Ruby files 259s does not register any offenses 259s when investigating Gemfiles 259s and a gem has no comment 259s registers an offense 259s and the gem is commented 259s does not register any offenses 259s and the file is empty 259s does not register any offenses 259s and the file contains source and group 259s does not register any offenses 259s and the gem is commented on the same line 259s does not register any offenses 259s when the "OnlyFor" option is set 259s including "version_specifiers" 259s when a gem is uncommented and has options but no version specifiers 259s does not register an offense 259s when a gem is uncommented and has multiple version specifiers 259s registers an offense 259s when a gem is uncommented and has a version specifier 259s registers an offense 259s when a gem is uncommented and has no version specified 259s does not register an offense 259s when a gem is uncommented and has a version specifier along with other options 259s registers an offense 259s when a gem is commented 259s does not register an offense 259s including "restrictive_version_specifiers" 259s when a gem is uncommented and has a frozen version specifier 259s registers an offense 259s when a gem is uncommented and has a non-minimum version specifier with a leading space 259s registers an offense 259s when a gem is uncommented and has both minimum and non-minimum version specifier 259s registers an offense 259s when a gem is uncommented and has no version specified 259s does not register an offense 259s when a gem is uncommented and has only a minimum version specifier 259s does not register an offense 259s when a gem is uncommented and has options but no version specifiers 259s does not register an offense 259s when a gem is uncommented and has a version specifier along with other options 259s registers an offense 259s when a gem is commented 259s does not register an offense 259s when a gem is uncommented and has a version specifier without operator 259s registers an offense 259s when a gem is uncommented and has a pessimistic version specifier 259s registers an offense 259s including one or more option names but not "version_specifiers" 259s when a gem is uncommented and has a version specifier but none of the specified options 259s does not register an offense 259s when a gem is uncommented and has one of the specified options 259s registers an offense 259s when a gem is uncommented and contains only options not specified 259s does not register an offense 259s and the gem is permitted 259s does not register any offenses 259s 259s RuboCop::Cop::Style::TrailingCommaInBlockArgs 259s when `lambda` has multiple arguments 259s does not register an offense when more than one argument is present with no trailing comma 259s registers an offense and corrects when a trailing comma isn't needed 259s do/end block format 259s does not register an offense for an empty block 259s does not register an offense when more than one argument is present with no trailing comma 259s registers an offense when a trailing comma is not needed 259s does not register an offense when no arguments are present 259s does not register an offense for keyword arguments 259s does not register an offense for default arguments 259s does not register an offense when a trailing comma is required 259s preserves semicolons in block/local variables 259s ignores commas in default argument strings 259s curly brace block format 259s preserves semicolons in block/local variables 259s does not register an offense for keyword arguments 259s does not register an offense when no arguments are present 259s does not register an offense for default arguments 259s registers an offense when a trailing comma is not needed 259s does not register an offense when a trailing comma is required 259s ignores commas in default argument strings 259s does not register an offense when more than one argument is present with no trailing comma 259s when `->` has multiple arguments 259s does not register an offense 259s 259s RuboCop::TargetRuby 259s when TargetRubyVersion is not set 259s when .ruby-version is in a parent directory 259s reads it to determine the target ruby version 259s when .ruby-version is not in a parent directory 259s when gems.locked is in a parent directory 259s does 259s when Gemfile.lock is in a parent directory 259s does 259s when .ruby-version is present 259s does not read .tool-versions, Gemfile.lock or gems.locked 259s when the MRI version contains multiple digits 259s reads it to determine the target ruby version 259s when .ruby-version contains a JRuby version 259s uses the default target ruby version 259s when .ruby-version contains a Rbx version 259s uses the default target ruby version 259s when .ruby-version contains a version prefixed by "ruby-" 259s correctly determines the target ruby version 259s when .ruby-version contains an MRI version 259s reads it to determine the target ruby version 259s when .ruby-version contains "system" version 259s uses the default target ruby version 259s when .tool-versions is present 259s when .tool-versions does not contain a ruby version 259s uses the default ruby version 259s when .tool-versions contains a ruby version 259s does not read Gemfile.lock, gems.locked 259s reads it to determine the target ruby version 259s when .ruby-version is not present 259s when bundler lock files are not present 259s uses the default target ruby version 259s and Gemfile.lock exists 259s uses the default Ruby when Ruby is not in Gemfile.lock 259s uses MRI Ruby version when it is present in Gemfile.lock 259s uses the default Ruby when rbx is in Gemfile.lock 259s uses MRI Ruby version when it has multiple digits 259s uses the default Ruby when jruby is in Gemfile.lock 259s and gems.locked exists 259s uses MRI Ruby version when it is present in gems.locked 259s uses the default Ruby when Ruby is not in gems.locked 259s uses MRI Ruby version when it has multiple digits 259s uses the default Ruby when rbx is in gems.locked 259s uses the default Ruby when jruby is in gems.locked 259s gemspec file 259s when file does not contain `required_ruby_version` 259s sets default target_ruby 259s when file contains `required_ruby_version` as an array 259s sets target_ruby to the minimal version satisfying the requirements 259s sets target_ruby from required_ruby_version with many requirements 259s when file contains `required_ruby_version` as a requirement 259s sets first known ruby version that satisfies requirement 259s sets target_ruby from required_ruby_version from inclusive requirement range 259s when file contains `required_ruby_version` as a string 259s sets target_ruby from inclusive range 259s sets target_ruby from approximate version 259s sets target_ruby from exclusive range 259s when TargetRubyVersion is set 259s does not read Gemfile.lock or gems.locked 259s does not read .ruby-version 259s uses TargetRubyVersion 259s 259s RuboCop::Cop::Style::AutoResourceCleanup 259s does not register an offense for File.open with block-pass 259s registers an offense for File.open without block 259s does not register an offense for File.open with immediate close 259s does not register an offense for File.open with block 259s 259s Pending: (Failures listed here are expected and do not affect your suite's status) 259s 259s 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 259s # Requires an advanced logic that checks whether the return value of an operator assignment is used or not. 259s Failure/Error: 259s expect_offense(<<~RUBY) 259s def some_method 259s total = 0 259s foo = 0 259s 259s while total < 100 259s total += 1 259s foo += 1 259s ^^^ Useless assignment to variable - `foo`. 259s end 259s 259s Diff: 259s @@ -5,7 +5,6 @@ 259s while total < 100 259s total += 1 259s foo += 1 259s - ^^^ Useless assignment to variable - `foo`. 259s end 259s 259s total 259s # /usr/share/rubygems-integration/all/gems/rubocop-1.39.0/lib/rubocop/rspec/expect_offense.rb:123:in `expect_offense' 259s # ./spec/rubocop/cop/lint/useless_assignment_spec.rb:341:in `block (3 levels) in ' 259s # /usr/share/rubygems-integration/all/gems/webmock-3.18.1/lib/webmock/rspec.rb:37:in `block (2 levels) in ' 259s 259s Finished in 1 minute 44.13 seconds (files took 4.64 seconds to load) 259s 19119 examples, 0 failures, 1 pending 259s 259s Randomized with seed 16316 259s 260s mv ./.gem2deb.lib lib 261s autopkgtest [23:49:11]: test gem2deb-test-runner: -----------------------] 262s gem2deb-test-runner PASS 262s autopkgtest [23:49:12]: test gem2deb-test-runner: - - - - - - - - - - results - - - - - - - - - - 262s autopkgtest [23:49:12]: @@@@@@@@@@@@@@@@@@@@ summary 262s gem2deb-test-runner PASS 266s Creating nova instance adt-noble-arm64-rubocop-20240307-234449-juju-7f2275-prod-proposed-migration-environment-3 from image adt/ubuntu-noble-arm64-server-20240307.img (UUID 00fdfee3-5cf8-4806-8086-451645753def)...